/*
 howler.js v2.1.1 | (c) 2013-2018, James Simpson of GoldFire Studios | MIT License | howlerjs.com  Spatial Plugin  @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(ca,y,V){ca!=Array.prototype&&ca!=Object.prototype&&(ca[y]=V.value)};$jscomp.getGlobal=function(ca){return"undefined"!=typeof window&&window===ca?ca:"undefined"!=typeof global&&null!=global?global:ca};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.Symbol=function(){var ca=0;return function(y){return $jscomp.SYMBOL_PREFIX+(y||"")+ca++}}();
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var ca=$jscomp.global.Symbol.iterator;ca||(ca=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[ca]&&$jscomp.defineProperty(Array.prototype,ca,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};
$jscomp.arrayIterator=function(ca){var y=0;return $jscomp.iteratorPrototype(function(){return y<ca.length?{done:!1,value:ca[y++]}:{done:!0}})};$jscomp.iteratorPrototype=function(ca){$jscomp.initSymbolIterator();ca={next:ca};ca[$jscomp.global.Symbol.iterator]=function(){return this};return ca};
$jscomp.iteratorFromArray=function(ca,y){$jscomp.initSymbolIterator();ca instanceof String&&(ca+="");var V=0,R={next:function(){if(V<ca.length){var O=V++;return{value:y(O,ca[O]),done:!1}}R.next=function(){return{done:!0,value:void 0}};return R.next()}};R[Symbol.iterator]=function(){return R};return R};
$jscomp.polyfill=function(ca,y,V,R){if(y){V=$jscomp.global;ca=ca.split(".");for(R=0;R<ca.length-1;R++){var O=ca[R];O in V||(V[O]={});V=V[O]}ca=ca[ca.length-1];R=V[ca];y=y(R);y!=R&&null!=y&&$jscomp.defineProperty(V,ca,{configurable:!0,writable:!0,value:y})}};$jscomp.polyfill("Array.prototype.keys",function(ca){return ca?ca:function(){return $jscomp.iteratorFromArray(this,function(y){return y})}},"es6","es3");
$jscomp.polyfill("String.fromCodePoint",function(ca){return ca?ca:function(y){for(var V="",R=0;R<arguments.length;R++){var O=Number(arguments[R]);if(0>O||1114111<O||O!==Math.floor(O))throw new RangeError("invalid_code_point "+O);65535>=O?V+=String.fromCharCode(O):(O-=65536,V+=String.fromCharCode(O>>>10&1023|55296),V+=String.fromCharCode(O&1023|56320))}return V}},"es6","es3");
$jscomp.checkStringArgs=function(ca,y,V){if(null==ca)throw new TypeError("The 'this' value for String.prototype."+V+" must not be null or undefined");if(y instanceof RegExp)throw new TypeError("First argument to String.prototype."+V+" must not be a regular expression");return ca+""};
$jscomp.polyfill("String.prototype.startsWith",function(ca){return ca?ca:function(y,V){var R=$jscomp.checkStringArgs(this,y,"startsWith");y+="";var O=R.length,va=y.length;V=Math.max(0,Math.min(V|0,R.length));for(var w=0;w<va&&V<O;)if(R[V++]!=y[w++])return!1;return w>=va}},"es6","es3");$jscomp.polyfill("Array.prototype.values",function(ca){return ca?ca:function(){return $jscomp.iteratorFromArray(this,function(y,V){return V})}},"es6","es3");
$jscomp.polyfill("String.prototype.codePointAt",function(ca){return ca?ca:function(y){var V=$jscomp.checkStringArgs(this,null,"codePointAt"),R=V.length;y=Number(y)||0;if(0<=y&&y<R){y|=0;var O=V.charCodeAt(y);if(55296>O||56319<O||y+1===R)return O;y=V.charCodeAt(y+1);return 56320>y||57343<y?O:1024*(O-55296)+y+9216}}},"es6","es3");
$jscomp.polyfill("String.prototype.endsWith",function(ca){return ca?ca:function(y,V){var R=$jscomp.checkStringArgs(this,y,"endsWith");y+="";void 0===V&&(V=R.length);V=Math.max(0,Math.min(V|0,R.length));for(var O=y.length;0<O&&0<V;)if(R[--V]!=y[--O])return!1;return 0>=O}},"es6","es3");
$jscomp.polyfill("String.prototype.repeat",function(ca){return ca?ca:function(y){var V=$jscomp.checkStringArgs(this,null,"repeat");if(0>y||1342177279<y)throw new RangeError("Invalid count value");y|=0;for(var R="";y;)if(y&1&&(R+=V),y>>>=1)V+=V;return R}},"es6","es3");
$jscomp.polyfill("Array.prototype.fill",function(ca){return ca?ca:function(y,V,R){var O=this.length||0;0>V&&(V=Math.max(0,O+V));if(null==R||R>O)R=O;R=Number(R);0>R&&(R=Math.max(0,O+R));for(V=Number(V||0);V<R;V++)this[V]=y;return this}},"es6","es3");
(function(ca,y){ca.lime=ca.lime||{};ca.lime.$scripts=ca.lime.$scripts||{};ca.lime.$scripts["9"]=function(y,R){(function(y,R){function w(a,b){a=Object.create(a);for(var c in b)a[c]=b[c];b.toString!==Object.prototype.toString&&(a.toString=b.toString);return a}function O(a){return a instanceof Array?B.iter(a):a.iterator()}function v(a,b){if(null==b)return null;null==b.__id__&&(b.__id__=R.$haxeUID++);var c;null==a.hx__closures__?a.hx__closures__={}:c=a.hx__closures__[b.__id__];null==c&&(c=b.bind(a),a.hx__closures__[b.__id__]=
c);return c}y.lime=y.lime||{};var h={},u=function(){return L.__string_rec(this,"")},C=C||{},x,Pa=function(){};h.ApplicationMain=Pa;Pa.__name__="ApplicationMain";Pa.main=function(){Y.am=Pa;Y.setupTracing(!0);ma.load();S.loadInputConfig();Y.setupTracing();Ra.__registerEntryPoint("9",Pa.create);$a.get_current()};Pa.reloadGame=function(){for(var a=0,b=Pa.reloadListeners;a<b.length;){var c=b[a];++a;c()}r.resetStatics();ab.resetStatics();Bb.resetStatics();$f.resetStatics();Eb.resetStatics();La.resetStatics();
$b.resetStatics();Ud.resetStatics();Cc.resetStatics();ue.resetStatics();ag.resetStatics();Ce.resetStatics();Gb.resetStatics();T.resetStatics();ac.resetStatics();S.resetStatics();p.resetStatics();$a.get_current().removeChild(Pa.universal);S.loadInputConfig();Pa.universal=new Y;$a.get_current().addChild(Pa.universal);Pa.universal.preloaderComplete()};Pa.create=function(a){Pa.app=new Ak;va.init(a);var b=Pa.app.meta;null!=q.build?b.setReserved("build","1"):b.h.build="1";b=Pa.app.meta;null!=q.company?
b.setReserved("company","Stencyl"):b.h.company="Stencyl";b=Pa.app.meta;null!=q.file?b.setReserved("file","9"):b.h.file="9";b=Pa.app.meta;null!=q.name?b.setReserved("name","9"):b.h.name="9";b=Pa.app.meta;null!=q.packageName?b.setReserved("packageName","com.example.myapp"):b.h.packageName="com.example.myapp";b=Pa.app.meta;null!=q.version?b.setReserved("version","1.0.0"):b.h.version="1.0.0";b={allowHighDPI:!1,alwaysOnTop:!1,borderless:!1,element:null,frameRate:65,height:320,hidden:!1,maximized:!1,minimized:!1,
parameters:{},resizable:!1,title:"9",width:480,x:null,y:null};b.context={antialiasing:ma.antialias?2:0,background:0,colorDepth:32,depth:!0,hardware:!0,stencil:!0,type:null,vsync:!0};if(null==Pa.app.__window&&null!=a)for(var c=0,d=X.fields(a);c<d.length;){var e=d[c];++c;Object.prototype.hasOwnProperty.call(b,e)?b[e]=X.field(a,e):Object.prototype.hasOwnProperty.call(b.context,e)&&(b.context[e]=X.field(a,e))}Pa.app.createWindow(b);ma.releaseMode||$a.get_current().get_loaderInfo().uncaughtErrorEvents.addEventListener("uncaughtError",
Pa.uncaughtErrorHandler);Y.initWindow(Pa.app.__window);Pa.universal=new Y;$a.get_current().addChild(Pa.universal);a=new $l;a.onComplete.add((x=Pa.universal,v(x,x.preloaderComplete)));Pa.app.__preloader.onProgress.add(v(a,a.onUpdate));Pa.app.__preloader.onComplete.add(v(a,a.onLoaded));a=0;for(b=va.preloadLibraries;a<b.length;)c=b[a],++a,Pa.app.__preloader.addLibrary(c);a=0;for(b=va.preloadLibraryNames;a<b.length;)c=b[a],++a,Pa.app.__preloader.addLibraryName(c);Pa.app.__preloader.load();Pa.app.exec()};
Pa.uncaughtErrorHandler=function(a){};var Ca=function(a,b){this.r=new RegExp(a,b.split("u").join(""))};h.EReg=Ca;Ca.__name__="EReg";Ca.prototype={r:null,match:function(a){this.r.global&&(this.r.lastIndex=0);this.r.m=this.r.exec(a);this.r.s=a;return null!=this.r.m},matched:function(a){if(null!=this.r.m&&0<=a&&a<this.r.m.length)return this.r.m[a];throw new E("EReg::matched");},matchedRight:function(){if(null==this.r.m)throw new E("No string matched");var a=this.r.m.index+this.r.m[0].length;return B.substr(this.r.s,
a,this.r.s.length-a)},matchedPos:function(){if(null==this.r.m)throw new E("No string matched");return{pos:this.r.m.index,len:this.r.m[0].length}},matchSub:function(a,b,c){null==c&&(c=-1);if(this.r.global){this.r.lastIndex=b;this.r.m=this.r.exec(0>c?a:B.substr(a,0,b+c));if(b=null!=this.r.m)this.r.s=a;return b}if(c=this.match(0>c?B.substr(a,b,null):B.substr(a,b,c)))this.r.s=a,this.r.m.index+=b;return c},split:function(a){return a.replace(this.r,"#__delim__#").split("#__delim__#")},map:function(a,b){for(var c=
0,d="";!(c>=a.length);){if(!this.matchSub(a,c)){d+=K.string(B.substr(a,c,null));break}var e=this.matchedPos();d+=K.string(B.substr(a,c,e.pos-c));d+=K.string(b(this));0==e.len?(d+=K.string(B.substr(a,e.pos,1)),c=e.pos+1):c=e.pos+e.len;if(!this.r.global)break}!this.r.global&&0<c&&c<a.length&&(d+=K.string(B.substr(a,c,null)));return d},__class__:Ca};var B=function(){};h.HxOverrides=B;B.__name__="HxOverrides";B.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 E("Invalid date format : "+a);}};B.cca=function(a,b){a=a.charCodeAt(b);if(a==a)return a};B.substr=function(a,b,c){if(null==c)c=a.length;else if(0>c)if(0==b)c=a.length+c;else return"";return a.substr(b,c)};B.remove=function(a,b){b=a.indexOf(b);if(-1==b)return!1;
a.splice(b,1);return!0};B.iter=function(a){return{cur:0,arr:a,hasNext:function(){return this.cur<this.arr.length},next:function(){return this.arr[this.cur++]}}};var V=function(a,b){this.min=a;this.max=b};h.IntIterator=V;V.__name__="IntIterator";V.prototype={min:null,max:null,hasNext:function(){return this.min<this.max},next:function(){return this.min++},__class__:V};var Lc=function(){};h.Lambda=Lc;Lc.__name__="Lambda";Lc.array=function(a){var b=[];for(a=O(a);a.hasNext();){var c=a.next();b.push(c)}return b};
Lc.count=function(a,b){var c=0;if(null==b)for(b=O(a);b.hasNext();)b.next(),++c;else for(a=O(a);a.hasNext();){var d=a.next();b(d)&&++c}return c};Lc.indexOf=function(a,b){var c=0;for(a=O(a);a.hasNext();){var d=a.next();if(b==d)return c;++c}return-1};var va=function(){};h.ManifestResources=va;va.__name__="ManifestResources";va.init=function(a){va.preloadLibraries=[];va.preloadLibraryNames=[];va.rootPath=null;null!=a&&Object.prototype.hasOwnProperty.call(a,"rootPath")&&(va.rootPath=X.field(a,"rootPath"));
null==va.rootPath&&(va.rootPath="./");a=rd.parse('{"name":null,"assets":"aoy4:pathy43:assets%2Fgraphics%2F1x%2Fbackground-5-0.pngy4:sizei274718y4:typey5:IMAGEy2:idR1y7:preloadtgoR0y39:assets%2Fgraphics%2F1x%2Fsprite-3-0.pngR2i2621R3R4R5R7R6tgoR0y39:assets%2Fgraphics%2F1x%2Fsprite-3-1.pngR2i8211R3R4R5R8R6tgoR0y39:assets%2Fgraphics%2F1x%2Fsprite-3-2.pngR2i4310R3R4R5R9R6tgoR0y39:assets%2Fgraphics%2F1x%2Fsprite-3-3.pngR2i4310R3R4R5R10R6tgoR0y39:assets%2Fgraphics%2F1x%2Fsprite-3-4.pngR2i4512R3R4R5R11R6tgoR0y39:assets%2Fgraphics%2F1x%2Fsprite-3-5.pngR2i4391R3R4R5R12R6tgoR0y38:assets%2Fgraphics%2F1x%2Ftileset-1.pngR2i219953R3R4R5R13R6tgoR0y36:assets%2Fgraphics%2Fdefault-font.fntR2i10791R3y4:TEXTR5R14R6tgoR0y36:assets%2Fgraphics%2Fdefault-font.pngR2i1736R3R4R5R16R6tgoR2i2851592R3y5:MUSICR5y29:assets%2Fmusic%2Fsound-88.mp3y9:pathGroupaR18y29:assets%2Fmusic%2Fsound-88.ogghR6tgoR2i7425265R3R17R5y29:assets%2Fmusic%2Fsound-92.mp3R19aR21y29:assets%2Fmusic%2Fsound-92.ogghR6tgoR2i4898944R3R17R5y29:assets%2Fmusic%2Fsound-94.mp3R19aR23y29:assets%2Fmusic%2Fsound-94.ogghR6tgoR2i1130527R3R17R5R20R19aR18R20hgoR2i2213006R3R17R5R22R19aR21R22hgoR2i2571777R3R17R5R24R19aR23R24hgoR2i10775R3y5:SOUNDR5y27:assets%2Fsfx%2Fsound-23.mp3R19aR26y27:assets%2Fsfx%2Fsound-23.ogghR6tgoR2i10775R3R25R5y27:assets%2Fsfx%2Fsound-24.mp3R19aR28y27:assets%2Fsfx%2Fsound-24.ogghR6tgoR2i6071819R3R25R5y27:assets%2Fsfx%2Fsound-89.mp3R19aR30y27:assets%2Fsfx%2Fsound-89.ogghR6tgoR2i2293771R3R25R5y27:assets%2Fsfx%2Fsound-95.mp3R19aR32y27:assets%2Fsfx%2Fsound-95.ogghR6tgoR2i3488090R3R25R5y27:assets%2Fsfx%2Fsound-96.mp3R19aR34y27:assets%2Fsfx%2Fsound-96.ogghR6tgoR2i8168R3R25R5R27R19aR26R27hgoR2i8168R3R25R5R29R19aR28R29hgoR2i2369578R3R25R5R31R19aR30R31hgoR2i732924R3R25R5R33R19aR32R33hgoR2i1137062R3R25R5R35R19aR34R35hgoR0y29:assets%2Fdata%2Fbehaviors.mbsR2i44462R3y6:BINARYR5R36R6tgoR0y24:assets%2Fdata%2Fgame.mbsR2i1427R3R37R5R38R6tgoR0y34:assets%2Fdata%2Finner-joystick.pngR2i879R3R4R5R39R6tgoR0y34:assets%2Fdata%2Fouter-joystick.pngR2i1951R3R4R5R40R6tgoR0y29:assets%2Fdata%2Fresources.mbsR2i44759R3R37R5R41R6tgoR0y27:assets%2Fdata%2Fscene-0.mbsR2i1043R3R37R5R42R6tgoR0y27:assets%2Fdata%2Fscene-0.scnR2i317R3R37R5R43R6tgoR0y28:assets%2Fdata%2Fscene-11.mbsR2i1132R3R37R5R44R6tgoR0y28:assets%2Fdata%2Fscene-11.scnR2i525R3R37R5R45R6tgoR0y28:assets%2Fdata%2Fscene-12.mbsR2i905R3R37R5R46R6tgoR0y28:assets%2Fdata%2Fscene-12.scnR2i741R3R37R5R47R6tgoR0y28:assets%2Fdata%2Fscene-16.mbsR2i390R3R37R5R48R6tgoR0y28:assets%2Fdata%2Fscene-16.scnR2i13R3R37R5R49R6tgoR0y28:assets%2Fdata%2Fscene-17.mbsR2i1042R3R37R5R50R6tgoR0y28:assets%2Fdata%2Fscene-17.scnR2i341R3R37R5R51R6tgoR0y28:assets%2Fdata%2Fscene-18.mbsR2i1080R3R37R5R52R6tgoR0y28:assets%2Fdata%2Fscene-18.scnR2i421R3R37R5R53R6tgoR0y28:assets%2Fdata%2Fscene-19.mbsR2i1144R3R37R5R54R6tgoR0y28:assets%2Fdata%2Fscene-19.scnR2i565R3R37R5R55R6tgoR0y28:assets%2Fdata%2Fscene-21.mbsR2i969R3R37R5R56R6tgoR0y28:assets%2Fdata%2Fscene-21.scnR2i773R3R37R5R57R6tgoR0y28:assets%2Fdata%2Fscene-22.mbsR2i1027R3R37R5R58R6tgoR0y28:assets%2Fdata%2Fscene-22.scnR2i341R3R37R5R59R6tgoR0y28:assets%2Fdata%2Fscene-23.mbsR2i1095R3R37R5R60R6tgoR0y28:assets%2Fdata%2Fscene-23.scnR2i389R3R37R5R61R6tgoR0y28:assets%2Fdata%2Fscene-24.mbsR2i1240R3R37R5R62R6tgoR0y28:assets%2Fdata%2Fscene-24.scnR2i605R3R37R5R63R6tgoR0y28:assets%2Fdata%2Fscene-26.mbsR2i1052R3R37R5R64R6tgoR0y28:assets%2Fdata%2Fscene-26.scnR2i325R3R37R5R65R6tgoR0y28:assets%2Fdata%2Fscene-27.mbsR2i1280R3R37R5R66R6tgoR0y28:assets%2Fdata%2Fscene-27.scnR2i493R3R37R5R67R6tgoR0y28:assets%2Fdata%2Fscene-28.mbsR2i1328R3R37R5R68R6tgoR0y28:assets%2Fdata%2Fscene-28.scnR2i453R3R37R5R69R6tgoR0y28:assets%2Fdata%2Fscene-29.mbsR2i1150R3R37R5R70R6tgoR0y28:assets%2Fdata%2Fscene-29.scnR2i365R3R37R5R71R6tgoR0y28:assets%2Fdata%2Fscene-30.mbsR2i1340R3R37R5R72R6tgoR0y28:assets%2Fdata%2Fscene-30.scnR2i637R3R37R5R73R6tgoR0y28:assets%2Fdata%2Fscene-31.mbsR2i1472R3R37R5R74R6tgoR0y28:assets%2Fdata%2Fscene-31.scnR2i741R3R37R5R75R6tgoR0y28:assets%2Fdata%2Fscene-33.mbsR2i1134R3R37R5R76R6tgoR0y28:assets%2Fdata%2Fscene-33.scnR2i333R3R37R5R77R6tgoR0y28:assets%2Fdata%2Fscene-34.mbsR2i1576R3R37R5R78R6tgoR0y28:assets%2Fdata%2Fscene-34.scnR2i493R3R37R5R79R6tgoR0y28:assets%2Fdata%2Fscene-35.mbsR2i1732R3R37R5R80R6tgoR0y28:assets%2Fdata%2Fscene-35.scnR2i541R3R37R5R81R6tgoR0y28:assets%2Fdata%2Fscene-36.mbsR2i1816R3R37R5R82R6tgoR0y28:assets%2Fdata%2Fscene-36.scnR2i589R3R37R5R83R6tgoR0y28:assets%2Fdata%2Fscene-37.mbsR2i1916R3R37R5R84R6tgoR0y28:assets%2Fdata%2Fscene-37.scnR2i645R3R37R5R85R6tgoR0y28:assets%2Fdata%2Fscene-38.mbsR2i1379R3R37R5R86R6tgoR0y28:assets%2Fdata%2Fscene-38.scnR2i805R3R37R5R87R6tgoR0y28:assets%2Fdata%2Fscene-39.mbsR2i1217R3R37R5R88R6tgoR0y28:assets%2Fdata%2Fscene-39.scnR2i429R3R37R5R89R6tgoR0y27:assets%2Fdata%2Fscene-4.mbsR2i1016R3R37R5R90R6tgoR0y27:assets%2Fdata%2Fscene-4.scnR2i461R3R37R5R91R6tgoR0y28:assets%2Fdata%2Fscene-40.mbsR2i1532R3R37R5R92R6tgoR0y28:assets%2Fdata%2Fscene-40.scnR2i749R3R37R5R93R6tgoR0y28:assets%2Fdata%2Fscene-41.mbsR2i1596R3R37R5R94R6tgoR0y28:assets%2Fdata%2Fscene-41.scnR2i837R3R37R5R95R6tgoR0y28:assets%2Fdata%2Fscene-42.mbsR2i1568R3R37R5R96R6tgoR0y28:assets%2Fdata%2Fscene-42.scnR2i765R3R37R5R97R6tgoR0y28:assets%2Fdata%2Fscene-43.mbsR2i1235R3R37R5R98R6tgoR0y28:assets%2Fdata%2Fscene-43.scnR2i509R3R37R5R99R6tgoR0y28:assets%2Fdata%2Fscene-44.mbsR2i1267R3R37R5R100R6tgoR0y28:assets%2Fdata%2Fscene-44.scnR2i597R3R37R5R101R6tgoR0y28:assets%2Fdata%2Fscene-45.mbsR2i1295R3R37R5R102R6tgoR0y28:assets%2Fdata%2Fscene-45.scnR2i637R3R37R5R103R6tgoR0y28:assets%2Fdata%2Fscene-46.mbsR2i1275R3R37R5R104R6tgoR0y28:assets%2Fdata%2Fscene-46.scnR2i685R3R37R5R105R6tgoR0y28:assets%2Fdata%2Fscene-47.mbsR2i1327R3R37R5R106R6tgoR0y28:assets%2Fdata%2Fscene-47.scnR2i741R3R37R5R107R6tgoR0y28:assets%2Fdata%2Fscene-48.mbsR2i1467R3R37R5R108R6tgoR0y28:assets%2Fdata%2Fscene-48.scnR2i781R3R37R5R109R6tgoR0y28:assets%2Fdata%2Fscene-49.mbsR2i1331R3R37R5R110R6tgoR0y28:assets%2Fdata%2Fscene-49.scnR2i821R3R37R5R111R6tgoR0y28:assets%2Fdata%2Fscene-50.mbsR2i1299R3R37R5R112R6tgoR0y28:assets%2Fdata%2Fscene-50.scnR2i813R3R37R5R113R6tgoR0y28:assets%2Fdata%2Fscene-51.mbsR2i1440R3R37R5R114R6tgoR0y28:assets%2Fdata%2Fscene-51.scnR2i725R3R37R5R115R6tgoR0y28:assets%2Fdata%2Fscene-52.mbsR2i942R3R37R5R116R6tgoR0y28:assets%2Fdata%2Fscene-52.scnR2i773R3R37R5R117R6tgoR0y28:assets%2Fdata%2Fscene-53.mbsR2i947R3R37R5R118R6tgoR0y28:assets%2Fdata%2Fscene-53.scnR2i789R3R37R5R119R6tgoR0y28:assets%2Fdata%2Fscene-54.mbsR2i952R3R37R5R120R6tgoR0y28:assets%2Fdata%2Fscene-54.scnR2i805R3R37R5R121R6tgoR0y27:assets%2Fdata%2Fscene-8.mbsR2i1064R3R37R5R122R6tgoR0y27:assets%2Fdata%2Fscene-8.scnR2i509R3R37R5R123R6tgoR0y27:assets%2Fdata%2Fscene-9.mbsR2i1080R3R37R5R124R6tgoR0y27:assets%2Fdata%2Fscene-9.scnR2i461R3R37R5R125R6tgoR0y26:assets%2Fdata%2Fscenes.mbsR2i1178R3R37R5R126R6tgh","rootPath":null,"version":2,"libraryArgs":[],"libraryType":null}',
va.rootPath);a=bc.fromManifest(a);ta.registerLibrary("default",a);a=ta.getLibrary("default");null!=a?va.preloadLibraries.push(a):va.preloadLibraryNames.push("default")};Math.__name__="Math";var X=function(){};h.Reflect=X;X.__name__="Reflect";X.field=function(a,b){try{return a[b]}catch(c){return ra.lastException=c,null}};X.getProperty=function(a,b){var c;if(null==a)return null;var d=a.__properties__?c=a.__properties__["get_"+b]:!1;return d?a[c]():a[b]};X.setProperty=function(a,b,c){var d;var e=a.__properties__?
d=a.__properties__["set_"+b]:!1;if(e)a[d](c);else a[b]=c};X.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};X.isFunction=function(a){return"function"==typeof a?!(a.__name__||a.__ename__):!1};X.compare=function(a,b){return a==b?0:a>b?1:-1};X.compareMethods=function(a,b){return a==b?!0:X.isFunction(a)&&X.isFunction(b)?a.scope==b.scope&&a.method==b.method?null!=a.method:!1:!1};X.isObject=function(a){if(null==
a)return!1;var b=typeof a;return"string"==b||"object"==b&&null==a.__enum__?!0:"function"==b?null!=(a.__name__||a.__ename__):!1};X.isEnumValue=function(a){return null!=a?null!=a.__enum__:!1};X.deleteField=function(a,b){if(!Object.prototype.hasOwnProperty.call(a,b))return!1;delete a[b];return!0};X.makeVarArgs=function(a){return function(){var b=Array.prototype.slice.call(arguments);return a(b)}};var ca=function(a,b){null==b&&(b=2);this.swipeTimeout=.1;this.longPressDelay=1;var c=this;if(!ca.initialized){ca.initialized=
!0;var d=$a.get_current().stage;ca.moveToleSqr=.008*(new pa(d.stageWidth,d.stageHeight)).get_length();ca.moveToleSqr*=ca.moveToleSqr;Oe.get_supportsTouchEvents()&&(Oe.inputMode=2)}this.owner=a;this.mode=b;a=Oe.get_supportsTouchEvents();this.owner.mouseEnabled=!0;this.listenEvents=1==this.mode?a?ca.touchEvents:ca.mouseEvents:a?ca.geTouchEvents:ca.geMouseEvents;this.handler=1==this.mode?a?v(this,this.convertTouch):v(this,this.convertMouse):a?v(this,this.onTouch):v(this,this.onMouse);a=0;for(b=this.listenEvents;a<
b.length;)d=b[a],++a,this.owner.addEventListener(d,this.handler);3==this.mode&&$a.get_current().stage.addEventListener("resize",function(a){c.overlay=null});this.touchList=new Sa;this.setReady()};h.RoxGestureAgent=ca;ca.__name__="RoxGestureAgent";ca.__properties__={get_multitouchSupported:"get_multitouchSupported"};ca.init=function(){if(!ca.initialized){ca.initialized=!0;var a=$a.get_current().stage;ca.moveToleSqr=.008*(new pa(a.stageWidth,a.stageHeight)).get_length();ca.moveToleSqr*=ca.moveToleSqr;
Oe.get_supportsTouchEvents()&&(Oe.inputMode=2)}};ca.localOffset=function(a,b){var c=a.parent.localToGlobal(new pa(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};ca.get_multitouchSupported=function(){return Oe.get_supportsTouchEvents()?1<Oe.maxTouchPoints:!1};ca.initTypeMap=function(){for(var a=new ua,b=0,c=ca.MAP.length>>1;b<c;){var d=b++,e=ca.MAP[d<<1];d=ca.MAP[(d<<1)+1];null!=q[e]?a.setReserved(e,d):a.h[e]=d}return a};ca.prototype={mode:null,
longPressDelay:null,swipeTimeout:null,owner:null,touch0:null,touch1:null,touchList:null,listenEvents:null,handler:null,longPressTimer:null,tweener:null,overlay:null,state:null,detach:function(){null!=this.tweener&&(Gb.cancel(this.tweener),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);var b=v(this,this.handleEvent),c=a;return function(a){b(c,
a)}},startTweenXY:function(a,b,c,d){var e=this;this.tweener=new bg;this.tweener.tween(a.get_x(),c,a.get_y(),d,tb.linear,1E3*b|0).doOnUpdate(function(){a.set_x(e.tweener.value1);a.set_y(e.tweener.value2)})},stopTween:function(){null!=this.tweener&&(Gb.cancel(this.tweener),this.tweener=null)},handleEvent:function(a,b){var c=b.target;if(c==this.owner)switch(b.type){case "rox_gesture_pan":b=b.extra;var d=c.parent.localToGlobal(new pa(c.get_x(),c.get_y()));d.offset(b.x,b.y);d=c.parent.globalToLocal(d);
d.offset(-c.get_x(),-c.get_y());b=d;0!=(a&1)&&c.set_x(c.get_x()+b.x);0!=(a&2)&&c.set_y(c.get_y()+b.y);break;case "rox_gesture_pinch":a=b.extra;var e=c.parent.localToGlobal(new pa(c.get_x(),c.get_y()));d=e.x-b.stageX;var f=e.y-b.stageY;e=Math.atan2(f,d);d=(new pa(d,f)).get_length();d=pa.polar(d*a,e);d.offset(b.stageX,b.stageY);d=c.parent.globalToLocal(d);c.set_scaleX(c.get_scaleX()*a);c.set_scaleY(c.get_scaleY()*a);c.set_x(d.x);c.set_y(d.y);break;case "rox_gesture_rotation":a=b.extra;e=c.parent.localToGlobal(new pa(c.get_x(),
c.get_y()));d=e.x-b.stageX;f=e.y-b.stageY;e=Math.atan2(f,d);d=(new pa(d,f)).get_length();d=pa.polar(d,e+a);d.offset(b.stageX,b.stageY);d=c.parent.globalToLocal(d);c.set_rotation(c.get_rotation()+ca.R2D*a);c.set_x(d.x);c.set_y(d.y);break;case "rox_gesture_swipe":b=new pa(2*b.extra.x,2*b.extra.y);a=c.parent.localToGlobal(new pa(c.get_x(),c.get_y()));a.offset(b.x,b.y);a=c.parent.globalToLocal(a);a.offset(-c.get_x(),-c.get_y());b=c.get_x()+a.x;a=c.get_y()+a.y;var g=this;this.tweener=new bg;this.tweener.tween(c.get_x(),
b,c.get_y(),a,tb.linear,2E3).doOnUpdate(function(){c.set_x(g.tweener.value1);c.set_y(g.tweener.value2)})}},convertTouch:function(a){var b=a.type,c=ca.typeMap;this.owner.dispatchEvent(new Ka(null!=q[b]?c.getReserved(b):c.h[b],a.bubbles,a.cancelable,a.localX,a.localY,a.stageX,a.stageY,a.touchPointID,this))},convertMouse:function(a){var b=a.type;if("mouseDown"==b||"mouseUp"==b||"click"==b||a.buttonDown){var c=ca.typeMap;this.owner.dispatchEvent(new Ka(null!=q[b]?c.getReserved(b):c.h[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;if(c||null!=this.touch1&&this.touch1.tid==b||null!=this.touch0&&null==this.touch1&&this.touch0.tid!=b){var d=a.type,e=ca.typeMap;this.handleTouch(null!=q[d]?e.getReserved(d):e.h[d],a,c,b)}},onMouse:function(a){var b=a.type;if("mouseDown"==b||"mouseUp"==b||a.buttonDown){var c=ca.typeMap;this.handleTouch(null!=q[b]?c.getReserved(b):c.h[b],a,!0,0)}},handleTouch:function(a,b,
c,d){var e=new cb(this.owner,b,d),f=c?this.touch0:this.touch1;"rox_touch_move"==a&&null!=f?(d=f.sx-e.sx,f=f.sy-e.sy,d=d*d+f*f<ca.moveToleSqr):d=!1;if(d)return!1;d=!0;switch(this.state){case 0:if(c&&"rox_touch_begin"==a){this.state=1;this.touch0=e;var g=v(this,this.sendLongPress);this.longPressTimer=Gb.timer(1E3*this.longPressDelay|0).doOnComplete(function(){g(e)});null!=this.tweener&&(Gb.cancel(this.tweener),this.tweener=null);if(3==this.mode)for(c=$a.get_current().stage,null==this.overlay&&(this.overlay=
new qa,this.overlay.set_name("overlay"),this.overlay.get_graphics().beginFill(16777215,.00392156862745098),this.overlay.get_graphics().drawRect(0,0,c.stageWidth,c.stageHeight)),c.addChild(this.overlay),c=0,a=this.listenEvents;c<a.length;)b=a[c],++c,this.overlay.addEventListener(b,this.handler)}else d=!1;break;case 1:c&&"rox_touch_end"==a?(this.owner.dispatchEvent(new Ka("rox_gesture_tap",null,null,e.lx,e.ly,e.sx,e.sy,null,this)),this.setReady()):c&&"rox_touch_move"==a?(c=new pa(e.sx-this.touch0.sx,
e.sy-this.touch0.sy),this.owner.dispatchEvent(new Ka("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&&(Gb.cancel(this.longPressTimer),this.longPressTimer=null)):c||"rox_touch_begin"!=a?d=!1:(this.state=2,this.touch1=e,null!=this.longPressTimer&&(Gb.cancel(this.longPressTimer),this.longPressTimer=null));break;case 2:if("rox_touch_end"==a)this.owner.dispatchEvent(new Ka("rox_gesture_end",
null,null,e.lx,e.ly,e.sx,e.sy,null,this)),this.setReady();else if("rox_touch_move"==a){f=c?this.touch1:this.touch0;var k=c?this.touch0:this.touch1;a=pa.distance(e.spt,f.spt)/pa.distance(k.spt,f.spt);b=Math.atan2(e.sy-f.sy,e.sx-f.sx)-Math.atan2(k.sy-f.sy,k.sx-f.sx);f=pa.interpolate(f.lpt,k.lpt,.5);k=this.owner.localToGlobal(f);1!=a&&this.owner.dispatchEvent(new Ka("rox_gesture_pinch",null,null,f.x,f.y,k.x,k.y,null,this,a));0!=b&&this.owner.dispatchEvent(new Ka("rox_gesture_rotation",null,null,f.x,
f.y,k.x,k.y,null,this,b));c?this.touch0=e:this.touch1=e}else d=!1;break;case 4:if(c&&"rox_touch_move"==a)c=new pa(e.sx-this.touch0.sx,e.sy-this.touch0.sy),this.owner.dispatchEvent(new Ka("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&&(Gb.cancel(this.longPressTimer),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;for(b=this.touchList.h;null!=b;){f=b.item;b=b.next;if(.2<c.time-f.time)break;a=f}null!=a&&(b=c.sy-a.sy,f=c.sx-a.sx,k=Math.atan2(b,f),c=pa.polar((new pa(f,b)).get_length()/(c.time-a.time)*.25,k),this.owner.dispatchEvent(new Ka("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 Ka("rox_gesture_begin",null,null,e.lx,
e.ly,e.sx,e.sy,null,this)),this.state=2,this.touch1=e,null!=this.longPressTimer&&(Gb.cancel(this.longPressTimer),this.longPressTimer=null))}return d},sendLongPress:function(a){this.owner.dispatchEvent(new Ka("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&&(Gb.cancel(this.longPressTimer),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)}$a.get_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&&(Gb.cancel(this.longPressTimer),this.longPressTimer=null)},setTwoFingerMove:function(a){this.state=2;this.touch1=a;null!=this.longPressTimer&&(Gb.cancel(this.longPressTimer),this.longPressTimer=null)},cancelLongPress:function(){null!=
this.longPressTimer&&(Gb.cancel(this.longPressTimer),this.longPressTimer=null)},__class__:ca};var cb=function(a,b,c){this.tid=c;this.sx=b.stageX;this.sy=b.stageY;this.spt=new pa(this.sx,this.sy);this.lpt=a.globalToLocal(this.spt);this.lx=this.lpt.x;this.ly=this.lpt.y;this.time=(new Date).getTime()/1E3};h["_RoxGestureAgent.TouchPoint"]=cb;cb.__name__="_RoxGestureAgent.TouchPoint";cb.prototype={tid:null,lx:null,ly:null,sx:null,sy:null,lpt:null,spt:null,time:null,distSqr:function(a){var b=a.sx-this.sx;
a=a.sy-this.sy;return b*b+a*a},__class__:cb};var Ma=function(a,b,c){this.__pool=new Aa;this.inactiveObjects=this.activeObjects=0;this.__inactiveObject1=this.__inactiveObject0=null;this.__inactiveObjectList=new Sa;null!=a&&(this.create=a);null!=b&&(this.clean=b);null!=c&&this.set_size(c)};h["lime.utils.ObjectPool"]=Ma;Ma.__name__="lime.utils.ObjectPool";Ma.prototype={activeObjects:null,inactiveObjects:null,__inactiveObject0:null,__inactiveObject1:null,__inactiveObjectList:null,__pool:null,__size:null,
add:function(a){this.__pool.exists(a)||(this.__pool.set(a,!1),this.clean(a),this.__pool.set(a,!1),null==this.__inactiveObject0?this.__inactiveObject0=a:null==this.__inactiveObject1?this.__inactiveObject1=a:this.__inactiveObjectList.add(a),this.inactiveObjects++)},clean:function(a){},clear:function(){this.__pool=new Aa;this.inactiveObjects=this.activeObjects=0;this.__inactiveObject1=this.__inactiveObject0=null;this.__inactiveObjectList.clear()},create:function(){return null},get:function(){var a=null;
if(0<this.inactiveObjects)null!=this.__inactiveObject0?(a=this.__inactiveObject0,this.__inactiveObject0=null):null!=this.__inactiveObject1?(a=this.__inactiveObject1,this.__inactiveObject1=null):(a=this.__inactiveObjectList.pop(),0<this.__inactiveObjectList.length&&(this.__inactiveObject0=this.__inactiveObjectList.pop()),0<this.__inactiveObjectList.length&&(this.__inactiveObject1=this.__inactiveObjectList.pop())),this.__pool.set(a,!0),this.inactiveObjects--,this.activeObjects++;else if(null==this.__size||
this.activeObjects<this.__size)a=this.create(),null!=a&&(this.__pool.set(a,!0),this.activeObjects++);return a},release:function(a){this.__pool.exists(a)?this.__pool.get(a)||Ta.error("Object has already been released",{fileName:"lime/utils/ObjectPool.hx",lineNumber:106,className:"lime.utils.ObjectPool",methodName:"release"}):Ta.error("Object is not a member of the pool",{fileName:"lime/utils/ObjectPool.hx",lineNumber:102,className:"lime.utils.ObjectPool",methodName:"release"});this.activeObjects--;
null==this.__size||this.activeObjects+this.inactiveObjects<this.__size?(this.clean(a),this.__pool.set(a,!1),null==this.__inactiveObject0?this.__inactiveObject0=a:null==this.__inactiveObject1?this.__inactiveObject1=a:this.__inactiveObjectList.add(a),this.inactiveObjects++):this.__pool.remove(a)},remove:function(a){this.__pool.exists(a)&&(this.__pool.remove(a),this.__inactiveObject0==a?(this.__inactiveObject0=null,this.inactiveObjects--):this.__inactiveObject1==a?(this.__inactiveObject1=null,this.inactiveObjects--):
this.__inactiveObjectList.remove(a)?this.inactiveObjects--:this.activeObjects--)},__addInactive:function(a){this.__pool.set(a,!1);null==this.__inactiveObject0?this.__inactiveObject0=a:null==this.__inactiveObject1?this.__inactiveObject1=a:this.__inactiveObjectList.add(a);this.inactiveObjects++},__getInactive:function(){if(null!=this.__inactiveObject0){var a=this.__inactiveObject0;this.__inactiveObject0=null}else null!=this.__inactiveObject1?(a=this.__inactiveObject1,this.__inactiveObject1=null):(a=
this.__inactiveObjectList.pop(),0<this.__inactiveObjectList.length&&(this.__inactiveObject0=this.__inactiveObjectList.pop()),0<this.__inactiveObjectList.length&&(this.__inactiveObject1=this.__inactiveObjectList.pop()));this.__pool.set(a,!0);this.inactiveObjects--;this.activeObjects++;return a},__removeInactive:function(a){if(!(0>=a||0==this.inactiveObjects)&&(null!=this.__inactiveObject0&&(this.__pool.remove(this.__inactiveObject0),this.__inactiveObject0=null,this.inactiveObjects--,--a),0!=a&&0!=
this.inactiveObjects&&(null!=this.__inactiveObject1&&(this.__pool.remove(this.__inactiveObject1),this.__inactiveObject1=null,this.inactiveObjects--,--a),0!=a&&0!=this.inactiveObjects)))for(var b=this.__inactiveObjectList.h;null!=b;){var c=b.item;b=b.next;this.__pool.remove(c);this.__inactiveObjectList.remove(c);this.inactiveObjects--;--a;if(0==a||0==this.inactiveObjects)break}},get_size:function(){return this.__size},set_size:function(a){if(null==a)this.__size=null;else{var b=this.inactiveObjects+
this.activeObjects;this.__size=a;if(b>a)this.__removeInactive(b-a);else if(a>b)for(var c=0,d=a-b;c<d;)if(c++,b=this.create(),null!=b)this.__pool.set(b,!1),this.__inactiveObjectList.add(b),this.inactiveObjects++;else break}return a},__class__:Ma,__properties__:{set_size:"set_size",get_size:"get_size"}};var Qb=function(){};h["haxe.IMap"]=Qb;Qb.__name__="haxe.IMap";Qb.__isInterface__=!0;Qb.prototype={get:null,set:null,exists:null,remove:null,keys:null,iterator:null,keyValueIterator:null,__class__:Qb};
var Aa=function(){this.h={__keys__:{}}};h["haxe.ds.ObjectMap"]=Aa;Aa.__name__="haxe.ds.ObjectMap";Aa.__interfaces__=[Qb];Aa.prototype={h:null,set:function(a,b){var c=a.__id__||(a.__id__=R.$haxeUID++);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 B.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__]}}},keyValueIterator:function(){return new sh(this)},toString:function(){var a="{";for(var b=this.keys();b.hasNext();){var c=b.next();a+=K.string(K.string(c));a+=" => ";a+=K.string(K.string(this.h[c.__id__]));b.hasNext()&&(a+=", ")}return a+"}"},__class__:Aa};var Sa=function(){this.length=0};h["haxe.ds.List"]=
Sa;Sa.__name__="haxe.ds.List";Sa.prototype={h:null,q:null,length:null,add:function(a){a=new am(a,null);null==this.h?this.h=a:this.q.next=a;this.q=a;this.length++},push:function(a){this.h=a=new am(a,this.h);null==this.q&&(this.q=a);this.length++},pop:function(){if(null==this.h)return null;var a=this.h.item;this.h=this.h.next;null==this.h&&(this.q=null);this.length--;return a},clear:function(){this.q=this.h=null;this.length=0},remove:function(a){for(var b=null,c=this.h;null!=c;){if(c.item==a)return null==
b?this.h=c.next:b.next=c.next,this.q==c&&(this.q=b),this.length--,!0;b=c;c=c.next}return!1},iterator:function(){return new Ip(this.h)},__class__:Sa};var da=function(a,b,c){null==c&&(c=!1);null==b&&(b=!1);this.type=a;this.bubbles=b;this.cancelable=c;this.eventPhase=2};h["openfl.events.Event"]=da;da.__name__="openfl.events.Event";da.prototype={bubbles:null,cancelable:null,currentTarget:null,eventPhase:null,target:null,type:null,__isCanceled:null,__isCanceledNow:null,__preventDefault:null,clone:function(){var a=
new da(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 v(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){a="["+a;for(var c,d=0;d<b.length;){var e=b[d];++d;c=X.field(this,e);a="string"==typeof c?a+(" "+e+'="'+K.string(c)+'"'):a+(" "+e+"="+K.string(c))}return a+"]"},__init:function(){this.currentTarget=this.target=null;this.cancelable=this.bubbles=!1;this.eventPhase=2;this.__preventDefault=this.__isCanceledNow=this.__isCanceled=
!1},__class__:da};var Ka=function(a,b,c,d,e,f,g,k,l,m){null==k&&(k=0);null==c&&(c=!1);null==b&&(b=!0);da.call(this,a,b,c);this.localX=d;this.localY=e;this.stageX=f;this.stageY=g;this.touchPointID=k;this.agent=l;this.extra=m};h.RoxGestureEvent=Ka;Ka.__name__="RoxGestureEvent";Ka.__super__=da;Ka.prototype=w(da.prototype,{localX:null,localY:null,stageX:null,stageY:null,touchPointID:null,agent:null,extra:null,toString:function(){return this.type+"("+this.touchPointID+"): local=("+this.localX+","+this.localY+
"), stage=("+this.stageX+","+this.stageY+"), extra="+(this.extra instanceof pa?"Point("+K.string(this.extra.x)+","+K.string(this.extra.y)+")":this.extra)},__class__:Ka});var K=function(){};h.Std=K;K.__name__="Std";K.string=function(a){return L.__string_rec(a,"")};K.parseInt=function(a){a=parseInt(a,!a||"0"!=a[0]||"x"!=a[1]&&"X"!=a[1]?10:16);return isNaN(a)?null:a};var oe=function(){};h["_String.String_Impl_"]=oe;oe.__name__="_String.String_Impl_";oe.fromCharCode=function(a){return String.fromCodePoint(a)};
var bd=function(){this.b=""};h.StringBuf=bd;bd.__name__="StringBuf";bd.prototype={b:null,__class__:bd};var ba=function(){};h.StringTools=ba;ba.__name__="StringTools";ba.htmlEscape=function(a,b){for(var c="",d=0;d<a.length;){var e=a,f=d++,g=e.charCodeAt(f);55296<=g&&56319>=g&&(g=g-55232<<10|e.charCodeAt(f+1)&1023);e=g;65536<=e&&++d;switch(e){case 34:c=b?c+"&quot;":c+String.fromCodePoint(e);break;case 38:c+="&amp;";break;case 39:c=b?c+"&#039;":c+String.fromCodePoint(e);break;case 60:c+="&lt;";break;
case 62:c+="&gt;";break;default:c+=String.fromCodePoint(e)}}return c};ba.startsWith=function(a,b){return a.length>=b.length?0==a.lastIndexOf(b,0):!1};ba.endsWith=function(a,b){var c=b.length,d=a.length;return d>=c?a.indexOf(b,d-c)==d-c:!1};ba.isSpace=function(a,b){a=B.cca(a,b);return 8<a&&14>a?!0:32==a};ba.ltrim=function(a){for(var b=a.length,c=0;c<b&&ba.isSpace(a,c);)++c;return 0<c?B.substr(a,c,b-c):a};ba.rtrim=function(a){for(var b=a.length,c=0;c<b&&ba.isSpace(a,b-c-1);)++c;return 0<c?B.substr(a,
0,b-c):a};ba.trim=function(a){return ba.ltrim(ba.rtrim(a))};ba.rpad=function(a,b,c){if(0>=b.length)return a;for(a=""+(null==a?"null":""+a);a.length<c;)a+=null==b?"null":""+b;return a};ba.replace=function(a,b,c){return a.split(b).join(c)};ba.hex=function(a,b){for(var c="";c="0123456789ABCDEF".charAt(a&15)+c,a>>>=4,0<a;);if(null!=b)for(;c.length<b;)c="0"+c;return c};var Dd=C.ValueType={__ename__:"ValueType",__constructs__:"TNull TInt TFloat TBool TObject TFunction TClass TEnum TUnknown".split(" "),
TNull:{_hx_index:0,__enum__:"ValueType",toString:u},TInt:{_hx_index:1,__enum__:"ValueType",toString:u},TFloat:{_hx_index:2,__enum__:"ValueType",toString:u},TBool:{_hx_index:3,__enum__:"ValueType",toString:u},TObject:{_hx_index:4,__enum__:"ValueType",toString:u},TFunction:{_hx_index:5,__enum__:"ValueType",toString:u},TClass:(x=function(a){return{_hx_index:6,c:a,__enum__:"ValueType",toString:u}},x.__params__=["c"],x),TEnum:(x=function(a){return{_hx_index:7,e:a,__enum__:"ValueType",toString:u}},x.__params__=
["e"],x),TUnknown:{_hx_index:8,__enum__:"ValueType",toString:u}},rb=function(){};h.Type=rb;rb.__name__="Type";rb.resolveEnum=function(a){return C[a]};rb.createInstance=function(a,b){return new (Function.prototype.bind.apply(a,[null].concat(b)))};rb.createEnum=function(a,b,c){var d=X.field(a,b);if(null==d)throw new E("No such constructor "+b);if(X.isFunction(d)){if(null==c)throw new E("Constructor "+b+" need parameters");return d.apply(a,c)}if(null!=c&&0!=c.length)throw new E("Constructor "+b+" does not need parameters");
return d};rb.getInstanceFields=function(a){var b=[],c;for(c in a.prototype)b.push(c);B.remove(b,"__class__");B.remove(b,"__properties__");return b};rb.typeof=function(a){switch(typeof a){case "boolean":return Dd.TBool;case "function":return a.__name__||a.__ename__?Dd.TObject:Dd.TFunction;case "number":return Math.ceil(a)==a%2147483648?Dd.TInt:Dd.TFloat;case "object":if(null==a)return Dd.TNull;var b=a.__enum__;if(null!=b)return Dd.TEnum(C[b]);a=L.getClass(a);return null!=a?Dd.TClass(a):Dd.TObject;
case "string":return Dd.TClass(String);case "undefined":return Dd.TNull;default:return Dd.TUnknown}};rb.enumEq=function(a,b){if(a==b)return!0;try{var c=a.__enum__;if(null==c||c!=b.__enum__||a._hx_index!=b._hx_index)return!1;var d=C[c],e=d[d.__constructs__[a._hx_index]].__params__;for(c=0;c<e.length;){var f=e[c];++c;if(!rb.enumEq(a[f],b[f]))return!1}}catch(g){return ra.lastException=g,!1}return!0};rb.enumParameters=function(a){var b=C[a.__enum__];b=b[b.__constructs__[a._hx_index]].__params__;if(null!=
b){for(var c=[],d=0;d<b.length;){var e=b[d];++d;c.push(a[e])}return c}return[]};var Da={};h["_UInt.UInt_Impl_"]=Da;Da.__name__="_UInt.UInt_Impl_";Da.gt=function(a,b){var c=0>a;return c!=0>b?c:a>b};Da.toFloat=function(a){return 0>a?4294967296+a:a+0};var mf=function(){};h["openfl.events.IEventDispatcher"]=mf;mf.__name__="openfl.events.IEventDispatcher";mf.__isInterface__=!0;mf.prototype={addEventListener:null,dispatchEvent:null,hasEventListener:null,removeEventListener:null,willTrigger:null,__class__:mf};
var A=function(a){null!=a&&(this.__targetDispatcher=a)};h["openfl.events.EventDispatcher"]=A;A.__name__="openfl.events.EventDispatcher";A.__interfaces__=[mf];A.prototype={__eventMap:null,__iterators:null,__targetDispatcher:null,addEventListener:function(a,b,c,d,e){null==d&&(d=0);null==c&&(c=!1);if(null!=b)if(null==this.__eventMap&&(this.__eventMap=new ua,this.__iterators=new ua),e=this.__eventMap,null!=q[a]?e.existsReserved(a):e.h.hasOwnProperty(a)){e=this.__eventMap;e=null!=q[a]?e.getReserved(a):
e.h[a];for(var f=0,g=e.length;f<g;){var k=f++;if(e[k].match(b,c))return}f=this.__iterators;a=null!=q[a]?f.getReserved(a):f.h[a];for(f=0;f<a.length;)g=a[f],++f,g.active&&g.copy();this.__addListenerByPriority(e,new Bk(b,c,d))}else e=[],e.push(new Bk(b,c,d)),b=new Ck(e),c=this.__eventMap,null!=q[a]?c.setReserved(a,e):c.h[a]=e,c=this.__iterators,b=[b],null!=q[a]?c.setReserved(a,b):c.h[a]=b},dispatchEvent:function(a){a.target=null!=this.__targetDispatcher?this.__targetDispatcher:this;return this.__dispatchEvent(a)},
hasEventListener:function(a){if(null==this.__eventMap)return!1;var b=this.__eventMap;return null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a)},removeEventListener:function(a,b,c){null==c&&(c=!1);if(null!=this.__eventMap&&null!=b){var d=this.__eventMap;d=null!=q[a]?d.getReserved(a):d.h[a];if(null!=d){var e=this.__iterators;e=null!=q[a]?e.getReserved(a):e.h[a];for(var f=0,g=d.length;f<g;){var k=f++;if(d[k].match(b,c)){for(b=0;b<e.length;)c=e[b],++b,c.remove(d[k],k);d.splice(k,1);break}}0==d.length&&
(this.__eventMap.remove(a),this.__iterators.remove(a));a=this.__eventMap;(new Pe(a,a.arrayKeys())).hasNext()||(this.__iterators=this.__eventMap=null)}}},toString:function(){return"[object "+L.getClass(this).__name__.split(".").pop()+"]"},willTrigger:function(a){return this.hasEventListener(a)},__dispatchEvent:function(a){if(null==this.__eventMap||null==a)return!0;var b=a.type,c=this.__eventMap;c=null!=q[b]?c.getReserved(b):c.h[b];if(null==c)return!0;null==a.target&&(a.target=null!=this.__targetDispatcher?
this.__targetDispatcher:this);a.currentTarget=this;var d=1==a.eventPhase,e=this.__iterators;b=null!=q[b]?e.getReserved(b):e.h[b];e=b[0];e.active&&(e=new Ck(c),b.push(e));e.start();for(var f=e;f.hasNext();){var g=f.next();if(null!=g&&g.useCapture==d&&(g.callback(a),a.__isCanceledNow))break}e.stop();e!=b[0]?B.remove(b,e):e.reset(c);return!a.isDefaultPrevented()},__removeAllListeners:function(){this.__iterators=this.__eventMap=null},__addListenerByPriority:function(a,b){for(var c=a.length,d=c,e=0;e<
c;){var f=e++;if(a[f].priority<b.priority){d=f;break}}a.splice(d,0,b)},__class__:A};var Vd=function(){};h["openfl.display.IBitmapDrawable"]=Vd;Vd.__name__="openfl.display.IBitmapDrawable";Vd.__isInterface__=!0;Vd.prototype={__blendMode:null,__isMask:null,__mask:null,__renderable:null,__renderTransform:null,__scrollRect:null,__transform:null,__type:null,__worldAlpha:null,__worldColorTransform:null,__worldTransform:null,__getBounds:null,__update:null,__updateTransforms:null,__class__:Vd};var Ua={};
h["openfl._Vector.Vector_Impl_"]=Ua;Ua.__name__="openfl._Vector.Vector_Impl_";Ua.__properties__={set_length:"set_length",get_length:"get_length",set_fixed:"set_fixed",get_fixed:"get_fixed"};Ua.concat=function(a,b){return a.concat(b)};Ua.copy=function(a){return a.copy()};Ua.filter=function(a,b){return a.filter(b)};Ua.get=function(a,b){return a.get(b)};Ua.indexOf=function(a,b,c){null==c&&(c=0);return a.indexOf(b,c)};Ua.insertAt=function(a,b,c){a.insertAt(b,c)};Ua.iterator=function(a){return a.iterator()};
Ua.join=function(a,b){null==b&&(b=",");return a.join(b)};Ua.lastIndexOf=function(a,b,c){return a.lastIndexOf(b,c)};Ua.pop=function(a){return a.pop()};Ua.push=function(a,b){return a.push(b)};Ua.removeAt=function(a,b){return a.removeAt(b)};Ua.reverse=function(a){return a.reverse()};Ua.set=function(a,b,c){return a.set(b,c)};Ua.shift=function(a){return a.shift()};Ua.slice=function(a,b,c){null==b&&(b=0);return a.slice(b,c)};Ua.sort=function(a,b){a.sort(b)};Ua.splice=function(a,b,c){return a.splice(b,c)};
Ua.toString=function(a){return null!=a?a.toString():null};Ua.unshift=function(a,b){a.unshift(b)};Ua.convert=function(a){return a};Ua.toBoolVector=function(a,b,c,d){return new cg(b,c,d)};Ua.toIntVector=function(a,b,c,d){return new dg(b,c,d)};Ua.toFloatVector=function(a,b,c,d){return new eg(b,c,d,!0)};Ua.toFunctionVector=function(a,b,c,d){return new fg(b,c,d)};Ua.toObjectVector=function(a,b,c,d){return new Pf(b,c,d,!0)};Ua.toNullVector=function(a,b,c,d){return new Pf(b,c,d,!0)};Ua.fromBoolVector=function(a){return a};
Ua.fromIntVector=function(a){return a};Ua.fromFloatVector=function(a){return a};Ua.fromFunctionVector=function(a){return a};Ua.fromObjectVector=function(a){return a};Ua.get_fixed=function(a){return a.fixed};Ua.set_fixed=function(a,b){return a.fixed=b};Ua.get_length=function(a){return a.get_length()};Ua.set_length=function(a,b){return a.set_length(b)};var sa=function(){A.call(this);this.__type=Ph.DISPLAY_OBJECT;this.__alpha=1;this.__blendMode=10;this.__cacheAsBitmap=!1;this.__transform=new Ha;this.__visible=
!0;this.__rotationSine=this.__rotation=0;this.__worldAlpha=this.__scaleY=this.__scaleX=this.__rotationCosine=1;this.__worldBlendMode=10;this.__worldTransform=new Ha;this.__worldColorTransform=new Sb;this.__renderTransform=new Ha;this.__worldVisible=!0;this.set_name("instance"+ ++sa.__instanceCount);null!=sa.__initStage&&(this.stage=sa.__initStage,sa.__initStage=null,this.stage.addChild(this))};h["openfl.display.DisplayObject"]=sa;sa.__name__="openfl.display.DisplayObject";sa.__interfaces__=[Vd];sa.__calculateAbsoluteTransform=
function(a,b,c){c.a=a.a*b.a+a.b*b.c;c.b=a.a*b.b+a.b*b.d;c.c=a.c*b.a+a.d*b.c;c.d=a.c*b.b+a.d*b.d;c.tx=a.tx*b.a+a.ty*b.c+b.tx;c.ty=a.tx*b.b+a.ty*b.d+b.ty};sa.__super__=A;sa.prototype=w(A.prototype,{opaqueBackground:null,parent:null,stage:null,__alpha:null,__blendMode:null,__cacheAsBitmap:null,__cacheAsBitmapMatrix:null,__cacheBitmap:null,__cacheBitmapBackground:null,__cacheBitmapColorTransform:null,__cacheBitmapData:null,__cacheBitmapData2:null,__cacheBitmapData3:null,__cacheBitmapDataTexture:null,
__cacheBitmapMatrix:null,__cacheBitmapRendererHW:null,__cacheBitmapRendererSW:null,__cairo:null,__children:null,__customRenderClear:null,__customRenderEvent:null,__filters:null,__graphics:null,__interactive:null,__isCacheBitmapRender:null,__isMask:null,__loaderInfo:null,__mask:null,__maskTarget:null,__name:null,__objectTransform:null,__renderable:null,__renderDirty:null,__renderParent:null,__renderTransform:null,__renderTransformCache:null,__renderTransformChanged:null,__rotation:null,__rotationCosine:null,
__rotationSine:null,__scale9Grid:null,__scaleX:null,__scaleY:null,__scrollRect:null,__shader:null,__tempPoint:null,__transform:null,__transformDirty:null,__type:null,__visible:null,__worldAlpha:null,__worldAlphaChanged:null,__worldBlendMode:null,__worldClip:null,__worldClipChanged:null,__worldColorTransform:null,__worldShader:null,__worldScale9Grid:null,__worldTransform:null,__worldVisible:null,__worldVisibleChanged:null,__worldTransformInvalid:null,__worldZ:null,__canvas:null,__context:null,__style:null,
addEventListener:function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=0);null==c&&(c=!1);switch(a){case "activate":case "deactivate":case "enterFrame":case "exitFrame":case "frameConstructed":case "render":var f=sa.__broadcastEvents;if(null!=q[a]?!f.existsReserved(a):!f.h.hasOwnProperty(a)){f=sa.__broadcastEvents;var g=[];null!=q[a]?f.setReserved(a,g):f.h[a]=g}f=sa.__broadcastEvents;f=null!=q[a]?f.getReserved(a):f.h[a];-1==f.indexOf(this)&&f.push(this);break;case "clearDOM":case "renderCairo":case "renderCanvas":case "renderDOM":case "renderOpenGL":null==
this.__customRenderEvent&&(this.__customRenderEvent=new gg(null),this.__customRenderEvent.objectColorTransform=new Sb,this.__customRenderEvent.objectMatrix=new Ha,this.__customRenderClear=!0)}A.prototype.addEventListener.call(this,a,b,c,d,e)},dispatchEvent:function(a){if(a instanceof Tb){var b=this.__getRenderTransform();a.stageX=a.localX*b.a+a.localY*b.c+b.tx;b=this.__getRenderTransform();a.stageY=a.localX*b.b+a.localY*b.d+b.ty}else a instanceof sd&&(b=this.__getRenderTransform(),a.stageX=a.localX*
b.a+a.localY*b.c+b.tx,b=this.__getRenderTransform(),a.stageY=a.localX*b.b+a.localY*b.d+b.ty);a.target=this;return this.__dispatchWithCapture(a)},getBounds:function(a){var b=Ha.__pool.get();if(null!=a&&a!=this){b.copyFrom(this.__getWorldTransform());var c=Ha.__pool.get();c.copyFrom(a.__getWorldTransform());c.invert();b.concat(c);Ha.__pool.release(c)}else b.identity();a=new ia;this.__getBounds(a,b);Ha.__pool.release(b);return a},getRect:function(a){return this.getBounds(a)},globalToLocal:function(a){return this.__globalToLocal(a,
new pa)},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){null==c&&(c=!1);return null!=this.stage?this.__hitTest(a,b,c,null,!1,this):!1},invalidate:function(){this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())},localToGlobal:function(a){return this.__getRenderTransform().transformPoint(a)},removeEventListener:function(a,b,c){null==c&&(c=!1);A.prototype.removeEventListener.call(this,
a,b,c);switch(a){case "activate":case "deactivate":case "enterFrame":case "exitFrame":case "frameConstructed":case "render":!this.hasEventListener(a)&&(b=sa.__broadcastEvents,null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))&&(b=sa.__broadcastEvents,B.remove(null!=q[a]?b.getReserved(a):b.h[a],this));break;case "clearDOM":case "renderCairo":case "renderCanvas":case "renderDOM":case "renderOpenGL":this.hasEventListener("clearDOM")||this.hasEventListener("renderCairo")||this.hasEventListener("renderCanvas")||
this.hasEventListener("renderDOM")||this.hasEventListener("renderOpenGL")||(this.__customRenderEvent=null)}},__cleanup:function(){this.__context=this.__canvas=this.__cairo=null;null!=this.__graphics&&this.__graphics.__cleanup();null!=this.__cacheBitmap&&(this.__cacheBitmap.__cleanup(),this.__cacheBitmap=null);null!=this.__cacheBitmapDataTexture&&(this.__cacheBitmapDataTexture.dispose(),this.__cacheBitmapDataTexture=null);null!=this.__cacheBitmapData&&(this.__cacheBitmapData.dispose(),this.__cacheBitmapData=
null);null!=this.__cacheBitmapData2&&(this.__cacheBitmapData2.dispose(),this.__cacheBitmapData2=null);null!=this.__cacheBitmapData3&&(this.__cacheBitmapData3.dispose(),this.__cacheBitmapData3=null)},__dispatch:function(a){if(null!=this.__eventMap&&this.hasEventListener(a.type)){var b=A.prototype.__dispatchEvent.call(this,a);return a.__isCanceled?!0:b}return!0},__dispatchChildren:function(a){},__dispatchEvent:function(a){var b=a.bubbles?this.parent:null,c=A.prototype.__dispatchEvent.call(this,a);if(a.__isCanceled)return!0;
null!=b&&b!=this&&(a.eventPhase=3,null==a.target&&(a.target=this),b.__dispatchEvent(a));return c},__dispatchWithCapture:function(a){null==a.target&&(a.target=this);if(null!=this.parent)if(a.eventPhase=1,this.parent==this.stage)this.parent.__dispatch(a);else{for(var b=sa.__tempStack.get(),c=this.parent,d=0;null!=c;)b.set(d,c),c=c.parent,++d;c=0;for(var e=d;c<e;){var f=c++;b.get(d-f-1).__dispatch(a)}sa.__tempStack.release(b)}a.eventPhase=2;return this.__dispatchEvent(a)},__enterFrame:function(a){},
__getBounds:function(a,b){null!=this.__graphics&&this.__graphics.__getBounds(a,b)},__getCursor:function(){return null},__getFilterBounds:function(a,b){this.__getRenderBounds(a,b);if(null!=this.__filters){b=ia.__pool.get();for(var c=0,d=this.__filters;c<d.length;){var e=d[c];++c;b.__expand(-e.__leftExtension,-e.__topExtension,e.__leftExtension+e.__rightExtension,e.__topExtension+e.__bottomExtension)}a.width+=b.width;a.height+=b.height;a.x+=b.x;a.y+=b.y;ia.__pool.release(b)}},__getInteractive:function(a){return!1},
__getLocalBounds:function(a){this.__getBounds(a,this.__transform);a.x-=this.__transform.tx;a.y-=this.__transform.ty},__getRenderBounds:function(a,b){if(null==this.__scrollRect)this.__getBounds(a,b);else{var c=ia.__pool.get();c.copyFrom(this.__scrollRect);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);ia.__pool.release(c)}},__getRenderTransform:function(){this.__getWorldTransform();return this.__renderTransform},__getWorldTransform:function(){if(this.__transformDirty||this.__worldTransformInvalid){var a=
[],b=this;if(null==this.parent)this.__update(!0,!1);else for(;b!=this.stage&&(a.push(b),b=b.parent,null!=b););for(var c=a.length;0<=--c;)b=a[c],b.__update(!0,!1)}return this.__worldTransform},__globalToLocal:function(a,b){this.__getRenderTransform();if(a==b){var c=this.__renderTransform,d=c.a*c.d-c.b*c.c;if(0==d)a.x=-c.tx,a.y=-c.ty;else{var e=1/d*(c.c*(c.ty-a.y)+c.d*(a.x-c.tx));a.y=1/d*(c.a*(a.y-c.ty)+c.b*(c.tx-a.x));a.x=e}}else c=this.__renderTransform,d=c.a*c.d-c.b*c.c,b.x=0==d?-c.tx:1/d*(c.c*(c.ty-
a.y)+c.d*(a.x-c.tx)),c=this.__renderTransform,d=c.a*c.d-c.b*c.c,b.y=0==d?-c.ty:1/d*(c.a*(a.y-c.ty)+c.b*(c.tx-a.x));return b},__hitTest:function(a,b,c,d,e,f){if(null!=this.__graphics){if(!f.__visible||this.__isMask||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b))return!1;if(this.__graphics.__hitTest(a,b,c,this.__getRenderTransform()))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.__getRenderTransform())?
!0:!1},__readGraphicsData:function(a,b){null!=this.__graphics&&this.__graphics.__readGraphicsData(a)},__setParentRenderDirty:function(){var a=null!=this.__renderParent?this.__renderParent:this.parent;null==a||a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty())},__setRenderDirty:function(){this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())},__setStageReference:function(a){this.stage=a},__setTransformDirty:function(){this.__transformDirty||(this.__transformDirty=
!0,this.__setWorldTransformInvalid(),this.__setParentRenderDirty())},__setWorldTransformInvalid:function(){this.__worldTransformInvalid=!0},__stopAllMovieClips:function(){},__update:function(a,b){var c=null!=this.__renderParent?this.__renderParent:this.parent;this.__isMask&&null==c&&(c=this.__maskTarget);this.__renderable=this.__visible&&0!=this.__scaleX&&0!=this.__scaleY&&!this.__isMask&&(null==c||!c.__isMask);this.__updateTransforms();this.__worldTransformInvalid=this.__transformDirty=!1;if(!a)if(sa.__supportDOM&&
(this.__renderTransformChanged=!this.__renderTransform.equals(this.__renderTransformCache),null==this.__renderTransformCache?this.__renderTransformCache=this.__renderTransform.clone():this.__renderTransformCache.copyFrom(this.__renderTransform)),null!=c){if(sa.__supportDOM){var d=c.__worldVisible&&this.__visible;this.__worldVisibleChanged=this.__worldVisible!=d;this.__worldVisible=d;d=this.get_alpha()*c.__worldAlpha;this.__worldAlphaChanged=this.__worldAlpha!=d;this.__worldAlpha=d}else this.__worldAlpha=
this.get_alpha()*c.__worldAlpha;null!=this.__objectTransform?(this.__worldColorTransform.__copyFrom(this.__objectTransform.get_colorTransform()),this.__worldColorTransform.__combine(c.__worldColorTransform)):this.__worldColorTransform.__copyFrom(c.__worldColorTransform);this.__worldBlendMode=null==this.__blendMode||10==this.__blendMode?c.__worldBlendMode:this.__blendMode;this.__worldShader=null==this.__shader?c.__shader:this.__shader;this.__worldScale9Grid=null==this.__scale9Grid?c.__scale9Grid:this.__scale9Grid}else this.__worldAlpha=
this.get_alpha(),sa.__supportDOM&&(this.__worldVisibleChanged=this.__worldVisible!=this.__visible,this.__worldVisible=this.__visible,this.__worldAlphaChanged=this.__worldAlpha!=this.get_alpha()),null!=this.__objectTransform?this.__worldColorTransform.__copyFrom(this.__objectTransform.get_colorTransform()):this.__worldColorTransform.__identity(),this.__worldBlendMode=this.__blendMode,this.__worldShader=this.__shader,this.__worldScale9Grid=this.__scale9Grid;b&&null!=this.get_mask()&&this.get_mask().__update(a,
!0)},__updateTransforms:function(a){var b=null!=a;a=b?a:this.__transform;null==this.__worldTransform&&(this.__worldTransform=new Ha);null==this.__renderTransform&&(this.__renderTransform=new Ha);var c=null!=this.__renderParent?this.__renderParent:this.parent;if(b||null==this.parent)this.__worldTransform.copyFrom(a);else{var d=this.parent.__worldTransform,e=this.__worldTransform;e.a=a.a*d.a+a.b*d.c;e.b=a.a*d.b+a.b*d.d;e.c=a.c*d.a+a.d*d.c;e.d=a.c*d.b+a.d*d.d;e.tx=a.tx*d.a+a.ty*d.c+d.tx;e.ty=a.tx*d.b+
a.ty*d.d+d.ty}b||null==c?this.__renderTransform.copyFrom(a):(b=c.__renderTransform,c=this.__renderTransform,c.a=a.a*b.a+a.b*b.c,c.b=a.a*b.b+a.b*b.d,c.c=a.c*b.a+a.d*b.c,c.d=a.c*b.b+a.d*b.d,c.tx=a.tx*b.a+a.ty*b.c+b.tx,c.ty=a.tx*b.b+a.ty*b.d+b.ty);null!=this.__scrollRect&&(a=this.__renderTransform,b=-this.__scrollRect.x,c=-this.__scrollRect.y,a.tx=b*a.a+c*a.c+a.tx,a.ty=b*a.b+c*a.d+a.ty)},get_alpha:function(){return this.__alpha},set_alpha:function(a){1<a&&(a=1);0>a&&(a=0);a==this.__alpha||this.get_cacheAsBitmap()||
this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return this.__alpha=a},get_blendMode:function(){return this.__blendMode},set_blendMode:function(a){null==a&&(a=10);a==this.__blendMode||this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return this.__blendMode=a},get_cacheAsBitmap:function(){return null==this.__filters?this.__cacheAsBitmap:!0},set_cacheAsBitmap:function(a){a==this.__cacheAsBitmap||this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());
return this.__cacheAsBitmap=a},get_cacheAsBitmapMatrix:function(){return this.__cacheAsBitmapMatrix},set_cacheAsBitmapMatrix:function(a){this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return this.__cacheAsBitmapMatrix=null!=a?a.clone():a},get_filters:function(){return null==this.__filters?[]:this.__filters.slice()},set_filters:function(a){null!=a&&0<a.length?(this.__filters=a,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())):null!=this.__filters&&
(this.__filters=null,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return a},get_height:function(){var a=ia.__pool.get();this.__getLocalBounds(a);var b=a.height;ia.__pool.release(a);return b},set_height:function(a){var b=ia.__pool.get(),c=Ha.__pool.get();c.identity();this.__getBounds(b,c);a!=b.height?this.set_scaleY(a/b.height):this.set_scaleY(1);ia.__pool.release(b);Ha.__pool.release(c);return a},get_loaderInfo:function(){return null!=this.stage?Xc.current.__loaderInfo:
null},get_mask:function(){return this.__mask},set_mask:function(a){if(a==this.__mask)return a;a!=this.__mask&&(this.__setTransformDirty(),this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));if(null!=this.__mask){this.__mask.__isMask=!1;this.__mask.__maskTarget=null;this.__mask.__setTransformDirty();var b=this.__mask;b.__renderDirty||(b.__renderDirty=!0,b.__setParentRenderDirty())}null!=a&&(a.__isMask=!0,a.__maskTarget=this,a.__setWorldTransformInvalid());null!=this.__cacheBitmap&&
this.__cacheBitmap.get_mask()!=a&&this.__cacheBitmap.set_mask(a);return this.__mask=a},get_mouseX:function(){var a=null!=this.stage?this.stage.__mouseX:Xc.current.stage.__mouseX,b=null!=this.stage?this.stage.__mouseY:Xc.current.stage.__mouseY,c=this.__getRenderTransform(),d=c.a*c.d-c.b*c.c;return 0==d?-c.tx:1/d*(c.c*(c.ty-b)+c.d*(a-c.tx))},get_mouseY:function(){var a=null!=this.stage?this.stage.__mouseX:Xc.current.stage.__mouseX,b=null!=this.stage?this.stage.__mouseY:Xc.current.stage.__mouseY,c=this.__getRenderTransform(),
d=c.a*c.d-c.b*c.c;return 0==d?-c.ty:1/d*(c.a*(b-c.ty)+c.b*(c.tx-a))},get_name:function(){return this.__name},set_name:function(a){return this.__name=a},get_root:function(){return null!=this.stage?Xc.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);this.__transform.a=this.__rotationCosine*this.__scaleX;this.__transform.b=
this.__rotationSine*this.__scaleX;this.__transform.c=-this.__rotationSine*this.__scaleY;this.__transform.d=this.__rotationCosine*this.__scaleY;this.__setTransformDirty()}return a},get_scale9Grid:function(){return null==this.__scale9Grid?null:this.__scale9Grid.clone()},set_scale9Grid:function(a){if(null==a&&null==this.__scale9Grid||null!=a&&null!=this.__scale9Grid&&this.__scale9Grid.equals(a))return a;null!=a?(null==this.__scale9Grid&&(this.__scale9Grid=new ia),this.__scale9Grid.copyFrom(a)):this.__scale9Grid=
null;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return a},get_scaleX:function(){return this.__scaleX},set_scaleX:function(a){if(a!=this.__scaleX)if(this.__scaleX=a,0==this.__transform.b)a!=this.__transform.a&&this.__setTransformDirty(),this.__transform.a=a;else{var b=this.__rotationCosine*a,c=this.__rotationSine*a;this.__transform.a==b&&this.__transform.b==c||this.__setTransformDirty();this.__transform.a=b;this.__transform.b=c}return a},get_scaleY:function(){return this.__scaleY},
set_scaleY:function(a){if(a!=this.__scaleY)if(this.__scaleY=a,0==this.__transform.c)a!=this.__transform.d&&this.__setTransformDirty(),this.__transform.d=a;else{var b=-this.__rotationSine*a,c=this.__rotationCosine*a;this.__transform.d==c&&this.__transform.c==b||this.__setTransformDirty();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){if(null==a&&null==this.__scrollRect||null!=a&&
null!=this.__scrollRect&&this.__scrollRect.equals(a))return a;null!=a?(null==this.__scrollRect&&(this.__scrollRect=new ia),this.__scrollRect.copyFrom(a)):this.__scrollRect=null;this.__setTransformDirty();sa.__supportDOM&&!this.__renderDirty&&(this.__renderDirty=!0,this.__setParentRenderDirty());return a},get_shader:function(){return this.__shader},set_shader:function(a){this.__shader=a;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return a},get_transform:function(){null==
this.__objectTransform&&(this.__objectTransform=new bm(this));return this.__objectTransform},set_transform:function(a){if(null==a)throw new E(new Dk("Parameter transform must be non-null."));null==this.__objectTransform&&(this.__objectTransform=new bm(this));this.__setTransformDirty();this.__objectTransform.set_matrix(a.get_matrix());if(!this.__objectTransform.get_colorTransform().__equals(a.get_colorTransform(),!0)||!this.get_cacheAsBitmap()&&this.__objectTransform.get_colorTransform().alphaMultiplier!=
a.get_colorTransform().alphaMultiplier)this.__objectTransform.get_colorTransform().__copyFrom(a.get_colorTransform()),this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return this.__objectTransform},get_visible:function(){return this.__visible},set_visible:function(a){a==this.__visible||this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return this.__visible=a},get_width:function(){var a=ia.__pool.get();this.__getLocalBounds(a);var b=a.width;ia.__pool.release(a);
return b},set_width:function(a){var b=ia.__pool.get(),c=Ha.__pool.get();c.identity();this.__getBounds(b,c);a!=b.width?this.set_scaleX(a/b.width):this.set_scaleX(1);ia.__pool.release(b);Ha.__pool.release(c);return a},get_x:function(){return this.__transform.tx},set_x:function(a){a!=this.__transform.tx&&this.__setTransformDirty();return this.__transform.tx=a},get_y:function(){return this.__transform.ty},set_y:function(a){a!=this.__transform.ty&&this.__setTransformDirty();return this.__transform.ty=
a},__class__:sa,__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",get_shader:"get_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_scale9Grid:"set_scale9Grid",get_scale9Grid:"get_scale9Grid",
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",get_loaderInfo:"get_loaderInfo",set_height:"set_height",get_height:"get_height",set_filters:"set_filters",get_filters:"get_filters",set_cacheAsBitmapMatrix:"set_cacheAsBitmapMatrix",get_cacheAsBitmapMatrix:"get_cacheAsBitmapMatrix",set_cacheAsBitmap:"set_cacheAsBitmap",get_cacheAsBitmap:"get_cacheAsBitmap",
set_blendMode:"set_blendMode",get_blendMode:"get_blendMode",set_alpha:"set_alpha",get_alpha:"get_alpha"}});var Za=function(){sa.call(this);this.doubleClickEnabled=!1;this.mouseEnabled=!0;this.needsSoftKeyboard=!1;this.__tabEnabled=null;this.__tabIndex=-1};h["openfl.display.InteractiveObject"]=Za;Za.__name__="openfl.display.InteractiveObject";Za.__super__=sa;Za.prototype=w(sa.prototype,{doubleClickEnabled:null,focusRect:null,mouseEnabled:null,needsSoftKeyboard:null,softKeyboardInputAreaOfInterest:null,
__tabEnabled:null,__tabIndex:null,requestSoftKeyboard:function(){Xc.notImplemented({fileName:"openfl/display/InteractiveObject.hx",lineNumber:1251,className:"openfl.display.InteractiveObject",methodName:"requestSoftKeyboard"});return!1},__allowMouseFocus:function(){return this.get_tabEnabled()},__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:sa.prototype.__hitTest.call(this,a,b,c,d,e,f)},__tabTest:function(a){this.get_tabEnabled()&&a.push(this)},get_tabEnabled:function(){return 1==this.__tabEnabled?!0:!1},set_tabEnabled:function(a){this.__tabEnabled!=a&&(this.__tabEnabled=a,this.dispatchEvent(new da("tabEnabledChange",!0,!1)));return this.__tabEnabled},get_tabIndex:function(){return this.__tabIndex},set_tabIndex:function(a){if(this.__tabIndex!=a){if(-1>a)throw new E(new jj("Parameter tabIndex must be a non-negative number; got "+a));
this.__tabIndex=a;this.dispatchEvent(new da("tabIndexChange",!0,!1))}return this.__tabIndex},__class__:Za,__properties__:w(sa.prototype.__properties__,{set_tabIndex:"set_tabIndex",get_tabIndex:"get_tabIndex",set_tabEnabled:"set_tabEnabled",get_tabEnabled:"get_tabEnabled"})});var db=function(){Za.call(this);this.__type=Ph.DISPLAY_OBJECT_CONTAINER;this.__tabChildren=this.mouseChildren=!0;this.__children=[];this.__removedChildren=Ua.toObjectVector(null)};h["openfl.display.DisplayObjectContainer"]=db;
db.__name__="openfl.display.DisplayObjectContainer";db.__super__=Za;db.prototype=w(Za.prototype,{mouseChildren:null,__removedChildren:null,__tabChildren:null,addChild:function(a){return this.addChildAt(a,this.get_numChildren())},addChildAt:function(a,b){if(null==a)throw a=new Dk("Error #2007: Parameter child must be non-null."),a.errorID=2007,new E(a);if(a.stage==a)throw a=new zi("Error #3783: A Stage object cannot be added as the child of another object."),a.errorID=3783,new E(a);if(b>this.__children.length||
0>b)throw new E("Invalid index position "+b);if(a.parent==this)this.__children[b]!=a&&(B.remove(this.__children,a),this.__children.splice(b,0,a),this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));else{null!=a.parent&&a.parent.removeChild(a);this.__children.splice(b,0,a);a.parent=this;(b=null!=this.stage&&null==a.stage)&&this.__setStageReference(this.stage);a.__setTransformDirty();a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty());this.__renderDirty||(this.__renderDirty=
!0,this.__setParentRenderDirty());var c=da.__pool.get();c.type="added";c.bubbles=!0;c.target=a;a.__dispatchWithCapture(c);da.__pool.release(c);b&&(c=new da("addedToStage",!1,!1),a.__dispatchWithCapture(c),a.__dispatchChildren(c))}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){if(null!=a&&a.parent==this){a.__setTransformDirty();a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty());this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());
var b=new da("removed",!0);a.__dispatchWithCapture(b);null!=this.stage&&(null!=a.stage&&this.stage.get_focus()==a&&this.stage.set_focus(null),b=new da("removedFromStage",!1,!1),a.__dispatchWithCapture(b),a.__dispatchChildren(b),a.__setStageReference(null));a.parent=null;B.remove(this.__children,a);this.__removedChildren.push(a);a.__setTransformDirty()}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 E(new jj("The supplied index is out of bounds."));for(b-=a;0<=b;)this.removeChildAt(a),--b}},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&&(B.remove(this.__children,
a),this.__children.splice(b,0,a))},stopAllMovieClips:function(){this.__stopAllMovieClips()},swapChildren:function(a,b){if(a.parent==this&&b.parent==this){var c=this.__children.indexOf(a),d=this.__children.indexOf(b);this.__children[c]=b;this.__children[d]=a;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())}},swapChildrenAt:function(a,b){var c=this.__children[a];this.__children[a]=this.__children[b];this.__children[b]=c;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())},
__cleanup:function(){Za.prototype.__cleanup.call(this);for(var a=0,b=this.__children;a<b.length;){var c=b[a];++a;c.__cleanup()}for(a=this.__removedChildren.iterator();a.hasNext();)b=a.next(),null==b.stage&&b.__cleanup();this.__removedChildren.set_length(0)},__cleanupRemovedChildren:function(){for(var a=this.__removedChildren.iterator();a.hasNext();){var b=a.next();null==b.stage&&b.__cleanup()}this.__removedChildren.set_length(0)},__dispatchChildren:function(a){if(null!=this.__children)for(var b=0,
c=this.__children;b<c.length;){var d=c[b];++b;a.target=d;if(!d.__dispatchWithCapture(a))break;d.__dispatchChildren(a)}},__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){Za.prototype.__getBounds.call(this,a,b);if(0!=this.__children.length){for(var c=Ha.__pool.get(),d=0,e=this.__children;d<e.length;){var f=e[d];++d;if(0!=f.__scaleX&&0!=f.__scaleY){var g=f.__transform;c.a=g.a*b.a+g.b*b.c;c.b=g.a*b.b+g.b*b.d;c.c=g.c*b.a+g.d*
b.c;c.d=g.c*b.b+g.d*b.d;c.tx=g.tx*b.a+g.ty*b.c+b.tx;c.ty=g.tx*b.b+g.ty*b.d+b.ty;f.__getBounds(a,c)}}Ha.__pool.release(c)}},__getFilterBounds:function(a,b){Za.prototype.__getFilterBounds.call(this,a,b);if(null==this.__scrollRect&&0!=this.__children.length){for(var c=Ha.__pool.get(),d=0,e=this.__children;d<e.length;){var f=e[d];++d;if(0!=f.__scaleX&&0!=f.__scaleY&&!f.__isMask){var g=f.__transform;c.a=g.a*b.a+g.b*b.c;c.b=g.a*b.b+g.b*b.d;c.c=g.c*b.a+g.d*b.c;c.d=g.c*b.b+g.d*b.d;c.tx=g.tx*b.a+g.ty*b.c+
b.tx;c.ty=g.tx*b.b+g.ty*b.d+b.ty;f.__getFilterBounds(a,c)}}Ha.__pool.release(c)}},__getRenderBounds:function(a,b){if(null!=this.__scrollRect)Za.prototype.__getRenderBounds.call(this,a,b);else if(Za.prototype.__getBounds.call(this,a,b),0!=this.__children.length){for(var c=Ha.__pool.get(),d=0,e=this.__children;d<e.length;){var f=e[d];++d;if(0!=f.__scaleX&&0!=f.__scaleY&&!f.__isMask){var g=f.__transform;c.a=g.a*b.a+g.b*b.c;c.b=g.a*b.b+g.b*b.d;c.c=g.c*b.a+g.d*b.c;c.d=g.c*b.b+g.d*b.d;c.tx=g.tx*b.a+g.ty*
b.c+b.tx;c.ty=g.tx*b.b+g.ty*b.d+b.ty;f.__getRenderBounds(a,c)}}Ha.__pool.release(c)}},__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))return!1;if(null!=this.__scrollRect){var g=pa.__pool.get();g.setTo(a,b);var k=this.__getRenderTransform(),l=k.a*k.d-k.b*k.c;if(0==l)g.x=-k.tx,g.y=-k.ty;else{var m=1/l*(k.c*(k.ty-g.y)+k.d*(g.x-k.tx));g.y=1/l*(k.a*(g.y-k.ty)+k.b*(k.tx-g.x));g.x=m}if(!this.__scrollRect.containsPoint(g))return pa.__pool.release(g),
!1;pa.__pool.release(g)}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(l=!1;0<=--g&&!(((k=this.__children[g].__getInteractive(null))||this.mouseEnabled&&!l)&&this.__children[g].__hitTest(a,b,c,d,!0,this.__children[g])&&(l=!0,k&&d.length>e)););if(l)return d.splice(e,0,f),!0}}else{for(f=!1;0<=--g&&(!this.__children[g].__hitTest(a,b,c,d,!1,this.__children[g])||
(f=!0,null!=d)););return f}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},__readGraphicsData:function(a,b){Za.prototype.__readGraphicsData.call(this,a,b);if(b)for(var c=0,d=this.__children;c<d.length;){var e=d[c];++c;e.__readGraphicsData(a,b)}},__setStageReference:function(a){Za.prototype.__setStageReference.call(this,a);if(null!=this.__children)for(var b=0,c=this.__children;b<c.length;){var d=c[b];++b;d.__setStageReference(a)}},
__setWorldTransformInvalid:function(){if(!this.__worldTransformInvalid&&(this.__worldTransformInvalid=!0,null!=this.__children))for(var a=0,b=this.__children;a<b.length;){var c=b[a];++a;c.__setWorldTransformInvalid()}},__stopAllMovieClips:function(){for(var a=0,b=this.__children;a<b.length;){var c=b[a];++a;c.__stopAllMovieClips()}},__tabTest:function(a){Za.prototype.__tabTest.call(this,a);if(this.get_tabChildren())for(var b,c=0,d=this.__children;c<d.length;){var e=d[c];++c;if(b=e.__getInteractive(null))b=
e,b.__tabTest(a)}},__update:function(a,b){Za.prototype.__update.call(this,a,b);if(b){b=0;for(var c=this.__children;b<c.length;){var d=c[b];++b;d.__update(a,!0)}}},get_numChildren:function(){return this.__children.length},get_tabChildren:function(){return this.__tabChildren},set_tabChildren:function(a){this.__tabChildren!=a&&(this.__tabChildren=a,this.dispatchEvent(new da("tabChildrenChange",!0,!1)));return this.__tabChildren},__class__:db,__properties__:w(Za.prototype.__properties__,{set_tabChildren:"set_tabChildren",
get_tabChildren:"get_tabChildren",get_numChildren:"get_numChildren"})});var qa=function(){db.call(this);this.__buttonMode=!1;this.useHandCursor=!0};h["openfl.display.Sprite"]=qa;qa.__name__="openfl.display.Sprite";qa.__super__=db;qa.prototype=w(db.prototype,{dropTarget:null,hitArea:null,useHandCursor:null,__buttonMode:null,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?"button":null},__hitTest:function(a,b,c,d,e,f){if(e&&!this.mouseEnabled&&!this.mouseChildren)return!1;if(!f.get_visible()||this.__isMask||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b))return this.__hitTestHitArea(a,b,c,d,e,f);if(null!=this.__scrollRect){var g=pa.__pool.get();g.setTo(a,b);var k=this.__getRenderTransform(),l=k.a*k.d-k.b*k.c;if(0==l)g.x=-k.tx,g.y=-k.ty;else{var m=1/l*(k.c*(k.ty-g.y)+k.d*(g.x-k.tx));g.y=1/l*(k.a*(g.y-k.ty)+k.b*(k.tx-g.x));g.x=m}if(!this.__scrollRect.containsPoint(g))return pa.__pool.release(g),
this.__hitTestHitArea(a,b,c,d,!0,f);pa.__pool.release(g)}return db.prototype.__hitTest.call(this,a,b,c,d,e,f)?null!=d?e:!0:null==this.hitArea&&null!=this.__graphics&&this.__graphics.__hitTest(a,b,c,this.__getRenderTransform())?(null==d||e&&!this.mouseEnabled||d.push(f),!0):this.__hitTestHitArea(a,b,c,d,e,f)},__hitTestHitArea:function(a,b,c,d,e,f){return null==this.hitArea||this.hitArea.mouseEnabled?!1:(this.hitArea.mouseEnabled=!0,a=this.hitArea.__hitTest(a,b,c,null,!0,f),this.hitArea.mouseEnabled=
!1,null!=d&&a&&(d[d.length]=f),a)},__hitTestMask:function(a,b){return db.prototype.__hitTestMask.call(this,a,b)||null!=this.__graphics&&this.__graphics.__hitTest(a,b,!0,this.__getRenderTransform())?!0:!1},get_graphics:function(){null==this.__graphics&&(this.__graphics=new nf(this));return this.__graphics},get_tabEnabled:function(){return null==this.__tabEnabled?this.__buttonMode:this.__tabEnabled},get_buttonMode:function(){return this.__buttonMode},set_buttonMode:function(a){return this.__buttonMode=
a},__class__:qa,__properties__:w(db.prototype.__properties__,{get_graphics:"get_graphics",set_buttonMode:"set_buttonMode",get_buttonMode:"get_buttonMode"})});var Y=function(){qa.call(this);this.addEventListener("addedToStage",v(this,this.onAdded))};h.Universal=Y;Y.__name__="Universal";Y.initWindow=function(a){Y.window=a;a.stage.align=6;a.stage.set_scaleMode(2)};Y.setupTracing=function(a){null==a&&(a=!1);null==Y.oldTrace&&(Y.oldTrace=th.trace);a||!ma.releaseMode?(th.trace=Y.oldTrace,Ta.level=5):(th.trace=
function(a,c){},Ta.level=0)};Y.reloadGame=function(){X.field(Y.am,"reloadGame").apply(Y.am,[])};Y.addReloadListener=function(a){X.field(Y.am,"reloadListeners").push(a)};Y.__super__=qa;Y.prototype=w(qa.prototype,{maskLayer:null,onAdded:function(a){this.removeEventListener("addedToStage",v(this,this.onAdded));this.initServices();this.maskLayer=new Ue;this.initScreen(ma.startInFullScreen)},initServices:function(){},initScreen:function(a){a=!1;this.stage.set_displayState(a?1:2);this.stage.__setLogicalSize(0,
0);$a.get_current().set_x(0);$a.get_current().set_y(0);$a.get_current().set_scaleX(1);$a.get_current().set_scaleY(1);this.set_x(0);this.set_y(0);this.set_scaleX(1);this.set_scaleY(1);p.stage=this.stage;for(var b=new Aa,c=0,d=ma.scales;c<d.length;){var e=d[c];++c;b.set(e,!0)}Y.windowWidth=a?Da.toFloat(this.stage.get_fullScreenWidth()):ma.stageWidth*ma.gameScale;Y.windowHeight=a?Da.toFloat(this.stage.get_fullScreenHeight()):ma.stageHeight*ma.gameScale;c=this.getDesiredScale(Y.windowWidth,Y.windowHeight,
ma.stageWidth,ma.stageHeight);d=this.getDesiredScale(Da.toFloat(this.stage.get_fullScreenWidth()),Da.toFloat(this.stage.get_fullScreenHeight()),ma.stageWidth,ma.stageHeight);d=ma.forceHiResAssets?d:c;4==d&&null!=b.h.__keys__[fe._4X.__id__]?(p.SCALE=4,p.IMG_BASE="4x"):3<=d&&null!=b.h.__keys__[fe._3X.__id__]?(p.SCALE=3,p.IMG_BASE="3x"):2<=d&&null!=b.h.__keys__[fe._2X.__id__]?(p.SCALE=2,p.IMG_BASE="2x"):1.5<=d&&null!=b.h.__keys__[fe._1_5X.__id__]?(p.SCALE=1.5,p.IMG_BASE="1.5x"):(p.SCALE=1,p.IMG_BASE=
"1x");b=ma.stageWidth*p.SCALE;d=ma.stageHeight*p.SCALE;e=Y.windowWidth/b;var f=Y.windowHeight/d;if(ma.forceHiResAssets||Y.windowWidth!=ma.stageWidth||Y.windowHeight!=ma.stageHeight)1==ma.scaleMode?p.SCALE!=c&&(this.set_scaleX(c/p.SCALE),this.set_scaleY(this.get_scaleX())):2==ma.scaleMode?(this.set_scaleX(e),this.set_scaleY(f)):3==ma.scaleMode||5==ma.scaleMode?(this.set_scaleX(Math.min(e,f)),this.set_scaleY(this.get_scaleX())):4==ma.scaleMode?(this.set_scaleX(Math.max(e,f)),this.set_scaleY(this.get_scaleX())):
0==ma.scaleMode&&p.SCALE!=c&&(this.set_scaleX(c/p.SCALE),this.set_scaleY(this.get_scaleX())),5!=ma.scaleMode&&1!=ma.scaleMode&&(this.set_x(this.get_x()+(Y.windowWidth-b*this.get_scaleX())/2),this.set_y(this.get_y()+(Y.windowHeight-d*this.get_scaleY())/2));Y.logicalWidth=ma.stageWidth;Y.logicalHeight=ma.stageHeight;!a||5!=ma.scaleMode&&1!=ma.scaleMode||(Y.logicalWidth=Y.windowWidth/this.get_scaleX()/p.SCALE,Y.logicalHeight=Y.windowHeight/this.get_scaleY()/p.SCALE,(Y.logicalWidth|0)==Y.logicalWidth&&
(Y.logicalHeight|0)==Y.logicalHeight)||(Y.logicalWidth|=0,Y.logicalHeight|=0,this.set_scaleX(Y.windowWidth/p.SCALE/Y.logicalWidth),this.set_scaleY(Y.windowHeight/p.SCALE/Y.logicalHeight));p.screenScaleX=this.get_scaleX();p.screenScaleY=this.get_scaleY();this.maskLayer.get_graphics().clear();!a||3!=ma.scaleMode&&0!=ma.scaleMode||(this.maskLayer.get_graphics().beginFill(this.stage.get_color()),this.maskLayer.get_graphics().drawRect(-this.get_x(),-this.get_y(),Y.windowWidth,this.get_y()),this.maskLayer.get_graphics().drawRect(-this.get_x(),
0,this.get_x(),d),this.maskLayer.get_graphics().drawRect(b,0,this.get_x(),d),this.maskLayer.get_graphics().drawRect(-this.get_x(),d,Y.windowWidth,this.get_y()),this.maskLayer.get_graphics().endFill())},getDesiredScale:function(a,b,c,d){var e=2*c,f=2*d;c*=3;d*=3;return a>=2*e&&b>=2*f?4:a>=c&&b>=d?3:a>=e&&b>=f?2:a>=c/2&&b>=d/2?1.5:1},preloaderComplete:function(){try{new p(this)}catch(a){ra.lastException=a,this.stage.__handleError(a instanceof E?a.val:a)}this.stage.dispatchEvent(new da("resize",!1,!1));
this.stage.window.__fullscreen&&this.stage.dispatchEvent(new hg("fullScreen",!1,!1,!0,!0))},__class__:Y});var ea={};h["_Xml.XmlType_Impl_"]=ea;ea.__name__="_Xml.XmlType_Impl_";ea.toString=function(a){switch(a){case 0:return"Element";case 1:return"PCData";case 2:return"CData";case 3:return"Comment";case 4:return"DocType";case 5:return"ProcessingInstruction";case 6:return"Document"}};var fa=function(a){this.nodeType=a;this.children=[];this.attributeMap=new ua};h.Xml=fa;fa.__name__="Xml";fa.parse=function(a){return Qh.parse(a)};
fa.createElement=function(a){var b=new fa(fa.Element);if(b.nodeType!=fa.Element)throw new E("Bad node type, expected Element but found "+ea.toString(b.nodeType));b.nodeName=a;return b};fa.createPCData=function(a){var b=new fa(fa.PCData);if(b.nodeType==fa.Document||b.nodeType==fa.Element)throw new E("Bad node type, unexpected "+ea.toString(b.nodeType));b.nodeValue=a;return b};fa.createCData=function(a){var b=new fa(fa.CData);if(b.nodeType==fa.Document||b.nodeType==fa.Element)throw new E("Bad node type, unexpected "+
ea.toString(b.nodeType));b.nodeValue=a;return b};fa.createComment=function(a){var b=new fa(fa.Comment);if(b.nodeType==fa.Document||b.nodeType==fa.Element)throw new E("Bad node type, unexpected "+ea.toString(b.nodeType));b.nodeValue=a;return b};fa.createDocType=function(a){var b=new fa(fa.DocType);if(b.nodeType==fa.Document||b.nodeType==fa.Element)throw new E("Bad node type, unexpected "+ea.toString(b.nodeType));b.nodeValue=a;return b};fa.createProcessingInstruction=function(a){var b=new fa(fa.ProcessingInstruction);
if(b.nodeType==fa.Document||b.nodeType==fa.Element)throw new E("Bad node type, unexpected "+ea.toString(b.nodeType));b.nodeValue=a;return b};fa.createDocument=function(){return new fa(fa.Document)};fa.prototype={nodeType:null,nodeName:null,nodeValue:null,parent:null,children:null,attributeMap:null,get:function(a){if(this.nodeType!=fa.Element)throw new E("Bad node type, expected Element but found "+ea.toString(this.nodeType));var b=this.attributeMap;return null!=q[a]?b.getReserved(a):b.h[a]},set:function(a,
b){if(this.nodeType!=fa.Element)throw new E("Bad node type, expected Element but found "+ea.toString(this.nodeType));var c=this.attributeMap;null!=q[a]?c.setReserved(a,b):c.h[a]=b},exists:function(a){if(this.nodeType!=fa.Element)throw new E("Bad node type, expected Element but found "+ea.toString(this.nodeType));var b=this.attributeMap;return null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a)},attributes:function(){if(this.nodeType!=fa.Element)throw new E("Bad node type, expected Element but found "+
ea.toString(this.nodeType));return this.attributeMap.keys()},elements:function(){if(this.nodeType!=fa.Document&&this.nodeType!=fa.Element)throw new E("Bad node type, expected Element or Document but found "+ea.toString(this.nodeType));for(var a=[],b=0,c=this.children;b<c.length;){var d=c[b];++b;d.nodeType==fa.Element&&a.push(d)}return B.iter(a)},elementsNamed:function(a){if(this.nodeType!=fa.Document&&this.nodeType!=fa.Element)throw new E("Bad node type, expected Element or Document but found "+ea.toString(this.nodeType));
for(var b=[],c=0,d=this.children;c<d.length;){var e=d[c];++c;if(e.nodeType==fa.Element){if(e.nodeType!=fa.Element)throw new E("Bad node type, expected Element but found "+ea.toString(e.nodeType));var f=e.nodeName==a}else f=!1;f&&b.push(e)}return B.iter(b)},firstElement:function(){if(this.nodeType!=fa.Document&&this.nodeType!=fa.Element)throw new E("Bad node type, expected Element or Document but found "+ea.toString(this.nodeType));for(var a=0,b=this.children;a<b.length;){var c=b[a];++a;if(c.nodeType==
fa.Element)return c}return null},addChild:function(a){if(this.nodeType!=fa.Document&&this.nodeType!=fa.Element)throw new E("Bad node type, expected Element or Document but found "+ea.toString(this.nodeType));null!=a.parent&&a.parent.removeChild(a);this.children.push(a);a.parent=this},removeChild:function(a){if(this.nodeType!=fa.Document&&this.nodeType!=fa.Element)throw new E("Bad node type, expected Element or Document but found "+ea.toString(this.nodeType));return B.remove(this.children,a)?(a.parent=
null,!0):!1},toString:function(){return Ek.print(this)},__class__:fa};var id=function(){this.lowerBound=new N;this.upperBound=new N};h["box2D.collision.B2AABB"]=id;id.__name__="box2D.collision.B2AABB";id.prototype={isValid:function(){var a=this.upperBound.y-this.lowerBound.y;return 0<=this.upperBound.x-this.lowerBound.x&&0<=a&&this.lowerBound.isValid()&&this.upperBound.isValid()},getCenter:function(){return new N((this.lowerBound.x+this.upperBound.x)/2,(this.lowerBound.y+this.upperBound.y)/2)},getExtents:function(){return new N((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;b=b.p2.y-b.p1.y;var k=Math.abs(b),l=a.normal;if(Math.abs(g)<Number.MIN_VALUE){if(e<this.lowerBound.x||this.upperBound.x<e)return!1}else{var m=1/g;g=(this.lowerBound.x-
e)*m;e=(this.upperBound.x-e)*m;m=-1;g>e&&(m=g,g=e,e=m,m=1);g>c&&(l.x=m,l.y=0,c=g);d=Math.min(d,e);if(c>d)return!1}if(k<Number.MIN_VALUE){if(f<this.lowerBound.y||this.upperBound.y<f)return!1}else if(m=1/b,g=(this.lowerBound.y-f)*m,e=(this.upperBound.y-f)*m,m=-1,g>e&&(m=g,g=e,e=m,m=1),g>c&&(l.y=m,l.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)},reset:function(){this.lowerBound.x=0;this.lowerBound.y=0;this.upperBound.x=0;this.upperBound.y=0},setTo:function(a){this.lowerBound.x=a.lowerBound.x;this.lowerBound.y=a.lowerBound.y;this.upperBound.x=
a.upperBound.x;this.upperBound.y=a.upperBound.y},lowerBound:null,upperBound:null,__class__:id};var N=function(a,b){null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b};h["box2D.common.math.B2Vec2"]=N;N.__name__="box2D.common.math.B2Vec2";N.make=function(a,b){return new N(a,b)};N.freePool=function(){N.pooli=0};N.getFromPool=function(){500<N.pooli&&(N.pooli=0);if(N.pooli<N.pool.length){var a=N.pool[N.pooli];a.x=0;a.y=0;N.pooli++;return a}a=new N;N.pool.push(a);N.pooli++;return a};N.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 N(-this.x,-this.y)},getNegativePooled:function(){var a=N.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);if(a){a=N.getFromPool();var b=this.x,c=this.y;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c}else a=new N(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=P.dot(this,a.col1);this.y=P.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);b=b.copy();b.subtract(a);
return c.perpDot(b)},isValid:function(){return P.isValid(this.x)?P.isValid(this.y):!1},x:null,y:null,toString:function(){return"("+this.x+", "+this.y+")"},reset:function(){this.y=this.x=0},__class__:N};var Ve=function(){this.v=new N;this.id=new Q};h["box2D.collision.ClipVertex"]=Ve;Ve.__name__="box2D.collision.ClipVertex";Ve.prototype={set:function(a){var b=this.v,c=a.v;b.x=c.x;b.y=c.y;this.id.set(a.id)},v:null,id:null,__class__:Ve};var Q=function(){this.features=new pe;this.features._m_id=this};
h["box2D.collision.B2ContactID"]=Q;Q.__name__="box2D.collision.B2ContactID";Q.prototype={set:function(a){this.set_key(a._key)},copy:function(){var a=new Q;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},features:null,_key:null,
indexA:null,indexB:null,typeA:null,typeB:null,__class__:Q,__properties__:{set_key:"set_key",get_key:"get_key"}};var pe=function(){};h["box2D.collision.Features"]=pe;pe.__name__="box2D.collision.Features";pe.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},_referenceEdge:null,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},_incidentEdge:null,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},_incidentVertex:null,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},_flip:null,_m_id:null,__class__:pe,
__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 J=function(){};h["box2D.collision.B2Collision"]=J;J.__name__="box2D.collision.B2Collision";J.clipSegmentToLine=function(a,b,c,d){var e=0,f=b[0],g=f.v;f=b[1];var k=f.v,l=c.x*g.x+c.y*g.y-d;f=c.x*k.x+c.y*k.y-d;0>=l&&
a[e++].set(b[0]);0>=f&&a[e++].set(b[1]);0>l*f&&(c=l/(l-f),f=a[e],f=f.v,f.x=g.x+c*(k.x-g.x),f.y=g.y+c*(k.y-g.y),f=a[e],f.id=(0<l?b[0]:b[1]).id,++e);return e};J.edgeSeparation=function(a,b,c,d,e){var f=a.m_vertices,g=d.m_vertexCount;d=d.m_vertices;var k=b.R,l=a.m_normals[c];a=k.col1.x*l.x+k.col2.x*l.y;var m=k.col1.y*l.x+k.col2.y*l.y;k=e.R;var z=k.col1.x*a+k.col1.y*m;k=k.col2.x*a+k.col2.y*m;for(var n=0,p=Number.MAX_VALUE,h=0;h<g;){var q=h++;l=d[q];l=l.x*z+l.y*k;l<p&&(p=l,n=q)}l=f[c];k=b.R;c=b.position.x+
(k.col1.x*l.x+k.col2.x*l.y);b=b.position.y+(k.col1.y*l.x+k.col2.y*l.y);l=d[n];k=e.R;return(e.position.x+(k.col1.x*l.x+k.col2.x*l.y)-c)*a+(e.position.y+(k.col1.y*l.x+k.col2.y*l.y)-b)*m};J.findMaxSeparation=function(a,b,c,d,e){var f=b.m_vertexCount,g=b.m_normals,k=e.R,l=d.m_centroid,m=e.position.x+(k.col1.x*l.x+k.col2.x*l.y),z=e.position.y+(k.col1.y*l.x+k.col2.y*l.y);k=c.R;l=b.m_centroid;m-=c.position.x+(k.col1.x*l.x+k.col2.x*l.y);z-=c.position.y+(k.col1.y*l.x+k.col2.y*l.y);k=m*c.R.col1.x+z*c.R.col1.y;
z=m*c.R.col2.x+z*c.R.col2.y;m=0;for(var n=-Number.MAX_VALUE,p=0;p<f;){var h=p++;l=g[h];l=l.x*k+l.y*z;l>n&&(n=l,m=h)}g=J.edgeSeparation(b,c,m,d,e);n=0<=m-1?m-1:f-1;k=J.edgeSeparation(b,c,n,d,e);p=m+1<f?m+1:0;z=J.edgeSeparation(b,c,p,d,e);if(k>g&&k>z)l=-1;else if(z>g)l=1,n=p,k=z;else return a[0]=m,g;for(;;)if(m=-1==l?0<=n-1?n-1:f-1:n+1<f?n+1:0,g=J.edgeSeparation(b,c,m,d,e),g>k)n=m,k=g;else break;a[0]=n;return k};J.findIncidentEdge=function(a,b,c,d,e,f){var g=e.m_vertexCount,k=e.m_vertices;e=e.m_normals;
var l=c.R;b=b.m_normals[d];c=l.col1.x*b.x+l.col2.x*b.y;var m=l.col1.y*b.x+l.col2.y*b.y;l=f.R;b=l.col1.x*c+l.col1.y*m;m=l.col2.x*c+l.col2.y*m;c=b;l=0;for(var z=Number.MAX_VALUE,n=0;n<g;){var p=n++;b=e[p];b=c*b.x+m*b.y;b<z&&(z=b,l=p)}e=l;g=e+1<g?e+1:0;c=a[0];b=k[e];l=f.R;c.v.x=f.position.x+(l.col1.x*b.x+l.col2.x*b.y);c.v.y=f.position.y+(l.col1.y*b.x+l.col2.y*b.y);c.id.features.set_referenceEdge(d);c.id.features.set_incidentEdge(e);c.id.features.set_incidentVertex(0);c=a[1];b=k[g];l=f.R;c.v.x=f.position.x+
(l.col1.x*b.x+l.col2.x*b.y);c.v.y=f.position.y+(l.col1.y*b.x+l.col2.y*b.y);c.id.features.set_referenceEdge(d);c.id.features.set_incidentEdge(g);c.id.features.set_incidentVertex(1)};J.makeClipPointVector=function(){var a=[];a[0]=new Ve;a[1]=new Ve;return a};J.collidePolygons=function(a,b,c,d,e){a.m_pointCount=0;var f=b.m_radius+d.m_radius;J.s_edgeAO[0]=0;var g=J.findMaxSeparation(J.s_edgeAO,b,c,d,e);var k=J.s_edgeAO[0];if(!(g>f)){J.s_edgeBO[0]=0;var l=J.findMaxSeparation(J.s_edgeBO,d,e,b,c);var m=
J.s_edgeBO[0];if(!(l>f)){l>.98*g+.001?(g=d,d=b,b=e,l=m,a.m_type=4,k=1):(g=b,b=c,c=e,l=k,a.m_type=2,k=0);m=J.s_incidentEdge;J.findIncidentEdge(m,g,b,l,d,c);d=g.m_vertices;e=d[l];var z=l+1<g.m_vertexCount?d[l+1]:d[0];g=J.s_localTangent;d=z.x-e.x;l=z.y-e.y;null==l&&(l=0);null==d&&(d=0);g.x=d;g.y=l;g.normalize();var n=J.s_localNormal;n.x=g.y;n.y=-g.x;d=J.s_planePoint;l=.5*(e.x+z.x);var p=.5*(e.y+z.y);null==p&&(p=0);null==l&&(l=0);d.x=l;d.y=p;p=J.s_tangent;l=b.R;p.x=l.col1.x*g.x+l.col2.x*g.y;p.y=l.col1.y*
g.x+l.col2.y*g.y;var h=J.s_tangent2;h.x=-p.x;h.y=-p.y;g=J.s_normal;g.x=p.y;g.y=-p.x;var q=J.s_v11,t=J.s_v12;q.x=b.position.x+(l.col1.x*e.x+l.col2.x*e.y);q.y=b.position.y+(l.col1.y*e.x+l.col2.y*e.y);t.x=b.position.x+(l.col1.x*z.x+l.col2.x*z.y);t.y=b.position.y+(l.col1.y*z.x+l.col2.y*z.y);b=g.x*q.x+g.y*q.y;l=p.x*t.x+p.y*t.y+f;z=J.s_clipPoints1;e=J.s_clipPoints2;m=J.clipSegmentToLine(z,m,h,-p.x*q.x-p.y*q.y+f);if(!(2>m||(m=J.clipSegmentToLine(e,z,p,l),2>m))){m=a.m_localPlaneNormal;m.x=n.x;m.y=n.y;m=a.m_localPoint;
m.x=d.x;m.y=d.y;d=m=0;for(n=ha.b2_maxManifoldPoints;d<n;)l=d++,p=e[l],g.x*p.v.x+g.y*p.v.y-b<=f&&(z=a.m_points[m],l=c.R,h=p.v.x-c.position.x,q=p.v.y-c.position.y,z.m_localPoint.x=h*l.col1.x+q*l.col1.y,z.m_localPoint.y=h*l.col2.x+q*l.col2.y,z.m_id.set(p.id),z.m_id.features.set_flip(k),++m);a.m_pointCount=m}}}};J.collideCircles=function(a,b,c,d,e){a.m_pointCount=0;var f=c.R,g=b.m_p,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=1,e=a.m_localPoint,b=b.m_p,e.x=b.x,e.y=b.y,b=a.m_localPlaneNormal,b.x=0,b.y=0,a.m_pointCount=1,b=a.m_points[0].m_localPoint,d=d.m_p,b.x=d.x,b.y=d.y,a.m_points[0].m_id.set_key(0))};J.collidePolygonAndCircle=function(a,b,c,d,e){a.m_pointCount=0;var f=e.R,g=d.m_p,k=e.position.x+(f.col1.x*g.x+f.col2.x*g.y)-c.position.x,l=e.position.y+(f.col1.y*g.x+f.col2.y*g.y)-c.position.y;f=c.R;c=k*f.col1.x+
l*f.col1.y;f=k*f.col2.x+l*f.col2.y;var m=0,z=-Number.MAX_VALUE;e=b.m_radius+d.m_radius;var n=b.m_vertexCount,p=b.m_vertices;b=b.m_normals;for(var h=0;h<n;){var q=h++;g=p[q];k=c-g.x;l=f-g.y;g=b[q];g=g.x*k+g.y*l;if(g>e)return;g>z&&(z=g,m=q)}k=m;g=p[k];n=p[k+1<n?k+1:0];if(z<Number.MIN_VALUE)a.m_pointCount=1,a.m_type=2,c=a.m_localPlaneNormal,f=b[m],c.x=f.x,c.y=f.y,a.m_localPoint.x=.5*(g.x+n.x),a.m_localPoint.y=.5*(g.y+n.y);else if(z=(c-n.x)*(g.x-n.x)+(f-n.y)*(g.y-n.y),0>=(c-g.x)*(n.x-g.x)+(f-g.y)*(n.y-
g.y)){if((c-g.x)*(c-g.x)+(f-g.y)*(f-g.y)>e*e)return;a.m_pointCount=1;a.m_type=2;a.m_localPlaneNormal.x=c-g.x;a.m_localPlaneNormal.y=f-g.y;a.m_localPlaneNormal.normalize();c=a.m_localPoint;c.x=g.x;c.y=g.y}else if(0>=z){if((c-n.x)*(c-n.x)+(f-n.y)*(f-n.y)>e*e)return;a.m_pointCount=1;a.m_type=2;a.m_localPlaneNormal.x=c-n.x;a.m_localPlaneNormal.y=f-n.y;a.m_localPlaneNormal.normalize();c=a.m_localPoint;c.x=n.x;c.y=n.y}else{m=.5*(g.x+n.x);g=.5*(g.y+n.y);z=(c-m)*b[k].x+(f-g)*b[k].y;if(z>e)return;a.m_pointCount=
1;a.m_type=2;a.m_localPlaneNormal.x=b[k].x;a.m_localPlaneNormal.y=b[k].y;a.m_localPlaneNormal.normalize();c=a.m_localPoint;f=m;e=g;null==e&&(e=0);null==f&&(f=0);c.x=f;c.y=e}c=a.m_points[0].m_localPoint;d=d.m_p;c.x=d.x;c.y=d.y;a.m_points[0].m_id.set_key(0)};J.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;a=c.y-d.y;return 0<e||0<f||0<c.x-d.x||0<a?!1:!0};var F=function(){this.position=new N;this.velocity=new N;this.normal=new N;this.id=
new Q};h["box2D.collision.B2ContactPoint"]=F;F.__name__="box2D.collision.B2ContactPoint";F.prototype={shape1:null,shape2:null,position:null,velocity:null,normal:null,separation:null,friction:null,restitution:null,id:null,__class__:F};var De=function(){this.m_v1=new Ed;this.m_v2=new Ed;this.m_v3=new Ed;this.m_vertices=[];this.m_vertices[0]=this.m_v1;this.m_vertices[1]=this.m_v2;this.m_vertices[2]=this.m_v3};h["box2D.collision.B2Simplex"]=De;De.__name__="box2D.collision.B2Simplex";De.prototype={readCache:function(a,
b,c,d,e){ha.b2Assert(0<=a.count&&3>=a.count);this.m_count=a.count;var f=this.m_vertices;if(a.useCache){for(var g=0,k=this.m_count;g<k;){var l=g++;var m=f[l];m.indexA=a.indexA[l];m.indexB=a.indexB[l];l=b.getVertex(m.indexA);var z=d.getVertex(m.indexB);m.wA=P.mulX(c,l,!0);m.wB=P.mulX(e,z,!0);m.w=P.subtractVVPooled(m.wB,m.wA);m.a=0}1<this.m_count&&(a=a.metric,m=this.getMetric(),m<.5*a||2*a<m||m<Number.MIN_VALUE)&&(this.m_count=0)}0==this.m_count&&(m=f[0],m.indexA=0,m.indexB=0,l=b.getVertex(0),z=d.getVertex(0),
m.wA=P.mulX(c,l,!0),m.wB=P.mulX(e,z,!0),m.w=P.subtractVVPooled(m.wB,m.wA),this.m_count=1)},writeCache:function(a){if(a.useCache){a.metric=this.getMetric();a.count=this.m_count;for(var b=this.m_vertices,c=0,d=this.m_count;c<d;){var e=c++;a.indexA[e]=b[e].indexA;a.indexB[e]=b[e].indexB}}},getSearchDirection:function(){switch(this.m_count){case 1:return this.m_v1.w.getNegativePooled();case 2:var a=P.subtractVVPooled(this.m_v2.w,this.m_v1.w);return 0<P.crossVV(a,this.m_v1.w.getNegativePooled())?P.crossFV(1,
a,!0):P.crossVF(a,1,!0);default:return ha.b2Assert(!1),N.getFromPool()}},getClosestPoint:function(){switch(this.m_count){case 0:return ha.b2Assert(!1),N.getFromPool();case 1:return this.m_v1.w;case 2:var a=N.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 ha.b2Assert(!1),N.getFromPool()}},getWitnessPoints:function(a,b){switch(this.m_count){case 0:ha.b2Assert(!1);break;case 1:var c=this.m_v1.wA;a.x=
c.x;a.y=c.y;a=this.m_v1.wB;b.x=a.x;b.y=a.y;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:ha.b2Assert(!1)}},
getMetric:function(){switch(this.m_count){case 0:return ha.b2Assert(!1),0;case 1:return 0;case 2:return P.subtractVVPooled(this.m_v1.w,this.m_v2.w).length();case 3:return P.crossVV(P.subtractVVPooled(this.m_v2.w,this.m_v1.w),P.subtractVVPooled(this.m_v3.w,this.m_v1.w));default:return ha.b2Assert(!1),0}},solve2:function(){var a=this.m_v1.w,b=this.m_v2.w,c=P.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=P.subtractVVPooled(b,a),e=P.dot(a,d),f=P.dot(b,d);e=-e;var g=P.subtractVVPooled(c,a),k=P.dot(a,g),l=P.dot(c,g);k=-k;var m=P.subtractVVPooled(c,b),z=P.dot(b,m);m=P.dot(c,m);z=-z;g=P.crossVV(d,g);d=g*P.crossVV(b,c);c=g*P.crossVV(c,a);a=g*P.crossVV(a,b);0>=e&&0>=k?this.m_count=this.m_v1.a=1:0<f&&0<e&&0>=a?(l=1/(f+e),this.m_v1.a=f*l,this.m_v2.a=e*l,this.m_count=2):0<l&&0<k&&0>=
c?(f=1/(l+k),this.m_v1.a=l*f,this.m_v3.a=k*f,this.m_count=2,this.m_v2.set(this.m_v3)):0>=f&&0>=z?(this.m_count=this.m_v2.a=1,this.m_v1.set(this.m_v2)):0>=l&&0>=m?(this.m_count=this.m_v3.a=1,this.m_v1.set(this.m_v3)):0<m&&0<z&&0>=d?(f=1/(m+z),this.m_v2.a=m*f,this.m_v3.a=z*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)},m_v1:null,m_v2:null,m_v3:null,m_vertices:null,m_count:null,__class__:De};var Ed=function(){};h["box2D.collision.B2SimplexVertex"]=
Ed;Ed.__name__="box2D.collision.B2SimplexVertex";Ed.prototype={set:function(a){var b=this.wA,c=a.wA;b.x=c.x;b.y=c.y;b=this.wB;c=a.wB;b.x=c.x;b.y=c.y;b=this.w;c=a.w;b.x=c.x;b.y=c.y;this.a=a.a;this.indexA=a.indexA;this.indexB=a.indexB},wA:null,wB:null,w:null,a:null,indexA:null,indexB:null,__class__:Ed};var ed=function(){};h["box2D.collision.B2Distance"]=ed;ed.__name__="box2D.collision.B2Distance";ed.distance=function(a,b,c){++ed.b2_gjkCalls;var d=c.proxyA,e=c.proxyB,f=c.transformA,g=c.transformB,k=
ed.s_simplex;k.readCache(b,d,f,e,g);var l=k.m_vertices,m=ed.s_saveA,z=ed.s_saveB;k.getClosestPoint().lengthSquared();for(var n,p=0;20>p;){var h=k.m_count;n=0;for(var q=h;n<q;){var t=n++;m[t]=l[t].indexA;z[t]=l[t].indexB}switch(k.m_count){case 1:break;case 2:k.solve2();break;case 3:k.solve3();break;default:ha.b2Assert(!1)}if(3==k.m_count)break;n=k.getClosestPoint();n.lengthSquared();q=k.getSearchDirection();if(q.lengthSquared()<Number.MIN_VALUE*Number.MIN_VALUE)break;n=l[k.m_count];n.indexA=d.getSupport(P.mulTMV(f.R,
q.getNegativePooled(),!0))|0;n.wA=P.mulX(f,d.getVertex(n.indexA),!0);n.indexB=e.getSupport(P.mulTMV(g.R,q,!0))|0;n.wB=P.mulX(g,e.getVertex(n.indexB),!0);n.w=P.subtractVVPooled(n.wB,n.wA);++p;++ed.b2_gjkIters;q=!1;for(t=0;t<h;){var r=t++;if(n.indexA==m[r]&&n.indexB==z[r]){q=!0;break}}if(q)break;++k.m_count}ed.b2_gjkMaxIters=P.max(ed.b2_gjkMaxIters,p)|0;k.getWitnessPoints(a.pointA,a.pointB);a.distance=P.subtractVVPooled(a.pointA,a.pointB).length();a.iterations=p;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=P.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):(n=N.getFromPool(),n.x=.5*(a.pointA.x+a.pointB.x),n.y=.5*(a.pointA.y+a.pointB.y),a.pointA.x=a.pointB.x=n.x,a.pointA.y=a.pointB.y=n.y,a.distance=0))};var Wd=function(){};h["box2D.collision.B2DistanceInput"]=Wd;Wd.__name__="box2D.collision.B2DistanceInput";Wd.prototype={proxyA:null,proxyB:null,transformA:null,
transformB:null,useRadii:null,__class__:Wd};var ig=function(){this.pointA=new N;this.pointB=new N};h["box2D.collision.B2DistanceOutput"]=ig;ig.__name__="box2D.collision.B2DistanceOutput";ig.prototype={pointA:null,pointB:null,distance:null,iterations:null,__class__:ig};var We=function(){this.m_internalVertices=[]};h["box2D.collision.B2DistanceProxy"]=We;We.__name__="box2D.collision.B2DistanceProxy";We.prototype={set:function(a){switch(a.getType()){case 0:a=L.__cast(a,cd);for(this.m_vertices=this.m_internalVertices;1<
this.m_vertices.length;)this.m_vertices.pop();this.m_vertices[0]=a.m_p;this.m_count=1;this.m_radius=a.m_radius;break;case 1:a=L.__cast(a,Lb);this.m_vertices=a.m_vertices;this.m_count=a.m_vertexCount;this.m_radius=a.m_radius;break;case 2:a=L.__cast(a,Ug);for(this.m_vertices=this.m_internalVertices;2<this.m_vertices.length;)this.m_vertices.pop();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:ha.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){ha.b2Assert(0<=a&&a<this.m_count);return this.m_vertices[a]},
m_internalVertices:null,m_vertices:null,m_count:null,m_radius:null,__class__:We};var uh=function(){this.oldAABB=new id;this.stackQueue=[];this.stackQueuePos=0;this.m_freeList=this.m_root=null;this.m_insertionCount=this.m_path=0};h["box2D.collision.B2DynamicTree"]=uh;uh.__name__="box2D.collision.B2DynamicTree";uh.prototype={createProxy:function(a,b){var c=this.allocateNode(),d=ha.b2_aabbExtension,e=ha.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){ha.b2Assert(a.isLeaf());if(a.aabb.contains(b))return!1;this.removeLeaf(a);var d=ha.b2_aabbExtension+ha.b2_aabbMultiplier*(0<c.x?c.x:-c.x);c=ha.b2_aabbExtension+ha.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},stackQueuePos:null,stackQueue:null,query:function(a,b){if(null!=this.m_root){null==this.stackQueue[this.stackQueuePos]&&(this.stackQueue[this.stackQueuePos]=[]);var c=
this.stackQueue[this.stackQueuePos++],d=0;for(c[d++]=this.m_root;0<d;){var e=c[--d];if(e.aabb.testOverlap(b))if(e.isLeaf()){if(!a.queryCallback(e))break}else c[d++]=e.child1,c[d++]=e.child2}for(d=c.length;0<d--;)c.pop();--this.stackQueuePos}},rayCast:function(a,b){if(null!=this.m_root){var c=b.p1,d=b.p2,e=P.subtractVVPooled(c,d);e.normalize();e=P.crossFV(1,e);var f=P.absV(e),g=b.maxFraction,k=new id;var l=c.x+g*(d.x-c.x);g=c.y+g*(d.y-c.y);k.lowerBound.x=Math.min(c.x,l);k.lowerBound.y=Math.min(c.y,
g);k.upperBound.x=Math.max(c.x,l);k.upperBound.y=Math.max(c.y,g);var m=[],z=0;for(m[z++]=this.m_root;0<z;)if(l=m[--z],0!=l.aabb.testOverlap(k)){g=l.aabb.getCenter();var n=l.aabb.getExtents();if(!(0<Math.abs(e.x*(c.x-g.x)+e.y*(c.y-g.y))-f.x*n.x-f.y*n.y))if(l.isLeaf()){g=new cm;g.p1=b.p1;g.p2=b.p2;g.maxFraction=b.maxFraction;g=a(g,l);if(0==g)break;l=c.x+g*(d.x-c.x);g=c.y+g*(d.y-c.y);k.lowerBound.x=Math.min(c.x,l);k.lowerBound.y=Math.min(c.y,g);k.upperBound.x=Math.max(c.x,l);k.upperBound.y=Math.max(c.y,
g)}else m[z++]=l.child1,m[z++]=l.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 Gk},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())for(;;){var d=c.child1;c=c.child2;c=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)<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)?d:c;if(0!=c.isLeaf())break}b=c.parent;d=this.allocateNode();d.parent=b;d.userData=null;d.aabb.combine(a.aabb,c.aabb);if(null!=b)for(c.parent.child1==c?b.child1=d:b.child2=d,d.child1=c,d.child2=a,c.parent=d,a.parent=d;!b.aabb.contains(d.aabb)&&(b.aabb.combine(b.child1.aabb,b.child2.aabb),d=b,b=b.parent,
null!=b););else d.child1=c,d.child2=a,c.parent=d,this.m_root=a.parent=d}},oldAABB:null,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;){this.oldAABB.setTo(c.aabb);c.aabb.combine(c.child1.aabb,c.child2.aabb);if(this.oldAABB.contains(c.aabb))break;c=c.parent}else this.m_root=a,a.parent=null,this.freeNode(b)}},m_root:null,m_freeList:null,m_path:null,
m_insertionCount:null,__class__:uh};var Xe=function(){};h["box2D.collision.QueryCallback"]=Xe;Xe.__name__="box2D.collision.QueryCallback";Xe.__isInterface__=!0;Xe.prototype={queryCallback:null,__class__:Xe};var dm=function(){};h["box2D.collision.IBroadPhase"]=dm;dm.__name__="box2D.collision.IBroadPhase";dm.__isInterface__=!0;dm.prototype={createProxy:null,destroyProxy:null,moveProxy:null,testOverlap:null,getUserData:null,getFatAABB:null,getProxyCount:null,updatePairs:null,query:null,rayCast:null,
validate:null,rebalance:null,__class__:dm};var em=function(){this.m_tree=new uh;this.m_moveBuffer=[];this.m_pairBuffer=[];this.m_proxyCount=this.m_pairCount=0};h["box2D.collision.B2DynamicTreeBroadPhase"]=em;em.__name__="box2D.collision.B2DynamicTreeBroadPhase";em.__interfaces__=[Xe,dm];em.prototype={createProxy:function(a,b){a=this.m_tree.createProxy(a,b);++this.m_proxyCount;this.bufferMove(a);return a},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){a=this.m_tree.getFatAABB(a);b=this.m_tree.getFatAABB(b);return a.testOverlap(b)},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.m_pairCount=0,c=this.m_moveBuffer;b<c.length;){var d=c[b];++b;this.cur_queryProxy=d;d=this.m_tree.getFatAABB(d);
this.m_tree.query(this,d)}this.cur_queryProxy=null;for(b=this.m_moveBuffer.length;0<=--b;)this.m_moveBuffer.pop();c=!0;for(b=0;c;)if(b>=this.m_pairCount)c=!1;else for(d=this.m_pairBuffer[b],a.addPair(this.m_tree.getUserData(d.proxyA),this.m_tree.getUserData(d.proxyB)),++b;b<this.m_pairCount;){var e=this.m_pairBuffer[b];if(e.proxyA!=d.proxyA||e.proxyB!=d.proxyB)break;++b}},queryCallback:function(a){if(a==this.cur_queryProxy)return!0;this.m_pairCount==this.m_pairBuffer.length&&(this.m_pairBuffer[this.m_pairCount]=
new Kp);var b=this.m_pairBuffer[this.m_pairCount];a.id<this.cur_queryProxy.id?(b.proxyA=a,b.proxyB=this.cur_queryProxy):(b.proxyA=this.cur_queryProxy,b.proxyB=a);++this.m_pairCount;return!0},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){B.remove(this.m_moveBuffer,a)},comparePairs:function(a,
b){return 0},m_tree:null,m_proxyCount:null,m_moveBuffer:null,m_pairBuffer:null,m_pairCount:null,cur_queryProxy:null,__class__:em};var Gk=function(){this.aabb=new id;this.id=Gk.currentID++};h["box2D.collision.B2DynamicTreeNode"]=Gk;Gk.__name__="box2D.collision.B2DynamicTreeNode";Gk.prototype={id:null,isLeaf:function(){return null==this.child1},userData:null,aabb:null,parent:null,child1:null,child2:null,__class__:Gk};var Kp=function(){};h["box2D.collision.B2DynamicTreePair"]=Kp;Kp.__name__="box2D.collision.B2DynamicTreePair";
Kp.prototype={proxyA:null,proxyB:null,__class__:Kp};var Rh=function(){this.m_pointCount=0;this.m_points=[];for(var a=0,b=ha.b2_maxManifoldPoints;a<b;){var c=a++;this.m_points[c]=new Lp}this.m_localPlaneNormal=new N;this.m_localPoint=new N};h["box2D.collision.B2Manifold"]=Rh;Rh.__name__="box2D.collision.B2Manifold";Rh.prototype={reset:function(){for(var a=0,b=ha.b2_maxManifoldPoints;a<b;){var c=a++;this.m_points[c].reset()}a=this.m_localPlaneNormal;a.x=0;a.y=0;a=this.m_localPoint;a.x=0;this.m_pointCount=
this.m_type=a.y=0},set:function(a){this.m_pointCount=a.m_pointCount;for(var b=0,c=ha.b2_maxManifoldPoints;b<c;){var d=b++;this.m_points[d].set(a.m_points[d])}b=this.m_localPlaneNormal;c=a.m_localPlaneNormal;b.x=c.x;b.y=c.y;b=this.m_localPoint;c=a.m_localPoint;b.x=c.x;b.y=c.y;this.m_type=a.m_type},copy:function(){var a=new Rh;a.set(this);return a},m_points:null,m_localPlaneNormal:null,m_localPoint:null,m_type:null,m_pointCount:null,__class__:Rh};var Lp=function(){this.m_localPoint=new N;this.m_id=
new Q;this.reset()};h["box2D.collision.B2ManifoldPoint"]=Lp;Lp.__name__="box2D.collision.B2ManifoldPoint";Lp.prototype={reset:function(){var a=this.m_localPoint;a.x=0;this.m_tangentImpulse=this.m_normalImpulse=a.y=0;this.m_id.set_key(0)},set:function(a){var b=this.m_localPoint,c=a.m_localPoint;b.x=c.x;b.y=c.y;this.m_normalImpulse=a.m_normalImpulse;this.m_tangentImpulse=a.m_tangentImpulse;this.m_id.set(a.m_id)},m_localPoint:null,m_normalImpulse:null,m_tangentImpulse:null,m_id:null,__class__:Lp};var Zs=
function(){this.R=new Qc;this.center=new N;this.extents=new N};h["box2D.collision.B2OBB"]=Zs;Zs.__name__="box2D.collision.B2OBB";Zs.prototype={R:null,center:null,extents:null,__class__:Zs};var cm=function(a,b,c){null==c&&(c=1);this.p1=new N;this.p2=new N;if(null!=a){var d=this.p1;d.x=a.x;d.y=a.y}null!=b&&(a=this.p2,a.x=b.x,a.y=b.y);this.maxFraction=c};h["box2D.collision.B2RayCastInput"]=cm;cm.__name__="box2D.collision.B2RayCastInput";cm.prototype={p1:null,p2:null,maxFraction:null,__class__:cm};var Mp=
function(){this.normal=new N};h["box2D.collision.B2RayCastOutput"]=Mp;Mp.__name__="box2D.collision.B2RayCastOutput";Mp.prototype={normal:null,fraction:null,__class__:Mp};var Ff=function(){this.m_localPoint=new N;this.m_axis=new N};h["box2D.collision.B2SeparationFunction"]=Ff;Ff.__name__="box2D.collision.B2SeparationFunction";Ff.prototype={initialize:function(a,b,c,d,e){this.m_proxyA=b;this.m_proxyB=d;b=a.count;ha.b2Assert(0<b&&3>b);var f=new N,g=new N;if(1==b){this.m_type=Ff.e_points;f=this.m_proxyA.getVertex(a.indexA[0]);
g=this.m_proxyB.getVertex(a.indexB[0]);var k=f;var l=c.R;f=c.position.x+(l.col1.x*k.x+l.col2.x*k.y);c=c.position.y+(l.col1.y*k.x+l.col2.y*k.y);k=g;l=e.R;g=e.position.x+(l.col1.x*k.x+l.col2.x*k.y);e=e.position.y+(l.col1.y*k.x+l.col2.y*k.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=Ff.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=P.crossVF(P.subtractVV(d,b),1),this.m_axis.normalize(),k=this.m_axis,l=c.R,b=l.col1.x*k.x+l.col2.x*k.y,d=l.col1.y*k.x+l.col2.y*k.y,k=this.m_localPoint,l=c.R,f=c.position.x+(l.col1.x*k.x+l.col2.x*k.y),c=c.position.y+(l.col1.y*k.x+l.col2.y*k.y),k=g,l=e.R,g=e.position.x+(l.col1.x*k.x+l.col2.x*k.y),e=e.position.y+(l.col1.y*k.x+l.col2.y*k.y),0>(g-f)*b+(e-c)*d&&(e=this.m_axis,e.x=-e.x,e.y=-e.y);else if(a.indexA[0]==a.indexA[0])this.m_type=Ff.e_faceB,l=this.m_proxyB.getVertex(a.indexB[0]),
k=this.m_proxyB.getVertex(a.indexB[1]),f=this.m_proxyA.getVertex(a.indexA[0]),this.m_localPoint.x=.5*(l.x+k.x),this.m_localPoint.y=.5*(l.y+k.y),this.m_axis=P.crossVF(P.subtractVV(k,l),1),this.m_axis.normalize(),k=this.m_axis,l=e.R,b=l.col1.x*k.x+l.col2.x*k.y,d=l.col1.y*k.x+l.col2.y*k.y,k=this.m_localPoint,l=e.R,g=e.position.x+(l.col1.x*k.x+l.col2.x*k.y),e=e.position.y+(l.col1.y*k.x+l.col2.y*k.y),k=f,l=c.R,f=c.position.x+(l.col1.x*k.x+l.col2.x*k.y),c=c.position.y+(l.col1.y*k.x+l.col2.y*k.y),0>(f-g)*
b+(c-e)*d&&(e=this.m_axis,e.x=-e.x,e.y=-e.y);else{b=this.m_proxyA.getVertex(a.indexA[0]);d=this.m_proxyA.getVertex(a.indexA[1]);l=this.m_proxyB.getVertex(a.indexB[0]);k=this.m_proxyB.getVertex(a.indexB[1]);P.mulX(c,f,!0);f=P.mulMV(c.R,P.subtractVVPooled(d,b),!0);P.mulX(e,g,!0);a=P.mulMV(e.R,P.subtractVVPooled(k,l),!0);e=f.x*f.x+f.y*f.y;c=a.x*a.x+a.y*a.y;var m=P.subtractVVPooled(a,f);g=f.x*m.x+f.y*m.y;m=a.x*m.x+a.y*m.y;f=f.x*a.x+f.y*a.y;var z=e*c-f*f;a=0;0!=z&&(a=P.clamp((f*m-g*c)/z,0,1));0>(f*a+m)/
c&&(a=P.clamp((f-g)/e,0,1));f=new N;f.x=b.x+a*(d.x-b.x);f.y=b.y+a*(d.y-b.y);g=new N;g.x=l.x+a*(k.x-l.x);g.y=l.y+a*(k.y-l.y);0==a||1==a?(this.m_type=Ff.e_faceB,this.m_axis=P.crossVF(P.subtractVV(k,l),1),this.m_axis.normalize(),this.m_localPoint=g):(this.m_type=Ff.e_faceA,this.m_axis=P.crossVF(P.subtractVV(d,b),1),this.m_localPoint=f);0>a&&(e=this.m_axis,e.x=-e.x,e.y=-e.y)}},evaluate:function(a,b){var c;if(this.m_type==Ff.e_points){var d=P.mulTMV(a.R,this.m_axis,!0);var e=P.mulTMV(b.R,this.m_axis.getNegativePooled(),
!0);d=this.m_proxyA.getSupportVertex(d);e=this.m_proxyB.getSupportVertex(e);a=P.mulX(a,d,!0);b=P.mulX(b,e,!0);return c=(b.x-a.x)*this.m_axis.x+(b.y-a.y)*this.m_axis.y}if(this.m_type==Ff.e_faceA)return c=P.mulMV(a.R,this.m_axis,!0),a=P.mulX(a,this.m_localPoint,!0),e=P.mulTMV(b.R,c.getNegativePooled()),e=this.m_proxyB.getSupportVertex(e),b=P.mulX(b,e,!0),c=(b.x-a.x)*c.x+(b.y-a.y)*c.y;if(this.m_type==Ff.e_faceB)return c=P.mulMV(b.R,this.m_axis,!0),b=P.mulX(b,this.m_localPoint,!0),d=P.mulTMV(a.R,c.getNegativePooled(),
!0),d=this.m_proxyA.getSupportVertex(d),a=P.mulX(a,d,!0),c=(a.x-b.x)*c.x+(a.y-b.y)*c.y;ha.b2Assert(!1);return 0},m_proxyA:null,m_proxyB:null,m_type:null,m_localPoint:null,m_axis:null,__class__:Ff};var fm=function(){this.useCache=!1;this.indexA=[];this.indexB=[]};h["box2D.collision.B2SimplexCache"]=fm;fm.__name__="box2D.collision.B2SimplexCache";fm.prototype={metric:null,count:null,indexA:null,indexB:null,useCache:null,__class__:fm};var Np=function(){this.proxyA=new We;this.proxyB=new We;this.sweepA=
new Sh;this.sweepB=new Sh};h["box2D.collision.B2TOIInput"]=Np;Np.__name__="box2D.collision.B2TOIInput";Np.prototype={proxyA:null,proxyB:null,sweepA:null,sweepB:null,tolerance:null,__class__:Np};var xf=function(a,b){this.position=new N;this.R=new Qc;if(null!=a){var c=this.position;c.x=a.x;c.y=a.y;this.R.setM(b)}};h["box2D.common.math.B2Transform"]=xf;xf.__name__="box2D.common.math.B2Transform";xf.prototype={initialize:function(a,b){var c=this.position;c.x=a.x;c.y=a.y;this.R.setM(b)},setIdentity:function(){var a=
this.position;a.x=0;a.y=0;this.R.setIdentity()},set:function(a){var b=this.position,c=a.position;b.x=c.x;b.y=c.y;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},position:null,R:null,__class__:xf};var Qc=function(){this.col1=new N(0,1);this.col2=new N(0,1)};h["box2D.common.math.B2Mat22"]=Qc;Qc.__name__="box2D.common.math.B2Mat22";Qc.fromAngle=function(a){var b=new Qc;b.set(a);return b};Qc.fromVV=
function(a,b){var c=new Qc;c.setVV(a,b);return c};Qc.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){var c=this.col1;c.x=a.x;c.y=a.y;a=this.col2;a.x=b.x;a.y=b.y},copy:function(){var a=new Qc;a.setM(this);return a},setM:function(a){var b=this.col1,c=a.col1;b.x=c.x;b.y=c.y;b=this.col2;a=a.col2;b.x=a.x;b.y=a.y},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 N(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()},col1:null,col2:null,__class__:Qc};var Fb=function(){};h["box2D.collision.B2TimeOfImpact"]=Fb;Fb.__name__="box2D.collision.B2TimeOfImpact";Fb.timeOfImpact=function(a){++Fb.b2_toiCalls;var b=a.proxyA,c=a.proxyB,
d=a.sweepA,e=a.sweepB;ha.b2Assert(d.t0==e.t0);ha.b2Assert(1-d.t0>Number.MIN_VALUE);var f=b.m_radius+c.m_radius;a=a.tolerance;var g=0,k=0,l=0;Fb.s_cache.count=0;for(Fb.s_distanceInput.useRadii=!1;;){d.getTransform(Fb.s_xfA,g);e.getTransform(Fb.s_xfB,g);Fb.s_distanceInput.proxyA=b;Fb.s_distanceInput.proxyB=c;Fb.s_distanceInput.transformA=Fb.s_xfA;Fb.s_distanceInput.transformB=Fb.s_xfB;ed.distance(Fb.s_distanceOutput,Fb.s_cache,Fb.s_distanceInput);if(0>=Fb.s_distanceOutput.distance){g=1;break}Fb.s_fcn.initialize(Fb.s_cache,
b,Fb.s_xfA,c,Fb.s_xfB);var m=Fb.s_fcn.evaluate(Fb.s_xfA,Fb.s_xfB);if(0>=m){g=1;break}0==k&&(l=m>f?P.max(f-a,.75*f):P.max(m-a,.02*f));if(m-l<.5*a){if(0==k){g=1;break}break}var z=g,n=g,p=1;d.getTransform(Fb.s_xfA,p);e.getTransform(Fb.s_xfB,p);var h=Fb.s_fcn.evaluate(Fb.s_xfA,Fb.s_xfB);if(h>=l){g=1;break}for(var q=0;;){var t=0!=(q&1)?n+(l-m)*(p-n)/(h-m):.5*(n+p);d.getTransform(Fb.s_xfA,t);e.getTransform(Fb.s_xfB,t);var r=Fb.s_fcn.evaluate(Fb.s_xfA,Fb.s_xfB);if(P.abs(r-l)<.025*a){z=t;break}r>l?(n=t,m=
r):(p=t,h=r);++q;++Fb.b2_toiRootIters;if(50==q)break}Fb.b2_toiMaxRootIters=P.max(Fb.b2_toiMaxRootIters,q)|0;if(z<(1+100*Number.MIN_VALUE)*g)break;g=z;++k;++Fb.b2_toiIters;if(1E3==k)break}Fb.b2_toiMaxIters=P.max(Fb.b2_toiMaxIters,k)|0;return g};var Hk=function(){this.m_normal=new N;this.m_points=[];for(var a=0,b=ha.b2_maxManifoldPoints;a<b;){var c=a++;this.m_points[c]=new N}};h["box2D.collision.B2WorldManifold"]=Hk;Hk.__name__="box2D.collision.B2WorldManifold";Hk.prototype={reset:function(){this.m_normal=
new N;this.m_points=[];for(var a=0,b=ha.b2_maxManifoldPoints;a<b;){var c=a++;this.m_points[c]=new N}},initialize:function(a,b,c,d,e){if(0!=a.m_pointCount){this.m_normal=new N;this.m_points=[];for(var f=0,g=ha.b2_maxManifoldPoints;f<g;){var k=f++;this.m_points[k]=new N}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;b=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;d=d.position.y+g.col1.y*f.x+
g.col2.y*f.y;f=a-k;g=d-b;var l=f*f+g*g;l>Number.MIN_VALUE*Number.MIN_VALUE?(l=Math.sqrt(l),this.m_normal.x=f/l,this.m_normal.y=g/l):(this.m_normal.x=1,this.m_normal.y=0);f=b+c*this.m_normal.y;d-=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*(f+d);break;case 2:g=b.R;f=a.m_localPlaneNormal;k=g.col1.x*f.x+g.col2.x*f.y;l=g.col1.y*f.x+g.col2.y*f.y;g=b.R;f=a.m_localPoint;var m=b.position.x+g.col1.x*f.x+g.col2.x*f.y;var z=b.position.y+g.col1.y*
f.x+g.col2.y*f.y;this.m_normal.x=k;this.m_normal.y=l;b=0;for(var n=a.m_pointCount;b<n;){var p=b++;g=d.R;f=a.m_points[p].m_localPoint;var h=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[p].x=h+.5*(c-(h-m)*k-(f-z)*l-e)*k;this.m_points[p].y=f+.5*(c-(h-m)*k-(f-z)*l-e)*l}break;case 4:for(g=d.R,f=a.m_localPlaneNormal,k=g.col1.x*f.x+g.col2.x*f.y,l=g.col1.y*f.x+g.col2.y*f.y,g=d.R,f=a.m_localPoint,m=d.position.x+g.col1.x*f.x+g.col2.x*f.y,z=d.position.y+g.col1.y*
f.x+g.col2.y*f.y,this.m_normal.x=-k,this.m_normal.y=-l,d=0,n=a.m_pointCount;d<n;)p=d++,g=b.R,f=a.m_points[p].m_localPoint,h=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[p].x=h+.5*(e-(h-m)*k-(f-z)*l-c)*k,this.m_points[p].y=f+.5*(e-(h-m)*k-(f-z)*l-c)*l}}},getPoint:function(){return 0==this.m_points.length?null:1==this.m_points.length?this.m_points[0]:new N((this.m_points[0].x+this.m_points[1].x)/2,(this.m_points[0].y+this.m_points[1].y)/2)},m_normal:null,
m_points:null,__class__:Hk};var dc=function(){this.m_type=-1;this.m_radius=ha.b2_linearSlop};h["box2D.collision.shapes.B2Shape"]=dc;dc.__name__="box2D.collision.shapes.B2Shape";dc.testOverlap=function(a,b,c,d){dc.initialized||(dc.distanceInput.proxyA=dc.proxyA,dc.distanceInput.proxyB=dc.proxyB,dc.distanceInput.useRadii=!0,dc.initialized=!0);dc.proxyA.set(a);dc.proxyB.set(c);dc.distanceInput.transformA=b;dc.distanceInput.transformB=d;dc.simplexCache.count=0;ed.distance(dc.distanceOutput,dc.simplexCache,
dc.distanceInput);return dc.distanceOutput.distance<10*Number.MIN_VALUE};dc.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},m_type:null,m_radius:null,__class__:dc};var cd=function(a){null==a&&(a=0);dc.call(this);this.m_p=new N;this.m_type=0;this.m_radius=
a};h["box2D.collision.shapes.B2CircleShape"]=cd;cd.__name__="box2D.collision.shapes.B2CircleShape";cd.__super__=dc;cd.prototype=w(dc.prototype,{copy:function(){var a=new cd;a.set(this);return a},set:function(a){dc.prototype.set.call(this,a);if(a instanceof cd){var b=L.__cast(a,cd);a=this.m_p;b=b.m_p;a.x=b.x;a.y=b.y}},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);a=a.position.y+(c.col1.y*this.m_p.x+c.col2.y*this.m_p.y);d=b.x-d;a=b.y-a;return d*d+a*a<=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));d=b.p2.x-b.p1.x;var f=b.p2.y-b.p1.y,g=e*d+c*f,k=d*d+f*f,l=g*g-k*(e*e+c*c-this.m_radius*this.m_radius);if(0>l||k<Number.MIN_VALUE)return!1;g=-(g+Math.sqrt(l));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);b=b.position.y+(c.col1.y*this.m_p.x+c.col2.y*this.m_p.y);c=a.lowerBound;var e=d-this.m_radius,f=b-this.m_radius;null==f&&(f=0);null==e&&(e=0);c.x=e;c.y=f;a=a.upperBound;d+=this.m_radius;b+=this.m_radius;null==b&&(b=0);null==d&&(d=0);a.x=d;a.y=b},computeMass:function(a,b){a.mass=b*ha.b2_pi*this.m_radius*this.m_radius;b=a.center;var c=this.m_p;b.x=c.x;b.y=c.y;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=P.mulX(c,this.m_p,!0);var e=-(P.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){var b=this.m_p;b.x=a.x;b.y=a.y},getRadius:function(){return this.m_radius},
setRadius:function(a){this.m_radius=a},m_p:null,__class__:cd});var Ug=function(a,b){dc.call(this);this.s_supportVec=new N;new N;new N;this.m_v0=new N;this.m_v3=new N;this.m_hasVertex3=this.m_hasVertex0=!1;this.m_coreV1=new N;this.m_coreV2=new N;this.m_normal=new N;this.m_direction=new N;this.m_cornerDir1=new N;this.m_cornerDir2=new N;this.m_type=2;this.m_nextEdge=this.m_prevEdge=null;this.m_v1=a;this.m_v2=b;a=this.m_direction;b=this.m_v2.x-this.m_v1.x;var c=this.m_v2.y-this.m_v1.y;null==c&&(c=0);
null==b&&(b=0);a.x=b;a.y=c;this.m_length=this.m_direction.normalize();a=this.m_normal;b=this.m_direction.y;c=-this.m_direction.x;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a=this.m_coreV1;b=-ha.b2_toiSlop*(this.m_normal.x-this.m_direction.x)+this.m_v1.x;c=-ha.b2_toiSlop*(this.m_normal.y-this.m_direction.y)+this.m_v1.y;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a=this.m_coreV2;b=-ha.b2_toiSlop*(this.m_normal.x+this.m_direction.x)+this.m_v2.x;c=-ha.b2_toiSlop*(this.m_normal.y+this.m_direction.y)+this.m_v2.y;
null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;this.m_cornerDir1=this.m_normal;a=this.m_cornerDir2;b=-this.m_normal.x;c=-this.m_normal.y;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c};h["box2D.collision.shapes.B2EdgeShape"]=Ug;Ug.__name__="box2D.collision.shapes.B2EdgeShape";Ug.__super__=dc;Ug.prototype=w(dc.prototype,{testPoint:function(a,b){return!1},rayCast:function(a,b,c){var d=b.p2.x-b.p1.x,e=b.p2.y-b.p1.y,f=c.R,g=c.position.x+(f.col1.x*this.m_v1.x+f.col2.x*this.m_v1.y),k=c.position.y+(f.col1.y*this.m_v1.x+
f.col2.y*this.m_v1.y),l=c.position.y+(f.col1.y*this.m_v2.x+f.col2.y*this.m_v2.y)-k;c=-(c.position.x+(f.col1.x*this.m_v2.x+f.col2.x*this.m_v2.y)-g);f=100*Number.MIN_VALUE;var m=-(d*l+e*c);if(m>f){g=b.p1.x-g;var z=b.p1.y-k;k=g*l+z*c;if(0<=k&&k<=b.maxFraction*m&&(b=-d*z+e*g,-f*m<=b&&b<=m*(1+f)))return a.fraction=k/m,b=Math.sqrt(l*l+c*c),a.normal.x=l/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);b=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<b?(a.lowerBound.y=e,a.upperBound.y=b):(a.lowerBound.y=b,a.upperBound.y=e)},computeMass:function(a,b){a.mass=0;b=a.center;var c=this.m_v1;b.x=c.x;b.y=c.y;a.I=0},computeSubmergedArea:function(a,b,c,d){var e=new N(a.x*b,a.y*b),f=P.mulX(c,this.m_v1,!0);c=P.mulX(c,this.m_v2,!0);var g=P.dot(a,
f)-b;a=P.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 N(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},s_supportVec:null,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 Ug(this.m_v1,this.m_v2);a.set(this);var b=L.__cast(a,Ug),c=b.m_v0,d=this.m_v0;c.x=d.x;c.y=d.y;c=b.m_v3;d=this.m_v3;c.x=d.x;c.y=d.y;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},m_v1:null,m_v2:null,m_v0:null,m_v3:null,m_hasVertex0:null,
m_hasVertex3:null,m_coreV1:null,m_coreV2:null,m_length:null,m_normal:null,m_direction:null,m_cornerDir1:null,m_cornerDir2:null,m_cornerConvex1:null,m_cornerConvex2:null,m_nextEdge:null,m_prevEdge:null,__class__:Ug});var Ik=function(){this.mass=0;this.center=new N(0,0);this.I=0};h["box2D.collision.shapes.B2MassData"]=Ik;Ik.__name__="box2D.collision.shapes.B2MassData";Ik.prototype={mass:null,center:null,I:null,__class__:Ik};var Lb=function(){dc.call(this);this.m_type=1;this.m_centroid=new N;this.m_vertices=
[];this.m_normals=[]};h["box2D.collision.shapes.B2PolygonShape"]=Lb;Lb.__name__="box2D.collision.shapes.B2PolygonShape";Lb.asArray=function(a,b){var c=new Lb;c.setAsArray(a,b);return c};Lb.asVector=function(a,b){var c=new Lb;c.setAsVector(a,b);return c};Lb.asBox=function(a,b){var c=new Lb;c.setAsBox(a,b);return c};Lb.asOrientedBox=function(a,b,c,d){null==d&&(d=0);var e=new Lb;e.setAsOrientedBox(a,b,c,d);return e};Lb.asEdge=function(a,b){var c=new Lb;c.setAsEdge(a,b);return c};Lb.computeCentroid=function(a,
b){for(var c=new N,d=0,e=0;e<b;){var f=e++,g=a[f];f=f+1<b?a[f+1|0]:a[0];var k=.5*((g.x-0)*(f.y-0)-(g.y-0)*(f.x-0));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};Lb.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;){var g=e++,k=d[g-1|0],l=d[g].x-k.x,m=d[g].y-k.y;g=Math.sqrt(l*l+m*m);l/=g;m/=g;for(var z=-m,n=l,p=g=Number.MAX_VALUE,h=-Number.MAX_VALUE,q=-Number.MAX_VALUE,t=
0,r=c;t<r;){var u=t++,x=d[u].x-k.x,w=d[u].y-k.y;u=l*x+m*w;x=z*x+n*w;u<g&&(g=u);x<p&&(p=x);u>h&&(h=u);x>q&&(q=x)}t=(h-g)*(q-p);t<.95*b&&(b=t,a.R.col1.x=l,a.R.col1.y=m,a.R.col2.x=z,a.R.col2.y=n,l=.5*(g+h),m=.5*(p+q),z=a.R,a.center.x=k.x+(z.col1.x*l+z.col2.x*m),a.center.y=k.y+(z.col1.y*l+z.col2.y*m),a.extents.x=.5*(h-g),a.extents.y=.5*(q-p))}};Lb.__super__=dc;Lb.prototype=w(dc.prototype,{copy:function(){var a=new Lb;a.set(this);return a},set:function(a){dc.prototype.set.call(this,a);if(a instanceof Lb){a=
L.__cast(a,Lb);var b=this.m_centroid,c=a.m_centroid;b.x=c.x;b.y=c.y;this.m_vertexCount=a.m_vertexCount;this.reserve(this.m_vertexCount);b=0;for(c=this.m_vertexCount;b<c;){var d=b++,e=this.m_vertices[d],f=a.m_vertices[d];e.x=f.x;e.y=f.y;e=this.m_normals[d];d=a.m_normals[d];e.x=d.x;e.y=d.y}}},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);ha.b2Assert(2<=b);this.m_vertexCount=
b;this.reserve(b);b=0;for(var c=this.m_vertexCount;b<c;){var d=b++,e=this.m_vertices[d];d=a[d];e.x=d.x;e.y=d.y}a=0;for(b=this.m_vertexCount;a<b;)c=a++,d=P.subtractVVPooled(this.m_vertices[c+1<this.m_vertexCount?c+1:0],this.m_vertices[c]),ha.b2Assert(d.lengthSquared()>Number.MIN_VALUE),e=this.m_normals[c],d=P.crossVF(d,1),e.x=d.x,e.y=d.y,this.m_normals[c].normalize();this.m_centroid=Lb.computeCentroid(this.m_vertices,this.m_vertexCount)},setAsBox:function(a,b){this.m_vertexCount=4;this.reserve(4);
var c=this.m_vertices[0],d=-a,e=-b;null==e&&(e=0);null==d&&(d=0);c.x=d;c.y=e;c=this.m_vertices[1];d=a;e=-b;null==e&&(e=0);null==d&&(d=0);c.x=d;c.y=e;c=this.m_vertices[2];d=a;e=b;null==e&&(e=0);null==d&&(d=0);c.x=d;c.y=e;c=this.m_vertices[3];a=-a;null==b&&(b=0);null==a&&(a=0);c.x=a;c.y=b;b=this.m_normals[0];a=0;c=-1;null==c&&(c=0);null==a&&(a=0);b.x=a;b.y=c;b=this.m_normals[1];a=1;c=0;null==c&&(c=0);null==a&&(a=0);b.x=a;b.y=c;b=this.m_normals[2];a=0;c=1;null==c&&(c=0);null==a&&(a=0);b.x=a;b.y=c;b=
this.m_normals[3];a=-1;c=0;null==c&&(c=0);null==a&&(a=0);b.x=a;b.y=c;b=this.m_centroid;b.x=0;b.y=0},setAsOrientedBox:function(a,b,c,d){null==d&&(d=0);this.m_vertexCount=4;this.reserve(4);var e=this.m_vertices[0],f=-a,g=-b;null==g&&(g=0);null==f&&(f=0);e.x=f;e.y=g;e=this.m_vertices[1];f=a;g=-b;null==g&&(g=0);null==f&&(f=0);e.x=f;e.y=g;e=this.m_vertices[2];f=a;g=b;null==g&&(g=0);null==f&&(f=0);e.x=f;e.y=g;e=this.m_vertices[3];a=-a;null==b&&(b=0);null==a&&(a=0);e.x=a;e.y=b;b=this.m_normals[0];a=0;e=
-1;null==e&&(e=0);null==a&&(a=0);b.x=a;b.y=e;b=this.m_normals[1];a=1;e=0;null==e&&(e=0);null==a&&(a=0);b.x=a;b.y=e;b=this.m_normals[2];a=0;e=1;null==e&&(e=0);null==a&&(a=0);b.x=a;b.y=e;b=this.m_normals[3];a=-1;e=0;null==e&&(e=0);null==a&&(a=0);b.x=a;b.y=e;this.m_centroid=c;b=new xf;b.position=c;b.R.set(d);c=0;for(d=this.m_vertexCount;c<d;)a=c++,this.m_vertices[a]=P.mulX(b,this.m_vertices[a]),this.m_normals[a]=P.mulMV(b.R,this.m_normals[a])},setAsEdge:function(a,b){this.m_vertexCount=2;this.reserve(2);
var c=this.m_vertices[0];c.x=a.x;c.y=a.y;c=this.m_vertices[1];c.x=b.x;c.y=b.y;this.m_centroid.x=.5*(a.x+b.x);this.m_centroid.y=.5*(a.y+b.y);this.m_normals[0]=P.crossVF(P.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=a.R;var d=b.x-a.position.x;a=b.y-a.position.y;b=d*c.col1.x+a*c.col1.y;for(var e=d*c.col2.x+a*c.col2.y,f=0,g=this.m_vertexCount;f<g;){var k=f++;c=this.m_vertices[k];d=b-c.x;
a=e-c.y;c=this.m_normals[k];if(0<c.x*d+c.y*a)return!1}return!0},rayCast:function(a,b,c){var d=0,e=b.maxFraction,f=b.p1.x-c.position.x,g=b.p1.y-c.position.y,k=c.R,l=f*k.col1.x+g*k.col1.y,m=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-l;k=f*k.col2.x+g*k.col2.y-m;for(var z=-1,n=0,p=this.m_vertexCount;n<p;){var h=n++;var q=this.m_vertices[h];f=q.x-l;g=q.y-m;q=this.m_normals[h];f=q.x*f+q.y*g;q=q.x*b+q.y*k;if(0==q){if(0>f)return!1}else 0>q&&f<d*q?(d=f/
q,z=h):0<q&&f<e*q&&(e=f/q);if(e<d-Number.MIN_VALUE)return!1}return 0<=z?(a.fraction=d,k=c.R,q=this.m_normals[z],a.normal.x=k.col1.x*q.x+k.col2.x*q.y,a.normal.y=k.col1.y*q.x+k.col2.y*q.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,l=1,m=this.m_vertexCount;l<m;){var z=l++;d=this.m_vertices[z];z=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=e<
z?e:z;f=f<d?f:d;g=g>z?g:z;k=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 l=g++,m=this.m_vertices[l],z=l+1<this.m_vertexCount?this.m_vertices[l+1|0]:this.m_vertices[0],
n=m.x-0,p=m.y-0,h=z.x-0,q=z.y-0;l=n*q-p*h;var t=.5*l;e+=t;c+=.3333333333333333*t*(0+m.x+z.x);d+=.3333333333333333*t*(0+m.y+z.y);m=n;f+=l*(.3333333333333333*(.25*(m*m+h*m+h*h)+(0*m+0*h))+0+(.3333333333333333*(.25*(p*p+q*p+q*q)+(0*p+0*q))+0))}a.mass=b*e;g=a.center;c*=1/e;d*=1/e;null==d&&(d=0);null==c&&(c=0);g.x=c;g.y=d;a.I=b*f}},computeSubmergedArea:function(a,b,c,d){var e=P.mulTMV(c.R,a,!0),f=b-P.dot(a,c.position),g=[],k=0;a=b=-1;for(var l=!1,m=0,z=this.m_vertexCount;m<z;){var n=m++;g[n]=P.dot(e,this.m_vertices[n])-
f;var p=g[n]<-Number.MIN_VALUE;0<n&&(p?l||(b=n-1,++k):l&&(a=n-1,++k));l=p}switch(k){case 0:return l?(a=new Ik,this.computeMass(a,1),c=P.mulX(c,a.center),d.x=c.x,d.y=c.y,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 N(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);g=new N(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);a=0;k=new N;l=this.m_vertices[f];for(m=f;m!=e;)m=(m+1)%this.m_vertexCount,f=m==e?g:this.m_vertices[m],z=.5*((l.x-b.x)*(f.y-b.y)-(l.y-b.y)*(f.x-b.x)),a+=z,k.x+=z*(b.x+l.x+f.x)/3,k.y+=z*(b.y+l.y+f.y)/3,l=f;k.multiply(1/a);c=P.mulX(c,k);d.x=c.x;d.y=c.y;return a},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 N;this.m_normals[c]=
new N}},m_centroid:null,m_vertices:null,m_normals:null,m_vertexCount:null,__class__:Lb});var gm=function(a,b,c){this._r=255*P.clamp(a,0,1)|0;this._g=255*P.clamp(b,0,1)|0;this._b=255*P.clamp(c,0,1)|0};h["box2D.common.B2Color"]=gm;gm.__name__="box2D.common.B2Color";gm.prototype={set:function(a,b,c){this._r=255*P.clamp(a,0,1)|0;this._g=255*P.clamp(b,0,1)|0;this._b=255*P.clamp(c,0,1)|0},r:null,g:null,b:null,color:null,set_r:function(a){return this._r=255*P.clamp(a,0,1)|0},set_g:function(a){return this._g=
255*P.clamp(a,0,1)|0},set_b:function(a){return this._b=255*P.clamp(a,0,1)|0},get_color:function(){return this._r<<16|this._g<<8|this._b},_r:null,_g:null,_b:null,__class__:gm,__properties__:{get_color:"get_color",set_b:"set_b",set_g:"set_g",set_r:"set_r"}};var ha=function(){};h["box2D.common.B2Settings"]=ha;ha.__name__="box2D.common.B2Settings";ha.b2MixFriction=function(a,b){return Math.sqrt(a*b)};ha.b2MixRestitution=function(a,b){return a>b?a:b};ha.b2Assert=function(a){if(!a)throw new E("Assertion Failed");
};var Ai=function(a,b,c){this.col1=new yf;this.col2=new yf;this.col3=new yf;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))};h["box2D.common.math.B2Mat33"]=Ai;Ai.__name__="box2D.common.math.B2Mat33";Ai.prototype={setVVV:function(a,b,c){this.col1.setV(a);this.col2.setV(b);this.col3.setV(c)},copy:function(){return new Ai(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,l=this.col2.y,m=this.col2.z,z=this.col3.x,n=this.col3.y,p=this.col3.z,h=e*(l*p-m*n)+f*(m*z-k*p)+g*(k*n-l*z);0!=h&&(h=1/h);a.x=h*(b*(l*p-m*n)+c*(m*z-k*p)+d*(k*n-l*z));a.y=h*(e*(c*p-d*n)+f*(d*z-b*p)+g*(b*n-c*z));a.z=h*(e*(l*d-m*c)+f*(m*
b-k*d)+g*(k*c-l*b));return a},col1:null,col2:null,col3:null,__class__:Ai};var P=function(){};h["box2D.common.math.B2Math"]=P;P.__name__="box2D.common.math.B2Math";P.__properties__={get_MIN_VALUE:"get_MIN_VALUE",get_MAX_VALUE:"get_MAX_VALUE"};P.isValid=function(a){return isNaN(a)||-Infinity==a||Infinity==a?!1:!0};P.dot=function(a,b){return a.x*b.x+a.y*b.y};P.crossVV=function(a,b){return a.x*b.y-a.y*b.x};P.crossVF=function(a,b,c){null==c&&(c=!1);if(c){c=N.getFromPool();var d=b*a.y;a=-b*a.x;null==a&&
(a=0);null==d&&(d=0);c.x=d;c.y=a}else c=new N(b*a.y,-b*a.x);return c};P.crossFV=function(a,b,c){null==c&&(c=!1);if(c){c=N.getFromPool();var d=-a*b.y;a*=b.x;null==a&&(a=0);null==d&&(d=0);c.x=d;c.y=a}else c=new N(-a*b.y,a*b.x);return c};P.mulMV=function(a,b,c){null==c&&(c=!1);if(c){c=N.getFromPool();var d=a.col1.x*b.x+a.col2.x*b.y;a=a.col1.y*b.x+a.col2.y*b.y;null==a&&(a=0);null==d&&(d=0);c.x=d;c.y=a}else c=new N(a.col1.x*b.x+a.col2.x*b.y,a.col1.y*b.x+a.col2.y*b.y);return c};P.mulTMV=function(a,b,c){null==
c&&(c=!1);if(c){c=N.getFromPool();var d=P.dot(b,a.col1);a=P.dot(b,a.col2);null==a&&(a=0);null==d&&(d=0);c.x=d;c.y=a}else c=new N(P.dot(b,a.col1),P.dot(b,a.col2));return c};P.mulX=function(a,b,c){null==c&&(c=!1);b=P.mulMV(a.R,b,c);b.x+=a.position.x;b.y+=a.position.y;return b};P.mulXT=function(a,b,c){b=P.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};P.addVV=function(a,b){return new N(a.x+b.x,a.y+b.y)};P.subtractVV=function(a,b){return new N(a.x-
b.x,a.y-b.y)};P.subtractVVPooled=function(a,b){var c=N.getFromPool(),d=a.x-b.x;a=a.y-b.y;null==a&&(a=0);null==d&&(d=0);c.x=d;c.y=a;return c};P.distance=function(a,b){var c=a.x-b.x;a=a.y-b.y;return Math.sqrt(c*c+a*a)};P.distanceSquared=function(a,b){var c=a.x-b.x;a=a.y-b.y;return c*c+a*a};P.mulFV=function(a,b){return new N(a*b.x,a*b.y)};P.addMM=function(a,b){return Qc.fromVV(P.addVV(a.col1,b.col1),P.addVV(a.col2,b.col2))};P.mulMM=function(a,b){return Qc.fromVV(P.mulMV(a,b.col1),P.mulMV(a,b.col2))};
P.mulTMM=function(a,b){var c=new N(P.dot(a.col1,b.col1),P.dot(a.col2,b.col1));a=new N(P.dot(a.col1,b.col2),P.dot(a.col2,b.col2));return Qc.fromVV(c,a)};P.abs=function(a){return 0<a?a:-a};P.absV=function(a){return new N(P.abs(a.x),P.abs(a.y))};P.absM=function(a){return Qc.fromVV(P.absV(a.col1),P.absV(a.col2))};P.min=function(a,b){return a<b?a:b};P.minV=function(a,b){return new N(P.min(a.x,b.x),P.min(a.y,b.y))};P.max=function(a,b){return a>b?a:b};P.maxV=function(a,b){return new N(P.max(a.x,b.x),P.max(a.y,
b.y))};P.clamp=function(a,b,c){return a<b?b:a>c?c:a};P.clampV=function(a,b,c){return P.maxV(b,P.minV(a,c))};P.swap=function(a,b){var c=a[0];a[0]=b[0];b[0]=c};P.random=function(){return 2*Math.random()-1};P.randomRange=function(a,b){return(b-a)*Math.random()+a};P.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};P.isPowerOfTwo=function(a){return 0<a&&0==(a&a-1)};P.get_MAX_VALUE=function(){return Number.MAX_VALUE};P.get_MIN_VALUE=
function(){return Number.MIN_VALUE};var Sh=function(){this.localCenter=new N;this.c0=new N;this.c=new N};h["box2D.common.math.B2Sweep"]=Sh;Sh.__name__="box2D.common.math.B2Sweep";Sh.prototype={set:function(a){var b=this.localCenter,c=a.localCenter;b.x=c.x;b.y=c.y;b=this.c0;c=a.c0;b.x=c.x;b.y=c.y;b=this.c;c=a.c;b.x=c.x;b.y=c.y;this.a0=a.a0;this.a=a.a;this.t0=a.t0},copy:function(){var a=new Sh,b=a.localCenter,c=this.localCenter;b.x=c.x;b.y=c.y;b=a.c0;c=this.c0;b.x=c.x;b.y=c.y;b=a.c;c=this.c;b.x=c.x;
b.y=c.y;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);b=a.R;a.position.x-=b.col1.x*this.localCenter.x+b.col2.x*this.localCenter.y;a.position.y-=b.col1.y*this.localCenter.x+b.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}},localCenter:null,c0:null,c:null,a0:null,a:null,t0:null,__class__:Sh};var yf=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};h["box2D.common.math.B2Vec3"]=yf;yf.__name__="box2D.common.math.B2Vec3";yf.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 yf(-this.x,-this.y,-this.z)},negativeSelf:function(){this.x=
-this.x;this.y=-this.y;this.z=-this.z},copy:function(){return new yf(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},x:null,y:null,z:null,__class__:yf};var wa=function(a,b){this.m_xf=new xf;this.m_sweep=new Sh;this.m_linearVelocity=new N;this.m_force=new N;this.m_flags=0;a.bullet&&(this.m_flags|=wa.e_bulletFlag);a.fixedRotation&&(this.m_flags|=wa.e_fixedRotationFlag);
a.allowSleep&&(this.m_flags|=wa.e_allowSleepFlag);a.awake&&(this.m_flags|=wa.e_awakeFlag);a.active&&(this.m_flags|=wa.e_activeFlag);a.ignoreGravity&&(this.m_flags|=wa.e_ignoreGravityFlag);this.m_world=b;b=this.m_xf.position;var c=a.position;b.x=c.x;b.y=c.y;this.m_xf.R.set(a.angle);b=this.m_sweep.localCenter;b.x=0;b.y=0;this.m_sweep.t0=1;this.m_sweep.a0=this.m_sweep.a=a.angle;b=this.m_xf.R;c=this.m_sweep.localCenter;this.m_sweep.c.x=b.col1.x*c.x+b.col2.x*c.y;this.m_sweep.c.y=b.col1.y*c.x+b.col2.y*
c.y;this.m_sweep.c.x+=this.m_xf.position.x;this.m_sweep.c.y+=this.m_xf.position.y;b=this.m_sweep.c0;c=this.m_sweep.c;b.x=c.x;b.y=c.y;this.m_contactList=this.m_controllerList=this.m_jointList=null;this.m_controllerCount=0;this.m_next=this.m_prev=null;b=this.m_linearVelocity;c=a.linearVelocity;b.x=c.x;b.y=c.y;this.m_angularVelocity=a.angularVelocity;this.m_linearDamping=a.linearDamping;this.m_angularDamping=a.angularDamping;b=this.m_force;var d=c=0;null==d&&(d=0);null==c&&(c=0);b.x=c;b.y=d;this.m_sleepTime=
this.m_torque=0;this.m_type=a.type;this.m_invMass=this.m_type==wa.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 N;this.size=new N};h["box2D.dynamics.B2Body"]=wa;wa.__name__="box2D.dynamics.B2Body";wa.prototype={connectEdges:function(a,b,c){var d=Math.atan2(b.getDirectionVector().y,b.getDirectionVector().x);c=P.mulFV(Math.tan(.5*(d-c)),
b.getDirectionVector());c=P.subtractVV(c,b.getNormalVector());c=P.mulFV(ha.b2_toiSlop,c);c=P.addVV(c,b.getVertex1());var e=P.addVV(a.getDirectionVector(),b.getDirectionVector());e.normalize();var f=0<P.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 jg;b.create(this,this.m_xf,a);0!=(this.m_flags&wa.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|=rc.e_newFixture;return b},createFixture2:function(a,b){null==b&&(b=0);var c=new kg;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;){c=b.contact;b=b.next;var d=c.getFixtureA(),e=c.getFixtureB();a!=d&&a!=e||this.m_world.m_contactManager.destroy(c)}0!=(this.m_flags&wa.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){if(1!=this.m_world.isLocked()){this.m_xf.R.set(b);var c=this.m_xf.position;c.x=a.x;c.y=a.y;a=this.m_xf.R;c=this.m_sweep.localCenter;this.m_sweep.c.x=a.col1.x*c.x+a.col2.x*
c.y;this.m_sweep.c.y=a.col1.y*c.x+a.col2.y*c.y;this.m_sweep.c.x+=this.m_xf.position.x;this.m_sweep.c.y+=this.m_xf.position.y;a=this.m_sweep.c0;c=this.m_sweep.c;a.x=c.x;a.y=c.y;this.m_sweep.a0=this.m_sweep.a=b;b=this.m_world.m_contactManager.m_broadPhase;for(a=this.m_fixtureList;null!=a;)a.synchronize(b,this.m_xf,this.m_xf),a=a.m_next;this.m_world.m_contactManager.findNewContacts()}},setPositionFast:function(a){if(1!=this.m_world.isLocked()){var b=this.m_xf.position;b.x=a.x;b.y=a.y;a=this.m_xf.R;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;a=this.m_sweep.c0;b=this.m_sweep.c;a.x=b.x;a.y=b.y}},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){if(this.m_type!=wa.b2_staticBody){var b=this.m_linearVelocity;b.x=a.x;b.y=a.y}},getLinearVelocity:function(){return this.m_linearVelocity},setAngularVelocity:function(a){this.m_type!=wa.b2_staticBody&&(this.m_angularVelocity=a)},getAngularVelocity:function(){return this.m_angularVelocity},getDefinition:function(){var a=
new kj;a.type=this.getType();a.allowSleep=(this.m_flags&wa.e_allowSleepFlag)==wa.e_allowSleepFlag;a.angle=this.getAngle();a.angularDamping=this.m_angularDamping;a.angularVelocity=this.m_angularVelocity;a.fixedRotation=(this.m_flags&wa.e_fixedRotationFlag)==wa.e_fixedRotationFlag;a.bullet=(this.m_flags&wa.e_bulletFlag)==wa.e_bulletFlag;a.awake=(this.m_flags&wa.e_awakeFlag)==wa.e_awakeFlag;a.linearDamping=this.m_linearDamping;var b=a.linearVelocity,c=this.getLinearVelocity();b.x=c.x;b.y=c.y;a.position=
this.getPosition();a.userData=this.getUserData();return a},applyForce:function(a,b){this.m_type==wa.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==wa.b2_dynamicBody&&(0==this.isAwake()&&this.setAwake(!0),this.m_torque+=a)},applyImpulse:function(a,b){this.m_type==wa.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=P.addVV(b,P.crossFV(c,P.subtractVV(f,d)));b=P.addVV(b,P.crossFV(c,P.subtractVV(a,d)));this.setLinearVelocity(f);e.setLinearVelocity(b);this.setAngularVelocity(c);e.setAngularVelocity(c);this.synchronizeFixtures();e.synchronizeFixtures();return e},merge:function(a){for(var 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=a.center;var b=this.m_sweep.localCenter;a.x=b.x;a.y=b.y},setMassData:function(a){ha.b2Assert(0==this.m_world.isLocked());if(1!=this.m_world.isLocked()&&
this.m_type==wa.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&wa.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(),c=this.m_sweep.localCenter;a=a.center;c.x=a.x;c.y=a.y;c=this.m_sweep.c0;a=P.mulX(this.m_xf,this.m_sweep.localCenter);c.x=a.x;c.y=a.y;c=this.m_sweep.c;a=this.m_sweep.c0;c.x=a.x;c.y=
a.y;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;var a=this.m_sweep.localCenter;a.x=0;a.y=0;if(this.m_type!=wa.b2_staticBody&&this.m_type!=wa.b2_kinematicBody){var b=N.make(0,0);for(a=this.m_fixtureList;null!=a;)if(0!=a.m_density){var c=a.getMassData();this.m_mass+=c.mass;b.x+=c.center.x*c.mass;b.y+=c.center.y*c.mass;this.m_I+=
c.I;a=a.m_next}0<this.m_mass?(this.m_invMass=1/this.m_mass,b.x*=this.m_invMass,b.y*=this.m_invMass):this.m_invMass=this.m_mass=1;0<this.m_I&&0==(this.m_flags&wa.e_fixedRotationFlag)?(this.m_I-=this.m_mass*(b.x*b.x+b.y*b.y),this.m_I*=this.m_inertiaScale,ha.b2Assert(0<this.m_I),this.m_invI=1/this.m_I):this.m_invI=this.m_I=0;a=this.m_sweep.c.copy();c=this.m_sweep.localCenter;c.x=b.x;c.y=b.y;b=this.m_sweep.c0;c=P.mulX(this.m_xf,this.m_sweep.localCenter);b.x=c.x;b.y=c.y;b=this.m_sweep.c;c=this.m_sweep.c0;
b.x=c.x;b.y=c.y;this.m_linearVelocity.x+=this.m_angularVelocity*-(this.m_sweep.c.y-a.y);this.m_linearVelocity.y+=this.m_angularVelocity*(this.m_sweep.c.x-a.x)}},getWorldPoint:function(a){var b=this.m_xf.R;a=new N(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 P.mulMV(this.m_xf.R,a)},getLocalPoint:function(a){return P.mulXT(this.m_xf,a)},getLocalVector:function(a){return P.mulTMV(this.m_xf.R,a)},getLinearVelocityFromWorldPoint:function(a){return new N(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 N(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 N(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==wa.b2_staticBody&&(a=this.m_linearVelocity,a.x=0,this.m_angularVelocity=a.y=0),this.setAwake(!0),a=this.m_force,a.x=0,this.m_torque=a.y=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|wa.e_bulletFlag:this.m_flags&~wa.e_bulletFlag},isBullet:function(){return(this.m_flags&wa.e_bulletFlag)==wa.e_bulletFlag},setSleepingAllowed:function(a){a?this.m_flags|=wa.e_allowSleepFlag:(this.m_flags&=~wa.e_allowSleepFlag,this.setAwake(!0))},setAwake:function(a){a?(this.m_flags|=wa.e_awakeFlag,this.m_sleepTime=0):(this.m_flags&=~wa.e_awakeFlag,this.m_sleepTime=0,a=this.m_linearVelocity,a.x=0,this.m_angularVelocity=a.y=0,a=this.m_force,a.x=0,this.m_torque=
a.y=0)},isAwake:function(){return(this.m_flags&wa.e_awakeFlag)==wa.e_awakeFlag},setFixedRotation:function(a){this.m_flags=a?this.m_flags|wa.e_fixedRotationFlag:this.m_flags&~wa.e_fixedRotationFlag;this.resetMassData()},isFixedRotation:function(){return(this.m_flags&wa.e_fixedRotationFlag)==wa.e_fixedRotationFlag},setActive:function(a){if(a!=this.isActive()){var b;if(a)for(this.m_flags|=wa.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&=~wa.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&wa.e_activeFlag)==wa.e_activeFlag},isSleepingAllowed:function(){return(this.m_flags&wa.e_allowSleepFlag)==wa.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|wa.e_pausedFlag:this.m_flags&~wa.e_pausedFlag},isPaused:function(){return(this.m_flags&wa.e_pausedFlag)==wa.e_pausedFlag},setIgnoreGravity:function(a){this.m_flags=a?this.m_flags|wa.e_ignoreGravityFlag:this.m_flags&~wa.e_ignoreGravityFlag},isIgnoringGravity:function(){return(this.m_flags&wa.e_ignoreGravityFlag)==wa.e_ignoreGravityFlag},setAlwaysActive:function(a){this.m_flags=a?this.m_flags|wa.e_alwaysActiveFlag:this.m_flags&~wa.e_alwaysActiveFlag},isAlwaysActive:function(){return(this.m_flags&
wa.e_alwaysActiveFlag)==wa.e_alwaysActiveFlag},synchronizeFixtures:function(){var a=wa.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);b=this.m_world.m_contactManager.m_broadPhase;for(c=this.m_fixtureList;null!=c;)c.synchronize(b,a,this.m_xf),c=c.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!=wa.b2_dynamicBody&&a.m_type!=wa.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);a=this.m_sweep.c;var b=this.m_sweep.c0;a.x=b.x;a.y=b.y;this.m_sweep.a=this.m_sweep.a0;this.synchronizeTransform()},m_flags:null,
m_type:null,m_islandIndex:null,m_xf:null,m_sweep:null,m_linearVelocity:null,m_angularVelocity:null,m_force:null,m_torque:null,m_world:null,m_prev:null,m_next:null,m_fixtureList:null,m_fixtureCount:null,m_controllerList:null,m_controllerCount:null,m_jointList:null,m_contactList:null,m_mass:null,m_invMass:null,m_I:null,m_invI:null,m_inertiaScale:null,m_linearDamping:null,m_angularDamping:null,m_sleepTime:null,m_userData:null,groupID:null,origin:null,size:null,__class__:wa};var kj=function(){this.position=
new N;this.linearVelocity=new N;this.userData=null;this.angularDamping=this.linearDamping=this.angularVelocity=this.angle=0;this.awake=this.allowSleep=!0;this.bullet=this.fixedRotation=!1;this.type=wa.b2_staticBody;this.active=!0;this.inertiaScale=1;this.groupID=3};h["box2D.dynamics.B2BodyDef"]=kj;kj.__name__="box2D.dynamics.B2BodyDef";kj.prototype={type:null,position:null,angle:null,linearVelocity:null,angularVelocity:null,linearDamping:null,angularDamping:null,allowSleep:null,awake:null,fixedRotation:null,
bullet:null,active:null,userData:null,inertiaScale:null,groupID:null,ignoreGravity:null,friction:null,bounciness:null,mass:null,aMass:null,__class__:kj};var Jk=function(){};h["box2D.dynamics.B2ContactFilter"]=Jk;Jk.__name__="box2D.dynamics.B2ContactFilter";Jk.prototype={shouldCollide:function(a,b){var c=a.m_body.groupID,d=b.m_body.groupID;a=a.groupID;b=b.groupID;-1E3!=a&&(c=a);-1E3!=b&&(d=b);return-1==c||-1==d?!1:-2==c||-2==d?1==c||1==d?!1:!0:Eb.collisionMap[c][d]},rayCollide:function(a,b){return null==
a?!0:this.shouldCollide(L.__cast(a,jg),b)},__class__:Jk};var Op=function(){this.normalImpulses=[];this.tangentImpulses=[]};h["box2D.dynamics.B2ContactImpulse"]=Op;Op.__name__="box2D.dynamics.B2ContactImpulse";Op.prototype={normalImpulses:null,tangentImpulses:null,__class__:Op};var vh=function(){};h["box2D.dynamics.B2ContactListener"]=vh;vh.__name__="box2D.dynamics.B2ContactListener";vh.prototype={beginContact:function(a){2147483647<vh.KEY_LOCK&&(vh.KEY_LOCK=-2147483648);a.key=vh.KEY_LOCK++;var b=
a.getFixtureA().getUserData(),c=a.getFixtureB().getUserData(),d=b instanceof Nd,e=c instanceof Nd;!d||e||c instanceof wh?!e||d||b instanceof wh?(null!=b.contacts&&(b.contacts.set(a.key,a),b.contactCount++),null!=c.contacts&&(c.contacts.set(a.key,a),c.contactCount++)):(L.__cast(c,Nd).addActor(b),null!=b.regionContacts&&b.regionContacts.set(a.key,a)):(L.__cast(b,Nd).addActor(c),null!=c.regionContacts&&c.regionContacts.set(a.key,a))},endContact:function(a){var b=a.getFixtureA().getUserData(),c=a.getFixtureB().getUserData(),
d=b instanceof Nd,e=c instanceof Nd;if(d&&!e){d=!1;null!=c.regionContacts&&c.regionContacts.unset(a.key);for(a=c.regionContacts.iterator();a.hasNext();){e=a.next();if(e.getFixtureA().getUserData()instanceof Nd&&e.getFixtureA().getUserData()==b){d=!0;break}if(e.getFixtureB().getUserData()instanceof Nd&&e.getFixtureB().getUserData()==b){d=!0;break}}d&&!c.recycled||L.__cast(b,Nd).removeActor(c)}else if(e&&!d){d=!1;null!=b.regionContacts&&b.regionContacts.unset(a.key);for(a=b.regionContacts.iterator();a.hasNext();){e=
a.next();if(e.getFixtureA().getUserData()instanceof Nd&&e.getFixtureA().getUserData()==c){d=!0;break}if(e.getFixtureB().getUserData()instanceof Nd&&e.getFixtureB().getUserData()==c){d=!0;break}}d&&!b.recycled||L.__cast(c,Nd).removeActor(b)}else{if(null!=b.collisions){d=b.collisions;e=a.key;var f=d.mH,g=f.mHash[73856093*e&f.mMask];if(-1==g)e=-2147483648;else if(f=f.mData,f[g]==e)e=f[g+1];else{var k=-2147483648;for(g=f[g+2];-1!=g;){if(f[g]==e){k=f[g+1];break}g=f[g+2]}e=k}d=-2147483648==e?null:d.mVals[e];
if(null!=d)for(b.collisions.unset(a.key),b.collisionsCount--;0<d.points.length;)ue.free(d.points.pop())}null!=b.contacts&&b.contacts.unset(a.key)&&b.contactCount--;if(null!=c.collisions){b=c.collisions;d=a.key;g=b.mH;e=g.mHash[73856093*d&g.mMask];if(-1==e)d=-2147483648;else if(g=g.mData,g[e]==d)d=g[e+1];else{f=-2147483648;for(e=g[e+2];-1!=e;){if(g[e]==d){f=g[e+1];break}e=g[e+2]}d=f}b=-2147483648==d?null:b.mVals[d];if(null!=b)for(c.collisions.unset(a.key),c.collisionsCount--;0<b.points.length;)ue.free(b.points.pop())}null!=
c.contacts&&c.contacts.unset(a.key)&&c.contactCount--}},preSolve:function(a,b){Cc.preSolve(a,b)},postSolve:function(a,b){},__class__:vh};var hm=function(){this.m_world=null;this.m_contactCount=0;this.m_contactFilter=Jk.b2_defaultFilter;this.m_contactListener=vh.b2_defaultListener;this.m_contactFactory=new Pp(this.m_allocator);this.m_broadPhase=new em};h["box2D.dynamics.B2ContactManager"]=hm;hm.__name__="box2D.dynamics.B2ContactManager";hm.prototype={addPair:function(a,b){var c=a.getBody(),d=b.getBody();
if(c!=d){for(var e=d.getContactList();null!=e;){if(e.other==c){var f=e.contact.getFixtureA(),g=e.contact.getFixtureB();if(f==a&&g==b||f==b&&g==a)return}e=e.next}0!=d.shouldCollide(c)&&0!=this.m_contactFilter.shouldCollide(a,b)&&(e=this.m_contactFactory.create(a,b),a=e.getFixtureA(),b=e.getFixtureB(),c=a.m_body,d=b.m_body,e.m_prev=null,e.m_next=this.m_world.m_contactList,null!=this.m_world.m_contactList&&(this.m_world.m_contactList.m_prev=e),this.m_world.m_contactList=e,e.m_nodeA.contact=e,e.m_nodeA.other=
d,e.m_nodeA.prev=null,e.m_nodeA.next=c.m_contactList,null!=c.m_contactList&&(c.m_contactList.prev=e.m_nodeA),c.m_contactList=e.m_nodeA,e.m_nodeB.contact=e,e.m_nodeB.other=c,e.m_nodeB.prev=null,e.m_nodeB.next=d.m_contactList,null!=d.m_contactList&&(d.m_contactList.prev=e.m_nodeB),d.m_contactList=e.m_nodeB,++this.m_world.m_contactCount)}},findNewContacts:function(){this.m_broadPhase.updatePairs(this)},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&ib.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&=~ib.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())}}},m_world:null,m_broadPhase:null,m_contactList:null,m_contactCount:null,m_contactFilter:null,m_contactListener:null,m_contactFactory:null,m_allocator:null,__class__:hm};var qe=function(){this.m_xformScale=this.m_fillAlpha=this.m_alpha=this.m_lineThickness=this.m_drawScale=1;this.m_drawFlags=0};h["box2D.dynamics.B2DebugDraw"]=qe;qe.__name__="box2D.dynamics.B2DebugDraw";
qe.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=0;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=0;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)},m_drawFlags:null,m_sprite:null,m_drawScale:null,m_lineThickness:null,m_alpha:null,m_fillAlpha:null,m_xformScale:null,__class__:qe};var $s=function(){};h["box2D.dynamics.B2DestructionListener"]=$s;$s.__name__="box2D.dynamics.B2DestructionListener";
$s.prototype={sayGoodbyeJoint:function(a){},sayGoodbyeFixture:function(a){},__class__:$s};var Kk=function(){this.categoryBits=1;this.maskBits=65535;this.groupIndex=0};h["box2D.dynamics.B2FilterData"]=Kk;Kk.__name__="box2D.dynamics.B2FilterData";Kk.prototype={copy:function(){var a=new Kk;a.categoryBits=this.categoryBits;a.maskBits=this.maskBits;a.groupIndex=this.groupIndex;return a},categoryBits:null,maskBits:null,groupIndex:null,__class__:Kk};var jg=function(){this.m_filter=new Kk;this.m_aabb=new id;
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};h["box2D.dynamics.B2Fixture"]=jg;jg.__name__="box2D.dynamics.B2Fixture";jg.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 Ik);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(jg.tempAABB1,b),this.m_shape.computeAABB(jg.tempAABB2,c),this.m_aabb.combine(jg.tempAABB1,jg.tempAABB2),b=P.subtractVVPooled(c.position,b.position),a.moveProxy(this.m_proxy,this.m_aabb,b))},m_massData:null,m_aabb:null,m_density:null,m_next:null,m_body:null,m_shape:null,m_friction:null,m_restitution:null,m_proxy:null,m_filter:null,m_isSensor:null,m_userData:null,groupID:null,
__class__:jg};var kg=function(){this.filter=new Kk;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};h["box2D.dynamics.B2FixtureDef"]=kg;kg.__name__="box2D.dynamics.B2FixtureDef";kg.prototype={shape:null,userData:null,friction:null,restitution:null,density:null,isSensor:null,filter:null,groupID:null,__class__:kg};var Bi=function(){this.m_bodies=[];this.m_contacts=
[];this.m_joints=[]};h["box2D.dynamics.B2Island"]=Bi;Bi.__name__="box2D.dynamics.B2Island";Bi.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()==wa.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(P.clamp(1-
a.dt*d.m_linearDamping,0,1)),d.m_angularVelocity*=P.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()!=wa.b2_staticBody&&(g=a.dt*d.m_linearVelocity.x,k=a.dt*d.m_linearVelocity.y,g*g+k*k>ha.b2_maxTranslationSquared&&(d.m_linearVelocity.normalize(),d.m_linearVelocity.x=d.m_linearVelocity.x*ha.b2_maxTranslation*a.inv_dt,d.m_linearVelocity.y=d.m_linearVelocity.y*ha.b2_maxTranslation*a.inv_dt),g=a.dt*d.m_angularVelocity,g*g>ha.b2_maxRotationSquared&&
(d.m_angularVelocity=0>d.m_angularVelocity?-ha.b2_maxRotation*a.inv_dt:ha.b2_maxRotation*a.inv_dt),g=d.m_sweep.c0,k=d.m_sweep.c,g.x=k.x,g.y=k.y,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++;g=b.solvePositionConstraints(ha.b2_contactBaumgarte);k=!0;for(var l=0,m=this.m_jointCount;l<m;)d=l++,d=this.m_joints[d],d=d.solvePositionConstraints(ha.b2_contactBaumgarte),
k=k&&d;if(g&&k)break}this.report(b.m_constraints);if(c){c=Number.MAX_VALUE;b=ha.b2_linearSleepTolerance*ha.b2_linearSleepTolerance;e=ha.b2_angularSleepTolerance*ha.b2_angularSleepTolerance;f=0;for(g=this.m_bodyCount;f<g;)d=f++,d=this.m_bodies[d],d.getType()!=wa.b2_staticBody&&(0==(d.m_flags&wa.e_allowSleepFlag)&&(c=d.m_sleepTime=0),0==(d.m_flags&wa.e_allowSleepFlag)||d.m_angularVelocity*d.m_angularVelocity>e||P.dot(d.m_linearVelocity,d.m_linearVelocity)>b?c=d.m_sleepTime=0:(d.m_sleepTime+=a.dt,c=
P.min(c,d.m_sleepTime)));if(c>=ha.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();e=0;for(var 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()!=wa.b2_staticBody&&(f=a.dt*e.m_linearVelocity.x,g=a.dt*e.m_linearVelocity.y,f*f+g*g>ha.b2_maxTranslationSquared&&(e.m_linearVelocity.normalize(),e.m_linearVelocity.x=e.m_linearVelocity.x*ha.b2_maxTranslation*a.inv_dt,e.m_linearVelocity.y=e.m_linearVelocity.y*ha.b2_maxTranslation*a.inv_dt),f=a.dt*e.m_angularVelocity,f*f>ha.b2_maxRotationSquared&&(e.m_angularVelocity=0>e.m_angularVelocity?-ha.b2_maxRotation*a.inv_dt:ha.b2_maxRotation*
a.inv_dt),f=e.m_sweep.c0,g=e.m_sweep.c,f.x=g.x,f.y=g.y,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(ha.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;){var d=b++,e=this.m_contacts[d];d=a[d];for(var f=0,g=d.pointCount;f<g;){var k=f++;Bi.s_impulse.normalImpulses[k]=d.points[k].normalImpulse;Bi.s_impulse.tangentImpulses[k]=d.points[k].tangentImpulse}this.m_listener.postSolve(e,Bi.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},m_allocator:null,
m_listener:null,m_contactSolver:null,m_bodies:null,m_contacts:null,m_joints:null,m_bodyCount:null,m_jointCount:null,m_contactCount:null,m_bodyCapacity:null,m_contactCapacity:null,m_jointCapacity:null,__class__:Bi};var Lk=function(){};h["box2D.dynamics.B2TimeStep"]=Lk;Lk.__name__="box2D.dynamics.B2TimeStep";Lk.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},dt:null,
inv_dt:null,dtRatio:null,velocityIterations:null,positionIterations:null,warmStarting:null,__class__:Lk};var rc=function(a,b){this.pointQueryCallback=new im;this.shapeQueryCallback=new jm;this.aabbQueryCallback=new km;this.s_stack=[];this.m_contactManager=new hm;this.m_contactSolver=new ff;this.m_island=new Bi;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;rc.m_warmStarting=!0;rc.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;a=new kj;this.m_groundBody=this.createBody(a)};h["box2D.dynamics.B2World"]=rc;rc.__name__="box2D.dynamics.B2World";rc.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 wa(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=Yb.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;Yb.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 E("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){rc.m_warmStarting=a},setContinuousPhysics:function(a){rc.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){N.freePool();0!=(this.m_flags&rc.e_newFixture)&&(this.m_contactManager.findNewContacts(),this.m_flags&=~rc.e_newFixture);this.m_flags|=rc.e_locked;var d=rc.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=rc.m_warmStarting;this.m_contactManager.collide();0<d.dt&&this.solve(d);rc.m_continuousPhysics&&0<d.dt&&this.solveTOI(d);0<d.dt&&(this.m_inv_dt0=d.inv_dt);
this.m_flags&=~rc.e_locked},clearForces:function(){for(var a=this.m_bodyList;null!=a;){var b=a.m_force;b.x=0;b.y=0;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;new N;new N;new N;new id;new id;new N;new N;new N;new N;var d=new gm(0,0,0);if(0!=(a&qe.e_shapeBit))for(b=this.m_bodyList;null!=b;){var e=b.m_xf;for(c=b.getFixtureList();null!=c;){var f=c.getShape();0==b.isActive()?d.set(.5,
.5,.3):b.getType()==wa.b2_staticBody?d.set(.5,.9,.5):b.getType()==wa.b2_kinematicBody?d.set(.5,.5,.9):0==b.isAwake()?d.set(.6,.6,.6):d.set(.9,.7,.7);this.drawShape(f,e,d);c=c.m_next}b=b.m_next}if(0!=(a&qe.e_jointBit))for(b=this.m_jointList;null!=b;)this.drawJoint(b),b=b.m_next;if(0!=(a&qe.e_controllerBit))for(b=this.m_controllerList;null!=b;)b.draw(this.m_debugDraw),b=b.m_next;if(0!=(a&qe.e_pairBit))for(d.set(.3,.9,.9),b=this.m_contactManager.m_contactList;null!=b;)f=b.getFixtureA(),c=b.getFixtureB(),
f=f.getAABB().getCenter(),c=c.getAABB().getCenter(),this.m_debugDraw.drawSegment(f,c,d),b=b.getNext();if(0!=(a&qe.e_aabbBit))for(f=this.m_contactManager.m_broadPhase,e=[new N,new N,new N,new N],b=this.m_bodyList;null!=b;){if(0!=b.isActive())for(c=b.getFixtureList();null!=c;){var g=f.getFatAABB(c.m_proxy),k=e[0],l=g.lowerBound.x,m=g.lowerBound.y;null==m&&(m=0);null==l&&(l=0);k.x=l;k.y=m;k=e[1];l=g.upperBound.x;m=g.lowerBound.y;null==m&&(m=0);null==l&&(l=0);k.x=l;k.y=m;k=e[2];l=g.upperBound.x;m=g.upperBound.y;
null==m&&(m=0);null==l&&(l=0);k.x=l;k.y=m;k=e[3];l=g.lowerBound.x;g=g.upperBound.y;null==g&&(g=0);null==l&&(l=0);k.x=l;k.y=g;this.m_debugDraw.drawPolygon(e,4,d);c=c.getNext()}b=b.getNext()}if(0!=(a&qe.e_centerOfMassBit))for(b=this.m_bodyList;null!=b;)e=rc.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){this.aabbQueryCallback.broadPhase=this.m_contactManager.m_broadPhase;this.aabbQueryCallback.callbackMethod=a;this.m_contactManager.m_broadPhase.query(this.aabbQueryCallback,
b)},queryShape:function(a,b,c){this.shapeQueryCallback.broadPhase=this.m_contactManager.m_broadPhase;this.shapeQueryCallback.callbackMethod=a;null==c&&(c=new xf,c.setIdentity());this.shapeQueryCallback.transform=c;a=new id;b.computeAABB(a,c);this.shapeQueryCallback.shape=b;this.m_contactManager.m_broadPhase.query(this.shapeQueryCallback,a)},queryPoint:function(a,b){this.pointQueryCallback.broadPhase=this.m_contactManager.m_broadPhase;this.pointQueryCallback.callbackMethod=a;this.pointQueryCallback.p=
b;a=new id;var c=a.lowerBound,d=b.x-ha.b2_linearSlop,e=b.y-ha.b2_linearSlop;null==e&&(e=0);null==d&&(d=0);c.x=d;c.y=e;c=a.upperBound;d=b.x+ha.b2_linearSlop;b=b.y+ha.b2_linearSlop;null==b&&(b=0);null==d&&(d=0);c.x=d;c.y=b;this.m_contactManager.m_broadPhase.query(this.pointQueryCallback,a)},rayCast:function(a,b,c){var d=this.m_contactManager.m_broadPhase,e=new Mp,f=new cm(b,c);d.rayCast(function(f,k){k=d.getUserData(k);k=L.__cast(k,jg);if(k.rayCast(e,f)){f=e.fraction;var g=new N((1-f)*b.x+f*c.x,(1-
f)*b.y+f*c.y);return a(k,g,e.normal,f)}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&rc.e_locked)},s_stack:null,solve:function(a){for(var b=
this.m_controllerList;null!=b;)b.step(a),b=b.m_next;var c=this.m_island;c.initialize(this.m_bodyCount,this.m_contactCount,this.m_jointCount,null,this.m_contactManager.m_contactListener,this.m_contactSolver);for(var d=this.m_bodyList;null!=d;)d.m_flags&=~wa.e_islandFlag,d=d.m_next;for(b=this.m_contactList;null!=b;)b.m_flags&=~ib.e_islandFlag,b=b.m_next;for(b=this.m_jointList;null!=b;)b.m_islandFlag=!1,b=b.m_next;b=this.s_stack;for(var e=this.m_bodyList;null!=e;){if(0==(e.m_flags&wa.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()!=wa.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{c.clear();var f=0;b[f++]=e;for(e.m_flags|=wa.e_islandFlag;0<f;)if(d=b[--f],c.addBody(d),0==d.isAwake()&&d.setAwake(!0),d.getType()!=wa.b2_staticBody){for(var g,k=d.m_contactList;null!=k;)0==(k.contact.m_flags&ib.e_islandFlag)&&1!=k.contact.isSensor()&&0!=k.contact.isEnabled()&&0!=k.contact.isTouching()&&(c.addContact(k.contact),
k.contact.m_flags|=ib.e_islandFlag,g=k.other,0==(g.m_flags&wa.e_islandFlag)&&(b[f++]=g,g.m_flags|=wa.e_islandFlag)),k=k.next;for(d=d.m_jointList;null!=d;)1!=d.joint.m_islandFlag&&(g=d.other,0!=g.isActive()&&(c.addJoint(d.joint),d.joint.m_islandFlag=!0,0==(g.m_flags&wa.e_islandFlag)&&(b[f++]=g,g.m_flags|=wa.e_islandFlag))),d=d.next}c.solve(a,this.m_gravity,this.m_allowSleep);f=0;for(g=c.m_bodyCount;f<g;)d=f++,d=c.m_bodies[d],d.getType()==wa.b2_staticBody&&(d.m_flags&=~wa.e_islandFlag)}e=e.m_next}a=
0;for(c=b.length;a<c;){e=a++;if(null==b[e])break;b[e]=null}for(d=this.m_bodyList;null!=d;)0!=d.isAwake()&&0!=d.isActive()&&d.getType()!=wa.b2_staticBody&&d.synchronizeFixtures(),d=d.m_next;this.m_contactManager.findNewContacts()},solveTOI:function(a){var b,c=this.m_island;c.initialize(this.m_bodyCount,ha.b2_maxTOIContactsPerIsland,ha.b2_maxTOIJointsPerIsland,null,this.m_contactManager.m_contactListener,this.m_contactSolver);for(var d=rc.s_queue,e=this.m_bodyList;null!=e;)e.m_flags&=~wa.e_islandFlag,
e.m_sweep.t0=0,e=e.m_next;for(b=this.m_contactList;null!=b;)b.m_flags&=~(ib.e_toiFlag|ib.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 f=1;for(b=this.m_contactList;null!=b;){if(1!=b.isSensor()&&0!=b.isEnabled()&&0!=b.isContinuous()){if(0!=(b.m_flags&ib.e_toiFlag))var g=b.m_toi;else{g=b.m_fixtureA;var k=b.m_fixtureB;g=g.m_body;k=k.m_body;if(!(g.getType()==wa.b2_dynamicBody&&0!=g.isAwake()||k.getType()==wa.b2_dynamicBody&&0!=k.isAwake())){b=
b.m_next;continue}var l=g.m_sweep.t0;g.m_sweep.t0<k.m_sweep.t0?(l=k.m_sweep.t0,g.m_sweep.advance(l)):k.m_sweep.t0<g.m_sweep.t0&&(l=g.m_sweep.t0,k.m_sweep.advance(l));g=b.computeTOI(g.m_sweep,k.m_sweep);ha.b2Assert(0<=g&&1>=g);0<g&&1>g&&(g=(1-g)*l+g,1<g&&(g=1));b.m_toi=g;b.m_flags|=ib.e_toiFlag}Number.MIN_VALUE<g&&g<f&&(e=b,f=g)}b=b.m_next}if(null==e||1-100*Number.MIN_VALUE<f)break;g=e.m_fixtureA;k=e.m_fixtureB;g=g.m_body;k=k.m_body;rc.s_backupA.set(g.m_sweep);rc.s_backupB.set(k.m_sweep);g.advance(f);
k.advance(f);e.update(this.m_contactManager.m_contactListener);e.m_flags&=~ib.e_toiFlag;if(1==e.isSensor()||0==e.isEnabled())g.m_sweep.set(rc.s_backupA),k.m_sweep.set(rc.s_backupB),g.synchronizeTransform(),k.synchronizeTransform();else if(0!=e.isTouching()){b=g;b.getType()!=wa.b2_dynamicBody&&(b=k);c.clear();k=g=0;d[g+k++]=b;for(b.m_flags|=wa.e_islandFlag;0<k;)if(e=d[g++],--k,c.addBody(e),0==e.isAwake()&&e.setAwake(!0),e.getType()==wa.b2_dynamicBody){for(b=e.m_contactList;null!=b&&c.m_contactCount!=
c.m_contactCapacity;)0==(b.contact.m_flags&ib.e_islandFlag)&&1!=b.contact.isSensor()&&0!=b.contact.isEnabled()&&0!=b.contact.isTouching()&&(c.addContact(b.contact),b.contact.m_flags|=ib.e_islandFlag,l=b.other,0==(l.m_flags&wa.e_islandFlag)&&(l.getType()!=wa.b2_staticBody&&(l.advance(f),l.setAwake(!0)),d[g+k]=l,++k,l.m_flags|=wa.e_islandFlag)),b=b.next;for(b=e.m_jointList;null!=b;)c.m_jointCount!=c.m_jointCapacity&&1!=b.joint.m_islandFlag&&(l=b.other,0!=l.isActive()&&(c.addJoint(b.joint),b.joint.m_islandFlag=
!0,0==(l.m_flags&wa.e_islandFlag)&&(l.getType()!=wa.b2_staticBody&&(l.advance(f),l.setAwake(!0)),d[g+k]=l,++k,l.m_flags|=wa.e_islandFlag))),b=b.next}b=rc.s_timestep;b.warmStarting=!1;b.dt=(1-f)*a.dt;b.inv_dt=1/b.dt;b.dtRatio=0;b.velocityIterations=a.velocityIterations;b.positionIterations=a.positionIterations;c.solveTOI(b);f=0;for(g=c.m_bodyCount;f<g;)if(b=f++,e=c.m_bodies[b],e.m_flags&=~wa.e_islandFlag,0!=e.isAwake()&&e.getType()==wa.b2_dynamicBody)for(e.synchronizeFixtures(),b=e.m_contactList;null!=
b;)b.contact.m_flags&=~ib.e_toiFlag,b=b.next;f=0;for(e=c.m_contactCount;f<e;)b=f++,b=c.m_contacts[b],b.m_flags&=~(ib.e_toiFlag|ib.e_islandFlag);f=0;for(b=c.m_jointCount;f<b;)e=f++,e=c.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=rc.s_jointColor;switch(a.m_type){case 3:this.m_debugDraw.drawSegment(f,g,k);break;case 4:b=L.__cast(a,Vg);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=L.__cast(a,cd);var d=P.mulX(b,a.m_p);this.m_debugDraw.drawSolidCircle(d,a.m_radius,b.R.col1,c);break;
case 1:d=L.__cast(a,Lb);a=d.getVertexCount();d=d.getVertices();for(var e=[],f=0;f<a;){var g=f++;e[g]=P.mulX(b,d[g])}this.m_debugDraw.drawSolidPolygon(e,a,c);break;case 2:a=L.__cast(a,Ug),this.m_debugDraw.drawSegment(P.mulX(b,a.getVertex1()),P.mulX(b,a.getVertex2()),c)}},m_aabb:null,setScreenBounds:function(a){this.m_aabb=a},getScreenBounds:function(){return this.m_aabb},m_flags:null,m_contactManager:null,m_contactSolver:null,m_island:null,m_bodyList:null,m_jointList:null,m_contactList:null,m_bodyCount:null,
m_contactCount:null,m_jointCount:null,m_controllerList:null,m_controllerCount:null,m_gravity:null,m_allowSleep:null,m_groundBody:null,m_destructionListener:null,m_debugDraw:null,m_inv_dt0:null,aabbQueryCallback:null,shapeQueryCallback:null,pointQueryCallback:null,__class__:rc};var km=function(){};h["box2D.dynamics.AABBQueryCallback"]=km;km.__name__="box2D.dynamics.AABBQueryCallback";km.__interfaces__=[Xe];km.prototype={broadPhase:null,callbackMethod:null,queryCallback:function(a){return this.callbackMethod(this.broadPhase.getUserData(a))},
__class__:km};var jm=function(){};h["box2D.dynamics.ShapeQueryCallback"]=jm;jm.__name__="box2D.dynamics.ShapeQueryCallback";jm.__interfaces__=[Xe];jm.prototype={broadPhase:null,shape:null,transform:null,callbackMethod:null,queryCallback:function(a){a=this.broadPhase.getUserData(a);return dc.testOverlap(this.shape,this.transform,a.getShape(),a.getBody().getTransform())?this.callbackMethod(a):!0},__class__:jm};var im=function(){};h["box2D.dynamics.PointQueryCallback"]=im;im.__name__="box2D.dynamics.PointQueryCallback";
im.__interfaces__=[Xe];im.prototype={broadPhase:null,callbackMethod:null,p:null,queryCallback:function(a){a=this.broadPhase.getUserData(a);return a.testPoint(this.p)?this.callbackMethod(a):!0},__class__:im};var ib=function(){this.m_nodeA=new lm;this.m_nodeB=new lm;this.m_manifold=new Rh;this.m_oldManifold=new Rh};h["box2D.dynamics.contacts.B2Contact"]=ib;ib.__name__="box2D.dynamics.contacts.B2Contact";ib.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&ib.e_touchingFlag)==ib.e_touchingFlag},isContinuous:function(){return(this.m_flags&ib.e_continuousFlag)==ib.e_continuousFlag},setSensor:function(a){this.m_flags=a?this.m_flags|ib.e_sensorFlag:this.m_flags&~ib.e_sensorFlag},isSensor:function(){return(this.m_flags&
ib.e_sensorFlag)==ib.e_sensorFlag},setEnabled:function(a){this.m_flags=a?this.m_flags|ib.e_enabledFlag:this.m_flags&~ib.e_enabledFlag},isEnabled:function(){return(this.m_flags&ib.e_enabledFlag)==ib.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|=ib.e_filterFlag},reset:function(a,b){this.m_flags=ib.e_enabledFlag;if(null==a||null==b)this.m_fixtureB=this.m_fixtureA=
null;else{if(a.isSensor()||b.isSensor())this.m_flags|=ib.e_sensorFlag;var c=a.getBody(),d=b.getBody();if(c.getType()!=wa.b2_dynamicBody||c.isBullet()||d.getType()!=wa.b2_dynamicBody||d.isBullet())this.m_flags|=ib.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|=ib.e_enabledFlag;var c=!1;b=(this.m_flags&ib.e_touchingFlag)==ib.e_touchingFlag;var 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&ib.e_sensorFlag))f&&(c=this.m_fixtureA.getShape(),f=this.m_fixtureB.getShape(),d=d.getTransform(),e=e.getTransform(),c=dc.testOverlap(c,d,f,e)),this.m_manifold.m_pointCount=
0;else{d.getType()!=wa.b2_dynamicBody||d.isBullet()||e.getType()!=wa.b2_dynamicBody||e.isBullet()?this.m_flags|=ib.e_continuousFlag:this.m_flags&=~ib.e_continuousFlag;if(f){this.evaluate();c=0<this.m_manifold.m_pointCount;f=0;for(var 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 l=k.m_id,m=0,z=this.m_oldManifold.m_pointCount;m<z;){var n=m++;n=this.m_oldManifold.m_points[n];if(n.m_id.get_key()==l.get_key()){k.m_normalImpulse=
n.m_normalImpulse;k.m_tangentImpulse=n.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|ib.e_touchingFlag:this.m_flags&~ib.e_touchingFlag;0==b&&1==c&&a.beginContact(this);1==b&&0==c&&a.endContact(this);0==(this.m_flags&ib.e_sensorFlag)&&a.preSolve(this,this.m_oldManifold)},evaluate:function(){},computeTOI:function(a,b){ib.s_input.proxyA.set(this.m_fixtureA.getShape());ib.s_input.proxyB.set(this.m_fixtureB.getShape());ib.s_input.sweepA=
a;ib.s_input.sweepB=b;ib.s_input.tolerance=ha.b2_linearSlop;return Fb.timeOfImpact(ib.s_input)},m_flags:null,m_prev:null,m_next:null,m_nodeA:null,m_nodeB:null,m_fixtureA:null,m_fixtureB:null,m_manifold:null,m_oldManifold:null,m_toi:null,key:null,__class__:ib};var Th=function(){ib.call(this)};h["box2D.dynamics.contacts.B2CircleContact"]=Th;Th.__name__="box2D.dynamics.contacts.B2CircleContact";Th.create=function(a){return new Th};Th.destroy=function(a,b){};Th.__super__=ib;Th.prototype=w(ib.prototype,
{reset:function(a,b){ib.prototype.reset.call(this,a,b)},evaluate:function(){var a=this.m_fixtureA.getBody(),b=this.m_fixtureB.getBody();J.collideCircles(this.m_manifold,L.__cast(this.m_fixtureA.getShape(),cd),a.m_xf,L.__cast(this.m_fixtureB.getShape(),cd),b.m_xf)},__class__:Th});var Rp=function(){this.localPlaneNormal=new N;this.localPoint=new N;this.normal=new N;this.normalMass=new Qc;this.K=new Qc;this.points=[];for(var a=0,b=ha.b2_maxManifoldPoints;a<b;){var c=a++;this.points[c]=new Qp}};h["box2D.dynamics.contacts.B2ContactConstraint"]=
Rp;Rp.__name__="box2D.dynamics.contacts.B2ContactConstraint";Rp.prototype={points:null,localPlaneNormal:null,localPoint:null,normal:null,normalMass:null,K:null,bodyA:null,bodyB:null,type:null,radius:null,friction:null,restitution:null,pointCount:null,manifold:null,__class__:Rp};var Qp=function(){this.localPoint=new N;this.rA=new N;this.rB=new N};h["box2D.dynamics.contacts.B2ContactConstraintPoint"]=Qp;Qp.__name__="box2D.dynamics.contacts.B2ContactConstraintPoint";Qp.prototype={localPoint:null,rA:null,
rB:null,normalImpulse:null,tangentImpulse:null,normalMass:null,tangentMass:null,equalizedMass:null,velocityBias:null,__class__:Qp};var lm=function(){};h["box2D.dynamics.contacts.B2ContactEdge"]=lm;lm.__name__="box2D.dynamics.contacts.B2ContactEdge";lm.prototype={other:null,contact:null,prev:null,next:null,__class__:lm};var Pp=function(a){this.m_allocator=a;this.initializeRegisters()};h["box2D.dynamics.contacts.B2ContactFactory"]=Pp;Pp.__name__="box2D.dynamics.contacts.B2ContactFactory";Pp.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=[];this.m_registers[0]=[];this.m_registers[0][0]=null;this.m_registers[0][1]=null;this.m_registers[0][2]=null;this.m_registers[1]=[];this.m_registers[1][0]=null;this.m_registers[1][1]=null;this.m_registers[1][2]=null;this.m_registers[2]=[];this.m_registers[2][0]=null;this.m_registers[2][1]=null;this.m_registers[2][2]=null;
null==this.m_registers[0][0]&&(this.m_registers[0][0]=new Cg);null==this.m_registers[0][1]&&(this.m_registers[0][1]=new Cg,this.m_registers[1][0]=this.m_registers[0][1]);null==this.m_registers[0][2]&&(this.m_registers[0][2]=new Cg,this.m_registers[2][0]=this.m_registers[0][2]);null==this.m_registers[1][0]&&(this.m_registers[1][0]=new Cg,this.m_registers[0][1]=this.m_registers[1][0]);null==this.m_registers[1][1]&&(this.m_registers[1][1]=new Cg);null==this.m_registers[1][2]&&(this.m_registers[1][2]=
new Cg,this.m_registers[2][1]=this.m_registers[1][2]);null==this.m_registers[2][0]&&(this.m_registers[2][0]=new Cg,this.m_registers[0][2]=this.m_registers[2][0]);null==this.m_registers[2][1]&&(this.m_registers[2][1]=new Cg,this.m_registers[1][2]=this.m_registers[2][1]);null==this.m_registers[2][2]&&(this.m_registers[2][2]=new Cg);this.addType(Th.create,Th.destroy,0,0);this.addType(Uh.create,Uh.destroy,1,0);this.addType(Vh.create,Vh.destroy,1,1);this.addType(Va.create,Va.destroy,2,0);this.addType(G.create,
G.destroy,1,2)},create:function(a,b){var c=a.getType(),d=b.getType();d=this.m_registers[c][d];if(null!=d.pool){var e=d.pool;d.pool=e.m_next;d.poolCount--;d.primary==c?e.reset(a,b):e.reset(b,a);return 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)},m_registers:null,m_allocator:null,__class__:Pp};var Cg=function(){};h["box2D.dynamics.contacts.B2ContactRegister"]=Cg;Cg.__name__="box2D.dynamics.contacts.B2ContactRegister";Cg.prototype={createFcn:null,destroyFcn:null,primary:null,pool:null,poolCount:null,__class__:Cg};var Mk=function(){this.m_normal=new N;this.m_separations=[];this.m_points=[];for(var a=0,b=ha.b2_maxManifoldPoints;a<b;){var c=a++;
this.m_points[c]=new N}};h["box2D.dynamics.contacts.B2PositionSolverManifold"]=Mk;Mk.__name__="box2D.dynamics.contacts.B2PositionSolverManifold";Mk.prototype={initialize:function(a){ha.b2Assert(0<a.pointCount);switch(a.type){case 1:var b=a.bodyA.m_xf.R;var c=a.localPoint;var d=a.bodyA.m_xf.position.x+(b.col1.x*c.x+b.col2.x*c.y);var e=a.bodyA.m_xf.position.y+(b.col1.y*c.x+b.col2.y*c.y);b=a.bodyB.m_xf.R;c=a.points[0].localPoint;var f=a.bodyB.m_xf.position.x+(b.col1.x*c.x+b.col2.x*c.y);b=a.bodyB.m_xf.position.y+
(b.col1.y*c.x+b.col2.y*c.y);c=f-d;var g=b-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*(d+f);this.m_points[0].y=.5*(e+b);this.m_separations[0]=c*this.m_normal.x+g*this.m_normal.y-a.radius;break;case 2:b=a.bodyA.m_xf.R;c=a.localPlaneNormal;this.m_normal.x=b.col1.x*c.x+b.col2.x*c.y;this.m_normal.y=b.col1.y*c.x+b.col2.y*c.y;b=a.bodyA.m_xf.R;c=a.localPoint;d=a.bodyA.m_xf.position.x+
(b.col1.x*c.x+b.col2.x*c.y);e=a.bodyA.m_xf.position.y+(b.col1.y*c.x+b.col2.y*c.y);b=a.bodyB.m_xf.R;g=0;for(k=a.pointCount;g<k;){var l=g++;c=a.points[l].localPoint;f=a.bodyB.m_xf.position.x+(b.col1.x*c.x+b.col2.x*c.y);c=a.bodyB.m_xf.position.y+(b.col1.y*c.x+b.col2.y*c.y);this.m_separations[l]=(f-d)*this.m_normal.x+(c-e)*this.m_normal.y-a.radius;this.m_points[l].x=f;this.m_points[l].y=c}break;case 4:b=a.bodyB.m_xf.R;c=a.localPlaneNormal;this.m_normal.x=b.col1.x*c.x+b.col2.x*c.y;this.m_normal.y=b.col1.y*
c.x+b.col2.y*c.y;b=a.bodyB.m_xf.R;c=a.localPoint;d=a.bodyB.m_xf.position.x+(b.col1.x*c.x+b.col2.x*c.y);e=a.bodyB.m_xf.position.y+(b.col1.y*c.x+b.col2.y*c.y);b=a.bodyA.m_xf.R;g=0;for(k=a.pointCount;g<k;)l=g++,c=a.points[l].localPoint,f=a.bodyA.m_xf.position.x+(b.col1.x*c.x+b.col2.x*c.y),c=a.bodyA.m_xf.position.y+(b.col1.y*c.x+b.col2.y*c.y),this.m_separations[l]=(f-d)*this.m_normal.x+(c-e)*this.m_normal.y-a.radius,l=this.m_points[l],null==c&&(c=0),null==f&&(f=0),l.x=f,l.y=c;this.m_normal.x*=-1;this.m_normal.y*=
-1}},m_normal:null,m_points:null,m_separations:null,__class__:Mk};var ff=function(){this.m_step=new Lk;this.m_constraints=[]};h["box2D.dynamics.contacts.B2ContactSolver"]=ff;ff.__name__="box2D.dynamics.contacts.B2ContactSolver";ff.prototype={initialize:function(a,b,c,d){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 Rp;for(a=0;a<c;){d=a++;var e=b[d];var f=e.m_fixtureA,g=e.m_fixtureB,
k=f.m_shape.m_radius,l=g.m_shape.m_radius,m=f.m_body,z=g.m_body;e=e.getManifold();var n=ha.b2MixFriction(f.getFriction(),g.getFriction()),p=ha.b2MixRestitution(f.getRestitution(),g.getRestitution()),h=m.m_linearVelocity.x,q=m.m_linearVelocity.y,t=z.m_linearVelocity.x,r=z.m_linearVelocity.y,u=m.m_angularVelocity,x=z.m_angularVelocity;ha.b2Assert(0<e.m_pointCount);ff.s_worldManifold.initialize(e,m.m_xf,k,z.m_xf,l);f=ff.s_worldManifold.m_normal.x;g=ff.s_worldManifold.m_normal.y;d=this.m_constraints[d];
d.bodyA=m;d.bodyB=z;d.manifold=e;d.normal.x=f;d.normal.y=g;d.pointCount=e.m_pointCount;d.friction=n;d.restitution=p;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+l;d.type=e.m_type;k=0;for(l=d.pointCount;k<l;){var w=k++,v=e.m_points[w];n=d.points[w];n.normalImpulse=v.m_normalImpulse;n.tangentImpulse=v.m_tangentImpulse;p=n.localPoint;v=v.m_localPoint;p.x=v.x;p.y=v.y;p=n.rA.x=ff.s_worldManifold.m_points[w].x-
m.m_sweep.c.x;v=n.rA.y=ff.s_worldManifold.m_points[w].y-m.m_sweep.c.y;var Q=n.rB.x=ff.s_worldManifold.m_points[w].x-z.m_sweep.c.x;w=n.rB.y=ff.s_worldManifold.m_points[w].y-z.m_sweep.c.y;var C=p*g-v*f,J=Q*g-w*f;C*=C;J*=J;n.normalMass=1/(m.m_invMass+z.m_invMass+m.m_invI*C+z.m_invI*J);var F=m.m_mass*m.m_invMass+z.m_mass*z.m_invMass;F+=m.m_mass*m.m_invI*C+z.m_mass*z.m_invI*J;n.equalizedMass=1/F;J=g;F=-f;C=p*F-v*J;J=Q*F-w*J;C*=C;J*=J;n.tangentMass=1/(m.m_invMass+z.m_invMass+m.m_invI*C+z.m_invI*J);n.velocityBias=
0;p=d.normal.x*(t+-x*w-h- -u*v)+d.normal.y*(r+x*Q-q-u*p);p<-ha.b2_velocityThreshold&&(n.velocityBias+=-d.restitution*p)}2==d.pointCount&&(r=d.points[0],t=d.points[1],e=m.m_invMass,m=m.m_invI,h=z.m_invMass,z=z.m_invI,q=r.rA.x*g-r.rA.y*f,r=r.rB.x*g-r.rB.y*f,u=t.rA.x*g-t.rA.y*f,t=t.rB.x*g-t.rB.y*f,g=e+h+m*q*q+z*r*r,f=e+h+m*u*u+z*t*t,z=e+h+m*q*u+z*r*t,g*g<100*(g*f-z*z)?(m=d.K.col1,e=z,null==e&&(e=0),null==g&&(g=0),m.x=g,m.y=e,g=d.K.col2,null==f&&(f=0),null==z&&(z=0),g.x=z,g.y=f,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];var e=d.bodyA,f=d.bodyB,g=e.m_invMass,k=e.m_invI,l=f.m_invMass,m=f.m_invI,z=d.normal.x,n=d.normal.y,p=n,h=-z;if(a.warmStarting){var q=d.pointCount;for(var t=0;t<q;){var r=t++;r=d.points[r];r.normalImpulse*=a.dtRatio;r.tangentImpulse*=a.dtRatio;var u=r.normalImpulse*z+r.tangentImpulse*p,x=r.normalImpulse*n+r.tangentImpulse*h;e.m_angularVelocity-=k*(r.rA.x*x-r.rA.y*u);e.m_linearVelocity.x-=
g*u;e.m_linearVelocity.y-=g*x;f.m_angularVelocity+=m*(r.rB.x*x-r.rB.y*u);f.m_linearVelocity.x+=l*u;f.m_linearVelocity.y+=l*x}}else for(q=d.pointCount,e=0,f=q;e<f;)g=e++,g=d.points[g],g.normalImpulse=0,g.tangentImpulse=0}},solveVelocityConstraints:function(){for(var a,b,c,d,e,f,g,k,l,m,z=0,n=this.m_constraintCount;z<n;){var p=z++;d=this.m_constraints[p];p=d.bodyA;var h=d.bodyB,q=p.m_angularVelocity,t=h.m_angularVelocity,r=p.m_linearVelocity,u=h.m_linearVelocity,x=p.m_invMass,w=p.m_invI,v=h.m_invMass,
Q=h.m_invI;k=d.normal.x;var C=l=d.normal.y,J=-k;m=d.friction;g=0;for(f=d.pointCount;g<f;)a=g++,a=d.points[a],b=u.x-t*a.rB.y-r.x+q*a.rA.y,c=u.y+t*a.rB.x-r.y-q*a.rA.x,b=b*C+c*J,b=a.tangentMass*-b,c=m*a.normalImpulse,c=P.clamp(a.tangentImpulse+b,-c,c),b=c-a.tangentImpulse,e=b*C,b*=J,r.x-=x*e,r.y-=x*b,q-=w*(a.rA.x*b-a.rA.y*e),u.x+=v*e,u.y+=v*b,t+=Q*(a.rB.x*b-a.rB.y*e),a.tangentImpulse=c;if(1==d.pointCount)a=d.points[0],b=u.x+-t*a.rB.y-r.x- -q*a.rA.y,c=u.y+t*a.rB.x-r.y-q*a.rA.x,d=b*k+c*l,b=-a.normalMass*
(d-a.velocityBias),c=a.normalImpulse+b,c=0<c?c:0,b=c-a.normalImpulse,e=b*k,b*=l,r.x-=x*e,r.y-=x*b,q-=w*(a.rA.x*b-a.rA.y*e),u.x+=v*e,u.y+=v*b,t+=Q*(a.rB.x*b-a.rB.y*e),a.normalImpulse=c;else{a=d.points[0];C=d.points[1];f=a.normalImpulse;g=C.normalImpulse;e=(u.x-t*a.rB.y-r.x+q*a.rA.y)*k+(u.y+t*a.rB.x-r.y-q*a.rA.x)*l;var F=(u.x-t*C.rB.y-r.x+q*C.rA.y)*k+(u.y+t*C.rB.x-r.y-q*C.rA.x)*l;b=e-a.velocityBias;c=F-C.velocityBias;m=d.K;b-=m.col1.x*f+m.col2.x*g;for(c-=m.col1.y*f+m.col2.y*g;;){m=d.normalMass;J=-(m.col1.x*
b+m.col2.x*c);m=-(m.col1.y*b+m.col2.y*c);if(0<=J&&0<=m){f=J-f;g=m-g;d=f*k;f*=l;k*=g;l*=g;r.x-=x*(d+k);r.y-=x*(f+l);q-=w*(a.rA.x*f-a.rA.y*d+C.rA.x*l-C.rA.y*k);u.x+=v*(d+k);u.y+=v*(f+l);t+=Q*(a.rB.x*f-a.rB.y*d+C.rB.x*l-C.rB.y*k);a.normalImpulse=J;C.normalImpulse=m;break}J=-a.normalMass*b;m=0;F=d.K.col1.y*J+c;if(0<=J&&0<=F){f=J-f;g=m-g;d=f*k;f*=l;k*=g;l*=g;r.x-=x*(d+k);r.y-=x*(f+l);q-=w*(a.rA.x*f-a.rA.y*d+C.rA.x*l-C.rA.y*k);u.x+=v*(d+k);u.y+=v*(f+l);t+=Q*(a.rB.x*f-a.rB.y*d+C.rB.x*l-C.rB.y*k);a.normalImpulse=
J;C.normalImpulse=m;break}J=0;m=-C.normalMass*c;e=d.K.col2.x*m+b;if(0<=m&&0<=e){f=J-f;g=m-g;d=f*k;f*=l;k*=g;l*=g;r.x-=x*(d+k);r.y-=x*(f+l);q-=w*(a.rA.x*f-a.rA.y*d+C.rA.x*l-C.rA.y*k);u.x+=v*(d+k);u.y+=v*(f+l);t+=Q*(a.rB.x*f-a.rB.y*d+C.rB.x*l-C.rB.y*k);a.normalImpulse=J;C.normalImpulse=m;break}m=J=0;e=b;F=c;if(0<=e&&0<=F){f=J-f;g=m-g;d=f*k;f*=l;k*=g;l*=g;r.x-=x*(d+k);r.y-=x*(f+l);q-=w*(a.rA.x*f-a.rA.y*d+C.rA.x*l-C.rA.y*k);u.x+=v*(d+k);u.y+=v*(f+l);t+=Q*(a.rB.x*f-a.rB.y*d+C.rB.x*l-C.rB.y*k);a.normalImpulse=
J;C.normalImpulse=m;break}break}}p.m_angularVelocity=q;h.m_angularVelocity=t}},finalizeVelocityConstraints:function(){for(var a=0,b=this.m_constraintCount;a<b;){var c=a++;c=this.m_constraints[c];for(var 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];var f=e.bodyA,g=e.bodyB,k=f.m_mass*
f.m_invMass,l=f.m_mass*f.m_invI,m=g.m_mass*g.m_invMass,z=g.m_mass*g.m_invI;ff.s_psm.initialize(e);for(var n=ff.s_psm.m_normal,p=0,h=e.pointCount;p<h;){var q=p++,t=e.points[q],r=ff.s_psm.m_points[q],u=ff.s_psm.m_separations[q];q=r.x-f.m_sweep.c.x;var x=r.y-f.m_sweep.c.y,v=r.x-g.m_sweep.c.x;r=r.y-g.m_sweep.c.y;b=b<u?b:u;u=P.clamp(a*(u+ha.b2_linearSlop),-ha.b2_maxLinearCorrection,0);u*=-t.equalizedMass;t=u*n.x;u*=n.y;f.m_sweep.c.x-=k*t;f.m_sweep.c.y-=k*u;f.m_sweep.a-=l*(q*u-x*t);f.synchronizeTransform();
g.m_sweep.c.x+=m*t;g.m_sweep.c.y+=m*u;g.m_sweep.a+=z*(v*u-r*t);g.synchronizeTransform()}}return b>-1.5*ha.b2_linearSlop},m_step:null,m_allocator:null,m_constraints:null,m_constraintCount:null,__class__:ff};var Va=function(){ib.call(this)};h["box2D.dynamics.contacts.B2EdgeAndCircleContact"]=Va;Va.__name__="box2D.dynamics.contacts.B2EdgeAndCircleContact";Va.create=function(a){return new Va};Va.destroy=function(a,b){};Va.__super__=ib;Va.prototype=w(ib.prototype,{m_v0:null,m_v1:null,m_v2:null,m_v3:null,
reset:function(a,b){ib.prototype.reset.call(this,a,b)},evaluate:function(){var a=this.m_fixtureA.getBody(),b=this.m_fixtureB.getBody();this.b2CollideEdgeAndCircle(this.m_manifold,L.__cast(this.m_fixtureA.getShape(),Ug),a.m_xf,L.__cast(this.m_fixtureB.getShape(),cd),b.m_xf)},b2CollideEdgeAndCircle:function(a,b,c,d,e){a.m_pointCount=0;this.multiplyTransformVector(e,d.m_p,Va.temp1);e=Va.q;c=P.mulXT(c,Va.temp1);e.x=c.x;e.y=c.y;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=Va.e;
e=this.m_v2.x-this.m_v1.x;var f=this.m_v2.y-this.m_v1.y;null==f&&(f=0);null==e&&(e=0);c.x=e;c.y=f;c=Va.temp1;e=this.m_v2.x-Va.q.x;f=this.m_v2.y-Va.q.y;null==f&&(f=0);null==e&&(e=0);c.x=e;c.y=f;e=P.dot(Va.e,Va.temp1);c=Va.temp1;f=Va.q.x-this.m_v1.x;var g=Va.q.y-this.m_v1.y;null==g&&(g=0);null==f&&(f=0);c.x=f;c.y=g;f=P.dot(Va.e,Va.temp1);c=b.m_radius+d.m_radius;if(0>=f){if(e=Va.p,f=this.m_v1,e.x=f.x,e.y=f.y,e=Va.temp1,f=Va.q.x-Va.p.x,g=Va.q.y-Va.p.y,null==g&&(g=0),null==f&&(f=0),e.x=f,e.y=g,!(P.dot(Va.temp1,
Va.temp1)>c*c)){if(b.m_hasVertex0&&(b=Va.temp1,c=this.m_v1.x-this.m_v0.x,e=this.m_v1.y-this.m_v0.y,null==e&&(e=0),null==c&&(c=0),b.x=c,b.y=e,b=Va.temp2,c=this.m_v1.x-Va.q.x,e=this.m_v1.y-Va.q.y,null==e&&(e=0),null==c&&(c=0),b.x=c,b.y=e,0<P.dot(Va.temp1,Va.temp2)))return;a.m_pointCount=1;a.m_type=1;b=a.m_localPlaneNormal;b.x=0;b.y=0;b=a.m_localPoint;c=Va.p;b.x=c.x;b.y=c.y;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=Q.VERTEX;a.m_points[0].m_id.typeB=
Q.VERTEX;a=a.m_points[0].m_localPoint;d=d.m_p;a.x=d.x;a.y=d.y}}else if(0>=e){if(e=Va.p,f=this.m_v2,e.x=f.x,e.y=f.y,e=Va.temp1,f=Va.q.x-Va.p.x,g=Va.q.y-Va.p.y,null==g&&(g=0),null==f&&(f=0),e.x=f,e.y=g,!(P.dot(Va.temp1,Va.temp1)>c*c)){if(b.m_hasVertex3&&(b=Va.temp1,c=this.m_v3.x-this.m_v2.x,e=this.m_v3.y-this.m_v2.y,null==e&&(e=0),null==c&&(c=0),b.x=c,b.y=e,b=Va.temp2,c=Va.q.x-this.m_v2.x,e=Va.q.y-this.m_v2.y,null==e&&(e=0),null==c&&(c=0),b.x=c,b.y=e,0<P.dot(Va.temp1,Va.temp2)))return;a.m_pointCount=
1;a.m_type=1;b=a.m_localPlaneNormal;b.x=0;b.y=0;b=a.m_localPoint;c=Va.p;b.x=c.x;b.y=c.y;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=Q.VERTEX;a.m_points[0].m_id.typeB=Q.VERTEX;a=a.m_points[0].m_localPoint;d=d.m_p;a.x=d.x;a.y=d.y}}else b=P.dot(Va.e,Va.e),ha.b2Assert(0<b),Va.p.x=1/b*(this.m_v1.x*e+this.m_v2.x*f),Va.p.y=1/b*(this.m_v1.y*e+this.m_v2.y*f),Va.temp1.x=Va.q.x-Va.p.x,Va.temp1.y=Va.q.y-Va.p.y,P.dot(Va.temp1,Va.temp1)>c*c||(b=
Va.temp1,c=-Va.e.y,e=Va.e.x,null==e&&(e=0),null==c&&(c=0),b.x=c,b.y=e,b=Va.temp2,c=Va.q.x-this.m_v1.x,e=Va.q.y-this.m_v1.y,null==e&&(e=0),null==c&&(c=0),b.x=c,b.y=e,0>P.dot(Va.temp1,Va.temp2)&&(b=Va.temp1,b.x=-b.x,b.y=-b.y),Va.temp1.normalize(),a.m_pointCount=1,a.m_type=2,b=a.m_localPlaneNormal,c=Va.temp1,b.x=c.x,b.y=c.y,b=a.m_localPoint,c=this.m_v1,b.x=c.x,b.y=c.y,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=Q.FACE,a.m_points[0].m_id.typeB=
Q.VERTEX,a=a.m_points[0].m_localPoint,d=d.m_p,a.x=d.x,a.y=d.y)},multiplyTransformsInverse:function(a,b,c){this.multiplyRotationsInverse(a.R,b.R,Va.mat);var d=Va.temp2;b=b.position;d.x=b.x;d.y=b.y;Va.temp2.subtract(a.position);this.multiplyRotationVectorInverse(a.R,Va.temp2,c.position);a=c.R.col1;d=Va.mat.col1;a.x=d.x;a.y=d.y;c=c.R.col2;a=Va.mat.col2;c.x=a.x;c.y=a.y},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__:Va});var Uh=function(){ib.call(this)};h["box2D.dynamics.contacts.B2PolyAndCircleContact"]=
Uh;Uh.__name__="box2D.dynamics.contacts.B2PolyAndCircleContact";Uh.create=function(a){return new Uh};Uh.destroy=function(a,b){};Uh.__super__=ib;Uh.prototype=w(ib.prototype,{reset:function(a,b){ib.prototype.reset.call(this,a,b);ha.b2Assert(1==a.getType());ha.b2Assert(0==b.getType())},evaluate:function(){var a=this.m_fixtureA.m_body,b=this.m_fixtureB.m_body;J.collidePolygonAndCircle(this.m_manifold,L.__cast(this.m_fixtureA.getShape(),Lb),a.m_xf,L.__cast(this.m_fixtureB.getShape(),cd),b.m_xf)},__class__:Uh});
var Wh=function(){this.v=new N;this.id=new Q};h["box2D.dynamics.contacts.ClipVertex"]=Wh;Wh.__name__="box2D.dynamics.contacts.ClipVertex";Wh.prototype={v:null,id:null,set:function(a){var b=this.v,c=a.v;b.x=c.x;b.y=c.y;this.id.set(a.id)},__class__:Wh};var mm=function(){};h["box2D.dynamics.contacts.EPAxis"]=mm;mm.__name__="box2D.dynamics.contacts.EPAxis";mm.prototype={type:null,index:null,separation:null,__class__:mm};var Sp=function(){this.vertices=[];this.normals=[];for(var a=0;32>a;)a++,this.vertices.push(new N),
this.normals.push(new N)};h["box2D.dynamics.contacts.TempPolygon"]=Sp;Sp.__name__="box2D.dynamics.contacts.TempPolygon";Sp.prototype={vertices:null,normals:null,count:null,__class__:Sp};var Tp=function(){this.v1=new N;this.v2=new N;this.normal=new N;this.sideNormal1=new N;this.sideNormal2=new N};h["box2D.dynamics.contacts.ReferenceFace"]=Tp;Tp.__name__="box2D.dynamics.contacts.ReferenceFace";Tp.prototype={i1:null,i2:null,v1:null,v2:null,normal:null,sideNormal1:null,sideNormal2:null,sideOffset1:null,
sideOffset2:null,__class__:Tp};var G=function(){ib.call(this)};h["box2D.dynamics.contacts.B2PolyAndEdgeContact"]=G;G.__name__="box2D.dynamics.contacts.B2PolyAndEdgeContact";G.create=function(a){return new G};G.destroy=function(a,b){};G.clipSegmentToLine=function(a,b,c,d,e){var f=0,g=P.dot(c,b[0].v)-d;c=P.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,c=a[f].v,d=b[1].v,c.x=d.x,c.y=d.y,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=Q.VERTEX,a[f].id.typeB=Q.FACE,++f);return f};G.__super__=ib;G.prototype=w(ib.prototype,{m_v0:null,m_v1:null,m_v2:null,m_v3:null,m_front:null,m_radius:null,reset:function(a,b){a.getShape()instanceof Lb?(ib.prototype.reset.call(this,b,a),ha.b2Assert(1==a.getType()),ha.b2Assert(2==b.getType())):(ib.prototype.reset.call(this,a,b),ha.b2Assert(2==a.getType()),ha.b2Assert(1==b.getType()))},evaluate:function(){var a=this.m_fixtureA.getBody(),b=this.m_fixtureB.getBody();this.b2CollidePolyAndEdge(this.m_manifold,
L.__cast(this.m_fixtureA.getShape(),Ug),a.m_xf,L.__cast(this.m_fixtureB.getShape(),Lb),b.m_xf)},b2CollidePolyAndEdge:function(a,b,c,d,e){this.multiplyTransformsInverse(c,e,G.m_xf);this.multiplyTransformVector(G.m_xf,d.m_centroid,G.temp);var f=G.m_centroidB,g=G.temp;f.x=g.x;f.y=g.y;this.m_v0=b.m_v0;this.m_v1=b.m_v1;this.m_v2=b.m_v2;this.m_v3=b.m_v3;var k=b.m_hasVertex0,l=b.m_hasVertex3,m=G.edge1,z=this.m_v2;m.x=z.x;m.y=z.y;G.edge1.subtract(this.m_v1);G.edge1.normalize();var n=G.m_normal1,p=G.edge1.y,
h=-G.edge1.x;null==h&&(h=0);null==p&&(p=0);n.x=p;n.y=h;var q=G.temp,t=G.m_centroidB;q.x=t.x;q.y=t.y;G.temp.subtract(this.m_v1);var r=P.dot(G.m_normal1,G.temp),u=0,x=0,v=!1,w=!1;if(k){var C=G.edge0,J=this.m_v1;C.x=J.x;C.y=J.y;G.edge0.subtract(this.m_v0);G.edge0.normalize();var F=G.m_normal0,B=G.edge0.y,D=-G.edge0.x;null==D&&(D=0);null==B&&(B=0);F.x=B;F.y=D;v=0<=P.crossVV(G.edge0,G.edge1);var E=G.temp,A=G.m_centroidB;E.x=A.x;E.y=A.y;G.temp.subtract(this.m_v0);u=P.dot(G.m_normal0,G.temp)}if(l){var I=
G.edge2,H=this.m_v3;I.x=H.x;I.y=H.y;G.edge2.subtract(this.m_v2);G.edge2.normalize();var K=G.m_normal2,M=G.edge2.y,y=-G.edge2.x;null==y&&(y=0);null==M&&(M=0);K.x=M;K.y=y;w=0<P.crossVV(G.edge1,G.edge2);var L=G.temp,N=G.m_centroidB;L.x=N.x;L.y=N.y;G.temp.subtract(this.m_v2);x=P.dot(G.m_normal2,G.temp)}if(k&&l)if(v&&w)if(this.m_front=0<=u||0<=r||0<=x){var T=G.m_normal,S=G.m_normal1;T.x=S.x;T.y=S.y;var Pa=G.m_lowerLimit,Ca=G.m_normal0;Pa.x=Ca.x;Pa.y=Ca.y;var da=G.m_upperLimit,U=G.m_normal2;da.x=U.x;da.y=
U.y}else{var W=G.m_normal,Aa=G.m_normal1;W.x=Aa.x;W.y=Aa.y;var X=G.m_normal;X.x=-X.x;X.y=-X.y;var Z=G.m_lowerLimit,aa=G.m_normal1;Z.x=aa.x;Z.y=aa.y;var O=G.m_lowerLimit;O.x=-O.x;O.y=-O.y;var ba=G.m_upperLimit,R=G.m_normal1;ba.x=R.x;ba.y=R.y;var Y=G.m_upperLimit;Y.x=-Y.x;Y.y=-Y.y}else if(v)if(this.m_front=0<=u||0<=r&&0<=x){var V=G.m_normal,ea=G.m_normal1;V.x=ea.x;V.y=ea.y;var ia=G.m_lowerLimit,ca=G.m_normal0;ia.x=ca.x;ia.y=ca.y;var cc=G.m_upperLimit,De=G.m_normal1;cc.x=De.x;cc.y=De.y}else{var ma=G.m_normal,
ka=G.m_normal1;ma.x=ka.x;ma.y=ka.y;var la=G.m_normal;la.x=-la.x;la.y=-la.y;var ja=G.m_lowerLimit,oa=G.m_normal2;ja.x=oa.x;ja.y=oa.y;var na=G.m_lowerLimit;na.x=-na.x;na.y=-na.y;var fa=G.m_upperLimit,ra=G.m_normal1;fa.x=ra.x;fa.y=ra.y;var pa=G.m_upperLimit;pa.x=-pa.x;pa.y=-pa.y}else if(w)if(this.m_front=0<=x||0<=u&&0<=r){var qa=G.m_normal,va=G.m_normal1;qa.x=va.x;qa.y=va.y;var Ed=G.m_lowerLimit,xa=G.m_normal1;Ed.x=xa.x;Ed.y=xa.y;var Sa=G.m_upperLimit,ua=G.m_normal2;Sa.x=ua.x;Sa.y=ua.y}else{var sa=G.m_normal,
ya=G.m_normal1;sa.x=ya.x;sa.y=ya.y;var Lc=G.m_normal;Lc.x=-Lc.x;Lc.y=-Lc.y;var Ka=G.m_lowerLimit,Wd=G.m_normal1;Ka.x=Wd.x;Ka.y=Wd.y;var wa=G.m_lowerLimit;wa.x=-wa.x;wa.y=-wa.y;var ta=G.m_upperLimit,ed=G.m_normal0;ta.x=ed.x;ta.y=ed.y;var Ja=G.m_upperLimit;Ja.x=-Ja.x;Ja.y=-Ja.y}else if(this.m_front=0<=u&&0<=r&&0<=x){var pe=G.m_normal,Ba=G.m_normal1;pe.x=Ba.x;pe.y=Ba.y;var za=G.m_lowerLimit,Ea=G.m_normal1;za.x=Ea.x;za.y=Ea.y;var Ia=G.m_upperLimit,Da=G.m_normal1;Ia.x=Da.x;Ia.y=Da.y}else{var Ha=G.m_normal,
Ga=G.m_normal1;Ha.x=Ga.x;Ha.y=Ga.y;var Fa=G.m_normal;Fa.x=-Fa.x;Fa.y=-Fa.y;var Ua=G.m_lowerLimit,Na=G.m_normal2;Ua.x=Na.x;Ua.y=Na.y;var La=G.m_lowerLimit;La.x=-La.x;La.y=-La.y;var Xa=G.m_upperLimit,Ta=G.m_normal0;Xa.x=Ta.x;Xa.y=Ta.y;var Ya=G.m_upperLimit;Ya.x=-Ya.x;Ya.y=-Ya.y}else if(k)if(v)if(this.m_front=0<=u||0<=r){var Wa=G.m_normal,Oa=G.m_normal1;Wa.x=Oa.x;Wa.y=Oa.y;var Va=G.m_lowerLimit,$a=G.m_normal0;Va.x=$a.x;Va.y=$a.y;var Ra=G.m_upperLimit,Za=G.m_normal1;Ra.x=Za.x;Ra.y=Za.y;var bb=G.m_upperLimit;
bb.x=-bb.x;bb.y=-bb.y}else{var Qa=G.m_normal,ab=G.m_normal1;Qa.x=ab.x;Qa.y=ab.y;var Ma=G.m_normal;Ma.x=-Ma.x;Ma.y=-Ma.y;var rb=G.m_lowerLimit,db=G.m_normal1;rb.x=db.x;rb.y=db.y;var fb=G.m_upperLimit,hb=G.m_normal1;fb.x=hb.x;fb.y=hb.y;var eb=G.m_upperLimit;eb.x=-eb.x;eb.y=-eb.y}else if(this.m_front=0<=u&&0<=r){var gb=G.m_normal,ib=G.m_normal1;gb.x=ib.x;gb.y=ib.y;var We=G.m_lowerLimit,pb=G.m_normal1;We.x=pb.x;We.y=pb.y;var mb=G.m_upperLimit,qb=G.m_normal1;mb.x=qb.x;mb.y=qb.y;var nb=G.m_upperLimit;nb.x=
-nb.x;nb.y=-nb.y}else{var ob=G.m_normal,lb=G.m_normal1;ob.x=lb.x;ob.y=lb.y;var jb=G.m_normal;jb.x=-jb.x;jb.y=-jb.y;var cb=G.m_lowerLimit,ub=G.m_normal1;cb.x=ub.x;cb.y=ub.y;var tb=G.m_upperLimit,sb=G.m_normal0;tb.x=sb.x;tb.y=sb.y;var Wc=G.m_upperLimit;Wc.x=-Wc.x;Wc.y=-Wc.y}else if(l)if(w)if(this.m_front=0<=r||0<=x){var kb=G.m_normal,vb=G.m_normal1;kb.x=vb.x;kb.y=vb.y;var yb=G.m_lowerLimit,Ab=G.m_normal1;yb.x=Ab.x;yb.y=Ab.y;var xb=G.m_lowerLimit;xb.x=-xb.x;xb.y=-xb.y;var Bb=G.m_upperLimit,Qb=G.m_normal2;
Bb.x=Qb.x;Bb.y=Qb.y}else{var Cb=G.m_normal,Hb=G.m_normal1;Cb.x=Hb.x;Cb.y=Hb.y;var wb=G.m_normal;wb.x=-wb.x;wb.y=-wb.y;var Eb=G.m_lowerLimit,Gb=G.m_normal1;Eb.x=Gb.x;Eb.y=Gb.y;var zb=G.m_lowerLimit;zb.x=-zb.x;zb.y=-zb.y;var Ib=G.m_upperLimit,Nb=G.m_normal1;Ib.x=Nb.x;Ib.y=Nb.y}else if(this.m_front=0<=r&&0<=x){var Pb=G.m_normal,Lb=G.m_normal1;Pb.x=Lb.x;Pb.y=Lb.y;var Mb=G.m_lowerLimit,Ob=G.m_normal1;Mb.x=Ob.x;Mb.y=Ob.y;var Jb=G.m_lowerLimit;Jb.x=-Jb.x;Jb.y=-Jb.y;var Kb=G.m_upperLimit,id=G.m_normal1;Kb.x=
id.x;Kb.y=id.y}else{var Fb=G.m_normal,Db=G.m_normal1;Fb.x=Db.x;Fb.y=Db.y;var ig=G.m_normal;ig.x=-ig.x;ig.y=-ig.y;var Sb=G.m_lowerLimit,Ub=G.m_normal2;Sb.x=Ub.x;Sb.y=Ub.y;var Rb=G.m_lowerLimit;Rb.x=-Rb.x;Rb.y=-Rb.y;var Wb=G.m_upperLimit,Xb=G.m_normal1;Wb.x=Xb.x;Wb.y=Xb.y}else if(this.m_front=0<=r){var oe=G.m_normal,Zb=G.m_normal1;oe.x=Zb.x;oe.y=Zb.y;var Tb=G.m_lowerLimit,Yb=G.m_normal1;Tb.x=Yb.x;Tb.y=Yb.y;var Vb=G.m_lowerLimit;Vb.x=-Vb.x;Vb.y=-Vb.y;var bc=G.m_upperLimit,dc=G.m_normal1;bc.x=dc.x;bc.y=
dc.y;var $b=G.m_upperLimit;$b.x=-$b.x;$b.y=-$b.y}else{var hc=G.m_normal,fc=G.m_normal1;hc.x=fc.x;hc.y=fc.y;var gc=G.m_normal;gc.x=-gc.x;gc.y=-gc.y;var oc=G.m_lowerLimit,kc=G.m_normal1;oc.x=kc.x;oc.y=kc.y;var Md=G.m_upperLimit,rc=G.m_normal1;Md.x=rc.x;Md.y=rc.y}G.m_polygonB.count=d.m_vertexCount;for(var sc=0,ec=d.m_vertexCount;sc<ec;){var ic=sc++;this.multiplyTransformVector(G.m_xf,d.m_vertices[ic],G.temp);var mc=G.m_polygonB.vertices[ic],nc=G.temp;mc.x=nc.x;mc.y=nc.y;this.multiplyRotationVector(G.m_xf.R,
d.m_normals[ic],G.temp);var pc=G.m_polygonB.normals[ic],Ve=G.temp;pc.x=Ve.x;pc.y=Ve.y}this.m_radius=2*ha.b2_polygonRadius;a.m_pointCount=0;this.computeEdgeSeparation(G.edgeAxis);if(!(G.edgeAxis.type==Xh.UNKNOWN||G.edgeAxis.separation>this.m_radius||(this.computePolygonSeparation(G.polygonAxis),G.polygonAxis.type!=Xh.UNKNOWN&&G.polygonAxis.separation>this.m_radius))){var jc=G.polygonAxis.type==Xh.UNKNOWN?G.edgeAxis:G.polygonAxis.separation>.98*G.edgeAxis.separation+.001?G.polygonAxis:G.edgeAxis;if(jc.type==
Xh.EDGE_A){a.m_type=2;for(var uc=0,ac=P.dot(G.m_normal,G.m_polygonB.normals[0]),vc=1,yc=G.m_polygonB.count;vc<yc;){var wc=vc++,xc=P.dot(G.m_normal,G.m_polygonB.normals[wc]);xc<ac&&(ac=xc,uc=wc)}var lc=uc,zc=lc+1<G.m_polygonB.count?lc+1:0,tc=G.ie[0].v,bd=G.m_polygonB.vertices[lc];tc.x=bd.x;tc.y=bd.y;G.ie[0].id.indexA=0;G.ie[0].id.indexB=lc;G.ie[0].id.typeA=Q.FACE;G.ie[0].id.typeB=Q.VERTEX;var Ec=G.ie[1].v,Gc=G.m_polygonB.vertices[zc];Ec.x=Gc.x;Ec.y=Gc.y;G.ie[1].id.indexA=0;G.ie[1].id.indexB=zc;G.ie[1].id.typeA=
Q.FACE;G.ie[1].id.typeB=Q.VERTEX;if(this.m_front){G.rf.i1=0;G.rf.i2=1;var Hc=G.rf.v1,Ic=this.m_v1;Hc.x=Ic.x;Hc.y=Ic.y;var Cc=G.rf.v2,Fc=this.m_v2;Cc.x=Fc.x;Cc.y=Fc.y;var Ac=G.rf.normal,Bc=G.m_normal1;Ac.x=Bc.x;Ac.y=Bc.y}else{G.rf.i1=1;G.rf.i2=0;var qc=G.rf.v1,Dd=this.m_v2;qc.x=Dd.x;qc.y=Dd.y;var Xe=G.rf.v2,Pc=this.m_v1;Xe.x=Pc.x;Xe.y=Pc.y;var Vd=G.rf.normal,Qc=G.m_normal1;Vd.x=Qc.x;Vd.y=Qc.y;var Dc=G.rf.normal;Dc.x=-Dc.x;Dc.y=-Dc.y}}else{a.m_type=4;var Uc=G.ie[0].v,Kc=this.m_v1;Uc.x=Kc.x;Uc.y=Kc.y;
G.ie[0].id.indexA=0;G.ie[0].id.indexB=jc.index;G.ie[0].id.typeA=Q.VERTEX;G.ie[0].id.typeB=Q.FACE;var Xc=G.ie[1].v,Rc=this.m_v2;Xc.x=Rc.x;Xc.y=Rc.y;G.ie[1].id.indexA=0;G.ie[1].id.indexB=jc.index;G.ie[1].id.typeA=Q.VERTEX;G.ie[1].id.typeB=Q.FACE;G.rf.i1=jc.index;G.rf.i2=G.rf.i1+1<G.m_polygonB.count?G.rf.i1+1:0;var Zc=G.rf.v1,$c=G.m_polygonB.vertices[G.rf.i1];Zc.x=$c.x;Zc.y=$c.y;var Oc=G.rf.v2,Vc=G.m_polygonB.vertices[G.rf.i2];Oc.x=Vc.x;Oc.y=Vc.y;var cd=G.rf.normal,fd=G.m_polygonB.normals[G.rf.i1];cd.x=
fd.x;cd.y=fd.y}var gd=G.rf.sideNormal1,Jc=G.rf.normal.y,Nc=-G.rf.normal.x;null==Nc&&(Nc=0);null==Jc&&(Jc=0);gd.x=Jc;gd.y=Nc;var kd=G.rf.sideNormal2,md=G.rf.sideNormal1;kd.x=md.x;kd.y=md.y;var ad=G.rf.sideNormal2;ad.x=-ad.x;ad.y=-ad.y;G.rf.sideOffset1=P.dot(G.rf.sideNormal1,G.rf.v1);G.rf.sideOffset2=P.dot(G.rf.sideNormal2,G.rf.v2);var hd=G.clipSegmentToLine(G.clipPoints1,G.ie,G.rf.sideNormal1,G.rf.sideOffset1,G.rf.i1);if(!(hd<ha.b2_maxManifoldPoints||(hd=G.clipSegmentToLine(G.clipPoints2,G.clipPoints1,
G.rf.sideNormal2,G.rf.sideOffset2,G.rf.i2),hd<ha.b2_maxManifoldPoints))){if(jc.type==Xh.EDGE_A){var rd=a.m_localPlaneNormal,td=G.rf.normal;rd.x=td.x;rd.y=td.y;var pd=a.m_localPoint,qd=G.rf.v1;pd.x=qd.x;pd.y=qd.y}else{var uh=a.m_localPlaneNormal,ud=d.m_normals[G.rf.i1];uh.x=ud.x;uh.y=ud.y;var nd=a.m_localPoint,od=d.m_vertices[G.rf.i1];nd.x=od.x;nd.y=od.y}for(var vd=0,jd=0,yd=ha.b2_maxManifoldPoints;jd<yd;){var Sc=jd++,ld=G.temp,Tc=G.clipPoints2[Sc].v;ld.x=Tc.x;ld.y=Tc.y;G.temp.subtract(G.rf.v1);if(P.dot(G.rf.normal,
G.temp)<=this.m_radius){var dd=a.m_points[vd];if(jc.type==Xh.EDGE_A){var Mc=dd.m_localPoint,Ad=P.mulXT(G.m_xf,G.clipPoints2[Sc].v);Mc.x=Ad.x;Mc.y=Ad.y;dd.m_id.set(G.clipPoints2[Sc].id)}else{var Bd=dd.m_localPoint,Cd=G.clipPoints2[Sc].v;Bd.x=Cd.x;Bd.y=Cd.y;dd.m_id.typeA=G.clipPoints2[Sc].id.typeB;dd.m_id.typeB=G.clipPoints2[Sc].id.typeA;dd.m_id.indexA=G.clipPoints2[Sc].id.indexB;dd.m_id.indexB=G.clipPoints2[Sc].id.indexA}++vd}}a.m_pointCount=vd}}},computeEdgeSeparation:function(a){a.type=Xh.EDGE_A;
a.index=this.m_front?0:1;a.separation=Number.MAX_VALUE;for(var b=0,c=G.m_polygonB.count;b<c;){var d=b++,e=G.temp;d=G.m_polygonB.vertices[d];e.x=d.x;e.y=d.y;G.temp.subtract(this.m_v1);e=P.dot(G.m_normal,G.temp);e<a.separation&&(a.separation=e)}},computePolygonSeparation:function(a){a.type=Xh.UNKNOWN;a.index=-1;a.separation=-Number.MAX_VALUE;var b=G.perp,c=-G.m_normal.y,d=G.m_normal.x;null==d&&(d=0);null==c&&(c=0);b.x=c;b.y=d;b=0;for(c=G.m_polygonB.count;b<c;){d=b++;var e=G.n,f=G.m_polygonB.normals[d];
e.x=f.x;e.y=f.y;e=G.n;e.x=-e.x;e.y=-e.y;e=G.temp;f=G.m_polygonB.vertices[d];e.x=f.x;e.y=f.y;G.temp.subtract(this.m_v1);e=P.dot(G.n,G.temp);f=G.temp;var g=G.m_polygonB.vertices[d];f.x=g.x;f.y=g.y;G.temp.subtract(this.m_v2);f=P.dot(G.n,G.temp);e=Math.min(e,f);if(e>this.m_radius){a.type=Xh.EDGE_B;a.index=d;a.separation=e;break}0<=P.dot(G.n,G.perp)?(f=G.temp,g=G.n,f.x=g.x,f.y=g.y,G.temp.subtract(G.m_upperLimit)):(f=G.temp,g=G.n,f.x=g.x,f.y=g.y,G.temp.subtract(G.m_lowerLimit));!(P.dot(G.temp,G.m_normal)<
-ha.b2_angularSlop)&&e>a.separation&&(a.type=Xh.EDGE_B,a.index=d,a.separation=e)}},multiplyTransformsInverse:function(a,b,c){this.multiplyRotationsInverse(a.R,b.R,G.mat);var d=G.temp2;b=b.position;d.x=b.x;d.y=b.y;G.temp2.subtract(a.position);this.multiplyRotationVectorInverse(a.R,G.temp2,c.position);a=c.R.col1;d=G.mat.col1;a.x=d.x;a.y=d.y;c=c.R.col2;a=G.mat.col2;c.x=a.x;c.y=a.y},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__:G});var Xh=C["box2D.dynamics.contacts.Type"]={__ename__:"box2D.dynamics.contacts.Type",
__constructs__:["UNKNOWN","EDGE_A","EDGE_B"],UNKNOWN:{_hx_index:0,__enum__:"box2D.dynamics.contacts.Type",toString:u},EDGE_A:{_hx_index:1,__enum__:"box2D.dynamics.contacts.Type",toString:u},EDGE_B:{_hx_index:2,__enum__:"box2D.dynamics.contacts.Type",toString:u}},Vh=function(){ib.call(this)};h["box2D.dynamics.contacts.B2PolygonContact"]=Vh;Vh.__name__="box2D.dynamics.contacts.B2PolygonContact";Vh.create=function(a){return new Vh};Vh.destroy=function(a,b){};Vh.__super__=ib;Vh.prototype=w(ib.prototype,
{reset:function(a,b){ib.prototype.reset.call(this,a,b)},evaluate:function(){var a=this.m_fixtureA.getBody(),b=this.m_fixtureB.getBody();J.collidePolygons(this.m_manifold,L.__cast(this.m_fixtureA.getShape(),Lb),a.m_xf,L.__cast(this.m_fixtureB.getShape(),Lb),b.m_xf)},__class__:Vh});var ct=function(){};h["box2D.dynamics.controllers.B2Controller"]=ct;ct.__name__="box2D.dynamics.controllers.B2Controller";ct.prototype={step:function(a){},draw:function(a){},addBody:function(a){var b=new Up;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},
m_next:null,m_prev:null,m_bodyList:null,m_bodyCount:null,m_world:null,__class__:ct};var Up=function(){};h["box2D.dynamics.controllers.B2ControllerEdge"]=Up;Up.__name__="box2D.dynamics.controllers.B2ControllerEdge";Up.prototype={controller:null,body:null,prevBody:null,nextBody:null,prevController:null,nextController:null,__class__:Up};var Yb=function(a){this.m_edgeA=new nm;this.m_edgeB=new nm;this.m_localCenterA=new N;this.m_localCenterB=new N;ha.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};h["box2D.dynamics.joints.B2Joint"]=Yb;Yb.__name__="box2D.dynamics.joints.B2Joint";Yb.create=function(a,b){b=null;3==a.type?b=new lj(L.__cast(a,Ci)):5==a.type?b=new om(L.__cast(a,pm)):2==a.type?b=new mj(L.__cast(a,qm)):1==a.type?b=new Dg(L.__cast(a,Di)):4==a.type?b=new Vg(L.__cast(a,rm)):6==a.type?b=new sm(L.__cast(a,tm)):7==a.type?b=new Nk(L.__cast(a,
Ei)):8==a.type?b=new um(L.__cast(a,vm)):9==a.type&&(b=new wm(L.__cast(a,xm)));return b};Yb.destroy=function(a,b){};Yb.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():!1},initVelocityConstraints:function(a){},solveVelocityConstraints:function(a){},finalizeVelocityConstraints:function(){},solvePositionConstraints:function(a){return!1},m_type:null,m_prev:null,m_next:null,m_edgeA:null,m_edgeB:null,m_bodyA:null,m_bodyB:null,m_islandFlag:null,m_collideConnected:null,m_userData:null,m_localCenterA:null,m_localCenterB:null,m_invMassA:null,m_invMassB:null,m_invIA:null,m_invIB:null,ID:null,__class__:Yb};
var lj=function(a){Yb.call(this,a);this.m_localAnchor1=new N;this.m_localAnchor2=new N;this.m_u=new N;var b=this.m_localAnchor1,c=a.localAnchorA;b.x=c.x;b.y=c.y;b=this.m_localAnchor2;c=a.localAnchorB;b.x=c.x;b.y=c.y;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};h["box2D.dynamics.joints.B2DistanceJoint"]=lj;lj.__name__="box2D.dynamics.joints.B2DistanceJoint";lj.__super__=Yb;lj.prototype=w(Yb.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 N(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=this.m_bodyA,c=this.m_bodyB,d=b.m_xf.R,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,l=this.m_localAnchor2.y-c.m_sweep.localCenter.y;g=d.col1.x*k+d.col2.x*l;l=d.col1.y*k+d.col2.y*l;k=g;this.m_u.x=c.m_sweep.c.x+k-b.m_sweep.c.x-e;this.m_u.y=c.m_sweep.c.y+l-b.m_sweep.c.y-f;d=Math.sqrt(this.m_u.x*
this.m_u.x+this.m_u.y*this.m_u.y);d>ha.b2_linearSlop?this.m_u.multiply(1/d):(g=this.m_u,g.x=0,g.y=0);g=e*this.m_u.y-f*this.m_u.x;var m=k*this.m_u.y-l*this.m_u.x;g=b.m_invMass+b.m_invI*g*g+c.m_invMass+c.m_invI*m*m;this.m_mass=0!=g?1/g:0;if(0<this.m_frequencyHz){d-=this.m_length;m=2*Math.PI*this.m_frequencyHz;var z=this.m_mass*m*m;this.m_gamma=a.dt*(2*this.m_mass*this.m_dampingRatio*m+a.dt*z);this.m_gamma=0!=this.m_gamma?1/this.m_gamma:0;this.m_bias=d*a.dt*z*this.m_gamma;this.m_mass=g+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,d=this.m_impulse*this.m_u.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*a,c.m_linearVelocity.y+=c.m_invMass*d,c.m_angularVelocity+=c.m_invI*(k*d-l*a)):this.m_impulse=0},solveVelocityConstraints:function(a){a=this.m_bodyA;var b=this.m_bodyB,c=a.m_xf.R,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;f=-this.m_mass*(this.m_u.x*(b.m_linearVelocity.x+-b.m_angularVelocity*k-(a.m_linearVelocity.x+-a.m_angularVelocity*e))+this.m_u.y*(b.m_linearVelocity.y+b.m_angularVelocity*g-(a.m_linearVelocity.y+a.m_angularVelocity*d))+this.m_bias+this.m_gamma*
this.m_impulse);this.m_impulse+=f;c=f*this.m_u.x;f*=this.m_u.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*c;b.m_linearVelocity.y+=b.m_invMass*f;b.m_angularVelocity+=b.m_invI*(g*f-k*c)},solvePositionConstraints:function(a){if(0<this.m_frequencyHz)return!0;a=this.m_bodyA;var b=this.m_bodyB,c=a.m_xf.R,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;var l=b.m_sweep.c.x+g-a.m_sweep.c.x-d,m=b.m_sweep.c.y+k-a.m_sweep.c.y-e;c=Math.sqrt(l*l+m*m);l/=c;m/=c;c-=this.m_length;c=P.clamp(c,-ha.b2_maxLinearCorrection,ha.b2_maxLinearCorrection);f=-this.m_mass*c;var z=this.m_u;null==m&&(m=0);null==l&&(l=0);z.x=l;z.y=m;m=f*this.m_u.x;f*=this.m_u.y;
a.m_sweep.c.x-=a.m_invMass*m;a.m_sweep.c.y-=a.m_invMass*f;a.m_sweep.a-=a.m_invI*(d*f-e*m);b.m_sweep.c.x+=b.m_invMass*m;b.m_sweep.c.y+=b.m_invMass*f;b.m_sweep.a+=b.m_invI*(g*f-k*m);a.synchronizeTransform();b.synchronizeTransform();return P.abs(c)<ha.b2_linearSlop},m_localAnchor1:null,m_localAnchor2:null,m_u:null,m_frequencyHz:null,m_dampingRatio:null,m_gamma:null,m_bias:null,m_impulse:null,m_mass:null,m_length:null,__class__:lj});var td=function(){this.type=0;this.bodyB=this.bodyA=this.userData=null;
this.collideConnected=!1};h["box2D.dynamics.joints.B2JointDef"]=td;td.__name__="box2D.dynamics.joints.B2JointDef";td.prototype={type:null,userData:null,bodyA:null,bodyB:null,collideConnected:null,ID:null,actor1:null,actor2:null,__class__:td};var Ci=function(){td.call(this);this.localAnchorA=new N;this.localAnchorB=new N;this.type=3;this.length=1;this.dampingRatio=this.frequencyHz=0};h["box2D.dynamics.joints.B2DistanceJointDef"]=Ci;Ci.__name__="box2D.dynamics.joints.B2DistanceJointDef";Ci.__super__=
td;Ci.prototype=w(td.prototype,{initialize:function(a,b,c,d){this.bodyA=a;this.bodyB=b;a=this.localAnchorA;b=this.bodyA.getLocalPoint(c);a.x=b.x;a.y=b.y;a=this.localAnchorB;b=this.bodyB.getLocalPoint(d);a.x=b.x;a.y=b.y;a=d.x-c.x;c=d.y-c.y;this.length=Math.sqrt(a*a+c*c);this.dampingRatio=this.frequencyHz=0},localAnchorA:null,localAnchorB:null,length:null,frequencyHz:null,dampingRatio:null,__class__:Ci});var wm=function(a){Yb.call(this,a);this.m_localAnchorA=new N;this.m_localAnchorB=new N;this.m_linearMass=
new Qc;this.m_linearImpulse=new N;var b=this.m_localAnchorA,c=a.localAnchorA;b.x=c.x;b.y=c.y;b=this.m_localAnchorB;c=a.localAnchorB;b.x=c.x;b.y=c.y;this.m_linearMass.setZero();this.m_angularMass=0;b=this.m_linearImpulse;b.x=0;this.m_angularImpulse=b.y=0;this.m_maxForce=a.maxForce;this.m_maxTorque=a.maxTorque};h["box2D.dynamics.joints.B2FrictionJoint"]=wm;wm.__name__="box2D.dynamics.joints.B2FrictionJoint";wm.__super__=Yb;wm.prototype=w(Yb.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 N(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=this.m_bodyA,c=this.m_bodyB,d=b.m_xf.R,e=
this.m_localAnchorA.x-b.m_sweep.localCenter.x,f=this.m_localAnchorA.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_localAnchorB.x-c.m_sweep.localCenter.x,l=this.m_localAnchorB.y-c.m_sweep.localCenter.y;g=d.col1.x*k+d.col2.x*l;l=d.col1.y*k+d.col2.y*l;k=g;d=b.m_invMass;g=c.m_invMass;var m=b.m_invI,z=c.m_invI,n=new Qc;n.col1.x=d+g;n.col2.x=0;n.col1.y=0;n.col2.y=d+g;n.col1.x+=m*f*f;n.col2.x+=-m*e*f;n.col1.y+=-m*e*f;n.col2.y+=m*e*e;n.col1.x+=z*l*l;
n.col2.x+=-z*k*l;n.col1.y+=-z*k*l;n.col2.y+=z*k*k;n.getInverse(this.m_linearMass);this.m_angularMass=m+z;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,b.m_linearVelocity.x-=d*a.x,b.m_linearVelocity.y-=d*a.y,b.m_angularVelocity-=m*(e*a.y-f*a.x+this.m_angularImpulse),c.m_linearVelocity.x+=g*a.x,c.m_linearVelocity.y+=g*a.y,c.m_angularVelocity+=
z*(k*a.y-l*a.x+this.m_angularImpulse)):(b=this.m_linearImpulse,b.x=0,this.m_angularImpulse=b.y=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=b.m_invMass,l=c.m_invMass,m=b.m_invI,z=c.m_invI,n=b.m_xf.R,p=this.m_localAnchorA.x-b.m_sweep.localCenter.x,h=this.m_localAnchorA.y-b.m_sweep.localCenter.y,q=n.col1.x*p+n.col2.x*h;h=n.col1.y*p+n.col2.y*h;p=q;n=c.m_xf.R;var t=this.m_localAnchorB.x-
c.m_sweep.localCenter.x,r=this.m_localAnchorB.y-c.m_sweep.localCenter.y;q=n.col1.x*t+n.col2.x*r;r=n.col1.y*t+n.col2.y*r;t=q;q=-this.m_angularMass*(g-e);var u=this.m_angularImpulse;n=a.dt*this.m_maxTorque;this.m_angularImpulse=P.clamp(this.m_angularImpulse+q,-n,n);q=this.m_angularImpulse-u;e-=m*q;g+=z*q;n=P.mulMV(this.m_linearMass,new N(-(f.x-g*r-d.x+e*h),-(f.y+g*t-d.y-e*p)));q=this.m_linearImpulse.copy();this.m_linearImpulse.add(n);n=a.dt*this.m_maxForce;this.m_linearImpulse.lengthSquared()>n*n&&
(this.m_linearImpulse.normalize(),this.m_linearImpulse.multiply(n));n=P.subtractVV(this.m_linearImpulse,q);d.x-=k*n.x;d.y-=k*n.y;e-=m*(p*n.y-h*n.x);f.x+=l*n.x;f.y+=l*n.y;g+=z*(t*n.y-r*n.x);b.m_angularVelocity=e;c.m_angularVelocity=g},solvePositionConstraints:function(a){return!0},m_localAnchorA:null,m_localAnchorB:null,m_linearMass:null,m_angularMass:null,m_linearImpulse:null,m_angularImpulse:null,m_maxForce:null,m_maxTorque:null,__class__:wm});var xm=function(){td.call(this);this.localAnchorA=new N;
this.localAnchorB=new N;this.type=9;this.maxTorque=this.maxForce=0};h["box2D.dynamics.joints.B2FrictionJointDef"]=xm;xm.__name__="box2D.dynamics.joints.B2FrictionJointDef";xm.__super__=td;xm.prototype=w(td.prototype,{initialize:function(a,b,c){this.bodyA=a;this.bodyB=b;a=this.localAnchorA;b=this.bodyA.getLocalPoint(c);a.x=b.x;a.y=b.y;a=this.localAnchorB;c=this.bodyB.getLocalPoint(c);a.x=c.x;a.y=c.y},localAnchorA:null,localAnchorB:null,maxForce:null,maxTorque:null,__class__:xm});var sm=function(a){Yb.call(this,
a);this.m_groundAnchor1=new N;this.m_groundAnchor2=new N;this.m_localAnchor1=new N;this.m_localAnchor2=new N;this.m_J=new Vp;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();if(1==b){this.m_revolute1=L.__cast(a.joint1,Dg);b=this.m_groundAnchor1;var d=this.m_revolute1.m_localAnchor1;b.x=d.x;b.y=d.y;b=this.m_localAnchor1;d=this.m_revolute1.m_localAnchor2;b.x=d.x;b.y=
d.y;b=this.m_revolute1.getJointAngle()}else this.m_prismatic1=L.__cast(a.joint1,mj),b=this.m_groundAnchor1,d=this.m_prismatic1.m_localAnchor1,b.x=d.x,b.y=d.y,b=this.m_localAnchor1,d=this.m_prismatic1.m_localAnchor2,b.x=d.x,b.y=d.y,b=this.m_prismatic1.getJointTranslation();this.m_ground2=a.joint2.getBodyA();this.m_bodyB=a.joint2.getBodyB();1==c?(this.m_revolute2=L.__cast(a.joint2,Dg),c=this.m_groundAnchor2,d=this.m_revolute2.m_localAnchor1,c.x=d.x,c.y=d.y,c=this.m_localAnchor2,d=this.m_revolute2.m_localAnchor2,
c.x=d.x,c.y=d.y,c=this.m_revolute2.getJointAngle()):(this.m_prismatic2=L.__cast(a.joint2,mj),c=this.m_groundAnchor2,d=this.m_prismatic2.m_localAnchor1,c.x=d.x,c.y=d.y,c=this.m_localAnchor2,d=this.m_prismatic2.m_localAnchor2,c.x=d.x,c.y=d.y,c=this.m_prismatic2.getJointTranslation());this.m_ratio=a.ratio;this.m_constant=b+this.m_ratio*c;this.m_impulse=0};h["box2D.dynamics.joints.B2GearJoint"]=sm;sm.__name__="box2D.dynamics.joints.B2GearJoint";sm.__super__=Yb;sm.prototype=w(Yb.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 N(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=0;this.m_J.setZero();if(null!=this.m_revolute1)this.m_J.angularA=-1,f+=d.m_invI;else{var g=b.m_xf.R;b=this.m_prismatic1.m_localXAxis1;var k=g.col1.x*b.x+g.col2.x*b.y;b=g.col1.y*b.x+g.col2.y*b.y;g=d.m_xf.R;var l=this.m_localAnchor1.x-d.m_sweep.localCenter.x;var m=this.m_localAnchor1.y-d.m_sweep.localCenter.y;
var z=g.col1.x*l+g.col2.x*m;m=g.col1.y*l+g.col2.y*m;g=z*b-m*k;l=this.m_J.linearA;k=-k;b=-b;null==b&&(b=0);null==k&&(k=0);l.x=k;l.y=b;this.m_J.angularA=-g;f+=d.m_invMass+d.m_invI*g*g}null!=this.m_revolute2?(this.m_J.angularB=-this.m_ratio,f+=this.m_ratio*this.m_ratio*e.m_invI):(g=c.m_xf.R,b=this.m_prismatic2.m_localXAxis1,k=g.col1.x*b.x+g.col2.x*b.y,b=g.col1.y*b.x+g.col2.y*b.y,g=e.m_xf.R,l=this.m_localAnchor2.x-e.m_sweep.localCenter.x,m=this.m_localAnchor2.y-e.m_sweep.localCenter.y,z=g.col1.x*l+g.col2.x*
m,m=g.col1.y*l+g.col2.y*m,g=z*b-m*k,c=this.m_J.linearB,k*=-this.m_ratio,b*=-this.m_ratio,null==b&&(b=0),null==k&&(k=0),c.x=k,c.y=b,this.m_J.angularB=-this.m_ratio*g,f+=this.m_ratio*this.m_ratio*(e.m_invMass+e.m_invI*g*g));this.m_mass=0<f?1/f: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;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;var c=null!=this.m_revolute1?this.m_revolute1.getJointAngle():this.m_prismatic1.getJointTranslation();var 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<ha.b2_linearSlop},m_ground1:null,m_ground2:null,m_revolute1:null,m_prismatic1:null,m_revolute2:null,m_prismatic2:null,m_groundAnchor1:null,m_groundAnchor2:null,m_localAnchor1:null,
m_localAnchor2:null,m_J:null,m_constant:null,m_ratio:null,m_mass:null,m_impulse:null,__class__:sm});var tm=function(){td.call(this);this.type=6;this.joint2=this.joint1=null;this.ratio=1};h["box2D.dynamics.joints.B2GearJointDef"]=tm;tm.__name__="box2D.dynamics.joints.B2GearJointDef";tm.__super__=td;tm.prototype=w(td.prototype,{joint1:null,joint2:null,ratio:null,__class__:tm});var Vp=function(){this.linearA=new N;this.linearB=new N};h["box2D.dynamics.joints.B2Jacobian"]=Vp;Vp.__name__="box2D.dynamics.joints.B2Jacobian";
Vp.prototype={linearA:null,angularA:null,linearB:null,angularB:null,setZero:function(){var a=this.linearA;a.x=0;this.angularA=a.y=0;a=this.linearB;a.x=0;this.angularB=a.y=0},set:function(a,b,c,d){var e=this.linearA;e.x=a.x;e.y=a.y;this.angularA=b;a=this.linearB;a.x=c.x;a.y=c.y;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__:Vp};var nm=function(){};h["box2D.dynamics.joints.B2JointEdge"]=
nm;nm.__name__="box2D.dynamics.joints.B2JointEdge";nm.prototype={other:null,joint:null,prev:null,next:null,__class__:nm};var Nk=function(a){Yb.call(this,a);this.m_localAnchor1=new N;this.m_localAnchor2=new N;this.m_localXAxis1=new N;this.m_localYAxis1=new N;this.m_axis=new N;this.m_perp=new N;this.m_K=new Qc;this.m_impulse=new N;var b=this.m_localAnchor1,c=a.localAnchorA;b.x=c.x;b.y=c.y;b=this.m_localAnchor2;c=a.localAnchorB;b.x=c.x;b.y=c.y;b=this.m_localXAxis1;c=a.localAxisA;b.x=c.x;b.y=c.y;this.m_localYAxis1.x=
-this.m_localXAxis1.y;this.m_localYAxis1.y=this.m_localXAxis1.x;b=this.m_impulse;b.x=0;this.m_motorImpulse=this.m_motorMass=b.y=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=0;a=this.m_axis;a.x=0;a.y=0;a=this.m_perp;a.x=0;a.y=0};h["box2D.dynamics.joints.B2LineJoint"]=Nk;Nk.__name__="box2D.dynamics.joints.B2LineJoint";
Nk.__super__=Yb;Nk.prototype=w(Yb.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 N(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=a.m_xf.R,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);f=b.m_sweep.c.y+k-(a.m_sweep.c.y+e);var l=a.getWorldVector(this.m_localXAxis1),m=a.m_linearVelocity,z=b.m_linearVelocity;a=a.m_angularVelocity;b=b.m_angularVelocity;return c*-a*l.y+f*a*l.x+(l.x*(z.x+-b*k-m.x- -a*e)+l.y*(z.y+b*g-m.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=this.m_localCenterA,e=b.getLocalCenter();d.x=e.x;d.y=e.y;d=this.m_localCenterB;e=c.getLocalCenter();d.x=e.x;d.y=e.y;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 l=this.m_localAnchor2.x-this.m_localCenterB.x,m=this.m_localAnchor2.y-this.m_localCenterB.y;e=d.col1.x*l+d.col2.x*m;m=d.col1.y*l+d.col2.y*m;l=e;d=c.m_sweep.c.x+l-b.m_sweep.c.x-g;e=c.m_sweep.c.y+m-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;var z=this.m_axis,n=P.mulMV(f.R,this.m_localXAxis1);z.x=n.x;z.y=n.y;this.m_a1=(d+g)*this.m_axis.y-(e+k)*this.m_axis.x;this.m_a2=l*this.m_axis.y-
m*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;z=this.m_perp;f=P.mulMV(f.R,this.m_localYAxis1);z.x=f.x;z.y=f.y;this.m_s1=(d+g)*this.m_perp.y-(e+k)*this.m_perp.x;this.m_s2=l*this.m_perp.y-m*this.m_perp.x;g=this.m_invMassA;k=this.m_invMassB;l=this.m_invIA;m=this.m_invIB;this.m_K.col1.x=g+k+l*this.m_s1*this.m_s1+m*this.m_s2*this.m_s2;this.m_K.col1.y=
l*this.m_s1*this.m_a1+m*this.m_s2*this.m_a2;this.m_K.col2.x=this.m_K.col1.y;this.m_K.col2.y=g+k+l*this.m_a1*this.m_a1+m*this.m_a2*this.m_a2;this.m_enableLimit?(d=this.m_axis.x*d+this.m_axis.y*e,P.abs(this.m_upperTranslation-this.m_lowerTranslation)<2*ha.b2_linearSlop?this.m_limitState=3:d<=this.m_lowerTranslation?1!=this.m_limitState&&(this.m_limitState=1,this.m_impulse.y=0):d>=this.m_upperTranslation?2!=this.m_limitState&&(this.m_limitState=2,this.m_impulse.y=0):(this.m_limitState=0,this.m_impulse.y=
0)):this.m_limitState=0;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,g=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*g):(b=this.m_impulse,b.x=0,this.m_motorImpulse=b.y=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;if(this.m_enableMotor&&3!=this.m_limitState){var k=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));var l=this.m_motorImpulse;a=a.dt*this.m_maxMotorForce;this.m_motorImpulse=P.clamp(this.m_motorImpulse+k,-a,a);k=this.m_motorImpulse-l;l=k*this.m_axis.x;a=k*this.m_axis.y;var m=k*this.m_a1;k*=this.m_a2;d.x-=this.m_invMassA*l;d.y-=this.m_invMassA*a;e-=this.m_invIA*m;f.x+=this.m_invMassB*l;f.y+=this.m_invMassB*a;g+=this.m_invIB*k}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&&
0!=this.m_limitState?(m=this.m_axis.x*(f.x-d.x)+this.m_axis.y*(f.y-d.y)+this.m_a2*g-this.m_a1*e,l=this.m_impulse.copy(),k=this.m_K.solve(new N,-a,-m),this.m_impulse.add(k),1==this.m_limitState?this.m_impulse.y=P.max(this.m_impulse.y,0):2==this.m_limitState&&(this.m_impulse.y=P.min(this.m_impulse.y,0)),a=-a-(this.m_impulse.y-l.y)*this.m_K.col2.x,this.m_impulse.x=0!=this.m_K.col1.x?a/this.m_K.col1.x+l.x:l.x,k.x=this.m_impulse.x-l.x,k.y=this.m_impulse.y-l.y,l=k.x*this.m_perp.x+k.y*this.m_axis.x,a=k.x*
this.m_perp.y+k.y*this.m_axis.y,m=k.x*this.m_s1+k.y*this.m_a1,k=k.x*this.m_s2+k.y*this.m_a2):(k=0!=this.m_K.col1.x?-a/this.m_K.col1.x:0,this.m_impulse.x+=k,l=k*this.m_perp.x,a=k*this.m_perp.y,m=k*this.m_s1,k*=this.m_s2);d.x-=this.m_invMassA*l;d.y-=this.m_invMassA*a;e-=this.m_invIA*m;f.x+=this.m_invMassB*l;f.y+=this.m_invMassB*a;g+=this.m_invIB*k;l=b.m_linearVelocity;l.x=d.x;l.y=d.y;b.m_angularVelocity=e;b=c.m_linearVelocity;b.x=f.x;b.y=f.y;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=0;var k=!1;var l=0,m=Qc.fromAngle(d);var z=Qc.fromAngle(f);var n=m,p=this.m_localAnchor1.x-this.m_localCenterA.x;var h=this.m_localAnchor1.y-this.m_localCenterA.y;var q=n.col1.x*p+n.col2.x*h;h=n.col1.y*p+n.col2.y*h;p=q;n=z;z=this.m_localAnchor2.x-this.m_localCenterB.x;var t=this.m_localAnchor2.y-this.m_localCenterB.y;q=n.col1.x*z+n.col2.x*t;t=n.col1.y*z+n.col2.y*t;z=q;n=e.x+z-c.x-p;q=e.y+t-c.y-h;if(this.m_enableLimit){this.m_axis=
P.mulMV(m,this.m_localXAxis1);this.m_a1=(n+p)*this.m_axis.y-(q+h)*this.m_axis.x;this.m_a2=z*this.m_axis.y-t*this.m_axis.x;var r=this.m_axis.x*n+this.m_axis.y*q;P.abs(this.m_upperTranslation-this.m_lowerTranslation)<2*ha.b2_linearSlop?(l=P.clamp(r,-ha.b2_maxLinearCorrection,ha.b2_maxLinearCorrection),g=P.abs(r),k=!0):r<=this.m_lowerTranslation?(l=P.clamp(r-this.m_lowerTranslation+ha.b2_linearSlop,-ha.b2_maxLinearCorrection,0),g=this.m_lowerTranslation-r,k=!0):r>=this.m_upperTranslation&&(l=P.clamp(r-
this.m_upperTranslation+ha.b2_linearSlop,0,ha.b2_maxLinearCorrection),g=r-this.m_upperTranslation,k=!0)}this.m_perp=P.mulMV(m,this.m_localYAxis1);this.m_s1=(n+p)*this.m_perp.y-(q+h)*this.m_perp.x;this.m_s2=z*this.m_perp.y-t*this.m_perp.x;m=new N;p=this.m_perp.x*n+this.m_perp.y*q;g=P.max(g,P.abs(p));k?(k=this.m_invMassA,h=this.m_invMassB,z=this.m_invIA,t=this.m_invIB,this.m_K.col1.x=k+h+z*this.m_s1*this.m_s1+t*this.m_s2*this.m_s2,this.m_K.col1.y=z*this.m_s1*this.m_a1+t*this.m_s2*this.m_a2,this.m_K.col2.x=
this.m_K.col1.y,this.m_K.col2.y=k+h+z*this.m_a1*this.m_a1+t*this.m_a2*this.m_a2,this.m_K.solve(m,-p,-l)):(k=this.m_invMassA,h=this.m_invMassB,z=this.m_invIA,t=this.m_invIB,l=k+h+z*this.m_s1*this.m_s1+t*this.m_s2*this.m_s2,m.x=0!=l?-p/l:0,m.y=0);l=m.x*this.m_perp.x+m.y*this.m_axis.x;k=m.x*this.m_perp.y+m.y*this.m_axis.y;p=m.x*this.m_s1+m.y*this.m_a1;m=m.x*this.m_s2+m.y*this.m_a2;c.x-=this.m_invMassA*l;c.y-=this.m_invMassA*k;d-=this.m_invIA*p;e.x+=this.m_invMassB*l;e.y+=this.m_invMassB*k;f+=this.m_invIB*
m;a.m_sweep.a=d;b.m_sweep.a=f;a.synchronizeTransform();b.synchronizeTransform();return g<=ha.b2_linearSlop?0<=ha.b2_angularSlop:!1},m_localAnchor1:null,m_localAnchor2:null,m_localXAxis1:null,m_localYAxis1:null,m_axis:null,m_perp:null,m_s1:null,m_s2:null,m_a1:null,m_a2:null,m_K:null,m_impulse:null,m_motorMass:null,m_motorImpulse:null,m_lowerTranslation:null,m_upperTranslation:null,m_maxMotorForce:null,m_motorSpeed:null,m_enableLimit:null,m_enableMotor:null,m_limitState:null,__class__:Nk});var Ei=function(){td.call(this);
this.localAnchorA=new N;this.localAnchorB=new N;this.localAxisA=new N;this.type=7;var a=this.localAxisA,b=1,c=0;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;this.enableLimit=!1;this.upperTranslation=this.lowerTranslation=0;this.enableMotor=!1;this.motorSpeed=this.maxMotorForce=0};h["box2D.dynamics.joints.B2LineJointDef"]=Ei;Ei.__name__="box2D.dynamics.joints.B2LineJointDef";Ei.__super__=td;Ei.prototype=w(td.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)},localAnchorA:null,localAnchorB:null,localAxisA:null,enableLimit:null,lowerTranslation:null,upperTranslation:null,enableMotor:null,maxMotorForce:null,motorSpeed:null,__class__:Ei});var om=function(a){Yb.call(this,a);this.K=new Qc;this.K1=new Qc;this.K2=new Qc;this.m_localAnchor=new N;this.m_target=new N;this.m_impulse=new N;this.m_mass=new Qc;this.m_C=new N;var b=this.m_target,c=a.target;b.x=c.x;b.y=c.y;b=this.m_target.x-
this.m_bodyB.m_xf.position.x;c=this.m_target.y-this.m_bodyB.m_xf.position.y;var 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;b=this.m_impulse;b.x=0;b.y=0;this.m_frequencyHz=a.frequencyHz;this.m_dampingRatio=a.dampingRatio;this.m_gamma=this.m_beta=0};h["box2D.dynamics.joints.B2MouseJoint"]=om;om.__name__="box2D.dynamics.joints.B2MouseJoint";om.__super__=Yb;om.prototype=w(Yb.prototype,{getAnchorA:function(){return this.m_target},
getAnchorB:function(){return this.m_bodyB.getWorldPoint(this.m_localAnchor)},getReactionForce:function(a){return new N(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},K:null,K1:null,K2:null,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;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;var 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=b.m_xf.R,d=this.m_localAnchor.x-b.m_sweep.localCenter.x,e=this.m_localAnchor.y-b.m_sweep.localCenter.y,f=c.col1.x*d+c.col2.x*e;e=c.col1.y*d+c.col2.y*e;d=f;f=b.m_linearVelocity.x+-b.m_angularVelocity*e;var g=b.m_linearVelocity.y+b.m_angularVelocity*d;c=this.m_mass;f=f+this.m_beta*this.m_C.x+this.m_gamma*
this.m_impulse.x;var k=g+this.m_beta*this.m_C.y+this.m_gamma*this.m_impulse.y;g=-(c.col1.x*f+c.col2.x*k);k=-(c.col1.y*f+c.col2.y*k);c=this.m_impulse.x;f=this.m_impulse.y;this.m_impulse.x+=g;this.m_impulse.y+=k;a=a.dt*this.m_maxForce;this.m_impulse.lengthSquared()>a*a&&this.m_impulse.multiply(a/this.m_impulse.length());g=this.m_impulse.x-c;k=this.m_impulse.y-f;b.m_linearVelocity.x+=b.m_invMass*g;b.m_linearVelocity.y+=b.m_invMass*k;b.m_angularVelocity+=b.m_invI*(d*k-e*g)},solvePositionConstraints:function(a){return!0},
m_localAnchor:null,m_target:null,m_impulse:null,m_mass:null,m_C:null,m_maxForce:null,m_frequencyHz:null,m_dampingRatio:null,m_beta:null,m_gamma:null,__class__:om});var pm=function(){td.call(this);this.target=new N;this.type=5;this.maxForce=0;this.frequencyHz=5;this.dampingRatio=.7};h["box2D.dynamics.joints.B2MouseJointDef"]=pm;pm.__name__="box2D.dynamics.joints.B2MouseJointDef";pm.__super__=td;pm.prototype=w(td.prototype,{target:null,maxForce:null,frequencyHz:null,dampingRatio:null,__class__:pm});
var mj=function(a){Yb.call(this,a);this.m_localAnchor1=new N;this.m_localAnchor2=new N;this.m_localXAxis1=new N;this.m_localYAxis1=new N;this.m_axis=new N;this.m_perp=new N;this.m_K=new Ai;this.m_impulse=new yf;var b=this.m_localAnchor1,c=a.localAnchorA;b.x=c.x;b.y=c.y;b=this.m_localAnchor2;c=a.localAnchorB;b.x=c.x;b.y=c.y;b=this.m_localXAxis1;c=a.localAxisA;b.x=c.x;b.y=c.y;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=0;a=this.m_axis;a.x=0;a.y=0;a=this.m_perp;a.x=0;a.y=0};h["box2D.dynamics.joints.B2PrismaticJoint"]=mj;mj.__name__="box2D.dynamics.joints.B2PrismaticJoint";mj.__super__=Yb;mj.prototype=w(Yb.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 N(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=a.m_xf.R,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);f=b.m_sweep.c.y+
k-(a.m_sweep.c.y+e);var l=a.getWorldVector(this.m_localXAxis1),m=a.m_linearVelocity,z=b.m_linearVelocity;a=a.m_angularVelocity;b=b.m_angularVelocity;return c*-a*l.y+f*a*l.x+(l.x*(z.x+-b*k-m.x- -a*e)+l.y*(z.y+b*g-m.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=this.m_localCenterA,e=b.getLocalCenter();d.x=e.x;d.y=e.y;d=this.m_localCenterB;e=c.getLocalCenter();d.x=e.x;d.y=e.y;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 l=this.m_localAnchor2.x-this.m_localCenterB.x,
m=this.m_localAnchor2.y-this.m_localCenterB.y;e=d.col1.x*l+d.col2.x*m;m=d.col1.y*l+d.col2.y*m;l=e;d=c.m_sweep.c.x+l-b.m_sweep.c.x-g;e=c.m_sweep.c.y+m-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;var z=this.m_axis,n=P.mulMV(f.R,this.m_localXAxis1);z.x=n.x;z.y=n.y;this.m_a1=(d+g)*this.m_axis.y-(e+k)*this.m_axis.x;this.m_a2=l*this.m_axis.y-m*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);z=this.m_perp;f=P.mulMV(f.R,this.m_localYAxis1);z.x=f.x;z.y=f.y;this.m_s1=(d+g)*this.m_perp.y-(e+k)*this.m_perp.x;this.m_s2=l*this.m_perp.y-m*this.m_perp.x;g=this.m_invMassA;k=this.m_invMassB;l=this.m_invIA;m=this.m_invIB;this.m_K.col1.x=g+k+l*this.m_s1*this.m_s1+m*this.m_s2*this.m_s2;this.m_K.col1.y=l*this.m_s1+m*this.m_s2;this.m_K.col1.z=l*this.m_s1*this.m_a1+m*this.m_s2*this.m_a2;this.m_K.col2.x=
this.m_K.col1.y;this.m_K.col2.y=l+m;this.m_K.col2.z=l*this.m_a1+m*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=g+k+l*this.m_a1*this.m_a1+m*this.m_a2*this.m_a2;this.m_enableLimit?(d=this.m_axis.x*d+this.m_axis.y*e,P.abs(this.m_upperTranslation-this.m_lowerTranslation)<2*ha.b2_linearSlop?this.m_limitState=3:d<=this.m_lowerTranslation?1!=this.m_limitState&&(this.m_limitState=1,this.m_impulse.z=0):d>=this.m_upperTranslation?2!=this.m_limitState&&(this.m_limitState=
2,this.m_impulse.z=0):(this.m_limitState=0,this.m_impulse.z=0)):this.m_limitState=0;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,
g=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*g):(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;if(this.m_enableMotor&&3!=this.m_limitState){var k=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));var l=this.m_motorImpulse;a=a.dt*this.m_maxMotorForce;this.m_motorImpulse=P.clamp(this.m_motorImpulse+k,-a,a);k=this.m_motorImpulse-l;l=k*this.m_axis.x;a=k*this.m_axis.y;var m=k*this.m_a1;k*=this.m_a2;d.x-=this.m_invMassA*l;d.y-=this.m_invMassA*a;e-=this.m_invIA*m;f.x+=this.m_invMassB*l;f.y+=this.m_invMassB*a;g+=this.m_invIB*
k}m=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&&0!=this.m_limitState?(k=this.m_axis.x*(f.x-d.x)+this.m_axis.y*(f.y-d.y)+this.m_a2*g-this.m_a1*e,l=this.m_impulse.copy(),k=this.m_K.solve33(new yf,-m,-a,-k),this.m_impulse.add(k),1==this.m_limitState?this.m_impulse.z=P.max(this.m_impulse.z,0):2==this.m_limitState&&(this.m_impulse.z=P.min(this.m_impulse.z,0)),m=-m-(this.m_impulse.z-l.z)*this.m_K.col3.x,a=-a-(this.m_impulse.z-l.z)*this.m_K.col3.y,a=
this.m_K.solve22(new N,m,a),a.x+=l.x,a.y+=l.y,this.m_impulse.x=a.x,this.m_impulse.y=a.y,k.x=this.m_impulse.x-l.x,k.y=this.m_impulse.y-l.y,k.z=this.m_impulse.z-l.z,l=k.x*this.m_perp.x+k.z*this.m_axis.x,a=k.x*this.m_perp.y+k.z*this.m_axis.y,m=k.x*this.m_s1+k.y+k.z*this.m_a1,k=k.x*this.m_s2+k.y+k.z*this.m_a2):(k=this.m_K.solve22(new N,-m,-a),this.m_impulse.x+=k.x,this.m_impulse.y+=k.y,l=k.x*this.m_perp.x,a=k.x*this.m_perp.y,m=k.x*this.m_s1+k.y,k=k.x*this.m_s2+k.y);d.x-=this.m_invMassA*l;d.y-=this.m_invMassA*
a;e-=this.m_invIA*m;f.x+=this.m_invMassB*l;f.y+=this.m_invMassB*a;g+=this.m_invIB*k;k=b.m_linearVelocity;k.x=d.x;k.y=d.y;b.m_angularVelocity=e;b=c.m_linearVelocity;b.x=f.x;b.y=f.y;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=0;var k=!1;var l=0,m=Qc.fromAngle(d),z=Qc.fromAngle(f);var n=m;var p=this.m_localAnchor1.x-this.m_localCenterA.x;var h=this.m_localAnchor1.y-this.m_localCenterA.y;var q=
n.col1.x*p+n.col2.x*h;h=n.col1.y*p+n.col2.y*h;p=q;n=z;z=this.m_localAnchor2.x-this.m_localCenterB.x;var t=this.m_localAnchor2.y-this.m_localCenterB.y;q=n.col1.x*z+n.col2.x*t;t=n.col1.y*z+n.col2.y*t;z=q;n=e.x+z-c.x-p;q=e.y+t-c.y-h;if(this.m_enableLimit){this.m_axis=P.mulMV(m,this.m_localXAxis1);this.m_a1=(n+p)*this.m_axis.y-(q+h)*this.m_axis.x;this.m_a2=z*this.m_axis.y-t*this.m_axis.x;var r=this.m_axis.x*n+this.m_axis.y*q;P.abs(this.m_upperTranslation-this.m_lowerTranslation)<2*ha.b2_linearSlop?(l=
P.clamp(r,-ha.b2_maxLinearCorrection,ha.b2_maxLinearCorrection),g=P.abs(r),k=!0):r<=this.m_lowerTranslation?(l=P.clamp(r-this.m_lowerTranslation+ha.b2_linearSlop,-ha.b2_maxLinearCorrection,0),g=this.m_lowerTranslation-r,k=!0):r>=this.m_upperTranslation&&(l=P.clamp(r-this.m_upperTranslation+ha.b2_linearSlop,0,ha.b2_maxLinearCorrection),g=r-this.m_upperTranslation,k=!0)}this.m_perp=P.mulMV(m,this.m_localYAxis1);this.m_s1=(n+p)*this.m_perp.y-(q+h)*this.m_perp.x;this.m_s2=z*this.m_perp.y-t*this.m_perp.x;
m=new yf;h=this.m_perp.x*n+this.m_perp.y*q;z=f-d-this.m_refAngle;g=P.max(g,P.abs(h));p=P.abs(z);k?(k=this.m_invMassA,t=this.m_invMassB,n=this.m_invIA,q=this.m_invIB,this.m_K.col1.x=k+t+n*this.m_s1*this.m_s1+q*this.m_s2*this.m_s2,this.m_K.col1.y=n*this.m_s1+q*this.m_s2,this.m_K.col1.z=n*this.m_s1*this.m_a1+q*this.m_s2*this.m_a2,this.m_K.col2.x=this.m_K.col1.y,this.m_K.col2.y=n+q,this.m_K.col2.z=n*this.m_a1+q*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=
k+t+n*this.m_a1*this.m_a1+q*this.m_a2*this.m_a2,this.m_K.solve33(m,-h,-z,-l)):(k=this.m_invMassA,t=this.m_invMassB,n=this.m_invIA,q=this.m_invIB,l=n*this.m_s1+q*this.m_s2,r=n+q,this.m_K.col1.set(k+t+n*this.m_s1*this.m_s1+q*this.m_s2*this.m_s2,l,0),this.m_K.col2.set(l,r,0),l=this.m_K.solve22(new N,-h,-z),m.x=l.x,m.y=l.y,m.z=0);l=m.x*this.m_perp.x+m.z*this.m_axis.x;k=m.x*this.m_perp.y+m.z*this.m_axis.y;h=m.x*this.m_s1+m.y+m.z*this.m_a1;m=m.x*this.m_s2+m.y+m.z*this.m_a2;c.x-=this.m_invMassA*l;c.y-=this.m_invMassA*
k;d-=this.m_invIA*h;e.x+=this.m_invMassB*l;e.y+=this.m_invMassB*k;f+=this.m_invIB*m;a.m_sweep.a=d;b.m_sweep.a=f;a.synchronizeTransform();b.synchronizeTransform();return g<=ha.b2_linearSlop?p<=ha.b2_angularSlop:!1},m_localAnchor1:null,m_localAnchor2:null,m_localXAxis1:null,m_localYAxis1:null,m_refAngle:null,m_axis:null,m_perp:null,m_s1:null,m_s2:null,m_a1:null,m_a2:null,m_K:null,m_impulse:null,m_motorMass:null,m_motorImpulse:null,m_lowerTranslation:null,m_upperTranslation:null,m_maxMotorForce:null,
m_motorSpeed:null,m_enableLimit:null,m_enableMotor:null,m_limitState:null,__class__:mj});var qm=function(){td.call(this);this.localAnchorA=new N;this.localAnchorB=new N;this.localAxisA=new N;this.type=2;var a=this.localAxisA,b=1,c=0;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;this.referenceAngle=0;this.enableLimit=!1;this.upperTranslation=this.lowerTranslation=0;this.enableMotor=!1;this.motorSpeed=this.maxMotorForce=0};h["box2D.dynamics.joints.B2PrismaticJointDef"]=qm;qm.__name__="box2D.dynamics.joints.B2PrismaticJointDef";
qm.__super__=td;qm.prototype=w(td.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()},localAnchorA:null,localAnchorB:null,localAxisA:null,referenceAngle:null,enableLimit:null,lowerTranslation:null,upperTranslation:null,enableMotor:null,maxMotorForce:null,motorSpeed:null,__class__:qm});
var Vg=function(a){Yb.call(this,a);this.m_groundAnchor1=new N;this.m_groundAnchor2=new N;this.m_localAnchor1=new N;this.m_localAnchor2=new N;this.m_u1=new N;this.m_u2=new N;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;
var b=this.m_localAnchor1,c=a.localAnchorA;b.x=c.x;b.y=c.y;b=this.m_localAnchor2;c=a.localAnchorB;b.x=c.x;b.y=c.y;this.m_ratio=a.ratio;this.m_constant=a.lengthA+this.m_ratio*a.lengthB;this.m_maxLength1=P.min(a.maxLengthA,this.m_constant-this.m_ratio*Vg.b2_minPulleyLength);this.m_maxLength2=P.min(a.maxLengthB,(this.m_constant-Vg.b2_minPulleyLength)/this.m_ratio);this.m_limitImpulse2=this.m_limitImpulse1=this.m_impulse=0};h["box2D.dynamics.joints.B2PulleyJoint"]=Vg;Vg.__name__="box2D.dynamics.joints.B2PulleyJoint";
Vg.__super__=Yb;Vg.prototype=w(Yb.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 N(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=b.m_xf.R,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,l=this.m_localAnchor2.y-c.m_sweep.localCenter.y;g=d.col1.x*k+d.col2.x*l;l=d.col1.y*k+d.col2.y*l;k=g;var m=c.m_sweep.c.x+k;d=c.m_sweep.c.y+l;var z=this.m_ground.m_xf.position.x+this.m_groundAnchor2.x;g=this.m_ground.m_xf.position.y+
this.m_groundAnchor2.y;var n=this.m_u1,p=b.m_sweep.c.x+e-(this.m_ground.m_xf.position.x+this.m_groundAnchor1.x),h=b.m_sweep.c.y+f-(this.m_ground.m_xf.position.y+this.m_groundAnchor1.y);null==h&&(h=0);null==p&&(p=0);n.x=p;n.y=h;n=this.m_u2;m-=z;d-=g;null==d&&(d=0);null==m&&(m=0);n.x=m;n.y=d;d=this.m_u1.length();g=this.m_u2.length();d>ha.b2_linearSlop?this.m_u1.multiply(1/d):(m=this.m_u1,m.x=0,m.y=0);g>ha.b2_linearSlop?this.m_u2.multiply(1/g):(m=this.m_u2,m.x=0,m.y=0);0<this.m_constant-d-this.m_ratio*
g?this.m_impulse=this.m_state=0:this.m_state=2;d<this.m_maxLength1?this.m_limitImpulse1=this.m_limitState1=0:this.m_limitState1=2;g<this.m_maxLength2?this.m_limitImpulse2=this.m_limitState2=0:this.m_limitState2=2;d=e*this.m_u1.y-f*this.m_u1.x;g=k*this.m_u2.y-l*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,m=(-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*m,c.m_angularVelocity+=c.m_invI*(k*m-l*g)):this.m_limitImpulse2=this.m_limitImpulse1=this.m_impulse=0},solveVelocityConstraints:function(a){a=this.m_bodyA;var b=this.m_bodyB,c=a.m_xf.R,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;if(2==this.m_state){c=a.m_linearVelocity.x+-a.m_angularVelocity*e;f=a.m_linearVelocity.y+a.m_angularVelocity*d;var l=b.m_linearVelocity.x+-b.m_angularVelocity*k;var m=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*l+this.m_u2.y*m);m=this.m_pulleyMass*-c;c=this.m_impulse;this.m_impulse=P.max(0,this.m_impulse+m);m=this.m_impulse-c;c=-m*this.m_u1.x;f=-m*this.m_u1.y;l=-this.m_ratio*m*this.m_u2.x;m=-this.m_ratio*
m*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*l;b.m_linearVelocity.y+=b.m_invMass*m;b.m_angularVelocity+=b.m_invI*(g*m-k*l)}2==this.m_limitState1&&(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),m=-this.m_limitMass1*c,c=this.m_limitImpulse1,this.m_limitImpulse1=P.max(0,this.m_limitImpulse1+m),m=this.m_limitImpulse1-
c,c=-m*this.m_u1.x,f=-m*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));2==this.m_limitState2&&(l=b.m_linearVelocity.x+-b.m_angularVelocity*k,m=b.m_linearVelocity.y+b.m_angularVelocity*g,c=-(this.m_u2.x*l+this.m_u2.y*m),m=-this.m_limitMass2*c,c=this.m_limitImpulse2,this.m_limitImpulse2=P.max(0,this.m_limitImpulse2+m),m=this.m_limitImpulse2-c,l=-m*this.m_u2.x,m=-m*this.m_u2.y,b.m_linearVelocity.x+=b.m_invMass*l,b.m_linearVelocity.y+=
b.m_invMass*m,b.m_angularVelocity+=b.m_invI*(g*m-k*l))},solvePositionConstraints:function(a){var b=this.m_bodyA;a=this.m_bodyB;var c=this.m_ground.m_xf.position.x+this.m_groundAnchor1.x,d=this.m_ground.m_xf.position.y+this.m_groundAnchor1.y,e=this.m_ground.m_xf.position.x+this.m_groundAnchor2.x,f=this.m_ground.m_xf.position.y+this.m_groundAnchor2.y,g=0;if(2==this.m_state){var k=b.m_xf.R;var l=this.m_localAnchor1.x-b.m_sweep.localCenter.x;var m=this.m_localAnchor1.y-b.m_sweep.localCenter.y;var z=k.col1.x*
l+k.col2.x*m;m=k.col1.y*l+k.col2.y*m;l=z;k=a.m_xf.R;var n=this.m_localAnchor2.x-a.m_sweep.localCenter.x;var p=this.m_localAnchor2.y-a.m_sweep.localCenter.y;z=k.col1.x*n+k.col2.x*p;p=k.col1.y*n+k.col2.y*p;n=z;var h=b.m_sweep.c.x+l;var q=b.m_sweep.c.y+m;z=a.m_sweep.c.x+n;k=a.m_sweep.c.y+p;var t=this.m_u1;h-=c;q-=d;null==q&&(q=0);null==h&&(h=0);t.x=h;t.y=q;q=this.m_u2;z-=e;k-=f;null==k&&(k=0);null==z&&(z=0);q.x=z;q.y=k;k=this.m_u1.length();z=this.m_u2.length();k>ha.b2_linearSlop?this.m_u1.multiply(1/
k):(q=this.m_u1,q.x=0,q.y=0);z>ha.b2_linearSlop?this.m_u2.multiply(1/z):(q=this.m_u2,q.x=0,q.y=0);k=this.m_constant-k-this.m_ratio*z;g=P.max(g,-k);k=P.clamp(k+ha.b2_linearSlop,-ha.b2_maxLinearCorrection,0);k*=-this.m_pulleyMass;h=-k*this.m_u1.x;q=-k*this.m_u1.y;z=-this.m_ratio*k*this.m_u2.x;k=-this.m_ratio*k*this.m_u2.y;b.m_sweep.c.x+=b.m_invMass*h;b.m_sweep.c.y+=b.m_invMass*q;b.m_sweep.a+=b.m_invI*(l*q-m*h);a.m_sweep.c.x+=a.m_invMass*z;a.m_sweep.c.y+=a.m_invMass*k;a.m_sweep.a+=a.m_invI*(n*k-p*z);
b.synchronizeTransform();a.synchronizeTransform()}2==this.m_limitState1&&(k=b.m_xf.R,l=this.m_localAnchor1.x-b.m_sweep.localCenter.x,m=this.m_localAnchor1.y-b.m_sweep.localCenter.y,z=k.col1.x*l+k.col2.x*m,m=k.col1.y*l+k.col2.y*m,l=z,h=b.m_sweep.c.x+l,q=b.m_sweep.c.y+m,n=this.m_u1,p=h-c,d=q-d,null==d&&(d=0),null==p&&(p=0),n.x=p,n.y=d,k=this.m_u1.length(),k>ha.b2_linearSlop?(this.m_u1.x*=1/k,this.m_u1.y*=1/k):(n=this.m_u1,n.x=0,n.y=0),k=this.m_maxLength1-k,g=P.max(g,-k),k=P.clamp(k+ha.b2_linearSlop,
-ha.b2_maxLinearCorrection,0),k*=-this.m_limitMass1,h=-k*this.m_u1.x,q=-k*this.m_u1.y,b.m_sweep.c.x+=b.m_invMass*h,b.m_sweep.c.y+=b.m_invMass*q,b.m_sweep.a+=b.m_invI*(l*q-m*h),b.synchronizeTransform());2==this.m_limitState2&&(k=a.m_xf.R,n=this.m_localAnchor2.x-a.m_sweep.localCenter.x,p=this.m_localAnchor2.y-a.m_sweep.localCenter.y,z=k.col1.x*n+k.col2.x*p,p=k.col1.y*n+k.col2.y*p,n=z,z=a.m_sweep.c.x+n,k=a.m_sweep.c.y+p,b=this.m_u2,e=z-e,f=k-f,null==f&&(f=0),null==e&&(e=0),b.x=e,b.y=f,z=this.m_u2.length(),
z>ha.b2_linearSlop?(this.m_u2.x*=1/z,this.m_u2.y*=1/z):(f=this.m_u2,f.x=0,f.y=0),k=this.m_maxLength2-z,g=P.max(g,-k),k=P.clamp(k+ha.b2_linearSlop,-ha.b2_maxLinearCorrection,0),k*=-this.m_limitMass2,z=-k*this.m_u2.x,k=-k*this.m_u2.y,a.m_sweep.c.x+=a.m_invMass*z,a.m_sweep.c.y+=a.m_invMass*k,a.m_sweep.a+=a.m_invI*(n*k-p*z),a.synchronizeTransform());return g<ha.b2_linearSlop},m_ground:null,m_groundAnchor1:null,m_groundAnchor2:null,m_localAnchor1:null,m_localAnchor2:null,m_u1:null,m_u2:null,m_constant:null,
m_ratio:null,m_maxLength1:null,m_maxLength2:null,m_pulleyMass:null,m_limitMass1:null,m_limitMass2:null,m_impulse:null,m_limitImpulse1:null,m_limitImpulse2:null,m_state:null,m_limitState1:null,m_limitState2:null,__class__:Vg});var rm=function(){td.call(this);this.groundAnchorA=new N;this.groundAnchorB=new N;this.localAnchorA=new N;this.localAnchorB=new N;this.type=4;var a=this.groundAnchorA,b=-1,c=1;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a=this.groundAnchorB;c=b=1;null==c&&(c=0);null==b&&(b=0);
a.x=b;a.y=c;a=this.localAnchorA;b=-1;c=0;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a=this.localAnchorB;b=1;c=0;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;this.maxLengthB=this.lengthB=this.maxLengthA=this.lengthA=0;this.ratio=1;this.collideConnected=!0};h["box2D.dynamics.joints.B2PulleyJointDef"]=rm;rm.__name__="box2D.dynamics.joints.B2PulleyJointDef";rm.__super__=td;rm.prototype=w(td.prototype,{initialize:function(a,b,c,d,e,f,g){this.bodyA=a;this.bodyB=b;a=this.groundAnchorA;a.x=c.x;a.y=c.y;a=this.groundAnchorB;
a.x=d.x;a.y=d.y;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*Vg.b2_minPulleyLength;this.maxLengthB=(g-Vg.b2_minPulleyLength)/this.ratio},groundAnchorA:null,groundAnchorB:null,localAnchorA:null,localAnchorB:null,lengthA:null,maxLengthA:null,lengthB:null,maxLengthB:null,
ratio:null,__class__:rm});var Dg=function(a){Yb.call(this,a);this.K=new Qc;this.K1=new Qc;this.K2=new Qc;this.K3=new Qc;this.impulse3=new yf;this.impulse2=new N;this.reduced=new N;this.m_localAnchor1=new N;this.m_localAnchor2=new N;this.m_impulse=new yf;this.m_mass=new Ai;var b=this.m_localAnchor1,c=a.localAnchorA;b.x=c.x;b.y=c.y;b=this.m_localAnchor2;c=a.localAnchorB;b.x=c.x;b.y=c.y;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=0};h["box2D.dynamics.joints.B2RevoluteJoint"]=Dg;Dg.__name__="box2D.dynamics.joints.B2RevoluteJoint";Dg.__super__=Yb;Dg.prototype=w(Yb.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 N(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},K:null,K1:null,K2:null,K3:null,initVelocityConstraints:function(a){var b=
this.m_bodyA,c=this.m_bodyB,d=b.m_xf.R,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,l=this.m_localAnchor2.y-c.m_sweep.localCenter.y;g=d.col1.x*k+d.col2.x*l;l=d.col1.y*k+d.col2.y*l;k=g;d=b.m_invMass;g=c.m_invMass;var m=b.m_invI,z=c.m_invI;this.m_mass.col1.x=d+g+f*f*m+l*l*z;this.m_mass.col2.x=-f*e*m-l*k*z;this.m_mass.col3.x=-f*m-l*z;this.m_mass.col1.y=
this.m_mass.col2.x;this.m_mass.col2.y=d+g+e*e*m+k*k*z;this.m_mass.col3.y=e*m+k*z;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=m+z;this.m_motorMass=1/(m+z);0==this.m_enableMotor&&(this.m_motorImpulse=0);if(this.m_enableLimit){var n=c.m_sweep.a-b.m_sweep.a-this.m_referenceAngle;P.abs(this.m_upperAngle-this.m_lowerAngle)<2*ha.b2_angularSlop?this.m_limitState=3:n<=this.m_lowerAngle?(1!=this.m_limitState&&(this.m_impulse.z=0),this.m_limitState=1):n>=this.m_upperAngle?
(2!=this.m_limitState&&(this.m_impulse.z=0),this.m_limitState=2):(this.m_limitState=0,this.m_impulse.z=0)}else this.m_limitState=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,n=this.m_impulse.y,b.m_linearVelocity.x-=d*a,b.m_linearVelocity.y-=d*n,b.m_angularVelocity-=m*(e*n-f*a+this.m_motorImpulse+this.m_impulse.z),c.m_linearVelocity.x+=g*a,c.m_linearVelocity.y+=g*n,c.m_angularVelocity+=z*(k*n-l*a+this.m_motorImpulse+this.m_impulse.z)):
(this.m_impulse.setZero(),this.m_motorImpulse=0)},impulse3:null,impulse2:null,reduced:null,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=b.m_invMass,l=c.m_invMass,m=b.m_invI,z=c.m_invI;if(this.m_enableMotor&&3!=this.m_limitState){var n=this.m_motorMass*-(g-e-this.m_motorSpeed);var p=this.m_motorImpulse;a=a.dt*this.m_maxMotorTorque;this.m_motorImpulse=P.clamp(this.m_motorImpulse+n,-a,a);
n=this.m_motorImpulse-p;e-=m*n;g+=z*n}if(this.m_enableLimit&&0!=this.m_limitState){var h=b.m_xf.R;n=this.m_localAnchor1.x-b.m_sweep.localCenter.x;p=this.m_localAnchor1.y-b.m_sweep.localCenter.y;var q=h.col1.x*n+h.col2.x*p;p=h.col1.y*n+h.col2.y*p;n=q;h=c.m_xf.R;a=this.m_localAnchor2.x-c.m_sweep.localCenter.x;var t=this.m_localAnchor2.y-c.m_sweep.localCenter.y;q=h.col1.x*a+h.col2.x*t;t=h.col1.y*a+h.col2.y*t;a=q;q=f.x+-g*t-d.x- -e*p;var r=f.y+g*a-d.y-e*n;this.m_mass.solve33(this.impulse3,-q,-r,-(g-e));
3==this.m_limitState?this.m_impulse.add(this.impulse3):1==this.m_limitState?(h=this.m_impulse.z+this.impulse3.z,0>h&&(this.m_mass.solve22(this.reduced,-q,-r),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)):2==this.m_limitState&&(h=this.m_impulse.z+this.impulse3.z,0<h&&(this.m_mass.solve22(this.reduced,-q,-r),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));d.x-=k*this.impulse3.x;d.y-=k*this.impulse3.y;e-=m*(n*this.impulse3.y-p*this.impulse3.x+this.impulse3.z);f.x+=l*this.impulse3.x;f.y+=l*this.impulse3.y;g+=z*(a*this.impulse3.y-t*this.impulse3.x+this.impulse3.z)}else h=b.m_xf.R,n=this.m_localAnchor1.x-b.m_sweep.localCenter.x,p=this.m_localAnchor1.y-b.m_sweep.localCenter.y,q=h.col1.x*n+h.col2.x*p,p=h.col1.y*n+h.col2.y*p,n=q,h=c.m_xf.R,
a=this.m_localAnchor2.x-c.m_sweep.localCenter.x,t=this.m_localAnchor2.y-c.m_sweep.localCenter.y,q=h.col1.x*a+h.col2.x*t,t=h.col1.y*a+h.col2.y*t,a=q,this.m_mass.solve22(this.impulse2,-(f.x+-g*t-d.x- -e*p),-(f.y+g*a-d.y-e*n)),this.m_impulse.x+=this.impulse2.x,this.m_impulse.y+=this.impulse2.y,d.x-=k*this.impulse2.x,d.y-=k*this.impulse2.y,e-=m*(n*this.impulse2.y-p*this.impulse2.x),f.x+=l*this.impulse2.x,f.y+=l*this.impulse2.y,g+=z*(a*this.impulse2.y-t*this.impulse2.x);k=b.m_linearVelocity;k.x=d.x;k.y=
d.y;b.m_angularVelocity=e;b=c.m_linearVelocity;b.x=f.x;b.y=f.y;c.m_angularVelocity=g},solvePositionConstraints:function(a){a=this.m_bodyA;var b=this.m_bodyB,c=0;if(this.m_enableLimit&&0!=this.m_limitState){var d=b.m_sweep.a-a.m_sweep.a-this.m_referenceAngle;var e=0;3==this.m_limitState?(d=P.clamp(d-this.m_lowerAngle,-ha.b2_maxAngularCorrection,ha.b2_maxAngularCorrection),e=-this.m_motorMass*d,c=P.abs(d)):1==this.m_limitState?(d-=this.m_lowerAngle,c=-d,d=P.clamp(d+ha.b2_angularSlop,-ha.b2_maxAngularCorrection,
0),e=-this.m_motorMass*d):2==this.m_limitState&&(c=d-=this.m_upperAngle,d=P.clamp(d-ha.b2_angularSlop,0,ha.b2_maxAngularCorrection),e=-this.m_motorMass*d);a.m_sweep.a-=a.m_invI*e;b.m_sweep.a+=b.m_invI*e;a.synchronizeTransform();b.synchronizeTransform()}var f=a.m_xf.R;e=this.m_localAnchor1.x-a.m_sweep.localCenter.x;d=this.m_localAnchor1.y-a.m_sweep.localCenter.y;var g=f.col1.x*e+f.col2.x*d;d=f.col1.y*e+f.col2.y*d;e=g;f=b.m_xf.R;var k=this.m_localAnchor2.x-b.m_sweep.localCenter.x,l=this.m_localAnchor2.y-
b.m_sweep.localCenter.y;g=f.col1.x*k+f.col2.x*l;l=f.col1.y*k+f.col2.y*l;k=g;var m=b.m_sweep.c.x+k-a.m_sweep.c.x-e;var z=b.m_sweep.c.y+l-a.m_sweep.c.y-d;var n=m*m+z*z;f=Math.sqrt(n);g=a.m_invMass;var p=b.m_invMass,h=a.m_invI,q=b.m_invI,t=10*ha.b2_linearSlop;n>t*t&&(n=1/(g+p),m=n*-m,z=n*-z,a.m_sweep.c.x-=.5*g*m,a.m_sweep.c.y-=.5*g*z,b.m_sweep.c.x+=.5*p*m,b.m_sweep.c.y+=.5*p*z,m=b.m_sweep.c.x+k-a.m_sweep.c.x-e,z=b.m_sweep.c.y+l-a.m_sweep.c.y-d);this.K1.col1.x=g+p;this.K1.col2.x=0;this.K1.col1.y=0;this.K1.col2.y=
g+p;this.K2.col1.x=h*d*d;this.K2.col2.x=-h*e*d;this.K2.col1.y=-h*e*d;this.K2.col2.y=h*e*e;this.K3.col1.x=q*l*l;this.K3.col2.x=-q*k*l;this.K3.col1.y=-q*k*l;this.K3.col2.y=q*k*k;this.K.setM(this.K1);this.K.addM(this.K2);this.K.addM(this.K3);this.K.solve(Dg.tImpulse,-m,-z);m=Dg.tImpulse.x;z=Dg.tImpulse.y;a.m_sweep.c.x-=a.m_invMass*m;a.m_sweep.c.y-=a.m_invMass*z;a.m_sweep.a-=a.m_invI*(e*z-d*m);b.m_sweep.c.x+=b.m_invMass*m;b.m_sweep.c.y+=b.m_invMass*z;b.m_sweep.a+=b.m_invI*(k*z-l*m);a.synchronizeTransform();
b.synchronizeTransform();return f<=ha.b2_linearSlop?c<=ha.b2_angularSlop:!1},m_localAnchor1:null,m_localAnchor2:null,m_impulse:null,m_motorImpulse:null,m_mass:null,m_motorMass:null,m_enableMotor:null,m_maxMotorTorque:null,m_motorSpeed:null,m_enableLimit:null,m_referenceAngle:null,m_lowerAngle:null,m_upperAngle:null,m_limitState:null,__class__:Dg});var Di=function(){td.call(this);this.localAnchorA=new N;this.localAnchorB=new N;this.type=1;var a=this.localAnchorA,b=0,c=0;null==c&&(c=0);null==b&&(b=
0);a.x=b;a.y=c;a=this.localAnchorB;c=b=0;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;this.motorSpeed=this.maxMotorTorque=this.upperAngle=this.lowerAngle=this.referenceAngle=0;this.enableMotor=this.enableLimit=!1};h["box2D.dynamics.joints.B2RevoluteJointDef"]=Di;Di.__name__="box2D.dynamics.joints.B2RevoluteJointDef";Di.__super__=td;Di.prototype=w(td.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()},localAnchorA:null,localAnchorB:null,referenceAngle:null,enableLimit:null,lowerAngle:null,upperAngle:null,enableMotor:null,motorSpeed:null,maxMotorTorque:null,__class__:Di});var um=function(a){Yb.call(this,a);this.m_localAnchorA=new N;this.m_localAnchorB=new N;this.m_impulse=new yf;this.m_mass=new Ai;var b=this.m_localAnchorA,c=a.localAnchorA;b.x=c.x;b.y=c.y;b=this.m_localAnchorB;c=a.localAnchorB;b.x=c.x;b.y=c.y;this.m_referenceAngle=
a.referenceAngle;this.m_impulse.setZero();this.m_mass=new Ai};h["box2D.dynamics.joints.B2WeldJoint"]=um;um.__name__="box2D.dynamics.joints.B2WeldJoint";um.__super__=Yb;um.prototype=w(Yb.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 N(a*this.m_impulse.x,a*this.m_impulse.y)},getReactionTorque:function(a){return a*this.m_impulse.z},initVelocityConstraints:function(a){var b=
this.m_bodyA,c=this.m_bodyB,d=b.m_xf.R,e=this.m_localAnchorA.x-b.m_sweep.localCenter.x,f=this.m_localAnchorA.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_localAnchorB.x-c.m_sweep.localCenter.x,l=this.m_localAnchorB.y-c.m_sweep.localCenter.y;g=d.col1.x*k+d.col2.x*l;l=d.col1.y*k+d.col2.y*l;k=g;d=b.m_invMass;g=c.m_invMass;var m=b.m_invI,z=c.m_invI;this.m_mass.col1.x=d+g+f*f*m+l*l*z;this.m_mass.col2.x=-f*e*m-l*k*z;this.m_mass.col3.x=-f*m-l*z;this.m_mass.col1.y=
this.m_mass.col2.x;this.m_mass.col2.y=d+g+e*e*m+k*k*z;this.m_mass.col3.y=e*m+k*z;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=m+z;a.warmStarting?(this.m_impulse.x*=a.dtRatio,this.m_impulse.y*=a.dtRatio,this.m_impulse.z*=a.dtRatio,b.m_linearVelocity.x-=d*this.m_impulse.x,b.m_linearVelocity.y-=d*this.m_impulse.y,b.m_angularVelocity-=m*(e*this.m_impulse.y-f*this.m_impulse.x+this.m_impulse.z),c.m_linearVelocity.x+=g*this.m_impulse.x,c.m_linearVelocity.y+=
g*this.m_impulse.y,c.m_angularVelocity+=z*(k*this.m_impulse.y-l*this.m_impulse.x+this.m_impulse.z)):this.m_impulse.setZero()},solveVelocityConstraints:function(a){a=this.m_bodyA;var b=this.m_bodyB,c=a.m_linearVelocity,d=a.m_angularVelocity,e=b.m_linearVelocity,f=b.m_angularVelocity,g=a.m_invMass,k=b.m_invMass,l=a.m_invI,m=b.m_invI,z=a.m_xf.R,n=this.m_localAnchorA.x-a.m_sweep.localCenter.x,p=this.m_localAnchorA.y-a.m_sweep.localCenter.y,h=z.col1.x*n+z.col2.x*p;p=z.col1.y*n+z.col2.y*p;n=h;z=b.m_xf.R;
var q=this.m_localAnchorB.x-b.m_sweep.localCenter.x,t=this.m_localAnchorB.y-b.m_sweep.localCenter.y;h=z.col1.x*q+z.col2.x*t;t=z.col1.y*q+z.col2.y*t;q=h;z=e.x-f*t-c.x+d*p;h=e.y+f*q-c.y-d*n;var r=f-d,u=new yf;this.m_mass.solve33(u,-z,-h,-r);this.m_impulse.add(u);c.x-=g*u.x;c.y-=g*u.y;d-=l*(n*u.y-p*u.x+u.z);e.x+=k*u.x;e.y+=k*u.y;f+=m*(q*u.y-t*u.x+u.z);a.m_angularVelocity=d;b.m_angularVelocity=f},solvePositionConstraints:function(a){a=this.m_bodyA;var b=this.m_bodyB,c=a.m_xf.R,d=this.m_localAnchorA.x-
a.m_sweep.localCenter.x,e=this.m_localAnchorA.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_localAnchorB.x-b.m_sweep.localCenter.x,k=this.m_localAnchorB.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=a.m_invMass;f=b.m_invMass;var l=a.m_invI,m=b.m_invI,z=b.m_sweep.c.x+g-a.m_sweep.c.x-d,n=b.m_sweep.c.y+k-a.m_sweep.c.y-e,p=b.m_sweep.a-a.m_sweep.a-this.m_referenceAngle,h=10*ha.b2_linearSlop,q=Math.sqrt(z*z+n*n),t=
P.abs(p);q>h&&(l*=1,m*=1);this.m_mass.col1.x=c+f+e*e*l+k*k*m;this.m_mass.col2.x=-e*d*l-k*g*m;this.m_mass.col3.x=-e*l-k*m;this.m_mass.col1.y=this.m_mass.col2.x;this.m_mass.col2.y=c+f+d*d*l+g*g*m;this.m_mass.col3.y=d*l+g*m;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=l+m;h=new yf;this.m_mass.solve33(h,-z,-n,-p);a.m_sweep.c.x-=c*h.x;a.m_sweep.c.y-=c*h.y;a.m_sweep.a-=l*(d*h.y-e*h.x+h.z);b.m_sweep.c.x+=f*h.x;b.m_sweep.c.y+=f*h.y;b.m_sweep.a+=m*(g*h.y-k*
h.x+h.z);a.synchronizeTransform();b.synchronizeTransform();return q<=ha.b2_linearSlop?t<=ha.b2_angularSlop:!1},m_localAnchorA:null,m_localAnchorB:null,m_referenceAngle:null,m_impulse:null,m_mass:null,__class__:um});var vm=function(){td.call(this);this.localAnchorA=new N;this.localAnchorB=new N;this.type=8;this.referenceAngle=0};h["box2D.dynamics.joints.B2WeldJointDef"]=vm;vm.__name__="box2D.dynamics.joints.B2WeldJointDef";vm.__super__=td;vm.prototype=w(td.prototype,{initialize:function(a,b,c){this.bodyA=
a;this.bodyB=b;a=this.localAnchorA;b=this.bodyA.getLocalPoint(c);a.x=b.x;a.y=b.y;a=this.localAnchorB;c=this.bodyB.getLocalPoint(c);a.x=c.x;a.y=c.y;this.referenceAngle=this.bodyB.getAngle()-this.bodyA.getAngle()},localAnchorA:null,localAnchorB:null,referenceAngle:null,__class__:vm});var Wp=function(){this.stringMapCloner=new ym(this,ua);this.intMapCloner=new ym(this,Wa);var a=this.classHandles=new ua,b=v(this,this.returnString);null!=q.String?a.setReserved("String",b):a.h.String=b;a=this.classHandles;
b=v(this,this.cloneArray);null!=q.Array?a.setReserved("Array",b):a.h.Array=b;a=(x=this.stringMapCloner,v(x,x.clone));b=this.classHandles;null!=q["haxe.ds.StringMap"]?b.setReserved("haxe.ds.StringMap",a):b.h["haxe.ds.StringMap"]=a;a=(x=this.intMapCloner,v(x,x.clone));b=this.classHandles;null!=q["haxe.ds.IntMap"]?b.setReserved("haxe.ds.IntMap",a):b.h["haxe.ds.IntMap"]=a};h["cloner.Cloner"]=Wp;Wp.__name__="cloner.Cloner";Wp.prototype={cache:null,classHandles:null,stringMapCloner:null,intMapCloner:null,
returnString:function(a){return a},clone:function(a){this.cache=new Aa;a=this._clone(a);this.cache=null;return a},_clone:function(a){if("string"==typeof a)return a;try{if(null!=a.__name__)return a}catch(c){ra.lastException=c}var b=rb.typeof(a);switch(b._hx_index){case 0:return null;case 1:return a;case 2:return a;case 3:return a;case 4:return this.handleAnonymous(a);case 5:return null;case 6:return b=b.c,null==this.cache.h.__keys__[a.__id__]&&this.cache.set(a,this.handleClass(b,a)),this.cache.h[a.__id__];
case 7:return a;case 8:return null}},handleAnonymous:function(a){for(var b=X.fields(a),c={},d=0,e=b.length;d<e;){var f=d++;f=b[f];c[f]=this._clone(X.getProperty(a,f))}return c},handleClass:function(a,b){a=a.__name__;var c=this.classHandles;a=null!=q[a]?c.getReserved(a):c.h[a];null==a&&(a=v(this,this.cloneClass));return a(b)},cloneArray:function(a){a=a.slice();for(var b=0,c=a.length;b<c;){var d=b++;a[d]=this._clone(a[d])}return a},cloneClass:function(a){for(var b=Object.create(L.getClass(a).prototype),
c=X.fields(a),d=0,e=c.length;d<e;){var f=d++;f=c[f];var g=X.getProperty(a,f);b[f]=this._clone(g)}return b},__class__:Wp};var ym=function(a,b){this.cloner=a;this.type=b;this.noArgs=[]};h["cloner.MapCloner"]=ym;ym.__name__="cloner.MapCloner";ym.prototype={cloner:null,type:null,noArgs:null,clone:function(a){for(var b=rb.createInstance(this.type,this.noArgs),c=a.keys();c.hasNext();){var d=c.next();b.set(d,this.cloner._clone(a.get(d)))}return b},__class__:ym};var xh=function(a){null==a&&(a=!0);qa.call(this);
this.alignRight=a;this.start=!0;this.fps=this.mem_max=0;this.text=new ge;this.text.set_defaultTextFormat(new Eg("_sans",10,16777215));this.text.set_wordWrap(!0);this.text.set_multiline(!0);this.text.set_width(70);this.text.set_height(50);this.text.set_selectable(!1);this.text.mouseEnabled=!1;this.rectangle=new ia(69,0,1,50);this.addEventListener("addedToStage",v(this,this.init),!1,0,!0);this.addEventListener("removedFromStage",v(this,this.destroy),!1,0,!0)};h["com.nmefermmmtools.debug.Stats"]=xh;
xh.__name__="com.nmefermmmtools.debug.Stats";xh.__super__=qa;xh.prototype=w(qa.prototype,{text:null,timer:null,fps:null,ms:null,ms_prev:null,mem:null,mem_max:null,graph:null,rectangle:null,alignRight:null,start:null,fps_graph:null,mem_graph:null,ms_graph:null,mem_max_graph:null,_stage:null,fpsStr:null,memStr:null,memMaxStr:null,msStr:null,init:function(a){this._stage=$a.get_current().stage;this.get_graphics().beginFill(51);this.get_graphics().drawRect(0,0,70,50);this.get_graphics().endFill();this.addChild(this.text);
this.graph=new na(70,50,!1,51);this.addEventListener("enterFrame",v(this,this.update))},destroy:function(a){for(this.get_graphics().clear();0<this.get_numChildren();)this.removeChildAt(0);this.graph.dispose();this.removeEventListener("enterFrame",v(this,this.update))},update:function(a){this.start&&this.alignRight&&(this.set_x(this._stage.stageWidth-this.get_width()),this.start=!1);this.timer=$a.getTimer();this.timer-1E3>this.ms_prev?(this.mem=9.54E-7*Fg.get_totalMemory(),this.mem_max=this.mem_max>
this.mem?this.mem_max:this.mem,this.fps_graph=50-(Math.min(50,this.fps/this._stage.get_frameRate()*50)|0),this.mem_graph=50-this.normalizeMem(this.mem),this.mem_max_graph=50-this.normalizeMem(this.mem_max),this.ms_graph=50-(this.timer-this.ms>>1)|0,this.graph.scroll(-1,0),this.get_graphics().clear(),this.get_graphics().beginFill(51),this.get_graphics().drawRect(0,0,70,50),this.get_graphics().endFill(),this.get_graphics().beginBitmapFill(this.graph,new Ha(1,0,0,1,0,50)),this.get_graphics().drawRect(0,
50,70,50),this.get_graphics().endFill(),this.graph.fillRect(this.rectangle,51),this.graph.lock(),this.graph.setPixel(69,this.fps_graph,16776960),this.graph.setPixel(69,this.mem_graph,65535),this.graph.setPixel(69,this.mem_max_graph,16711792),this.graph.setPixel(69,this.ms_graph,65280),this.graph.unlock(),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_htmlText("<font color='#ffff00'>"+
this.fpsStr+"</font><br><font color='#00ffff'>"+this.memStr+"</font><br><font color='#ff0070'>"+this.memMaxStr+"</font>")):(this.fps++,this.ms=this.timer)},normalizeMem:function(a){return Math.min(50,Math.sqrt(Math.sqrt(5E3*a)))-2|0},__class__:xh});var Wg=function(){};h["com.nmefermmmtools.debug.Colors"]=Wg;Wg.__name__="com.nmefermmmtools.debug.Colors";var Yh=function(){};h["com.stencyl.APIKeys"]=Yh;Yh.__name__="com.stencyl.APIKeys";var ma=function(){};h["com.stencyl.Config"]=ma;ma.__name__="com.stencyl.Config";
ma.load=function(){var a=T.getConfigText("config/game-config.json");ma.loadFromString(a)};ma.loadMap=function(a,b){for(var c=0,d=X.fields(a);c<d.length;){var e=d[c];++c;if(ba.startsWith(e,"config-")){var f=B.substr(e,7,null),g=ma.defines;(null!=q[f]?g.existsReserved(f):g.h.hasOwnProperty(f))&&ma.loadMap(X.field(a,e),b)}else b[e]=X.field(a,e)}return b};ma.loadFromString=function(a,b){null==b&&(b=!0);if(null!=ma.data&&b){b=ma.data;ma.data=ma.loadMap(JSON.parse(a),{});ma.setStaticFields();for(var c=
a=!1,d=0,e=X.fields(b);d<e.length;){var f=e[d];++d;var g=X.field(b,f),k=X.field(ma.data,f);if(g!=k)switch(f){case "debugDraw":(p.DEBUG_DRAW=ma.debugDraw)||null!=p.debugDrawer&&null!=p.debugDrawer.m_sprite&&p.debugDrawer.m_sprite.get_graphics().clear();break;case "disposeImages":case "physicsMode":c=!0;break;case "antialias":case "forceHiResAssets":case "gameScale":case "scaleMode":case "scales":case "stageHeight":case "stageWidth":a=!0;break;case "keys":S.loadInputConfig();break;case "releaseMode":case "useGciLogging":Y.setupTracing(!ma.releaseMode);
break;case "showConsole":p.engine.setStatsVisible(ma.showConsole)}}c?Y.reloadGame():a&&p.engine.reloadScreen()}else ma.data=ma.loadMap(JSON.parse(a),{}),ma.setStaticFields()};ma.setStaticFields=function(){ma.landscape=ma.data.landscape;ma.autorotate=ma.data.autorotate;ma.scaleMode=Xg.fromString(ma.data.scaleMode);ma.stageWidth=ma.data.stageWidth;ma.stageHeight=ma.data.stageHeight;ma.initSceneID=ma.data.initSceneID;ma.physicsMode=yh.fromString(ma.data.physicsMode);ma.gameScale=ma.data.gameScale;ma.forceHiResAssets=
ma.data.forceHiResAssets;ma.antialias=ma.data.antialias;ma.pixelsnap=ma.data.pixelsnap;ma.startInFullScreen=ma.data.startInFullScreen;ma.disposeImages=ma.data.disposeImages;ma.adPositionBottom=ma.data.adPositionBottom;ma.testAds=ma.data.testAds;ma.releaseMode=ma.data.releaseMode;ma.showConsole=ma.data.showConsole;ma.debugDraw=ma.data.debugDraw;ma.disableBackButton=ma.data.disableBackButton;ma.useGciLogging=ma.data.useGciLogging;ma.keys=ma.asMap(ma.data.keys);for(var a=ma.data.scales,b=fe.fromString,
c=Array(a.length),d=0,e=a.length;d<e;){var f=d++;c[f]=b(a[f])}ma.scales=Lc.array(c);ma.toolsetInterfaceHost=ma.data.toolsetInterfaceHost;ma.toolsetInterfacePort=ma.data.toolsetInterfacePort;ma.buildConfig=ma.data.buildConfig};ma.asMap=function(a){for(var b=new ua,c=0,d=X.fields(a);c<d.length;){var e=d[c];++c;var f=X.field(a,e);null!=q[e]?b.setReserved(e,f):b.h[e]=f}return b};var ac=function(){this.actorTypesLoaded=!1;this.resourceLookup=this.resourceNameLookup=this.behaviorLookup=this.behaviorReader=
this.resourceReaderPool=null;if(null==Ea.getBytes("assets/data/game.mbs"))throw new E("Data.hx - Could not load game. Check your logs for a possible cause.");};h["com.stencyl.Data"]=ac;ac.__name__="com.stencyl.Data";ac.get=function(){null==ac.instance&&(ac.instance=new ac,ac.instance.loadAll());return ac.instance};ac.resetStatics=function(){ac.instance=null};ac.prototype={readers:null,gameMbs:null,resourceListMbs:null,sceneListMbs:null,behaviorListMbs:null,resources:null,resourceMap:null,behaviors:null,
resourceLookup:null,resourceNameLookup:null,behaviorLookup:null,behaviorReader:null,resourceReaderPool:null,loadAll:function(){this.gameMbs=new Zh(Qf.get(),!1,!0);this.gameMbs.readData(za.toBytes(Ea.getBytes("assets/data/game.mbs")));this.sceneListMbs=new Zh(Qf.get(),!1,!0);this.sceneListMbs.readData(za.toBytes(Ea.getBytes("assets/data/scenes.mbs")));this.resourceListMbs=new Zh(Qf.get(),!1,!1);this.resourceListMbs.readData(za.toBytes(Ea.getBytes("assets/data/resources.mbs")));this.behaviorListMbs=
new Zh(Qf.get(),!1,!1);this.behaviorListMbs.readData(za.toBytes(Ea.getBytes("assets/data/behaviors.mbs")));this.behaviors=new zm(new Wa,v(this,this.loadBehaviorFromMbs));this.resources=new zm(new Wa,v(this,this.loadResourceFromMbs));this.resourceMap=new Xp(new ua,v(this,this.loadResourceFromMbsByName));this.loadReaders();this.scanBehaviorMbs();this.scanResourceMbs()},loadReaders:function(){this.readers=[];this.readers.push(new Am);this.readers.push(new Bm);this.readers.push(new Cm);this.readers.push(new Dm);
this.readers.push(new Em);this.readers.push(new Fm)},scanBehaviorMbs:function(){this.behaviorLookup=new Wa;for(var a=this.behaviorListMbs.getRoot(),b=0,c=a.length();b<c;){b++;var d=a.elementAddress;this.behaviorReader=a.getNextObject();var e=this.behaviorLookup,f=this.behaviorReader.getId();e.h[f]=d}},scanResourceMbs:function(){this.resourceLookup=new Wa;this.resourceNameLookup=new ua;var a=this.resourceListMbs.getRoot();this.resourceReaderPool=Ee.createObjectPool(this.resourceListMbs);for(var b=
new kb(this.resourceListMbs),c=M.INTEGER.getSize(),d=0,e=a.length();d<e;){d++;var f=a.elementAddress,g=this.resourceListMbs.readInt(f+c);a.elementAddress+=a.elementSize;b.setAddress(g);g=this.resourceLookup;var k=b.getId();g.h[k]=f;this.resourceListMbs.readTypecode(f)==lc.MBS_SPRITE?(k=this.resourceNameLookup,f="Sprite_"+b.getName()):(k=this.resourceNameLookup,f=b.getName());g=b.getId();null!=q[f]?k.setReserved(f,g):k.h[f]=g}},loadResourceFromMbsByName:function(a){var b=this.resourceNameLookup;a=
null!=q[a]?b.getReserved(a):b.h[a];return null==a?null:this.loadResourceFromMbs(a)},loadResourceFromMbs:function(a){a=this.resourceLookup.h[a];if(null==a)return null;a=Ee.readDynamicUsingPool(this.resourceListMbs,a,this.resourceReaderPool);a=this.readResource(a.getMbsType().getName(),a);if(null!=a){this.resources.map.h[a.ID]=a;if(a instanceof nj)var b="Sprite_"+a.name,c=this.resourceMap.map;else b=a.name,c=this.resourceMap.map;null!=q[b]?c.setReserved(b,a):c.h[b]=a}return a},loadAllResourcesOfType:function(a){var b=
this.resourceListMbs.getRoot(),c=new kb(this.resourceListMbs),d=M.INTEGER.getSize();b.elementAddress=b.getAddress()+2*d;for(var e=0,f=b.length();e<f;){e++;var g=b.elementAddress;this.resourceListMbs.readTypecode(g)==a&&(g=this.resourceListMbs.readInt(g+d),c.setAddress(g),this.loadResourceFromMbs(c.getId()));b.elementAddress+=b.elementSize}},loadBehaviorFromMbs:function(a){a=this.behaviorLookup.h[a];if(null==a)return null;this.behaviorReader.setAddress(a);return oj.readBehavior(this.behaviorReader)},
readResource:function(a,b){for(var c=0,d=this.readers;c<d.length;){var e=d[c];++c;if(e.accepts(a))return e.read(b)}return null},actorTypesLoaded:null,getAllActorTypes:function(){this.actorTypesLoaded||(this.loadAllResourcesOfType(Oa.MBS_ACTOR_TYPE),this.actorTypesLoaded=!0);for(var a=[],b=this.resources.map.iterator();b.hasNext();){var c=b.next();c instanceof Gg&&a.push(L.__cast(c,Gg))}return a},loadAtlas:function(a){var b=Eb.get().atlases.h[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.get(c);null!=c&&c.loadGraphics()}},unloadAtlas:function(a){},reloadScaledResources:function(){for(var a=this.resources.map.iterator();a.hasNext();){var b=a.next();null!=b&&(b instanceof Fi||b instanceof Gg||b.isAtlasActive()&&b.reloadGraphics(-1))}},__class__:ac};var jd=function(){this.eventTable=new Wa;this.eventTable.h[jd.TYPE_ADS]=[];this.eventTable.h[jd.TYPE_PURCHASES]=[];this.eventTable.h[jd.TYPE_GAMECENTER]=[];this.eventTable.h[jd.TYPE_KEYBOARD]=[]};
h["com.stencyl.event.EventMaster"]=jd;jd.__name__="com.stencyl.event.EventMaster";jd.prototype={eventTable:null,addAdEvent:function(a){this.eventTable.h[jd.TYPE_ADS].push(a)},addPurchaseEvent:function(a){this.eventTable.h[jd.TYPE_PURCHASES].push(a)},addGameCenterEvent:function(a){this.eventTable.h[jd.TYPE_GAMECENTER].push(a)},addKeyboardEvent:function(a){this.eventTable.h[jd.TYPE_KEYBOARD].push(a)},clear:function(){this.eventTable.h[jd.TYPE_ADS].length=0;this.eventTable.h[jd.TYPE_PURCHASES].length=
0;this.eventTable.h[jd.TYPE_GAMECENTER].length=0;this.eventTable.h[jd.TYPE_KEYBOARD].length=0},__class__:jd};var p=function(a){this.isHUDZoomable=this.sceneInitialized=this.keyPollOccurred=this.isFullScreen=this.ignoreResize=!1;this.zoomMultiplier=1;"opengl"!=p.stage.window.context.type&&"opengles"!=p.stage.window.context.type&&"webgl"!=p.stage.window.context.type||yd.initialize();Od.get_isSupported()&&(this.shaderLayer=new qa);a.mouseChildren=!1;a.mouseEnabled=!1;ma.debugDraw&&(p.DEBUG_DRAW=!0);
p.engine=this;r.engine=this;this.root=a;this.isFullScreen=ma.startInFullScreen;p.screenScaleX=p.unzoomedScaleX=a.get_scaleX();p.screenScaleY=p.unzoomedScaleY=a.get_scaleY();p.screenOffsetX=a.get_x()|0;p.screenOffsetY=a.get_y()|0;p.NO_PHYSICS=1==ma.physicsMode;p.stage.addEventListener("enterFrame",v(this,this.onUpdate));p.stage.addEventListener("deactivate",v(this,this.onFocusLost));p.stage.addEventListener("activate",v(this,this.onFocus));p.stage.addEventListener("resize",v(this,this.onWindowResize));
p.stage.window.onRestore.add(v(this,this.onWindowRestore));p.stage.window.onMaximize.add(v(this,this.onWindowMaximize));p.stage.window.onFullscreen.add(v(this,this.onWindowFullScreen));this.begin(ma.initSceneID)};h["com.stencyl.Engine"]=p;p.__name__="com.stencyl.Engine";p.resetStatics=function(){p.stage.removeEventListener("enterFrame",(x=p.engine,v(x,x.onUpdate)));p.stage.removeEventListener("deactivate",(x=p.engine,v(x,x.onFocusLost)));p.stage.removeEventListener("activate",(x=p.engine,v(x,x.onFocus)));
p.stage.removeEventListener("resize",(x=p.engine,v(x,x.onWindowResize)));p.stage.window.onRestore.remove((x=p.engine,v(x,x.onWindowRestore)));p.stage.window.onMaximize.remove((x=p.engine,v(x,x.onWindowMaximize)));p.stage.window.onFullscreen.remove((x=p.engine,v(x,x.onWindowFullScreen)));null!=p.engine.stats&&p.stage.removeChild(p.engine.stats);p.NO_PHYSICS=!1;p.DEBUG_DRAW=!1;p.IMG_BASE="";p.SCALE=1;p.checkedWideScreen=!1;p.isStandardIOS=!1;p.isExtendedIOS=!1;p.isIPhone6=!1;p.isIPhone6Plus=!1;p.isTabletIOS=
!1;p.engine=null;p.landscape=!1;p.cameraX=0;p.cameraY=0;p.screenScaleX=0;p.screenScaleY=0;p.unzoomedScaleX=0;p.unzoomedScaleY=0;p.screenOffsetX=0;p.screenOffsetY=0;p.screenWidth=0;p.screenHeight=0;p.sceneWidth=0;p.sceneHeight=0;p.screenWidthHalf=0;p.screenHeightHalf=0;p.paused=!1;p.started=!1;p.events=new jd;p.ITERATIONS=3;p.physicsScale=10;p.preservePadding=!1;p.paddingLeft=0;p.paddingRight=0;p.paddingTop=0;p.paddingBottom=0;p.ngID="";p.ngKey="";p.movieClip=null;p.stage=null;p.STEP_SIZE=10;p.MS_PER_SEC=
1E3;p.elapsedTime=0;p.timeScale=1;p.totalElapsedTime=0;p.debug=!1;p.debugDrawer=null};p.initBehaviors=function(a,b,c,d,e){if(null!=b){for(b=new Pe(b,b.arrayKeys());b.hasNext();){var f=b.next();if(null!=f&&f.enabled){var g=ac.get().behaviors.get(f.behaviorID),k=new ua;if(null!=g){if(g.isEvent)for(var l=g.attributes.keys();l.hasNext();){var m=l.next(),z=g.attributes;z=null!=q[m]?z.getReserved(m):z.h[m];if(null!=z){var n=z.type,p=z.ID;"list"==n?(z=new pj(p,z.fieldName,z.fullName,[],n,null,z.hidden),
null!=q[m]?k.setReserved(m,z):k.h[m]=z):"map"==n&&(z=new pj(p,z.fieldName,z.fullName,new ua,n,null,z.hidden),null!=q[m]?k.setReserved(m,z):k.h[m]=z)}}for(l=f.values.keys();l.hasNext();)m=l.next(),z=f.values,z=null!=q[m]?z.getReserved(m):z.h[m],n=g.attributes,n=null!=q[m]?n.getReserved(m):n.h[m],null!=n&&(z=new pj(n.ID,n.fieldName,n.fullName,z,n.type,null,n.hidden),null!=q[m]?k.setReserved(m,z):k.h[m]=z);f=new Gm(c,d,g.ID,g.name,g.classname,!0,!1,k,g.type,g.isEvent);a.add(f)}}}e&&a.initScripts()}};
p.toPhysicalUnits=function(a){return a/=p.physicsScale};p.toPixelUnits=function(a){return a*=p.physicsScale};p.vToPhysicalUnits=function(a){a.x=p.toPhysicalUnits(a.x);a.y=p.toPhysicalUnits(a.y);return a};p.vToPixelUnits=function(a){a.x=p.toPixelUnits(a.x);a.y=p.toPixelUnits(a.y);return a};p.invokeListeners=function(a){for(var b=0;b<a.length;){try{var c=a[b];c(a);-1==T.indexOf(a,c)&&--b}catch(d){if(ra.lastException=d,"string"!=typeof(d instanceof E?d.val:d))throw d;}++b}};p.invokeListeners2=function(a,
b){for(var c=0;c<a.length;){try{var d=a[c];d(b,a);-1==T.indexOf(a,d)&&--c}catch(e){if(ra.lastException=e,"string"!=typeof(e instanceof E?e.val:e))throw e;}++c}};p.invokeListeners3=function(a,b,c){for(var d=0;d<a.length;){try{var e=a[d];e(b,c,a);-1==T.indexOf(a,e)&&--d}catch(f){if(ra.lastException=f,"string"!=typeof(f instanceof E?f.val:f))throw f;}++d}};p.invokeListeners4=function(a,b,c,d){for(var e=0;e<a.length;){try{var f=a[e];f(b,c,d,a);-1==T.indexOf(a,f)&&--e}catch(g){if(ra.lastException=g,"string"!=
typeof(g instanceof E?g.val:g))throw g;}++e}};p.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==T.indexOf(a,g)&&--f}catch(k){if(ra.lastException=k,"string"!=typeof(k instanceof E?k.val:k))throw k;}++f}};p.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==T.indexOf(a,k)&&--g}catch(l){if(ra.lastException=l,"string"!=typeof(l instanceof E?l.val:l))throw l;}++g}};p.prototype={zoomMultiplier:null,isHUDZoomable:null,
world:null,gravityX:null,gravityY:null,physicalWidth:null,physicalHeight:null,leave:null,enter:null,sceneToEnter:null,shakeTimer:null,shakeIntensity:null,isShaking:null,scene:null,camera:null,sceneInitialized:null,channels:null,tasks:null,regions:null,terrainRegions:null,joints:null,root:null,colorLayer:null,maskLayer:null,master:null,hudLayer:null,transitionLayer:null,debugLayer:null,g:null,groups:null,reverseGroups:null,allActors:null,nextID:null,actorsOfType:null,recycledActorsOfType:null,actorsToCreateInNextScene:null,
layers:null,layersByName:null,interactiveLayers:null,backgroundLayers:null,dynamicTiles:null,animatedTiles:null,topLayer:null,bottomLayer:null,middleLayer:null,layersToDraw:null,tileUpdated:null,loadedAtlases:null,atlasesToLoad:null,atlasesToUnload:null,actorsToCreate:null,gameAttributes:null,behaviors:null,lastTime:null,acc:null,mx:null,my:null,collisionPairs:null,disableCollisionList:null,keyPollOccurred:null,whenKeyPressedListeners:null,hasKeyPressedListeners:null,whenAnyKeyPressedListeners:null,
whenAnyKeyReleasedListeners:null,whenAnyGamepadPressedListeners:null,whenAnyGamepadReleasedListeners:null,whenTypeGroupCreatedListeners:null,whenTypeGroupDiesListeners:null,typeGroupPositionListeners:null,collisionListeners:null,soundListeners:null,channelListeners:null,whenUpdatedListeners:null,whenDrawingListeners:null,whenMousePressedListeners:null,whenMouseReleasedListeners:null,whenMouseMovedListeners:null,whenMouseDraggedListeners:null,whenPausedListeners:null,fullscreenListeners:null,screenSizeListeners:null,
gameScaleListeners:null,whenSwipedListeners:null,whenMTStartListeners:null,whenMTDragListeners:null,whenMTEndListeners:null,whenFocusChangedListeners:null,nativeListeners:null,shader:null,shaderLayer:null,shaders:null,isFullScreen:null,ignoreResize:null,stats:null,onKeyDown:function(a){this.isFullScreen&&27==a.keyCode&&this.setFullScreen(!1)},onWindowResize:function(a){!this.isFullScreen||p.stage.window.__fullscreen||p.stage.window.__minimized||this.ignoreResize||this.setFullScreen(!1)},onWindowRestore:function(){this.isFullScreen&&
!p.stage.window.__fullscreen&&(p.stage.window.__fullscreen=!0)},onWindowMaximize:function(){this.isFullScreen&&!p.stage.window.__fullscreen&&(p.stage.window.__fullscreen=!0)},onWindowFullScreen:function(){this.isFullScreen||this.setFullScreen(!0)},isInFullScreen:function(){return 1==$a.get_current().stage.get_displayState()},setFullScreen:function(a){if(this.isFullScreen!=a){this.ignoreResize=!0;this.isFullScreen=a;this.reloadScreen();a=this.fullscreenListeners;for(var b=0;b<a.length;){try{var c=
a[b];c(a);-1==T.indexOf(a,c)&&--b}catch(d){if(ra.lastException=d,"string"!=typeof(d instanceof E?d.val:d))throw d;}++b}this.ignoreResize=!1}},toggleFullScreen:function(){this.setFullScreen(!this.isFullScreen)},reloadScreen:function(){var a=p.IMG_BASE,b=p.SCALE,c=p.screenWidth,d=p.screenHeight;this.root.initScreen(this.isFullScreen);p.screenWidth=Y.logicalWidth|0;p.screenWidthHalf=p.screenWidth/2|0;p.screenHeight=Y.logicalHeight|0;p.screenHeightHalf=p.screenHeight/2|0;this.setColorBackground(this.scene.colorBackground);
c=p.screenWidth!=c||p.screenHeight!=d;d=b!=p.SCALE;a!=p.IMG_BASE&&ac.get().reloadScaledResources();if(b!=p.SCALE){null!=p.debugDrawer&&p.debugDrawer.setDrawScale(10*p.SCALE);this.g.scaleX=this.g.scaleY=p.SCALE;T.applyToAllChildren(this.root,function(a){L.__implements(a,$h)&&L.__cast(a,$h).updateScale()});for(a=this.allActors.iterator();a.hasNext();)b=a.next(),null==b||b.dead||b.recycled||(b.updateMatrix=!0);for(a=this.recycledActorsOfType.iterator();a.hasNext();){b=a.next();for(var e=0;e<b.length;){var f=
b[e];++e;null!=f.currAnimation&&f.currAnimation.framesUpdated();f.updateMatrix=!0}}a=this.g;a.font=a.defaultFont;a.font.fontScale!=p.SCALE&&(a.font.fontScale=p.SCALE);this.moveCamera(this.camera.realX,this.camera.realY)}p.unzoomedScaleX=p.screenScaleX=this.root.get_scaleX();p.unzoomedScaleY=p.screenScaleY=this.root.get_scaleY();p.screenOffsetX=this.root.get_x()|0;p.screenOffsetY=this.root.get_y()|0;null!=this.stats&&(this.stats.set_x(p.stage.stageWidth-this.stats.get_width()),this.stats.set_y(0));
this.resetShaders();if(d)for(d=this.gameScaleListeners,a=0;a<d.length;){try{var g=d[a];g(d);-1==T.indexOf(d,g)&&--a}catch(l){if(ra.lastException=l,"string"!=typeof(l instanceof E?l.val:l))throw l;}++a}if(c)for(g=this.screenSizeListeners,c=0;c<g.length;){try{var k=g[c];k(g);-1==T.indexOf(g,k)&&--c}catch(l){if(ra.lastException=l,"string"!=typeof(l instanceof E?l.val:l))throw l;}++c}},addShader:function(a){if(Od.get_isSupported()){a=a.basicShader;null!=this.shaders&&this.clearShaders();this.shaders=
[a.model];for(a=a.multipassParent;null!=a;)this.shaders.splice(0,0,a.model),a=a.multipassParent;a=0;for(var b=this.shaders;a<b.length;){var c=b[a];++a;this.shaderLayer.addChild(c)}}},clearShaders:function(){T.removeAllChildren(this.shaderLayer);p.stage.context3D.setRenderToBackBuffer();this.shaders=[]},toggleShadersForHUD:function(){null!=this.shaderLayer&&null!=this.hudLayer&&null!=this.root&&this.root.swapChildren(this.shaderLayer,this.hudLayer)},resetShaders:function(){if(null!=this.shaders)for(var a=
0,b=this.shaders;a<b.length;){var c=b[a];++a;c.rebuild()}},begin:function(a){this.loadedAtlases=new Wa;this.atlasesToLoad=new Wa;this.atlasesToUnload=new Wa;S.enable();S.define("iSHIFT",[16]);S.define("iCTRL",[17]);S.define("iCOMMAND",[15]);p.landscape=ma.landscape;var b=Y.logicalWidth,c=Y.logicalHeight;p.screenWidth=b|0;p.screenHeight=c|0;p.screenWidthHalf=b/2|0;p.screenHeightHalf=c/2|0;ac.get();Eb.get().loadScenes();this.g=new ab;p.started=!0;this.tileUpdated=!1;this.shakeTimer=0;this.shakeIntensity=
.01;this.isShaking=!1;this.enter=this.leave=null;p.cameraX=0;this.acc=p.cameraY=0;this.lastTime=$a.getTimer();p.sceneWidth=b|0;p.sceneHeight=c|0;this.colorLayer=new Ue;this.root.addChild(this.colorLayer);this.master=new qa;this.root.addChild(this.master);this.hudLayer=new Rc(-1,"__hud__",-1,0,0,1,10,null);this.root.addChild(this.hudLayer);this.transitionLayer=new qa;this.root.addChild(this.transitionLayer);this.debugLayer=new qa;this.root.addChild(this.debugLayer);Od.get_isSupported()&&this.root.addChild(this.shaderLayer);
this.root.addChild(this.root.maskLayer);this.actorsToCreateInNextScene=[];this.gameAttributes=new ua;this.setStatsVisible(ma.showConsole);for(b=Eb.get().gameAttributes.keys();b.hasNext();){c=b.next();var d=Eb.get().gameAttributes,e=null!=q[c]?d.getReserved(c):d.h[c];d=this.gameAttributes;null!=q[c]?d.setReserved(c,e):d.h[c]=e}this.channels=[];this.channels.push(new $b(this,0));this.channels.push(new $b(this,1));this.channels.push(new $b(this,2));this.channels.push(new $b(this,3));this.channels.push(new $b(this,
4));this.channels.push(new $b(this,5));this.channels.push(new $b(this,6));this.channels.push(new $b(this,7));this.channels.push(new $b(this,8));this.channels.push(new $b(this,9));this.channels.push(new $b(this,10));this.channels.push(new $b(this,11));this.channels.push(new $b(this,12));this.channels.push(new $b(this,13));this.channels.push(new $b(this,14));this.channels.push(new $b(this,15));this.channels.push(new $b(this,16));this.channels.push(new $b(this,17));this.channels.push(new $b(this,18));
this.channels.push(new $b(this,19));this.channels.push(new $b(this,20));this.channels.push(new $b(this,21));this.channels.push(new $b(this,22));this.channels.push(new $b(this,23));this.channels.push(new $b(this,24));this.channels.push(new $b(this,25));this.channels.push(new $b(this,26));this.channels.push(new $b(this,27));this.channels.push(new $b(this,28));this.channels.push(new $b(this,29));this.channels.push(new $b(this,30));this.channels.push(new $b(this,31));this.sceneToEnter=a;this.loadScene(a);
this.sceneInitialized=!0},setStatsVisible:function(a){a!=(null!=this.stats)&&(a?(this.stats=new xh,p.stage.addChild(this.stats),this.stats.set_x(p.stage.stageWidth-this.stats.get_width()),this.stats.set_y(0)):(p.stage.removeChild(this.stats),this.stats=null))},loadScene:function(a){this.collisionPairs=new Ye(32);p.preservePadding||(p.paddingTop=0,p.paddingLeft=0,p.paddingBottom=0,p.paddingRight=0);this.tasks=[];this.scene=Eb.get().scenes.h[a];if(-1==a||null==this.scene)if(this.scene=Eb.get().scenes.h[ma.initSceneID],
null==this.scene){p.stage.removeEventListener("enterFrame",v(this,this.onUpdate));return}this.scene.load();a=new Wa;if(this.scene.retainsAtlases)for(var b=this.loadedAtlases.iterator();b.hasNext();){var c=b.next();a.h[c]=c}else{for(b=this.loadedAtlases.iterator();b.hasNext();)c=b.next(),Eb.get().atlases.h[c].allScenes&&(a.h[c]=c);b=0;for(c=this.scene.atlases;b<c.length;){var 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)||(ac.get().unloadAtlas(c),this.loadedAtlases.remove(c));for(a=a.iterator();a.hasNext();)b=a.next(),this.loadedAtlases.h.hasOwnProperty(b)||(ac.get().loadAtlas(b),this.loadedAtlases.h[b]=b);this.atlasesToLoad=new Wa;this.atlasesToUnload=new Wa;p.sceneWidth=this.scene.sceneWidth;p.sceneHeight=this.scene.sceneHeight;this.behaviors=new Ok;this.groups=new Wa;this.reverseGroups=new ua;a=0;for(b=Eb.get().groups;a<
b.length;){c=b[a];++a;d=new qj(c.ID,c.name);this.groups.h[c.ID]=d;var e=c.name,f=this.reverseGroups;null!=q[e]?f.setReserved(e,d):f.h[e]=d;d.name=c.name}a=new qj(-2,"Regions");this.groups.h[-2]=a;b=this.reverseGroups;null!=q.Regions?b.setReserved("Regions",a):b.h.Regions=a;this.disableCollisionList=[];this.actorsOfType=new Wa;this.recycledActorsOfType=new Wa;this.regions=new Ye(32);this.regions.reuseIterator=!0;this.terrainRegions=new Wa;this.joints=new Wa;this.dynamicTiles=new ua;this.animatedTiles=
[];this.allActors=new Ye(256);this.allActors.reuseIterator=!0;this.nextID=0;this.whenKeyPressedListeners=new ua;this.hasKeyPressedListeners=!1;this.whenAnyKeyPressedListeners=[];this.whenAnyKeyReleasedListeners=[];this.whenAnyGamepadPressedListeners=[];this.whenAnyGamepadReleasedListeners=[];this.whenTypeGroupCreatedListeners=new Aa;this.whenTypeGroupDiesListeners=new Aa;this.typeGroupPositionListeners=new Wa;this.collisionListeners=new Wa;this.soundListeners=new Aa;this.channelListeners=new Wa;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=[];this.fullscreenListeners=[];this.screenSizeListeners=[];this.gameScaleListeners=[];p.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();p.initBehaviors(this.behaviors,this.scene.behaviorValues,this,this,!0);this.initActorScripts()},initPhysics:function(){var a=new N(this.scene.gravityX,this.scene.gravityY);this.world=new rc(a,!1);rc.m_continuousPhysics=!1;rc.m_warmStarting=!0;a=new id;a.lowerBound.x=0;a.lowerBound.y=0;a.upperBound.x=p.screenWidth/p.physicsScale;
a.upperBound.y=p.screenHeight/p.physicsScale;this.world.setScreenBounds(a);p.debugDrawer=new qe;p.debugDrawer.setSprite(this.debugLayer);p.debugDrawer.setLineThickness(3);p.debugDrawer.setDrawScale(10*p.SCALE);p.debugDrawer.setFillAlpha(0);p.debugDrawer.setFlags(qe.e_shapeBit|qe.e_jointBit);this.world.setDebugDraw(p.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))}a=0;for(b=
this.interactiveLayers;a<b.length;){var c=b[a];++a;for(var d=0,e=c.actorContainer.get_numChildren();d<e;){var f=d++,g=c.actorContainer.getChildAt(f);for(g=this.scene.actors.h[g.ID];g.orderInLayer!=f;)c.actorContainer.swapChildrenAt(f,g.orderInLayer),g=c.actorContainer.getChildAt(f),g=this.scene.actors.h[g.ID]}}},loadDeferredActors:function(){for(var a=0,b=this.actorsToCreateInNextScene;a<b.length;){var c=b[a];++a;r.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 Bb(this,-1,2,0,0,-1,2,2,null,null,null,null,!0,!1,!0,!1,null,!0,!1);this.camera.set_name("Camera");this.camera.isCamera=!0;p.cameraX=0;p.cameraY=0},loadRegions:function(){this.regions=new Ye(32);this.regions.reuseIterator=!0;for(var a=this.scene.regions.iterator();a.hasNext();){var b=a.next(),c=new Nd(this,b.x,b.y,b.shapes,b.simpleBounds);
c.set_name(b.name);p.NO_PHYSICS||c.setXY(b.x+c.regionWidth/2,b.y+c.regionHeight/2);c.ID=b.ID;this.addRegion(c)}},loadTerrainRegions:function(){this.terrainRegions=new Wa;if(!p.NO_PHYSICS)for(var a=this.scene.terrainRegions.iterator();a.hasNext();){var b=a.next(),c=new wh(this,b.x,b.y,b.shapes,b.groupID,b.fillColor);c.set_name(b.name);c.setX(p.toPixelUnits(b.x)+c.regionWidth/2);c.setY(p.toPixelUnits(b.y)+c.regionHeight/2);c.ID=b.ID;this.addTerrainRegion(c)}},loadJoints:function(){if(!p.NO_PHYSICS)for(var a=
this.scene.joints.iterator();a.hasNext();){var b=a.next(),c=b.actor1,d=b.actor2,e=b.collideConnected;if(3==b.type){var f=this.joints;var g=b.ID;b=this.createStickJoint(this.getActor(c).body,this.getActor(d).body,b.ID,e);f.h[g]=b}else if(1==b.type){g=L.__cast(b,Di);f=this.getActor(c).body.getLocalCenter().copy();f.x=p.toPixelUnits(f.x);f.y=p.toPixelUnits(f.y);c=this.getActor(c).body;d=-1==d?this.world.m_groundBody:this.getActor(d).body;var k=this.joints,l=b.ID;b=this.createHingeJoint(c,d,f,b.ID,e,
g.enableLimit,g.enableMotor,g.lowerAngle,g.upperAngle,g.maxMotorTorque,-g.motorSpeed);k.h[l]=b}else if(2==b.type||7==b.type)g=L.__cast(b,Ei),f=this.getActor(c).body.getLocalCenter().copy(),f.x=p.toPixelUnits(f.x),f.y=p.toPixelUnits(f.y),c=this.getActor(c).body,d=-1==d?this.world.m_groundBody:this.getActor(d).body,f=this.joints,k=b.ID,b=this.createSlidingJoint(c,d,g.localAxisA,b.ID,e,g.enableLimit,g.enableMotor,g.lowerTranslation,g.upperTranslation,g.maxMotorForce,g.motorSpeed),f.h[k]=b}},loadTerrain:function(){this.initLayers();
for(var a=0,b=this.scene.wireframes;a<b.length;){var c=b[a];++a;var d=null;p.NO_PHYSICS||(d=new Bb(this,1E8,1,c.x,c.y,-1,c.width|0,c.height|0,null,new ua,null,null,!1,!0,!1,!1,c.shape));d.set_name("Terrain");d.typeID=-1;d.set_visible(!1);this.getGroup(1).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 Wa;this.layersByName=new ua;this.interactiveLayers=[];this.backgroundLayers=[];b=a=!1;c=0;var d=-1,e={};if(0==this.layers.mSize){var f=new Ce(0,this.scene,this.scene.sceneWidth/this.scene.tileWidth|0,this.scene.sceneHeight/this.scene.tileHeight|0);f=new Rc(0,"default",0,1,1,1,10,f);this.layers.set(f.ID,f)}for(f=this.layers.iterator();f.hasNext();){var g=f.next();d=Math.max(d,g.order)|0;e[g.order]=g;var k=g.layerName,l=this.layersByName;
null!=q[k]?l.setReserved(k,g):l.h[k]=g;g instanceof Rc?this.interactiveLayers.push(L.__cast(g,Rc)):g instanceof Fd&&this.backgroundLayers.push(L.__cast(g,Fd))}f=0;for(g=d+1;f<g;)l=f++,k=d-l,l=e[l],l.order=k,this.layersToDraw.h[k]=l;e=0;for(d+=1;e<d;)f=e++,f=this.layersToDraw.h[f],f instanceof Fd?(f=L.__cast(f,Fd),f.load(),this.master.addChild(f)):f instanceof Rc&&(f=L.__cast(f,Rc),a||(a=!0,this.bottomLayer=f),b||c!=Math.floor(this.interactiveLayers.length/2)||(b=!0,this.middleLayer=f),this.master.addChild(f),
this.topLayer=f,f.tiles.mountGrid(),++c)},setColorBackground:function(a){a.draw(this.colorLayer.get_graphics(),0,0,p.screenWidth*p.SCALE|0,p.screenHeight*p.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,B.remove(b,e),this.removeActor(e)}},cleanup:function(){null!=p.debugDrawer&&null!=p.debugDrawer.m_sprite&&p.debugDrawer.m_sprite.get_graphics().clear();
for(var a=0,b=this.interactiveLayers;a<b.length;){var c=b[a];++a;c.clear()}this.hudLayer.clear();T.removeAllChildren(this.master);this.behaviors.destroy();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(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;for(a=this.allActors.iterator();a.hasNext();)a.next().destroy();for(;0<Lc.count(this.allActors);)for(a=this.allActors.keys();a.hasNext();)b=a.next(),this.allActors.unset(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.backgroundLayers=this.interactiveLayers=this.layersByName=this.layers=this.recycledActorsOfType=this.actorsOfType=null;this.hasKeyPressedListeners=!1;this.nativeListeners=this.whenFocusChangedListeners=this.whenMTEndListeners=this.whenMTDragListeners=this.whenMTStartListeners=this.whenSwipedListeners=this.gameScaleListeners=this.screenSizeListeners=this.fullscreenListeners=this.whenPausedListeners=this.whenMouseDraggedListeners=
this.whenMouseMovedListeners=this.whenMouseReleasedListeners=this.whenMousePressedListeners=this.whenDrawingListeners=this.whenUpdatedListeners=this.channelListeners=this.soundListeners=this.collisionListeners=this.typeGroupPositionListeners=this.whenTypeGroupDiesListeners=this.whenTypeGroupCreatedListeners=this.whenAnyGamepadReleasedListeners=this.whenAnyGamepadPressedListeners=this.whenAnyKeyReleasedListeners=this.whenAnyKeyPressedListeners=null;r.lastCreatedActor=null;r.lastCreatedJoint=null;r.lastCreatedRegion=
null;r.lastCreatedTerrainRegion=null;S.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 Cb(0);if(null==c||0==c.duration)c=new Cb(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.sceneInitialized=!1;this.cleanup();this.loadScene(this.sceneToEnter);
this.sceneInitialized=!0},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 Yp(a,b,c,d))},createActor:function(a,b){b=L.__cast(ac.get().resources.get(a.actorType.spriteID),nj);b=new Bb(this,a.elementID,a.groupID,a.x,a.y,a.layerID,-1,-1,b,a.behaviorValues,a.actorType,
p.NO_PHYSICS?null:a.actorType.bodyDef,!1,!1,!1,!1,null,a.actorType.autoScale,a.actorType.ignoreGravity,a.actorType.physicsMode);if(0!=a.angle)if(0!=b.currOffset.x||0!=b.currOffset.y){var c=b.currOrigin.x|0,d=b.currOrigin.y|0;b.setOriginPoint(b.cacheWidth/2|0,b.cacheHeight/2|0);b.setAngle(a.angle,!1);b.setOriginPoint(c,d)}else b.setAngle(a.angle,!1);if(1!=a.scaleX||1!=a.scaleY){var e=b.cacheWidth/2|0,f=b.cacheHeight/2|0;if(b.currOrigin.x!=e||b.currOrigin.y!=f)c=Math.sin(.01745329251994278*a.angle),
d=Math.cos(.01745329251994278*a.angle),e=(b.currOrigin.x-e)*a.scaleX-b.currOffset.x,f=(b.currOrigin.y-f)*a.scaleY-b.currOffset.y,b.setX(b.getX(!1)+e*d-f*c),b.setY(b.getY(!1)+e*c+f*d);b.growTo(a.scaleX,a.scaleY,0)}b.set_name(a.actorType.name);null==this.recycledActorsOfType.h[a.actorType.ID]&&(this.recycledActorsOfType.h[a.actorType.ID]=[]);this.recycledActorsOfType.h[a.actorType.ID].push(b);2!=a.actorType.physicsMode&&(c=this.groups.h[a.groupID],null!=c&&c.addChild(b));1E8==a.elementID?(this.nextID++,
b.ID=this.nextID,this.allActors.set(b.ID,b)):(this.allActors.set(b.ID,b),this.nextID=Math.max(b.ID,this.nextID)|0);b.internalUpdate(0,!1);b.updateDrawingMatrix();null!=a.actorType&&-1!=a.actorType.ID&&(c=this.actorsOfType.h[a.actorType.ID],null==c&&(c=[],this.actorsOfType.h[a.actorType.ID]=c),null!=c&&c.push(b));return r.lastCreatedActor=b},removeActor:function(a){this.allActors.unset(a.ID);this.removeActorFromLayer(a,a.layer);var b=this.groups,c=a.getGroupID();b.h[c].removeChild(a);a.destroy();null!=
a.type&&-1!=a.typeID&&(b=this.actorsOfType.h[a.typeID],null!=b&&B.remove(b,a))},removeActorFromLayer:function(a,b){null!=b&&a.layer==b&&(b==this.hudLayer&&(0==a.physicsMode&&a.body.setAlwaysActive(a.alwaysSimulate),a.isHUD=!1,a.cachedLayer=null),b.actorContainer.contains(a)&&(b.actorContainer.removeChild(a),a.layer=null))},moveActorToLayer:function(a,b){if(a.layer!=b&&null!=b){if(null==a.layer||a.layer.scrollFactorX!=b.scrollFactorX||a.layer.scrollFactorY!=b.scrollFactorY)a.updateMatrix=!0;b==this.hudLayer&&
(0==a.physicsMode&&a.body.setAlwaysActive(!0),a.isHUD=!0,a.cachedLayer=a.layer);null!=a.layer&&this.removeActorFromLayer(a,a.layer);b.actorContainer.addChild(a);a.layer=b}},recycleActor:function(a){if(null!=a&&!a.recycled){var b=p.engine.whenTypeGroupDiesListeners,c=a.getType();b=b.h[c.__id__];c=p.engine.whenTypeGroupDiesListeners;var d=a.getGroup();c=c.h[d.__id__];d=a.whenKilledListeners;for(var e=0;e<d.length;){try{var f=d[e];f(d);-1==T.indexOf(d,f)&&--e}catch(l){if(ra.lastException=l,"string"!=
typeof(l instanceof E?l.val:l))throw l;}++e}if(null!=b)for(f=0;f<b.length;){try{var g=b[f];g(a,b);-1==T.indexOf(b,g)&&--f}catch(l){if(ra.lastException=l,"string"!=typeof(l instanceof E?l.val:l))throw l;}++f}if(null!=c)for(g=0;g<c.length;){try{var k=c[g];k(a,c);-1==T.indexOf(c,k)&&--g}catch(l){if(ra.lastException=l,"string"!=typeof(l instanceof E?l.val:l))throw l;}++g}a.isHUD&&a.unanchorFromScreen();a.alwaysSimulate&&a.makeSometimesSimulate(!1);a.firstMove=!1;a.setXY(1E6,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.set_alpha(1);a.realScaleX=1;a.realScaleY=1;a.switchToDefaultAnimation();a.disableActorDrawing();a.removeAttachedImages();if(0==a.physicsMode&&null!=a.body)for(k=a.body.getContactList();null!=k;)p.engine.world.m_contactManager.m_contactListener.endContact(k.contact),k=k.next;a.removeAllListeners();a.resetListeners();this.removeActorFromLayer(a,a.layer);0==a.physicsMode&&
(a.body.setActive(!1),a.body.setAwake(!1),a.body.setBullet(a.type.bodyDef.bullet),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;k=0;for(g=this.tasks;k<g.length;)f=g[k],++k,f.actor==a&&this.removeTask(f);this.allActors.unset(a.ID)}},getRecycledActorOfType:function(a,
b,c,d){a=this.getRecycledActorOfTypeOnLayer(a,b,c,this.getLayerByOrder(d).ID);p.paused&&(a.updateDrawingMatrix(),a.pause());return a},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){e.createTime=$a.getTimer();this.allActors.set(e.ID,e);e.dead=!1;e.dying=!1;e.recycled=!1;e.killLeaveScreen=!1;e.switchToDefaultAnimation();
e.customizedBehaviors?(e.customizedBehaviors=!1,e.behaviors=new Ok,p.initBehaviors(e.behaviors,a.behaviorValues,e,this,!1)):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 ua;e.enableActorDrawing();e.setXY(b,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);e.updateDrawingMatrix(!0);this.moveActorToLayer(e,this.getLayerById(d));e.initScripts();a=this.whenTypeGroupCreatedListeners.h[a.__id__];b=this.whenTypeGroupCreatedListeners;c=e.getGroup();b=b.h[c.__id__];if(null!=a)for(c=e,d=0;d<a.length;){try{var k=a[d];k(c,a);-1==T.indexOf(a,k)&&--d}catch(m){if(ra.lastException=m,"string"!=typeof(m instanceof E?m.val:m))throw m;}++d}if(null!=b)for(k=e,a=0;a<b.length;){try{var l=
b[a];l(k,b);-1==T.indexOf(b,l)&&--a}catch(m){if(ra.lastException=m,"string"!=typeof(m instanceof E?m.val:m))throw m;}++a}return e}e=this.createActorOfType(a,b,c,d)}return e},createActorOfType:function(a,b,c,d){if(null==a)return null;b=new Hm(1E8,b|0,c|0,1,1,d,-1,0,a.groupID,a.ID,null,!1);b=this.createActor(b,!0);b.initScripts();a=this.whenTypeGroupCreatedListeners.h[a.__id__];c=this.whenTypeGroupCreatedListeners;d=b.getGroup();c=c.h[d.__id__];if(null!=a)for(d=0;d<a.length;){try{var e=a[d];e(b,a);
-1==T.indexOf(a,e)&&--d}catch(g){if(ra.lastException=g,"string"!=typeof(g instanceof E?g.val:g))throw g;}++d}if(null!=c)for(e=0;e<c.length;){try{var f=c[e];f(b,c);-1==T.indexOf(c,f)&&--e}catch(g){if(ra.lastException=g,"string"!=typeof(g instanceof E?g.val:g))throw g;}++e}return b},getTopLayer:function(){return this.topLayer.ID},getBottomLayer:function(){return this.bottomLayer.ID},getMiddleLayer:function(){return this.middleLayer.ID},update:function(a){if(null!=this.scene){Gb.update(a|0);if(!p.NO_PHYSICS){var b=
this.world.getScreenBounds();b.lowerBound.x=(p.cameraX/p.SCALE-p.paddingLeft)/p.physicsScale;b.lowerBound.y=(p.cameraY/p.SCALE-p.paddingTop)/p.physicsScale;b.upperBound.x=b.lowerBound.x+(p.screenWidth+p.paddingRight+p.paddingLeft)/p.physicsScale;b.upperBound.y=b.lowerBound.y+(p.screenHeight+p.paddingBottom+p.paddingTop)/p.physicsScale}b=S.mouseX/p.SCALE|0;var c=S.mouseY/p.SCALE|0;if(S.mousePressed){r.mpx=b;r.mpy=c;for(var d=this.whenMousePressedListeners,e=0;e<d.length;){try{var f=d[e];f(d);-1==T.indexOf(d,
f)&&--e}catch(n){if(ra.lastException=n,"string"!=typeof(n instanceof E?n.val:n))throw n;}++e}}if(S.mouseReleased)for(r.mrx=b,r.mry=c,f=this.whenMouseReleasedListeners,d=0;d<f.length;){try{var g=f[d];g(f);-1==T.indexOf(f,g)&&--d}catch(n){if(ra.lastException=n,"string"!=typeof(n instanceof E?n.val:n))throw n;}++d}if(this.mx!=b||this.my!=c){this.mx=b;this.my=c;g=this.whenMouseMovedListeners;for(b=0;b<g.length;){try{var k=g[b];k(g);-1==T.indexOf(g,k)&&--b}catch(n){if(ra.lastException=n,"string"!=typeof(n instanceof
E?n.val:n))throw n;}++b}if(S.mouseDown&&!S.mousePressed)for(k=this.whenMouseDraggedListeners,g=0;g<k.length;){try{var l=k[g];l(k);-1==T.indexOf(k,l)&&--g}catch(n){if(ra.lastException=n,"string"!=typeof(n instanceof E?n.val:n))throw n;}++g}}for(l=0;l<this.tasks.length;)k=this.tasks[l],k.done||k.update(p.STEP_SIZE),k.done&&(B.remove(this.tasks,k),--l),++l;if(this.hasKeyPressedListeners){for(l=this.whenKeyPressedListeners.keys();l.hasNext();)if(g=l.next(),b=S.pressed(g),k=S.released(g),b||k)for(c=this.whenKeyPressedListeners,
g=null!=q[g]?c.getReserved(g):c.h[g],c=0;c<g.length;){try{var m=g[c];m(b,k,g);-1==T.indexOf(g,m)&&--c}catch(n){if(ra.lastException=n,"string"!=typeof(n instanceof E?n.val:n))throw n;}++c}this.keyPollOccurred=!0}m=this.whenUpdatedListeners;for(l=0;l<m.length;){try{var z=m[l];z(a,m);-1==T.indexOf(m,z)&&--l}catch(n){if(ra.lastException=n,"string"!=typeof(n instanceof E?n.val:n))throw n;}++l}p.NO_PHYSICS||(this.world.step(.01,3,3),this.world.clearForces(),p.DEBUG_DRAW&&this.world.drawDebugData());if(0!=
this.regions.mSize)for(z=this.regions.iterator();z.hasNext();)m=z.next(),null!=m&&m.innerUpdate(a,!0);for(;0<this.disableCollisionList.length;)this.disableCollisionList.pop();if(0!=this.collisionPairs.mSize)for(z=this.collisionPairs.keys();z.hasNext();)m=z.next(),this.collisionPairs.unset(m);Ud.updateAll(a);if(0!=this.allActors.mSize)for(z=this.allActors.iterator();z.hasNext();)m=z.next(),null==m||m.dead||m.recycled||(l=(0!=m.physicsMode||m.body.isActive())&&m.colX+m.cacheWidth>=p.cameraX/p.SCALE-
p.paddingLeft&&m.colY+m.cacheHeight>=p.cameraY/p.SCALE-p.paddingTop&&m.colX<p.cameraX/p.SCALE+p.screenWidth+p.paddingRight&&m.colY<p.cameraY/p.SCALE+p.screenHeight+p.paddingBottom,m.isOnScreenCache=l||m.isHUD,0==m.physicsMode&&null!=m.body?m.killLeaveScreen&&!l?this.recycleActor(m):(m.body.isActive()||m.alwaysSimulate||m.isHUD)&&m.innerUpdate(a,!1):0!=m.physicsMode&&(m.killLeaveScreen&&!l?this.recycleActor(m):(l||m.alwaysSimulate||m.isHUD)&&m.innerUpdate(a,!1)),m.dead&&this.disableCollisionList.push(m));
this.keyPollOccurred=!1;z=0;for(m=this.disableCollisionList.length;z<m;)l=z++,l=this.disableCollisionList[l],null!=l&&(l.handlesCollisions=!1);z=0;for(m=this.animatedTiles.length;z<m;)l=z++,l=this.animatedTiles[l],l.update(a),this.tileUpdated=this.tileUpdated||l.updateSource;null!=this.leave&&this.leave.isActive()?this.leave.update(a):null!=this.enter&&this.enter.isActive()&&this.enter.update(a);for(z=this.layers.iterator();z.hasNext();)z.next().updatePosition(p.cameraX,p.cameraY,a);!p.NO_PHYSICS&&
p.DEBUG_DRAW&&(this.debugLayer.set_x(-p.cameraX),this.debugLayer.set_y(-p.cameraY));this.isShaking&&(this.shakeTimer-=p.STEP_SIZE,0>=this.shakeTimer?this.stopShakingScreen():(a=-this.shakeIntensity*p.screenHeight+2*Math.random()*this.shakeIntensity*p.screenHeight,this.master.set_x((-this.shakeIntensity*p.screenWidth+2*Math.random()*this.shakeIntensity*p.screenWidth)*p.SCALE),this.master.set_y(a*p.SCALE)))}},onUpdate:function(a){a=$a.getTimer();var b=a-this.lastTime;200<=b&&(b=200);this.acc+=b;p.elapsedTime=
b;p.totalElapsedTime+=b|0;null!=this.leave?(this.leave.isComplete()&&(this.leave.deactivate(),this.enterScene()),this.postUpdate(a)):(null!=this.enter&&this.enter.isComplete()&&(this.enter.deactivate(),this.enter.cleanup(),this.enter=null),this.sceneInitialized&&this.postUpdate(a))},postUpdate:function(a){for(;this.acc>p.STEP_SIZE;)this.update(p.STEP_SIZE),this.acc-=p.STEP_SIZE,S.update();this.lastTime=a;if(0!=this.allActors.mSize)for(a=this.allActors.iterator();a.hasNext();){var b=a.next();null==
b||0==b.physicsMode&&null==b.body||(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){p.inFocus||(p.inFocus=!0,this.focusChanged(!1))},onFocusLost:function(a){p.inFocus&&(p.inFocus=!1,this.focusChanged(!0))},focusChanged:function(a){if(null!=this.whenFocusChangedListeners)for(var b=this.whenFocusChangedListeners,
c=0;c<b.length;){try{var d=b[c];d(a,b);-1==T.indexOf(b,d)&&--c}catch(e){if(ra.lastException=e,"string"!=typeof(e instanceof E?e.val:e))throw e;}++c}},handleCollision:function(a,b){var c=a.typeID,d=b.otherActor.typeID;if(p.NO_PHYSICS){var e=1E6+b.thisActor.groupID;var f=1E6+b.otherActor.groupID}else if(null!=b.thisShape?(e=b.thisShape.groupID,-1E3==e&&(f=b.thisShape.getBody(),null!=f&&(e=f.getUserData().groupID)),e=1E6+e):e=1E6+b.thisActor.groupID,null!=b.otherShape){f=b.otherShape.groupID;if(-1E3==
f){var g=b.otherShape.getBody();null!=g&&(f=g.getUserData().groupID)}f=1E6+f}else f=1E6+b.otherActor.groupID;if(null!=this.collisionPairs){g=a.ID;var k=this.collisionPairs.mH,l=k.mHash[73856093*g&k.mMask];if(-1==l)g=!1;else if(k=k.mData,k[l]==g)g=!0;else{var m=!1;for(l=k[l+2];-1!=l;){if(k[l]==g){m=!0;break}l=k[l+2]}g=m}g||this.collisionPairs.set(a.ID,new Wa);g=b.otherActor.ID;k=this.collisionPairs.mH;l=k.mHash[73856093*g&k.mMask];if(-1==l)g=!1;else if(k=k.mData,k[l]==g)g=!0;else{m=!1;for(l=k[l+2];-1!=
l;){if(k[l]==g){m=!0;break}l=k[l+2]}g=m}g||this.collisionPairs.set(b.otherActor.ID,new Wa);g=this.collisionPairs;l=a.ID;m=g.mH;k=m.mHash[73856093*l&m.mMask];if(-1==k)l=-2147483648;else if(m=m.mData,m[k]==l)l=m[k+1];else{var z=-2147483648;for(k=m[k+2];-1!=k;){if(m[k]==l){z=m[k+1];break}k=m[k+2]}l=z}if((-2147483648==l?null:g.mVals[l]).h.hasOwnProperty(b.otherActor.ID))g=!0;else{g=this.collisionPairs;l=b.otherActor.ID;m=g.mH;k=m.mHash[73856093*l&m.mMask];if(-1==k)l=-2147483648;else if(m=m.mData,m[k]==
l)l=m[k+1];else{z=-2147483648;for(k=m[k+2];-1!=k;){if(m[k]==l){z=m[k+1];break}k=m[k+2]}l=z}g=(-2147483648==l?null:g.mVals[l]).h.hasOwnProperty(a.ID)}if(g)return}if(-1<c||-1<d){if(!b.otherCollidedWithTerrain&&this.collisionListeners.h.hasOwnProperty(c)&&this.collisionListeners.h[c].h.hasOwnProperty(d)){g=this.collisionListeners.h[c].h[d];for(l=0;l<g.length;){try{var n=g[l];n(b,g);-1==T.indexOf(g,n)&&--l}catch(xd){if(ra.lastException=xd,"string"!=typeof(xd instanceof E?xd.val:xd))throw xd;}++l}0==g.length&&
this.collisionListeners.h[c].remove(d)}if(c!=d&&this.collisionListeners.h.hasOwnProperty(d)&&this.collisionListeners.h[d].h.hasOwnProperty(c)){n=this.collisionListeners.h[d].h[c];g=b.switchData(Cc.get());for(l=0;l<n.length;){try{var h=n[l];h(g,n);-1==T.indexOf(n,h)&&--l}catch(xd){if(ra.lastException=xd,"string"!=typeof(xd instanceof E?xd.val:xd))throw xd;}++l}0==n.length&&this.collisionListeners.h[d].remove(c)}}if(0<e&&0<f){if(this.collisionListeners.h.hasOwnProperty(e)&&this.collisionListeners.h[e].h.hasOwnProperty(f)){c=
this.collisionListeners.h[e].h[f];for(d=0;d<c.length;){try{var q=c[d];q(b,c);-1==T.indexOf(c,q)&&--d}catch(xd){if(ra.lastException=xd,"string"!=typeof(xd instanceof E?xd.val:xd))throw xd;}++d}0==c.length&&this.collisionListeners.h[e].remove(f)}if(e!=f&&this.collisionListeners.h.hasOwnProperty(f)&&this.collisionListeners.h[f].h.hasOwnProperty(e)){q=this.collisionListeners.h[f].h[e];c=b.switchData(Cc.get());for(d=0;d<q.length;){try{var t=q[d];t(c,q);-1==T.indexOf(q,t)&&--d}catch(xd){if(ra.lastException=
xd,"string"!=typeof(xd instanceof E?xd.val:xd))throw xd;}++d}0==q.length&&this.collisionListeners.h[f].remove(e)}}if(null!=this.collisionPairs){t=this.collisionPairs;e=a.ID;f=t.mH;q=f.mHash[73856093*e&f.mMask];if(-1==q)e=-2147483648;else if(f=f.mData,f[q]==e)e=f[q+1];else{c=-2147483648;for(q=f[q+2];-1!=q;){if(f[q]==e){c=f[q+1];break}q=f[q+2]}e=c}(-2147483648==e?null:t.mVals[e]).h[b.otherActor.ID]=!1;t=this.collisionPairs;b=b.otherActor.ID;q=t.mH;e=q.mHash[73856093*b&q.mMask];if(-1==e)b=-2147483648;
else if(q=q.mData,q[e]==b)b=q[e+1];else{f=-2147483648;for(e=q[e+2];-1!=e;){if(q[e]==b){f=q[e+1];break}e=q[e+2]}b=f}(-2147483648==b?null:t.mVals[b]).h[a.ID]=!1}},soundFinished:function(a){var b=L.__cast(this.channels[a],$b);if(null!=this.soundListeners){var c=this.soundListeners.h[b.currentClip.__id__];b.currentSound=null;if(null!=c)for(b=0;b<c.length;){try{var d=c[b];d(c);-1==T.indexOf(c,d)&&--b}catch(f){if(ra.lastException=f,"string"!=typeof(f instanceof E?f.val:f))throw f;}++b}}else b.currentSound=
null;if(null!=this.channelListeners&&(a=this.channelListeners.h[a],null!=a))for(c=0;c<a.length;){try{var e=a[c];e(a);-1==T.indexOf(a,e)&&--c}catch(f){if(ra.lastException=f,"string"!=typeof(f instanceof E?f.val:f))throw f;}++c}},addTask:function(a){this.tasks.push(a)},removeTask:function(a){B.remove(this.tasks,a)},shakeScreen:function(a,b){this.shakeTimer=p.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);p.cameraX=this.camera.realX-p.screenWidthHalf;p.cameraY=this.camera.realY-p.screenHeightHalf;p.limitCameraToScene&&(p.cameraX=Math.max(0,Math.min(p.sceneWidth-p.screenWidth,p.cameraX)),p.cameraY=Math.max(0,Math.min(p.sceneHeight-p.screenHeight,p.cameraY)));p.cameraX*=p.SCALE;p.cameraY*=p.SCALE;1!=this.zoomMultiplier&&this.isHUDZoomable&&
(this.hudLayer.set_x(-r.getScreenX()),this.hudLayer.set_y(-r.getScreenY()))},setZoom:function(a,b){null==b&&(b=!0);0>=a||this.zoomMultiplier==a||(this.zoomMultiplier=a,this.root.set_scaleX(p.screenScaleX=a*p.unzoomedScaleX),this.root.set_scaleY(p.screenScaleY=a*p.unzoomedScaleY),b&&(p.screenWidth=1/a*Y.logicalWidth|0,p.screenWidthHalf=p.screenWidth/2|0,p.screenHeight=1/a*Y.logicalHeight|0,p.screenHeightHalf=p.screenHeight/2|0),this.setColorBackground(this.scene.colorBackground),this.root.set_scrollRect(new ia(0,
0,p.screenWidth*p.SCALE,p.screenHeight*p.SCALE)),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()){p.paused=!0;if(0!=this.allActors.mSize)for(var a=this.allActors.keys();a.hasNext();){var b=a.next(),c=this.allActors,d=c.mH,e=d.mHash[73856093*b&d.mMask];if(-1==e)b=-2147483648;else if(d=d.mData,d[e]==b)b=d[e+1];else{var f=-2147483648;for(e=d[e+2];-1!=e;){if(d[e]==b){f=
d[e+1];break}e=d[e+2]}b=f}c=-2147483648==b?null:c.mVals[b];null!=c&&c.pause()}a=this.whenPausedListeners;for(c=0;c<a.length;){try{var g=a[c];g(!0,a);-1==T.indexOf(a,g)&&--c}catch(k){if(ra.lastException=k,"string"!=typeof(k instanceof E?k.val:k))throw k;}++c}}},unpause:function(){p.paused=!1;if(0!=this.allActors.mSize)for(var a=this.allActors.keys();a.hasNext();){var b=a.next(),c=this.allActors,d=c.mH,e=d.mHash[73856093*b&d.mMask];if(-1==e)b=-2147483648;else if(d=d.mData,d[e]==b)b=d[e+1];else{var f=
-2147483648;for(e=d[e+2];-1!=e;){if(d[e]==b){f=d[e+1];break}e=d[e+2]}b=f}c=-2147483648==b?null:c.mVals[b];null!=c&&c.unpause()}a=this.whenPausedListeners;for(c=0;c<a.length;){try{var g=a[c];g(!1,a);-1==T.indexOf(a,g)&&--c}catch(k){if(ra.lastException=k,"string"!=typeof(k instanceof E?k.val:k))throw k;}++c}},isPaused:function(){return p.paused},draw:function(){for(var a=0,b=this.interactiveLayers;a<b.length;){var c=b[a];++a;c.overlay.get_graphics().clear()}this.hudLayer.overlay.get_graphics().clear();
this.g.graphics=this.transitionLayer.get_graphics();this.g.graphics.clear();a=this.g;a.alpha=1;a.strokeSize=0;a.fillColor=0;a.strokeColor=0;a.font=a.defaultFont;if(0!=this.allActors.mSize)for(a=this.allActors.iterator();a.hasNext();)if(b=a.next(),0<b.whenDrawingListeners.length&&null!=b.layer){this.g.graphics=b.layer.overlay.get_graphics();c=this.g;c.drawActor=!0;c.actor=b;if(b.smoothMove){var d=b.drawY-Math.floor(b.cacheHeight/2)-b.currOffset.y;c.x=(b.drawX-Math.floor(b.cacheWidth/2)-b.currOffset.x)*
c.scaleX;c.y=d*c.scaleY}else c.x=b.colX*c.scaleX,c.y=b.colY*c.scaleY;c=this.g;c.alpha=1;c.strokeSize=0;c.fillColor=0;c.strokeColor=0;c.font=c.defaultFont;b=b.whenDrawingListeners;c=this.g;for(d=0;d<b.length;){try{var e=b[d];e(c,0,0,b);-1==T.indexOf(b,e)&&--d}catch(g){if(ra.lastException=g,"string"!=typeof(g instanceof E?g.val:g))throw g;}++d}}e=0;for(a=this.interactiveLayers;e<a.length;)if(b=a[e],++e,b.cameraMoved||this.tileUpdated)b.tiles.draw(p.cameraX*b.scrollFactorX|0,p.cameraY*b.scrollFactorY|
0),b.cameraMoved=!1;this.tileUpdated=!1;this.g.graphics=this.transitionLayer.get_graphics();e=this.g;e.drawActor=!1;e.actor=null;e.x=0;e.y=0;e=this.g;e.alpha=1;e.strokeSize=0;e.fillColor=0;e.strokeColor=0;e.font=e.defaultFont;e=this.whenDrawingListeners;a=this.g;for(b=0;b<e.length;){try{var f=e[b];f(a,0,0,e);-1==T.indexOf(e,f)&&--b}catch(g){if(ra.lastException=g,"string"!=typeof(g instanceof E?g.val:g))throw g;}++b}ab.visitStringCache();null!=this.leave&&this.leave.isActive()?this.leave.draw(null):
null!=this.enter&&this.enter.isActive()&&this.enter.draw(null);null!=this.shaders&&0<this.shaders.length&&this.shaders[0].capture()},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){var b=this.allActors,c=b.mH,d=c.mHash[73856093*a&c.mMask];if(-1==d)a=-2147483648;else if(c=c.mData,c[d]==a)a=c[d+
1];else{var e=-2147483648;for(d=c[d+2];-1!=d;){if(c[d]==a){e=c[d+1];break}d=c[d+2]}a=e}return-2147483648==a?null:b.mVals[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]},getLayer:function(a,b){return 0==a?this.getLayerById(K.parseInt(b)):this.getLayerByName(b)},getLayerById:function(a,b){null==b&&(b=!0);if(-1==a)return null;var c=p.engine.layers,d=c.mH,e=d.mHash[73856093*
a&d.mMask];if(-1==e)a=-2147483648;else if(d=d.mData,d[e]==a)a=d[e+1];else{var f=-2147483648;for(e=d[e+2];-1!=e;){if(d[e]==a){f=d[e+1];break}e=d[e+2]}a=f}c=-2147483648==a?null:c.mVals[a];null==c&&b&&(c=this.topLayer);return c},getLayerByName:function(a,b){null==b&&(b=!0);var c=p.engine.layersByName;a=null!=q[a]?c.getReserved(a):c.h[a];null==a&&b&&(a=this.topLayer);return a},getLayerByOrder:function(a){switch(a){case 0:a=this.topLayer;break;case 1:a=this.middleLayer;break;case 2:a=this.bottomLayer;
break;default:a=this.topLayer}return a},sendToBack:function(a){a.isHUD||this.moveActorToLayer(a,this.bottomLayer)},sendBackward:function(a){if(!a.isHUD)for(var b=a.layer.order;this.layersToDraw.h.hasOwnProperty(--b);)if(this.layersToDraw.h[b]instanceof Rc){this.moveActorToLayer(a,this.layersToDraw.h[b]);break}},bringToFront:function(a){a.isHUD||this.moveActorToLayer(a,this.topLayer)},bringForward:function(a){if(!a.isHUD)for(var b=a.layer.order;this.layersToDraw.h.hasOwnProperty(++b);)if(this.layersToDraw.h[b]instanceof
Rc){this.moveActorToLayer(a,this.layersToDraw.h[b]);break}},getNumberOfActorsWithinLayer:function(a){return a instanceof Rc?L.__cast(a,Rc).actorContainer.get_numChildren():0},getNumberOfLayers:function(){return this.master.get_numChildren()},getOrderOfLayer:function(a){return a.order},moveLayerToOrder:function(a,b){0>b&&(b=0);b>this.master.get_numChildren()-1&&(b=this.master.get_numChildren()-1);a.order!=b&&(this.master.setChildIndex(a,b),this.refreshLayers())},getNextLayerID:function(){for(var a=
-1,b=this.layers.iterator();b.hasNext();){var c=b.next();a=Math.max(a,c.ID)|0}return a+1},insertLayer:function(a,b){this.master.addChildAt(a,b);a instanceof Fd?this.backgroundLayers.push(L.__cast(a,Fd)):a instanceof Rc&&this.interactiveLayers.push(L.__cast(a,Rc));this.layers.set(a.ID,a);b=a.layerName;var c=this.layersByName;null!=q[b]?c.setReserved(b,a):c.h[b]=a;this.refreshLayers()},removeLayer:function(a){this.master.removeChild(a);a instanceof Fd?B.remove(this.backgroundLayers,L.__cast(a,Fd)):
a instanceof Rc&&B.remove(this.interactiveLayers,L.__cast(a,Rc));this.layers.unset(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=L.__cast(this.master.getChildAt(f),Yg);this.layersToDraw.h[f]=g;g.order=f;g instanceof Rc&&(a||(a=!0,this.bottomLayer=g),b||c!=Math.floor(this.interactiveLayers.length/2)||(b=!0,this.middleLayer=g),this.topLayer=g,++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){return-1E3==a&&null!=b?(a=this.groups,b=b.getGroupID(),a.h[b]):this.groups.h[a]},getGroupByName:function(a){var b=this.reverseGroups;a=null!=q[a]?b.getReserved(a):b.h[a];return null==a?this.groups.h[3]:a},nextJointID:function(){for(var a=-1,b=this.joints.iterator();b.hasNext();){var c=b.next();null!=
c&&(a=Math.max(a,c.ID)|0)}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=a.getUserData().getPhysicsWidth()/2,g.y=a.getUserData().getPhysicsHeight()/2);0==b.getType()&&(k.x=
b.getUserData().getPhysicsWidth()/2,k.y=b.getUserData().getPhysicsHeight()/2);g=a.getWorldPoint(g);k=b.getWorldPoint(k);var l=new Ci;l.initialize(a,b,g,k);l.collideConnected=d;l.dampingRatio=e;l.frequencyHz=f;a=this.world.createJoint(l);-1==c?this.addJoint(a):(this.joints.h[c]=a,a.ID=c);return L.__cast(a,lj)},createCustomStickJoint:function(a,b,c,d,e,f){b=new N(b,c);e=new N(e,f);b.x=p.toPhysicalUnits(b.x);b.y=p.toPhysicalUnits(b.y);e.x=p.toPhysicalUnits(e.x);e.y=p.toPhysicalUnits(e.y);b=a.getWorldPoint(b);
e=d.getWorldPoint(e);f=new Ci;f.initialize(a,d,b,e);a=this.world.createJoint(f);this.addJoint(a);return L.__cast(a,lj)},createHingeJoint:function(a,b,c,d,e,f,g,k,l,m,z){null==z&&(z=0);null==m&&(m=0);null==l&&(l=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 n=new Di;n.bodyA=a;n.bodyB=b;c.x=p.toPhysicalUnits(c.x);c.y=p.toPhysicalUnits(c.y);n.localAnchorA=c;n.localAnchorB=b.getLocalPoint(a.getWorldPoint(c));
n.collideConnected=e;n.enableLimit=f;n.enableMotor=g;n.lowerAngle=k;n.upperAngle=l;n.maxMotorTorque=m;n.motorSpeed=z;a=this.world.createJoint(n);-1==d?this.addJoint(a):(this.joints.h[d]=a,a.ID=d);return L.__cast(a,Dg)},createSlidingJoint:function(a,b,c,d,e,f,g,k,l,m,z){null==z&&(z=0);null==m&&(m=0);null==l&&(l=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 N(1,0));c.normalize();var n=a.getWorldCenter(),h=b.getWorldCenter();
0==a.getType()&&null!=a.getUserData()&&(n.x=a.getUserData().getPhysicsWidth()/2,n.y=a.getUserData().getPhysicsHeight()/2,n=a.getWorldPoint(n));0==b.getType()&&null!=b.getUserData()&&(h.x=b.getUserData().getPhysicsWidth()/2,h.y=b.getUserData().getPhysicsHeight()/2,b.getWorldPoint(h));h=new Ei;h.initialize(a,b,n,c);h.collideConnected=e;h.enableLimit=f;h.enableMotor=g;h.lowerTranslation=p.toPhysicalUnits(k);h.upperTranslation=p.toPhysicalUnits(l);h.maxMotorForce=m;h.motorSpeed=p.toPhysicalUnits(z);a=
this.world.createJoint(h);-1==d?this.addJoint(a):(this.joints.h[d]=a,a.ID=d);return L.__cast(a,Nk)},createRegion:function(a,b,c,d){null==d&&(d=!1);var e=[];e.push(c);c=new Nd(this,a,b,e);d&&c.setXY(a+c.regionWidth/2,b+c.regionHeight/2);this.addRegion(c);return c},createBoxRegion:function(a,b,c,d){if(p.NO_PHYSICS)return a=new Nd(this,a,b,[],new ia(0,0,c,d)),this.addRegion(a),a;c=p.toPhysicalUnits(c);d=p.toPhysicalUnits(d);var e=new Lb;e.setAsBox(c/2,d/2);return this.createRegion(a,b,e,!0)},createCircularRegion:function(a,
b,c){if(p.NO_PHYSICS)return a=new Nd(this,a,b,[],new ia(0,0,2*c,2*c)),this.addRegion(a),a;c=p.toPhysicalUnits(c);var d=new cd;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);p.NO_PHYSICS&&this.groups.h[-2].addChild(a)},removeRegion:function(a){a=this.getRegion(a);this.regions.unset(a.ID);a.destroy();p.NO_PHYSICS&&this.groups.h[-2].removeChild(a)},getRegion:function(a){var b=this.regions,c=b.mH,d=c.mHash[73856093*
a&c.mMask];if(-1==d)a=-2147483648;else if(c=c.mData,c[d]==a)a=c[d+1];else{var e=-2147483648;for(d=c[d+2];-1!=d;){if(c[d]==a){e=c[d+1];break}d=c[d+2]}a=e}return-2147483648==a?null:b.mVals[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=Math.max(a,c.ID)|0)}return a+1},isInRegion:function(a,b){if(null!=b){var c=this.regions;var d=b.getID(),e=c.mH,f=e.mHash[73856093*d&e.mMask];if(-1==f)d=-2147483648;
else if(e=e.mData,e[f]==d)d=e[f+1];else{var g=-2147483648;for(f=e[f+2];-1!=f;){if(e[f]==d){g=e[f+1];break}f=e[f+2]}d=g}c=null!=(-2147483648==d?null:c.mVals[d])}else c=!1;return c?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 wh(this,a,b,f,e);d&&c.setXY(a+c.regionWidth/2,b+c.regionHeight/2);this.addTerrainRegion(c);return c},createBoxTerrainRegion:function(a,b,c,d,e){null==e&&(e=1);c=p.toPhysicalUnits(c);d=p.toPhysicalUnits(d);
var f=new Lb;f.setAsBox(c/2,d/2);return this.createTerrainRegion(a,b,f,!0,e)},createCircularTerrainRegion:function(a,b,c,d){null==d&&(d=1);c=p.toPhysicalUnits(c);var e=new cd;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=Math.max(a,c.ID)|0)}return a+1},setGameAttribute:function(a,b){var c=this.gameAttributes;null!=q[a]?c.setReserved(a,b):c.h[a]=b},getGameAttribute:function(a){var b=this.gameAttributes;return null!=q[a]?b.getReserved(a):b.h[a]},setOffscreenTolerance:function(a,b,c,d){p.paddingTop=a;p.paddingLeft=b;p.paddingBottom=c;p.paddingRight=
d},setScrollFactor:function(a,b,c){this.setLayerScrollFactor(this.getLayerById(a),b,c)},setLayerScrollFactor:function(a,b,c){null==c&&(c=b);a.scrollFactorX=b;a.scrollFactorY=c},__class__:p};var S=function(){};h["com.stencyl.Input"]=S;S.__name__="com.stencyl.Input";S.resetStatics=function(){p.stage.removeEventListener("keyDown",S.onKeyDown);p.stage.removeEventListener("keyUp",S.onKeyUp);p.stage.removeEventListener("mouseDown",S.onMouseDown);p.stage.removeEventListener("mouseUp",S.onMouseUp);p.stage.removeEventListener("mouseWheel",
S.onMouseWheel);Oe.get_supportsTouchEvents()&&(p.stage.removeEventListener("touchBegin",S.onTouchBegin),p.stage.removeEventListener("touchMove",S.onTouchMove),p.stage.removeEventListener("touchEnd",S.onTouchEnd));S._roxAgent.detach();p.engine.root.removeEventListener("rox_gesture_swipe",S.onSwipe);S.mouseX=0;S.mouseY=0;S.mouseDown=S.mousePressed=S.mouseReleased=S.mouseWheel=!1;S.rightMouseDown=S.rightMousePressed=S.rightMouseReleased=!1;S.middleMouseDown=S.middleMousePressed=S.middleMouseReleased=
!1;S.mouseWheelDelta=0;S.accelX=S.accelY=S.accelZ=0;S.multiTouchPoints=null;S.numTouches=0;S._swipeDirection=0;S.swipedUp=S.swipedDown=S.swipedRight=S.swipedLeft=!1;S._roxAgent=null;S._enabled=!1;S._key=[];S._keyControlMap=new Wa;S._controlMap=new ua;S._controlsToReset=[]};S.define=function(a,b){var c=S._controlMap;if(null==(null!=q[a]?c.getReserved(a):c.h[a])){c=S._controlMap;var d=new Im(a);null!=q[a]?c.setReserved(a,d):c.h[a]=d}else S.unmapControl(a);for(c=0;c<b.length;)d=b[c],++c,S.mapKey(d,a)};
S.mapKey=function(a,b){var c=S._keyControlMap.h[a];null!=c&&(B.remove(c.keys,a),S.controlStateUpdated(c));c=S._controlMap;b=null!=q[b]?c.getReserved(b):c.h[b];b.keys.push(a);S.controlStateUpdated(b);S._keyControlMap.h[a]=b};S.unmapKey=function(a){var b=S._keyControlMap.h[a];null!=b&&(B.remove(b.keys,a),S.controlStateUpdated(b));S._keyControlMap.remove(a)};S.getKeys=function(a){var b=S._controlMap;a=null!=q[a]?b.getReserved(a):b.h[a];return null!=a?a.keys:null};S.mapJoystickButton=function(a,b){};
S.unmapJoystickButton=function(a){};S.unmapControl=function(a){var b=S._controlMap;for(a=null!=q[a]?b.getReserved(a):b.h[a];0<a.keys.length;)S._keyControlMap.remove(a.keys.pop());a.down&&S.controlReleased(a)};S.unmapKeyboardFromControl=function(a){var b=S._controlMap;for(a=null!=q[a]?b.getReserved(a):b.h[a];0<a.keys.length;)S._keyControlMap.remove(a.keys.pop());S.controlStateUpdated(a)};S.unmapJoystickFromControl=function(a){var b=S._controlMap;a=null!=q[a]?b.getReserved(a):b.h[a];S.controlStateUpdated(a)};
S.setJoySensitivity=function(a){};S.saveJoystickConfig=function(a){};S.loadJoystickConfig=function(a){};S.clearJoystickConfig=function(){};S.loadInputConfig=function(){for(var a=ma.keys.keys();a.hasNext();){var b=a.next(),c=ma.keys;c=null!=q[b]?c.getReserved(b):c.h[b];for(var d=[],e=0;e<c.length;){var f=c[e];++e;d.push(Xa.keyFromName(f))}c=new Im(b);e=S._controlMap;null!=q[b]?e.setReserved(b,c):e.h[b]=c;c.keys=d;b=0;for(d=c.keys;b<d.length;)e=d[b],++b,S._keyControlMap.h[e]=c}};S.check=function(a){var b=
S._controlMap;a=null!=q[a]?b.getReserved(a):b.h[a];return null!=a?a.down:!1};S.pressed=function(a){var b=S._controlMap;a=null!=q[a]?b.getReserved(a):b.h[a];return null!=a?a.pressed:!1};S.released=function(a){var b=S._controlMap;a=null!=q[a]?b.getReserved(a):b.h[a];return null!=a?a.released:!1};S.getButtonPressure=function(a){var b=S._controlMap;a=null!=q[a]?b.getReserved(a):b.h[a];return null!=a?a.pressure:0};S.simulateKeyPress=function(a){var b=S._controlMap;S.controlPressed(null!=q[a]?b.getReserved(a):
b.h[a],1)};S.simulateKeyRelease=function(a){var b=S._controlMap;S.controlReleased(null!=q[a]?b.getReserved(a):b.h[a])};S.enableJoystick=function(){};S.enable=function(){S._enabled||null==p.stage||(p.stage.addEventListener("keyDown",S.onKeyDown,!1,2),p.stage.addEventListener("keyUp",S.onKeyUp,!1,2),p.stage.addEventListener("mouseDown",S.onMouseDown,!1,2),p.stage.addEventListener("mouseUp",S.onMouseUp,!1,2),p.stage.addEventListener("mouseWheel",S.onMouseWheel,!1,2),Oe.get_supportsTouchEvents()&&(S.multiTouchPoints=
new ua,Oe.inputMode=2,p.stage.addEventListener("touchBegin",S.onTouchBegin),p.stage.addEventListener("touchMove",S.onTouchMove),p.stage.addEventListener("touchEnd",S.onTouchEnd)),S._roxAgent=new ca(p.engine.root,2),p.engine.root.addEventListener("rox_gesture_swipe",S.onSwipe),S._swipeDirection=-1,S.swipedLeft=!1,S.swipedRight=!1,S.swipedUp=!1,S.swipedDown=!1,S.mouseX=0,S.mouseY=0,S.accelX=0,S.accelY=0,S.accelZ=0,S.numTouches=0,S._enabled=!0)};S.update=function(){S.swipedLeft=!1;S.swipedRight=!1;S.swipedUp=
!1;S.swipedDown=!1;if(-1<S._swipeDirection){switch(S._swipeDirection){case 0:S.swipedLeft=!0;break;case 1:S.swipedRight=!0;break;case 2:S.swipedUp=!0;break;case 3:S.swipedDown=!0}if(null!=p.engine.whenSwipedListeners)for(var a=p.engine.whenSwipedListeners,b=0;b<a.length;){try{var c=a[b];c(a);-1==T.indexOf(a,c)&&--b}catch(d){if(ra.lastException=d,"string"!=typeof(d instanceof E?d.val:d))throw d;}++b}S._swipeDirection=-1}S.mouseX=(p.stage.get_mouseX()-p.screenOffsetX)/p.screenScaleX;S.mouseY=(p.stage.get_mouseY()-
p.screenOffsetY)/p.screenScaleY;for(a=S._controlsToReset.length;0<=--a;)b=S._controlsToReset.pop(),b.pressed=!1,b.released=!1;S.mousePressed&&(S.mousePressed=!1);S.mouseReleased&&(S.mouseReleased=!1);S.rightMousePressed&&(S.rightMousePressed=!1);S.rightMouseReleased&&(S.rightMouseReleased=!1);S.middleMousePressed&&(S.middleMousePressed=!1);S.middleMouseReleased&&(S.middleMouseReleased=!1);S.mouseWheelDelta=0};S.onSwipe=function(a){a=L.__cast(a.extra,pa);Math.abs(a.x)<=Math.abs(a.y)?S._swipeDirection=
0>=a.y?2:3:Math.abs(a.x)>Math.abs(a.y)&&(S._swipeDirection=0>=a.x?0:1)};S.controlPressed=function(a,b){if(null!=a)if(a.down)a.pressure=b;else if(a.down=!0,a.pressed=!0,a.pressure=b,S._controlsToReset.push(a),p.engine.keyPollOccurred&&(a=a.name,b=p.engine.whenKeyPressedListeners,a=null!=q[a]?b.getReserved(a):b.h[a],null!=a))for(b=0;b<a.length;){try{var c=a[b];c(!0,!1,a);-1==T.indexOf(a,c)&&--b}catch(d){if(ra.lastException=d,"string"!=typeof(d instanceof E?d.val:d))throw d;}++b}};S.controlReleased=
function(a){if(null!=a&&a.down&&(a.down=!1,a.released=!0,a.pressure=0,S._controlsToReset.push(a),p.engine.keyPollOccurred)){a=a.name;var b=p.engine.whenKeyPressedListeners;a=null!=q[a]?b.getReserved(a):b.h[a];if(null!=a)for(b=0;b<a.length;){try{var c=a[b];c(!1,!0,a);-1==T.indexOf(a,c)&&--b}catch(d){if(ra.lastException=d,"string"!=typeof(d instanceof E?d.val:d))throw d;}++b}}};S.controlStateUpdated=function(a){for(var b=0,c=0,d=a.keys;c<d.length;){var e=d[c];++c;S._key[e]&&(b=1)}a.pressure=b;0<b&&
!a.down?S.controlPressed(a,b):0==b&&a.down&&S.controlReleased(a)};S.onKeyDown=function(a){var b=a.keyCode;if(!(7E3<b)){S._key[b]||(S._key[b]=!0,S.controlPressed(S._keyControlMap.h[b],1));b=p.engine.whenAnyKeyPressedListeners;for(var c=0;c<b.length;){try{var d=b[c];d(a,b);-1==T.indexOf(b,d)&&--c}catch(e){if(ra.lastException=e,"string"!=typeof(e instanceof E?e.val:e))throw e;}++c}}};S.onKeyUp=function(a){var b=a.keyCode;if(!(7E3<b)){S._key[b]&&(S._key[b]=!1,S.controlReleased(S._keyControlMap.h[b]));
b=p.engine.whenAnyKeyReleasedListeners;for(var c=0;c<b.length;){try{var d=b[c];d(a,b);-1==T.indexOf(b,d)&&--c}catch(e){if(ra.lastException=e,"string"!=typeof(e instanceof E?e.val:e))throw e;}++c}}};S.onMouseDown=function(a){S.mouseX=(p.stage.get_mouseX()-p.screenOffsetX)/p.screenScaleX;S.mouseY=(p.stage.get_mouseY()-p.screenOffsetY)/p.screenScaleY;S.mouseDown||(S.mouseDown=!0,S.mousePressed=!0)};S.onMouseUp=function(a){S.mouseX=(p.stage.get_mouseX()-p.screenOffsetX)/p.screenScaleX;S.mouseY=(p.stage.get_mouseY()-
p.screenOffsetY)/p.screenScaleY;S.mouseDown=!1;S.mouseReleased=!0};S.onRightMouseDown=function(a){S.rightMouseDown||(S.rightMouseDown=!0,S.rightMousePressed=!0)};S.onRightMouseUp=function(a){S.rightMouseDown=!1;S.rightMouseReleased=!0};S.onMiddleMouseDown=function(a){S.middleMouseDown||(S.middleMouseDown=!0,S.middleMousePressed=!0)};S.onMiddleMouseUp=function(a){S.middleMouseDown=!1;S.middleMouseReleased=!0};S.onMouseWheel=function(a){S.mouseWheel=!0;S.mouseWheelDelta=a.delta};S.onTouchBegin=function(a){for(var b=
p.engine.whenMTStartListeners,c=0;c<b.length;){try{var d=b[c];d(a,b);-1==T.indexOf(b,d)&&--c}catch(e){if(ra.lastException=e,"string"!=typeof(e instanceof E?e.val:e))throw e;}++c}b=null==a.touchPointID?"null":""+a.touchPointID;c=S.multiTouchPoints;null!=q[b]?c.setReserved(b,a):c.h[b]=a;S.numTouches++};S.onTouchMove=function(a){for(var b=p.engine.whenMTDragListeners,c=0;c<b.length;){try{var d=b[c];d(a,b);-1==T.indexOf(b,d)&&--c}catch(e){if(ra.lastException=e,"string"!=typeof(e instanceof E?e.val:e))throw e;
}++c}b=null==a.touchPointID?"null":""+a.touchPointID;c=S.multiTouchPoints;null!=q[b]?c.setReserved(b,a):c.h[b]=a};S.onTouchEnd=function(a){for(var b=p.engine.whenMTEndListeners,c=0;c<b.length;){try{var d=b[c];d(a,b);-1==T.indexOf(b,d)&&--c}catch(e){if(ra.lastException=e,"string"!=typeof(e instanceof E?e.val:e))throw e;}++c}S.multiTouchPoints.remove(null==a.touchPointID?"null":""+a.touchPointID);S.numTouches--};var Im=function(a){this.pressure=0;this.name=a;this.keys=[]};h["com.stencyl.Control"]=Im;
Im.__name__="com.stencyl.Control";Im.prototype={name:null,keys:null,pressed:null,released:null,down:null,pressure:null,__class__:Im};var Xa=function(){};h["com.stencyl.Key"]=Xa;Xa.__name__="com.stencyl.Key";Xa.nameOfKey=function(a){if(97<=a&&122>=a)return String.fromCodePoint(a);if(112<=a&&126>=a)return"F"+K.string(a-111);if(96<=a&&105>=a)return"NUMPAD "+K.string(a-96);switch(a){case 8:return"BACKSPACE";case 9:return"TAB";case 13:return"ENTER";case 15:return"COMMAND";case 16:return"SHIFT";case 17:return"CONTROL";
case 20:return"CAPS LOCK";case 27:return"ESCAPE";case 32:return"SPACE";case 33:return"PAGE UP";case 34:return"PAGE DOWN";case 35:return"END";case 36:return"HOME";case 37:return"LEFT";case 38:return"UP";case 39:return"RIGHT";case 40:return"DOWN";case 45:return"INSERT";case 46:return"DELETE";case 106:return"NUMPAD MULTIPLY";case 107:return"NUMPAD ADD";case 108:return"NUMPAD ENTER";case 109:return"NUMPAD SUBTRACT";case 110:return"NUMPAD DECIMAL";case 111:return"NUMPAD DIVIDE";default:return String.fromCodePoint(a)}};
Xa.keyFromName=function(a){var b=Xa.keyboardNameMap;return null!=q[a]?b.getReserved(a):b.h[a]};var pa=function(a,b){null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b};h["openfl.geom.Point"]=pa;pa.__name__="openfl.geom.Point";pa.distance=function(a,b){var c=a.x-b.x;a=a.y-b.y;return Math.sqrt(c*c+a*a)};pa.interpolate=function(a,b,c){return new pa(b.x+c*(a.x-b.x),b.y+c*(a.y-b.y))};pa.polar=function(a,b){return new pa(a*Math.cos(b),a*Math.sin(b))};pa.prototype={x:null,y:null,add:function(a){return new pa(a.x+
this.x,a.y+this.y)},clone:function(){return new pa(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:!1},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 pa(this.x-a.x,this.y-a.y)},toString:function(){return"(x="+this.x+", y="+this.y+")"},__toLimeVector2:function(){null==
pa.__limeVector2&&(pa.__limeVector2=new Gd);var a=pa.__limeVector2;a.x=this.x;a.y=this.y;return pa.__limeVector2},get_length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},__class__:pa,__properties__:{get_length:"get_length"}};var ia=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};h["openfl.geom.Rectangle"]=ia;ia.__name__="openfl.geom.Rectangle";ia.prototype={height:null,width:null,x:null,y:null,clone:function(){return new ia(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():!1},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():!1:a.x>=this.x&&a.y>=this.y&&a.get_right()<=this.get_right()?a.get_bottom()<=this.get_bottom():!1},copyFrom:function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=
a.height},equals:function(a){return a==this?!0:null!=a&&this.x==a.x&&this.y==a.y&&this.width==a.width?this.height==a.height:!1},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=this.x<a.x?a.x:this.x,c=this.get_right()>a.get_right()?a.get_right():this.get_right();if(c<=b)return new ia;var 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 ia:
new ia(b,d,c-b,a-d)},intersects:function(a){var 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: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=this.x>a.x?a.x:this.x,c=this.get_right()<a.get_right()?a.get_right():this.get_right(),d=this.y>a.y?a.y:this.y;a=this.get_bottom()<a.get_bottom()?a.get_bottom():this.get_bottom();return new ia(b,d,c-b,a-d)},__contract:function(a,b,c,d){if(0!=this.width||
0!=this.height){var e=0,f=0,g=0,k=0;this.x<a&&(e=a-this.x);this.y<b&&(f=b-this.y);this.get_right()>a+c&&(g=a+c-this.get_right());this.get_bottom()>b+d&&(k=b+d-this.get_bottom());this.x+=e;this.y+=f;this.width+=g-e;this.height+=k-f}},__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(){null==ia.__limeRectangle&&(ia.__limeRectangle=new he);ia.__limeRectangle.setTo(this.x,this.y,this.width,this.height);return ia.__limeRectangle},__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 pa(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 pa(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 pa(this.x,this.y)},set_topLeft:function(a){this.x=a.x;this.y=a.y;return a.clone()},__class__:ia,__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 r=function(){this.checkProperties=this.scriptInit=!1;this.nameMap=new ua;this.propertyChangeListeners=new ua;this.equalityPairs=new Aa;this.attributeTweens=new ua};h["com.stencyl.behavior.Script"]=
r;r.__name__="com.stencyl.behavior.Script";r.resetStatics=function(){r.engine=null;r.lastCreatedActor=null;r.lastCreatedJoint=null;r.lastCreatedRegion=null;r.lastCreatedTerrainRegion=null;r.mpx=0;r.mpy=0;r.mrx=0;r.mry=0;r.imageApiAutoscale=!0};r.sameAs=function(a,b){return a==b};r.sameAsAny=function(a,b,c){return a!=b?a==c:!0};r.asBoolean=function(a){return 1==a?!0:"true"==a?!0:!1};r.strCompare=function(a,b,c){return 0>c?a<b:a>b};r.strCompareBefore=function(a,b){return a<b};r.strCompareAfter=function(a,
b){return a>b};r.asNumber=function(a){return null==a?0:"number"==typeof a?L.__cast(a,rj):"number"==typeof a&&(a|0)===a?L.__cast(a,Hg):"boolean"==typeof a?L.__cast(a,sj)?1:0:"string"==typeof a?parseFloat(a):parseFloat(K.string(a))};r.hasValue=function(a){return r.isPrimitive(a)?!0:"string"==typeof a?""!=L.__cast(a,String):null!=a};r.isPrimitive=function(a){return"boolean"==typeof a||"number"==typeof a||"number"==typeof a&&(a|0)===a?!0:!1};r.getDefaultValue=function(a){return"boolean"==typeof a?!1:
"number"==typeof a||"number"==typeof a&&(a|0)===a?0:"string"==typeof a?"":null};r.getGroupByName=function(a){return r.engine.getGroupByName(a)};r.getLastCreatedRegion=function(){return r.lastCreatedRegion};r.getAllRegions=function(){for(var a=[],b=r.engine.regions.iterator();b.hasNext();){var c=b.next();null!=c&&a.push(c)}return a};r.getRegion=function(a){return r.engine.getRegion(a)};r.removeRegion=function(a){r.engine.removeRegion(a)};r.createBoxRegion=function(a,b,c,d){return r.lastCreatedRegion=
r.engine.createBoxRegion(a,b,c,d)};r.createCircularRegion=function(a,b,c){return r.lastCreatedRegion=r.engine.createCircularRegion(a,b,c)};r.isInRegion=function(a,b){return r.engine.isInRegion(a,b)};r.getActorsInRegion=function(a){var b=[];for(a=a.getContainedActors().iterator();a.hasNext();){var c=a.next();b.push(r.engine.getActor(c))}return b};r.sceneHasBehavior=function(a){return r.engine.behaviors.hasBehavior(a)};r.enableBehaviorForScene=function(a){r.engine.behaviors.enableBehavior(a)};r.disableBehaviorForScene=
function(a){r.engine.behaviors.disableBehavior(a)};r.isBehaviorEnabledForScene=function(a){return r.engine.behaviors.isBehaviorEnabled(a)};r.getValueForScene=function(a,b){return r.engine.getValue(a,b)};r.setValueForScene=function(a,b,c){r.engine.setValue(a,b,c)};r.shoutToScene=function(a,b){return r.engine.shout(a,b)};r.sayToScene=function(a,b,c){return r.engine.say(a,b,c)};r.setGameAttribute=function(a,b){var c=r.engine.gameAttributes;null!=q[a]?c.setReserved(a,b):c.h[a]=b};r.getGameAttribute=function(a){return r.engine.getGameAttribute(a)};
r.runLater=function(a,b,c){a=new Jm(b,a|0,!1,c);r.engine.addTask(a);return a};r.runPeriodically=function(a,b,c){a=new Jm(b,a|0,!0,c);r.engine.addTask(a);return a};r.getStepSize=function(){return p.STEP_SIZE};r.getScene=function(){return r.engine.scene};r.getCurrentScene=function(){return r.getScene().ID};r.getIDForScene=function(a){for(var b=Eb.get().scenes.iterator();b.hasNext();){var c=b.next();if(a==c.name)return c.ID}return 0};r.getCurrentSceneName=function(){return r.getScene().name};r.getSceneWidth=
function(){return r.getScene().sceneWidth};r.getSceneHeight=function(){return r.getScene().sceneHeight};r.getTileWidth=function(){return r.getScene().tileWidth};r.getTileHeight=function(){return r.getScene().tileHeight};r.reloadCurrentScene=function(a,b){r.engine.switchScene(r.getCurrentScene(),a,b)};r.switchScene=function(a,b,c){r.engine.switchScene(a,b,c)};r.createPixelizeOut=function(a,b){return new Pk(a,1,15)};r.createPixelizeIn=function(a,b){return new Pk(a,15,1)};r.createBubblesOut=function(a,
b){null==b&&(b=-16777216);return new Qk(Cb.OUT,a,50,b)};r.createBubblesIn=function(a,b){null==b&&(b=-16777216);return new Qk(Cb.IN,a,50,b)};r.createBlindsOut=function(a,b){null==b&&(b=-16777216);return new Rk(Cb.OUT,a,10,b)};r.createBlindsIn=function(a,b){null==b&&(b=-16777216);return new Rk(Cb.IN,a,10,b)};r.createRectangleOut=function(a,b){null==b&&(b=-16777216);return new Sk(Cb.OUT,a,b)};r.createRectangleIn=function(a,b){null==b&&(b=-16777216);return new Sk(Cb.IN,a,b)};r.createSlideTransition=function(a,
b){return new Ze(r.engine.master,r.engine.colorLayer,a,b)};r.createSlideUpTransition=function(a){return r.createSlideTransition(a,Ze.SLIDE_UP)};r.createSlideDownTransition=function(a){return r.createSlideTransition(a,Ze.SLIDE_DOWN)};r.createSlideLeftTransition=function(a){return r.createSlideTransition(a,Ze.SLIDE_LEFT)};r.createSlideRightTransition=function(a){return r.createSlideTransition(a,Ze.SLIDE_RIGHT)};r.createCrossfadeTransition=function(a){return new Km(r.engine.root,a)};r.createFadeOut=
function(a,b){null==b&&(b=-16777216);return new Lm(a,b)};r.createFadeIn=function(a,b){null==b&&(b=-16777216);return new Mm(a,b)};r.createCircleOut=function(a,b){null==b&&(b=-16777216);return new Tk(Cb.OUT,a,b)};r.createCircleIn=function(a,b){null==b&&(b=-16777216);return new Tk(Cb.IN,a,b)};r.setBlendModeForLayer=function(a,b){a.set_blendMode(b);a instanceof Rc&&L.__cast(a,Rc).tiles.set_blendMode(b)};r.showTileLayer=function(a){a.set_alpha(1)};r.hideTileLayer=function(a){a.set_alpha(0)};r.fadeTileLayerTo=
function(a,b,c,d){null==a.alphaTween&&(a.alphaTween=(new $e).doOnUpdate(function(){a.set_alpha(a.alphaTween.value)}));a.alphaTween.tween(a.get_alpha(),b,d,1E3*c|0)};r.getTileLayerOpacity=function(a){return 100*a.get_alpha()};r.setDrawingLayer=function(a){a instanceof Rc&&(p.engine.g.graphics=a.overlay.get_graphics())};r.setDrawingLayerToActorLayer=function(a){null!=a&&(p.engine.g.graphics=a.layer.overlay.get_graphics())};r.setDrawingLayerToSceneLayer=function(){p.engine.g.graphics=p.engine.transitionLayer.get_graphics()};
r.getScreenX=function(){return p.cameraX/p.SCALE};r.getScreenY=function(){return p.cameraY/p.SCALE};r.getScreenXCenter=function(){return p.cameraX/p.SCALE+p.screenWidth/2};r.getScreenYCenter=function(){return p.cameraY/p.SCALE+p.screenHeight/2};r.getCamera=function(){return r.engine.camera};r.isCtrlDown=function(){return S.check("iCTRL")?!0:S.check("iCOMMAND")};r.isShiftDown=function(){return S.check("iSHIFT")};r.simulateKeyPress=function(a){S.simulateKeyPress(a)};r.simulateKeyRelease=function(a){S.simulateKeyRelease(a)};
r.isKeyDown=function(a){return S.check(a)};r.isKeyPressed=function(a){return S.pressed(a)};r.isKeyReleased=function(a){return S.released(a)};r.isMouseDown=function(){return S.mouseDown};r.isMousePressed=function(){return S.mousePressed};r.isMouseReleased=function(){return S.mouseReleased};r.getMouseX=function(){return S.mouseX/p.SCALE};r.getMouseY=function(){return S.mouseY/p.SCALE};r.getMouseWorldX=function(){return S.mouseX/p.SCALE+p.cameraX};r.getMouseWorldY=function(){return S.mouseY/p.SCALE+
p.cameraY};r.getMousePressedX=function(){return r.mpx};r.getMousePressedY=function(){return r.mpy};r.getMouseReleasedX=function(){return r.mrx};r.getMouseReleasedY=function(){return r.mry};r.showCursor=function(){ve.show()};r.hideCursor=function(){ve.hide()};r.charFromCharCode=function(a){return 32>a||126<a&&160>a?"":String.fromCodePoint(a)};r.getLastCreatedActor=function(){return r.lastCreatedActor};r.createActor=function(a,b,c,d){a=r.engine.createActorOfType(a,b,c,d);return r.lastCreatedActor=a};
r.createRecycledActor=function(a,b,c,d){a=r.engine.getRecycledActorOfType(a,b,c,d);return r.lastCreatedActor=a};r.createRecycledActorOnLayer=function(a,b,c,d){a=r.engine.getRecycledActorOfTypeOnLayer(a,b,c,d.ID);return r.lastCreatedActor=a};r.recycleActor=function(a){r.engine.recycleActor(a)};r.createActorInNextScene=function(a,b,c,d){r.engine.createActorInNextScene(a,b,c,d)};r.getActorTypeByName=function(a){return ac.get().resourceMap.get(a)};r.getActorType=function(a){return ac.get().resources.get(a)};
r.getAllActorTypes=function(){return ac.get().getAllActorTypes()};r.getActorsOfType=function(a){return r.engine.getActorsOfType(a)};r.getActor=function(a){return r.engine.getActor(a)};r.getActorGroup=function(a){return r.engine.getGroup(a)};r.setGravity=function(a,b){r.engine.gravityX=a;r.engine.gravityY=b;null!=r.engine.world&&r.engine.world.setGravity(new N(a,b))};r.getGravity=function(){return null==r.engine.world?(r.dummyVec.x=r.engine.gravityX,r.dummyVec.y=r.engine.gravityY,r.dummyVec):r.engine.world.getGravity()};
r.enableContinuousCollisions=function(){rc.m_continuousPhysics=!0};r.toPhysicalUnits=function(a){return p.toPhysicalUnits(a)};r.toPixelUnits=function(a){return p.toPixelUnits(a)};r.makeActorNotPassThroughTerrain=function(a){p.NO_PHYSICS?null!=a&&1==a.physicsMode&&(a.continuousCollision=!0):(rc.m_continuousPhysics=!0,null!=a&&0==a.physicsMode&&a.body.setBullet(!0))};r.makeActorPassThroughTerrain=function(a){if(p.NO_PHYSICS)null!=a&&1==a.physicsMode&&(a.continuousCollision=!1);else if(null!=a&&0==a.physicsMode){a.body.setBullet(!1);
a=!1;for(var b=r.engine.allActors.iterator();b.hasNext();){var c=b.next();if(null!=c.body&&c.body.isBullet()){a=!0;break}}a||(rc.m_continuousPhysics=!1)}};r.mute=function(){};r.unmute=function(){};r.getSound=function(a){return ac.get().resources.get(a)};r.getSoundByName=function(a){return ac.get().resourceMap.get(a)};r.playSound=function(a){if(null!=a)for(var b=0;32>b;){var c=b++;c=r.engine.channels[c];if(null==c.currentSound){c.playSound(a);c.setVolume(1);c.setPanning(0);break}}};r.loopSound=function(a){if(null!=
a)for(var b=0;32>b;){var c=b++;c=r.engine.channels[c];if(null==c.currentSound){c.loopSound(a);c.setVolume(1);c.setPanning(0);break}}};r.playSoundOnChannel=function(a,b){b=r.engine.channels[b];b.playSound(a);b.setVolume(1);b.setPanning(0)};r.loopSoundOnChannel=function(a,b){b=r.engine.channels[b];b.loopSound(a);b.setVolume(1);b.setPanning(0)};r.stopSoundOnChannel=function(a){r.engine.channels[a].stopSound()};r.pauseSoundOnChannel=function(a){r.engine.channels[a].setPause(!0)};r.resumeSoundOnChannel=
function(a){r.engine.channels[a].setPause(!1)};r.setVolumeForChannel=function(a,b){r.engine.channels[b].setVolume(a)};r.setPanningForChannel=function(a,b){r.engine.channels[b].setPanning(a)};r.stopAllSounds=function(){for(var a=0;32>a;){var b=a++;r.engine.channels[b].stopSound()}};r.setVolumeForAllSounds=function(a){$b.masterVolume=a;for(a=0;32>a;){var b=a++;b=r.engine.channels[b];b.setVolume(b.volume)}};r.fadeInSoundOnChannel=function(a,b){r.engine.channels[a].fadeInSound(b)};r.fadeOutSoundOnChannel=
function(a,b){r.engine.channels[a].fadeOutSound(b)};r.fadeSoundOnChannel=function(a,b,c){r.engine.channels[a].fadeSound(b,c/100)};r.fadeInForAllSounds=function(a){for(var b=0;32>b;){var c=b++;r.engine.channels[c].fadeInSound(a)}};r.fadeOutForAllSounds=function(a){for(var b=0;32>b;){var c=b++;r.engine.channels[c].fadeOutSound(a)}};r.fadeForAllSounds=function(a,b){for(var c=0;32>c;){var d=c++;r.engine.channels[d].fadeSound(a,b/100)}};r.getPositionForChannel=function(a){a=r.engine.channels[a];return null!=
a&&null!=a.currentSound?a.paused?a.position:a.currentSound.get_position():0};r.setPositionForChannel=function(a,b){a=r.engine.channels[a];null!=a&&null!=a.currentSound&&(a.paused?a.position=b:a.looping?a.loopSound(a.currentClip,b):a.playSound(a.currentClip,b))};r.getSoundLengthForChannel=function(a){a=r.engine.channels[a];return null!=a&&null!=a.currentSource?a.currentSource.get_length():0};r.getSoundLength=function(a){return null!=a&&null!=a.src?a.src.get_length():0};r.setColorBackground=function(a,
b){null==b&&(b=-2);r.engine.colorLayer.get_graphics().clear();a!=lg.TRANSPARENT&&(b==lg.TRANSPARENT?r.engine.setColorBackground(new lg(a)):r.engine.setColorBackground(new tj(a,b)))};r.setScrollSpeedForBackground=function(a,b,c){if(null==a){a=0;for(var d=p.engine.backgroundLayers;a<d.length;){var e=d[a];++a;e.setScrollSpeed(b,c)}}else a instanceof Fd&&L.__cast(a,Fd).setScrollSpeed(b,c)};r.setScrollFactorForLayer=function(a,b,c){a instanceof Fd?L.__cast(a,Fd).setScrollFactor(b,c):a instanceof Rc&&(a.scrollFactorX=
b,a.scrollFactorY=c)};r.changeBackground=function(a,b){b=ac.get().resourceMap.get(b);null!=b&&a instanceof Fd&&L.__cast(a,Fd).reload(b.ID)};r.changeBackgroundImage=function(a,b){null!=b&&a instanceof Fd&&L.__cast(a,Fd).setImage(b)};r.addBackground=function(a,b,c){a=ac.get().resourceMap.get(a);b=new Fd(r.engine.getNextLayerID(),b,c,0,0,1,10,a.ID,!1);b.load();r.engine.insertLayer(b,c)};r.addBackgroundFromImage=function(a,b,c,d){c=new Fd(r.engine.getNextLayerID(),c,d,0,0,1,10,-1,!1);c.loadFromImg(a,
b);r.engine.insertLayer(c,d)};r.addTileLayer=function(a,b){var c=r.engine.scene.sceneWidth/r.engine.scene.tileWidth|0,d=r.engine.scene.sceneHeight/r.engine.scene.tileHeight|0,e=r.engine.getNextLayerID();c=new Ce(e,r.engine.scene,c,d);c.set_name(a);a=new Rc(e,a,b,1,1,1,10,c);r.engine.insertLayer(a,b)};r.newImage=function(a,b){return r.imageApiAutoscale?new na(a*p.SCALE|0,b*p.SCALE|0,!0,0):new na(a,b,!0,0)};r.captureScreenshot=function(){var a=new na(r.getStageWidth()|0,r.getStageHeight()|0);a.draw($a.get_current().stage,
null,null,null,null,ma.antialias);return a};r.getImageForActor=function(a){return a.getCurrentImage()};r.getExternalImage=function(a){return Ea.getBitmapData("assets/data/"+a,!1)};r.loadImageFromURL=function(a,b){var c=new Uk;c.contentLoaderInfo.addEventListener("complete",function(a){a=L.__cast(L.__cast(a.currentTarget,Ig).content,Zc).get_bitmapData();b(a)});c.load(new Jg(a))};r.getSubImage=function(a,b,c,d,e){r.imageApiAutoscale&&(b=b*p.SCALE|0,c=c*p.SCALE|0,d=d*p.SCALE|0,e=e*p.SCALE|0);if(null!=
a&&0<=b&&0<=c&&0<d&&0<e&&b<a.width&&c<a.height){var f=new na(d,e);r.dummyRect.x=b;r.dummyRect.y=c;r.dummyRect.width=d;r.dummyRect.height=e;r.dummyPoint.x=0;r.dummyPoint.y=0;f.copyPixels(a,r.dummyRect,r.dummyPoint);return f}return new na(1,1)};r.setOrderForImage=function(a,b){null!=a&&null!=a.parent&&0<=b&&b<a.parent.get_numChildren()&&a.parent.setChildIndex(a,b)};r.getOrderForImage=function(a){return null!=a&&null!=a.parent?a.parent.getChildIndex(a):-1};r.bringImageBack=function(a){null!=a&&null!=
a.parent&&r.setOrderForImage(a,a.parent.getChildIndex(a)-1)};r.bringImageForward=function(a){null!=a&&null!=a.parent&&r.setOrderForImage(a,a.parent.getChildIndex(a)+1)};r.bringImageToBack=function(a){null!=a&&null!=a.parent&&r.setOrderForImage(a,0)};r.bringImagetoFront=function(a){null!=a&&null!=a.parent&&r.setOrderForImage(a,a.parent.get_numChildren()-1)};r.attachImageToActor=function(a,b,c,d,e){null==e&&(e=1);null!=a&&(null!=a.parent&&r.removeImage(a),2==e?(b.addChild(a),b.setChildIndex(a,0)):b.addChild(a),
a.cacheParentAnchor=b.cacheAnchor,a.set_imgX(c),a.set_imgY(d),a.set_smoothing(ma.antialias),b.attachedImages.push(a))};r.attachImageToHUD=function(a,b,c){null!=a&&(null!=a.parent&&r.removeImage(a),r.engine.hudLayer.addChild(a),r.engine.hudLayer.attachedImages.push(a),a.set_imgX(b),a.set_imgY(c),a.set_smoothing(ma.antialias))};r.attachImageToLayer=function(a,b,c,d,e){null==e&&(e=1);null!=a&&(null!=a.parent&&r.removeImage(a),2==e?b.addChildAt(a,0):b.addChild(a),-1==b.attachedImages.indexOf(a)&&b.attachedImages.push(a),
a.set_imgX(c),a.set_imgY(d),a.set_smoothing(ma.antialias))};r.removeImage=function(a){null!=a&&(a.parent instanceof Bb?B.remove(L.__cast(a.parent,Bb).attachedImages,a):a.parent instanceof Rc&&B.remove(L.__cast(a.parent,Rc).attachedImages,a),a.parent.removeChild(a))};r.resizeImage=function(a,b,c,d){null==d&&(d=!0);null==c&&(c=1);null==b&&(b=1);var e=new Ha;e.scale(b,c);b=new na(a.width*b|0,a.height*c|0,!0,0);b.draw(a,e,null,null,null,d);return b};r.drawImageOnImage=function(a,b,c,d,e){r.imageApiAutoscale&&
(c=c*p.SCALE|0,d=d*p.SCALE|0);if(null!=a&&null!=b)if(r.dummyPoint.x=c,r.dummyPoint.y=d,10==e)b.copyPixels(a,a.rect,r.dummyPoint,null,null,!0);else{var f=new Ha;f.identity();f.translate(c,d);b.draw(a,f,null,e)}};r.drawTextOnImage=function(a,b,c,d,e){r.imageApiAutoscale&&(c=c*p.SCALE|0,d=d*p.SCALE|0);null!=a&&e.font.renderToImg(a,b,0,1,c,d,e.letterSpacing,e.fontScale,0,!1)};r.clearImagePartially=function(a,b,c,d,e){r.imageApiAutoscale&&(b=b*p.SCALE|0,c=c*p.SCALE|0,d=d*p.SCALE|0,e=e*p.SCALE|0);null!=
a&&(r.dummyRect.x=b,r.dummyRect.y=c,r.dummyRect.width=d,r.dummyRect.height=e,a.fillRect(r.dummyRect,0))};r.clearImage=function(a){null!=a&&a.fillRect(a.rect,0)};r.clearImageUsingMask=function(a,b,c,d){r.imageApiAutoscale&&(c=c*p.SCALE|0,d=d*p.SCALE|0);var e=b.width,f=b.height,g=0,k=0;0>c?(e=c>a.width-e?a.width:e+c,g-=c,c=0):c>a.width-e&&(e-=c-(a.width-e),c=a.width-e);0>d?(f=d>a.height-f?a.height:f+d,k-=d,d=0):d>a.height-f&&(f-=d-(a.height-f),d=a.height-f);if(!(0>=e||0>=f)){g=new ia(g,k,e,f);b=b.getPixels(g);
c=new ia(c,d,e,f);d=a.getPixels(c);g=0;for(e*=f;g<e;){f=g++;b.position=4*f;d.position=4*f;k=b.readUnsignedByte();var l=d.readUnsignedByte();k=(256-k)*l>>8;d.position=4*f;d.writeByte(k)}b.position=0;d.position=0;a.setPixels(c,d)}};r.retainImageUsingMask=function(a,b,c,d){r.imageApiAutoscale&&(c=c*p.SCALE|0,d=d*p.SCALE|0);r.dummyPoint.x=c;r.dummyPoint.y=d;a.copyChannel(b,b.rect,r.dummyPoint,8,8)};r.fillImage=function(a,b){null!=a&&a.fillRect(a.rect,-16777216|b)};r.filterImage=function(a,b){null!=a&&
(r.dummyPoint.x=0,r.dummyPoint.y=0,a.applyFilter(a,a.rect,r.dummyPoint,b))};r.imageSetPixel=function(a,b,c,d){if(null!=a)if(r.imageApiAutoscale&&1!=p.SCALE){var e=(b+1)*p.SCALE|0,f=(c+1)*p.SCALE|0;b=b*p.SCALE|0;for(c=c*p.SCALE|0;b<e;)for(var g=b++,k=c,l=f;k<l;){var m=k++;a.setPixel32(g,m,d|-16777216)}}else a.setPixel32(b,c,d|-16777216)};r.imageGetPixel=function(a,b,c){return null!=a?(r.imageApiAutoscale&&(b=b*p.SCALE|0,c=c*p.SCALE|0),a.getPixel(b,c)):0};r.imageSwapColor=function(a,b,c){null!=a&&(r.dummyPoint.x=
0,r.dummyPoint.y=0,a.threshold(a,a.rect,r.dummyPoint,"==",-16777216|b,-16777216|c,-1,!0))};r.flipImageHorizontal=function(a){var b=new Ha;b.scale(-1,1);b.translate(a.width,0);var c=new na(a.width,a.height,!0,0);c.draw(a,b);r.dummyPoint.x=0;r.dummyPoint.y=0;a.copyPixels(c,c.rect,r.dummyPoint)};r.flipImageVertical=function(a){var b=new Ha;b.scale(1,-1);b.translate(0,a.height);var c=new na(a.width,a.height,!0,0);c.draw(a,b);r.dummyPoint.x=0;r.dummyPoint.y=0;a.copyPixels(c,c.rect,r.dummyPoint)};r.setXForImage=
function(a,b){null!=a&&a.set_imgX(b)};r.setYForImage=function(a,b){null!=a&&a.set_imgY(b)};r.fadeImageTo=function(a,b,c,d){null==c&&(c=1);a.get_tweenProps().alpha.tween(a.get_alpha(),b,d,1E3*c|0)};r.setOriginForImage=function(a,b,c){a.setOrigin(b,c)};r.growImageTo=function(a,b,c,d,e){null==d&&(d=1);null==c&&(c=1);null==b&&(b=1);a.get_tweenProps().scaleXY.tween(a.get_scaleX(),b,a.get_scaleY(),c,e,1E3*d|0)};r.spinImageTo=function(a,b,c,d){null==c&&(c=1);a.get_tweenProps().angle.tween(a.get_rotation(),
b,d,1E3*c|0)};r.moveImageTo=function(a,b,c,d,e){null==d&&(d=1);a.get_tweenProps().xy.tween(a.get_imgX(),b,a.get_imgY(),c,e,1E3*d|0)};r.spinImageBy=function(a,b,c,d){null==c&&(c=1);r.spinImageTo(a,a.get_rotation()+b,c,d)};r.moveImageBy=function(a,b,c,d,e){null==d&&(d=1);r.moveImageTo(a,a.get_imgX()+b,a.get_imgY()+c,d,e)};r.setFilterForImage=function(a,b){null!=a&&a.img.set_filters(a.get_filters().concat([b]))};r.clearFiltersForImage=function(a){null!=a&&a.img.set_filters([])};r.imageToText=function(a){var b=
a.getPixels(a.rect);return a.width+";"+a.height+";"+r.toBase64(hb.ofData(za.toArrayBuffer(b)))};r.imageFromText=function(a){var b=a.split(";");a=K.parseInt(b[0]);var c=K.parseInt(b[1]),d=r.fromBase64(b[2]);b=new vc(0);for(var e=0,f=d.length;e<f;){var g=e++;b.writeByte(d.b[g])}b.position=0;b.__endian=0;a=new na(a,c,!0,0);a.setPixels(a.rect,b);return a};r.toBase64=function(a){var b=hb.ofString("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");a=(new Vk(b)).encodeBytes(a).toString();
b=a.length%4;1<b&&(a+="=");2==b&&(a+="=");return a};r.fromBase64=function(a){var b=-1;"="==a.charAt(a.length-2)?b=2:"="==a.charAt(a.length-1)&&(b=1);-1!=b&&(a=B.substr(a,0,a.length-b));b=hb.ofString("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");return(new Vk(b)).decodeBytes(hb.ofString(a))};r.startShakingScreen=function(a,b){null==b&&(b=.5);null==a&&(a=.05);r.engine.shakeScreen(a,b)};r.stopShakingScreen=function(){r.engine.stopShakingScreen()};r.getTopLayer=function(){return r.engine.getTopLayer()};
r.getBottomLayer=function(){return r.engine.getBottomLayer()};r.getMiddleLayer=function(){return r.engine.getMiddleLayer()};r.getTileLayerAt=function(a){return null!=a&&a instanceof Rc?L.__cast(a,Rc).tiles:null};r.getTilesetIDByName=function(a){a=ac.get().resourceMap.get(a);return a instanceof Rf?a.ID:-1};r.setTileAt=function(a,b,c,d,e){if(null!=c&&c instanceof Rc){r.removeTileAt(a,b,c);var f=L.__cast(c,Rc).tiles;d=ac.get().resources.get(d).tiles[e];f.setTileAt(a,b,d);null==d||null==d.pixels||T.contains(r.engine.animatedTiles,
d)||1<d.durations.length&&r.engine.animatedTiles.push(d);if(null!=d&&-1!=d.collisionID){d=Eb.get().shapes.h[d.collisionID];f=d.getVertices();d=d.getVertexCount();f=Lb.asArray(f,d);d=0;for(e=f.getVertices();d<e.length;){var g=e[d];++d;g.x*=r.engine.scene.tileWidth/32;g.y*=r.engine.scene.tileHeight/32}d=b*r.engine.scene.tileWidth;e=a*r.engine.scene.tileHeight;p.NO_PHYSICS||null==f?null!=f&&r.getTileLayerAt(c).grid.setTile(b,a):r.createDynamicTile(f,d,e,c.ID,r.engine.scene.tileWidth,r.engine.scene.tileHeight)}r.engine.tileUpdated=
!0}};r.tileExistsAt=function(a,b,c){return null!=r.getTileAt(a,b,c)};r.tileCollisionAt=function(a,b,c){if(null==c){c=0;for(var d=r.engine.interactiveLayers;c<d.length;){var e=d[c];++c;e=e.tiles.getTileAt(a,b);if(null!=e&&-1!=e.collisionID)return!0}return!1}a=r.getTileAt(a,b,c);return null==a||-1==a.collisionID?!1:!0};r.getTilePosition=function(a,b){var c=r.engine.scene.tileHeight,d=r.engine.scene.tileWidth;return 0==a?Math.floor(b/d):Math.floor(b/c)};r.getTileIDAt=function(a,b,c){a=r.getTileAt(a,
b,c);return null==a?-1:a.tileID};r.getTileColIDAt=function(a,b,c){a=r.getTileAt(a,b,c);return null==a?-1:a.collisionID};r.getTileDataAt=function(a,b,c){a=r.getTileAt(a,b,c);return null==a?"":a.metadata};r.getTilesetIDAt=function(a,b,c){a=r.getTileAt(a,b,c);return null==a?-1:a.parent.ID};r.getTileAt=function(a,b,c){c=r.getTileLayerAt(c);return null==c?null:c.getTileAt(a,b)};r.removeTileAt=function(a,b,c){if(null!=c&&c instanceof Rc){var d=L.__cast(c,Rc).tiles,e=r.getTileAt(a,b,c);null!=e&&(p.NO_PHYSICS||
-1==e.collisionID?-1!=e.collisionID&&(c=b,e=a,null==e&&(e=0),null==c&&(c=0),d.grid.setTile(c,e,!1)):(c="ID-"+b*r.engine.scene.tileWidth+"-"+a*r.engine.scene.tileHeight+"-"+c.ID,e=r.engine.dynamicTiles,e=null!=q[c]?e.getReserved(c):e.h[c],null!=e&&(r.engine.removeActor(e),r.engine.dynamicTiles.remove(c))),d.setTileAt(a,b,null),r.engine.tileUpdated=!0)}};r.getTileForCollision=function(a,b){if(a.thisCollidedWithTile||a.otherCollidedWithTile){var c=Math.round(p.toPixelUnits(b.normalX)),d=Math.round(p.toPixelUnits(b.normalY)),
e=Math.round(p.toPixelUnits(b.x));b=Math.round(p.toPixelUnits(b.y));a.thisCollidedWithTile&&(c=-c,d=-d);0>c&&0==e%r.engine.scene.tileWidth&&--e;0>d&&0==b%r.engine.scene.tileHeight&&--b;e=r.getTilePosition(0,e);b=r.getTilePosition(1,b);a=0;for(c=r.engine.interactiveLayers;a<c.length;)if(d=c[a],++a,d=d.tiles.getTileAt(b,e),null!=d&&-1!=d.collisionID)return d}return null};r.getTileDataForCollision=function(a,b){a=r.getTileForCollision(a,b);return null!=a?a.metadata:""};r.createDynamicTile=function(a,
b,c,d,e,f){a=new Bb(r.engine,1E8,1,b,c,d,e,f,null,null,null,null,!1,!0,!1,!1,a,!1,!1);a.set_name("Terrain");a.set_visible(!1);b="ID-"+b+"-"+c+"-"+d;c=r.engine.dynamicTiles;null!=q[b]?c.setReserved(b,a):c.h[b]=a};r.getFont=function(a){return ac.get().resources.get(a)};r.pause=function(){r.engine.pause()};r.unpause=function(){r.engine.unpause()};r.toggleFullScreen=function(){p.engine.toggleFullScreen()};r.pauseAll=function(){p.paused=!0};r.unpauseAll=function(){p.paused=!1};r.getScreenWidth=function(){return p.screenWidth};
r.getScreenHeight=function(){return p.screenHeight};r.getStageWidth=function(){return p.stage.stageWidth};r.getStageHeight=function(){return p.stage.stageHeight};r.setOffscreenTolerance=function(a,b,c,d){p.paddingTop=a;p.paddingLeft=b;p.paddingBottom=c;p.paddingRight=d};r.isTransitioning=function(){return r.engine.isTransitioning()};r.setTimeScale=function(a){p.timeScale=a};r.randomFloat=function(){return Math.random()};r.randomFloatBetween=function(a,b){return a<=b?a+Math.random()*(b-a):b+Math.random()*
(a-b)};r.randomInt=function(a,b){return a<=b?a+Math.floor(Math.random()*(b-a+1)):b+Math.floor(Math.random()*(a-b+1))};r.saveGame=function(a,b){a=Mc.getLocal(a);for(var c=r.engine.gameAttributes.keys();c.hasNext();){var d=c.next(),e=r.engine.gameAttributes;T.saveToSharedObject(a,d,null!=q[d]?e.getReserved(d):e.h[d])}T.flushSharedObject(a,b)};r.loadGame=function(a,b){a=Mc.getLocal(a);for(var c=0,d=X.fields(a.data);c<d.length;){var e=d[c];++c;var f=r.engine.gameAttributes,g=T.loadFromSharedObject(a,
e);null!=q[e]?f.setReserved(e,g):f.h[e]=g}null!=b&&b(!0)};r.saveData=function(a,b,c,d){a=Mc.getLocal(a);T.saveToSharedObject(a,b,c);T.flushSharedObject(a,d)};r.loadData=function(a,b,c){a=Mc.getLocal(a);b=T.loadFromSharedObject(a,b);null!=c&&c(!0);return b};r.checkData=function(a,b){a=Mc.getLocal(a);return null!=X.field(a.data,b)};r.defaultURLHandler=function(a){new Zg(a.target)};r.openURLInBrowser=function(a){$a.getURL(new Jg(a))};r.visitURL=function(a,b){null==b&&(b=r.defaultURLHandler);try{var c=
new Jg(a);c.method="GET";(new Zg(c)).addEventListener("complete",b)}catch(d){if(ra.lastException=d,"string"!=typeof(d instanceof E?d.val:d))throw d;}};r.postToURL=function(a,b,c){null==c&&(c=r.defaultURLHandler);a=new Jg(a);a.method="POST";null!=b&&(a.data=Wk._new(b));try{var d=new Zg(a);d.addEventListener("complete",c);r.runLater(500,function(a){d.close()})}catch(e){if(ra.lastException=e,"string"!=typeof(e instanceof E?e.val:e))throw e;}};r.convertToPseudoUnicode=function(a){var b="";try{for(var c=
0,d=0,e=a.length;d<e;){c=d;var f=a.charCodeAt(d);d+=55296<=f&&56319>=f?2:1;var g=Dc.codePointAt(a,c),k=g;if(128>k){var l=65535>=g?String.fromCodePoint(g):String.fromCodePoint((g>>10)+55232)+String.fromCodePoint(g&1023|56320);b+=l}else b+="~x"+ba.hex(k,4)}}catch(m){return ra.lastException=m,a}return b};r.simpleTweet=function(a,b){r.openURLInBrowser("http://twitter.com/home?status="+encodeURIComponent(a+" "+b))};r.newgroundsShowAd=function(){};r.newgroundsSetMedalPosition=function(a,b){};r.newgroundsUnlockMedal=
function(a){};r.newgroundsSubmitScore=function(a,b){};r.newgroundsShowScore=function(a){};r.newgroundsHelper=function(a){};r.kongregateInitAPI=function(){};r.kongregateSubmitStat=function(a,b){};r.kongregateIsGuest=function(){return!0};r.kongregateGetUsername=function(){return"Guest"};r.kongregateGetUserID=function(){return 0};r.loadAtlas=function(a){r.engine.atlasesToLoad.h[a]=a};r.unloadAtlas=function(a){r.engine.atlasesToUnload.h[a]=a};r.atlasIsLoaded=function(a){a=Eb.get().atlases.h[a];return null!=
a?a.active:!1};r.initGooglePlayGames=function(){};r.stopGooglePlayGames=function(){};r.getGPGConnectionInfo=function(a){return!1};r.showGPGAchievements=function(){};r.showGPGLeaderboards=function(){};r.showGPGLeaderboard=function(a){};r.showGPGQuests=function(){};r.unlockGPGAchievement=function(a){};r.incrementGPGAchievement=function(a,b){};r.submitGPGScore=function(a,b){};r.updateGPGEvent=function(a,b){};r.getCompletedGPGQuests=function(){return[]};r.gameCenterInitialize=function(){};r.gameCenterIsAuthenticated=
function(){return!1};r.gameCenterGetPlayerName=function(){return"None"};r.gameCenterGetPlayerID=function(){return"None"};r.gameCenterShowLeaderboard=function(a){};r.gameCenterShowAchievements=function(){};r.gameCenterSubmitScore=function(a,b){};r.gameCenterSubmitAchievement=function(a,b){};r.gameCenterResetAchievements=function(){};r.gameCenterShowBanner=function(a,b){};r.purchasesAreInitialized=function(){return!1};r.purchasesRestore=function(){};r.purchasesBuy=function(a){};r.purchasesHasBought=
function(a){return!1};r.purchasesGetTitle=function(a){return""};r.purchasesGetDescription=function(a){return""};r.purchasesGetPrice=function(a){return""};r.purchasesRequestProductInfo=function(a){};r.purchasesUse=function(a){};r.purchasesGoogleConsume=function(a){};r.purchasesGetQuantity=function(a){return 0};r.showAlert=function(a,b){};r.vibrate=function(a){};r.showKeyboard=function(){};r.hideKeyboard=function(){};r.setKeyboardText=function(a){};r.setIconBadgeNumber=function(a){};r.enableDebugDrawing=
function(){p.DEBUG_DRAW=!0;p.NO_PHYSICS||p.debugDrawer.m_sprite.get_graphics().clear()};r.disableDebugDrawing=function(){p.DEBUG_DRAW=!1;p.NO_PHYSICS||p.debugDrawer.m_sprite.get_graphics().clear()};r.gameURL=function(){return""};r.exitGame=function(){};r.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 Sf(a)};r.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 Sf(a)};r.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 Sf(a)};r.createTintFilter=function(a,b){null==b&&(b=1);var c=new bb;c.colorize(a,b);return c.getFilter()};r.createHueFilter=function(a){var b=new bb;b.adjustHue(a);b.adjustSaturation(1);return b.getFilter()};r.createSaturationFilter=function(a){var b=new bb;
b.adjustSaturation(a/100);return b.getFilter()};r.createBrightnessFilter=function(a){var b=new bb;b.adjustBrightness(a/100);return b.getFilter()};r.prototype={wrapper:null,propertyChangeListeners:null,equalityPairs:null,checkProperties:null,nameMap:null,attributeTweens:null,scriptInit:null,toInternalName:function(a){if(null==this.nameMap)return a;var b=this.nameMap;b=null!=q[a]?b.getReserved(a):b.h[a];return null==b?a:b},forwardMessage:function(a){},clearListeners:function(){this.propertyChangeListeners=
new ua},internalGetGroup:function(a,b,c){if(p.NO_PHYSICS)return b=L.__cast(c,Cc),a==b.actorA?r.engine.getGroup(b.groupA):r.engine.getGroup(b.groupB);b=L.__cast(b,jg);if(null==b)return L.__cast(a,Bb).getGroup();a=b.groupID;return-1E3==a&&(b=b.getBody(),null!=b)?r.engine.getGroup(b.getUserData().groupID):r.engine.getGroup(a)},init:function(){},addMobileKeyboardListener:function(a,b){a=new uj(jd.TYPE_KEYBOARD,a,b);r.engine.nativeListeners.push(a);this instanceof ja&&L.__cast(this,ja).actor.registerListener(r.engine.nativeListeners,
a)},addMobileAdListener:function(a,b){a=new uj(jd.TYPE_ADS,a,b);r.engine.nativeListeners.push(a);this instanceof ja&&L.__cast(this,ja).actor.registerListener(r.engine.nativeListeners,a)},addGameCenterListener:function(a,b){a=new uj(jd.TYPE_GAMECENTER,a,b);r.engine.nativeListeners.push(a);this instanceof ja&&L.__cast(this,ja).actor.registerListener(r.engine.nativeListeners,a)},addPurchaseListener:function(a,b){a=new uj(jd.TYPE_PURCHASES,a,b);r.engine.nativeListeners.push(a);this instanceof ja&&L.__cast(this,
ja).actor.registerListener(r.engine.nativeListeners,a)},addWhenCreatedListener:function(a,b){var c=this instanceof ja;null!=a&&(a.whenCreatedListeners.push(b),c&&L.__cast(this,ja).actor.registerListener(a.whenCreatedListeners,b))},addWhenKilledListener:function(a,b){var c=this instanceof ja;null!=a&&(a.whenKilledListeners.push(b),c&&L.__cast(this,ja).actor.registerListener(a.whenKilledListeners,b))},addWhenUpdatedListener:function(a,b){var c=this instanceof ja;null==a&&c&&(a=L.__cast(this,ja).actor);
a=null!=a?a.whenUpdatedListeners:r.engine.whenUpdatedListeners;a.push(b);c&&L.__cast(this,ja).actor.registerListener(a,b)},addWhenDrawingListener:function(a,b){var c=this instanceof ja;null==a&&c&&(a=L.__cast(this,ja).actor);a=null!=a?a.whenDrawingListeners:r.engine.whenDrawingListeners;a.push(b);c&&L.__cast(this,ja).actor.registerListener(a,b)},addActorEntersRegionListener:function(a,b){null!=a&&(a.whenActorEntersListeners.push(b),this instanceof ja&&L.__cast(this,ja).actor.registerListener(a.whenActorEntersListeners,
b))},addActorExitsRegionListener:function(a,b){null!=a&&(a.whenActorExitsListeners.push(b),this instanceof ja&&L.__cast(this,ja).actor.registerListener(a.whenActorExitsListeners,b))},addActorPositionListener:function(a,b){null!=a&&(a.positionListeners.push(b),a.positionListenerCount++,this instanceof ja&&L.__cast(this,ja).actor.registerListener(a.positionListeners,b))},addActorTypeGroupPositionListener:function(a,b){r.engine.typeGroupPositionListeners.h.hasOwnProperty(a)||(r.engine.typeGroupPositionListeners.h[a]=
[]);a=L.__cast(r.engine.typeGroupPositionListeners.h[a],Array);a.push(b);this instanceof ja&&L.__cast(this,ja).actor.registerListener(a,b)},addSwipeListener:function(a){r.engine.whenSwipedListeners.push(a);this instanceof ja&&L.__cast(this,ja).actor.registerListener(r.engine.whenSwipedListeners,a)},addMultiTouchStartListener:function(a){r.engine.whenMTStartListeners.push(a);this instanceof ja&&L.__cast(this,ja).actor.registerListener(r.engine.whenMTStartListeners,a)},addMultiTouchMoveListener:function(a){r.engine.whenMTDragListeners.push(a);
this instanceof ja&&L.__cast(this,ja).actor.registerListener(r.engine.whenMTDragListeners,a)},addMultiTouchEndListener:function(a){r.engine.whenMTEndListeners.push(a);this instanceof ja&&L.__cast(this,ja).actor.registerListener(r.engine.whenMTEndListeners,a)},addKeyStateListener:function(a,b){var c=r.engine.whenKeyPressedListeners;if(null==(null!=q[a]?c.getReserved(a):c.h[a])){c=[];var d=r.engine.whenKeyPressedListeners;null!=q[a]?d.setReserved(a,c):d.h[a]=c}r.engine.hasKeyPressedListeners=!0;c=r.engine.whenKeyPressedListeners;
a=null!=q[a]?c.getReserved(a):c.h[a];a.push(b);this instanceof ja&&L.__cast(this,ja).actor.registerListener(a,b)},addAnyKeyPressedListener:function(a){r.engine.whenAnyKeyPressedListeners.push(a);this instanceof ja&&L.__cast(this,ja).actor.registerListener(r.engine.whenAnyKeyPressedListeners,a)},addAnyKeyReleasedListener:function(a){r.engine.whenAnyKeyReleasedListeners.push(a);this instanceof ja&&L.__cast(this,ja).actor.registerListener(r.engine.whenAnyKeyReleasedListeners,a)},addAnyGamepadPressedListener:function(a){r.engine.whenAnyGamepadPressedListeners.push(a);
this instanceof ja&&L.__cast(this,ja).actor.registerListener(r.engine.whenAnyGamepadPressedListeners,a)},addAnyGamepadReleasedListener:function(a){r.engine.whenAnyGamepadReleasedListeners.push(a);this instanceof ja&&L.__cast(this,ja).actor.registerListener(r.engine.whenAnyGamepadReleasedListeners,a)},addMousePressedListener:function(a){r.engine.whenMousePressedListeners.push(a);this instanceof ja&&L.__cast(this,ja).actor.registerListener(r.engine.whenMousePressedListeners,a)},addMouseReleasedListener:function(a){r.engine.whenMouseReleasedListeners.push(a);
this instanceof ja&&L.__cast(this,ja).actor.registerListener(r.engine.whenMouseReleasedListeners,a)},addMouseMovedListener:function(a){r.engine.whenMouseMovedListeners.push(a);this instanceof ja&&L.__cast(this,ja).actor.registerListener(r.engine.whenMouseMovedListeners,a)},addMouseDraggedListener:function(a){r.engine.whenMouseDraggedListeners.push(a);this instanceof ja&&L.__cast(this,ja).actor.registerListener(r.engine.whenMouseDraggedListeners,a)},addMouseOverActorListener:function(a,b){null!=a&&
(a.mouseOverListeners.push(b),this instanceof ja&&L.__cast(this,ja).actor.registerListener(a.mouseOverListeners,b))},addPropertyChangeListener:function(a,b,c){var d=this.propertyChangeListeners;if(null!=q[a]?!d.existsReserved(a):!d.h.hasOwnProperty(a)){d=this.propertyChangeListeners;var e=[];null!=q[a]?d.setReserved(a,e):d.h[a]=e}null!=b?(d=this.propertyChangeListeners,d=!(null!=q[b]?d.existsReserved(b):d.h.hasOwnProperty(b))):d=!1;d&&(d=this.propertyChangeListeners,e=[],null!=q[b]?d.setReserved(b,
e):d.h[b]=e);d=this.propertyChangeListeners;a=null!=q[a]?d.getReserved(a):d.h[a];d=this.propertyChangeListeners;d=null!=q[b]?d.getReserved(b):d.h[b];a.push(c);null!=b&&(d.push(c),e=[],e.push(a),e.push(d),this.equalityPairs.set(c,e));this instanceof ja&&(L.__cast(this,ja).actor.registerListener(a,c),null!=b&&L.__cast(this,ja).actor.registerListener(d,c));this.checkProperties=!0},propertyChanged:function(a,b){if(this.checkProperties){var c=this.propertyChangeListeners;a=null!=q[a]?c.getReserved(a):
c.h[a];if(null!=a)for(c=0;c<a.length;){try{var d=a[c];d(b,a);if(-1==T.indexOf(a,d)&&(--c,null!=this.equalityPairs.h[d.__id__])){for(var e=0,f=L.__cast(this.equalityPairs.h[d.__id__],Array);e<f.length;){var g=f[e];++e;g!=a&&g.splice(T.indexOf(g,d),1)}this.equalityPairs.remove(d)}}catch(k){if(ra.lastException=k,"string"!=typeof(k instanceof E?k.val:k))throw k;}++c}}},addCollisionListener:function(a,b){null!=a&&(a.collisionListeners.push(b),a.collisionListenerCount++,this instanceof ja&&L.__cast(this,
ja).actor.registerListener(a.collisionListeners,b))},addSceneCollisionListener:function(a,b,c){if(!r.engine.collisionListeners.h.hasOwnProperty(a)){var d=r.engine.collisionListeners,e=new Wa;d.h[a]=e}r.engine.collisionListeners.h.hasOwnProperty(b)||(d=r.engine.collisionListeners,e=new Wa,d.h[b]=e);r.engine.collisionListeners.h[a].h.hasOwnProperty(b)||(r.engine.collisionListeners.h[a].h[b]=[]);a=r.engine.collisionListeners.h[a].h[b];a.push(c);this instanceof ja&&(L.__cast(this,ja).actor.collisionListenerCount++,
L.__cast(this,ja).actor.registerListener(a,c))},addWhenTypeGroupCreatedListener:function(a,b){null==r.engine.whenTypeGroupCreatedListeners.h.__keys__[a.__id__]&&r.engine.whenTypeGroupCreatedListeners.set(a,[]);a=r.engine.whenTypeGroupCreatedListeners.h[a.__id__];a.push(b);this instanceof ja&&L.__cast(this,ja).actor.registerListener(a,b)},addWhenTypeGroupKilledListener:function(a,b){null==r.engine.whenTypeGroupDiesListeners.h.__keys__[a.__id__]&&r.engine.whenTypeGroupDiesListeners.set(a,[]);a=r.engine.whenTypeGroupDiesListeners.h[a.__id__];
a.push(b);this instanceof ja&&L.__cast(this,ja).actor.registerListener(a,b)},addSoundListener:function(a,b){a instanceof Fi?(null==r.engine.soundListeners.h.__keys__[a.__id__]&&r.engine.soundListeners.set(a,[]),a=r.engine.soundListeners.h[a.__id__]):(r.engine.channelListeners.h.hasOwnProperty(a)||(r.engine.channelListeners.h[a]=[]),a=r.engine.channelListeners.h[a]);a.push(b);this instanceof ja&&L.__cast(this,ja).actor.registerListener(a,b)},addFocusChangeListener:function(a){r.engine.whenFocusChangedListeners.push(a);
this instanceof ja&&L.__cast(this,ja).actor.registerListener(r.engine.whenFocusChangedListeners,a)},addPauseListener:function(a){r.engine.whenPausedListeners.push(a);this instanceof ja&&L.__cast(this,ja).actor.registerListener(r.engine.whenPausedListeners,a)},addFullscreenListener:function(a){r.engine.fullscreenListeners.push(a);this instanceof ja&&L.__cast(this,ja).actor.registerListener(r.engine.fullscreenListeners,a)},addGameScaleListener:function(a){r.engine.gameScaleListeners.push(a);this instanceof
ja&&L.__cast(this,ja).actor.registerListener(r.engine.gameScaleListeners,a)},addScreenSizeListener:function(a){r.engine.screenSizeListeners.push(a);this instanceof ja&&L.__cast(this,ja).actor.registerListener(r.engine.screenSizeListeners,a)},disableThisBehavior:function(){r.engine.behaviors.disableBehavior(this.wrapper.name)},tweenNumber:function(a,b,c,d){null==c&&(c=1);var e=this,f=this.attributeTweens,g=null!=q[a]?f.getReserved(a):f.h[a];null==g&&(g=new $e,g.doOnUpdate(function(){e[a]=g.value}),
f=this.attributeTweens,null!=q[a]?f.setReserved(a,g):f.h[a]=g);g.tween(X.field(this,a),b,d,1E3*c|0)},abortTweenNumber:function(a){var b=this.attributeTweens;a=null!=q[a]?b.getReserved(a):b.h[a];null!=a&&Gb.cancel(a)},pauseTweens:function(){var a=this.attributeTweens;for(a=new Pe(a,a.arrayKeys());a.hasNext();)a.next().paused=!0},unpauseTweens:function(){var a=this.attributeTweens;for(a=new Pe(a,a.arrayKeys());a.hasNext();)a.next().paused=!1},__class__:r};var ja=function(a){r.call(this);this.actor=
a};h["com.stencyl.behavior.ActorScript"]=ja;ja.__name__="com.stencyl.behavior.ActorScript";ja.__super__=r;ja.prototype=w(r.prototype,{actor:null,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__:ja});var pj=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};h["com.stencyl.behavior.Attribute"]=pj;pj.__name__="com.stencyl.behavior.Attribute";pj.prototype={ID:null,fieldName:null,fullName:null,type:null,defaultValue:null,value:null,realValue:null,parent:null,hidden:null,getRealValue:function(){if(null==this.realValue)if("int"==this.type)this.realValue=this.value;else if("float"==this.type||"number"==this.type)this.realValue=this.value;else if("bool"==this.type||"boolean"==this.type)this.realValue=this.value;else if("color"==this.type)this.realValue=
this.value;else if("sound"==this.type||"actortype"==this.type||"font"==this.type)null!=this.value&&(this.realValue=-1==this.value?null:ac.get().resources.get(this.value),"font"!=this.type||this.realValue instanceof $f||(this.realValue=null),"sound"!=this.type||this.realValue instanceof Fi||(this.realValue=null),"actortype"!=this.type||this.realValue instanceof Gg||(this.realValue=null));else if("actorgroup"==this.type)this.realValue=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=Eb.get().scenes.h[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 ua}else null!=this.value&&"actor"==this.type?this.realValue="thisactor"==this.value?this.parent:K.parseInt(this.value):null!=this.value&&"joint"==this.type?this.realValue=this.value:null!=this.value&&"region"==this.type&&(this.realValue=this.value);return this.realValue},__class__:pj};var Gm=function(a,b,c,d,e,f,g,k,l,m){this.isEvent=m;this.parent=a;this.engine=b;this.classname=e;if(null!=b)try{this.cls=h[e]}catch(z){if(ra.lastException=z,"string"!=typeof(z instanceof E?z.val:z))throw z;}this.enabled=
f;this.drawable=g;this.ID=c;this.name=d;this.type=l;this.attributes=k};h["com.stencyl.behavior.Behavior"]=Gm;Gm.__name__="com.stencyl.behavior.Behavior";Gm.prototype={parent:null,engine:null,enabled:null,drawable:null,isEvent:null,ID:null,name:null,type:null,classname:null,cls:null,script:null,attributes:null,initScript:function(a){null==a&&(a=!1);if(null==this.cls)this.script=new Na;else{if("actor"==this.type){if(L.getClass(this.parent)==p){this.script=new Na;return}this.script=rb.createInstance(this.cls,
[0,this.parent,null])}else{if(L.getClass(this.parent)==Bb){this.script=new Na;return}this.script=rb.createInstance(this.cls,[0,null])}this.script.wrapper=this;this.initAttributes();if(!a)try{this.script.init(),this.script.scriptInit=!0}catch(b){if(ra.lastException=b,"string"!=typeof(b instanceof E?b.val:b))throw b;}}},initAttributes:function(){var a=this.attributes;for(a=new Pe(a,a.arrayKeys());a.hasNext();){var b=a.next();try{if(!(b.hidden||"actor"==b.type&&"actor"==b.fieldName&&this.script instanceof
ja)){var c=this.script.toInternalName(b.fieldName);if("actor"==b.type||"joint"==b.type||"region"==b.type){var d=K.parseInt(""+K.string(b.getRealValue()));"actor"==b.type?this.script[c]=this.engine.getActor(d):"joint"!=b.type&&"region"==b.type&&(this.script[c]=this.engine.getRegion(d))}else if("actorgroup"==b.type){var e=K.parseInt(""+K.string(b.getRealValue()));this.script[c]=this.engine.getGroup(e)}else{var f=b.getRealValue();if("list"==b.type){b=null;if(null!=f){b=L.__cast(f,Array);for(var g=[],
k=0;k<b.length;){var l=b[k];++k;g.push(l)}b=g}else b=[];this.script[c]=b}else if("map"==b.type){b=null;if(null!=f){g=f;b=new ua;for(var m=g.keys();m.hasNext();){var z=m.next(),n=g.get(z);null!=q[z]?b.setReserved(z,n):b.h[z]=n}}else b=new ua;this.script[c]=b}else this.script[c]=f}}}catch(of){if(ra.lastException=of,"string"!=typeof(of instanceof E?of.val:of))throw of;}}},__class__:Gm};var Xk=function(a,b){this.behaviorID=a;this.values=b;this.enabled=!0};h["com.stencyl.behavior.BehaviorInstance"]=Xk;
Xk.__name__="com.stencyl.behavior.BehaviorInstance";Xk.prototype={behaviorID:null,values:null,enabled:null,__class__:Xk};var Ok=function(){this.behaviors=[];this.cache=new ua};h["com.stencyl.behavior.BehaviorManager"]=Ok;Ok.__name__="com.stencyl.behavior.BehaviorManager";Ok.prototype={behaviors:null,cache:null,destroy:function(){this.cache=this.behaviors=null},add:function(a){var b=a.name,c=this.cache;null!=q[b]?c.setReserved(b,a):c.h[b]=a;this.behaviors.push(a)},hasBehavior:function(a){if(null==
this.cache)return!1;var b=this.cache;return null!=(null!=q[a]?b.getReserved(a):b.h[a])},enableBehavior:function(a){if(this.hasBehavior(a)){var b=this.cache;a=null!=q[a]?b.getReserved(a):b.h[a];if(null!=a.script&&!a.script.scriptInit)try{a.script.init(),a.script.scriptInit=!0}catch(c){if(ra.lastException=c,"string"!=typeof(c instanceof E?c.val:c))throw c;}a.enabled=!0}},disableBehavior:function(a){if(this.hasBehavior(a)){var b=this.cache;(null!=q[a]?b.getReserved(a):b.h[a]).enabled=!1}},isBehaviorEnabled:function(a){if(this.hasBehavior(a)){var b=
this.cache;return(null!=q[a]?b.getReserved(a):b.h[a]).enabled}return!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;a=null!=q[a]?c.getReserved(a):c.h[a];return null!=a&&null!=a.script?(b=a.script.toInternalName(b),X.field(a.script,b)):null},setAttribute:function(a,b,c){var d=this.cache;a=null!=q[a]?d.getReserved(a):d.h[a];null!=a&&null!=a.script&&(null!=X.field(a.script,b)||Object.prototype.hasOwnProperty.call(a.script,
b),a.script[b]=c,a.script.propertyChanged(b,c))},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=X.field(f.script,a);null!=g?c=g.apply(f.script,b):f.script.forwardMessage(a)}catch(k){if(ra.lastException=k,"string"==typeof(k instanceof E?k.val:k))f.script.forwardMessage(a);else throw k;}}return c},call2:function(a,b,c){if(null==this.cache)return null;var d=null,e=this.cache;a=null!=
q[a]?e.getReserved(a):e.h[a];if(null!=a){if(!a.enabled||null==a.script)return d;try{var f=X.field(a.script,b);null!=f?d=f.apply(a.script,c):a.script.forwardMessage(b)}catch(g){if(ra.lastException=g,"string"==typeof(g instanceof E?g.val:g))a.script.forwardMessage(b);else throw g;}}return d},__class__:Ok};var Na=function(){r.call(this)};h["com.stencyl.behavior.SceneScript"]=Na;Na.__name__="com.stencyl.behavior.SceneScript";Na.__super__=r;Na.prototype=w(r.prototype,{__class__:Na});var Jm=function(a,
b,c,d){this.toExecute=a;this.interval=b;this.repeats=c;this.actor=d;this.done=!1;this.timer=b};h["com.stencyl.behavior.TimedTask"]=Jm;Jm.__name__="com.stencyl.behavior.TimedTask";Jm.prototype={toExecute:null,interval:null,repeats:null,actor:null,timer:null,done:null,actorCreateTime:null,update:function(a){null==this.actor||this.actor.isAlive()?null==this.actor&&p.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__:Jm};var uj=function(a,b,c){this.metaType=a;this.type=b;this.fn=c};h["com.stencyl.event.NativeListener"]=uj;uj.__name__="com.stencyl.event.NativeListener";uj.prototype={metaType:null,type:null,fn:null,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==jd.TYPE_ADS?this.fn():this.metaType==jd.TYPE_PURCHASES?this.fn(c.data1):this.metaType==jd.TYPE_GAMECENTER?
this.fn(c.data1):this.metaType==jd.TYPE_KEYBOARD&&this.fn(c.data1))}},__class__:uj};var Nc=function(a,b){null==b&&(b="");this.type=a;this.data1=b};h["com.stencyl.event.StencylEvent"]=Nc;Nc.__name__="com.stencyl.event.StencylEvent";Nc.prototype={type:null,data1:null,__class__:Nc};var Nm=function(){};h["com.stencyl.graphics.AbstractAnimation"]=Nm;Nm.__name__="com.stencyl.graphics.AbstractAnimation";Nm.__isInterface__=!0;Nm.prototype={update:null,getCurrentFrame:null,getNumFrames:null,setFrame:null,
isFinished:null,activate:null,reset:null,draw:null,getFrameDurations:null,setFrameDurations:null,setFrameDuration:null,getCurrentImage:null,__class__:Nm};var Zc=function(a,b,c){null==c&&(c=!1);sa.call(this);this.__type=Ph.BITMAP;this.__bitmapData=a;this.pixelSnapping=b;this.smoothing=c;null==b&&(this.pixelSnapping=1)};h["openfl.display.Bitmap"]=Zc;Zc.__name__="openfl.display.Bitmap";Zc.__super__=sa;Zc.prototype=w(sa.prototype,{pixelSnapping:null,smoothing:null,__image:null,__bitmapData:null,__imageVersion:null,
__enterFrame:function(a){null==this.__bitmapData||null==this.__bitmapData.image||this.__bitmapData.image.version==this.__imageVersion||this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())},__getBounds:function(a,b){if(null!=this.__bitmapData){var c=ia.__pool.get();c.setTo(0,0,this.__bitmapData.width,this.__bitmapData.height);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);ia.__pool.release(c)}},__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.__getRenderTransform();c=this.__renderTransform;var g=c.a*c.d-c.b*c.c;c=0==g?-c.tx:1/g*(c.c*(c.ty-b)+c.d*(a-c.tx));g=this.__renderTransform;var k=g.a*g.d-g.b*g.c;a=0==k?-g.ty:1/k*(g.a*(b-g.ty)+g.b*(g.tx-a));if(0<c&&0<a&&c<=this.__bitmapData.width&&a<=this.__bitmapData.height){if(null!=this.__scrollRect&&!this.__scrollRect.contains(c,a))return!1;null==d||e||d.push(f);return!0}return!1},__hitTestMask:function(a,
b){if(null==this.__bitmapData)return!1;this.__getRenderTransform();var c=this.__renderTransform,d=c.a*c.d-c.b*c.c;c=0==d?-c.tx:1/d*(c.c*(c.ty-b)+c.d*(a-c.tx));d=this.__renderTransform;var e=d.a*d.d-d.b*d.c;a=0==e?-d.ty:1/e*(d.a*(b-d.ty)+d.b*(d.tx-a));return 0<c&&0<a&&c<=this.__bitmapData.width&&a<=this.__bitmapData.height?!0:!1},get_bitmapData:function(){return this.__bitmapData},set_bitmapData:function(a){this.__bitmapData=a;this.smoothing=!1;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());
this.__imageVersion=-1;return this.__bitmapData},get_height:function(){return null!=this.__bitmapData?this.__bitmapData.height*Math.abs(this.get_scaleY()):0},set_height:function(a){null!=this.__bitmapData?this.set_scaleY(a/this.__bitmapData.height):this.set_scaleY(0);return a},get_width:function(){return null!=this.__bitmapData?this.__bitmapData.width*Math.abs(this.__scaleX):0},set_width:function(a){null!=this.__bitmapData?this.set_scaleX(a/this.__bitmapData.width):this.set_scaleX(0);return a},__class__:Zc,
__properties__:w(sa.prototype.__properties__,{set_bitmapData:"set_bitmapData",get_bitmapData:"get_bitmapData"})});var Yk=function(a){Zc.call(this,a.frames[0]);this.model=a;this.set_x(Math.round(-a.frameWidth/2*p.SCALE));this.set_y(Math.round(-a.frameHeight/2*p.SCALE));this.frameIndex=this.timer=0;this.individualDurations=!1;this.durations=a.durations;this.numFrames=this.durations.length;this.smoothing=ma.antialias;this.finished=1>=this.numFrames;null!=this.filter?(this.filteredFrames[this.frameIndex]||
(this.frames[this.frameIndex]=this.applyFilters(this.frames[this.frameIndex],this.model.frames[this.frameIndex],this.filter),this.filteredFrames[this.frameIndex]=!0),this.set_bitmapData(this.frames[this.frameIndex])):this.set_bitmapData(this.model.frames[this.frameIndex]);this.smoothing=ma.antialias};h["com.stencyl.graphics.BitmapAnimation"]=Yk;Yk.__name__="com.stencyl.graphics.BitmapAnimation";Yk.__interfaces__=[Nm];Yk.__super__=Zc;Yk.prototype=w(Zc.prototype,{model:null,frameIndex:null,timer:null,
finished:null,durations:null,individualDurations:null,frames:null,numFrames:null,filter:null,filteredFrames:null,update:function(a){this.model.sync&&this.model.looping?(a=this.frameIndex,this.timer=this.model.sharedTimer,this.frameIndex=this.model.sharedFrameIndex,a!=this.frameIndex&&(null!=this.filter?(this.filteredFrames[this.frameIndex]||(this.frames[this.frameIndex]=this.applyFilters(this.frames[this.frameIndex],this.model.frames[this.frameIndex],this.filter),this.filteredFrames[this.frameIndex]=
!0),this.set_bitmapData(this.frames[this.frameIndex])):this.set_bitmapData(this.model.frames[this.frameIndex]),this.smoothing=ma.antialias)):(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.model.looping?this.frameIndex=0:(this.finished=!0,this.frameIndex--)),a!=this.frameIndex&&(null!=this.filter?(this.filteredFrames[this.frameIndex]||(this.frames[this.frameIndex]=
this.applyFilters(this.frames[this.frameIndex],this.model.frames[this.frameIndex],this.filter),this.filteredFrames[this.frameIndex]=!0),this.set_bitmapData(this.frames[this.frameIndex])):this.set_bitmapData(this.model.frames[this.frameIndex]),this.smoothing=ma.antialias)))},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,null!=this.filter?(this.filteredFrames[this.frameIndex]||
(this.frames[this.frameIndex]=this.applyFilters(this.frames[this.frameIndex],this.model.frames[this.frameIndex],this.filter),this.filteredFrames[this.frameIndex]=!0),this.set_bitmapData(this.frames[this.frameIndex])):this.set_bitmapData(this.model.frames[this.frameIndex]),this.smoothing=ma.antialias);this.timer=0;this.finished=!1},isFinished:function(){return this.finished},reset:function(){this.frameIndex=this.timer=0;this.finished=!1;null!=this.filter?(this.filteredFrames[this.frameIndex]||(this.frames[this.frameIndex]=
this.applyFilters(this.frames[this.frameIndex],this.model.frames[this.frameIndex],this.filter),this.filteredFrames[this.frameIndex]=!0),this.set_bitmapData(this.frames[this.frameIndex])):this.set_bitmapData(this.model.frames[this.frameIndex]);this.smoothing=ma.antialias},updateBitmap:function(){null!=this.filter?(this.filteredFrames[this.frameIndex]||(this.frames[this.frameIndex]=this.applyFilters(this.frames[this.frameIndex],this.model.frames[this.frameIndex],this.filter),this.filteredFrames[this.frameIndex]=
!0),this.set_bitmapData(this.frames[this.frameIndex])):this.set_bitmapData(this.model.frames[this.frameIndex]);this.smoothing=ma.antialias},set_filter:function(a){this.filter=a;for(var b=[],c=0,d=this.numFrames;c<d;)c++,b.push(!1);this.filteredFrames=b;b=[];c=0;for(d=this.numFrames;c<d;)c++,b.push(null);this.frames=b;null!=this.filter?(this.filteredFrames[this.frameIndex]||(this.frames[this.frameIndex]=this.applyFilters(this.frames[this.frameIndex],this.model.frames[this.frameIndex],this.filter),
this.filteredFrames[this.frameIndex]=!0),this.set_bitmapData(this.frames[this.frameIndex])):this.set_bitmapData(this.model.frames[this.frameIndex]);this.smoothing=ma.antialias;return a},applyFilters:function(a,b,c){null==a&&(a=new na(b.width,b.height));for(var d=0;d<c.length;){var e=c[d];++d;b=e.__applyFilter(a,b,b.rect,T.zero)}return a},draw:function(a,b,c,d,e){if(!ma.disposeImages||this.model.checkImageReadable()){e=this.get_bitmapData();null==d&&(d=0);b*=a.scaleX;c*=a.scaleY;a.rect.x=0;a.rect.y=
0;a.rect.width=e.width;a.rect.height=e.height;a.drawActor?null!=a.actor&&a.actor.isHUD?(a.point.x=a.x+b,a.point.y=a.y+c):(a.point.x=a.x+b-p.cameraX,a.point.y=a.y+c-p.cameraY):(a.point.x=a.x+b,a.point.y=a.y+c);a.mtx.identity();a.mtx.rotate(d);a.mtx.translate(a.point.x,a.point.y);if(0==d)1!=a.alpha&&(a.point2.x=0,a.point2.y=0,a.rect2.width=e.width,a.rect2.height=e.height,c=new na(e.width,e.height,!0,a.toARGB(0,255*a.alpha|0)),b=new na(e.width,e.height,!0,0),b.copyPixels(e,a.rect2,a.point2,c,null,!0),
e=b),a.graphics.beginBitmapFill(e,a.mtx),a.graphics.drawRect(a.point.x,a.point.y,e.width,e.height);else{1!=a.alpha&&(a.point2.x=0,a.point2.y=0,a.rect2.width=e.width,a.rect2.height=e.height,c=new na(e.width,e.height,!0,a.toARGB(0,255*a.alpha|0)),b=new na(e.width,e.height,!0,0),b.copyPixels(e,a.rect2,a.point2,c,null,!0),e=b);c=new na(e.width+2,e.height+2,!0,0);b=Math.sqrt(Math.pow(c.width,2)+Math.pow(c.height,2))|0;d=new ia(0,0,e.width,e.height);var f=new pa(1,1);c.copyPixels(e,d,f);a.graphics.beginBitmapFill(c,
a.mtx,!1,ma.antialias);a.graphics.drawRect(a.x-(b-e.width)/2,a.y-(b-e.height)/2,b,b)}a.graphics.endFill()}},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)},framesUpdated:function(){this.set_x(Math.round(-this.model.frameWidth/2*p.SCALE));this.set_y(Math.round(-this.model.frameHeight/2*p.SCALE));null!=this.filter?(this.filteredFrames[this.frameIndex]||(this.frames[this.frameIndex]=this.applyFilters(this.frames[this.frameIndex],this.model.frames[this.frameIndex],this.filter),this.filteredFrames[this.frameIndex]=!0),this.set_bitmapData(this.frames[this.frameIndex])):this.set_bitmapData(this.model.frames[this.frameIndex]);
this.smoothing=ma.antialias},getCurrentImage:function(){return ma.disposeImages&&!this.model.checkImageReadable()?Ud.UNLOADED:this.get_bitmapData()},activate:function(){},__class__:Yk,__properties__:w(Zc.prototype.__properties__,{set_filter:"set_filter"})});var $h=function(){};h["com.stencyl.graphics.EngineScaleUpdateListener"]=$h;$h.__name__="com.stencyl.graphics.EngineScaleUpdateListener";$h.__isInterface__=!0;$h.prototype={updateScale:null,__class__:$h};var Om=function(a){this.cacheParentAnchor=
T.zero;qa.call(this);this.img=a;this.offsetY=this.offsetX=0;this.addChild(a)};h["com.stencyl.graphics.BitmapWrapper"]=Om;Om.__name__="com.stencyl.graphics.BitmapWrapper";Om.__interfaces__=[$h];Om.__super__=qa;Om.prototype=w(qa.prototype,{img:null,offsetX:null,offsetY:null,cacheParentAnchor:null,smoothing:null,imgX:null,imgY:null,tweenProps:null,set_imgX:function(a){this.set_x((a+this.offsetX)*p.SCALE-this.cacheParentAnchor.x);return this.imgX=a},get_imgX:function(){return this.imgX},set_imgY:function(a){this.set_y((a+
this.offsetY)*p.SCALE-this.cacheParentAnchor.y);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)*p.SCALE);this.set_y(this.get_y()+(b-this.offsetY)*p.SCALE);this.offsetX=a;this.offsetY=b;this.img.set_x(-a*p.SCALE);this.img.set_y(-b*p.SCALE)},updateScale:function(){this.updatePosition()},updatePosition:function(){this.set_x((this.get_imgX()+
this.offsetX)*p.SCALE-this.cacheParentAnchor.x);this.set_y((this.get_imgY()+this.offsetY)*p.SCALE-this.cacheParentAnchor.y)},get_tweenProps:function(){null==this.tweenProps&&(this.tweenProps=new Zp(this));return this.tweenProps},__class__:Om,__properties__:w(qa.prototype.__properties__,{get_tweenProps:"get_tweenProps",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 Zp=function(a){this.bmp=a;this.xy=
(new bg).doOnUpdate(v(this,this.onUpdateXY));this.angle=(new $e).doOnUpdate(v(this,this.onUpdateAngle));this.alpha=(new $e).doOnUpdate(v(this,this.onUpdateAlpha));this.scaleXY=(new bg).doOnUpdate(v(this,this.onUpdateScaleXY))};h["com.stencyl.graphics.BitmapTweenProperties"]=Zp;Zp.__name__="com.stencyl.graphics.BitmapTweenProperties";Zp.prototype={xy:null,angle:null,alpha:null,scaleXY:null,bmp:null,pause:function(){this.xy.paused=!0;this.angle.paused=!0;this.alpha.paused=!0;this.scaleXY.paused=!0},
unpause:function(){this.xy.paused=!1;this.angle.paused=!1;this.alpha.paused=!1;this.scaleXY.paused=!1},cancel:function(){this.xy.active&&Gb.cancel(this.xy);this.angle.active&&Gb.cancel(this.angle);this.alpha.active&&Gb.cancel(this.alpha);this.scaleXY.active&&Gb.cancel(this.scaleXY)},onUpdateXY:function(){this.bmp.set_imgX(this.xy.value1);this.bmp.set_imgY(this.xy.value2)},onUpdateAngle:function(){this.bmp.set_rotation(this.angle.value)},onUpdateAlpha:function(){this.bmp.set_alpha(this.alpha.value)},
onUpdateScaleXY:function(){this.bmp.set_scaleX(this.scaleXY.value1);this.bmp.set_scaleY(this.scaleXY.value2)},__class__:Zp};var Pm=function(){};h["com.stencyl.graphics.BlendModes"]=Pm;Pm.__name__="com.stencyl.graphics.BlendModes";Pm.get=function(a){var b=Pm.stringBlendMap;return null!=q[a]?b.getReserved(a):b.h[a]};var ab=function(){this.drawActor=!1;this.x=this.y=0;this.scaleX=this.scaleY=p.SCALE;this.alpha=1;this.blendMode=10;this.strokeColor=this.fillColor=this.strokeSize=0;this.rect=new ia;this.rect2=
new ia;this.point=new pa;this.point2=new pa;this.data=[0,0,0];this.drawPoly=!1;this.firstY=this.firstX=this.pointCounter=0;this.font=this.defaultFont=new $f(-1,0,"",!0);this.mtx=new Ha};h["com.stencyl.graphics.G"]=ab;ab.__name__="com.stencyl.graphics.G";ab.resetStatics=function(){ab.fontCache=null};ab.visitStringCache=function(){for(var a=ab.drawnStringCacheKeys.length;0<a--;){var b=ab.drawnStringCacheKeys[a],c=ab.drawnStringCache;b=null!=q[b]?c.getReserved(b):c.h[b];--b.lifetime;0==b.lifetime&&(b.img.dispose(),
ab.drawnStringCache.remove(ab.drawnStringCacheKeys[a]),ab.drawnStringCacheKeys[a]=ab.drawnStringCacheKeys[ab.drawnStringCacheKeys.length-1],ab.drawnStringCacheKeys.pop())}};ab.prototype={defaultFont:null,graphics:null,x:null,y:null,scaleX:null,scaleY:null,alpha:null,blendMode:null,strokeSize:null,fillColor:null,strokeColor:null,font:null,fontData:null,mtx:null,rect:null,rect2:null,point:null,point2:null,data:null,drawPoly:null,pointCounter:null,firstX:null,firstY:null,drawActor:null,actor:null,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)},startGraphics:function(){!this.drawActor||null!=this.actor&&this.actor.isHUD||(this.x-=p.cameraX,this.y-=p.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize*p.SCALE,this.strokeColor,this.alpha)},endGraphics:function(){this.drawActor&&!this.actor.isHUD&&(this.x+=p.cameraX,this.y+=p.cameraY);this.graphics.lineStyle()},translate:function(a,
b){this.x+=a*this.scaleX;this.y+=b*this.scaleY},moveTo:function(a,b){if(this.drawActor){if(null!=this.actor){var c=this.actor;this.drawActor=!0;this.actor=c;if(c.smoothMove){var d=c.drawY-Math.floor(c.cacheHeight/2)-c.currOffset.y;this.x=(c.drawX-Math.floor(c.cacheWidth/2)-c.currOffset.x)*this.scaleX;this.y=d*this.scaleY}else this.x=c.colX*this.scaleX,this.y=c.colY*this.scaleY}this.x+=a*this.scaleX;this.y+=b*this.scaleY}else 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},getCacheKey:function(a,b,c){return a+":"+b.ID+":"+c+":"+b.letterSpacing+":"+p.SCALE},drawString:function(a,b,c){null==this.font&&(this.font=this.defaultFont,this.font.fontScale!=p.SCALE&&
(this.font.fontScale=p.SCALE));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-p.cameraX,c=this.y+c*this.scaleY-p.cameraY):(b=this.x+b*this.scaleX,c=this.y+c*this.scaleY);this.mtx.identity();this.mtx.translate(b,c);var d=null,e=this.font;e=a+":"+e.ID+":"+this.alpha+":"+e.letterSpacing+":"+p.SCALE;var f=ab.drawnStringCache;if(null!=q[e]?f.existsReserved(e):f.h.hasOwnProperty(e))a=ab.drawnStringCache,a=null!=q[e]?a.getReserved(e):
a.h[e],a.lifetime=5,d=a.img;else{f=this.font.font.getTextWidth(a,this.font.letterSpacing,this.font.fontScale);var g=this.font.font.getFontHeight()*this.font.fontScale|0;0<f&&0<g&&(d=new na(f,g,!0,0),this.font.font.renderToImg(d,a,0,this.alpha,0,0,this.font.letterSpacing,this.font.fontScale,0,!1),a=new qf,a.img=d,a.lifetime=5,f=ab.drawnStringCache,null!=q[e]?f.setReserved(e,a):f.h[e]=a,ab.drawnStringCacheKeys.push(e))}null!=d&&(this.graphics.beginBitmapFill(d,this.mtx,!1,ma.antialias),this.graphics.drawRect(b,
c,d.width,d.height),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-=p.cameraX,this.y-=p.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize*p.SCALE,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+=p.cameraX,this.y+=p.cameraY);this.graphics.lineStyle()},
fillPixel:function(a,b){!this.drawActor||null!=this.actor&&this.actor.isHUD||(this.x-=p.cameraX,this.y-=p.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize*p.SCALE,this.strokeColor,this.alpha);this.graphics.lineStyle();this.graphics.beginFill(this.fillColor,this.alpha);this.graphics.drawRect(this.x+(a*p.SCALE|0),this.y+(b*p.SCALE|0),p.SCALE|0,p.SCALE|0);this.graphics.endFill();this.drawActor&&!this.actor.isHUD&&(this.x+=p.cameraX,this.y+=p.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-=p.cameraX,this.y-=p.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize*p.SCALE,this.strokeColor,this.alpha);this.graphics.drawRect(this.x+a,this.y+b,c,d);this.drawActor&&!this.actor.isHUD&&(this.x+=p.cameraX,this.y+=p.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-=p.cameraX,this.y-=p.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize*p.SCALE,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+=p.cameraX,this.y+=p.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-=p.cameraX,this.y-=p.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize*p.SCALE,this.strokeColor,this.alpha);this.graphics.drawRoundRect(this.x+a,this.y+b,c,d,e,e);this.drawActor&&!this.actor.isHUD&&(this.x+=p.cameraX,this.y+=p.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-=p.cameraX,this.y-=p.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize*p.SCALE,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+=p.cameraX,this.y+=p.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-=p.cameraX,this.y-=p.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize*p.SCALE,this.strokeColor,this.alpha);this.graphics.drawCircle(this.x+a,this.y+b,c);this.drawActor&&!this.actor.isHUD&&(this.x+=p.cameraX,this.y+=p.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-=p.cameraX,this.y-=p.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize*p.SCALE,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+=p.cameraX,this.y+=p.cameraY);this.graphics.lineStyle()},beginFillPolygon:function(){this.drawPoly=!1;!this.drawActor||null!=this.actor&&this.actor.isHUD||(this.x-=p.cameraX,this.y-=
p.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize*p.SCALE,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+=p.cameraX,this.y+=p.cameraY),this.graphics.lineStyle())},
beginDrawPolygon:function(){this.drawPoly=!0;!this.drawActor||null!=this.actor&&this.actor.isHUD||(this.x-=p.cameraX,this.y-=p.cameraY);0==this.strokeSize?this.graphics.lineStyle():this.graphics.lineStyle(this.strokeSize*p.SCALE,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-p.cameraX,this.point.y=this.y+c-p.cameraY):(this.point.x=this.x+b,this.point.y=this.y+c);this.mtx.identity();this.mtx.rotate(d);this.mtx.translate(this.point.x,
this.point.y);0==d?(1!=this.alpha&&(this.point2.x=0,this.point2.y=0,this.rect2.width=a.width,this.rect2.height=a.height,b=new na(a.width,a.height,!0,this.toARGB(0,255*this.alpha|0)),c=new na(a.width,a.height,!0,0),c.copyPixels(a,this.rect2,this.point2,b,null,!0),a=c),this.graphics.beginBitmapFill(a,this.mtx),this.graphics.drawRect(this.point.x,this.point.y,a.width,a.height)):(1!=this.alpha&&(this.point2.x=0,this.point2.y=0,this.rect2.width=a.width,this.rect2.height=a.height,b=new na(a.width,a.height,
!0,this.toARGB(0,255*this.alpha|0)),c=new na(a.width,a.height,!0,0),c.copyPixels(a,this.rect2,this.point2,b,null,!0),a=c),b=new na(a.width+2,a.height+2,!0,0),c=Math.sqrt(Math.pow(b.width,2)+Math.pow(b.height,2))|0,d=new ia(0,0,a.width,a.height),e=new pa(1,1),b.copyPixels(a,d,e),this.graphics.beginBitmapFill(b,this.mtx,!1,ma.antialias),this.graphics.drawRect(this.x-(c-a.width)/2,this.y-(c-a.height)/2,c,c));this.graphics.endFill()},toARGB:function(a,b){return a+(b<<24)},resetFont:function(){this.font=
this.defaultFont;this.font.fontScale!=p.SCALE&&(this.font.fontScale=p.SCALE)},__class__:ab};var qf=function(){};h["com.stencyl.graphics._G.TemporaryImage"]=qf;qf.__name__="com.stencyl.graphics._G.TemporaryImage";qf.prototype={lifetime:null,img:null,__class__:qf};var yd=function(){};h["com.stencyl.graphics.GLUtil"]=yd;yd.__name__="com.stencyl.graphics.GLUtil";yd.initialize=function(){null==yd.gl&&(yd.context=p.stage.window.context,yd.context3D=p.stage.context3D,yd.gl=Ab.fromRenderContext(yd.context),
yd.renderer=p.stage.__renderer,yd.textureMaxSize=yd.gl.getParameter(yd.gl.MAX_TEXTURE_SIZE),yd.textureMaxSize=yd.textureMaxSize/2|0,yd.textureMaxSize>yd.MAX_TEXTURE_CAP&&(yd.textureMaxSize=yd.MAX_TEXTURE_CAP),null==na.__supportsBGRA&&(new na(1,1,!0,0)).getTexture(yd.context3D))};yd.uploadTexture=function(a,b){a.getTexture(yd.context3D);b&&yd.disposeSoftwareBuffer(a)};yd.disposeSoftwareBuffer=function(a){a.image=null;a.readable=!1;a.__surface=null;a.__vertexBuffer=null;a.__framebuffer=null;a.__framebufferContext=
null};yd.createNewTexture=function(a){var b=yd.context3D.createRectangleTexture(a,a,1,!1);b.uploadFromTypedArray(null);var c=new na(0,0,!0,0);c.__resize(a,a);c.readable=!1;c.__texture=b;c.__textureContext=yd.context;c.__isValid=!0;c.image=null;return c};yd.clearTexture=function(a){a.__texture.uploadFromTypedArray(null)};var fe=function(a){this.value=a};h["com.stencyl.graphics.Scale"]=fe;fe.__name__="com.stencyl.graphics.Scale";fe.fromString=function(a){switch(a){case "1.5x":return fe._1_5X;case "1x":return fe._1X;
case "2x":return fe._2X;case "3x":return fe._3X;case "4x":return fe._4X;default:return fe._1X}};fe.prototype={value:null,toString:function(){return 1==this.value?"1x":1.5==this.value?"1.5x":2==this.value?"2x":3==this.value?"3x":4==this.value?"4x":""},__class__:fe};var Xg={};h["com.stencyl.graphics._ScaleMode.ScaleMode_Impl_"]=Xg;Xg.__name__="com.stencyl.graphics._ScaleMode.ScaleMode_Impl_";Xg._new=function(a){return a};Xg.fromString=function(a){switch(a){case "FULLSCREEN":return 1;case "NO_SCALING":return 0;
case "SCALE_TO_FIT_FILL":return 4;case "SCALE_TO_FIT_FULLSCREEN":return 5;case "SCALE_TO_FIT_LETTERBOX":return 3;case "STRETCH_TO_FIT":return 2;default:return 0}};Xg.toString=function(a){switch(a){case 0:return"NO_SCALING";case 1:return"FULLSCREEN";case 2:return"STRETCH_TO_FIT";case 3:return"SCALE_TO_FIT_LETTERBOX";case 4:return"SCALE_TO_FIT_FILL";case 5:return"SCALE_TO_FIT_FULLSCREEN";default:return"NO_SCALING"}};var Gf=function(){this.lineSpacing=0;this.isDefault=!1;this._maxHeight=0;this._point=
new pa;this._glyphs=new Wa;this._num_letters=0};h["com.stencyl.graphics.fonts.BitmapFont"]=Gf;Gf.__name__="com.stencyl.graphics.fonts.BitmapFont";Gf.store=function(a,b){var c=Gf._storedFonts;null!=q[a]?c.setReserved(a,b):c.h[a]=b};Gf.fetch=function(a){var b=Gf._storedFonts;return null!=q[a]?b.getReserved(a):b.h[a]};Gf.prototype={_glyphs:null,_num_letters:null,_tileset:null,_glyphString:null,_maxHeight:null,_point:null,isDefault:null,lineSpacing:null,loadPixelizer:function(a,b){this.reset();this._glyphString=
b;if(null!=a){b=[];a=this.prepareBitmapData(a,b);this._tileset=new Gi(a);for(var c=0,d=b.length;c<d;){var e=c++;a=b[e];this.setGlyph(B.cca(this._glyphString,e),a,e,0,0,Math.floor(a.width))}}return this},loadAngelCode:function(a,b){this.reset();if(null!=a){this._glyphString="";var c=new ia,d=new pa,e=0;this._tileset=new Gi(a);a=null;for(b=b.elements();b.hasNext();){var f=b.next();if(f.nodeType!=fa.Element)throw new E("Bad node type, expected Element but found "+ea.toString(f.nodeType));if("font"==
f.nodeName)for(f=f.elements();f.hasNext();){var g=f.next();if(g.nodeType!=fa.Element)throw new E("Bad node type, expected Element but found "+ea.toString(g.nodeType));if("common"==g.nodeName)this.lineSpacing=K.parseInt(g.get("lineHeight"));else{if(g.nodeType!=fa.Element)throw new E("Bad node type, expected Element but found "+ea.toString(g.nodeType));"chars"==g.nodeName&&(a=g)}}}if(null!=a)for(f=a.elements();f.hasNext();){g=f.next();if(g.nodeType!=fa.Element)throw new E("Bad node type, expected Element but found "+
ea.toString(g.nodeType));if("char"==g.nodeName){c.x=K.parseInt(g.get("x"));c.y=K.parseInt(g.get("y"));c.width=K.parseInt(g.get("width"));c.height=K.parseInt(g.get("height"));d.x=K.parseInt(g.get("xoffset"));d.y=K.parseInt(g.get("yoffset"));a=K.parseInt(g.get("id"));b=String.fromCodePoint(a);this._glyphString+=b;var k=g=K.parseInt(g.get("xadvance"));c.width>g&&(k=c.width|0,d.x=0);" "!=b&&""!=b?this.setGlyph(a,c,e,Math.floor(d.x),Math.floor(d.y),k):this.setGlyph(a,c,e,Math.floor(d.x),1,k);++e}}}return this},
reset:function(){this.dispose();this._maxHeight=0;this._glyphs=new Wa;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((a.getPixel(e,d)|0)!=c){for(var g=e,k=d;(a.getPixel(g,d)|0)!=c;)++g;for(;(a.getPixel(e,k)|0)!=c;)++k;g-=e;k-=d;b.push(new ia(e,d,g,k));k>f&&(f=k);k>this._maxHeight&&(this._maxHeight=k);e+=g}++e}d+=f+1}b=a.clone();f=a.getPixel32(0,0);for(d=0;d<a.height;){for(e=0;e<a.width;)c=a.getPixel32(e,d),c==f&&b.setPixel32(e,
d,0),++e;++d}return b},dispose:function(){this._tileset=null;this._num_letters=0;this._glyphs=null},setGlyph:function(a,b,c,d,e,f){null==f&&(f=0);null==e&&(e=0);null==d&&(d=0);0==b.width&&(b.width=1);0==b.height&&(b.height=1);this._tileset.addRect(b);var g=new $p;g.tileID=c;g.xoffset=d;g.yoffset=e;g.xadvance=f;this._glyphs.h[a]=g;this._num_letters++;Math.floor(b.height)+e>this._maxHeight&&(this._maxHeight=Math.floor(b.height)+e)},render:function(a,b,c,d,e,f,g,k){this._point.x=d;this._point.y=e;e=
d=0;for(k=b.length;e<k;){var l=e++;if(!(l<d)){var m=B.cca(b,l);126==m&&"x"==b.charAt(l+1)&&(l=b.substring(l+2,l+6),m=K.parseInt("0x"+l),d+=5);var z=this._glyphs.h[m];this._glyphs.h.hasOwnProperty(m)&&(l=z.xadvance,32!=m&&(m=new Kg(z.tileID,this._point.x+z.xoffset*g,this._point.y+z.yoffset*g),m.set_scaleX(g),m.set_scaleY(g),m.set_alpha(c),a.addTile(m)),this._point.x+=l*g+f);++d}}},renderToImg:function(a,b,c,d,e,f,g,k,l,m){null==m&&(m=!0);null==l&&(l=0);var z=new Lg(a.width,a.height,this._tileset,ma.antialias);
this.render(z,b,d,e,f,g,k,l);m?a.draw(z,null,new Sb((c>>16&255)/255,(c>>8&255)/255,(c&255)/255)):a.draw(z);z.removeTiles()},toARGB:function(a,b){return 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 l=B.cca(a,k);126==l&&"x"==a.charAt(k+1)&&(k=a.substring(k+2,k+6),l=K.parseInt("0x"+k),e+=5);this._glyphs.h.hasOwnProperty(l)&&(d+=this._glyphs.h[l].xadvance);++e}}d=Math.round(d*c);1<f&&(d+=(f-1)*b);return d},getFontHeight:function(){return this._maxHeight},
numLetters:null,get_numLetters:function(){return this._num_letters},containsCharacter:function(a){return 0<=this._glyphString.indexOf(a)},getTileset:function(){return this._tileset},__class__:Gf,__properties__:{get_numLetters:"get_numLetters"}};var ai=function(){};h["com.stencyl.graphics.fonts.DefaultFontGenerator"]=ai;ai.__name__="com.stencyl.graphics.fonts.DefaultFontGenerator";ai.generateAndStoreDefaultFont=function(){for(var a="",b=new na(700,9,!0,-7829368),c=0,d=0;d<ai.fontData.length;){a+=B.substr(ai.fontData,
d,1);for(var e=K.parseInt(B.substr(ai.fontData,++d,1)),f=0,g=K.parseInt(B.substr(ai.fontData,++d,1));f<g;)for(var k=f++,l=0,m=e;l<m;){var z=l++;++d;"1"==B.substr(ai.fontData,d,1)?b.setPixel32(1+7*c+z,1+k,-1):b.setPixel32(1+7*c+z,1+k,0)}++d;++c}Gf.store("default",(new Gf).loadPixelizer(b,a));b.dispose()};var $p=function(){};h["com.stencyl.graphics.fonts.FontSymbol"]=$p;$p.__name__="com.stencyl.graphics.fonts.FontSymbol";$p.prototype={xoffset:null,yoffset:null,xadvance:null,tileID:null,__class__:$p};
var Qm=function(a){this.cacheParentAnchor=T.zero;qa.call(this);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==Gf.fetch("default")&&ai.generateAndStoreDefaultFont(),
this._font=Gf.fetch("default")):this._font=a;this.set_cacheAsBitmap(!0);this._pendingTextChange=!0;this.update()};h["com.stencyl.graphics.fonts.Label"]=Qm;Qm.__name__="com.stencyl.graphics.fonts.Label";Qm.__interfaces__=[$h];Qm.__super__=qa;Qm.prototype=w(qa.prototype,{_stencylFont:null,_font:null,_text:null,_color:null,_useColor:null,_outline:null,_outlineColor:null,_shadow:null,_shadowColor:null,_background:null,_backgroundColor:null,_alignment:null,_padding:null,_lineSpacing:null,_letterSpacing:null,
_fontScale:null,_autoUpperCase:null,_wordWrap:null,_fixedWidth:null,_pendingTextChange:null,_fieldWidth:null,_multiLine:null,_alpha:null,labelX:null,labelY:null,_shadowTilemap:null,_outlineTilemap:null,_characterTilemap:null,cacheParentAnchor:null,destroy:function(){this._font=this._stencylFont=null;this.removeChildren();this._characterTilemap=this._shadowTilemap=this._outlineTilemap=null},get_text:function(){return this._text},set_text:function(a){a.split("\\n").join("\n")!=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=this._font.getFontHeight(),d=this._alignment,e=this._text.split("\n"),f=-1;this._multiLine||(e=[e[0]]);for(var g,k;++f<e.length;)if(this._fixedWidth){var l=!1;var m=e[f].split(" ");if(0<m.length)for(var z=0,n="";!l;){k=m[z];var p=n+k+" ",h=!1;if(this._wordWrap)this._font.getTextWidth(p,
this._letterSpacing,this._fontScale)>this._fieldWidth?(""==n?m.splice(0,1):b.push(B.substr(n,0,n.length-1)),n="",this._multiLine?m.splice(0,z):m.splice(0,m.length),z=0,h=!0):(n+=k+" ",++z);else if(this._font.getTextWidth(p,this._letterSpacing,this._fontScale)>this._fieldWidth){var q=0;for(g=k.length;q<g;)p=n+k.charAt(q),this._font.getTextWidth(p,this._letterSpacing,this._fontScale)>this._fieldWidth?(b.push(B.substr(n,0,n.length-1)),k=n="",z=m.length,q=g,h=!0):n+=k.charAt(q),++q}else n+=k+" ",++z;
z>=m.length&&(h||(l=B.substr(n,0,n.length-1),a=Math.floor(Math.max(a,this._font.getTextWidth(l,this._letterSpacing,this._fontScale))),b.push(l)),l=!0)}else b.push("")}else a=Math.floor(Math.max(a,this._font.getTextWidth(e[f],this._letterSpacing,this._fontScale))),b.push(e[f]);a=a+2*this._padding+(this._outline?2:0);e=Math.floor(2*this._padding+Math.max(1,b.length*c*this._fontScale+(this._shadow?1:0)+(this._outline?2:0)))+(1<=b.length?this._lineSpacing*(b.length-1):0);this.get_graphics().clear();1==
this._background&&(this.get_graphics().beginFill(this._backgroundColor,this._alpha),this.get_graphics().drawRect(0,0,a,e),this.get_graphics().endFill());this.removeChildren();this._outline&&(this._outlineTilemap=new Lg(a,e,this._font.getTileset(),ma.antialias),this.tint(this._outlineTilemap,this._outlineColor),this.addChild(this._outlineTilemap));this._shadow&&(this._shadowTilemap=new Lg(a,e,this._font.getTileset(),ma.antialias),this.tint(this._shadowTilemap,this._shadowColor),this.addChild(this._shadowTilemap));
this._characterTilemap=new Lg(a,e,this._font.getTileset(),ma.antialias);this._useColor&&this.tint(this._characterTilemap,this._color);this.addChild(this._characterTilemap);for(f=e=0;f<b.length;){m=b[f];++f;n=z=0;3==d&&(z=this._fixedWidth?Math.floor((this._fieldWidth-this._font.getTextWidth(m,this._letterSpacing,this._fontScale))/2):Math.floor((a-this._font.getTextWidth(m,this._letterSpacing,this._fontScale))/2));2==d&&(z=this._fixedWidth?this._fieldWidth-Math.floor(this._font.getTextWidth(m,this._letterSpacing,
this._fontScale)):a-Math.floor(this._font.getTextWidth(m,this._letterSpacing,this._fontScale))-2*this.get_padding());if(this._outline){for(l=0;3>l;)for(q=l++,g=0;3>g;)k=g++,this._font.render(this._outlineTilemap,m,this._alpha,k+z+this._padding,q+e*(Math.floor(c*this._fontScale)+this._lineSpacing)+this._padding,this._letterSpacing,this._fontScale);++z;++n}this._shadow&&this._font.render(this._shadowTilemap,m,this._alpha,1+z+this._padding,1+n+e*(Math.floor(c*this._fontScale)+this._lineSpacing)+this._padding,
this._letterSpacing,this._fontScale);this._font.render(this._characterTilemap,m,this._alpha,z+this._padding,n+e*(Math.floor(c*this._fontScale)+this._lineSpacing)+this._padding,this._letterSpacing,this._fontScale);++e}this._pendingTextChange=!1}},update:function(){this._pendingTextChange&&this.updateBitmapData()},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_stencylFont:function(){return this._stencylFont},set_stencylFont:function(a){this._stencylFont!=a&&(this._stencylFont=a,this.set_font(a.font));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._pendingTextChange=!0,this.update())},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(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},set_labelX:function(a){this.set_x(a*p.SCALE);return this.labelX=a},get_labelX:function(){return this.labelX},set_labelY:function(a){this.set_y(a*p.SCALE);return this.labelY=a},get_labelY:function(){return this.labelY},updatePosition:function(){this.set_x(this.get_labelX()*p.SCALE-this.cacheParentAnchor.x);this.set_y(this.get_labelY()*p.SCALE-this.cacheParentAnchor.y)},updateScale:function(){this.updatePosition();
null!=this._stencylFont&&this.set_font(this._stencylFont.font)},updateGlyphs:function(a,b,c){},tint:function(a,b){var c=new bb;c.colorize(b,1);a.set_filters([c.getFilter()])},__class__:Qm,__properties__:w(qa.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_stencylFont:"set_stencylFont",get_stencylFont:"get_stencylFont",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",set_labelY:"set_labelY",get_labelY:"get_labelY",set_labelX:"set_labelX",get_labelX:"get_labelX"})});
var aq=function(){};h["com.stencyl.graphics.fonts.TextAlign"]=aq;aq.__name__="com.stencyl.graphics.fonts.TextAlign";var Sc=function(){};h["com.stencyl.graphics.shaders.BasicShader"]=Sc;Sc.__name__="com.stencyl.graphics.shaders.BasicShader";Sc.prototype={multipassParent:null,multipassTarget:null,model:null,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(){p.engine.addShader(this.model)},
disable:function(){p.engine.clearShaders()},setTimeScale:function(a){this.model.timeScale=a},combine:function(a){this.multipassTarget=a;a.multipassParent=this;return a},__class__:Sc};var bq=function(a,b,c,d,e,f,g,k,l){null==l&&(l=.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 Od(this,"\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 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",l)};h["com.stencyl.graphics.shaders.BloomShader"]=bq;bq.__name__="com.stencyl.graphics.shaders.BloomShader";bq.__super__=Sc;bq.prototype=w(Sc.prototype,{__class__:bq});var cq=
function(a,b,c){null==c&&(c=1);null==b&&(b=1);null==a&&(a=2);this.model=new Od(this,"\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\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)};h["com.stencyl.graphics.shaders.BlurShader"]=cq;cq.__name__="com.stencyl.graphics.shaders.BlurShader";cq.__super__=Sc;cq.prototype=w(Sc.prototype,{setRadius:function(a){this.setProperty("radius",a)},setDirectionX:function(a){this.setProperty("dirx",a)},setDirectionY:function(a){this.setProperty("diry",a)},__class__:cq});var Hi=function(a,b,c){null==c&&(c=1);null==b&&(b=1);null==a&&(a=1);this.model=new Od(this,"\n\t\t\t#ifdef GL_ES\n\t\t\t\tprecision mediump float;\n\t\t\t#endif\n\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\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\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",
!0);this.setContrast(a);this.setBrightness(b);this.setSaturation(c)};h["com.stencyl.graphics.shaders.CSBShader"]=Hi;Hi.__name__="com.stencyl.graphics.shaders.CSBShader";Hi.create=function(a,b){null==b&&(b=1);null==a&&(a="contrast");return"contrast"==a?new Hi(b,1,1):"saturation"==a?new Hi(1,1,b):new Hi(1,b,1)};Hi.__super__=Sc;Hi.prototype=w(Sc.prototype,{setContrast:function(a){this.setProperty("contrast",a)},setBrightness:function(a){this.setProperty("brightness",a)},setSaturation:function(a){this.setProperty("saturation",
a)},__class__:Hi});var dq=function(a){this.model=new Od(this,"assets/data/"+a)};h["com.stencyl.graphics.shaders.ExternalShader"]=dq;dq.__name__="com.stencyl.graphics.shaders.ExternalShader";dq.__super__=Sc;dq.prototype=w(Sc.prototype,{__class__:dq});var eq=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 Od(this,"\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\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\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;\n\t\t\tfloat height;\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\twidth = uResolution.x;\n\t\t\t\theight = uResolution.y;\n\t\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()};h["com.stencyl.graphics.shaders.GrainShader"]=eq;eq.__name__="com.stencyl.graphics.shaders.GrainShader";eq.__super__=Sc;eq.prototype=w(Sc.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__:eq});var fq=function(){this.model=new Od(this,"\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)};h["com.stencyl.graphics.shaders.GrayscaleShader"]=fq;fq.__name__="com.stencyl.graphics.shaders.GrayscaleShader";fq.__super__=Sc;fq.prototype=w(Sc.prototype,{__class__:fq});var gq=function(a,b){null==b&&(b=!0);null==a&&(a=0);b&&(a*=Math.PI/180);this.model=new Od(this,"\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\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)};h["com.stencyl.graphics.shaders.HueShader"]=gq;gq.__name__="com.stencyl.graphics.shaders.HueShader";gq.__super__=Sc;gq.prototype=w(Sc.prototype,{setHue:function(a,b){null==b&&(b=!0);b&&(a*=Math.PI/180);this.setProperty("hue",a)},__class__:gq});var hq=function(a){this.model=new Od(this,a,!0)};h["com.stencyl.graphics.shaders.InlineShader"]=hq;hq.__name__="com.stencyl.graphics.shaders.InlineShader";hq.__super__=Sc;hq.prototype=w(Sc.prototype,{__class__:hq});var iq=function(){this.model=
new Od(this,"\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)};h["com.stencyl.graphics.shaders.InvertShader"]=iq;iq.__name__="com.stencyl.graphics.shaders.InvertShader";iq.__super__=Sc;iq.prototype=w(Sc.prototype,{__class__:iq});
var Od=function(a,b,c){null==c&&(c=!1);this.timeScale=1;this.time=0;sa.call(this);this.basicShader=a;this.gl=p.stage.__renderer.gl;this.uniforms=new ua;this.changedUniforms=[];this.uniformTweens=new ua;this.rebuild();this.gl.checkFramebufferStatus(36160);this.buffer=this.gl.createBuffer();this.gl.bindBuffer(34962,this.buffer);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];a=null!=a?new Float32Array(a):null;Ab.bufferData(this.gl,34962,a,35044);this.gl.bindBuffer(34962,null);if(c)this.fullScreenShader=
new Zk([{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:b,fragment:!0}]);else if(6<b.length&&".glslx"==B.substr(b,-6,null)){c=fa.parse(Ea.getText(b)).firstElement();if(c.nodeType!=fa.Document&&c.nodeType!=fa.Element)throw new E("Invalid nodeType "+ea.toString(c.nodeType));b=dt.resolve(c,"vertex")?
Rm.get_innerData(jq.resolve(c,"vertex")):"\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=Rm.get_innerData(jq.resolve(c,"fragment"));this.fullScreenShader=new Zk([{src:b,fragment:!1},{src:c,fragment:!0}])}else b=Ea.getText(b),this.fullScreenShader=new Zk([{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:b,fragment:!0}]);this.imageUniform=t.context.getUniformLocation(this.fullScreenShader.program,"uImage0");this.timeUniform=t.context.getUniformLocation(this.fullScreenShader.program,"uTime");this.resolutionUniform=t.context.getUniformLocation(this.fullScreenShader.program,"uResolution");this.resolutionUsUniform=t.context.getUniformLocation(this.fullScreenShader.program,"uResolutionUs");this.vertexSlot=t.context.getAttribLocation(this.fullScreenShader.program,"aVertex");this.texCoordSlot=
t.context.getAttribLocation(this.fullScreenShader.program,"aTexCoord");this.addEventListener("renderOpenGL",v(this,this.renderGL))};h["com.stencyl.graphics.shaders.PostProcess"]=Od;Od.__name__="com.stencyl.graphics.shaders.PostProcess";Od.__properties__={get_vertices:"get_vertices",get_isSupported:"get_isSupported"};Od.get_isSupported=function(){if(!window.WebGLRenderingContext)return!1;if(null!=t.context)return!0;var a=window.document.createElement("canvas"),b=a.getContext("webgl");null==b&&(b=a.getContext("experimental-webgl"));
return null!=b};Od.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]};Od.__super__=sa;Od.prototype=w(sa.prototype,{__added:null,__initialized:null,gl:null,__enterFrame:function(a){this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())},renderGL:function(a){var b=a.renderer;if(null!=this.stage&&this.__renderable){a=p.stage;var c=a.context3D;b.__setBlendMode(null);null==this.basicShader.multipassTarget?c.setRenderToBackBuffer():c.setRenderToTexture(this.basicShader.multipassTarget.model.texture);
c.clear();this.time+=p.elapsedTime*this.timeScale;t.context.useProgram(this.fullScreenShader.program);this.gl.enableVertexAttribArray(this.vertexSlot);this.gl.enableVertexAttribArray(this.texCoordSlot);this.gl.activeTexture(33984);this.gl.bindTexture(3553,this.texture.__getTexture());"opengl"==a.window.context.type&&this.gl.enable(3553);this.gl.bindBuffer(34962,this.buffer);this.gl.vertexAttribPointer(this.vertexSlot,2,5126,!1,16,0);this.gl.vertexAttribPointer(this.texCoordSlot,2,5126,!1,16,8);this.gl.uniform1i(this.imageUniform,
0);this.gl.uniform1f(this.timeUniform,this.time);this.gl.uniform2f(this.resolutionUniform,a.stageWidth|0,a.stageHeight|0);this.gl.uniform2f(this.resolutionUsUniform,a.stageWidth/(p.SCALE*p.screenScaleX)|0,a.stageHeight/(p.SCALE*p.screenScaleY)|0);for(b=this.changedUniforms.length;0<b--;){var d=this.changedUniforms.pop();if(d.value instanceof Array){if(0!=d.value.length){var e=this.gl,f=d.id;d=d.value;d=null!=d?new Float32Array(d):null;e.uniform1fv(f,d)}}else this.gl.uniform1f(d.id,d.value)}this.gl.drawArrays(4,
0,6);this.gl.bindBuffer(34962,null);"opengl"==a.window.context.type&&this.gl.disable(3553);this.gl.bindTexture(3553,null);this.gl.disableVertexAttribArray(this.vertexSlot);this.gl.disableVertexAttribArray(this.texCoordSlot);c.__contextState.program=null;c.__flushGLProgram();c.__contextState.__currentGLElementArrayBuffer=null}},setUniform:function(a,b){var c=this.uniforms;(null!=q[a]?c.existsReserved(a):c.h.hasOwnProperty(a))?(c=this.uniforms,a=null!=q[a]?c.getReserved(a):c.h[a],a.value=b,this.changedUniforms.push(a)):
(c=t.context.getUniformLocation(this.fullScreenShader.program,a),c!=Od.UNIFORM_NOT_FOUND&&(b={id:c,value:b},c=this.uniforms,null!=q[a]?c.setReserved(a,b):c.h[a]=b,this.changedUniforms.push(b)))},getUniform:function(a){var b=this.uniforms;return(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))?(b=this.uniforms,(null!=q[a]?b.getReserved(a):b.h[a]).value):-1},tweenUniform:function(a,b,c,d){null==c&&(c=1);var e=this,f=this.uniforms;if(null!=q[a]?f.existsReserved(a):f.h.hasOwnProperty(a)){f=this.uniforms;
var g=null!=q[a]?f.getReserved(a):f.h[a];f=this.uniformTweens;var k=null!=q[a]?f.getReserved(a):f.h[a];null==k&&(k=new $e,k.doOnUpdate(function(){g.value=k.value;e.changedUniforms.push(g)}),f=this.uniformTweens,null!=q[a]?f.setReserved(a,k):f.h[a]=k);k.tween(g.value,b,d,1E3*c|0)}},rebuild:function(){null!=this.texture&&this.texture.dispose();this.texture=p.stage.context3D.createRectangleTexture(Y.windowWidth|0,Y.windowHeight|0,1,!0);this.texture.__context.__bindGLTexture2D(this.texture.__textureID);
this.texture.__setSamplerState(new zh);Ab.texImage2D(this.gl,this.texture.__textureTarget,0,this.texture.__internalFormat,this.texture.__width,this.texture.__height,0,this.gl.RGB,this.gl.UNSIGNED_BYTE,null);this.texture.__context.__bindGLTexture2D(null)},createTexture:function(a,b){this.texture=p.stage.context3D.createRectangleTexture(a,b,1,!0);this.texture.__context.__bindGLTexture2D(this.texture.__textureID);this.texture.__setSamplerState(new zh);Ab.texImage2D(this.gl,this.texture.__textureTarget,
0,this.texture.__internalFormat,this.texture.__width,this.texture.__height,0,this.gl.RGB,this.gl.UNSIGNED_BYTE,null);this.texture.__context.__bindGLTexture2D(null)},capture:function(){p.stage.context3D.setRenderToTexture(this.texture);var a=this.texture.__getGLFramebuffer(!1,0,0);this.gl.bindFramebuffer(36160,a);this.gl.clear(16640);null!=p.stage&&null!=p.stage.__renderer&&(p.stage.__renderer.__cleared=!0)},texture:null,fullScreenShader:null,buffer:null,basicShader:null,time:null,timeScale:null,vertexSlot:null,
texCoordSlot:null,imageUniform:null,resolutionUniform:null,resolutionUsUniform:null,timeUniform:null,uniforms:null,changedUniforms:null,uniformTweens:null,__class__:Od});var kq=function(a){null==a&&(a=1);this.model=new Od(this,"\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)};h["com.stencyl.graphics.shaders.ScanlineShader"]=kq;kq.__name__="com.stencyl.graphics.shaders.ScanlineShader";kq.__super__=Sc;kq.prototype=w(Sc.prototype,{setScale:function(a){this.setProperty("scale",a)},__class__:kq});var lq=function(){this.model=new Od(this,"\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)};h["com.stencyl.graphics.shaders.SepiaShader"]=lq;lq.__name__="com.stencyl.graphics.shaders.SepiaShader";lq.__super__=Sc;lq.prototype=w(Sc.prototype,{__class__:lq});var Zk=function(a){this.program=t.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;t.context.attachShader(this.program,c);t.context.deleteShader(c)}t.context.linkProgram(this.program);t.context.getProgramParameter(this.program,35714)};h["com.stencyl.graphics.shaders.Shader"]=
Zk;Zk.__name__="com.stencyl.graphics.shaders.Shader";Zk.prototype={compile:function(a,b){b=t.context.createShader(b);t.context.shaderSource(b,a);t.context.compileShader(b);return 0==t.context.getShaderParameter(b,35713)?null:b},attribute:function(a){return t.context.getAttribLocation(this.program,a)},uniform:function(a){return t.context.getUniformLocation(this.program,a)},bind:function(){t.context.useProgram(this.program)},program:null,__class__:Zk};var mq=function(a){null==a&&(a=2);this.model=new Od(this,
"\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\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)};h["com.stencyl.graphics.shaders.SharpenShader"]=mq;mq.__name__="com.stencyl.graphics.shaders.SharpenShader";mq.__super__=Sc;mq.prototype=w(Sc.prototype,{setAmount:function(a){this.setProperty("amount",a)},__class__:mq});var nq=function(a,b){null==b&&(b=1);this.model=new Od(this,"\n\t\t\t#ifdef GL_ES\n\t\t\t\tprecision mediump float;\n\t\t\t#endif\n\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\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\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",
!0);this.setColor(a);this.setAmount(b)};h["com.stencyl.graphics.shaders.TintShader"]=nq;nq.__name__="com.stencyl.graphics.shaders.TintShader";nq.__super__=Sc;nq.prototype=w(Sc.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__:nq});var Cb=function(a){this.duration=a;this.complete=this.active=!1;0==a&&(this.active=this.complete=!0)};h["com.stencyl.graphics.transitions.Transition"]=
Cb;Cb.__name__="com.stencyl.graphics.transitions.Transition";Cb.prototype={duration:null,direction:null,active:null,complete:null,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__:Cb};var Rk=function(a,b,c,d){null==c&&(c=10);
Cb.call(this,b);this.color=d;this.direction=a;this.numBlinds=c;a==Cb.IN?(this.beginBlindWidth=p.screenWidth*p.SCALE/c,this.endBlindWidth=0):a==Cb.OUT?(this.beginBlindWidth=0,this.endBlindWidth=p.screenWidth*p.SCALE/c):this.complete=!0};h["com.stencyl.graphics.transitions.BlindsTransition"]=Rk;Rk.__name__="com.stencyl.graphics.transitions.BlindsTransition";Rk.__super__=Cb;Rk.prototype=w(Cb.prototype,{color:null,numBlinds:null,blindWidth:null,beginBlindWidth:null,endBlindWidth:null,blindRect:null,rect:null,
graphics:null,start:function(){this.active=!0;this.blindRect=new ia(0,0,this.beginBlindWidth,p.screenHeight*p.SCALE);this.blindWidth=new $e;this.rect=new Ue;this.graphics=this.rect.get_graphics();this.direction==Cb.IN&&(this.graphics.beginFill(this.color),this.graphics.drawRect(0,0,p.screenWidth*p.SCALE,p.screenHeight*p.SCALE),this.graphics.endFill());p.engine.transitionLayer.addChild(this.rect);this.blindWidth.tween(this.beginBlindWidth,this.endBlindWidth,tb.linear,1E3*this.duration|0).doOnComplete(v(this,
this.stop))},draw:function(a){this.graphics.clear();this.graphics.beginFill(this.color);this.blindRect.x=0;this.blindRect.width=this.blindWidth.value;this.direction==Cb.IN&&(this.blindRect.x+=p.screenWidth*p.SCALE/this.numBlinds-this.blindWidth.value);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+=p.screenWidth*p.SCALE/this.numBlinds;this.graphics.endFill()},cleanup:function(){null!=this.rect&&
(p.engine.transitionLayer.removeChild(this.rect),this.rect=null)},__class__:Rk});var Qk=function(a,b,c,d){null==d&&(d=-16777216);null==c&&(c=50);Cb.call(this,b);this.color=d;this.direction=a;this.numBubbles=c};h["com.stencyl.graphics.transitions.BubblesTransition"]=Qk;Qk.__name__="com.stencyl.graphics.transitions.BubblesTransition";Qk.__super__=Cb;Qk.prototype=w(Cb.prototype,{color:null,numBubbles:null,radius:null,beginRadius:null,endRadius:null,rect:null,graphics:null,drawBitmap:null,bubblePositions:null,
bubbleRect:null,screenWidth:null,screenHeight:null,start:function(){this.active=!0;this.rect=new Ue;this.graphics=this.rect.get_graphics();this.screenWidth=p.screenWidth*p.SCALE|0;this.screenHeight=p.screenHeight*p.SCALE|0;this.direction==Cb.IN&&(this.graphics.beginFill(this.color),this.graphics.drawRect(0,0,this.screenWidth,this.screenHeight),this.graphics.endFill());this.drawBitmap=new na(this.screenWidth,this.screenHeight);var a=this.screenWidth/this.screenHeight,b=Math.sqrt(this.numBubbles/a)|
0,c=this.screenHeight/b;a=Math.ceil(b*a|0);b=Math.ceil(b);var d=a*c-this.screenWidth|0,e=new ia(-d/2,-(b*c-this.screenHeight|0)/2,c,c);this.bubblePositions=[];for(var f=0;f<b;){f++;for(var g=0,k=a;g<k;)g++,this.bubblePositions.push(new pa(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(pa.distance(new pa(0,0),new pa(c,c)));this.radius=new $e;p.engine.transitionLayer.addChild(this.rect);this.radius.tween(this.beginRadius,
this.endRadius,tb.linear,1E3*this.duration|0).doOnComplete(v(this,this.stop))},draw:function(a){this.graphics.clear();if(this.direction==Cb.IN){this.drawBitmap.draw(p.engine.colorLayer);this.drawBitmap.draw(p.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.value);
this.graphics.endFill()}}else if(this.direction==Cb.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.value),this.graphics.endFill()},cleanup:function(){null!=this.rect&&(p.engine.transitionLayer.removeChild(this.rect),this.rect=null)},__class__:Qk});var Tk=function(a,b,c){null==c&&(c=-16777216);Cb.call(this,b);this.color=c;this.direction=a;a==Cb.IN?(this.beginRadius=0,this.endRadius=Math.ceil(pa.distance(new pa(0,
0),new pa(p.screenWidthHalf*p.SCALE,p.screenHeightHalf*p.SCALE)))|0):a==Cb.OUT&&(this.beginRadius=Math.ceil(pa.distance(new pa(0,0),new pa(p.screenWidthHalf*p.SCALE,p.screenHeightHalf*p.SCALE)))|0,this.endRadius=0)};h["com.stencyl.graphics.transitions.CircleTransition"]=Tk;Tk.__name__="com.stencyl.graphics.transitions.CircleTransition";Tk.__super__=Cb;Tk.prototype=w(Cb.prototype,{color:null,radius:null,beginRadius:null,endRadius:null,circleImg:null,s:null,start:function(){this.active=!0;this.s=new Ue;
this.circleImg=new na(p.screenWidth*p.SCALE|0,p.screenHeight*p.SCALE|0);this.radius=new $e;if(this.direction==Cb.IN){var a=this.s.get_graphics();a.beginFill(this.color);a.drawRect(0,0,p.screenWidth*p.SCALE,p.screenHeight*p.SCALE);a.endFill()}p.engine.transitionLayer.addChild(this.s);this.radius.tween(this.beginRadius,this.endRadius,tb.linear,1E3*this.duration|0).doOnComplete(v(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,p.screenWidth*p.SCALE,p.screenHeight*p.SCALE);this.s.get_graphics().endFill();this.circleImg.draw(p.engine.colorLayer);this.circleImg.draw(p.engine.master);this.s.get_graphics().beginBitmapFill(this.circleImg);this.s.get_graphics().drawCircle(p.screenWidthHalf*p.SCALE,p.screenHeightHalf*p.SCALE,this.radius.value);this.s.get_graphics().endFill()},cleanup:function(){null!=this.s&&(p.engine.transitionLayer.removeChild(this.s),this.s=null)},__class__:Tk});var Km=function(a,b){Cb.call(this,b);this.oldImg=
a};h["com.stencyl.graphics.transitions.CrossfadeTransition"]=Km;Km.__name__="com.stencyl.graphics.transitions.CrossfadeTransition";Km.__super__=Cb;Km.prototype=w(Cb.prototype,{oldImg:null,bitmap:null,rect:null,rectAlpha:null,start:function(){this.active=!0;this.bitmap=new na(p.screenWidth*p.SCALE|0,p.screenHeight*p.SCALE|0);this.bitmap.draw(this.oldImg);this.rect=new Ue;var a=this.rect.get_graphics();a.beginBitmapFill(this.bitmap);a.drawRect(0,0,p.screenWidth*p.SCALE,p.screenHeight*p.SCALE);a.endFill();
p.engine.transitionLayer.addChild(this.rect);this.rectAlpha=new $e;this.rectAlpha.tween(1,0,tb.linear,1E3*this.duration|0).doOnComplete(v(this,this.stop))},update:function(a){this.rect.set_alpha(this.rectAlpha.value)},draw:function(a){},cleanup:function(){this.bitmap=this.oldImg=null;null!=this.rect&&(p.engine.transitionLayer.removeChild(this.rect),this.rect=null)},__class__:Km});var Mm=function(a,b){null==b&&(b=-16777216);Cb.call(this,a);this.color=b;this.direction=Cb.IN};h["com.stencyl.graphics.transitions.FadeInTransition"]=
Mm;Mm.__name__="com.stencyl.graphics.transitions.FadeInTransition";Mm.__super__=Cb;Mm.prototype=w(Cb.prototype,{color:null,rect:null,rectAlpha:null,start:function(){this.active=!0;this.rect=new Ue;var a=this.rect.get_graphics();a.beginFill(this.color);a.drawRect(0,0,p.screenWidth*p.SCALE+4,p.screenHeight*p.SCALE+4);a.endFill();a.drawCircle(1,1,1);p.engine.transitionLayer.addChild(this.rect);this.rectAlpha=new $e;this.rectAlpha.tween(1,0,tb.linear,1E3*this.duration|0).doOnComplete(v(this,this.stop))},
update:function(a){this.rect.set_alpha(this.rectAlpha.value)},cleanup:function(){null!=this.rect&&(p.engine.transitionLayer.removeChild(this.rect),this.rect=null)},__class__:Mm});var Lm=function(a,b){null==b&&(b=-16777216);Cb.call(this,a);this.color=b;this.direction=Cb.IN};h["com.stencyl.graphics.transitions.FadeOutTransition"]=Lm;Lm.__name__="com.stencyl.graphics.transitions.FadeOutTransition";Lm.__super__=Cb;Lm.prototype=w(Cb.prototype,{color:null,rect:null,rectAlpha:null,start:function(){this.active=
!0;this.rect=new Ue;this.rect.set_alpha(0);var a=this.rect.get_graphics();a.beginFill(this.color);a.drawRect(0,0,p.screenWidth*p.SCALE+4,p.screenHeight*p.SCALE+4);a.endFill();a.drawCircle(1,1,1);p.engine.transitionLayer.addChild(this.rect);this.rectAlpha=new $e;this.rectAlpha.tween(0,1,tb.linear,1E3*this.duration|0).doOnComplete(v(this,this.stop))},update:function(a){this.rect.set_alpha(this.rectAlpha.value)},cleanup:function(){null!=this.rect&&(p.engine.transitionLayer.removeChild(this.rect),this.rect=
null)},__class__:Lm});var Pk=function(a,b,c){Cb.call(this,a);this.beginPixelSize=b;this.endPixelSize=c};h["com.stencyl.graphics.transitions.PixelizeTransition"]=Pk;Pk.__name__="com.stencyl.graphics.transitions.PixelizeTransition";Pk.__super__=Cb;Pk.prototype=w(Cb.prototype,{pixelSizeTween:null,beginPixelSize:null,endPixelSize:null,srcImg:null,displayImg:null,displayBitmap:null,c:null,r:null,xOverflow:null,yOverflow:null,pixelRect:null,halfSize:null,start:function(){this.active=!0;this.srcImg=new na(p.screenWidth*
p.SCALE|0,p.screenHeight*p.SCALE|0);this.displayImg=new na(p.screenWidth*p.SCALE|0,p.screenHeight*p.SCALE|0);this.pixelRect=new ia(0,0,0,0);p.engine.transitionLayer.addChild(this.displayBitmap=new Zc(this.displayImg));this.pixelSizeTween=new $e;this.pixelSizeTween.tween(this.beginPixelSize,this.endPixelSize,tb.linear,1E3*this.duration|0).doOnComplete(v(this,this.stop))},draw:function(a){a=this.pixelSizeTween.value|0;if(1==a)this.displayImg.draw(p.engine.colorLayer),this.displayImg.draw(p.engine.master);
else{this.srcImg.draw(p.engine.colorLayer);this.srcImg.draw(p.engine.master);this.c=Math.ceil(p.screenWidth*p.SCALE/a);this.r=Math.ceil(p.screenHeight*p.SCALE/a);this.xOverflow=this.c*a-p.screenWidth*p.SCALE|0;this.yOverflow=this.r*a-p.screenHeight*p.SCALE|0;this.pixelRect.x=-this.xOverflow/2;this.pixelRect.y=-this.yOverflow/2;this.pixelRect.height=this.pixelRect.width=a;this.halfSize=a/2|0;this.displayImg.lock();for(var b=0,c=this.r;b<c;){b++;for(var d=0,e=this.c;d<e;){d++;var f=this.srcImg.getPixel32(this.pixelRect.x+
this.halfSize|0,this.pixelRect.y+this.halfSize|0);for(var g=this.pixelRect.x|0,k=this.pixelRect.x+this.pixelRect.width|0;g<k;)for(var l=g++,m=this.pixelRect.y|0,z=this.pixelRect.y+this.pixelRect.height|0;m<z;){var n=m++;this.displayImg.setPixel32(l,n,f)}this.pixelRect.x+=a}this.pixelRect.x=-this.xOverflow/2;this.pixelRect.y+=a}this.displayImg.unlock()}},cleanup:function(){null!=this.displayBitmap&&p.engine.transitionLayer.removeChild(this.displayBitmap)},__class__:Pk});var Sk=function(a,b,c){Cb.call(this,
b);this.color=c;this.direction=a;a==Cb.IN?(this.beginHeight=this.beginWidth=0,this.endWidth=p.screenWidth*p.SCALE|0,this.endHeight=p.screenHeight*p.SCALE|0):a==Cb.OUT?(this.beginWidth=p.screenWidth*p.SCALE|0,this.beginHeight=p.screenHeight*p.SCALE|0,this.endHeight=this.endWidth=0):this.complete=!0};h["com.stencyl.graphics.transitions.RectangleTransition"]=Sk;Sk.__name__="com.stencyl.graphics.transitions.RectangleTransition";Sk.__super__=Cb;Sk.prototype=w(Cb.prototype,{rectangleImg:null,graphics:null,
color:null,size:null,beginWidth:null,endWidth:null,beginHeight:null,endHeight:null,rect:null,start:function(){this.active=!0;this.size=new bg;this.rectangleImg=new na(p.screenWidth*p.SCALE|0,p.screenHeight*p.SCALE|0);this.rect=new Ue;this.graphics=this.rect.get_graphics();this.direction==Cb.IN&&(this.graphics.beginFill(this.color),this.graphics.drawRect(0,0,p.screenWidth*p.SCALE,p.screenHeight*p.SCALE),this.graphics.endFill());p.engine.transitionLayer.addChild(this.rect);this.size.onComplete=v(this,
this.stop);this.size.tween(this.beginWidth,this.endWidth,this.beginHeight,this.endHeight,tb.linear,1E3*this.duration|0)},draw:function(a){this.graphics.clear();this.graphics.beginFill(this.color);this.graphics.drawRect(0,0,p.screenWidth*p.SCALE,p.screenHeight*p.SCALE);this.graphics.endFill();this.rectangleImg.draw(p.engine.colorLayer);this.rectangleImg.draw(p.engine.master);this.graphics.beginBitmapFill(this.rectangleImg);this.graphics.drawRect((p.screenWidth*p.SCALE-this.size.value1)/2,(p.screenHeight*
p.SCALE-this.size.value2)/2,this.size.value1,this.size.value2);this.graphics.endFill()},cleanup:function(){null!=this.rect&&(p.engine.transitionLayer.removeChild(this.rect),this.rect=null)},__class__:Sk});var Ze=function(a,b,c,d){Cb.call(this,c);this.sceneSpr=a;this.sceneCol=b;this.oldSceneMatrix=new Ha;this.newSceneMatrix=new Ha;this.ty=this.tx=0;d==Ze.SLIDE_UP?(this.newSceneMatrix.ty=-p.screenHeight*p.SCALE,this.ty=p.screenHeight*p.SCALE):d==Ze.SLIDE_DOWN?(this.newSceneMatrix.ty=p.screenHeight*
p.SCALE,this.ty=-p.screenHeight*p.SCALE):d==Ze.SLIDE_LEFT?(this.newSceneMatrix.tx=-p.screenWidth*p.SCALE,this.tx=p.screenWidth*p.SCALE):d==Ze.SLIDE_RIGHT?(this.newSceneMatrix.tx=p.screenWidth*p.SCALE,this.tx=-p.screenWidth*p.SCALE):this.complete=!0};h["com.stencyl.graphics.transitions.SlideTransition"]=Ze;Ze.__name__="com.stencyl.graphics.transitions.SlideTransition";Ze.__super__=Cb;Ze.prototype=w(Cb.prototype,{sceneSpr:null,sceneCol:null,oldBitmap:null,newBitmap:null,drawBitmap:null,graphics:null,
oldSceneMatrix:null,newSceneMatrix:null,osm_xy:null,nsm_xy:null,tx:null,ty:null,rect:null,start:function(){this.active=!0;this.oldBitmap=new na(p.screenWidth*p.SCALE|0,p.screenHeight*p.SCALE|0);this.oldBitmap.draw(this.sceneCol);this.oldBitmap.draw(this.sceneSpr);this.newBitmap=new na(p.screenWidth*p.SCALE|0,p.screenHeight*p.SCALE|0);this.drawBitmap=new na(p.screenWidth*p.SCALE|0,p.screenHeight*p.SCALE|0);this.rect=new Ue;this.graphics=this.rect.get_graphics();this.graphics.beginBitmapFill(this.oldBitmap);
this.graphics.drawRect(0,0,p.screenWidth*p.SCALE,p.screenHeight*p.SCALE);this.graphics.endFill();p.engine.transitionLayer.addChild(this.rect);this.osm_xy=new bg;this.nsm_xy=new bg;this.osm_xy.tween(this.oldSceneMatrix.tx,this.tx,this.oldSceneMatrix.ty,this.ty,tb.linear,1E3*this.duration|0);this.nsm_xy.tween(this.newSceneMatrix.tx,0,this.newSceneMatrix.ty,0,tb.linear,1E3*this.duration|0);this.nsm_xy.doOnComplete(v(this,this.stop))},update:function(a){this.oldSceneMatrix.tx=this.osm_xy.value1;this.oldSceneMatrix.ty=
this.osm_xy.value2;this.newSceneMatrix.tx=this.nsm_xy.value1;this.newSceneMatrix.ty=this.nsm_xy.value2},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,p.screenWidth*p.SCALE,p.screenHeight*p.SCALE);this.graphics.endFill()},cleanup:function(){this.sceneSpr=
null;null!=this.rect&&(p.engine.transitionLayer.removeChild(this.rect),this.rect=null)},__class__:Ze});var Ah=function(){};h["com.stencyl.io.AbstractReader"]=Ah;Ah.__name__="com.stencyl.io.AbstractReader";Ah.__isInterface__=!0;Ah.prototype={accepts:null,read:null,__class__:Ah};var Dm=function(){};h["com.stencyl.io.ActorTypeReader"]=Dm;Dm.__name__="com.stencyl.io.ActorTypeReader";Dm.__interfaces__=[Ah];Dm.prototype={accepts:function(a){return a==Oa.MBS_ACTOR_TYPE.getName()},read:function(a){var b=
a.getId(),c=a.getAtlasID(),d=a.getName(),e=new kj;e.fixedRotation=a.getFixedRotation();switch(a.getBodyType()){case 0:var f=wa.b2_staticBody;break;case 1:f=wa.b2_kinematicBody;break;default:f=wa.b2_dynamicBody}e.type=f;e.linearDamping=a.getLinearDamping();e.angularDamping=a.getAngularDamping();e.friction=a.getFriction();e.bounciness=a.getRestitution();e.mass=a.getMass();e.aMass=a.getInertia();e.active=!0;e.bullet=!1;e.allowSleep=!1;e.awake=!0;e.ignoreGravity=a.getIgnoreGravity();e.bullet=a.getContinuous();
f=a.getSprite();var g=a.getGroupID(),k=a.getPhysicsMode(),l=a.getAutoScale(),m=a.getPausable(),z=e.ignoreGravity||e.type==wa.b2_staticBody||e.type==wa.b2_kinematicBody,n=Le.readBehaviors(a.getSnippets()),p=a.getEventSnippetID();-1<p&&(a=new Xk(p,new ua),p=""+p,null!=q[p]?n.setReserved(p,a):n.h[p]=a);return new Gg(b,c,d,g,f,n,e,k,l,m,z)},__class__:Dm};var Le=function(){};h["com.stencyl.io.AttributeValues"]=Le;Le.__name__="com.stencyl.io.AttributeValues";Le.readBehaviors=function(a){for(var b=new ua,
c=0,d=a.length();c<d;){c++;var e=a.getNextObject();if(e.getEnabled()){var f=e.getId();e=Le.readBehaviorProperties(e.getProperties());e=new Xk(f,e);f=""+f;null!=q[f]?b.setReserved(f,e):b.h[f]=e}}return b};Le.readBehaviorProperties=function(a){for(var b=new ua,c=0,d=a.length();c<d;){c++;var e=a.getNextObject(),f=e.getId(),g=e.getType();f=""+f;e=Le.readAttribute(g,e);null!=q[f]?b.setReserved(f,e):b.h[f]=e}return b};Le.readAttribute=function(a,b){switch(a){case "list":return Le.readList(b.getValue());
case "map":return Le.readMap(b.getValue());default:return b.getValue()}};Le.readAttributeDef=function(a,b){switch(a){case "list":return Le.readList(b.getDefaultValue());case "map":return Le.readMap(b.getDefaultValue());default:return b.getDefaultValue()}};Le.readList=function(a){if(null==a)return null;for(var b=[],c=0,d=a.length();c<d;){var e=c++;b[e]=a.readObject()}return b};Le.readMap=function(a){if(null==a)return null;for(var b=new ua,c=0,d=a.length();c<d;){c++;var e=a.getNextObject(),f=e.getKey();
e=e.getValue();if(e instanceof bi){for(var g=[],k=0,l=e.length();k<l;)k++,g.push(e.readObject());e=g}else e instanceof eb&&(e=Le.readMap(e));null!=q[f]?b.setReserved(f,e):b.h[f]=e}return b};var Am=function(){};h["com.stencyl.io.BackgroundReader"]=Am;Am.__name__="com.stencyl.io.BackgroundReader";Am.__interfaces__=[Ah];Am.prototype={accepts:function(a){return a==vb.MBS_BACKGROUND.getName()},read:function(a){var b=a.getId(),c=a.getAtlasID(),d=a.getName(),e=a.getXVelocity(),f=a.getYVelocity(),g=a.getXParallaxFactor(),
k=a.getYParallaxFactor(),l=[];if(0<a.getNumFrames())for(var m=a.getDurations(),z=0,n=m.length();z<n;)z++,l.push(m.readInt());a=a.getRepeats();return 0!=e||0!=f?new ci(b,c,d,l,g,k,a,e,f):new $g(b,c,d,l,g,k,a)},__class__:Am};var oj=function(){};h["com.stencyl.io.BehaviorReader"]=oj;oj.__name__="com.stencyl.io.BehaviorReader";oj.readBehavior=function(a){var b=a.getId(),c=a.getName(),d=a.getClassname(),e=a.getAttachedEvent(),f=new ua,g=a.getType();a=a.getAttributes();for(var k=0,l=a.length();k<l;){k++;
var m=a.getNextObject(),z=""+m.getId();m=oj.readAttribute(m,e);null!=q[z]?f.setReserved(z,m):f.h[z]=m}return new Gm(null,null,b,c,d,!0,!0,f,g,e)};oj.readAttribute=function(a,b){var c=a.getId(),d=a.getName(),e=a.getFullname();b=b||a.getHidden();var f=a.getType();a=Le.readAttributeDef(f,a);return new pj(c,d,e,a,f,null,b)};oj.prototype={__class__:oj};var Fm=function(){};h["com.stencyl.io.FontReader"]=Fm;Fm.__name__="com.stencyl.io.FontReader";Fm.__interfaces__=[Ah];Fm.prototype={accepts:function(a){return a==
sc.MBS_FONT.getName()},read:function(a){return new $f(a.getId(),a.getAtlasID(),a.getName(),!1)},__class__:Fm};var Xd=function(){};h["com.stencyl.io.ShapeReader"]=Xd;Xd.__name__="com.stencyl.io.ShapeReader";Xd.readPoint=function(a){return new pa(a.getX(),a.getY())};Xd.readPoints=function(a){for(var b=Array(a.length()),c=0,d=a.length();c<d;){var e=c++,f=a.getNextObject();b[e]=new pa(f.getX(),f.getY())}return b};Xd.createCircle=function(a,b,c,d,e){null==e&&(e=-1);null==d&&(d=-1);var f=2*a,g=new cd;g.m_radius=
p.toPhysicalUnits(a);g.m_p.x=p.toPhysicalUnits(b-(d-f)/2);g.m_p.y=p.toPhysicalUnits(c-(e-f)/2);return g};Xd.createPolygon=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);var e=[];var f=b.length;var g=0;c=-c/2|0;d=-d/2|0;if("MbsPolygon"==a||"MbsPolyRegion"==a){for(g=0;g<f;){var k=b[g];a=p.toPhysicalUnits(k.x+c);k=p.toPhysicalUnits(k.y+d);e[g]=new N(a,k);++g}Xd.EnsureCorrectVertexDirection(e);return Lb.asArray(e,e.length)}if("MbsWireframe"==a){for(;g<f;)c=b[g],e.push(new N(p.toPhysicalUnits(c.x),p.toPhysicalUnits(c.y))),
++g;b=Xd.getWidth(e);f=Xd.getHeight(e);g=[];c=0;for(d=e.length+1;c<d;){var l=c++;a=new Ug(e[l%e.length],e[(l+1)%e.length]);g.push(a);a.m_hasVertex0=!0;a.m_hasVertex3=!0;k=e[(l-1)%e.length];l=e[(l+2)%e.length];null==k&&(k=e[e.length-1]);null==l&&(l=e[0]);a.m_v0=k;a.m_v3=l}e=new Wa;e.h[0]=g;e.h[1]=b;e.h[2]=f;return e}return null};Xd.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};Xd.EnsureCorrectVertexDirection=
function(a){return Xd.CheckVertexDirection(a)?!0:(Xd.ReverseVertices(a),!1)};Xd.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};Xd.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};Xd.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};var Bm=function(){};h["com.stencyl.io.SoundReader"]=
Bm;Bm.__name__="com.stencyl.io.SoundReader";Bm.__interfaces__=[Ah];Bm.prototype={accepts:function(a){return a==Ec.MBS_MUSIC.getName()},read:function(a){var b=a.getStream(),c=a.getLoop(),d=a.getPan(),e=a.getVolume(),f=a.getType();return new Fi(a.getId(),a.getName(),b,c,d,e,f,a.getAtlasID())},__class__:Bm};var Em=function(){};h["com.stencyl.io.SpriteReader"]=Em;Em.__name__="com.stencyl.io.SpriteReader";Em.__interfaces__=[Ah];Em.prototype={accepts:function(a){return a==lc.MBS_SPRITE.getName()},read:function(a){var b=
a.getDefaultAnimation(),c=a.getReadableImages();b=new nj(a.getId(),a.getAtlasID(),a.getName(),b,c);a=a.getAnimations();c=0;for(var d=a.length();c<d;){c++;var e=a.getNextObject();e=this.readAnimation(e,b);b.animations.h[e.animID]=e}return b},readAnimation:function(a,b){var c=a.getId(),d=a.getName(),e=a.getWidth(),f=a.getHeight(),g=a.getOriginX(),k=a.getOriginY(),l=a.getNumFrames(),m=a.getAcross(),z=a.getDown(),n=this.readSimpleShapes(a,e/m|0,f/z|0),p=this.readShapes(a,e/m|0,f/z|0),h=a.getLoop(),q=
a.getSync(),t=[];a=a.getDurations();for(var r=0,u=a.length();r<u;){var x=r++;t[x]=a.readInt();t[x]=Math.floor(t[x]/10);t[x]*=10}return new Ud(c,d,b,n,p,h,q,e,f,g,k,t,l,m,z)},readSimpleShapes:function(a,b,c){b=new Wa;a=a.getShapes();c=0;for(var d=a.length();c<d;){c++;var e=a.getNextObject(),f=e.getId(),g=e.getGroupID(),k=e.getSensor();e=e.getShape();if(e instanceof kd&&(e=e.getPoints(),4==e.length())){for(var l=e.getNextObject(),m=0,z=1E7,n=1E7,p=0,h=0,q=l.getX()|0,t=l.getY()|0;m<e.length();)z=Math.min(z,
l.getX())|0,n=Math.min(n,l.getY())|0,p=Math.max(p,l.getX())|0,h=Math.max(h,l.getY())|0,++m,m<e.length()&&(l=e.getNextObject());g=new ld(p-z,h-n,q,t,!k,g);b.h[f]=g}}return b},readShapes:function(a,b,c){var d=new Wa;a=a.getShapes();for(var e=0,f=a.length();e<f;){e++;var g=a.getNextObject(),k=g.getId();g.getGroupID();var l=g.getSensor(),m=g.getShape();if(m instanceof ie)m=Xd.createCircle(m.getRadius(),m.getPosition().getX(),m.getPosition().getY(),b,c);else{var z=m;m=Xd.createPolygon(m.getMbsType().getName(),
Xd.readPoints(z.getPoints()).slice(0),b,c)}z=new kg;z.shape=m;z.density=g.getDensity();z.friction=g.getFriction();z.restitution=g.getRestitution();z.isSensor=l;z.groupID=g.getGroupID();d.h[k]=z}return d},__class__:Em};var Cm=function(){};h["com.stencyl.io.TilesetReader"]=Cm;Cm.__name__="com.stencyl.io.TilesetReader";Cm.__interfaces__=[Ah];Cm.prototype={accepts:function(a){return a==ec.MBS_TILESET.getName()},read:function(a){var b=a.getAcross(),c=a.getDown(),d=a.getTileWidth(),e=a.getTileHeight(),
f=a.getReadableImages(),g=[];b=new Rf(a.getId(),a.getAtlasID(),a.getName(),b,c,d,e,f,g);a=a.getTiles();c=0;for(d=a.length();c<d;)c++,e=a.getNextObject(),g[e.getId()]=this.readTile(e,b);b.isAtlasActive()&&b.loadGraphics();return b},readTile:function(a,b){for(var c=a.getId(),d=a.getCollision(),e=a.getMetadata(),f=a.getFrames(),g=[],k=0,l=a.getDurations(),m=0,z=l.length();m<z;)m++,g[k]=l.readInt(),g[k]=Math.floor(g[k]/10),g[k]*=10,++k;k=null;-1!=a.getAutotile()&&(k=Eb.get().autotileFormats,l=a.getAutotile(),
k=k.h[l]);l=null;if(0!=a.getAutotileMerge().length())for(l=new Wa,a=a.getAutotileMerge(),m=0,z=a.length();m<z;){m++;var n=a.readInt();l.h[n]=n}return new fd(c,d,e,f,g,k,l,b)},__class__:Cm};var ob=function(a){this.data=a};h["mbs.core.MbsObject"]=ob;ob.__name__="mbs.core.MbsObject";ob.prototype={data:null,address:null,getMbs:function(){return this.data},getAddress:function(){return this.address},setAddress:function(a){this.address=a},getMbsType:function(){throw new E("Must override getMbsType in MbsObject subclasses");
},__class__:ob};var kb=function(a){this.data=a};h["com.stencyl.io.mbs.MbsResource"]=kb;kb.__name__="com.stencyl.io.mbs.MbsResource";kb.initializeType=function(){null==kb.MBS_RESOURCE&&(kb.MBS_RESOURCE=new Ib("MbsResource"),kb.MBS_RESOURCE.setInstantiator(function(a){return new kb(a)}),kb.atlasID=kb.MBS_RESOURCE.createField("atlasID",M.INTEGER),kb.description=kb.MBS_RESOURCE.createField("description",M.STRING),kb.id=kb.MBS_RESOURCE.createField("id",M.INTEGER),kb.$name=kb.MBS_RESOURCE.createField("name",
M.STRING))};kb.new_MbsResource_list=function(a){return new eb(a,kb.MBS_RESOURCE,new kb(a))};kb.__super__=ob;kb.prototype=w(ob.prototype,{getMbsType:function(){return kb.MBS_RESOURCE},allocateNew:function(){this.setAddress(this.data.allocate(kb.MBS_RESOURCE.getSize()))},getAtlasID:function(){return this.data.readInt(this.address+kb.atlasID.address)},setAtlasID:function(a){this.data.writeInt(this.address+kb.atlasID.address,a)},getDescription:function(){return this.data.readString(this.address+kb.description.address)},
setDescription:function(a){this.data.writeString(this.address+kb.description.address,a)},getId:function(){return this.data.readInt(this.address+kb.id.address)},setId:function(a){this.data.writeInt(this.address+kb.id.address,a)},getName:function(){return this.data.readString(this.address+kb.$name.address)},setName:function(a){this.data.writeString(this.address+kb.$name.address,a)},__class__:kb});var vb=function(a){this.data=a;this._durations=new mg(a)};h["com.stencyl.io.mbs.MbsBackground"]=vb;vb.__name__=
"com.stencyl.io.mbs.MbsBackground";vb.initializeType=function(){null==vb.MBS_BACKGROUND&&(kb.initializeType(),vb.MBS_BACKGROUND=new Ib("MbsBackground"),vb.MBS_BACKGROUND.setInstantiator(function(a){return new vb(a)}),vb.MBS_BACKGROUND.inherit(kb.MBS_RESOURCE),vb.readableImages=vb.MBS_BACKGROUND.createField("readableImages",M.BOOLEAN),vb.durations=vb.MBS_BACKGROUND.createField("durations",M.LIST),vb.height=vb.MBS_BACKGROUND.createField("height",M.INTEGER),vb.numFrames=vb.MBS_BACKGROUND.createField("numFrames",
M.INTEGER),vb.repeats=vb.MBS_BACKGROUND.createField("repeats",M.BOOLEAN),vb.resized=vb.MBS_BACKGROUND.createField("resized",M.BOOLEAN),vb.width=vb.MBS_BACKGROUND.createField("width",M.INTEGER),vb.xParallaxFactor=vb.MBS_BACKGROUND.createField("xParallaxFactor",M.FLOAT),vb.xVelocity=vb.MBS_BACKGROUND.createField("xVelocity",M.FLOAT),vb.yParallaxFactor=vb.MBS_BACKGROUND.createField("yParallaxFactor",M.FLOAT),vb.yVelocity=vb.MBS_BACKGROUND.createField("yVelocity",M.FLOAT))};vb.new_MbsBackground_list=
function(a){return new eb(a,vb.MBS_BACKGROUND,new vb(a))};vb.__super__=kb;vb.prototype=w(kb.prototype,{getMbsType:function(){return vb.MBS_BACKGROUND},_durations:null,allocateNew:function(){this.setAddress(this.data.allocate(vb.MBS_BACKGROUND.getSize()))},getReadableImages:function(){return this.data.readBool(this.address+vb.readableImages.address)},setReadableImages:function(a){this.data.writeBool(this.address+vb.readableImages.address,a)},getDurations:function(){this._durations.setAddress(this.data.readInt(this.address+
vb.durations.address));return this._durations},createDurations:function(a){this._durations.allocateNew(a);this.data.writeInt(this.address+vb.durations.address,this._durations.getAddress());return this._durations},getHeight:function(){return this.data.readInt(this.address+vb.height.address)},setHeight:function(a){this.data.writeInt(this.address+vb.height.address,a)},getNumFrames:function(){return this.data.readInt(this.address+vb.numFrames.address)},setNumFrames:function(a){this.data.writeInt(this.address+
vb.numFrames.address,a)},getRepeats:function(){return this.data.readBool(this.address+vb.repeats.address)},setRepeats:function(a){this.data.writeBool(this.address+vb.repeats.address,a)},getResized:function(){return this.data.readBool(this.address+vb.resized.address)},setResized:function(a){this.data.writeBool(this.address+vb.resized.address,a)},getWidth:function(){return this.data.readInt(this.address+vb.width.address)},setWidth:function(a){this.data.writeInt(this.address+vb.width.address,a)},getXParallaxFactor:function(){return this.data.readFloat(this.address+
vb.xParallaxFactor.address)},setXParallaxFactor:function(a){this.data.writeFloat(this.address+vb.xParallaxFactor.address,a)},getXVelocity:function(){return this.data.readFloat(this.address+vb.xVelocity.address)},setXVelocity:function(a){this.data.writeFloat(this.address+vb.xVelocity.address,a)},getYParallaxFactor:function(){return this.data.readFloat(this.address+vb.yParallaxFactor.address)},setYParallaxFactor:function(a){this.data.writeFloat(this.address+vb.yParallaxFactor.address,a)},getYVelocity:function(){return this.data.readFloat(this.address+
vb.yVelocity.address)},setYVelocity:function(a){this.data.writeFloat(this.address+vb.yVelocity.address,a)},__class__:vb});var Hd=function(a){this.data=a};h["com.stencyl.io.mbs.MbsBlank"]=Hd;Hd.__name__="com.stencyl.io.mbs.MbsBlank";Hd.initializeType=function(){null==Hd.MBS_BLANK&&(Hd.MBS_BLANK=new Ib("MbsBlank"),Hd.MBS_BLANK.setInstantiator(function(a){return new Hd(a)}),Hd.$name=Hd.MBS_BLANK.createField("name",M.STRING),Hd.type=Hd.MBS_BLANK.createField("type",M.STRING))};Hd.new_MbsBlank_list=function(a){return new eb(a,
Hd.MBS_BLANK,new Hd(a))};Hd.__super__=ob;Hd.prototype=w(ob.prototype,{getMbsType:function(){return Hd.MBS_BLANK},allocateNew:function(){this.setAddress(this.data.allocate(Hd.MBS_BLANK.getSize()))},getName:function(){return this.data.readString(this.address+Hd.$name.address)},setName:function(a){this.data.writeString(this.address+Hd.$name.address,a)},getType:function(){return this.data.readString(this.address+Hd.type.address)},setType:function(a){this.data.writeString(this.address+Hd.type.address,
a)},__class__:Hd});var Mb=function(a){this.data=a;this._blanks=new eb(a,Hd.MBS_BLANK,new Hd(a))};h["com.stencyl.io.mbs.MbsCustomBlock"]=Mb;Mb.__name__="com.stencyl.io.mbs.MbsCustomBlock";Mb.initializeType=function(){null==Mb.MBS_CUSTOM_BLOCK&&(kb.initializeType(),Mb.MBS_CUSTOM_BLOCK=new Ib("MbsCustomBlock"),Mb.MBS_CUSTOM_BLOCK.setInstantiator(function(a){return new Mb(a)}),Mb.MBS_CUSTOM_BLOCK.inherit(kb.MBS_RESOURCE),Mb.blocktag=Mb.MBS_CUSTOM_BLOCK.createField("blocktag",M.STRING),Mb.blocktype=Mb.MBS_CUSTOM_BLOCK.createField("blocktype",
M.STRING),Mb.code=Mb.MBS_CUSTOM_BLOCK.createField("code",M.STRING),Mb.global=Mb.MBS_CUSTOM_BLOCK.createField("global",M.BOOLEAN),Mb.gui=Mb.MBS_CUSTOM_BLOCK.createField("gui",M.STRING),Mb.message=Mb.MBS_CUSTOM_BLOCK.createField("message",M.STRING),Mb.returnType=Mb.MBS_CUSTOM_BLOCK.createField("returnType",M.STRING),Mb.snippetID=Mb.MBS_CUSTOM_BLOCK.createField("snippetID",M.INTEGER),Mb.blanks=Mb.MBS_CUSTOM_BLOCK.createField("blanks",M.LIST))};Mb.new_MbsCustomBlock_list=function(a){return new eb(a,Mb.MBS_CUSTOM_BLOCK,
new Mb(a))};Mb.__super__=kb;Mb.prototype=w(kb.prototype,{getMbsType:function(){return Mb.MBS_CUSTOM_BLOCK},_blanks:null,allocateNew:function(){this.setAddress(this.data.allocate(Mb.MBS_CUSTOM_BLOCK.getSize()))},getBlocktag:function(){return this.data.readString(this.address+Mb.blocktag.address)},setBlocktag:function(a){this.data.writeString(this.address+Mb.blocktag.address,a)},getBlocktype:function(){return this.data.readString(this.address+Mb.blocktype.address)},setBlocktype:function(a){this.data.writeString(this.address+
Mb.blocktype.address,a)},getCode:function(){return this.data.readString(this.address+Mb.code.address)},setCode:function(a){this.data.writeString(this.address+Mb.code.address,a)},getGlobal:function(){return this.data.readBool(this.address+Mb.global.address)},setGlobal:function(a){this.data.writeBool(this.address+Mb.global.address,a)},getGui:function(){return this.data.readString(this.address+Mb.gui.address)},setGui:function(a){this.data.writeString(this.address+Mb.gui.address,a)},getMessage:function(){return this.data.readString(this.address+
Mb.message.address)},setMessage:function(a){this.data.writeString(this.address+Mb.message.address,a)},getReturnType:function(){return this.data.readString(this.address+Mb.returnType.address)},setReturnType:function(a){this.data.writeString(this.address+Mb.returnType.address,a)},getSnippetID:function(){return this.data.readInt(this.address+Mb.snippetID.address)},setSnippetID:function(a){this.data.writeInt(this.address+Mb.snippetID.address,a)},getBlanks:function(){this._blanks.setAddress(this.data.readInt(this.address+
Mb.blanks.address));return this._blanks},createBlanks:function(a){this._blanks.allocateNew(a);this.data.writeInt(this.address+Mb.blanks.address,this._blanks.getAddress());return this._blanks},__class__:Mb});var sc=function(a){this.data=a};h["com.stencyl.io.mbs.MbsFont"]=sc;sc.__name__="com.stencyl.io.mbs.MbsFont";sc.initializeType=function(){null==sc.MBS_FONT&&(kb.initializeType(),sc.MBS_FONT=new Ib("MbsFont"),sc.MBS_FONT.setInstantiator(function(a){return new sc(a)}),sc.MBS_FONT.inherit(kb.MBS_RESOURCE),
sc.alphabet=sc.MBS_FONT.createField("alphabet",M.STRING),sc.readableImages=sc.MBS_FONT.createField("readableImages",M.BOOLEAN),sc.height=sc.MBS_FONT.createField("height",M.INTEGER),sc.offsets=sc.MBS_FONT.createField("offsets",M.STRING),sc.prerendered=sc.MBS_FONT.createField("prerendered",M.BOOLEAN),sc.rowHeight=sc.MBS_FONT.createField("rowHeight",M.INTEGER))};sc.new_MbsFont_list=function(a){return new eb(a,sc.MBS_FONT,new sc(a))};sc.__super__=kb;sc.prototype=w(kb.prototype,{getMbsType:function(){return sc.MBS_FONT},
allocateNew:function(){this.setAddress(this.data.allocate(sc.MBS_FONT.getSize()))},getAlphabet:function(){return this.data.readString(this.address+sc.alphabet.address)},setAlphabet:function(a){this.data.writeString(this.address+sc.alphabet.address,a)},getReadableImages:function(){return this.data.readBool(this.address+sc.readableImages.address)},setReadableImages:function(a){this.data.writeBool(this.address+sc.readableImages.address,a)},getHeight:function(){return this.data.readInt(this.address+sc.height.address)},
setHeight:function(a){this.data.writeInt(this.address+sc.height.address,a)},getOffsets:function(){return this.data.readString(this.address+sc.offsets.address)},setOffsets:function(a){this.data.writeString(this.address+sc.offsets.address,a)},getPrerendered:function(){return this.data.readBool(this.address+sc.prerendered.address)},setPrerendered:function(a){this.data.writeBool(this.address+sc.prerendered.address,a)},getRowHeight:function(){return this.data.readInt(this.address+sc.rowHeight.address)},
setRowHeight:function(a){this.data.writeInt(this.address+sc.rowHeight.address,a)},__class__:sc});var Ec=function(a){this.data=a};h["com.stencyl.io.mbs.MbsMusic"]=Ec;Ec.__name__="com.stencyl.io.mbs.MbsMusic";Ec.initializeType=function(){null==Ec.MBS_MUSIC&&(kb.initializeType(),Ec.MBS_MUSIC=new Ib("MbsMusic"),Ec.MBS_MUSIC.setInstantiator(function(a){return new Ec(a)}),Ec.MBS_MUSIC.inherit(kb.MBS_RESOURCE),Ec.loop=Ec.MBS_MUSIC.createField("loop",M.BOOLEAN),Ec.pan=Ec.MBS_MUSIC.createField("pan",M.INTEGER),
Ec.stream=Ec.MBS_MUSIC.createField("stream",M.BOOLEAN),Ec.type=Ec.MBS_MUSIC.createField("type",M.STRING),Ec.volume=Ec.MBS_MUSIC.createField("volume",M.INTEGER))};Ec.new_MbsMusic_list=function(a){return new eb(a,Ec.MBS_MUSIC,new Ec(a))};Ec.__super__=kb;Ec.prototype=w(kb.prototype,{getMbsType:function(){return Ec.MBS_MUSIC},allocateNew:function(){this.setAddress(this.data.allocate(Ec.MBS_MUSIC.getSize()))},getLoop:function(){return this.data.readBool(this.address+Ec.loop.address)},setLoop:function(a){this.data.writeBool(this.address+
Ec.loop.address,a)},getPan:function(){return this.data.readInt(this.address+Ec.pan.address)},setPan:function(a){this.data.writeInt(this.address+Ec.pan.address,a)},getStream:function(){return this.data.readBool(this.address+Ec.stream.address)},setStream:function(a){this.data.writeBool(this.address+Ec.stream.address,a)},getType:function(){return this.data.readString(this.address+Ec.type.address)},setType:function(a){this.data.writeString(this.address+Ec.type.address,a)},getVolume:function(){return this.data.readInt(this.address+
Ec.volume.address)},setVolume:function(a){this.data.writeInt(this.address+Ec.volume.address,a)},__class__:Ec});var ng=function(a,b){this.name=a;this.size=b};h["mbs.core.MbsType"]=ng;ng.__name__="mbs.core.MbsType";ng.prototype={name:null,size:null,getName:function(){return this.name},getSize:function(){return this.size},toString:function(){return"MbsType [name="+this.getName()+"]"},createInstance:function(a){throw new E("Can't create an instance of type "+this.name);},__class__:ng};var M=function(){};
h["mbs.core.MbsTypes"]=M;M.__name__="mbs.core.MbsTypes";var Fc=function(a){this.data=a};h["mbs.core.header.MbsHeader"]=Fc;Fc.__name__="mbs.core.header.MbsHeader";Fc.initializeType=function(){null==Fc.MBS_HEADER&&(Fc.MBS_HEADER=new Ib("MbsHeader"),Fc.MBS_HEADER.setInstantiator(function(a){return new Fc(a)}),Fc.version=Fc.MBS_HEADER.createField("version",M.INTEGER),Fc.typeTableHash=Fc.MBS_HEADER.createField("typeTableHash",M.INTEGER),Fc.typeTablePointer=Fc.MBS_HEADER.createField("typeTablePointer",
M.INTEGER),Fc.stringTablePointer=Fc.MBS_HEADER.createField("stringTablePointer",M.INTEGER),Fc.root=Fc.MBS_HEADER.createField("root",M.DYNAMIC))};Fc.new_MbsHeader_list=function(a){return new eb(a,Fc.MBS_HEADER,new Fc(a))};Fc.__super__=ob;Fc.prototype=w(ob.prototype,{getMbsType:function(){return Fc.MBS_HEADER},allocateNew:function(){this.setAddress(this.data.allocate(Fc.MBS_HEADER.getSize()))},getVersion:function(){return this.data.readInt(this.address+Fc.version.address)},setVersion:function(a){this.data.writeInt(this.address+
Fc.version.address,a)},getTypeTableHash:function(){return this.data.readInt(this.address+Fc.typeTableHash.address)},setTypeTableHash:function(a){this.data.writeInt(this.address+Fc.typeTableHash.address,a)},getTypeTablePointer:function(){return this.data.readInt(this.address+Fc.typeTablePointer.address)},setTypeTablePointer:function(a){this.data.writeInt(this.address+Fc.typeTablePointer.address,a)},getStringTablePointer:function(){return this.data.readInt(this.address+Fc.stringTablePointer.address)},
setStringTablePointer:function(a){this.data.writeInt(this.address+Fc.stringTablePointer.address,a)},getRoot:function(){return Ee.readDynamic(this.data,this.address+Fc.root.address)},setRoot:function(a){Ee.writeDynamic(this.data,this.address+Fc.root.address,a)},__class__:Fc});var Ib=function(a){ng.call(this,a,0);this.fields=[]};h["mbs.core.ComposedType"]=Ib;Ib.__name__="mbs.core.ComposedType";Ib.__super__=ng;Ib.prototype=w(ng.prototype,{parent:null,fields:null,inherit:function(a){this.parent=a;this.size=
a.getSize()},createField:function(a,b){a=new vj(a,b,this.size);this.fields.push(a);this.size+=b.getSize();return a},getParent:function(){return this.parent},getFields:function(){return this.fields},instantiator:null,setInstantiator:function(a){this.instantiator=a},createInstance:function(a){return null!=this.instantiator?this.instantiator(a):ng.prototype.createInstance.call(this,a)},createList:function(a){return new eb(a,this,this.createInstance(a))},__class__:Ib});var gd=function(a){this.data=a};
h["mbs.core.header.MbsTypeInfo"]=gd;gd.__name__="mbs.core.header.MbsTypeInfo";gd.initializeType=function(){null==gd.MBS_TYPE_INFO&&(gd.MBS_TYPE_INFO=new Ib("MbsTypeInfo"),gd.MBS_TYPE_INFO.setInstantiator(function(a){return new gd(a)}),gd.$name=gd.MBS_TYPE_INFO.createField("name",M.STRING),gd.parent=gd.MBS_TYPE_INFO.createField("parent",M.STRING),gd.fieldsPointer=gd.MBS_TYPE_INFO.createField("fieldsPointer",M.INTEGER),gd.size=gd.MBS_TYPE_INFO.createField("size",M.INTEGER))};gd.new_MbsTypeInfo_list=
function(a){return new eb(a,gd.MBS_TYPE_INFO,new gd(a))};gd.__super__=ob;gd.prototype=w(ob.prototype,{getMbsType:function(){return gd.MBS_TYPE_INFO},allocateNew:function(){this.setAddress(this.data.allocate(gd.MBS_TYPE_INFO.getSize()))},getName:function(){return this.data.readString(this.address+gd.$name.address)},setName:function(a){this.data.writeString(this.address+gd.$name.address,a)},getParent:function(){return this.data.readString(this.address+gd.parent.address)},setParent:function(a){this.data.writeString(this.address+
gd.parent.address,a)},getFieldsPointer:function(){return this.data.readInt(this.address+gd.fieldsPointer.address)},setFieldsPointer:function(a){this.data.writeInt(this.address+gd.fieldsPointer.address,a)},getSize:function(){return this.data.readInt(this.address+gd.size.address)},setSize:function(a){this.data.writeInt(this.address+gd.size.address,a)},__class__:gd});var ud=function(a){this.data=a};h["mbs.core.header.MbsFieldInfo"]=ud;ud.__name__="mbs.core.header.MbsFieldInfo";ud.initializeType=function(){null==
ud.MBS_FIELD_INFO&&(ud.MBS_FIELD_INFO=new Ib("MbsFieldInfo"),ud.MBS_FIELD_INFO.setInstantiator(function(a){return new ud(a)}),ud.$name=ud.MBS_FIELD_INFO.createField("name",M.STRING),ud.type=ud.MBS_FIELD_INFO.createField("type",M.STRING),ud.fieldAddress=ud.MBS_FIELD_INFO.createField("fieldAddress",M.INTEGER))};ud.new_MbsFieldInfo_list=function(a){return new eb(a,ud.MBS_FIELD_INFO,new ud(a))};ud.__super__=ob;ud.prototype=w(ob.prototype,{getMbsType:function(){return ud.MBS_FIELD_INFO},allocateNew:function(){this.setAddress(this.data.allocate(ud.MBS_FIELD_INFO.getSize()))},
getName:function(){return this.data.readString(this.address+ud.$name.address)},setName:function(a){this.data.writeString(this.address+ud.$name.address,a)},getType:function(){return this.data.readString(this.address+ud.type.address)},setType:function(a){this.data.writeString(this.address+ud.type.address,a)},getFieldAddress:function(){return this.data.readInt(this.address+ud.fieldAddress.address)},setFieldAddress:function(a){this.data.writeInt(this.address+ud.fieldAddress.address,a)},__class__:ud});
var Ii=function(){this.types=Ii.basicTypes.slice();this.typecodes=new Aa;this.addTypes();for(var a=0,b=0,c=this.types;b<c.length;){var d=c[b];++b;this.typecodes.set(d,a++)}};h["mbs.core.MbsTypedefSet"]=Ii;Ii.__name__="mbs.core.MbsTypedefSet";Ii.prototype={types:null,typecodes:null,getTypes:function(){return this.types},addTypes:function(){},getHash:function(){return 0},getTypecode:function(a){return this.typecodes.h[a.__id__]},getType:function(a){return this.types[a]},__class__:Ii};var Qf=function(){Ii.call(this)};
h["com.stencyl.io.mbs.Typedefs"]=Qf;Qf.__name__="com.stencyl.io.mbs.Typedefs";Qf.get=function(){null==Qf.instance&&(Qf.instance=new Qf);return Qf.instance};Qf.__super__=Ii;Qf.prototype=w(Ii.prototype,{addTypes:function(){kb.initializeType();this.types.push(kb.MBS_RESOURCE);vb.initializeType();this.types.push(vb.MBS_BACKGROUND);Mb.initializeType();this.types.push(Mb.MBS_CUSTOM_BLOCK);Hd.initializeType();this.types.push(Hd.MBS_BLANK);sc.initializeType();this.types.push(sc.MBS_FONT);Ec.initializeType();
this.types.push(Ec.MBS_MUSIC);Oa.initializeType();this.types.push(Oa.MBS_ACTOR_TYPE);lc.initializeType();this.types.push(lc.MBS_SPRITE);pb.initializeType();this.types.push(pb.MBS_ANIMATION);Ub.initializeType();this.types.push(Ub.MBS_ANIM_SHAPE);yc.initializeType();this.types.push(yc.MBS_GAME);$c.initializeType();this.types.push($c.MBS_ATLAS);Yd.initializeType();this.types.push(Yd.MBS_COLLISION_SHAPE);Zd.initializeType();this.types.push(Zd.MBS_COLLISION_GROUP);$d.initializeType();this.types.push($d.MBS_COLLISION_PAIR);
md.initializeType();this.types.push(md.MBS_SCENE_HEADER);ec.initializeType();this.types.push(ec.MBS_TILESET);Rb.initializeType();this.types.push(Rb.MBS_TILE);xa.initializeType();this.types.push(xa.MBS_SCENE);lb.initializeType();this.types.push(lb.MBS_ACTOR_INSTANCE);Fe.initializeType();this.types.push(Fe.MBS_COLOR_BACKGROUND);ae.initializeType();this.types.push(ae.MBS_GRADIENT_BACKGROUND);yb.initializeType();this.types.push(yb.MBS_LAYER);re.initializeType();this.types.push(re.MBS_INTERACTIVE_LAYER);
Pd.initializeType();this.types.push(Pd.MBS_IMAGE_BACKGROUND);Vb.initializeType();this.types.push(Vb.MBS_JOINT);Qd.initializeType();this.types.push(Qd.MBS_STICK_JOINT);ic.initializeType();this.types.push(ic.MBS_HINGE_JOINT);Wb.initializeType();this.types.push(Wb.MBS_SLIDING_JOINT);hc.initializeType();this.types.push(hc.MBS_REGION);we.initializeType();this.types.push(we.MBS_TERRAIN_REGION);wc.initializeType();this.types.push(wc.MBS_POINT);je.initializeType();this.types.push(je.MBS_SHAPE);ie.initializeType();
this.types.push(ie.MBS_CIRCLE);kd.initializeType();this.types.push(kd.MBS_POLYGON);Rd.initializeType();this.types.push(Rd.MBS_POLY_REGION);Ge.initializeType();this.types.push(Ge.MBS_WIREFRAME);qb.initializeType();this.types.push(qb.MBS_SNIPPET_DEF);Nb.initializeType();this.types.push(Nb.MBS_ATTRIBUTE_DEF);nd.initializeType();this.types.push(nd.MBS_BLOCK);mc.initializeType();this.types.push(mc.MBS_EVENT);Oc.initializeType();this.types.push(Oc.MBS_SNIPPET);od.initializeType();this.types.push(od.MBS_ATTRIBUTE);
Sd.initializeType();this.types.push(Sd.MBS_MAP_ELEMENT);nc.initializeType();this.types.push(nc.MBS_AUTOTILE_FORMAT);vd.initializeType();this.types.push(vd.MBS_CORNERS)},getHash:function(){return-2033963926},__class__:Qf});var Oa=function(a){this.data=a;this._snippets=new eb(a,Oc.MBS_SNIPPET,new Oc(a))};h["com.stencyl.io.mbs.actortype.MbsActorType"]=Oa;Oa.__name__="com.stencyl.io.mbs.actortype.MbsActorType";Oa.initializeType=function(){null==Oa.MBS_ACTOR_TYPE&&(kb.initializeType(),Oa.MBS_ACTOR_TYPE=
new Ib("MbsActorType"),Oa.MBS_ACTOR_TYPE.setInstantiator(function(a){return new Oa(a)}),Oa.MBS_ACTOR_TYPE.inherit(kb.MBS_RESOURCE),Oa.angularDamping=Oa.MBS_ACTOR_TYPE.createField("angularDamping",M.FLOAT),Oa.autoScale=Oa.MBS_ACTOR_TYPE.createField("autoScale",M.BOOLEAN),Oa.bodyType=Oa.MBS_ACTOR_TYPE.createField("bodyType",M.INTEGER),Oa.continuous=Oa.MBS_ACTOR_TYPE.createField("continuous",M.BOOLEAN),Oa.eventSnippetID=Oa.MBS_ACTOR_TYPE.createField("eventSnippetID",M.INTEGER),Oa.fixedRotation=Oa.MBS_ACTOR_TYPE.createField("fixedRotation",
M.BOOLEAN),Oa.friction=Oa.MBS_ACTOR_TYPE.createField("friction",M.FLOAT),Oa.groupID=Oa.MBS_ACTOR_TYPE.createField("groupID",M.INTEGER),Oa.ignoreGravity=Oa.MBS_ACTOR_TYPE.createField("ignoreGravity",M.BOOLEAN),Oa.inertia=Oa.MBS_ACTOR_TYPE.createField("inertia",M.FLOAT),Oa.linearDamping=Oa.MBS_ACTOR_TYPE.createField("linearDamping",M.FLOAT),Oa.mass=Oa.MBS_ACTOR_TYPE.createField("mass",M.FLOAT),Oa.pausable=Oa.MBS_ACTOR_TYPE.createField("pausable",M.BOOLEAN),Oa.physicsMode=Oa.MBS_ACTOR_TYPE.createField("physicsMode",
M.INTEGER),Oa.restitution=Oa.MBS_ACTOR_TYPE.createField("restitution",M.FLOAT),Oa.sprite=Oa.MBS_ACTOR_TYPE.createField("sprite",M.INTEGER),Oa.isStatic=Oa.MBS_ACTOR_TYPE.createField("isStatic",M.BOOLEAN),Oa.snippets=Oa.MBS_ACTOR_TYPE.createField("snippets",M.LIST))};Oa.new_MbsActorType_list=function(a){return new eb(a,Oa.MBS_ACTOR_TYPE,new Oa(a))};Oa.__super__=kb;Oa.prototype=w(kb.prototype,{getMbsType:function(){return Oa.MBS_ACTOR_TYPE},_snippets:null,allocateNew:function(){this.setAddress(this.data.allocate(Oa.MBS_ACTOR_TYPE.getSize()))},
getAngularDamping:function(){return this.data.readFloat(this.address+Oa.angularDamping.address)},setAngularDamping:function(a){this.data.writeFloat(this.address+Oa.angularDamping.address,a)},getAutoScale:function(){return this.data.readBool(this.address+Oa.autoScale.address)},setAutoScale:function(a){this.data.writeBool(this.address+Oa.autoScale.address,a)},getBodyType:function(){return this.data.readInt(this.address+Oa.bodyType.address)},setBodyType:function(a){this.data.writeInt(this.address+Oa.bodyType.address,
a)},getContinuous:function(){return this.data.readBool(this.address+Oa.continuous.address)},setContinuous:function(a){this.data.writeBool(this.address+Oa.continuous.address,a)},getEventSnippetID:function(){return this.data.readInt(this.address+Oa.eventSnippetID.address)},setEventSnippetID:function(a){this.data.writeInt(this.address+Oa.eventSnippetID.address,a)},getFixedRotation:function(){return this.data.readBool(this.address+Oa.fixedRotation.address)},setFixedRotation:function(a){this.data.writeBool(this.address+
Oa.fixedRotation.address,a)},getFriction:function(){return this.data.readFloat(this.address+Oa.friction.address)},setFriction:function(a){this.data.writeFloat(this.address+Oa.friction.address,a)},getGroupID:function(){return this.data.readInt(this.address+Oa.groupID.address)},setGroupID:function(a){this.data.writeInt(this.address+Oa.groupID.address,a)},getIgnoreGravity:function(){return this.data.readBool(this.address+Oa.ignoreGravity.address)},setIgnoreGravity:function(a){this.data.writeBool(this.address+
Oa.ignoreGravity.address,a)},getInertia:function(){return this.data.readFloat(this.address+Oa.inertia.address)},setInertia:function(a){this.data.writeFloat(this.address+Oa.inertia.address,a)},getLinearDamping:function(){return this.data.readFloat(this.address+Oa.linearDamping.address)},setLinearDamping:function(a){this.data.writeFloat(this.address+Oa.linearDamping.address,a)},getMass:function(){return this.data.readFloat(this.address+Oa.mass.address)},setMass:function(a){this.data.writeFloat(this.address+
Oa.mass.address,a)},getPausable:function(){return this.data.readBool(this.address+Oa.pausable.address)},setPausable:function(a){this.data.writeBool(this.address+Oa.pausable.address,a)},getPhysicsMode:function(){return this.data.readInt(this.address+Oa.physicsMode.address)},setPhysicsMode:function(a){this.data.writeInt(this.address+Oa.physicsMode.address,a)},getRestitution:function(){return this.data.readFloat(this.address+Oa.restitution.address)},setRestitution:function(a){this.data.writeFloat(this.address+
Oa.restitution.address,a)},getSprite:function(){return this.data.readInt(this.address+Oa.sprite.address)},setSprite:function(a){this.data.writeInt(this.address+Oa.sprite.address,a)},getIsStatic:function(){return this.data.readBool(this.address+Oa.isStatic.address)},setIsStatic:function(a){this.data.writeBool(this.address+Oa.isStatic.address,a)},getSnippets:function(){this._snippets.setAddress(this.data.readInt(this.address+Oa.snippets.address));return this._snippets},createSnippets:function(a){this._snippets.allocateNew(a);
this.data.writeInt(this.address+Oa.snippets.address,this._snippets.getAddress());return this._snippets},__class__:Oa});var Ub=function(a){this.data=a};h["com.stencyl.io.mbs.actortype.MbsAnimShape"]=Ub;Ub.__name__="com.stencyl.io.mbs.actortype.MbsAnimShape";Ub.initializeType=function(){null==Ub.MBS_ANIM_SHAPE&&(Ub.MBS_ANIM_SHAPE=new Ib("MbsAnimShape"),Ub.MBS_ANIM_SHAPE.setInstantiator(function(a){return new Ub(a)}),Ub.shape=Ub.MBS_ANIM_SHAPE.createField("shape",M.DYNAMIC),Ub.density=Ub.MBS_ANIM_SHAPE.createField("density",
M.FLOAT),Ub.friction=Ub.MBS_ANIM_SHAPE.createField("friction",M.FLOAT),Ub.groupID=Ub.MBS_ANIM_SHAPE.createField("groupID",M.INTEGER),Ub.id=Ub.MBS_ANIM_SHAPE.createField("id",M.INTEGER),Ub.$name=Ub.MBS_ANIM_SHAPE.createField("name",M.STRING),Ub.restitution=Ub.MBS_ANIM_SHAPE.createField("restitution",M.FLOAT),Ub.sensor=Ub.MBS_ANIM_SHAPE.createField("sensor",M.BOOLEAN))};Ub.new_MbsAnimShape_list=function(a){return new eb(a,Ub.MBS_ANIM_SHAPE,new Ub(a))};Ub.__super__=ob;Ub.prototype=w(ob.prototype,{getMbsType:function(){return Ub.MBS_ANIM_SHAPE},
allocateNew:function(){this.setAddress(this.data.allocate(Ub.MBS_ANIM_SHAPE.getSize()))},getShape:function(){return Ee.readDynamic(this.data,this.address+Ub.shape.address)},setShape:function(a){Ee.writeDynamic(this.data,this.address+Ub.shape.address,a)},getDensity:function(){return this.data.readFloat(this.address+Ub.density.address)},setDensity:function(a){this.data.writeFloat(this.address+Ub.density.address,a)},getFriction:function(){return this.data.readFloat(this.address+Ub.friction.address)},
setFriction:function(a){this.data.writeFloat(this.address+Ub.friction.address,a)},getGroupID:function(){return this.data.readInt(this.address+Ub.groupID.address)},setGroupID:function(a){this.data.writeInt(this.address+Ub.groupID.address,a)},getId:function(){return this.data.readInt(this.address+Ub.id.address)},setId:function(a){this.data.writeInt(this.address+Ub.id.address,a)},getName:function(){return this.data.readString(this.address+Ub.$name.address)},setName:function(a){this.data.writeString(this.address+
Ub.$name.address,a)},getRestitution:function(){return this.data.readFloat(this.address+Ub.restitution.address)},setRestitution:function(a){this.data.writeFloat(this.address+Ub.restitution.address,a)},getSensor:function(){return this.data.readBool(this.address+Ub.sensor.address)},setSensor:function(a){this.data.writeBool(this.address+Ub.sensor.address,a)},__class__:Ub});var pb=function(a){this.data=a;this._durations=new mg(a);this._shapes=new eb(a,Ub.MBS_ANIM_SHAPE,new Ub(a))};h["com.stencyl.io.mbs.actortype.MbsAnimation"]=
pb;pb.__name__="com.stencyl.io.mbs.actortype.MbsAnimation";pb.initializeType=function(){null==pb.MBS_ANIMATION&&(pb.MBS_ANIMATION=new Ib("MbsAnimation"),pb.MBS_ANIMATION.setInstantiator(function(a){return new pb(a)}),pb.across=pb.MBS_ANIMATION.createField("across",M.INTEGER),pb.down=pb.MBS_ANIMATION.createField("down",M.INTEGER),pb.durations=pb.MBS_ANIMATION.createField("durations",M.LIST),pb.height=pb.MBS_ANIMATION.createField("height",M.INTEGER),pb.id=pb.MBS_ANIMATION.createField("id",M.INTEGER),
pb.loop=pb.MBS_ANIMATION.createField("loop",M.BOOLEAN),pb.$name=pb.MBS_ANIMATION.createField("name",M.STRING),pb.numFrames=pb.MBS_ANIMATION.createField("numFrames",M.INTEGER),pb.originX=pb.MBS_ANIMATION.createField("originX",M.INTEGER),pb.originY=pb.MBS_ANIMATION.createField("originY",M.INTEGER),pb.sync=pb.MBS_ANIMATION.createField("sync",M.BOOLEAN),pb.version=pb.MBS_ANIMATION.createField("version",M.INTEGER),pb.width=pb.MBS_ANIMATION.createField("width",M.INTEGER),pb.shapes=pb.MBS_ANIMATION.createField("shapes",
M.LIST))};pb.new_MbsAnimation_list=function(a){return new eb(a,pb.MBS_ANIMATION,new pb(a))};pb.__super__=ob;pb.prototype=w(ob.prototype,{getMbsType:function(){return pb.MBS_ANIMATION},_durations:null,_shapes:null,allocateNew:function(){this.setAddress(this.data.allocate(pb.MBS_ANIMATION.getSize()))},getAcross:function(){return this.data.readInt(this.address+pb.across.address)},setAcross:function(a){this.data.writeInt(this.address+pb.across.address,a)},getDown:function(){return this.data.readInt(this.address+
pb.down.address)},setDown:function(a){this.data.writeInt(this.address+pb.down.address,a)},getDurations:function(){this._durations.setAddress(this.data.readInt(this.address+pb.durations.address));return this._durations},createDurations:function(a){this._durations.allocateNew(a);this.data.writeInt(this.address+pb.durations.address,this._durations.getAddress());return this._durations},getHeight:function(){return this.data.readInt(this.address+pb.height.address)},setHeight:function(a){this.data.writeInt(this.address+
pb.height.address,a)},getId:function(){return this.data.readInt(this.address+pb.id.address)},setId:function(a){this.data.writeInt(this.address+pb.id.address,a)},getLoop:function(){return this.data.readBool(this.address+pb.loop.address)},setLoop:function(a){this.data.writeBool(this.address+pb.loop.address,a)},getName:function(){return this.data.readString(this.address+pb.$name.address)},setName:function(a){this.data.writeString(this.address+pb.$name.address,a)},getNumFrames:function(){return this.data.readInt(this.address+
pb.numFrames.address)},setNumFrames:function(a){this.data.writeInt(this.address+pb.numFrames.address,a)},getOriginX:function(){return this.data.readInt(this.address+pb.originX.address)},setOriginX:function(a){this.data.writeInt(this.address+pb.originX.address,a)},getOriginY:function(){return this.data.readInt(this.address+pb.originY.address)},setOriginY:function(a){this.data.writeInt(this.address+pb.originY.address,a)},getSync:function(){return this.data.readBool(this.address+pb.sync.address)},setSync:function(a){this.data.writeBool(this.address+
pb.sync.address,a)},getVersion:function(){return this.data.readInt(this.address+pb.version.address)},setVersion:function(a){this.data.writeInt(this.address+pb.version.address,a)},getWidth:function(){return this.data.readInt(this.address+pb.width.address)},setWidth:function(a){this.data.writeInt(this.address+pb.width.address,a)},getShapes:function(){this._shapes.setAddress(this.data.readInt(this.address+pb.shapes.address));return this._shapes},createShapes:function(a){this._shapes.allocateNew(a);this.data.writeInt(this.address+
pb.shapes.address,this._shapes.getAddress());return this._shapes},__class__:pb});var lc=function(a){this.data=a;this._animations=new eb(a,pb.MBS_ANIMATION,new pb(a))};h["com.stencyl.io.mbs.actortype.MbsSprite"]=lc;lc.__name__="com.stencyl.io.mbs.actortype.MbsSprite";lc.initializeType=function(){null==lc.MBS_SPRITE&&(kb.initializeType(),lc.MBS_SPRITE=new Ib("MbsSprite"),lc.MBS_SPRITE.setInstantiator(function(a){return new lc(a)}),lc.MBS_SPRITE.inherit(kb.MBS_RESOURCE),lc.defaultAnimation=lc.MBS_SPRITE.createField("defaultAnimation",
M.INTEGER),lc.readableImages=lc.MBS_SPRITE.createField("readableImages",M.BOOLEAN),lc.height=lc.MBS_SPRITE.createField("height",M.INTEGER),lc.width=lc.MBS_SPRITE.createField("width",M.INTEGER),lc.animations=lc.MBS_SPRITE.createField("animations",M.LIST))};lc.new_MbsSprite_list=function(a){return new eb(a,lc.MBS_SPRITE,new lc(a))};lc.__super__=kb;lc.prototype=w(kb.prototype,{getMbsType:function(){return lc.MBS_SPRITE},_animations:null,allocateNew:function(){this.setAddress(this.data.allocate(lc.MBS_SPRITE.getSize()))},
getDefaultAnimation:function(){return this.data.readInt(this.address+lc.defaultAnimation.address)},setDefaultAnimation:function(a){this.data.writeInt(this.address+lc.defaultAnimation.address,a)},getReadableImages:function(){return this.data.readBool(this.address+lc.readableImages.address)},setReadableImages:function(a){this.data.writeBool(this.address+lc.readableImages.address,a)},getHeight:function(){return this.data.readInt(this.address+lc.height.address)},setHeight:function(a){this.data.writeInt(this.address+
lc.height.address,a)},getWidth:function(){return this.data.readInt(this.address+lc.width.address)},setWidth:function(a){this.data.writeInt(this.address+lc.width.address,a)},getAnimations:function(){this._animations.setAddress(this.data.readInt(this.address+lc.animations.address));return this._animations},createAnimations:function(a){this._animations.allocateNew(a);this.data.writeInt(this.address+lc.animations.address,this._animations.getAddress());return this._animations},__class__:lc});var $c=function(a){this.data=
a;this._members=new mg(a)};h["com.stencyl.io.mbs.game.MbsAtlas"]=$c;$c.__name__="com.stencyl.io.mbs.game.MbsAtlas";$c.initializeType=function(){null==$c.MBS_ATLAS&&($c.MBS_ATLAS=new Ib("MbsAtlas"),$c.MBS_ATLAS.setInstantiator(function(a){return new $c(a)}),$c.id=$c.MBS_ATLAS.createField("id",M.INTEGER),$c.$name=$c.MBS_ATLAS.createField("name",M.STRING),$c.members=$c.MBS_ATLAS.createField("members",M.LIST),$c.allScenes=$c.MBS_ATLAS.createField("allScenes",M.BOOLEAN))};$c.new_MbsAtlas_list=function(a){return new eb(a,
$c.MBS_ATLAS,new $c(a))};$c.__super__=ob;$c.prototype=w(ob.prototype,{getMbsType:function(){return $c.MBS_ATLAS},_members:null,allocateNew:function(){this.setAddress(this.data.allocate($c.MBS_ATLAS.getSize()))},getId:function(){return this.data.readInt(this.address+$c.id.address)},setId:function(a){this.data.writeInt(this.address+$c.id.address,a)},getName:function(){return this.data.readString(this.address+$c.$name.address)},setName:function(a){this.data.writeString(this.address+$c.$name.address,
a)},getMembers:function(){this._members.setAddress(this.data.readInt(this.address+$c.members.address));return this._members},createMembers:function(a){this._members.allocateNew(a);this.data.writeInt(this.address+$c.members.address,this._members.getAddress());return this._members},getAllScenes:function(){return this.data.readBool(this.address+$c.allScenes.address)},setAllScenes:function(a){this.data.writeBool(this.address+$c.allScenes.address,a)},__class__:$c});var Zd=function(a){this.data=a};h["com.stencyl.io.mbs.game.MbsCollisionGroup"]=
Zd;Zd.__name__="com.stencyl.io.mbs.game.MbsCollisionGroup";Zd.initializeType=function(){null==Zd.MBS_COLLISION_GROUP&&(Zd.MBS_COLLISION_GROUP=new Ib("MbsCollisionGroup"),Zd.MBS_COLLISION_GROUP.setInstantiator(function(a){return new Zd(a)}),Zd.id=Zd.MBS_COLLISION_GROUP.createField("id",M.INTEGER),Zd.$name=Zd.MBS_COLLISION_GROUP.createField("name",M.STRING))};Zd.new_MbsCollisionGroup_list=function(a){return new eb(a,Zd.MBS_COLLISION_GROUP,new Zd(a))};Zd.__super__=ob;Zd.prototype=w(ob.prototype,{getMbsType:function(){return Zd.MBS_COLLISION_GROUP},
allocateNew:function(){this.setAddress(this.data.allocate(Zd.MBS_COLLISION_GROUP.getSize()))},getId:function(){return this.data.readInt(this.address+Zd.id.address)},setId:function(a){this.data.writeInt(this.address+Zd.id.address,a)},getName:function(){return this.data.readString(this.address+Zd.$name.address)},setName:function(a){this.data.writeString(this.address+Zd.$name.address,a)},__class__:Zd});var $d=function(a){this.data=a};h["com.stencyl.io.mbs.game.MbsCollisionPair"]=$d;$d.__name__="com.stencyl.io.mbs.game.MbsCollisionPair";
$d.initializeType=function(){null==$d.MBS_COLLISION_PAIR&&($d.MBS_COLLISION_PAIR=new Ib("MbsCollisionPair"),$d.MBS_COLLISION_PAIR.setInstantiator(function(a){return new $d(a)}),$d.group1=$d.MBS_COLLISION_PAIR.createField("group1",M.INTEGER),$d.group2=$d.MBS_COLLISION_PAIR.createField("group2",M.INTEGER))};$d.new_MbsCollisionPair_list=function(a){return new eb(a,$d.MBS_COLLISION_PAIR,new $d(a))};$d.__super__=ob;$d.prototype=w(ob.prototype,{getMbsType:function(){return $d.MBS_COLLISION_PAIR},allocateNew:function(){this.setAddress(this.data.allocate($d.MBS_COLLISION_PAIR.getSize()))},
getGroup1:function(){return this.data.readInt(this.address+$d.group1.address)},setGroup1:function(a){this.data.writeInt(this.address+$d.group1.address,a)},getGroup2:function(){return this.data.readInt(this.address+$d.group2.address)},setGroup2:function(a){this.data.writeInt(this.address+$d.group2.address,a)},__class__:$d});var Yd=function(a){this.data=a;this._points=new eb(a,wc.MBS_POINT,new wc(a))};h["com.stencyl.io.mbs.game.MbsCollisionShape"]=Yd;Yd.__name__="com.stencyl.io.mbs.game.MbsCollisionShape";
Yd.initializeType=function(){null==Yd.MBS_COLLISION_SHAPE&&(Yd.MBS_COLLISION_SHAPE=new Ib("MbsCollisionShape"),Yd.MBS_COLLISION_SHAPE.setInstantiator(function(a){return new Yd(a)}),Yd.id=Yd.MBS_COLLISION_SHAPE.createField("id",M.INTEGER),Yd.points=Yd.MBS_COLLISION_SHAPE.createField("points",M.LIST))};Yd.new_MbsCollisionShape_list=function(a){return new eb(a,Yd.MBS_COLLISION_SHAPE,new Yd(a))};Yd.__super__=ob;Yd.prototype=w(ob.prototype,{getMbsType:function(){return Yd.MBS_COLLISION_SHAPE},_points:null,
allocateNew:function(){this.setAddress(this.data.allocate(Yd.MBS_COLLISION_SHAPE.getSize()))},getId:function(){return this.data.readInt(this.address+Yd.id.address)},setId:function(a){this.data.writeInt(this.address+Yd.id.address,a)},getPoints:function(){this._points.setAddress(this.data.readInt(this.address+Yd.points.address));return this._points},createPoints:function(a){this._points.allocateNew(a);this.data.writeInt(this.address+Yd.points.address,this._points.getAddress());return this._points},
__class__:Yd});var yc=function(a){this.data=a;this._shapes=new eb(a,Yd.MBS_COLLISION_SHAPE,new Yd(a));this._atlases=new eb(a,$c.MBS_ATLAS,new $c(a));this._autotileFormats=new eb(a,nc.MBS_AUTOTILE_FORMAT,new nc(a));this._groups=new eb(a,Zd.MBS_COLLISION_GROUP,new Zd(a));this._cgroups=new eb(a,$d.MBS_COLLISION_PAIR,new $d(a));this._gameAttributes=new eb(a,Sd.MBS_MAP_ELEMENT,new Sd(a))};h["com.stencyl.io.mbs.game.MbsGame"]=yc;yc.__name__="com.stencyl.io.mbs.game.MbsGame";yc.initializeType=function(){null==
yc.MBS_GAME&&(yc.MBS_GAME=new Ib("MbsGame"),yc.MBS_GAME.setInstantiator(function(a){return new yc(a)}),yc.shapes=yc.MBS_GAME.createField("shapes",M.LIST),yc.atlases=yc.MBS_GAME.createField("atlases",M.LIST),yc.autotileFormats=yc.MBS_GAME.createField("autotileFormats",M.LIST),yc.groups=yc.MBS_GAME.createField("groups",M.LIST),yc.cgroups=yc.MBS_GAME.createField("cgroups",M.LIST),yc.gameAttributes=yc.MBS_GAME.createField("gameAttributes",M.LIST))};yc.new_MbsGame_list=function(a){return new eb(a,yc.MBS_GAME,
new yc(a))};yc.__super__=ob;yc.prototype=w(ob.prototype,{getMbsType:function(){return yc.MBS_GAME},_shapes:null,_atlases:null,_autotileFormats:null,_groups:null,_cgroups:null,_gameAttributes:null,allocateNew:function(){this.setAddress(this.data.allocate(yc.MBS_GAME.getSize()))},getShapes:function(){this._shapes.setAddress(this.data.readInt(this.address+yc.shapes.address));return this._shapes},createShapes:function(a){this._shapes.allocateNew(a);this.data.writeInt(this.address+yc.shapes.address,this._shapes.getAddress());
return this._shapes},getAtlases:function(){this._atlases.setAddress(this.data.readInt(this.address+yc.atlases.address));return this._atlases},createAtlases:function(a){this._atlases.allocateNew(a);this.data.writeInt(this.address+yc.atlases.address,this._atlases.getAddress());return this._atlases},getAutotileFormats:function(){this._autotileFormats.setAddress(this.data.readInt(this.address+yc.autotileFormats.address));return this._autotileFormats},createAutotileFormats:function(a){this._autotileFormats.allocateNew(a);
this.data.writeInt(this.address+yc.autotileFormats.address,this._autotileFormats.getAddress());return this._autotileFormats},getGroups:function(){this._groups.setAddress(this.data.readInt(this.address+yc.groups.address));return this._groups},createGroups:function(a){this._groups.allocateNew(a);this.data.writeInt(this.address+yc.groups.address,this._groups.getAddress());return this._groups},getCgroups:function(){this._cgroups.setAddress(this.data.readInt(this.address+yc.cgroups.address));return this._cgroups},
createCgroups:function(a){this._cgroups.allocateNew(a);this.data.writeInt(this.address+yc.cgroups.address,this._cgroups.getAddress());return this._cgroups},getGameAttributes:function(){this._gameAttributes.setAddress(this.data.readInt(this.address+yc.gameAttributes.address));return this._gameAttributes},createGameAttributes:function(a){this._gameAttributes.allocateNew(a);this.data.writeInt(this.address+yc.gameAttributes.address,this._gameAttributes.getAddress());return this._gameAttributes},__class__:yc});
var nc=function(a){this.data=a;this._corners=new eb(a,vd.MBS_CORNERS,new vd(a));this._flags=new mg(a)};h["com.stencyl.io.mbs.game.autotile.MbsAutotileFormat"]=nc;nc.__name__="com.stencyl.io.mbs.game.autotile.MbsAutotileFormat";nc.initializeType=function(){null==nc.MBS_AUTOTILE_FORMAT&&(nc.MBS_AUTOTILE_FORMAT=new Ib("MbsAutotileFormat"),nc.MBS_AUTOTILE_FORMAT.setInstantiator(function(a){return new nc(a)}),nc.id=nc.MBS_AUTOTILE_FORMAT.createField("id",M.INTEGER),nc.$name=nc.MBS_AUTOTILE_FORMAT.createField("name",
M.STRING),nc.across=nc.MBS_AUTOTILE_FORMAT.createField("across",M.INTEGER),nc.down=nc.MBS_AUTOTILE_FORMAT.createField("down",M.INTEGER),nc.corners=nc.MBS_AUTOTILE_FORMAT.createField("corners",M.LIST),nc.flags=nc.MBS_AUTOTILE_FORMAT.createField("flags",M.LIST))};nc.new_MbsAutotileFormat_list=function(a){return new eb(a,nc.MBS_AUTOTILE_FORMAT,new nc(a))};nc.__super__=ob;nc.prototype=w(ob.prototype,{getMbsType:function(){return nc.MBS_AUTOTILE_FORMAT},_corners:null,_flags:null,allocateNew:function(){this.setAddress(this.data.allocate(nc.MBS_AUTOTILE_FORMAT.getSize()))},
getId:function(){return this.data.readInt(this.address+nc.id.address)},setId:function(a){this.data.writeInt(this.address+nc.id.address,a)},getName:function(){return this.data.readString(this.address+nc.$name.address)},setName:function(a){this.data.writeString(this.address+nc.$name.address,a)},getAcross:function(){return this.data.readInt(this.address+nc.across.address)},setAcross:function(a){this.data.writeInt(this.address+nc.across.address,a)},getDown:function(){return this.data.readInt(this.address+
nc.down.address)},setDown:function(a){this.data.writeInt(this.address+nc.down.address,a)},getCorners:function(){this._corners.setAddress(this.data.readInt(this.address+nc.corners.address));return this._corners},createCorners:function(a){this._corners.allocateNew(a);this.data.writeInt(this.address+nc.corners.address,this._corners.getAddress());return this._corners},getFlags:function(){this._flags.setAddress(this.data.readInt(this.address+nc.flags.address));return this._flags},createFlags:function(a){this._flags.allocateNew(a);
this.data.writeInt(this.address+nc.flags.address,this._flags.getAddress());return this._flags},__class__:nc});var vd=function(a){this.data=a;this._topLeft=new wc(a);this._topRight=new wc(a);this._bottomLeft=new wc(a);this._bottomRight=new wc(a)};h["com.stencyl.io.mbs.game.autotile.MbsCorners"]=vd;vd.__name__="com.stencyl.io.mbs.game.autotile.MbsCorners";vd.initializeType=function(){null==vd.MBS_CORNERS&&(vd.MBS_CORNERS=new Ib("MbsCorners"),vd.MBS_CORNERS.setInstantiator(function(a){return new vd(a)}),
vd.topLeft=vd.MBS_CORNERS.createField("topLeft",wc.MBS_POINT),vd.topRight=vd.MBS_CORNERS.createField("topRight",wc.MBS_POINT),vd.bottomLeft=vd.MBS_CORNERS.createField("bottomLeft",wc.MBS_POINT),vd.bottomRight=vd.MBS_CORNERS.createField("bottomRight",wc.MBS_POINT))};vd.new_MbsCorners_list=function(a){return new eb(a,vd.MBS_CORNERS,new vd(a))};vd.__super__=ob;vd.prototype=w(ob.prototype,{getMbsType:function(){return vd.MBS_CORNERS},_topLeft:null,_topRight:null,_bottomLeft:null,_bottomRight:null,allocateNew:function(){this.setAddress(this.data.allocate(vd.MBS_CORNERS.getSize()))},
getTopLeft:function(){this._topLeft.setAddress(this.address+vd.topLeft.address);return this._topLeft},getTopRight:function(){this._topRight.setAddress(this.address+vd.topRight.address);return this._topRight},getBottomLeft:function(){this._bottomLeft.setAddress(this.address+vd.bottomLeft.address);return this._bottomLeft},getBottomRight:function(){this._bottomRight.setAddress(this.address+vd.bottomRight.address);return this._bottomRight},__class__:vd});var lb=function(a){this.data=a;this._snippets=
new eb(a,Oc.MBS_SNIPPET,new Oc(a))};h["com.stencyl.io.mbs.scene.MbsActorInstance"]=lb;lb.__name__="com.stencyl.io.mbs.scene.MbsActorInstance";lb.initializeType=function(){null==lb.MBS_ACTOR_INSTANCE&&(lb.MBS_ACTOR_INSTANCE=new Ib("MbsActorInstance"),lb.MBS_ACTOR_INSTANCE.setInstantiator(function(a){return new lb(a)}),lb.angle=lb.MBS_ACTOR_INSTANCE.createField("angle",M.FLOAT),lb.aid=lb.MBS_ACTOR_INSTANCE.createField("aid",M.INTEGER),lb.customized=lb.MBS_ACTOR_INSTANCE.createField("customized",M.BOOLEAN),
lb.groupID=lb.MBS_ACTOR_INSTANCE.createField("groupID",M.INTEGER),lb.id=lb.MBS_ACTOR_INSTANCE.createField("id",M.INTEGER),lb.$name=lb.MBS_ACTOR_INSTANCE.createField("name",M.STRING),lb.scaleX=lb.MBS_ACTOR_INSTANCE.createField("scaleX",M.FLOAT),lb.scaleY=lb.MBS_ACTOR_INSTANCE.createField("scaleY",M.FLOAT),lb.x=lb.MBS_ACTOR_INSTANCE.createField("x",M.INTEGER),lb.y=lb.MBS_ACTOR_INSTANCE.createField("y",M.INTEGER),lb.z=lb.MBS_ACTOR_INSTANCE.createField("z",M.INTEGER),lb.orderInLayer=lb.MBS_ACTOR_INSTANCE.createField("orderInLayer",
M.INTEGER),lb.snippets=lb.MBS_ACTOR_INSTANCE.createField("snippets",M.LIST))};lb.new_MbsActorInstance_list=function(a){return new eb(a,lb.MBS_ACTOR_INSTANCE,new lb(a))};lb.__super__=ob;lb.prototype=w(ob.prototype,{getMbsType:function(){return lb.MBS_ACTOR_INSTANCE},_snippets:null,allocateNew:function(){this.setAddress(this.data.allocate(lb.MBS_ACTOR_INSTANCE.getSize()))},getAngle:function(){return this.data.readFloat(this.address+lb.angle.address)},setAngle:function(a){this.data.writeFloat(this.address+
lb.angle.address,a)},getAid:function(){return this.data.readInt(this.address+lb.aid.address)},setAid:function(a){this.data.writeInt(this.address+lb.aid.address,a)},getCustomized:function(){return this.data.readBool(this.address+lb.customized.address)},setCustomized:function(a){this.data.writeBool(this.address+lb.customized.address,a)},getGroupID:function(){return this.data.readInt(this.address+lb.groupID.address)},setGroupID:function(a){this.data.writeInt(this.address+lb.groupID.address,a)},getId:function(){return this.data.readInt(this.address+
lb.id.address)},setId:function(a){this.data.writeInt(this.address+lb.id.address,a)},getName:function(){return this.data.readString(this.address+lb.$name.address)},setName:function(a){this.data.writeString(this.address+lb.$name.address,a)},getScaleX:function(){return this.data.readFloat(this.address+lb.scaleX.address)},setScaleX:function(a){this.data.writeFloat(this.address+lb.scaleX.address,a)},getScaleY:function(){return this.data.readFloat(this.address+lb.scaleY.address)},setScaleY:function(a){this.data.writeFloat(this.address+
lb.scaleY.address,a)},getX:function(){return this.data.readInt(this.address+lb.x.address)},setX:function(a){this.data.writeInt(this.address+lb.x.address,a)},getY:function(){return this.data.readInt(this.address+lb.y.address)},setY:function(a){this.data.writeInt(this.address+lb.y.address,a)},getZ:function(){return this.data.readInt(this.address+lb.z.address)},setZ:function(a){this.data.writeInt(this.address+lb.z.address,a)},getOrderInLayer:function(){return this.data.readInt(this.address+lb.orderInLayer.address)},
setOrderInLayer:function(a){this.data.writeInt(this.address+lb.orderInLayer.address,a)},getSnippets:function(){this._snippets.setAddress(this.data.readInt(this.address+lb.snippets.address));return this._snippets},createSnippets:function(a){this._snippets.allocateNew(a);this.data.writeInt(this.address+lb.snippets.address,this._snippets.getAddress());return this._snippets},__class__:lb});var xa=function(a){this.data=a;this._actorInstances=new eb(a,lb.MBS_ACTOR_INSTANCE,new lb(a));this._atlasMembers=
new mg(a);this._layers=new bi(a);this._joints=new bi(a);this._regions=new eb(a,hc.MBS_REGION,new hc(a));this._snippets=new eb(a,Oc.MBS_SNIPPET,new Oc(a));this._terrain=new eb(a,Ge.MBS_WIREFRAME,new Ge(a));this._terrainRegions=new eb(a,we.MBS_TERRAIN_REGION,new we(a))};h["com.stencyl.io.mbs.scene.MbsScene"]=xa;xa.__name__="com.stencyl.io.mbs.scene.MbsScene";xa.initializeType=function(){null==xa.MBS_SCENE&&(xa.MBS_SCENE=new Ib("MbsScene"),xa.MBS_SCENE.setInstantiator(function(a){return new xa(a)}),
xa.retainAtlases=xa.MBS_SCENE.createField("retainAtlases",M.BOOLEAN),xa.depth=xa.MBS_SCENE.createField("depth",M.INTEGER),xa.description=xa.MBS_SCENE.createField("description",M.STRING),xa.eventSnippetID=xa.MBS_SCENE.createField("eventSnippetID",M.INTEGER),xa.extendedHeight=xa.MBS_SCENE.createField("extendedHeight",M.INTEGER),xa.extendedWidth=xa.MBS_SCENE.createField("extendedWidth",M.INTEGER),xa.extendedX=xa.MBS_SCENE.createField("extendedX",M.INTEGER),xa.extendedY=xa.MBS_SCENE.createField("extendedY",
M.INTEGER),xa.format=xa.MBS_SCENE.createField("format",M.STRING),xa.gravityX=xa.MBS_SCENE.createField("gravityX",M.FLOAT),xa.gravityY=xa.MBS_SCENE.createField("gravityY",M.FLOAT),xa.height=xa.MBS_SCENE.createField("height",M.INTEGER),xa.id=xa.MBS_SCENE.createField("id",M.INTEGER),xa.$name=xa.MBS_SCENE.createField("name",M.STRING),xa.revision=xa.MBS_SCENE.createField("revision",M.STRING),xa.savecount=xa.MBS_SCENE.createField("savecount",M.INTEGER),xa.tileDepth=xa.MBS_SCENE.createField("tileDepth",
M.INTEGER),xa.tileHeight=xa.MBS_SCENE.createField("tileHeight",M.INTEGER),xa.tileWidth=xa.MBS_SCENE.createField("tileWidth",M.INTEGER),xa.type=xa.MBS_SCENE.createField("type",M.STRING),xa.width=xa.MBS_SCENE.createField("width",M.INTEGER),xa.actorInstances=xa.MBS_SCENE.createField("actorInstances",M.LIST),xa.atlasMembers=xa.MBS_SCENE.createField("atlasMembers",M.LIST),xa.layers=xa.MBS_SCENE.createField("layers",M.LIST),xa.joints=xa.MBS_SCENE.createField("joints",M.LIST),xa.regions=xa.MBS_SCENE.createField("regions",
M.LIST),xa.snippets=xa.MBS_SCENE.createField("snippets",M.LIST),xa.terrain=xa.MBS_SCENE.createField("terrain",M.LIST),xa.terrainRegions=xa.MBS_SCENE.createField("terrainRegions",M.LIST))};xa.new_MbsScene_list=function(a){return new eb(a,xa.MBS_SCENE,new xa(a))};xa.__super__=ob;xa.prototype=w(ob.prototype,{getMbsType:function(){return xa.MBS_SCENE},_actorInstances:null,_atlasMembers:null,_layers:null,_joints:null,_regions:null,_snippets:null,_terrain:null,_terrainRegions:null,allocateNew:function(){this.setAddress(this.data.allocate(xa.MBS_SCENE.getSize()))},
getRetainAtlases:function(){return this.data.readBool(this.address+xa.retainAtlases.address)},setRetainAtlases:function(a){this.data.writeBool(this.address+xa.retainAtlases.address,a)},getDepth:function(){return this.data.readInt(this.address+xa.depth.address)},setDepth:function(a){this.data.writeInt(this.address+xa.depth.address,a)},getDescription:function(){return this.data.readString(this.address+xa.description.address)},setDescription:function(a){this.data.writeString(this.address+xa.description.address,
a)},getEventSnippetID:function(){return this.data.readInt(this.address+xa.eventSnippetID.address)},setEventSnippetID:function(a){this.data.writeInt(this.address+xa.eventSnippetID.address,a)},getExtendedHeight:function(){return this.data.readInt(this.address+xa.extendedHeight.address)},setExtendedHeight:function(a){this.data.writeInt(this.address+xa.extendedHeight.address,a)},getExtendedWidth:function(){return this.data.readInt(this.address+xa.extendedWidth.address)},setExtendedWidth:function(a){this.data.writeInt(this.address+
xa.extendedWidth.address,a)},getExtendedX:function(){return this.data.readInt(this.address+xa.extendedX.address)},setExtendedX:function(a){this.data.writeInt(this.address+xa.extendedX.address,a)},getExtendedY:function(){return this.data.readInt(this.address+xa.extendedY.address)},setExtendedY:function(a){this.data.writeInt(this.address+xa.extendedY.address,a)},getFormat:function(){return this.data.readString(this.address+xa.format.address)},setFormat:function(a){this.data.writeString(this.address+
xa.format.address,a)},getGravityX:function(){return this.data.readFloat(this.address+xa.gravityX.address)},setGravityX:function(a){this.data.writeFloat(this.address+xa.gravityX.address,a)},getGravityY:function(){return this.data.readFloat(this.address+xa.gravityY.address)},setGravityY:function(a){this.data.writeFloat(this.address+xa.gravityY.address,a)},getHeight:function(){return this.data.readInt(this.address+xa.height.address)},setHeight:function(a){this.data.writeInt(this.address+xa.height.address,
a)},getId:function(){return this.data.readInt(this.address+xa.id.address)},setId:function(a){this.data.writeInt(this.address+xa.id.address,a)},getName:function(){return this.data.readString(this.address+xa.$name.address)},setName:function(a){this.data.writeString(this.address+xa.$name.address,a)},getRevision:function(){return this.data.readString(this.address+xa.revision.address)},setRevision:function(a){this.data.writeString(this.address+xa.revision.address,a)},getSavecount:function(){return this.data.readInt(this.address+
xa.savecount.address)},setSavecount:function(a){this.data.writeInt(this.address+xa.savecount.address,a)},getTileDepth:function(){return this.data.readInt(this.address+xa.tileDepth.address)},setTileDepth:function(a){this.data.writeInt(this.address+xa.tileDepth.address,a)},getTileHeight:function(){return this.data.readInt(this.address+xa.tileHeight.address)},setTileHeight:function(a){this.data.writeInt(this.address+xa.tileHeight.address,a)},getTileWidth:function(){return this.data.readInt(this.address+
xa.tileWidth.address)},setTileWidth:function(a){this.data.writeInt(this.address+xa.tileWidth.address,a)},getType:function(){return this.data.readString(this.address+xa.type.address)},setType:function(a){this.data.writeString(this.address+xa.type.address,a)},getWidth:function(){return this.data.readInt(this.address+xa.width.address)},setWidth:function(a){this.data.writeInt(this.address+xa.width.address,a)},getActorInstances:function(){this._actorInstances.setAddress(this.data.readInt(this.address+
xa.actorInstances.address));return this._actorInstances},createActorInstances:function(a){this._actorInstances.allocateNew(a);this.data.writeInt(this.address+xa.actorInstances.address,this._actorInstances.getAddress());return this._actorInstances},getAtlasMembers:function(){this._atlasMembers.setAddress(this.data.readInt(this.address+xa.atlasMembers.address));return this._atlasMembers},createAtlasMembers:function(a){this._atlasMembers.allocateNew(a);this.data.writeInt(this.address+xa.atlasMembers.address,
this._atlasMembers.getAddress());return this._atlasMembers},getLayers:function(){this._layers.setAddress(this.data.readInt(this.address+xa.layers.address));return this._layers},createLayers:function(a){this._layers.allocateNew(a);this.data.writeInt(this.address+xa.layers.address,this._layers.getAddress());return this._layers},getJoints:function(){this._joints.setAddress(this.data.readInt(this.address+xa.joints.address));return this._joints},createJoints:function(a){this._joints.allocateNew(a);this.data.writeInt(this.address+
xa.joints.address,this._joints.getAddress());return this._joints},getRegions:function(){this._regions.setAddress(this.data.readInt(this.address+xa.regions.address));return this._regions},createRegions:function(a){this._regions.allocateNew(a);this.data.writeInt(this.address+xa.regions.address,this._regions.getAddress());return this._regions},getSnippets:function(){this._snippets.setAddress(this.data.readInt(this.address+xa.snippets.address));return this._snippets},createSnippets:function(a){this._snippets.allocateNew(a);
this.data.writeInt(this.address+xa.snippets.address,this._snippets.getAddress());return this._snippets},getTerrain:function(){this._terrain.setAddress(this.data.readInt(this.address+xa.terrain.address));return this._terrain},createTerrain:function(a){this._terrain.allocateNew(a);this.data.writeInt(this.address+xa.terrain.address,this._terrain.getAddress());return this._terrain},getTerrainRegions:function(){this._terrainRegions.setAddress(this.data.readInt(this.address+xa.terrainRegions.address));
return this._terrainRegions},createTerrainRegions:function(a){this._terrainRegions.allocateNew(a);this.data.writeInt(this.address+xa.terrainRegions.address,this._terrainRegions.getAddress());return this._terrainRegions},__class__:xa});var md=function(a){this.data=a};h["com.stencyl.io.mbs.scene.MbsSceneHeader"]=md;md.__name__="com.stencyl.io.mbs.scene.MbsSceneHeader";md.initializeType=function(){null==md.MBS_SCENE_HEADER&&(md.MBS_SCENE_HEADER=new Ib("MbsSceneHeader"),md.MBS_SCENE_HEADER.setInstantiator(function(a){return new md(a)}),
md.id=md.MBS_SCENE_HEADER.createField("id",M.INTEGER),md.$name=md.MBS_SCENE_HEADER.createField("name",M.STRING),md.description=md.MBS_SCENE_HEADER.createField("description",M.STRING),md.format=md.MBS_SCENE_HEADER.createField("format",M.STRING))};md.new_MbsSceneHeader_list=function(a){return new eb(a,md.MBS_SCENE_HEADER,new md(a))};md.__super__=ob;md.prototype=w(ob.prototype,{getMbsType:function(){return md.MBS_SCENE_HEADER},allocateNew:function(){this.setAddress(this.data.allocate(md.MBS_SCENE_HEADER.getSize()))},
getId:function(){return this.data.readInt(this.address+md.id.address)},setId:function(a){this.data.writeInt(this.address+md.id.address,a)},getName:function(){return this.data.readString(this.address+md.$name.address)},setName:function(a){this.data.writeString(this.address+md.$name.address,a)},getDescription:function(){return this.data.readString(this.address+md.description.address)},setDescription:function(a){this.data.writeString(this.address+md.description.address,a)},getFormat:function(){return this.data.readString(this.address+
md.format.address)},setFormat:function(a){this.data.writeString(this.address+md.format.address,a)},__class__:md});var Rb=function(a){this.data=a;this._durations=new mg(a);this._autotileMerge=new mg(a)};h["com.stencyl.io.mbs.scene.MbsTile"]=Rb;Rb.__name__="com.stencyl.io.mbs.scene.MbsTile";Rb.initializeType=function(){null==Rb.MBS_TILE&&(Rb.MBS_TILE=new Ib("MbsTile"),Rb.MBS_TILE.setInstantiator(function(a){return new Rb(a)}),Rb.collision=Rb.MBS_TILE.createField("collision",M.INTEGER),Rb.metadata=Rb.MBS_TILE.createField("metadata",
M.STRING),Rb.durations=Rb.MBS_TILE.createField("durations",M.LIST),Rb.frames=Rb.MBS_TILE.createField("frames",M.INTEGER),Rb.id=Rb.MBS_TILE.createField("id",M.INTEGER),Rb.order=Rb.MBS_TILE.createField("order",M.INTEGER),Rb.autotile=Rb.MBS_TILE.createField("autotile",M.INTEGER),Rb.autotileMerge=Rb.MBS_TILE.createField("autotileMerge",M.LIST))};Rb.new_MbsTile_list=function(a){return new eb(a,Rb.MBS_TILE,new Rb(a))};Rb.__super__=ob;Rb.prototype=w(ob.prototype,{getMbsType:function(){return Rb.MBS_TILE},
_durations:null,_autotileMerge:null,allocateNew:function(){this.setAddress(this.data.allocate(Rb.MBS_TILE.getSize()))},getCollision:function(){return this.data.readInt(this.address+Rb.collision.address)},setCollision:function(a){this.data.writeInt(this.address+Rb.collision.address,a)},getMetadata:function(){return this.data.readString(this.address+Rb.metadata.address)},setMetadata:function(a){this.data.writeString(this.address+Rb.metadata.address,a)},getDurations:function(){this._durations.setAddress(this.data.readInt(this.address+
Rb.durations.address));return this._durations},createDurations:function(a){this._durations.allocateNew(a);this.data.writeInt(this.address+Rb.durations.address,this._durations.getAddress());return this._durations},getFrames:function(){return this.data.readInt(this.address+Rb.frames.address)},setFrames:function(a){this.data.writeInt(this.address+Rb.frames.address,a)},getId:function(){return this.data.readInt(this.address+Rb.id.address)},setId:function(a){this.data.writeInt(this.address+Rb.id.address,
a)},getOrder:function(){return this.data.readInt(this.address+Rb.order.address)},setOrder:function(a){this.data.writeInt(this.address+Rb.order.address,a)},getAutotile:function(){return this.data.readInt(this.address+Rb.autotile.address)},setAutotile:function(a){this.data.writeInt(this.address+Rb.autotile.address,a)},getAutotileMerge:function(){this._autotileMerge.setAddress(this.data.readInt(this.address+Rb.autotileMerge.address));return this._autotileMerge},createAutotileMerge:function(a){this._autotileMerge.allocateNew(a);
this.data.writeInt(this.address+Rb.autotileMerge.address,this._autotileMerge.getAddress());return this._autotileMerge},__class__:Rb});var ec=function(a){this.data=a;this._tiles=new eb(a,Rb.MBS_TILE,new Rb(a))};h["com.stencyl.io.mbs.scene.MbsTileset"]=ec;ec.__name__="com.stencyl.io.mbs.scene.MbsTileset";ec.initializeType=function(){null==ec.MBS_TILESET&&(kb.initializeType(),ec.MBS_TILESET=new Ib("MbsTileset"),ec.MBS_TILESET.setInstantiator(function(a){return new ec(a)}),ec.MBS_TILESET.inherit(kb.MBS_RESOURCE),
ec.across=ec.MBS_TILESET.createField("across",M.INTEGER),ec.down=ec.MBS_TILESET.createField("down",M.INTEGER),ec.readableImages=ec.MBS_TILESET.createField("readableImages",M.BOOLEAN),ec.tileWidth=ec.MBS_TILESET.createField("tileWidth",M.INTEGER),ec.tileHeight=ec.MBS_TILESET.createField("tileHeight",M.INTEGER),ec.tiles=ec.MBS_TILESET.createField("tiles",M.LIST))};ec.new_MbsTileset_list=function(a){return new eb(a,ec.MBS_TILESET,new ec(a))};ec.__super__=kb;ec.prototype=w(kb.prototype,{getMbsType:function(){return ec.MBS_TILESET},
_tiles:null,allocateNew:function(){this.setAddress(this.data.allocate(ec.MBS_TILESET.getSize()))},getAcross:function(){return this.data.readInt(this.address+ec.across.address)},setAcross:function(a){this.data.writeInt(this.address+ec.across.address,a)},getDown:function(){return this.data.readInt(this.address+ec.down.address)},setDown:function(a){this.data.writeInt(this.address+ec.down.address,a)},getReadableImages:function(){return this.data.readBool(this.address+ec.readableImages.address)},setReadableImages:function(a){this.data.writeBool(this.address+
ec.readableImages.address,a)},getTileWidth:function(){return this.data.readInt(this.address+ec.tileWidth.address)},setTileWidth:function(a){this.data.writeInt(this.address+ec.tileWidth.address,a)},getTileHeight:function(){return this.data.readInt(this.address+ec.tileHeight.address)},setTileHeight:function(a){this.data.writeInt(this.address+ec.tileHeight.address,a)},getTiles:function(){this._tiles.setAddress(this.data.readInt(this.address+ec.tiles.address));return this._tiles},createTiles:function(a){this._tiles.allocateNew(a);
this.data.writeInt(this.address+ec.tiles.address,this._tiles.getAddress());return this._tiles},__class__:ec});var Fe=function(a){this.data=a};h["com.stencyl.io.mbs.scene.layers.MbsColorBackground"]=Fe;Fe.__name__="com.stencyl.io.mbs.scene.layers.MbsColorBackground";Fe.initializeType=function(){null==Fe.MBS_COLOR_BACKGROUND&&(Fe.MBS_COLOR_BACKGROUND=new Ib("MbsColorBackground"),Fe.MBS_COLOR_BACKGROUND.setInstantiator(function(a){return new Fe(a)}),Fe.color=Fe.MBS_COLOR_BACKGROUND.createField("color",
M.INTEGER))};Fe.new_MbsColorBackground_list=function(a){return new eb(a,Fe.MBS_COLOR_BACKGROUND,new Fe(a))};Fe.__super__=ob;Fe.prototype=w(ob.prototype,{getMbsType:function(){return Fe.MBS_COLOR_BACKGROUND},allocateNew:function(){this.setAddress(this.data.allocate(Fe.MBS_COLOR_BACKGROUND.getSize()))},getColor:function(){return this.data.readInt(this.address+Fe.color.address)},setColor:function(a){this.data.writeInt(this.address+Fe.color.address,a)},__class__:Fe});var ae=function(a){this.data=a};h["com.stencyl.io.mbs.scene.layers.MbsGradientBackground"]=
ae;ae.__name__="com.stencyl.io.mbs.scene.layers.MbsGradientBackground";ae.initializeType=function(){null==ae.MBS_GRADIENT_BACKGROUND&&(ae.MBS_GRADIENT_BACKGROUND=new Ib("MbsGradientBackground"),ae.MBS_GRADIENT_BACKGROUND.setInstantiator(function(a){return new ae(a)}),ae.color1=ae.MBS_GRADIENT_BACKGROUND.createField("color1",M.INTEGER),ae.color2=ae.MBS_GRADIENT_BACKGROUND.createField("color2",M.INTEGER))};ae.new_MbsGradientBackground_list=function(a){return new eb(a,ae.MBS_GRADIENT_BACKGROUND,new ae(a))};
ae.__super__=ob;ae.prototype=w(ob.prototype,{getMbsType:function(){return ae.MBS_GRADIENT_BACKGROUND},allocateNew:function(){this.setAddress(this.data.allocate(ae.MBS_GRADIENT_BACKGROUND.getSize()))},getColor1:function(){return this.data.readInt(this.address+ae.color1.address)},setColor1:function(a){this.data.writeInt(this.address+ae.color1.address,a)},getColor2:function(){return this.data.readInt(this.address+ae.color2.address)},setColor2:function(a){this.data.writeInt(this.address+ae.color2.address,
a)},__class__:ae});var yb=function(a){this.data=a};h["com.stencyl.io.mbs.scene.layers.MbsLayer"]=yb;yb.__name__="com.stencyl.io.mbs.scene.layers.MbsLayer";yb.initializeType=function(){null==yb.MBS_LAYER&&(yb.MBS_LAYER=new Ib("MbsLayer"),yb.MBS_LAYER.setInstantiator(function(a){return new yb(a)}),yb.id=yb.MBS_LAYER.createField("id",M.INTEGER),yb.$name=yb.MBS_LAYER.createField("name",M.STRING),yb.order=yb.MBS_LAYER.createField("order",M.INTEGER),yb.opacity=yb.MBS_LAYER.createField("opacity",M.INTEGER),
yb.blendmode=yb.MBS_LAYER.createField("blendmode",M.STRING),yb.scrollFactorX=yb.MBS_LAYER.createField("scrollFactorX",M.FLOAT),yb.scrollFactorY=yb.MBS_LAYER.createField("scrollFactorY",M.FLOAT),yb.visible=yb.MBS_LAYER.createField("visible",M.BOOLEAN),yb.locked=yb.MBS_LAYER.createField("locked",M.BOOLEAN))};yb.new_MbsLayer_list=function(a){return new eb(a,yb.MBS_LAYER,new yb(a))};yb.__super__=ob;yb.prototype=w(ob.prototype,{getMbsType:function(){return yb.MBS_LAYER},allocateNew:function(){this.setAddress(this.data.allocate(yb.MBS_LAYER.getSize()))},
getId:function(){return this.data.readInt(this.address+yb.id.address)},setId:function(a){this.data.writeInt(this.address+yb.id.address,a)},getName:function(){return this.data.readString(this.address+yb.$name.address)},setName:function(a){this.data.writeString(this.address+yb.$name.address,a)},getOrder:function(){return this.data.readInt(this.address+yb.order.address)},setOrder:function(a){this.data.writeInt(this.address+yb.order.address,a)},getOpacity:function(){return this.data.readInt(this.address+
yb.opacity.address)},setOpacity:function(a){this.data.writeInt(this.address+yb.opacity.address,a)},getBlendmode:function(){return this.data.readString(this.address+yb.blendmode.address)},setBlendmode:function(a){this.data.writeString(this.address+yb.blendmode.address,a)},getScrollFactorX:function(){return this.data.readFloat(this.address+yb.scrollFactorX.address)},setScrollFactorX:function(a){this.data.writeFloat(this.address+yb.scrollFactorX.address,a)},getScrollFactorY:function(){return this.data.readFloat(this.address+
yb.scrollFactorY.address)},setScrollFactorY:function(a){this.data.writeFloat(this.address+yb.scrollFactorY.address,a)},getVisible:function(){return this.data.readBool(this.address+yb.visible.address)},setVisible:function(a){this.data.writeBool(this.address+yb.visible.address,a)},getLocked:function(){return this.data.readBool(this.address+yb.locked.address)},setLocked:function(a){this.data.writeBool(this.address+yb.locked.address,a)},__class__:yb});var Pd=function(a){this.data=a};h["com.stencyl.io.mbs.scene.layers.MbsImageBackground"]=
Pd;Pd.__name__="com.stencyl.io.mbs.scene.layers.MbsImageBackground";Pd.initializeType=function(){null==Pd.MBS_IMAGE_BACKGROUND&&(yb.initializeType(),Pd.MBS_IMAGE_BACKGROUND=new Ib("MbsImageBackground"),Pd.MBS_IMAGE_BACKGROUND.setInstantiator(function(a){return new Pd(a)}),Pd.MBS_IMAGE_BACKGROUND.inherit(yb.MBS_LAYER),Pd.resourceID=Pd.MBS_IMAGE_BACKGROUND.createField("resourceID",M.INTEGER),Pd.customScroll=Pd.MBS_IMAGE_BACKGROUND.createField("customScroll",M.BOOLEAN))};Pd.new_MbsImageBackground_list=
function(a){return new eb(a,Pd.MBS_IMAGE_BACKGROUND,new Pd(a))};Pd.__super__=yb;Pd.prototype=w(yb.prototype,{getMbsType:function(){return Pd.MBS_IMAGE_BACKGROUND},allocateNew:function(){this.setAddress(this.data.allocate(Pd.MBS_IMAGE_BACKGROUND.getSize()))},getResourceID:function(){return this.data.readInt(this.address+Pd.resourceID.address)},setResourceID:function(a){this.data.writeInt(this.address+Pd.resourceID.address,a)},getCustomScroll:function(){return this.data.readBool(this.address+Pd.customScroll.address)},
setCustomScroll:function(a){this.data.writeBool(this.address+Pd.customScroll.address,a)},__class__:Pd});var re=function(a){this.data=a};h["com.stencyl.io.mbs.scene.layers.MbsInteractiveLayer"]=re;re.__name__="com.stencyl.io.mbs.scene.layers.MbsInteractiveLayer";re.initializeType=function(){null==re.MBS_INTERACTIVE_LAYER&&(yb.initializeType(),re.MBS_INTERACTIVE_LAYER=new Ib("MbsInteractiveLayer"),re.MBS_INTERACTIVE_LAYER.setInstantiator(function(a){return new re(a)}),re.MBS_INTERACTIVE_LAYER.inherit(yb.MBS_LAYER),
re.color=re.MBS_INTERACTIVE_LAYER.createField("color",M.INTEGER))};re.new_MbsInteractiveLayer_list=function(a){return new eb(a,re.MBS_INTERACTIVE_LAYER,new re(a))};re.__super__=yb;re.prototype=w(yb.prototype,{getMbsType:function(){return re.MBS_INTERACTIVE_LAYER},allocateNew:function(){this.setAddress(this.data.allocate(re.MBS_INTERACTIVE_LAYER.getSize()))},getColor:function(){return this.data.readInt(this.address+re.color.address)},setColor:function(a){this.data.writeInt(this.address+re.color.address,
a)},__class__:re});var Vb=function(a){this.data=a};h["com.stencyl.io.mbs.scene.physics.MbsJoint"]=Vb;Vb.__name__="com.stencyl.io.mbs.scene.physics.MbsJoint";Vb.initializeType=function(){null==Vb.MBS_JOINT&&(Vb.MBS_JOINT=new Ib("MbsJoint"),Vb.MBS_JOINT.setInstantiator(function(a){return new Vb(a)}),Vb.id=Vb.MBS_JOINT.createField("id",M.INTEGER),Vb.$name=Vb.MBS_JOINT.createField("name",M.STRING),Vb.actor1=Vb.MBS_JOINT.createField("actor1",M.INTEGER),Vb.actor2=Vb.MBS_JOINT.createField("actor2",M.INTEGER),
Vb.collide=Vb.MBS_JOINT.createField("collide",M.BOOLEAN))};Vb.new_MbsJoint_list=function(a){return new eb(a,Vb.MBS_JOINT,new Vb(a))};Vb.__super__=ob;Vb.prototype=w(ob.prototype,{getMbsType:function(){return Vb.MBS_JOINT},allocateNew:function(){this.setAddress(this.data.allocate(Vb.MBS_JOINT.getSize()))},getId:function(){return this.data.readInt(this.address+Vb.id.address)},setId:function(a){this.data.writeInt(this.address+Vb.id.address,a)},getName:function(){return this.data.readString(this.address+
Vb.$name.address)},setName:function(a){this.data.writeString(this.address+Vb.$name.address,a)},getActor1:function(){return this.data.readInt(this.address+Vb.actor1.address)},setActor1:function(a){this.data.writeInt(this.address+Vb.actor1.address,a)},getActor2:function(){return this.data.readInt(this.address+Vb.actor2.address)},setActor2:function(a){this.data.writeInt(this.address+Vb.actor2.address,a)},getCollide:function(){return this.data.readBool(this.address+Vb.collide.address)},setCollide:function(a){this.data.writeBool(this.address+
Vb.collide.address,a)},__class__:Vb});var ic=function(a){this.data=a};h["com.stencyl.io.mbs.scene.physics.MbsHingeJoint"]=ic;ic.__name__="com.stencyl.io.mbs.scene.physics.MbsHingeJoint";ic.initializeType=function(){null==ic.MBS_HINGE_JOINT&&(Vb.initializeType(),ic.MBS_HINGE_JOINT=new Ib("MbsHingeJoint"),ic.MBS_HINGE_JOINT.setInstantiator(function(a){return new ic(a)}),ic.MBS_HINGE_JOINT.inherit(Vb.MBS_JOINT),ic.limit=ic.MBS_HINGE_JOINT.createField("limit",M.BOOLEAN),ic.motor=ic.MBS_HINGE_JOINT.createField("motor",
M.BOOLEAN),ic.lower=ic.MBS_HINGE_JOINT.createField("lower",M.FLOAT),ic.upper=ic.MBS_HINGE_JOINT.createField("upper",M.FLOAT),ic.torque=ic.MBS_HINGE_JOINT.createField("torque",M.FLOAT),ic.speed=ic.MBS_HINGE_JOINT.createField("speed",M.FLOAT))};ic.new_MbsHingeJoint_list=function(a){return new eb(a,ic.MBS_HINGE_JOINT,new ic(a))};ic.__super__=Vb;ic.prototype=w(Vb.prototype,{getMbsType:function(){return ic.MBS_HINGE_JOINT},allocateNew:function(){this.setAddress(this.data.allocate(ic.MBS_HINGE_JOINT.getSize()))},
getLimit:function(){return this.data.readBool(this.address+ic.limit.address)},setLimit:function(a){this.data.writeBool(this.address+ic.limit.address,a)},getMotor:function(){return this.data.readBool(this.address+ic.motor.address)},setMotor:function(a){this.data.writeBool(this.address+ic.motor.address,a)},getLower:function(){return this.data.readFloat(this.address+ic.lower.address)},setLower:function(a){this.data.writeFloat(this.address+ic.lower.address,a)},getUpper:function(){return this.data.readFloat(this.address+
ic.upper.address)},setUpper:function(a){this.data.writeFloat(this.address+ic.upper.address,a)},getTorque:function(){return this.data.readFloat(this.address+ic.torque.address)},setTorque:function(a){this.data.writeFloat(this.address+ic.torque.address,a)},getSpeed:function(){return this.data.readFloat(this.address+ic.speed.address)},setSpeed:function(a){this.data.writeFloat(this.address+ic.speed.address,a)},__class__:ic});var hc=function(a){this.data=a};h["com.stencyl.io.mbs.scene.physics.MbsRegion"]=
hc;hc.__name__="com.stencyl.io.mbs.scene.physics.MbsRegion";hc.initializeType=function(){null==hc.MBS_REGION&&(hc.MBS_REGION=new Ib("MbsRegion"),hc.MBS_REGION.setInstantiator(function(a){return new hc(a)}),hc.color=hc.MBS_REGION.createField("color",M.INTEGER),hc.id=hc.MBS_REGION.createField("id",M.INTEGER),hc.$name=hc.MBS_REGION.createField("name",M.STRING),hc.shape=hc.MBS_REGION.createField("shape",M.DYNAMIC),hc.x=hc.MBS_REGION.createField("x",M.INTEGER),hc.y=hc.MBS_REGION.createField("y",M.INTEGER))};
hc.new_MbsRegion_list=function(a){return new eb(a,hc.MBS_REGION,new hc(a))};hc.__super__=ob;hc.prototype=w(ob.prototype,{getMbsType:function(){return hc.MBS_REGION},allocateNew:function(){this.setAddress(this.data.allocate(hc.MBS_REGION.getSize()))},getColor:function(){return this.data.readInt(this.address+hc.color.address)},setColor:function(a){this.data.writeInt(this.address+hc.color.address,a)},getId:function(){return this.data.readInt(this.address+hc.id.address)},setId:function(a){this.data.writeInt(this.address+
hc.id.address,a)},getName:function(){return this.data.readString(this.address+hc.$name.address)},setName:function(a){this.data.writeString(this.address+hc.$name.address,a)},getShape:function(){return Ee.readDynamic(this.data,this.address+hc.shape.address)},setShape:function(a){Ee.writeDynamic(this.data,this.address+hc.shape.address,a)},getX:function(){return this.data.readInt(this.address+hc.x.address)},setX:function(a){this.data.writeInt(this.address+hc.x.address,a)},getY:function(){return this.data.readInt(this.address+
hc.y.address)},setY:function(a){this.data.writeInt(this.address+hc.y.address,a)},__class__:hc});var Wb=function(a){this.data=a};h["com.stencyl.io.mbs.scene.physics.MbsSlidingJoint"]=Wb;Wb.__name__="com.stencyl.io.mbs.scene.physics.MbsSlidingJoint";Wb.initializeType=function(){null==Wb.MBS_SLIDING_JOINT&&(Vb.initializeType(),Wb.MBS_SLIDING_JOINT=new Ib("MbsSlidingJoint"),Wb.MBS_SLIDING_JOINT.setInstantiator(function(a){return new Wb(a)}),Wb.MBS_SLIDING_JOINT.inherit(Vb.MBS_JOINT),Wb.limit=Wb.MBS_SLIDING_JOINT.createField("limit",
M.BOOLEAN),Wb.motor=Wb.MBS_SLIDING_JOINT.createField("motor",M.BOOLEAN),Wb.lower=Wb.MBS_SLIDING_JOINT.createField("lower",M.FLOAT),Wb.upper=Wb.MBS_SLIDING_JOINT.createField("upper",M.FLOAT),Wb.force=Wb.MBS_SLIDING_JOINT.createField("force",M.FLOAT),Wb.speed=Wb.MBS_SLIDING_JOINT.createField("speed",M.FLOAT),Wb.x=Wb.MBS_SLIDING_JOINT.createField("x",M.FLOAT),Wb.y=Wb.MBS_SLIDING_JOINT.createField("y",M.FLOAT))};Wb.new_MbsSlidingJoint_list=function(a){return new eb(a,Wb.MBS_SLIDING_JOINT,new Wb(a))};
Wb.__super__=Vb;Wb.prototype=w(Vb.prototype,{getMbsType:function(){return Wb.MBS_SLIDING_JOINT},allocateNew:function(){this.setAddress(this.data.allocate(Wb.MBS_SLIDING_JOINT.getSize()))},getLimit:function(){return this.data.readBool(this.address+Wb.limit.address)},setLimit:function(a){this.data.writeBool(this.address+Wb.limit.address,a)},getMotor:function(){return this.data.readBool(this.address+Wb.motor.address)},setMotor:function(a){this.data.writeBool(this.address+Wb.motor.address,a)},getLower:function(){return this.data.readFloat(this.address+
Wb.lower.address)},setLower:function(a){this.data.writeFloat(this.address+Wb.lower.address,a)},getUpper:function(){return this.data.readFloat(this.address+Wb.upper.address)},setUpper:function(a){this.data.writeFloat(this.address+Wb.upper.address,a)},getForce:function(){return this.data.readFloat(this.address+Wb.force.address)},setForce:function(a){this.data.writeFloat(this.address+Wb.force.address,a)},getSpeed:function(){return this.data.readFloat(this.address+Wb.speed.address)},setSpeed:function(a){this.data.writeFloat(this.address+
Wb.speed.address,a)},getX:function(){return this.data.readFloat(this.address+Wb.x.address)},setX:function(a){this.data.writeFloat(this.address+Wb.x.address,a)},getY:function(){return this.data.readFloat(this.address+Wb.y.address)},setY:function(a){this.data.writeFloat(this.address+Wb.y.address,a)},__class__:Wb});var Qd=function(a){this.data=a};h["com.stencyl.io.mbs.scene.physics.MbsStickJoint"]=Qd;Qd.__name__="com.stencyl.io.mbs.scene.physics.MbsStickJoint";Qd.initializeType=function(){null==Qd.MBS_STICK_JOINT&&
(Vb.initializeType(),Qd.MBS_STICK_JOINT=new Ib("MbsStickJoint"),Qd.MBS_STICK_JOINT.setInstantiator(function(a){return new Qd(a)}),Qd.MBS_STICK_JOINT.inherit(Vb.MBS_JOINT),Qd.damping=Qd.MBS_STICK_JOINT.createField("damping",M.FLOAT),Qd.frequency=Qd.MBS_STICK_JOINT.createField("frequency",M.FLOAT))};Qd.new_MbsStickJoint_list=function(a){return new eb(a,Qd.MBS_STICK_JOINT,new Qd(a))};Qd.__super__=Vb;Qd.prototype=w(Vb.prototype,{getMbsType:function(){return Qd.MBS_STICK_JOINT},allocateNew:function(){this.setAddress(this.data.allocate(Qd.MBS_STICK_JOINT.getSize()))},
getDamping:function(){return this.data.readFloat(this.address+Qd.damping.address)},setDamping:function(a){this.data.writeFloat(this.address+Qd.damping.address,a)},getFrequency:function(){return this.data.readFloat(this.address+Qd.frequency.address)},setFrequency:function(a){this.data.writeFloat(this.address+Qd.frequency.address,a)},__class__:Qd});var we=function(a){this.data=a};h["com.stencyl.io.mbs.scene.physics.MbsTerrainRegion"]=we;we.__name__="com.stencyl.io.mbs.scene.physics.MbsTerrainRegion";
we.initializeType=function(){null==we.MBS_TERRAIN_REGION&&(hc.initializeType(),we.MBS_TERRAIN_REGION=new Ib("MbsTerrainRegion"),we.MBS_TERRAIN_REGION.setInstantiator(function(a){return new we(a)}),we.MBS_TERRAIN_REGION.inherit(hc.MBS_REGION),we.groupID=we.MBS_TERRAIN_REGION.createField("groupID",M.INTEGER))};we.new_MbsTerrainRegion_list=function(a){return new eb(a,we.MBS_TERRAIN_REGION,new we(a))};we.__super__=hc;we.prototype=w(hc.prototype,{getMbsType:function(){return we.MBS_TERRAIN_REGION},allocateNew:function(){this.setAddress(this.data.allocate(we.MBS_TERRAIN_REGION.getSize()))},
getGroupID:function(){return this.data.readInt(this.address+we.groupID.address)},setGroupID:function(a){this.data.writeInt(this.address+we.groupID.address,a)},__class__:we});var je=function(a){this.data=a};h["com.stencyl.io.mbs.shape.MbsShape"]=je;je.__name__="com.stencyl.io.mbs.shape.MbsShape";je.initializeType=function(){null==je.MBS_SHAPE&&(je.MBS_SHAPE=new Ib("MbsShape"),je.MBS_SHAPE.setInstantiator(function(a){return new je(a)}))};je.new_MbsShape_list=function(a){return new eb(a,je.MBS_SHAPE,
new je(a))};je.__super__=ob;je.prototype=w(ob.prototype,{getMbsType:function(){return je.MBS_SHAPE},allocateNew:function(){this.setAddress(this.data.allocate(je.MBS_SHAPE.getSize()))},__class__:je});var ie=function(a){this.data=a;this._position=new wc(a)};h["com.stencyl.io.mbs.shape.MbsCircle"]=ie;ie.__name__="com.stencyl.io.mbs.shape.MbsCircle";ie.initializeType=function(){null==ie.MBS_CIRCLE&&(je.initializeType(),ie.MBS_CIRCLE=new Ib("MbsCircle"),ie.MBS_CIRCLE.setInstantiator(function(a){return new ie(a)}),
ie.MBS_CIRCLE.inherit(je.MBS_SHAPE),ie.position=ie.MBS_CIRCLE.createField("position",wc.MBS_POINT),ie.radius=ie.MBS_CIRCLE.createField("radius",M.FLOAT))};ie.new_MbsCircle_list=function(a){return new eb(a,ie.MBS_CIRCLE,new ie(a))};ie.__super__=je;ie.prototype=w(je.prototype,{getMbsType:function(){return ie.MBS_CIRCLE},_position:null,allocateNew:function(){this.setAddress(this.data.allocate(ie.MBS_CIRCLE.getSize()))},getPosition:function(){this._position.setAddress(this.address+ie.position.address);
return this._position},getRadius:function(){return this.data.readFloat(this.address+ie.radius.address)},setRadius:function(a){this.data.writeFloat(this.address+ie.radius.address,a)},__class__:ie});var wc=function(a){this.data=a};h["com.stencyl.io.mbs.shape.MbsPoint"]=wc;wc.__name__="com.stencyl.io.mbs.shape.MbsPoint";wc.initializeType=function(){null==wc.MBS_POINT&&(wc.MBS_POINT=new Ib("MbsPoint"),wc.MBS_POINT.setInstantiator(function(a){return new wc(a)}),wc.x=wc.MBS_POINT.createField("x",M.FLOAT),
wc.y=wc.MBS_POINT.createField("y",M.FLOAT))};wc.new_MbsPoint_list=function(a){return new eb(a,wc.MBS_POINT,new wc(a))};wc.__super__=ob;wc.prototype=w(ob.prototype,{getMbsType:function(){return wc.MBS_POINT},allocateNew:function(){this.setAddress(this.data.allocate(wc.MBS_POINT.getSize()))},getX:function(){return this.data.readFloat(this.address+wc.x.address)},setX:function(a){this.data.writeFloat(this.address+wc.x.address,a)},getY:function(){return this.data.readFloat(this.address+wc.y.address)},
setY:function(a){this.data.writeFloat(this.address+wc.y.address,a)},__class__:wc});var kd=function(a){this.data=a;this._points=new eb(a,wc.MBS_POINT,new wc(a))};h["com.stencyl.io.mbs.shape.MbsPolygon"]=kd;kd.__name__="com.stencyl.io.mbs.shape.MbsPolygon";kd.initializeType=function(){null==kd.MBS_POLYGON&&(je.initializeType(),kd.MBS_POLYGON=new Ib("MbsPolygon"),kd.MBS_POLYGON.setInstantiator(function(a){return new kd(a)}),kd.MBS_POLYGON.inherit(je.MBS_SHAPE),kd.points=kd.MBS_POLYGON.createField("points",
M.LIST))};kd.new_MbsPolygon_list=function(a){return new eb(a,kd.MBS_POLYGON,new kd(a))};kd.__super__=je;kd.prototype=w(je.prototype,{getMbsType:function(){return kd.MBS_POLYGON},_points:null,allocateNew:function(){this.setAddress(this.data.allocate(kd.MBS_POLYGON.getSize()))},getPoints:function(){this._points.setAddress(this.data.readInt(this.address+kd.points.address));return this._points},createPoints:function(a){this._points.allocateNew(a);this.data.writeInt(this.address+kd.points.address,this._points.getAddress());
return this._points},__class__:kd});var Rd=function(a){kd.call(this,a)};h["com.stencyl.io.mbs.shape.MbsPolyRegion"]=Rd;Rd.__name__="com.stencyl.io.mbs.shape.MbsPolyRegion";Rd.initializeType=function(){null==Rd.MBS_POLY_REGION&&(kd.initializeType(),Rd.MBS_POLY_REGION=new Ib("MbsPolyRegion"),Rd.MBS_POLY_REGION.setInstantiator(function(a){return new Rd(a)}),Rd.MBS_POLY_REGION.inherit(kd.MBS_POLYGON),Rd.width=Rd.MBS_POLY_REGION.createField("width",M.INTEGER),Rd.height=Rd.MBS_POLY_REGION.createField("height",
M.INTEGER))};Rd.new_MbsPolyRegion_list=function(a){return new eb(a,Rd.MBS_POLY_REGION,new Rd(a))};Rd.__super__=kd;Rd.prototype=w(kd.prototype,{getMbsType:function(){return Rd.MBS_POLY_REGION},allocateNew:function(){this.setAddress(this.data.allocate(Rd.MBS_POLY_REGION.getSize()))},getWidth:function(){return this.data.readInt(this.address+Rd.width.address)},setWidth:function(a){this.data.writeInt(this.address+Rd.width.address,a)},getHeight:function(){return this.data.readInt(this.address+Rd.height.address)},
setHeight:function(a){this.data.writeInt(this.address+Rd.height.address,a)},__class__:Rd});var Ge=function(a){kd.call(this,a);this._position=new wc(a)};h["com.stencyl.io.mbs.shape.MbsWireframe"]=Ge;Ge.__name__="com.stencyl.io.mbs.shape.MbsWireframe";Ge.initializeType=function(){null==Ge.MBS_WIREFRAME&&(kd.initializeType(),Ge.MBS_WIREFRAME=new Ib("MbsWireframe"),Ge.MBS_WIREFRAME.setInstantiator(function(a){return new Ge(a)}),Ge.MBS_WIREFRAME.inherit(kd.MBS_POLYGON),Ge.position=Ge.MBS_WIREFRAME.createField("position",
wc.MBS_POINT))};Ge.new_MbsWireframe_list=function(a){return new eb(a,Ge.MBS_WIREFRAME,new Ge(a))};Ge.__super__=kd;Ge.prototype=w(kd.prototype,{getMbsType:function(){return Ge.MBS_WIREFRAME},_position:null,allocateNew:function(){this.setAddress(this.data.allocate(Ge.MBS_WIREFRAME.getSize()))},getPosition:function(){this._position.setAddress(this.address+Ge.position.address);return this._position},__class__:Ge});var od=function(a){this.data=a};h["com.stencyl.io.mbs.snippet.MbsAttribute"]=od;od.__name__=
"com.stencyl.io.mbs.snippet.MbsAttribute";od.initializeType=function(){null==od.MBS_ATTRIBUTE&&(od.MBS_ATTRIBUTE=new Ib("MbsAttribute"),od.MBS_ATTRIBUTE.setInstantiator(function(a){return new od(a)}),od.id=od.MBS_ATTRIBUTE.createField("id",M.INTEGER),od.type=od.MBS_ATTRIBUTE.createField("type",M.STRING),od.value=od.MBS_ATTRIBUTE.createField("value",M.DYNAMIC))};od.new_MbsAttribute_list=function(a){return new eb(a,od.MBS_ATTRIBUTE,new od(a))};od.__super__=ob;od.prototype=w(ob.prototype,{getMbsType:function(){return od.MBS_ATTRIBUTE},
allocateNew:function(){this.setAddress(this.data.allocate(od.MBS_ATTRIBUTE.getSize()))},getId:function(){return this.data.readInt(this.address+od.id.address)},setId:function(a){this.data.writeInt(this.address+od.id.address,a)},getType:function(){return this.data.readString(this.address+od.type.address)},setType:function(a){this.data.writeString(this.address+od.type.address,a)},getValue:function(){return Ee.readDynamic(this.data,this.address+od.value.address)},setValue:function(a){Ee.writeDynamic(this.data,
this.address+od.value.address,a)},__class__:od});var Nb=function(a){this.data=a};h["com.stencyl.io.mbs.snippet.MbsAttributeDef"]=Nb;Nb.__name__="com.stencyl.io.mbs.snippet.MbsAttributeDef";Nb.initializeType=function(){null==Nb.MBS_ATTRIBUTE_DEF&&(Nb.MBS_ATTRIBUTE_DEF=new Ib("MbsAttributeDef"),Nb.MBS_ATTRIBUTE_DEF.setInstantiator(function(a){return new Nb(a)}),Nb.type=Nb.MBS_ATTRIBUTE_DEF.createField("type",M.STRING),Nb.defaultValue=Nb.MBS_ATTRIBUTE_DEF.createField("defaultValue",M.DYNAMIC),Nb.description=
Nb.MBS_ATTRIBUTE_DEF.createField("description",M.STRING),Nb.dropdown=Nb.MBS_ATTRIBUTE_DEF.createField("dropdown",M.STRING),Nb.fullname=Nb.MBS_ATTRIBUTE_DEF.createField("fullname",M.STRING),Nb.hidden=Nb.MBS_ATTRIBUTE_DEF.createField("hidden",M.BOOLEAN),Nb.id=Nb.MBS_ATTRIBUTE_DEF.createField("id",M.INTEGER),Nb.$name=Nb.MBS_ATTRIBUTE_DEF.createField("name",M.STRING),Nb.order=Nb.MBS_ATTRIBUTE_DEF.createField("order",M.INTEGER))};Nb.new_MbsAttributeDef_list=function(a){return new eb(a,Nb.MBS_ATTRIBUTE_DEF,
new Nb(a))};Nb.__super__=ob;Nb.prototype=w(ob.prototype,{getMbsType:function(){return Nb.MBS_ATTRIBUTE_DEF},allocateNew:function(){this.setAddress(this.data.allocate(Nb.MBS_ATTRIBUTE_DEF.getSize()))},getType:function(){return this.data.readString(this.address+Nb.type.address)},setType:function(a){this.data.writeString(this.address+Nb.type.address,a)},getDefaultValue:function(){return Ee.readDynamic(this.data,this.address+Nb.defaultValue.address)},setDefaultValue:function(a){Ee.writeDynamic(this.data,
this.address+Nb.defaultValue.address,a)},getDescription:function(){return this.data.readString(this.address+Nb.description.address)},setDescription:function(a){this.data.writeString(this.address+Nb.description.address,a)},getDropdown:function(){return this.data.readString(this.address+Nb.dropdown.address)},setDropdown:function(a){this.data.writeString(this.address+Nb.dropdown.address,a)},getFullname:function(){return this.data.readString(this.address+Nb.fullname.address)},setFullname:function(a){this.data.writeString(this.address+
Nb.fullname.address,a)},getHidden:function(){return this.data.readBool(this.address+Nb.hidden.address)},setHidden:function(a){this.data.writeBool(this.address+Nb.hidden.address,a)},getId:function(){return this.data.readInt(this.address+Nb.id.address)},setId:function(a){this.data.writeInt(this.address+Nb.id.address,a)},getName:function(){return this.data.readString(this.address+Nb.$name.address)},setName:function(a){this.data.writeString(this.address+Nb.$name.address,a)},getOrder:function(){return this.data.readInt(this.address+
Nb.order.address)},setOrder:function(a){this.data.writeInt(this.address+Nb.order.address,a)},__class__:Nb});var nd=function(a){this.data=a};h["com.stencyl.io.mbs.snippet.MbsBlock"]=nd;nd.__name__="com.stencyl.io.mbs.snippet.MbsBlock";nd.initializeType=function(){null==nd.MBS_BLOCK&&(nd.MBS_BLOCK=new Ib("MbsBlock"),nd.MBS_BLOCK.setInstantiator(function(a){return new nd(a)}),nd.type=nd.MBS_BLOCK.createField("type",M.STRING),nd.id=nd.MBS_BLOCK.createField("id",M.INTEGER),nd.blockID=nd.MBS_BLOCK.createField("blockID",
M.INTEGER))};nd.new_MbsBlock_list=function(a){return new eb(a,nd.MBS_BLOCK,new nd(a))};nd.__super__=ob;nd.prototype=w(ob.prototype,{getMbsType:function(){return nd.MBS_BLOCK},allocateNew:function(){this.setAddress(this.data.allocate(nd.MBS_BLOCK.getSize()))},getType:function(){return this.data.readString(this.address+nd.type.address)},setType:function(a){this.data.writeString(this.address+nd.type.address,a)},getId:function(){return this.data.readInt(this.address+nd.id.address)},setId:function(a){this.data.writeInt(this.address+
nd.id.address,a)},getBlockID:function(){return this.data.readInt(this.address+nd.blockID.address)},setBlockID:function(a){this.data.writeInt(this.address+nd.blockID.address,a)},__class__:nd});var mc=function(a){this.data=a};h["com.stencyl.io.mbs.snippet.MbsEvent"]=mc;mc.__name__="com.stencyl.io.mbs.snippet.MbsEvent";mc.initializeType=function(){null==mc.MBS_EVENT&&(mc.MBS_EVENT=new Ib("MbsEvent"),mc.MBS_EVENT.setInstantiator(function(a){return new mc(a)}),mc.displayName=mc.MBS_EVENT.createField("displayName",
M.STRING),mc.enabled=mc.MBS_EVENT.createField("enabled",M.BOOLEAN),mc.id=mc.MBS_EVENT.createField("id",M.INTEGER),mc.$name=mc.MBS_EVENT.createField("name",M.STRING),mc.order=mc.MBS_EVENT.createField("order",M.INTEGER),mc.repeats=mc.MBS_EVENT.createField("repeats",M.BOOLEAN))};mc.new_MbsEvent_list=function(a){return new eb(a,mc.MBS_EVENT,new mc(a))};mc.__super__=ob;mc.prototype=w(ob.prototype,{getMbsType:function(){return mc.MBS_EVENT},allocateNew:function(){this.setAddress(this.data.allocate(mc.MBS_EVENT.getSize()))},
getDisplayName:function(){return this.data.readString(this.address+mc.displayName.address)},setDisplayName:function(a){this.data.writeString(this.address+mc.displayName.address,a)},getEnabled:function(){return this.data.readBool(this.address+mc.enabled.address)},setEnabled:function(a){this.data.writeBool(this.address+mc.enabled.address,a)},getId:function(){return this.data.readInt(this.address+mc.id.address)},setId:function(a){this.data.writeInt(this.address+mc.id.address,a)},getName:function(){return this.data.readString(this.address+
mc.$name.address)},setName:function(a){this.data.writeString(this.address+mc.$name.address,a)},getOrder:function(){return this.data.readInt(this.address+mc.order.address)},setOrder:function(a){this.data.writeInt(this.address+mc.order.address,a)},getRepeats:function(){return this.data.readBool(this.address+mc.repeats.address)},setRepeats:function(a){this.data.writeBool(this.address+mc.repeats.address,a)},__class__:mc});var Sd=function(a){this.data=a};h["com.stencyl.io.mbs.snippet.MbsMapElement"]=Sd;
Sd.__name__="com.stencyl.io.mbs.snippet.MbsMapElement";Sd.initializeType=function(){null==Sd.MBS_MAP_ELEMENT&&(Sd.MBS_MAP_ELEMENT=new Ib("MbsMapElement"),Sd.MBS_MAP_ELEMENT.setInstantiator(function(a){return new Sd(a)}),Sd.key=Sd.MBS_MAP_ELEMENT.createField("key",M.STRING),Sd.value=Sd.MBS_MAP_ELEMENT.createField("value",M.DYNAMIC))};Sd.new_MbsMapElement_list=function(a){return new eb(a,Sd.MBS_MAP_ELEMENT,new Sd(a))};Sd.__super__=ob;Sd.prototype=w(ob.prototype,{getMbsType:function(){return Sd.MBS_MAP_ELEMENT},
allocateNew:function(){this.setAddress(this.data.allocate(Sd.MBS_MAP_ELEMENT.getSize()))},getKey:function(){return this.data.readString(this.address+Sd.key.address)},setKey:function(a){this.data.writeString(this.address+Sd.key.address,a)},getValue:function(){return Ee.readDynamic(this.data,this.address+Sd.value.address)},setValue:function(a){Ee.writeDynamic(this.data,this.address+Sd.value.address,a)},__class__:Sd});var Oc=function(a){this.data=a;this._properties=new eb(a,od.MBS_ATTRIBUTE,new od(a))};
h["com.stencyl.io.mbs.snippet.MbsSnippet"]=Oc;Oc.__name__="com.stencyl.io.mbs.snippet.MbsSnippet";Oc.initializeType=function(){null==Oc.MBS_SNIPPET&&(Oc.MBS_SNIPPET=new Ib("MbsSnippet"),Oc.MBS_SNIPPET.setInstantiator(function(a){return new Oc(a)}),Oc.enabled=Oc.MBS_SNIPPET.createField("enabled",M.BOOLEAN),Oc.id=Oc.MBS_SNIPPET.createField("id",M.INTEGER),Oc.properties=Oc.MBS_SNIPPET.createField("properties",M.LIST))};Oc.new_MbsSnippet_list=function(a){return new eb(a,Oc.MBS_SNIPPET,new Oc(a))};Oc.__super__=
ob;Oc.prototype=w(ob.prototype,{getMbsType:function(){return Oc.MBS_SNIPPET},_properties:null,allocateNew:function(){this.setAddress(this.data.allocate(Oc.MBS_SNIPPET.getSize()))},getEnabled:function(){return this.data.readBool(this.address+Oc.enabled.address)},setEnabled:function(a){this.data.writeBool(this.address+Oc.enabled.address,a)},getId:function(){return this.data.readInt(this.address+Oc.id.address)},setId:function(a){this.data.writeInt(this.address+Oc.id.address,a)},getProperties:function(){this._properties.setAddress(this.data.readInt(this.address+
Oc.properties.address));return this._properties},createProperties:function(a){this._properties.allocateNew(a);this.data.writeInt(this.address+Oc.properties.address,this._properties.getAddress());return this._properties},__class__:Oc});var qb=function(a){this.data=a;this._attributes=new eb(a,Nb.MBS_ATTRIBUTE_DEF,new Nb(a));this._blocks=new eb(a,nd.MBS_BLOCK,new nd(a));this._events=new eb(a,mc.MBS_EVENT,new mc(a))};h["com.stencyl.io.mbs.snippet.MbsSnippetDef"]=qb;qb.__name__="com.stencyl.io.mbs.snippet.MbsSnippetDef";
qb.initializeType=function(){null==qb.MBS_SNIPPET_DEF&&(qb.MBS_SNIPPET_DEF=new Ib("MbsSnippetDef"),qb.MBS_SNIPPET_DEF.setInstantiator(function(a){return new qb(a)}),qb.attachedEvent=qb.MBS_SNIPPET_DEF.createField("attachedEvent",M.BOOLEAN),qb.actorID=qb.MBS_SNIPPET_DEF.createField("actorID",M.INTEGER),qb.classname=qb.MBS_SNIPPET_DEF.createField("classname",M.STRING),qb.description=qb.MBS_SNIPPET_DEF.createField("description",M.STRING),qb.design=qb.MBS_SNIPPET_DEF.createField("design",M.BOOLEAN),qb.drawOrder=
qb.MBS_SNIPPET_DEF.createField("drawOrder",M.INTEGER),qb.id=qb.MBS_SNIPPET_DEF.createField("id",M.INTEGER),qb.$name=qb.MBS_SNIPPET_DEF.createField("name",M.STRING),qb.packageName=qb.MBS_SNIPPET_DEF.createField("packageName",M.STRING),qb.sceneID=qb.MBS_SNIPPET_DEF.createField("sceneID",M.INTEGER),qb.type=qb.MBS_SNIPPET_DEF.createField("type",M.STRING),qb.attributes=qb.MBS_SNIPPET_DEF.createField("attributes",M.LIST),qb.blocks=qb.MBS_SNIPPET_DEF.createField("blocks",M.LIST),qb.events=qb.MBS_SNIPPET_DEF.createField("events",
M.LIST))};qb.new_MbsSnippetDef_list=function(a){return new eb(a,qb.MBS_SNIPPET_DEF,new qb(a))};qb.__super__=ob;qb.prototype=w(ob.prototype,{getMbsType:function(){return qb.MBS_SNIPPET_DEF},_attributes:null,_blocks:null,_events:null,allocateNew:function(){this.setAddress(this.data.allocate(qb.MBS_SNIPPET_DEF.getSize()))},getAttachedEvent:function(){return this.data.readBool(this.address+qb.attachedEvent.address)},setAttachedEvent:function(a){this.data.writeBool(this.address+qb.attachedEvent.address,
a)},getActorID:function(){return this.data.readInt(this.address+qb.actorID.address)},setActorID:function(a){this.data.writeInt(this.address+qb.actorID.address,a)},getClassname:function(){return this.data.readString(this.address+qb.classname.address)},setClassname:function(a){this.data.writeString(this.address+qb.classname.address,a)},getDescription:function(){return this.data.readString(this.address+qb.description.address)},setDescription:function(a){this.data.writeString(this.address+qb.description.address,
a)},getDesign:function(){return this.data.readBool(this.address+qb.design.address)},setDesign:function(a){this.data.writeBool(this.address+qb.design.address,a)},getDrawOrder:function(){return this.data.readInt(this.address+qb.drawOrder.address)},setDrawOrder:function(a){this.data.writeInt(this.address+qb.drawOrder.address,a)},getId:function(){return this.data.readInt(this.address+qb.id.address)},setId:function(a){this.data.writeInt(this.address+qb.id.address,a)},getName:function(){return this.data.readString(this.address+
qb.$name.address)},setName:function(a){this.data.writeString(this.address+qb.$name.address,a)},getPackageName:function(){return this.data.readString(this.address+qb.packageName.address)},setPackageName:function(a){this.data.writeString(this.address+qb.packageName.address,a)},getSceneID:function(){return this.data.readInt(this.address+qb.sceneID.address)},setSceneID:function(a){this.data.writeInt(this.address+qb.sceneID.address,a)},getType:function(){return this.data.readString(this.address+qb.type.address)},
setType:function(a){this.data.writeString(this.address+qb.type.address,a)},getAttributes:function(){this._attributes.setAddress(this.data.readInt(this.address+qb.attributes.address));return this._attributes},createAttributes:function(a){this._attributes.allocateNew(a);this.data.writeInt(this.address+qb.attributes.address,this._attributes.getAddress());return this._attributes},getBlocks:function(){this._blocks.setAddress(this.data.readInt(this.address+qb.blocks.address));return this._blocks},createBlocks:function(a){this._blocks.allocateNew(a);
this.data.writeInt(this.address+qb.blocks.address,this._blocks.getAddress());return this._blocks},getEvents:function(){this._events.setAddress(this.data.readInt(this.address+qb.events.address));return this._events},createEvents:function(a){this._events.allocateNew(a);this.data.writeInt(this.address+qb.events.address,this._events.getAddress());return this._events},__class__:qb});var Bb=function(a,b,c,d,e,f,g,k,l,m,z,n,h,q,t,r,u,x,w,Q){null==Q&&(Q=0);null==w&&(w=!1);null==x&&(x=!0);null==r&&(r=!1);
null==t&&(t=!1);null==q&&(q=!1);null==h&&(h=!1);null==k&&(k=32);null==g&&(g=32);null==f&&(f=-1);null==e&&(e=0);null==d&&(d=0);this.collisionListenerCount=0;this.customizedBehaviors=!1;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;qa.call(this);p.NO_PHYSICS&&0==Q&&(this.physicsMode=Q=1);this.dummy=new N;this.zero=new N(0,0);this._point=T.point;this._moveX=
this._moveY=0;this.HITBOX=new Mg;this.set_shape(this.HITBOX);this instanceof Nd&&p.NO_PHYSICS&&(u=this.HITBOX=new ld(g|0,k|0,0,0,!1,-2),this.set_shape(u));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.collidable=!0;this.solid=!h;this.updateMatrix=!0;this.colY=this.colX=0;this.lastScale=new pa(1,1);this.lastY=this.lastX=-1E3;this.lastAngle=0;this.tweenProps=new oq;this.tweenProps.xy.doOnUpdate(v(this,this.updateTweenXY));
this.tweenProps.angle.doOnUpdate(v(this,this.updateTweenAngle));this.tweenProps.alpha.doOnUpdate(v(this,this.updateTweenAlpha));this.tweenProps.realScaleXY.doOnUpdate(v(this,this.updateTweenScaleXY));this.transformPoint=new pa(0,0);this.transformMatrix=new Ha;this.drawMatrix=new Ha;this.currOrigin=new pa(0,0);this.currOffset=new pa(0,0);this.registry=new ua;this.attachedImages=[];this.physicsMode=Q;this.autoScale=x;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=w;this.resetOrigin=!0;this.allListeners=new Wa;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.typeID=null!=z?z.ID:-1;this.engine=a;this.collidedList=[];this.collisions=new Ye(16);this.simpleCollisions=new Ye(16);this.contacts=new Ye(16);this.regionContacts=new Ye(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 Ok;
this.currAnimationName="";this.animationMap=new ua;this.shapeMap=new ua;this.originMap=new ua;this.sprite=l;this.type=z;if(null!=l)for(b=l.animations.iterator();b.hasNext();)x=b.next(),this.addAnim(x),x.animID==l.defaultAnimation&&(this.defaultAnim=x.animName);null==Bb.recycledAnimation&&(Bb.recycledAnimation=new Ud(-1,"recyclingDefault",null,null,null,!1,!1,1,1,0,0,[10],1,1,1));this.addAnim(Bb.recycledAnimation);if(null!=n&&0==Q)n.bullet&&(rc.m_continuousPhysics=!0),n.groupID=c,this.initFromBody(n),
c=new Lb,c.setAsBox(1,1),this.body.createFixture2(c,.1),this.md=new Ik,this.md.mass=n.mass,this.md.I=n.aMass,this.md.center.x=0,this.md.center.y=0,this.body.setMassData(this.md),this.bodyScale=new pa(1,1);else{if(null==u||rb.typeof(u)==Dd.TFloat)u=Bb.createBox(g,k);null!=n&&(this.continuousCollision=n.bullet);this instanceof Nd&&(h=!0,r=!1);this instanceof wh&&(r=!1);null!=u&&u instanceof Mg?(this.set_shape(u),this.isTerrain=!0):0==Q&&this.initBody(c,h,q,t,r,u)}this.cacheAnchor=new pa(0,0);this.switchToDefaultAnimation();
null!=l?this.setLocation(d,e):null!=u&&u instanceof Mg?(d=new Zc(new na(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==Q&&this.body.setPosition(new N(p.toPhysicalUnits(d),p.toPhysicalUnits(e)));null!=m?this.customizedBehaviors=!0:null!=z&&(m=z.behaviorValues);-1!=f&&a.moveActorToLayer(this,a.getLayerById(f));p.initBehaviors(this.behaviors,m,this,a,!1)};h["com.stencyl.models.Actor"]=Bb;Bb.__name__="com.stencyl.models.Actor";
Bb.resetStatics=function(){Bb.lastCollided=null;Bb.manifold=new Hk};Bb.createBox=function(a,b){var c=new Lb;c.setAsBox(p.toPhysicalUnits(a/2),p.toPhysicalUnits(b/2));return c};Bb.scaleShape=function(a,b,c){if(a instanceof cd)a.m_radius*=c;else if(a instanceof Lb){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)}};Bb.__super__=qa;Bb.prototype=w(qa.prototype,{engine:null,createTime:null,ID:null,groupID:null,cachedLayer:null,layer:null,
typeID:null,type:null,recycled:null,paused:null,isRegion:null,isTerrainRegion:null,isTerrain:null,destroyed:null,drawActor:null,isHUD:null,alwaysSimulate:null,isCamera:null,killLeaveScreen:null,physicsMode:null,autoScale:null,dead:null,dying:null,fixedRotation:null,ignoreGravity:null,defaultGravity:null,collidable:null,solid:null,resetOrigin:null,realX:null,realY:null,realAngle:null,realScaleX:null,realScaleY:null,lastX:null,lastY:null,lastAngle:null,lastScale:null,colX:null,colY:null,xSpeed:null,
ySpeed:null,rSpeed:null,continuousCollision:null,tweenProps:null,cacheWidth:null,cacheHeight:null,currAnimation:null,currAnimationName:null,animationMap:null,bitmapFilters:null,sprite:null,shapeMap:null,originMap:null,defaultAnim:null,currOrigin:null,currOffset:null,cacheAnchor:null,transformObj:null,transformPoint:null,transformMatrix:null,updateMatrix:null,drawMatrix:null,label:null,attachedImages:null,smoothMove:null,firstMove:null,snapOnSet:null,drawX:null,drawY:null,moveMultiplier:null,moveXDistance:null,
moveYDistance:null,minMove:null,maxMove:null,behaviors:null,customizedBehaviors:null,registry:null,allListeners:null,allListenerReferences:null,whenCreatedListeners:null,whenUpdatedListeners:null,whenDrawingListeners:null,whenKilledListeners:null,mouseOverListeners:null,positionListeners:null,collisionListeners:null,positionListenerCount:null,collisionListenerCount:null,mouseState:null,lastScreenState:null,lastSceneState:null,isOnScreenCache:null,body:null,bodyDef:null,md:null,bodyScale:null,handlesCollisions:null,
contacts:null,regionContacts:null,collisions:null,dummy:null,zero:null,destroy:function(){if(!this.destroyed){this.destroyed=!0;var a=this.animationMap;for(a=new Pe(a,a.arrayKeys());a.hasNext();)a.next().set_visible(!1);T.removeAllChildren(this);if(null!=this.body&&0==this.physicsMode){for(a=this.body.getContactList();null!=a;)p.engine.world.m_contactManager.m_contactListener.endContact(a.contact),a=a.next;p.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=Bb.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.registry=null;for(a=this.collisions.keys();a.hasNext();){var b=a.next(),c=this.collisions,d=c.mH,e=d.mHash[73856093*b&d.mMask];if(-1==e)b=-2147483648;else if(d=d.mData,d[e]==b)b=d[e+1];else{var f=-2147483648;for(e=d[e+2];-1!=e;){if(d[e]==b){f=d[e+1];break}e=d[e+2]}b=f}for(c=-2147483648==b?null:c.mVals[b];0<c.points.length;)ue.free(c.points.pop())}this.simpleCollisions=this.collisions=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},defaultHitbox:null,defaultMasklist:null,addAnim:function(a){var b=0==this.physicsMode?a.physicsShapes:a.simpleShapes;if(null!=b){var c=[];if(1==this.physicsMode)for(b=b.iterator();b.hasNext();){var d=b.next();d instanceof ld&&0!=this.physicsMode&&(d=L.__cast(d,ld).clone(),d.assignTo(this));c.push(d)}else if(2!=this.physicsMode)for(b=b.iterator();b.hasNext();)d=b.next(),c.push(d);
0!=this.physicsMode?(b=a.animName,d=this.shapeMap,c=new wj(c,this)):(b=a.animName,d=this.shapeMap);null!=q[b]?d.setReserved(b,c):d.h[b]=c}c=this.animationMap;b=a.animName;d=new Yk(a);null!=q[b]?c.setReserved(b,d):c.h[b]=d;c=this.originMap;b=a.animName;a=new N(a.originX,a.originY);null!=q[b]?c.setReserved(b,a):c.h[b]=a},reloadAnimationGraphics:function(a){if(-1==a){for(a=this.sprite.animations.iterator();a.hasNext();){var b=a.next().animName,c=this.animationMap;(null!=q[b]?c.getReserved(b):c.h[b]).framesUpdated()}this.updateChildrenPositions()}else a=
this.sprite.animations.h[a].animName,b=this.animationMap,a=null!=q[a]?b.getReserved(a):b.h[a],a.framesUpdated(),a==this.currAnimation&&this.updateChildrenPositions()},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==T.indexOf(this.whenCreatedListeners,b)&&--a}catch(c){if(ra.lastException=c,"string"!=
typeof(c instanceof E?c.val:c))throw c;}++a}}},initFromBody:function(a){a.allowSleep=!1;a.userData=this;this.bodyDef=a;this.body=p.engine.world.createBody(a)},initBody:function(a,b,c,d,e,f){var g=new kj;g.groupID=a;a=this.get_x();g.position.x=p.toPhysicalUnits(a);a=this.get_y();g.position.y=p.toPhysicalUnits(a);g.angle=0;g.fixedRotation=!e;g.allowSleep=!1;g.type=c?wa.b2_staticBody:d?wa.b2_kinematicBody:wa.b2_dynamicBody;if(f instanceof Array)for(g.userData=this,this.body=p.engine.world.createBody(g),
b=L.__cast(f,Array),f=0;f<b.length;)c=b[f],++f,d=new kg,d.shape=c,d.friction=1,d.density=.1,d.restitution=0,d.isSensor=!1,d.groupID=1,d.userData=this,this.body.createFixture(d);else c=new kg,c.shape=f,c.friction=1,c.density=.1,c.restitution=0,c.isSensor=b,c.groupID=-1E3,c.userData=this,g.userData=this,this.body=p.engine.world.createBody(g),this.body.createFixture(c);this.bodyDef=g},addAnimation:function(a,b){var c=this.animationMap;null!=q[a]?c.setReserved(a,b):c.h[a]=b},getAnimation:function(){return this.currAnimationName},
setAnimation:function(a){this.switchAnimation(a)},switchToDefaultAnimation:function(){null!=this.defaultAnim&&(this.switchAnimation(this.defaultAnim,this.defaultShapeChanged()),this.setCurrentFrame(0))},isAnimationPlaying:function(){return!this.currAnimation.isFinished()},getCurrentFrame:function(){return this.currAnimation.getCurrentFrame()},setCurrentFrame:function(a){this.currAnimation.setFrame(a)},getNumFrames:function(){return this.currAnimation.getNumFrames()},defaultShapeChanged:function(){if(0!=
this.physicsMode)return!0;var a=this.defaultAnim,b=this.shapeMap;a=null!=q[a]?b.getReserved(a):b.h[a];if(null==this.getBody()||null==this.getBody().getFixtureList()||null==this.getBody().getFixtureList().getShape()){if(null!=a&&0<a.length)return!0}else{if(null==a||0==a.length||1<a.length)return!0;var c=a[0];if(null==c)return!0;var d=this.getBody().getFixtureList();a=this.getBody().getFixtureList().getShape();b=c.shape;if(d.groupID==c.groupID&&this.getBody().getFixtureList().isSensor()==c.isSensor&&
L.getClass(a)==L.getClass(b))if(L.getClass(a)==Lb){if(a.m_vertexCount!=b.m_vertexCount)return!0;c=0;for(d=a.m_vertexCount;c<d;){var e=c++;if(a.m_vertices[e].x!=b.m_vertices[e].x||a.m_vertices[e].y!=b.m_vertices[e].y)return!0}}else{if(L.getClass(a)==cd&&(a.m_radius!=b.m_radius||a.m_p.x!=b.m_p.x||a.m_p.y!=b.m_p.y))return!0}else return!0}return!1},switchAnimation:function(a,b){null==b&&(b=!1);if(a!=this.currAnimationName||b){var c=this.animationMap;c=null!=q[a]?c.getReserved(a):c.h[a];if(null!=c){null!=
this.currAnimation&&this.removeChild(this.currAnimation);if(null!=this.body&&0==this.physicsMode&&!b){var d=this.currAnimationName,e=this.shapeMap;d=null!=q[d]?e.getReserved(d):e.h[d];e=this.shapeMap;e=null!=q[a]?e.getReserved(a):e.h[a];if(null==d||null==e)b=!0;else if(d.length!=e.length||1<d.length)b=!0;else{var f=d[0],g=e[0];if(null==f||null==g)b=!0;else if(d=f.shape,e=g.shape,f.isSensor!=g.isSensor)b=!0;else if(f.groupID!=g.groupID)b=!0;else if(L.getClass(d)==L.getClass(e))if(L.getClass(d)==Lb)if(d.m_vertexCount!=
e.m_vertexCount)b=!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){b=!0;break}else if(d.m_vertices[k].y!=e.m_vertices[k].y){b=!0;break}}else L.getClass(d)!=cd||d.m_radius==e.m_radius&&d.m_p.x==e.m_p.x&&d.m_p.y==e.m_p.y||(b=!0);else b=!0}}this.currAnimationName=a;this.currAnimation=c;this.currAnimation.set_filter(this.bitmapFilters);this.currAnimation.set_visible(this.drawActor);this.addChild(c);c=this.originMap;c=null!=q[a]?c.getReserved(a):c.h[a];d=this.currAnimation.get_width()/
p.SCALE/2-c.x;e=this.currAnimation.get_height()/p.SCALE/2-c.y;if(null!=this.body&&b&&0==this.physicsMode){b=[];for(f=this.body.getContactList();null!=f;)f.other.getUserData()instanceof Nd&&f.contact.isTouching()&&b.push(f.other.getUserData()),p.engine.world.m_contactManager.m_contactListener.endContact(f.contact),f=f.next;for(f=this.collisions.keys();f.hasNext();){g=f.next();k=this.collisions;var l=k.mH,m=l.mHash[73856093*g&l.mMask];if(-1==m)m=-2147483648;else if(l=l.mData,l[m]==g)m=l[m+1];else{var z=
-2147483648;for(m=l[m+2];-1!=m;){if(l[m]==g){z=l[m+1];break}m=l[m+2]}m=z}for(k=-2147483648==m?null:k.mVals[m];0<k.points.length;)ue.free(k.points.pop());this.collisions.unset(g)}this.collisions=new Ye(16);this.simpleCollisions=new Ye(16);this.contacts=new Ye(16);this.regionContacts=new Ye(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;g=this.shapeMap;for(a=L.__cast(null!=q[a]?g.getReserved(a):g.h[a],Array);f<a.length;){m=a[f];++f;g=new kg;1.79769313486231E308>this.bodyDef.friction&&(g.friction=this.bodyDef.friction,g.restitution=this.bodyDef.bounciness,0<this.bodyDef.mass&&(g.density=.1));g.density=m.density;g.isSensor=m.isSensor;g.groupID=m.groupID;g.shape=m.shape;if(null!=c)if(this.body.origin.x=p.toPhysicalUnits(-c.x),this.body.origin.y=p.toPhysicalUnits(-c.y),m.shape instanceof Lb){k=new xf;l=m.shape;m=new Lb;m.setAsArray(l.m_vertices,
l.m_vertices.length);l=m.m_vertices;z=m.m_normals;var n=k.position,h=p.toPhysicalUnits(d),t=p.toPhysicalUnits(e);null==t&&(t=0);null==h&&(h=0);n.x=h;n.y=t;k.R.setAngle(0);n=0;for(h=m.m_vertexCount;n<h;)t=n++,l[t]=k.multiply(l[t]),z[t]=k.R.multiplyV(z[t]);m.setAsArray(l,l.length);m.m_normals=z;g.shape=m}else m.shape instanceof cd&&(m=m.shape,k=new cd,k.setRadius(m.getRadius()),l=m.m_p.x,z=p.toPhysicalUnits(d),k.m_p.x=l+z,m=m.m_p.y,l=p.toPhysicalUnits(e),k.m_p.y=m+l,g.shape=k);this.body.createFixture(g).SetUserData(this)}if(null!=
this.body.getFixtureList())for(this.bodyScale.x=1,this.bodyScale.y=1,d=0;d<b.length;)e=b[d],++d,a=this.body.getFixtureList().m_aabb,e.getBody().getFixtureList().m_aabb.testOverlap(a)&&e.addActor(this);null!=this.md&&this.body.setMassData(this.md)}else b=this.shapeMap,null!=(null!=q[a]?b.getReserved(a):b.h[a])&&1==this.physicsMode&&(b=this.shapeMap,this.set_shape(null!=q[a]?b.getReserved(a):b.h[a]),this.HITBOX=this._mask);this.cacheWidth=this.currAnimation.get_width()/p.SCALE;this.cacheHeight=this.currAnimation.get_height()/
p.SCALE;null!=this.body&&(this.body.size.x=p.toPhysicalUnits(this.cacheWidth),this.body.size.y=p.toPhysicalUnits(this.cacheHeight));0==this.physicsMode&&(this.realX=this.getX(!1),this.realY=this.getY(!1),this.updateBodyScale());null!=c&&this.setOriginPoint(c.x|0,c.y|0);this.updateChildrenPositions();this.updateMatrix=!0;c=this.currAnimation;c.timer=0;c.frameIndex=0;c.finished=!1;null!=c.filter?(c.filteredFrames[c.frameIndex]||(c.frames[c.frameIndex]=c.applyFilters(c.frames[c.frameIndex],c.model.frames[c.frameIndex],
c.filter),c.filteredFrames[c.frameIndex]=!0),c.set_bitmapData(c.frames[c.frameIndex])):c.set_bitmapData(c.model.frames[c.frameIndex]);c.smoothing=ma.antialias}}},updateChildrenPositions:function(){var a=null!=this.currAnimation?new pa(-this.currAnimation.get_x(),-this.currAnimation.get_y()):new pa(0,0);if(!a.equals(this.cacheAnchor)){this.cacheAnchor.copyFrom(a);a=0;for(var b=this.attachedImages;a<b.length;){var c=b[a];++a;c.updatePosition()}null!=this.label&&this.label.updatePosition()}},removeAttachedImages:function(){for(var a=
0,b=this.attachedImages;a<b.length;){var c=b[a];++a;c.cacheParentAnchor=T.zero;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)if(this.isMouseOver()){if(0>=this.mouseState){this.mouseState=1;var c=this.mouseOverListeners;b=this.mouseState;for(var d=0;d<c.length;){try{var e=c[d];e(b,c);-1==
T.indexOf(c,e)&&--d}catch(Yc){if(ra.lastException=Yc,"string"!=typeof(Yc instanceof E?Yc.val:Yc))throw Yc;}++d}}else this.mouseState=2;if(S.mousePressed){this.mouseState=3;var f=this.mouseOverListeners;e=this.mouseState;for(c=0;c<f.length;){try{var g=f[c];g(e,f);-1==T.indexOf(f,g)&&--c}catch(Yc){if(ra.lastException=Yc,"string"!=typeof(Yc instanceof E?Yc.val:Yc))throw Yc;}++c}}else if(S.mouseDown)for(this.mouseState=4,g=this.mouseOverListeners,e=this.mouseState,c=0;c<g.length;){try{f=g[c],f(e,g),-1==
T.indexOf(g,f)&&--c}catch(Yc){if(ra.lastException=Yc,"string"!=typeof(Yc instanceof E?Yc.val:Yc))throw Yc;}++c}if(S.mouseReleased)for(this.mouseState=5,g=this.mouseOverListeners,f=this.mouseState,e=0;e<g.length;){try{var k=g[e];k(f,g);-1==T.indexOf(g,k)&&--e}catch(Yc){if(ra.lastException=Yc,"string"!=typeof(Yc instanceof E?Yc.val:Yc))throw Yc;}++e}}else if(0<this.mouseState)for(this.mouseState=-1,k=this.mouseOverListeners,g=this.mouseState,f=0;f<k.length;){try{c=k[f],c(g,k),-1==T.indexOf(k,c)&&--f}catch(Yc){if(ra.lastException=
Yc,"string"!=typeof(Yc instanceof E?Yc.val:Yc))throw Yc;}++f}else-1==this.mouseState&&(this.mouseState=0);k=this.type.ID;g=1E6+this.groupID;e=this.engine.collisionListeners;f=this.engine.typeGroupPositionListeners;if(0==this.physicsMode&&(0<this.collisionListenerCount||null!=e.h[k]||null!=e.h[g])){if(0<this.contactCount)for(c=0,b=this.contacts.iterator();b.hasNext();){d=b.next();var l=d.key;var m=this.collisions.mH;var z=m.mHash[73856093*l&m.mMask];if(-1==z)z=!1;else if(m=m.mData,m[z]==l)z=!0;else{var n=
!1;for(z=m[z+2];-1!=z;){if(m[z]==l){n=!0;break}z=m[z+2]}z=n}if(z){z=this.collisions;n=z.mH;m=n.mHash[73856093*l&n.mMask];if(-1==m)l=-2147483648;else if(n=n.mData,n[m]==l)l=n[m+1];else{var p=-2147483648;for(m=n[m+2];-1!=m;){if(n[m]==l){p=n[m+1];break}m=n[m+2]}l=p}l=-2147483648==l?null:z.mVals[l];d.getWorldManifold(Bb.manifold);z=0;for(m=Bb.manifold.m_points;z<m.length;)n=m[z],++z,0!=n.x&&0!=n.y&&(d=l.points[c],null==d?l.points[c]=ue.get(n.x,n.y,Bb.manifold.m_normal.x,Bb.manifold.m_normal.y):(d=l.points[c],
d.x=n.x,d.y=n.y,d.normalX=Bb.manifold.m_normal.x,d.normalY=Bb.manifold.m_normal.y),++c);for(;l.points.length>c;)ue.free(l.points.pop());c=0}else{var h=d.getFixtureA().getUserData(),q=d.getFixtureB().getUserData();h==this?(z=q,m=d.getFixtureB(),n=d.getFixtureA()):(z=h,m=d.getFixtureA(),n=d.getFixtureB());p=new Cc;p.otherActor=z;p.otherShape=m;p.thisActor=this;p.thisShape=n;p.actorA=h;p.actorB=q;d.getWorldManifold(Bb.manifold);this.collisions.set(l,p);this.collisionsCount++;l=this.getBody();h=z.getBody();
q=d.getFixtureA().getBody();for(var t=d.getFixtureB().getBody(),r=0,u=Bb.manifold.m_points;r<u.length;)(d=u[r],++r,0==d.x||0==d.y||n.isSensor())?n.isSensor()&&(null!=z&&(p.thisCollidedWithActor=p.thisCollidedWithActor||1!=z.groupID&&-2!=z.groupID&&!z.isTerrainRegion,p.thisCollidedWithTerrain=p.thisCollidedWithTerrain||z.isTerrainRegion,p.thisCollidedWithTile=p.thisCollidedWithTile||1==z.groupID),p.otherCollidedWithActor=p.otherCollidedWithActor||1!=this.groupID&&-2!=this.groupID&&!this.isTerrainRegion,
p.otherCollidedWithTerrain=p.otherCollidedWithTerrain||this.isTerrainRegion,p.otherCollidedWithTile=p.otherCollidedWithTile||1==this.groupID,p.thisCollidedWithSensor=p.thisCollidedWithSensor||m.isSensor(),p.otherCollidedWithSensor=p.otherCollidedWithSensor||n.isSensor()):(d=ue.get(d.x,d.y,Bb.manifold.m_normal.x,Bb.manifold.m_normal.y),p.points.push(d),q==l?(p.thisFromBottom=p.thisFromBottom||0<d.normalY,p.thisFromTop=p.thisFromTop||0>d.normalY,p.thisFromLeft=p.thisFromLeft||0>d.normalX,p.thisFromRight=
p.thisFromRight||0<d.normalX):t==l&&(p.thisFromBottom=p.thisFromBottom||0>d.normalY,p.thisFromTop=p.thisFromTop||0<d.normalY,p.thisFromLeft=p.thisFromLeft||0<d.normalX,p.thisFromRight=p.thisFromRight||0>d.normalX),q==h?(p.otherFromBottom=p.otherFromBottom||0<d.normalY,p.otherFromTop=p.otherFromTop||0>d.normalY,p.otherFromLeft=p.otherFromLeft||0>d.normalX,p.otherFromRight=p.otherFromRight||0<d.normalX):t==h&&(p.otherFromBottom=p.otherFromBottom||0>d.normalY,p.otherFromTop=p.otherFromTop||0<d.normalY,
p.otherFromLeft=p.otherFromLeft||0<d.normalX,p.otherFromRight=p.otherFromRight||0>d.normalX),null!=z&&(p.thisCollidedWithActor=p.thisCollidedWithActor||1!=z.groupID&&-2!=z.groupID&&!z.isTerrainRegion,p.thisCollidedWithTerrain=p.thisCollidedWithTerrain||z.isTerrainRegion,p.thisCollidedWithTile=p.thisCollidedWithTile||1==z.groupID),p.otherCollidedWithActor=p.otherCollidedWithActor||1!=this.groupID&&-2!=this.groupID&&!this.isTerrainRegion,p.otherCollidedWithTerrain=p.otherCollidedWithTerrain||this.isTerrainRegion,
p.otherCollidedWithTile=p.otherCollidedWithTile||1==this.groupID,p.thisCollidedWithSensor=p.thisCollidedWithSensor||m.isSensor(),p.otherCollidedWithSensor=p.otherCollidedWithSensor||n.isSensor())}}if(0<this.collisionsCount)for(c=this.collisions.iterator();c.hasNext();)if(b=c.next(),null!=b&&null!=b.thisActor&&null!=b.otherActor&&b.thisActor.handlesCollisions&&b.otherActor.handlesCollisions){Bb.lastCollided=b.otherActor;d=this.collisionListeners;l=b;for(z=0;z<d.length;){try{var x=d[z];x(l,d);-1==T.indexOf(d,
x)&&--z}catch(Yc){if(ra.lastException=Yc,"string"!=typeof(Yc instanceof E?Yc.val:Yc))throw Yc;}++z}this.engine.handleCollision(this,b)}}this.internalUpdate(a,!0);1==this.physicsMode&&((0<this.collisionListenerCount||null!=e.h[k]||null!=e.h[g])&&this.handleCollisionsSimple(),this.disposeRemovedCollisionInfo());if(2!=this.physicsMode)for(x=this.whenUpdatedListeners,e=0;e<x.length;){try{var w=x[e];w(a,x);-1==T.indexOf(x,w)&&--e}catch(Yc){if(ra.lastException=Yc,"string"!=typeof(Yc instanceof E?Yc.val:
Yc))throw Yc;}++e}(0<this.positionListenerCount||null!=f.h[k]||null!=f.h[g])&&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(10/p.STEP_SIZE*this.xSpeed*a*.01,10/p.STEP_SIZE*
this.ySpeed*a*.01,!1);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*p.physicsScale;this.realY=c.y*p.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&&(b=this.currAnimation,b.model.sync&&b.model.looping?(a=b.frameIndex,b.timer=b.model.sharedTimer,b.frameIndex=b.model.sharedFrameIndex,a!=b.frameIndex&&(null!=b.filter?(b.filteredFrames[b.frameIndex]||(b.frames[b.frameIndex]=b.applyFilters(b.frames[b.frameIndex],b.model.frames[b.frameIndex],b.filter),b.filteredFrames[b.frameIndex]=!0),b.set_bitmapData(b.frames[b.frameIndex])):
b.set_bitmapData(b.model.frames[b.frameIndex]),b.smoothing=ma.antialias)):(b.timer+=a,0<b.numFrames&&b.timer>b.durations[b.frameIndex]&&(a=b.frameIndex,b.timer-=b.durations[b.frameIndex],b.frameIndex++,b.frameIndex>=b.numFrames&&(b.model.looping?b.frameIndex=0:(b.finished=!0,b.frameIndex--)),a!=b.frameIndex&&(null!=b.filter?(b.filteredFrames[b.frameIndex]||(b.frames[b.frameIndex]=b.applyFilters(b.frames[b.frameIndex],b.model.frames[b.frameIndex],b.filter),b.filteredFrames[b.frameIndex]=!0),b.set_bitmapData(b.frames[b.frameIndex])):
b.set_bitmapData(b.model.frames[b.frameIndex]),b.smoothing=ma.antialias))))}},updateDrawingMatrix:function(a){null==a&&(a=!1);if(!this.paused||a)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):0!=this.physicsMode?(this.drawX=this.realX,this.drawY=this.realY):(a=this.body.getPosition(),this.drawX=a.x*p.physicsScale,this.drawY=a.y*p.physicsScale),this.transformPoint.x=(this.currOrigin.x-this.cacheWidth/2)*p.SCALE,this.transformPoint.y=(this.currOrigin.y-this.cacheHeight/2)*p.SCALE,this.transformMatrix.identity(),this.transformMatrix.translate(-this.transformPoint.x,
-this.transformPoint.y),this.transformMatrix.scale(this.realScaleX,this.realScaleY),0!=this.realAngle&&this.transformMatrix.rotate(.01745329251994278*this.realAngle),ma.pixelsnap?this.transformMatrix.translate(Math.round(this.drawX)*p.SCALE,Math.round(this.drawY)*p.SCALE):this.transformMatrix.translate(this.drawX*p.SCALE,this.drawY*p.SCALE),null==this.transformObj&&(this.transformObj=this.get_transform()),this.transformObj.set_matrix(this.transformMatrix)},updateTweenAlpha:function(){this.set_alpha(this.tweenProps.alpha.value)},
updateTweenScaleXY:function(){this.realScaleX=this.tweenProps.realScaleXY.value1;this.realScaleY=this.tweenProps.realScaleXY.value2;this.updateBodyScale()},updateTweenAngle:function(){this.setAngle(this.tweenProps.angle.value,!1)},updateTweenXY:function(){0==this.physicsMode?this.setXY(this.tweenProps.xy.value1,this.tweenProps.xy.value2):(this.moveActorBy(this.tweenProps.xy.value1-this.getX(!1),this.tweenProps.xy.value2-this.getY(!1),!1),this.updateMatrix=!0);this.tweenProps.xy.finished&&null!=this.currOffset&&
this.resetReal(this.realX,this.realY)},updateBodyScale:function(){this.autoScale&&0==this.physicsMode&&null!=this.body&&this.bodyDef.type!=wa.b2_staticBody&&0!=this.realScaleX&&0!=this.realScaleY&&this.scaleBody(this.realScaleX,this.realScaleY)},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 f=e.getShape();e=this.body.getLocalCenter();if(f instanceof cd){var g=f,k=1/this.bodyScale.x*a,l=1/this.bodyScale.y*
b,m=g.m_p;m.subtract(e);m.x*=k;m.y*=l;g.m_p=e.copy();g.m_p.add(m);f.m_radius*=Math.abs(k)}else if(f instanceof Lb){g=f.m_vertices;k=[];l=0<this.bodyScale.x&&0>a||0>this.bodyScale.x&&0<a;m=0<this.bodyScale.y&&0>b||0>this.bodyScale.y&&0<b;for(var p=0;p<g.length;){var n=g[p];++p;n.subtract(e);n.x=1/Math.abs(this.bodyScale.x)*n.x*Math.abs(a);n.y=1/Math.abs(this.bodyScale.y)*n.y*Math.abs(b);l&&(n.x=-n.x);m&&(n.y=-n.y);var h=e.copy();h.add(n);k.push(h)}l&&m||!l&&!m||k.reverse();f.setAsArray(k,k.length)}}this.bodyScale.x=
a;this.bodyScale.y=b},checkScreenState:function(){for(var a=this.isOnScreen(),b=a||this.isInScene(),c=!this.lastScreenState&&a,d=!this.lastSceneState&&b,e=this.lastScreenState&&!a,f=this.lastSceneState&&!b,g=this.positionListeners,k=0;k<g.length;){try{var l=g[k];l(c,e,d,f,g);-1==T.indexOf(g,l)&&--k}catch(n){if(ra.lastException=n,"string"!=typeof(n instanceof E?n.val:n))throw n;}++k}k=this.engine.typeGroupPositionListeners.h[this.groupID+1E6];g=this.engine.typeGroupPositionListeners.h[this.typeID];
if(null!=k)for(l=0;l<k.length;){try{var m=k[l];m(this,c,e,d,f,k);-1==T.indexOf(k,m)&&--l}catch(n){if(ra.lastException=n,"string"!=typeof(n instanceof E?n.val:n))throw n;}++l}if(null!=g)for(m=0;m<g.length;){try{var p=g[m];p(this,c,e,d,f,g);-1==T.indexOf(g,p)&&--m}catch(n){if(ra.lastException=n,"string"!=typeof(n instanceof E?n.val:n))throw n;}++m}this.lastScreenState=a;this.lastSceneState=b},contactCount:null,collisionsCount:null,handleCollisions:function(){if(0<this.contactCount)for(var a=0,b,c=this.contacts.iterator();c.hasNext();){b=
c.next();var d=b.key;var e=this.collisions.mH;var f=e.mHash[73856093*d&e.mMask];if(-1==f)f=!1;else if(e=e.mData,e[f]==d)f=!0;else{var g=!1;for(f=e[f+2];-1!=f;){if(e[f]==d){g=!0;break}f=e[f+2]}f=g}if(f){f=this.collisions;g=f.mH;e=g.mHash[73856093*d&g.mMask];if(-1==e)d=-2147483648;else if(g=g.mData,g[e]==d)d=g[e+1];else{var k=-2147483648;for(e=g[e+2];-1!=e;){if(g[e]==d){k=g[e+1];break}e=g[e+2]}d=k}d=-2147483648==d?null:f.mVals[d];b.getWorldManifold(Bb.manifold);f=0;for(e=Bb.manifold.m_points;f<e.length;)g=
e[f],++f,0!=g.x&&0!=g.y&&(b=d.points[a],null==b?d.points[a]=ue.get(g.x,g.y,Bb.manifold.m_normal.x,Bb.manifold.m_normal.y):(b=d.points[a],b.x=g.x,b.y=g.y,b.normalX=Bb.manifold.m_normal.x,b.normalY=Bb.manifold.m_normal.y),++a);for(;d.points.length>a;)ue.free(d.points.pop());a=0}else{var l=b.getFixtureA().getUserData(),m=b.getFixtureB().getUserData();l==this?(f=m,e=b.getFixtureB(),g=b.getFixtureA()):(f=l,e=b.getFixtureA(),g=b.getFixtureB());k=new Cc;k.otherActor=f;k.otherShape=e;k.thisActor=this;k.thisShape=
g;k.actorA=l;k.actorB=m;b.getWorldManifold(Bb.manifold);this.collisions.set(d,k);this.collisionsCount++;d=this.getBody();l=f.getBody();m=b.getFixtureA().getBody();for(var p=b.getFixtureB().getBody(),n=0,h=Bb.manifold.m_points;n<h.length;)(b=h[n],++n,0==b.x||0==b.y||g.isSensor())?g.isSensor()&&(null!=f&&(k.thisCollidedWithActor=k.thisCollidedWithActor||1!=f.groupID&&-2!=f.groupID&&!f.isTerrainRegion,k.thisCollidedWithTerrain=k.thisCollidedWithTerrain||f.isTerrainRegion,k.thisCollidedWithTile=k.thisCollidedWithTile||
1==f.groupID),k.otherCollidedWithActor=k.otherCollidedWithActor||1!=this.groupID&&-2!=this.groupID&&!this.isTerrainRegion,k.otherCollidedWithTerrain=k.otherCollidedWithTerrain||this.isTerrainRegion,k.otherCollidedWithTile=k.otherCollidedWithTile||1==this.groupID,k.thisCollidedWithSensor=k.thisCollidedWithSensor||e.isSensor(),k.otherCollidedWithSensor=k.otherCollidedWithSensor||g.isSensor()):(b=ue.get(b.x,b.y,Bb.manifold.m_normal.x,Bb.manifold.m_normal.y),k.points.push(b),m==d?(k.thisFromBottom=k.thisFromBottom||
0<b.normalY,k.thisFromTop=k.thisFromTop||0>b.normalY,k.thisFromLeft=k.thisFromLeft||0>b.normalX,k.thisFromRight=k.thisFromRight||0<b.normalX):p==d&&(k.thisFromBottom=k.thisFromBottom||0>b.normalY,k.thisFromTop=k.thisFromTop||0<b.normalY,k.thisFromLeft=k.thisFromLeft||0<b.normalX,k.thisFromRight=k.thisFromRight||0>b.normalX),m==l?(k.otherFromBottom=k.otherFromBottom||0<b.normalY,k.otherFromTop=k.otherFromTop||0>b.normalY,k.otherFromLeft=k.otherFromLeft||0>b.normalX,k.otherFromRight=k.otherFromRight||
0<b.normalX):p==l&&(k.otherFromBottom=k.otherFromBottom||0>b.normalY,k.otherFromTop=k.otherFromTop||0<b.normalY,k.otherFromLeft=k.otherFromLeft||0<b.normalX,k.otherFromRight=k.otherFromRight||0>b.normalX),null!=f&&(k.thisCollidedWithActor=k.thisCollidedWithActor||1!=f.groupID&&-2!=f.groupID&&!f.isTerrainRegion,k.thisCollidedWithTerrain=k.thisCollidedWithTerrain||f.isTerrainRegion,k.thisCollidedWithTile=k.thisCollidedWithTile||1==f.groupID),k.otherCollidedWithActor=k.otherCollidedWithActor||1!=this.groupID&&
-2!=this.groupID&&!this.isTerrainRegion,k.otherCollidedWithTerrain=k.otherCollidedWithTerrain||this.isTerrainRegion,k.otherCollidedWithTile=k.otherCollidedWithTile||1==this.groupID,k.thisCollidedWithSensor=k.thisCollidedWithSensor||e.isSensor(),k.otherCollidedWithSensor=k.otherCollidedWithSensor||g.isSensor())}}if(0<this.collisionsCount)for(a=this.collisions.iterator();a.hasNext();)if(c=a.next(),null!=c&&null!=c.thisActor&&null!=c.otherActor&&c.thisActor.handlesCollisions&&c.otherActor.handlesCollisions){Bb.lastCollided=
c.otherActor;b=this.collisionListeners;d=c;for(f=0;f<b.length;){try{var q=b[f];q(d,b);-1==T.indexOf(b,q)&&--f}catch(Jp){if(ra.lastException=Jp,"string"!=typeof(Jp instanceof E?Jp.val:Jp))throw Jp;}++f}this.engine.handleCollision(this,c)}},addContact:function(a){null!=this.contacts&&(this.contacts.set(a.key,a),this.contactCount++)},removeContact:function(a){if(null!=this.collisions){var b=this.collisions,c=a.key,d=b.mH,e=d.mHash[73856093*c&d.mMask];if(-1==e)c=-2147483648;else if(d=d.mData,d[e]==c)c=
d[e+1];else{var f=-2147483648;for(e=d[e+2];-1!=e;){if(d[e]==c){f=d[e+1];break}e=d[e+2]}c=f}b=-2147483648==c?null:b.mVals[c];if(null!=b)for(this.collisions.unset(a.key),this.collisionsCount--;0<b.points.length;)ue.free(b.points.pop())}null!=this.contacts&&this.contacts.unset(a.key)&&this.contactCount--},addRegionContact:function(a){null!=this.regionContacts&&this.regionContacts.set(a.key,a)},removeRegionContact:function(a){null!=this.regionContacts&&this.regionContacts.unset(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.layer.ID},getLayer:function(){return this.layer},getLayerName:function(){return this.layer.layerName},getLayerOrder:function(){return this.layer.order},getType:function(){return this.type},isPausable:function(){return this.getType().pausable},isPaused:function(){return this.paused},pause:function(){if(this.isPausable()){this.tweenProps.pause();
for(var a=0,b=this.behaviors.behaviors;a<b.length;){var c=b[a];++a;null!=c.script&&c.script.pauseTweens()}this.paused=!0;0==this.physicsMode&&this.body.setPaused(!0)}},unpause:function(){if(this.isPausable()){this.tweenProps.unpause();for(var a=0,b=this.behaviors.behaviors;a<b.length;){var c=b[a];++a;null!=c.script&&c.script.unpauseTweens()}this.paused=!1;0==this.physicsMode&&this.body.setPaused(!1)}},getGroup:function(){var a=this.engine.groups,b=this.getGroupID();return a.h[b]},getIsRegion:function(){return this.isRegion},
getIsTerrainRegion:function(){return this.isTerrainRegion},moveToLayer:function(a){!this.isHUD&&a instanceof Rc&&this.engine.moveActorToLayer(this,a)},bringToFront:function(){this.isHUD||(this.engine.bringToFront(this),this.moveToTop())},bringForward:function(){this.isHUD||this.engine.bringForward(this)},sendToBack:function(){this.isHUD||(this.engine.sendToBack(this),this.moveToBottom())},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;p.NO_PHYSICS||(this.isRegion||this.isTerrainRegion?b=p.toPixelUnits(this.body.getPosition().x)-this.cacheWidth/2:0==this.physicsMode&&(b=this.body.getPosition().x*p.physicsScale-Math.floor(this.cacheWidth/2)-this.currOffset.x));if(p.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;p.NO_PHYSICS||(this.isRegion||this.isTerrainRegion?b=p.toPixelUnits(this.body.getPosition().y)-
this.cacheHeight/2:0==this.physicsMode&&(b=this.body.getPosition().y*p.physicsScale-Math.floor(this.cacheHeight/2)-this.currOffset.y));if(p.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(p.toPixelUnits(this.body.getWorldCenter().x)-this.currOffset.x):this.realX-this.currOffset.x},getYCenter:function(){return 0==this.physicsMode?Math.round(p.toPixelUnits(this.body.getWorldCenter().y)-
this.currOffset.y):this.realY-this.currOffset.y},getScreenX:function(){return this.isHUD?this.getX(!0):this.getX(!0)-p.cameraX/p.SCALE},getScreenY:function(){return this.isHUD?this.getY(!0):this.getY(!0)-p.cameraY/p.SCALE},setX:function(a,b,c){null==c&&(c=!1);null==b&&(b=!1);1==this.physicsMode?(b=c||!this.continuousCollision,null==b&&(b=!0),this.moveActorBy(a+Math.floor(this.cacheWidth/2)+this.currOffset.x-this.realX,this.realY-this.realY,b,!1)):2==this.physicsMode?this.resetReal(a+Math.floor(this.cacheWidth/
2)+this.currOffset.x,this.realY):(this.dummy.x=this.isRegion||this.isTerrainRegion?p.toPhysicalUnits(a):p.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?(b=c||!this.continuousCollision,null==b&&(b=!0),this.moveActorBy(this.realX-
this.realX,a+Math.floor(this.cacheHeight/2)+this.currOffset.y-this.realY,b,!1)):2==this.physicsMode?this.resetReal(this.realX,a+Math.floor(this.cacheHeight/2)+this.currOffset.y):(this.dummy.y=this.isRegion||this.isTerrainRegion?p.toPhysicalUnits(a):p.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},setXY:function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!1);1==this.physicsMode?(c=d||!this.continuousCollision,null==c&&(c=!0),this.moveActorBy(a+Math.floor(this.cacheWidth/2)+this.currOffset.x-this.realX,b+Math.floor(this.cacheHeight/2)+this.currOffset.y-this.realY,c,!1),0==this.colX&&0==this.colY&&this.resetReal(this.realX,this.realY)):2==this.physicsMode?this.resetReal(a+Math.floor(this.cacheWidth/2)+this.currOffset.x,b+Math.floor(this.cacheHeight/2)+this.currOffset.y):(this.isRegion||this.isTerrainRegion?
(this.dummy.x=p.toPhysicalUnits(a),this.dummy.y=p.toPhysicalUnits(b)):(this.dummy.x=p.toPhysicalUnits(a+Math.floor(this.cacheWidth/2)+this.currOffset.x),this.dummy.y=p.toPhysicalUnits(b+Math.floor(this.cacheHeight/2)+this.currOffset.y)),this.body.setPosition(this.dummy),c&&this.body.setLinearVelocity(this.zero));this.snapOnSet&&(this.drawX=this.realX,this.drawY=this.realY);this.updateMatrix=!0},setXCenter:function(a){this.setX(a-this.getWidth()/2)},setYCenter:function(a){this.setY(a-this.getHeight()/
2)},setScreenX:function(a){this.isHUD?this.setX(a):this.setX(a+p.cameraX/p.SCALE)},setScreenY:function(a){this.isHUD?this.setY(a):this.setY(a+p.cameraY/p.SCALE)},follow:function(a){if(null!=a)if(0!=this.physicsMode){var b=a.getXCenter();a=a.getYCenter();this.moveActorBy(b-this.realX,a-this.realY,!0,!1)}else this.body.setPosition(a.body.getWorldCenter())},followWithOffset:function(a,b,c){0!=this.physicsMode?(b=a.getXCenter()+b,c=a.getYCenter()+c,this.moveActorBy(b-this.realX,c-this.realY,!0,!1)):(a=
a.body.getWorldCenter(),a.x+=p.toPhysicalUnits(b),a.y+=p.toPhysicalUnits(c),this.body.setPosition(a))},setOriginPoint:function(a,b){var c=0==this.physicsMode?this.body.getPosition():new N(p.toPhysicalUnits(this.realX),p.toPhysicalUnits(this.realY));var d=new N(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);e+=Math.atan2(-g,-f);var l=Math.sqrt(Math.pow(this.currOffset.x,2)+Math.pow(this.currOffset.y,2)),m=Math.sqrt(Math.pow(f,2)+Math.pow(g,2)),z=Math.round(this.currOrigin.y+Math.sin(k)*l),n=Math.round(b+Math.sin(e)*m);c.x+=p.toPhysicalUnits(Math.round(this.currOrigin.x+Math.cos(k)*l)-Math.round(a+Math.cos(e)*m));c.y+=p.toPhysicalUnits(z-n)}this.currOrigin.x=a;this.currOrigin.y=b;this.currOffset.x=f;this.currOffset.y=g;d.x=this.currOffset.x-d.x;d.y=this.currOffset.y-d.y;c.x+=p.toPhysicalUnits(d.x);
c.y+=p.toPhysicalUnits(d.y);0==this.physicsMode?this.body.setPosition(c):(this.realX=p.toPixelUnits(c.x),this.realY=p.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/p.physicsScale},getPhysicsHeight:function(){return this.cacheHeight/p.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(){if(this.isHUD){var a=(S.mouseX-p.engine.hudLayer.get_x())/p.SCALE;var b=(S.mouseY-p.engine.hudLayer.get_y())/p.SCALE}else a=(S.mouseX+p.cameraX*this.layer.scrollFactorX)/
p.SCALE,b=(S.mouseY+p.cameraY*this.layer.scrollFactorY)/p.SCALE;var c=Math.abs(this.realScaleX),d=Math.abs(this.realScaleY),e=this.currOrigin.x*(c-1),f=(this.cacheWidth-this.currOrigin.x)*(c-1),g=this.currOrigin.y*(d-1),k=(this.cacheHeight-this.currOrigin.y)*(d-1);0==this.physicsMode||this.currOrigin.x==this.cacheWidth/2&&this.currOrigin.y==this.cacheHeight/2||this.resetReal(this.realX,this.realY);var l=this.colX-e,m=this.colY-g;if(0!=this.get_rotation()){c=l+this.currOrigin.x*c;d=m+this.currOrigin.y*
d;a-=c;b-=d;var z=.01745329251994278*this.get_rotation();d=d-a*Math.sin(z)+b*Math.cos(z);a=c+a*Math.cos(z)+b*Math.sin(z);b=d}return this.isHUD&&!p.engine.isHUDZoomable?a>=l/p.engine.zoomMultiplier&&b>=m/p.engine.zoomMultiplier&&a<(l+this.cacheWidth+e+f)/p.engine.zoomMultiplier?b<(m+this.cacheHeight+g+k)/p.engine.zoomMultiplier:!1:a>=l&&b>=m&&a<l+this.cacheWidth+e+f?b<m+this.cacheHeight+g+k:!1},isMouseHover:function(){return this.isMouseOver()?!S.mouseDown:!1},isMouseDown:function(){return this.isMouseOver()?
S.mouseDown:!1},isMousePressed:function(){return this.isMouseOver()?S.mousePressed:!1},isMouseReleased:function(){return this.isMouseOver()?S.mouseReleased:!1},cancelTweens:function(){this.tweenProps.cancel()},fadeTo:function(a,b,c){null==b&&(b=1);this.tweenProps.alpha.tween(this.get_alpha(),a,c,1E3*b|0)},growTo:function(a,b,c,d){null==c&&(c=1);null==b&&(b=1);null==a&&(a=1);this.tweenProps.realScaleXY.tween(this.realScaleX,a,this.realScaleY,b,d,1E3*c|0)},spinTo:function(a,b,c){null==b&&(b=1);this.tweenProps.angle.tween(this.getAngleInDegrees(),
a,c,1E3*b|0)},moveTo:function(a,b,c,d){null==c&&(c=1);this.tweenProps.xy.tween(this.getX(!1),a,this.getY(!1),b,d,1E3*c|0)},spinBy:function(a,b,c){null==b&&(b=1);this.spinTo(this.getAngleInDegrees()+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)},drawImage:function(a){if(null!=this.currAnimation){var b=0,c=0;0<this.realAngle&&(this.drawMatrix.identity(),this.transformPoint.x=(0-this.cacheWidth/2)*p.SCALE,this.transformPoint.y=(0-this.cacheHeight/2)*
p.SCALE,this.drawMatrix.translate(-this.transformPoint.x,-this.transformPoint.y),this.drawMatrix.scale(this.realScaleX,this.realScaleY),this.drawMatrix.rotate(.01745329251994278*this.realAngle),this.drawMatrix.translate(this.colX*p.SCALE,this.colY*p.SCALE),b+=this.transformMatrix.tx-this.drawMatrix.tx,c+=this.transformMatrix.ty-this.drawMatrix.ty);var d=this.currAnimation.get_visible();this.currAnimation.set_visible(!0);var e=this.currAnimation,f=.01745329251994278*this.realAngle;if(!ma.disposeImages||
e.model.checkImageReadable()){e=e.get_bitmapData();null==f&&(f=0);b*=a.scaleX;c*=a.scaleY;a.rect.x=0;a.rect.y=0;a.rect.width=e.width;a.rect.height=e.height;a.drawActor?null!=a.actor&&a.actor.isHUD?(a.point.x=a.x+b,a.point.y=a.y+c):(a.point.x=a.x+b-p.cameraX,a.point.y=a.y+c-p.cameraY):(a.point.x=a.x+b,a.point.y=a.y+c);a.mtx.identity();a.mtx.rotate(f);a.mtx.translate(a.point.x,a.point.y);if(0==f)1!=a.alpha&&(a.point2.x=0,a.point2.y=0,a.rect2.width=e.width,a.rect2.height=e.height,c=new na(e.width,e.height,
!0,a.toARGB(0,255*a.alpha|0)),b=new na(e.width,e.height,!0,0),b.copyPixels(e,a.rect2,a.point2,c,null,!0),e=b),a.graphics.beginBitmapFill(e,a.mtx),a.graphics.drawRect(a.point.x,a.point.y,e.width,e.height);else{1!=a.alpha&&(a.point2.x=0,a.point2.y=0,a.rect2.width=e.width,a.rect2.height=e.height,c=new na(e.width,e.height,!0,a.toARGB(0,255*a.alpha|0)),b=new na(e.width,e.height,!0,0),b.copyPixels(e,a.rect2,a.point2,c,null,!0),e=b);c=new na(e.width+2,e.height+2,!0,0);b=Math.sqrt(Math.pow(c.width,2)+Math.pow(c.height,
2))|0;f=new ia(0,0,e.width,e.height);var g=new pa(1,1);c.copyPixels(e,f,g);a.graphics.beginBitmapFill(c,a.mtx,!1,ma.antialias);a.graphics.drawRect(a.x-(b-e.width)/2,a.y-(b-e.height)/2,b,b)}a.graphics.endFill()}this.currAnimation.set_visible(d)}},getCurrentImage:function(){return this.currAnimation.getCurrentImage()},enableActorDrawing:function(){this.drawActor=!0;null!=this.currAnimation&&this.currAnimation.set_visible(!0)},disableActorDrawing:function(){this.drawActor=!1;null!=this.currAnimation&&
this.currAnimation.set_visible(!1)},drawsImage:function(){return this.drawActor},setFilter:function(a){null==this.bitmapFilters&&(this.bitmapFilters=[]);this.bitmapFilters=this.bitmapFilters.concat(a);this.currAnimation.set_filter(this.bitmapFilters)},clearFilters:function(){this.bitmapFilters=null;this.currAnimation.set_filter(null)},setBlendMode:function(a){this.set_blendMode(a)},resetBlendMode:function(){this.set_blendMode(10)},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){if(null!=this.registry){var c=this.registry;null!=q[a]?c.setReserved(a,b):c.h[a]=b}},getActorValue:function(a){if(null==this.registry)return null;var b=this.registry;return null!=q[a]?b.getReserved(a):b.h[a]},hasActorValue:function(a){if(null==this.registry)return null;
var b=this.registry;return null!=(null!=q[a]?b.getReserved(a):b.h[a])},registerListener:function(a,b){var c=T.indexOf(this.allListenerReferences,a);-1!=c?a=this.allListeners.h[c]:(this.allListenerReferences.push(a),c=this.allListenerReferences.length-1,a=[],this.allListeners.h[c]=a);a.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=L.__cast(this.allListeners.h[c],Array),null!=c))for(var e=0,f=c.length;e<
f;){var g=e++;g=c[g];for(var k=d.length-1;-1<k;)d[k]==g&&d.splice(k,1),--k}}this.allListenerReferences.length=0},anchorToScreen:function(){this.isHUD||this.engine.moveActorToLayer(this,this.engine.hudLayer)},unanchorFromScreen:function(){this.isHUD&&this.engine.moveActorToLayer(this,this.cachedLayer)},isAnchoredToScreen:function(){return this.isHUD},makeAlwaysSimulate:function(a){null==a&&(a=!0);this.alwaysSimulate||(0==this.physicsMode&&a&&(this.body.setAlwaysActive(!0),this.body.setActive(!0)),
this.alwaysSimulate=!0)},makeSometimesSimulate:function(a){null==a&&(a=!0);this.alwaysSimulate&&(0==this.physicsMode&&a&&(this.body.setAlwaysActive(!1),this.body.setActive(!1)),this.alwaysSimulate=!1)},alwaysSimulates:function(){return this.alwaysSimulate},die:function(){this.dying=!0;var a=this.engine.whenTypeGroupDiesListeners,b=this.getType();a=a.h[b.__id__];b=this.engine.whenTypeGroupDiesListeners;var c=this.getGroup();b=b.h[c.__id__];c=this.whenKilledListeners;for(var d=0;d<c.length;){try{var e=
c[d];e(c);-1==T.indexOf(c,e)&&--d}catch(k){if(ra.lastException=k,"string"!=typeof(k instanceof E?k.val:k))throw k;}++d}if(null!=a)for(e=0;e<a.length;){try{var f=a[e];f(this,a);-1==T.indexOf(a,f)&&--e}catch(k){if(ra.lastException=k,"string"!=typeof(k instanceof E?k.val:k))throw k;}++e}if(null!=b)for(f=0;f<b.length;){try{var g=b[f];g(this,b);-1==T.indexOf(b,g)&&--f}catch(k){if(ra.lastException=k,"string"!=typeof(k instanceof E?k.val:k))throw k;}++f}this.removeAllListeners()},isDying:function(){return this.dying},
isAlive:function(){return!(this.dead||this.dying||this.recycled)},isOnScreen:function(){var a=p.cameraX/p.SCALE,b=p.cameraY/p.SCALE,c=p.paddingLeft,d=p.paddingTop,e=p.paddingRight,f=p.paddingBottom;return(0!=this.physicsMode||this.body.isActive())&&this.getX(!0)+this.cacheWidth>=a-c&&this.getY(!0)+this.cacheHeight>=b-d&&this.getX(!0)<a+p.screenWidth+e?this.getY(!0)<b+p.screenHeight+f:!1},isInScene:function(){return(0!=this.physicsMode||this.body.isActive())&&0<=this.getX(!0)+this.cacheWidth&&0<=this.getY(!0)+
this.cacheHeight&&this.getX(!0)<p.sceneWidth?this.getY(!0)<p.sceneHeight:!1},getLastCollidedActor:function(){return Bb.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 Lb,f=[];a=p.toPhysicalUnits(a-Math.floor(this.cacheWidth/2)-this.currOffset.x);b=p.toPhysicalUnits(b-Math.floor(this.cacheHeight/
2)-this.currOffset.y);c=p.toPhysicalUnits(c);d=p.toPhysicalUnits(d);f.push(new N(a,b));f.push(new N(a+c,b));f.push(new N(a+c,b+d));f.push(new N(a,b+d));e.setAsVector(f);this.createFixture(e).SetUserData(this)}},addCircularShape:function(a,b,c){if(0==this.physicsMode){var d=new cd;d.m_radius=p.toPhysicalUnits(c);d.m_p.x=p.toPhysicalUnits(a);d.m_p.y=p.toPhysicalUnits(b);this.createFixture(d).SetUserData(this)}},addVertex:function(a,b,c){b=p.toPhysicalUnits(b-Math.floor(this.cacheWidth/2)-this.currOffset.x);
c=p.toPhysicalUnits(c-Math.floor(this.cacheHeight/2)-this.currOffset.y);a.push(new N(b,c))},addPolygonalShape:function(a){if(0==this.physicsMode){var b=new Lb;b.setAsArray(a);this.createFixture(b).SetUserData(this)}},createFixture:function(a){var b=new kg;b.shape=a;b.density=.1*this.bodyDef.mass;b.friction=this.bodyDef.friction;b.restitution=this.bodyDef.bounciness;return this.body.createFixture(b)},getLastCreatedFixture:function(){return 0==this.physicsMode?this.body.getFixtureList():null},setLocation:function(a,
b){this.realX=a;this.realY=b;this.setXY(a,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){for(var d=this.collidedList.length,e=0;e<a.length;){var f=a[e];++e;-2!=f&&this.collideInto(f,b,c,this.collidedList)}return this.collidedList.length>d?this.collidedList[this.collidedList.length-1]: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))&&(T.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)&&(T.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)}},disposeRemovedCollisionInfo:function(){if(0<this.collisionsCount){for(var a=-1,b=this.simpleCollisions.keys();b.hasNext();){var c=b.next(),d=this.simpleCollisions,
e=d.mH,f=e.mHash[73856093*c&e.mMask];if(-1==f)f=-2147483648;else if(e=e.mData,e[f]==c)f=e[f+1];else{var g=-2147483648;for(f=e[f+2];-1!=f;){if(e[f]==c){g=e[f+1];break}f=e[f+2]}f=g}(-2147483648==f?null:d.mVals[f]).remove?this.simpleCollisions.unset(c):c>a&&(a=c)}this.collisionsCount=a+1}},clearCollidedList:function(){for(;0<this.collidedList.length;)this.collidedList.pop();this.listChecked=0},addCollision:function(a){var b=this.alreadyCollided(a);if(-1!=b){var c=this.simpleCollisions,d=c.mH,e=d.mHash[73856093*
b&d.mMask];if(-1==e)e=-2147483648;else if(d=d.mData,d[e]==b)e=d[e+1];else{var f=-2147483648;for(e=d[e+2];-1!=e;){if(d[e]==b){f=d[e+1];break}e=d[e+2]}e=f}c=-2147483648==e?null:c.mVals[e];a.switchData(c.linkedCollision);a.linkedCollision.remove=!1;a.remove=!1;Cc.recycle(c);this.simpleCollisions.unset(b);this.simpleCollisions.set(b,a);return a}this.simpleCollisions.unset(this.collisionsCount);this.simpleCollisions.set(this.collisionsCount,a);this.collisionsCount++;return a},alreadyCollided:function(a){for(var b=
this.simpleCollisions.keys();b.hasNext();){var c=b.next(),d=this.simpleCollisions,e=d.mH,f=e.mHash[73856093*c&e.mMask];if(-1==f)f=-2147483648;else if(e=e.mData,e[f]==c)f=e[f+1];else{var g=-2147483648;for(f=e[f+2];-1!=f;){if(e[f]==c){g=e[f+1];break}f=e[f+2]}f=g}d=-2147483648==f?null:d.mVals[f];if(null!=d&&(d.maskA==a.maskA&&d.maskB==a.maskB||d.maskA==a.maskB&&d.maskB==a.maskA))if(d.solidCollision)if(1==d.maskA.groupID||1==d.maskB.groupID){if(d.thisFromLeft||d.thisFromRight)if(a.thisFromLeft||a.thisFromRight)return c;
if(d.thisFromTop||d.thisFromBottom)if(a.thisFromTop||a.thisFromBottom)return c}else return c;else return c}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&&this._mask.lastCheckedMask instanceof ld){var b=this._mask.lastCheckedMask;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&&this._mask.lastCheckedMask instanceof ld){var b=this._mask.lastCheckedMask;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=Cc.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=Cc.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);null==c&&(c=!0);if(0!=a||0!=b){this.clearCollisionInfoList();if(!c&&this.collidable&&null!=this.HITBOX.collideTypes){c=this.HITBOX.collideTypes;if(0!=a){var e=0<a?Math.ceil(this.realX+a):Math.floor(this.realX+
a);this.clearCollidedList();if(d||null!=this.collideTypes(c,e,this.realY))for(this.clearCollidedList();0!=a;){var f=1<=a||-1>=a?1:Math.abs(a);f=0<a?f:-f;e=0<f?Math.ceil(this.realX+f):Math.floor(this.realX+f);var g=this.collide(-2,e,this.realY);null!=g&&L.__cast(g,Nd).addActor(this);g=this.collideTypes(c,e,this.realY);if(null!=g&&(e=this.getAllCollisionInfo(f,0),null!=e)){this.xSpeed=0;e.useBounds&&(this.realX=0<f?e.bounds.x-Math.ceil(this.adjustByWidth(!0)):e.bounds.x+e.bounds.width+Math.floor(this.adjustByWidth(!1)));
break}this.realX+=f;a-=f}else this.realX+=a}if(0!=b)if(e=0<b?Math.ceil(this.realY+b):Math.floor(this.realY+b),this.clearCollidedList(),d||null!=this.collideTypes(c,this.realX,e))for(this.clearCollidedList();0!=b;){f=1<=b||-1>=b?1:Math.abs(b);f=0<b?f:-f;e=0<f?Math.ceil(this.realY+f):Math.floor(this.realY+f);g=this.collide(-2,this.realX,e);null!=g&&L.__cast(g,Nd).addActor(this);g=this.collideTypes(c,this.realX,e);if(null!=g&&(a=this.getAllCollisionInfo(0,f),null!=a)){this.ySpeed=0;a.useBounds&&(this.realY=
0<f?a.bounds.y-Math.ceil(this.adjustByHeight(!0)):a.bounds.y+a.bounds.height+Math.floor(this.adjustByHeight(!1)));break}this.realY+=f;b-=f}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);null==c&&(c=!0);this.moveActorBy(a-this.realX,b-this.realY,c,d)},moveActorTowards:function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=!0);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(b instanceof Nd)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=Cc.collisionResponses,f=this.getGroupID();e=e.h[f];var g=f=!1;if(null!=e){var k=b.getGroupID();k=null!=e.h[k]}else k=
!1;k&&(k=b.getGroupID(),"sensor"==e.h[k]?(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&&(1E8==b.ID?(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&&(1E8==b.ID?(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=1E8==b.ID;a.thisCollidedWithSensor=null!=a?f||!g&&!a.maskB.solid:!1;a.thisCollidedWithTerrain=!1;a.otherCollidedWithActor=!0;a.otherCollidedWithTile=
1E8==b.ID;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();if(null!=b&&1!=b.remove){Bb.lastCollided=b.otherActor;for(var c=this.collisionListeners,d=b,e=0;e<c.length;){try{var f=c[e];f(d,c);-1==T.indexOf(c,f)&&--e}catch(g){if(ra.lastException=g,"string"!=typeof(g instanceof E?g.val:g))throw g;}++e}this.engine.handleCollision(this,b)}}},
HITBOX:null,_mask:null,colMask:null,_x:null,_y:null,_moveX:null,_moveY:null,_point:null,simpleCollisions:null,collidedList:null,listChecked:null,__class__:Bb,__properties__:w(qa.prototype.__properties__,{set_shape:"set_shape",get_shape:"get_shape"})});var pq=function(a,b,c,d){this.ID=a;this.name=b;this.allScenes=c;this.members=d;this.active=!0};h["com.stencyl.models.Atlas"]=pq;pq.__name__="com.stencyl.models.Atlas";pq.prototype={ID:null,name:null,allScenes:null,active:null,members:null,__class__:pq};
var Ji=function(){};h["com.stencyl.models.Background"]=Ji;Ji.__name__="com.stencyl.models.Background";Ji.__isInterface__=!0;Ji.prototype={update:null,draw:null,__class__:Ji};var Sm=function(a,b){this.group1=a;this.group2=b};h["com.stencyl.models.CollisionGroupDef"]=Sm;Sm.__name__="com.stencyl.models.CollisionGroupDef";Sm.prototype={group1:null,group2:null,__class__:Sm};var Tc=function(a,b,c){this.ID=a;this.atlasID=c;this.name=b;this.sID=a+","+b};h["com.stencyl.models.Resource"]=Tc;Tc.__name__="com.stencyl.models.Resource";
Tc.prototype={ID:null,atlasID:null,name:null,sID:null,toString:function(){return this.sID},isAtlasActive:function(){var a=Eb.get().atlases.h[this.atlasID];return null==a?!1:a.active},loadGraphics:function(){},unloadGraphics:function(){},reloadGraphics:function(a){this.unloadGraphics();this.loadGraphics()},__class__:Tc};var $f=function(a,b,c,d){Tc.call(this,a,c,b);this.isDefault=d;this.isAtlasActive()&&this.loadGraphics()};h["com.stencyl.models.Font"]=$f;$f.__name__="com.stencyl.models.Font";$f.resetStatics=
function(){$f.defaultFont=null};$f.__super__=Tc;$f.prototype=w(Tc.prototype,{font:null,fontScale:null,letterSpacing:null,isDefault:null,graphicsLoaded:null,getHeight:function(){return null!=this.font?this.font.getFontHeight()*this.fontScale|0:0},getTextWidth:function(a){return null!=this.font?this.font.getTextWidth(a,this.letterSpacing,this.fontScale):0},loadGraphics:function(){if(!this.graphicsLoaded){if(this.isDefault){var a=Ea.getText("assets/graphics/default-font.fnt");a=fa.parse(a);$f.defaultFont=
this.font=(new Gf).loadAngelCode(Ea.getBitmapData("assets/graphics/default-font.png"),a);this.fontScale=p.SCALE;this.letterSpacing=0;$f.defaultFont.isDefault=!0}else{a=Ea.getText("assets/graphics/"+p.IMG_BASE+"/font-"+this.ID+".fnt");a=fa.parse(a);var b=Ea.getBitmapData("assets/graphics/"+p.IMG_BASE+"/font-"+this.ID+".png",!1);this.font=(new Gf).loadAngelCode(b,a);this.fontScale=1;this.letterSpacing=0}this.graphicsLoaded=!0}},unloadGraphics:function(){this.graphicsLoaded&&(this.font=$f.defaultFont,
this.fontScale=1,this.letterSpacing=0,this.graphicsLoaded=!1)},reloadGraphics:function(a){Tc.prototype.reloadGraphics.call(this,a)},setLetterSpacing:function(a){this.letterSpacing=a|0},isBitmapFont:function(a){null==a&&(a=Ea.getText("assets/graphics/"+p.IMG_BASE+"/font-"+this.ID+".fnt"),a=fa.parse(a));for(a=a.elements();a.hasNext();){var b=a.next();if(b.nodeType!=fa.Element)throw new E("Bad node type, expected Element but found "+ea.toString(b.nodeType));if("font"==b.nodeName)for(b=b.elements();b.hasNext();){var c=
b.next();if(c.nodeType!=fa.Element)throw new E("Bad node type, expected Element but found "+ea.toString(c.nodeType));if("info"==c.nodeName)for(c=c.attributes();c.hasNext();)if("lspace"==c.next())return!0}}return!1},__class__:$f});var Eb=function(){var a=ac.get().gameMbs.getRoot();this.shapes=this.readShapes(a);this.atlases=this.readAtlases(a);this.autotileFormats=this.readAutotileFormats(a);this.groups=this.readGroups(a);this.groups.push(new di(-2,"Regions"));this.groups.push(new di(0,"Players"));
this.groups.push(new di(1,"Terrain"));this.groups.push(new di(2,"Doodads"));this.groups.push(new di(3,"Actors"));this.groupsCollidesWith=new Wa;this.collisionGroups=this.readCollisionGroups(a);Eb.collisionMap=[];for(var b=0,c=0,d=this.groups;c<d.length;){var e=d[c];++c;b=Math.max(e.ID|0,b)|0}++b;c=0;for(d=b;c<d;){e=c++;Eb.collisionMap.push([]);for(var f=0,g=b;f<g;)f++,Eb.collisionMap[e].push(!1)}if(p.NO_PHYSICS)for(b=0,c=this.groups;b<c.length;)d=c[b],++b,this.collisionGroups.push(new Sm(d.ID,-2));
b=0;for(c=this.collisionGroups;b<c.length;){e=c[b];++b;d=e.group1;e=e.group2;this.groupsCollidesWith.h.hasOwnProperty(d)||(this.groupsCollidesWith.h[d]=[]);this.groupsCollidesWith.h.hasOwnProperty(e)||(this.groupsCollidesWith.h[e]=[]);if(!p.NO_PHYSICS||0<=d&&0<=e)Eb.collisionMap[d][e]=!0,Eb.collisionMap[e][d]=!0;this.groupsCollidesWith.h[d].push(e);this.groupsCollidesWith.h[e].push(d)}this.gameAttributes=Eb.readGameAttributes(a);ac.get().gameMbs=null};h["com.stencyl.models.GameModel"]=Eb;Eb.__name__=
"com.stencyl.models.GameModel";Eb.resetStatics=function(){Eb.instance=null;Eb.collisionMap=null};Eb.get=function(){null==Eb.instance&&(Eb.instance=new Eb);return Eb.instance};Eb.readGameAttributes=function(a){return Le.readMap(a.getGameAttributes())};Eb.prototype={groups:null,groupsCollidesWith:null,collisionGroups:null,gameAttributes:null,shapes:null,atlases:null,scenes:null,autotileFormats:null,loadScenes:function(){this.scenes=new Wa;for(var a=ac.get().sceneListMbs.getRoot(),b=0,c=a.length();b<
c;){b++;var d=a.getNextObject(),e=d.getId(),f=this.scenes;d=new Tm(e,d.getName());f.h[e]=d}ac.get().sceneListMbs=null},readShapes:function(a){var b=new Wa;a=a.getShapes();for(var c=0,d=a.length();c<d;){c++;var e=a.getNextObject(),f=e.getPoints(),g=[],k=0;for(f=Xd.readPoints(f);k<f.length;){var l=f[k];++k;g.push(new N(3.1*l.x,3.1*l.y))}Xd.EnsureCorrectVertexDirection(g);k=new Lb;k.setAsArray(g,g.length);e=e.getId();b.h[e]=k}return b},readAtlases:function(a){var b=new Wa;a=a.getAtlases();for(var c=
0,d=a.length();c<d;){c++;var e=a.getNextObject(),f=e.getId(),g=e.getName(),k=e.getAllScenes();e=e.getMembers();for(var l=[],m=0,p=e.length();m<p;)m++,l.push(e.readInt());g=new pq(f,g,k,l);b.h[f]=g}return b},readAutotileFormats:function(a){var b=new Wa;a=a.getAutotileFormats();for(var c=0,d=a.length();c<d;){c++;for(var e=a.getNextObject(),f=e.getName(),g=e.getId(),k=e.getAcross(),l=e.getDown(),m=[],p=[],n=e.getCorners(),h=0,q=n.length();h<q;){h++;var t=n.getNextObject(),r=t.getTopLeft();r=new pa(r.getX(),
r.getY());var u=t.getTopRight();u=new pa(u.getX(),u.getY());var x=t.getBottomLeft();x=new pa(x.getX(),x.getY());t=t.getBottomRight();p.push(new qq(r,u,x,new pa(t.getX(),t.getY())))}e=e.getFlags();n=0;for(h=e.length();n<h;)q=n++,m[q]=p[e.readInt()];f=new rq(f,g,k,l,m);b.h[g]=f}return b},readGroups:function(a){var b=[];a=a.getGroups();for(var c=0,d=a.length();c<d;){c++;var e=a.getNextObject();b.push(new di(e.getId(),e.getName()))}return b},readCollisionGroups:function(a){var b=[];a=a.getCgroups();for(var c=
0,d=a.length();c<d;){c++;var e=a.getNextObject();b.push(new Sm(e.getGroup1(),e.getGroup2()))}return b},__class__:Eb};var di=function(a,b){this.ID=a;this.name=b};h["com.stencyl.models.GroupDef"]=di;di.__name__="com.stencyl.models.GroupDef";di.prototype={ID:null,name:null,__class__:di};var La=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;qa.call(this)};h["com.stencyl.models.Joystick"]=La;La.__name__="com.stencyl.models.Joystick";La.resetStatics=function(){La.joystickMap=null;La.fixedCenter=0;La.showWherePressed=1;La.viewOffsetX=La.viewOffsetY=0;La.initialized=!1};La.addJoystick=function(a,b,c,d,e,f,g,k,l){null==l&&(l=!1);null==k&&(k=0);null==g&&(g=0);null==f&&(f=0);null==e&&(e=0);null==d&&(d=0);null!=La.joystickMap&&La.joystickMap.h.hasOwnProperty(a)&&La.removeJoystick(a);
var m=Object.create(La.prototype);m.start();m.id=a;m.joystickTouchID=-1;m.joystickDistance=0;m.joystickDirection=0;m.joystickDefaultDirection=0;m.joystickType=d;m.center=new pa(b*p.SCALE,c*p.SCALE);La.joystickMap.h[a]=m;La.setJoystickImage(a,!0,"outer-joystick");La.setJoystickImage(a,!1,"inner-joystick");m.outerAlphaWhenPressed=1;m.outerAlphaWhenReleased=1;m.innerAlphaWhenPressed=1;m.innerAlphaWhenReleased=1;m.joystickType==La.showWherePressed&&(m.joystickBounds=new ia(e*p.SCALE+La.viewOffsetX,f*
p.SCALE+La.viewOffsetY,g*p.SCALE,k*p.SCALE));l&&(m.hideWhenReleased=!0,m.outerImage.set_visible(!1),m.innerImage.set_visible(!1))};La.removeJoystick=function(a){if(La.joystickMap.h.hasOwnProperty(a)){var b=La.joystickMap.h[a],c=p.engine.root;La.joystickMap.remove(a);c.removeChild(b.outerImage);c.removeChild(b.innerImage)}};La.getJoystickDisDir=function(a,b){null==b&&(b=!0);var c=0;La.joystickMap.h.hasOwnProperty(a)&&(a=La.joystickMap.h[a],c=b?a.joystickDistance:a.joystickDirection);return c};La.setJoystickCenter=
function(a,b,c){La.joystickMap.h.hasOwnProperty(a)&&(a=La.joystickMap.h[a],a.center=new pa(b*p.SCALE,c*p.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()))};La.getJoystickCenter=function(a,b){null==b&&(b=!0);var c=0;La.joystickMap.h.hasOwnProperty(a)&&(a=La.joystickMap.h[a],c=(b?a.center.x:a.center.y)/p.SCALE);
return c};La.setJoystickRadius=function(a,b,c){null==b&&(b=!0);La.joystickMap.h.hasOwnProperty(a)&&(a=La.joystickMap.h[a],b&&a.outerRadius!=c*p.SCALE?a.outerRadius=c*p.SCALE:a.innerRadius!=c*p.SCALE&&(a.innerRadius=c*p.SCALE))};La.getJoystickRadius=function(a,b){null==b&&(b=!0);var c=0;La.joystickMap.h.hasOwnProperty(a)&&(a=La.joystickMap.h[a],c=(b?a.innerRadius:a.outerRadius)/p.SCALE);return c};La.alwaysHideRJ=function(a){La.joystickMap.h.hasOwnProperty(a)&&(a=La.joystickMap.h[a],a.hideWhenReleased=
!0,a.outerImage.set_visible(!1),a.innerImage.set_visible(!1))};La.setDefaultDirection=function(a,b){La.joystickMap.h.hasOwnProperty(a)&&(a=La.joystickMap.h[a],a.joystickDefaultDirection=b,a.joystickDirection=b)};La.isJoystickPressed=function(a){return La.joystickMap.h.hasOwnProperty(a)?La.joystickMap.h[a].isPressed:!1};La.setTouchRegionForRJ=function(a,b,c,d,e){null==e&&(e=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);La.joystickMap.h.hasOwnProperty(a)&&(a=La.joystickMap.h[a],a.joystickType==La.showWherePressed&&
(a.joystickBounds=new ia(b*p.SCALE+La.viewOffsetX,c*p.SCALE+La.viewOffsetY,d*p.SCALE,e*p.SCALE)))};La.getTouchRegionPropertyForRJ=function(a,b){return La.joystickMap.h.hasOwnProperty(a)&&(a=La.joystickMap.h[a],a.joystickType==La.showWherePressed)?1==b?a.joystickBounds.x-La.viewOffsetX:2==b?a.joystickBounds.y-La.viewOffsetY:3==b?a.joystickBounds.width/p.SCALE:a.joystickBounds.height/p.SCALE:0};La.setJoystickImage=function(a,b,c){if(La.joystickMap.h.hasOwnProperty(a)){a=La.joystickMap.h[a];var d=p.engine.root;
c=1==p.SCALE?Ea.getBitmapData("assets/data/"+c+".png"):1.5==p.SCALE?Ea.getBitmapData("assets/data/"+c+"@1.5x.png"):2==p.SCALE?Ea.getBitmapData("assets/data/"+c+"@2x.png"):Ea.getBitmapData("assets/data/"+c+"@4x.png");b?(null!=a.outerImage&&d.removeChild(a.outerImage),a.outerImage=new Zc(c),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 Zc(c),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())}};La.setJoystickAlpha=function(a,b,c,d){null==d&&(d=!0);null==c&&(c=1);null==b&&(b=!0);La.joystickMap.h.hasOwnProperty(a)&&(a=La.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)};La.__super__=qa;La.prototype=w(qa.prototype,{center:null,outerRadius:null,innerRadius:null,joystickBounds:null,joystickTouchID:null,id:null,joystickDistance:null,joystickDirection:null,joystickDefaultDirection:null,joystickType:null,hideWhenReleased:null,outerImage:null,innerImage:null,outerAlphaWhenReleased:null,outerAlphaWhenPressed:null,innerAlphaWhenReleased:null,innerAlphaWhenPressed:null,isPressed:null,start:function(){La.initialized||(La.initialized=!0,La.joystickMap=
new Wa,La.viewOffsetX=p.screenOffsetX,La.viewOffsetY=p.screenOffsetY);Oe.get_supportsTouchEvents()?(p.stage.addEventListener("touchBegin",v(this,this.onTouchBegin)),p.stage.addEventListener("touchMove",v(this,this.onTouchMove)),p.stage.addEventListener("touchEnd",v(this,this.onTouchEnd)),Oe.inputMode=2):(p.stage.addEventListener("mouseDown",v(this,this.onMouseDown)),p.stage.addEventListener("mouseMove",v(this,this.onMouseMove)),p.stage.addEventListener("mouseUp",v(this,this.onMouseUp)))},stop:function(){Oe.get_supportsTouchEvents()?
(p.stage.removeEventListener("touchBegin",v(this,this.onTouchBegin)),p.stage.removeEventListener("touchMove",v(this,this.onTouchMove)),p.stage.removeEventListener("touchEnd",v(this,this.onTouchEnd))):(p.stage.removeEventListener("mouseDown",v(this,this.onMouseDown)),p.stage.removeEventListener("mouseMove",v(this,this.onMouseMove)),p.stage.removeEventListener("mouseUp",v(this,this.onMouseUp)));La.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/=p.screenScaleX,b/=p.screenScaleY,this.outerImage.set_alpha(this.outerAlphaWhenPressed),this.innerImage.set_alpha(this.innerAlphaWhenPressed),this.joystickType==La.fixedCenter){var d=
Math.sqrt(Math.pow(this.center.x+La.viewOffsetX-a,2)+Math.pow(this.center.y+La.viewOffsetY-b,2)),e=Math.atan2(this.center.y+La.viewOffsetY-b,this.center.x+La.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-La.viewOffsetX-.5*this.innerImage.get_width()),this.innerImage.set_y(b-La.viewOffsetY-.5*this.innerImage.get_height())),this.isPressed=!0,this.joystickTouchID=c,this.joystickDistance=d/(this.outerRadius-this.innerRadius),this.joystickDirection=180*e/3.1415926535+180)}else this.joystickType!=La.showWherePressed||a<this.joystickBounds.x||a>this.joystickBounds.x+this.joystickBounds.width||b<this.joystickBounds.y||b>this.joystickBounds.y+this.joystickBounds.height||(this.isPressed=
!0,this.center.x=a-La.viewOffsetX,this.center.y=b-La.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/=
p.screenScaleX;b/=p.screenScaleY;c=Math.sqrt(Math.pow(this.center.x+La.viewOffsetX-a,2)+Math.pow(this.center.y+La.viewOffsetY-b,2));var d=Math.atan2(this.center.y+La.viewOffsetY-b,this.center.x+La.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-La.viewOffsetX-.5*this.innerImage.get_width()),this.innerImage.set_y(b-La.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),a=this.outerImage.get_x(),this.center.x=a+this.outerRadius,
a=this.outerImage.get_y(),this.center.y=a+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__:La});var yh={};h["com.stencyl.models._PhysicsMode.PhysicsMode_Impl_"]=yh;yh.__name__="com.stencyl.models._PhysicsMode.PhysicsMode_Impl_";
yh._new=function(a){return a};yh.fromInt=function(a){return yh._new(a)};yh.fromString=function(a){switch(a){case "MINIMAL_PHYSICS":return 2;case "NORMAL_PHYSICS":return 0;case "SIMPLE_PHYSICS":return 1;default:return 0}};yh.toString=function(a){switch(a){case 0:return"NORMAL_PHYSICS";case 1:return"SIMPLE_PHYSICS";case 2:return"MINIMAL_PHYSICS";default:return"NORMAL_PHYSICS"}};var Nd=function(a,b,c,d,e){Bb.call(this,a,-1,-2,b,c,-1,p.NO_PHYSICS?e.width:1,p.NO_PHYSICS?e.height:1,null,null,null,null,
!1,!1,!1,!1,p.NO_PHYSICS?null:d[0],p.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 Wa;this.whenActorEntersListeners=[];this.whenActorExitsListeners=[];this.justAdded=[];this.justRemoved=[];p.NO_PHYSICS||(this.body.setSleepingAllowed(!0),this.body.setAwake(!1),this.body.setIgnoreGravity(!0));a=0;var f=0;if(p.NO_PHYSICS){var g=e.width;e=e.height;this.cacheWidth=this.originalWidth=
this.regionWidth=Math.round(Math.abs(a-g));this.cacheHeight=this.originalHeight=this.regionHeight=Math.round(Math.abs(f-e));this.currOffset.x=-(this.cacheWidth/2);this.currOffset.y=-(this.cacheHeight/2);this.resetReal(b,c)}else if(d[0]instanceof Lb){this.isCircle=!1;b=new xf;b.setIdentity();c=new id;L.__cast(d[0],Lb).computeAABB(c,b);a=c.lowerBound.x;g=c.upperBound.x;f=c.lowerBound.y;e=c.upperBound.y;for(var k=0,l=d.length;k<l;){var m=k++,z=new kg;z.isSensor=!0;z.userData=this;z.shape=d[m];z.friction=
1;z.density=.1;z.restitution=0;z.groupID=-1E3;this.body.createFixture(z);L.__cast(d[m],Lb).computeAABB(c,b);a=Math.min(a,c.lowerBound.x);g=Math.max(g,c.upperBound.x);f=Math.min(f,c.lowerBound.y);e=Math.max(e,c.upperBound.y)}this.cacheWidth=this.originalWidth=this.regionWidth=Math.round(p.toPixelUnits(Math.abs(a-g)));this.cacheHeight=this.originalHeight=this.regionHeight=Math.round(p.toPixelUnits(Math.abs(f-e)))}else d[0]instanceof cd&&(this.isCircle=!0,this.cacheWidth=this.originalWidth=this.regionWidth=
p.toPixelUnits(2*L.__cast(d[0],cd).m_radius),this.cacheHeight=this.originalHeight=this.regionHeight=p.toPixelUnits(2*L.__cast(d[0],cd).m_radius))};h["com.stencyl.models.Region"]=Nd;Nd.__name__="com.stencyl.models.Region";Nd.__super__=Bb;Nd.prototype=w(Bb.prototype,{isCircle:null,containedActors:null,copy:null,simpleBounds:null,regionWidth:null,regionHeight:null,originalWidth:null,originalHeight:null,whenActorEntersListeners:null,whenActorExitsListeners:null,justAdded:null,justRemoved:null,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=T.indexOf(this.justRemoved,a);-1==b?this.justAdded.push(a):this.justRemoved.splice(b,1)}},removeActor:function(a){null!=a&&-1!=a.ID&&-1==T.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=p.toPhysicalUnits(a);b=p.toPhysicalUnits(b);if(this.isCircle){var e=new cd;e.m_radius=a/2}else e=new Lb,e.setAsBox(a/2,b/2);var f=new kg;f.isSensor=!0;f.userData=this;f.shape=e;f.groupID=-1E3;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=p.toPixelUnits(a);this.cacheHeight=this.regionHeight=p.toPixelUnits(b)}a=this.regionWidth-c;d=this.regionHeight-d;this.setLocation(this.getX()+a/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=
(S.mouseX+p.cameraX)/p.SCALE,b=(S.mouseY+p.cameraY)/p.SCALE,c=this.getX(),d=this.getY();return a>=c&&b>=d&&a<c+this.regionWidth?b<d+this.regionHeight:!1},innerUpdate:function(a,b){this.clearCollisionInfoList();if(p.NO_PHYSICS)for(a=this.containedActors.iterator();a.hasNext();)b=a.next(),b=p.engine.getActor(b),null==this.HITBOX||null==b||this.HITBOX.collide(b.HITBOX)||this.removeActor(b);for(;null!=this.justAdded&&0<this.justAdded.length;){b=L.__cast(this.justAdded.pop(),Bb);a=this.whenActorEntersListeners;
for(var c=0;c<a.length;){try{var d=a[c];d(b,a);-1==T.indexOf(a,d)&&--c}catch(z){if(ra.lastException=z,"string"!=typeof(z instanceof E?z.val:z))throw z;}++c}}for(;null!=this.justRemoved&&0<this.justRemoved.length;)for(a=L.__cast(this.justRemoved.pop(),Bb),d=this.whenActorExitsListeners,b=0;b<d.length;){try{var e=d[b];e(a,d);-1==T.indexOf(d,e)&&--b}catch(z){if(ra.lastException=z,"string"!=typeof(z instanceof E?z.val:z))throw z;}++b}if(null!=this.mouseOverListeners&&0<this.mouseOverListeners.length)if(this.isMouseOver()){if(0>=
this.mouseState){this.mouseState=1;var f=this.mouseOverListeners;e=this.mouseState;for(d=0;d<f.length;){try{var g=f[d];g(e,f);-1==T.indexOf(f,g)&&--d}catch(z){if(ra.lastException=z,"string"!=typeof(z instanceof E?z.val:z))throw z;}++d}}else this.mouseState=2;if(S.mousePressed){this.mouseState=3;var k=this.mouseOverListeners;g=this.mouseState;for(f=0;f<k.length;){try{var l=k[f];l(g,k);-1==T.indexOf(k,l)&&--f}catch(z){if(ra.lastException=z,"string"!=typeof(z instanceof E?z.val:z))throw z;}++f}}else if(S.mouseDown)for(this.mouseState=
4,l=this.mouseOverListeners,g=this.mouseState,f=0;f<l.length;){try{k=l[f],k(g,l),-1==T.indexOf(l,k)&&--f}catch(z){if(ra.lastException=z,"string"!=typeof(z instanceof E?z.val:z))throw z;}++f}if(S.mouseReleased)for(this.mouseState=5,l=this.mouseOverListeners,k=this.mouseState,g=0;g<l.length;){try{var m=l[g];m(k,l);-1==T.indexOf(l,m)&&--g}catch(z){if(ra.lastException=z,"string"!=typeof(z instanceof E?z.val:z))throw z;}++g}}else if(0<this.mouseState)for(this.mouseState=-1,m=this.mouseOverListeners,l=
this.mouseState,k=0;k<m.length;){try{f=m[k],f(l,m),-1==T.indexOf(m,f)&&--k}catch(z){if(ra.lastException=z,"string"!=typeof(z instanceof E?z.val:z))throw z;}++k}else-1==this.mouseState&&(this.mouseState=0)},__class__:Nd});var Tm=function(a,b){this.currW=this.currH=0;this.ID=a;this.name=b};h["com.stencyl.models.Scene"]=Tm;Tm.__name__="com.stencyl.models.Scene";Tm.prototype={ID:null,name:null,sceneWidth:null,sceneHeight:null,tileWidth:null,tileHeight:null,gravityX:null,gravityY:null,eventID:null,colorBackground:null,
layers:null,actors:null,behaviorValues:null,atlases:null,retainsAtlases:null,wireframes:null,joints:null,regions:null,terrainRegions:null,animatedTiles:null,load:function(){var a=new Zh(Qf.get(),!1,!0);a.readData(za.toBytes(Ea.getBytes("assets/data/scene-"+this.ID+".mbs")));a=a.getRoot();var b=a.getDepth();this.sceneWidth=a.getWidth();this.sceneHeight=a.getHeight();this.tileWidth=a.getTileWidth();this.tileHeight=a.getTileHeight();this.gravityX=a.getGravityX();this.gravityY=a.getGravityY();this.animatedTiles=
[];this.actors=this.readActors(a.getActorInstances());this.behaviorValues=Le.readBehaviors(a.getSnippets());var c=a.getEventSnippetID();if(-1<c){var d=this.behaviorValues,e=new Xk(c,new ua);c=""+c;null!=q[c]?d.setReserved(c,e):d.h[c]=e}this.joints=this.readJoints(a.getJoints());this.regions=this.readRegions(a.getRegions());this.terrainRegions=this.readTerrainRegions(a.getTerrainRegions());this.wireframes=this.readWireframes(a.getTerrain());d=Ea.getBytes("assets/data/scene-"+this.ID+".scn");d.__endian=
0;b=this.readRawLayers(d,b);this.layers=this.readAllLayers(a.getLayers(),b);this.atlases=(this.retainsAtlases=a.getRetainAtlases())?[]:this.readAtlases(a.getAtlasMembers())},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 Wa,c=0,d=a.length();c<d;){c++;var e=this.readRegion(a.getNextObject());b.h[e.ID]=e}return b},readRegion:function(a){var b=
a.getId(),c=a.getName(),d=a.getX(),e=a.getY();this.shapeList=[];var f=a.getShape();if(f instanceof Rd){a=this.currW=f.getWidth();var g=this.currH=f.getHeight();f=f.getPoints();p.NO_PHYSICS?b=new xj(this.shapeList,b,c,d,e,0,new ia(0,0,a,g)):(a=Xd.readPoints(f).slice(0),(new Uc(a)).decompose(v(this,this.addPolygonRegion)),b=new xj(this.shapeList,b,c,d,e))}else g=f.getRadius(),p.NO_PHYSICS?b=new xj(this.shapeList,b,c,d,e,0,new ia(0,0,2*g,2*g)):(a=new cd,a.m_radius=p.toPhysicalUnits(g),this.shapeList[0]=
a,b=new xj(this.shapeList,b,c,d,e));return b},shapeList:null,currW:null,currH:null,addPolygonRegion:function(a){a=L.__cast(Xd.createPolygon("MbsPolyRegion",a.points,this.currW,this.currH),Lb);this.shapeList.push(a)},addPolygonTerrain:function(a){a=L.__cast(Xd.createPolygon("MbsPolyRegion",a.points,this.currW,this.currH),Lb);this.shapeList.push(a)},readTerrainRegions:function(a){for(var b=new Wa,c=0,d=a.length();c<d;){c++;var e=this.readTerrainRegion(a.getNextObject());b.h[e.ID]=e}return b},readTerrainRegion:function(a){var b=
a.getId(),c=a.getName(),d=a.getGroupID(),e=p.toPhysicalUnits(a.getX()),f=p.toPhysicalUnits(a.getY()),g=a.getColor();this.shapeList=[];a=a.getShape();if(a instanceof Rd)this.currW=a.getWidth(),this.currH=a.getHeight(),a=Xd.readPoints(a.getPoints()).slice(0),(new Uc(a)).decompose(v(this,this.addPolygonTerrain));else{var k=a.getRadius();a=new cd;a.m_radius=p.toPhysicalUnits(k);this.shapeList[0]=a}return new sq(this.shapeList,b,c,e,f,d,g)},readJoints:function(a){for(var b=new Wa,c=0,d=a.length();c<d;){c++;
var e=this.readJoint(a.readObject());b.h[e.ID]=e}return b},readJoint:function(a){var b=a.getId(),c=a.getActor1(),d=a.getActor2(),e=a.getCollide();if(a instanceof Qd){var f=new Ci;f.ID=b;f.actor1=c;f.actor2=d;f.localAnchorA=null;f.localAnchorB=null;f.collideConnected=e;f.dampingRatio=a.getDamping();f.frequencyHz=a.getFrequency();return f}return a instanceof ic?(f=new Di,f.ID=b,f.actor1=c,f.actor2=d,f.localAnchorA=null,f.localAnchorB=null,f.collideConnected=e,f.enableLimit=a.getLimit(),f.enableMotor=
a.getMotor(),f.lowerAngle=a.getLower(),f.upperAngle=a.getUpper(),f.maxMotorTorque=a.getTorque(),f.motorSpeed=a.getSpeed(),f):a instanceof Wb?(f=new Ei,f.ID=b,f.actor1=c,f.actor2=d,f.localAnchorA=null,f.localAnchorB=null,f.collideConnected=e,f.enableLimit=a.getLimit(),f.enableMotor=a.getMotor(),f.lowerTranslation=a.getLower(),f.upperTranslation=a.getUpper(),f.maxMotorForce=a.getForce(),f.motorSpeed=a.getSpeed(),f.localAxisA.x=a.getX(),f.localAxisA.y=a.getY(),f):null},readAllLayers:function(a,b){var c=
new Ye(16);c.reuseIterator=!0;for(var d=0,e=a.length();d<e;){d++;var f=a.readObject();if(f instanceof Fe||f instanceof ae)this.colorBackground=this.readColorBackground(f);else{var g=f,k=g.getId(),l=g.getName(),m=g.getOrder(),p=g.getScrollFactorX(),n=g.getScrollFactorY(),h=g.getOpacity()/100;g=Pm.get(g.getBlendmode());if(f instanceof re){var q=b.mH;f=q.mHash[73856093*k&q.mMask];if(-1==f)f=-2147483648;else if(q=q.mData,q[f]==k)f=q[f+1];else{var t=-2147483648;for(f=q[f+2];-1!=f;){if(q[f]==k){t=q[f+1];
break}f=q[f+2]}f=t}f=-2147483648==f?null:b.mVals[f];null==f&&(f=new Ce(k,this,Math.floor(this.sceneWidth/this.tileWidth)|0,Math.floor(this.sceneHeight/this.tileHeight)|0));f.set_name(l);k=new Rc(k,l,m,p,n,h,g,f);c.set(k.ID,k)}else f instanceof Pd&&(q=f,f=q.getResourceID(),q=q.getCustomScroll(),k=new Fd(k,l,m,p,n,h,g,f,q),c.set(k.ID,k))}}return c},readColorBackground:function(a){if(a instanceof Fe){var b=a.getColor();return new lg(b)}return a instanceof ae?(b=a.getColor1(),a=a.getColor2(),new tj(b,
a)):null},readRawLayers:function(a,b){var c=new Ye(16);c.reuseIterator=!0;var d=[];if(null!=a){for(var e=0;e<b;){var f=e++;d[f]=a.readInt()}for(e=0;e<b;)f=e++,f=this.readRawLayer(a,d[f]),c.set(f.layerID,f)}return c},readRawLayer:function(a,b){var c=Math.floor(this.sceneWidth/this.tileWidth)|0,d=Math.floor(this.sceneHeight/this.tileHeight)|0,e=a.readInt();b-=4;a.readInt();b-=4;d=new Ce(e,this,c,d);var f=e=0;b=b/8|0;var g=new Um(this.sceneWidth,this.sceneHeight,this.tileWidth,this.tileHeight);d.grid=
g;for(var k=0;k<b;){k++;var l=a.readShort(),m=a.readShort(),p=a.readShort(),n=a.readShort(),h=null;-1!=m&&(h=ac.get().resources.get(m));0>l&&(l=Math.abs(l+1)|0);for(m=0;m<n;){m++;if(null==h||0>p)d.setTileAt(e,f,null,!1);else{var q=h.tiles[p];if(null==q)d.setTileAt(e,f,null,!1);else if(d.setTileAt(e,f,q,!1),d.autotileData[e][f]=l,0<=q.collisionID&&g.setTile(f,e,!0),1<q.durations.length){for(var t=!1,r=0,u=this.animatedTiles;r<u.length&&!(t=u[r],++r,t=t==q););t||this.animatedTiles.push(q)}}++f;f>=c&&
(f=0,++e)}}return d},readAtlases:function(a){for(var b=[],c=0,d=a.length();c<d;){c++;var e=a.readInt();Eb.get().atlases.h[e].allScenes||b.push(e)}return b},readWireframes:function(a){if(p.NO_PHYSICS)return[];for(var b=[],c=0,d=a.length();c<d;){c++;var e=a.getNextObject(),f=e.getPosition();f=new pa(f.getX(),f.getY());e=Xd.readPoints(e.getPoints()).slice(0);e=Xd.createPolygon("MbsWireframe",e);b.push(new tq(f.x,f.y,e.h[1],e.h[2],e.h[0],null))}return b},readActors:function(a){for(var b=new Wa,c=0,d=
a.length();c<d;){c++;var e=this.readActorInstance(a.getNextObject());null!=e&&(b.h[e.elementID]=e)}return b},readActorInstance:function(a){var b=a.getAid(),c=a.getX(),d=a.getY(),e=a.getScaleX(),f=a.getScaleY(),g=a.getZ(),k=a.getOrderInLayer(),l=a.getAngle()|0,m=a.getGroupID(),p=a.getId(),n=a.getCustomized(),h=null;n&&(h=Le.readBehaviors(a.getSnippets()));if(0==e||0==f)f=e=1;n||(h=null);if(null==ac.get().resources.get(p))return null;a=new Hm(b,c,d,e,f,g,k,l,m,p,h,n);null!=a.actorType&&(a.groupID=a.actorType.groupID);
return a},getID:function(){return this.ID},__class__:Tm};var Fi=function(a,b,c,d,e,f,g,k){Tc.call(this,a,b,-1);this.streaming=c;this.looping=d;this.panning=e;this.volume=f;this.ext=g;this.atlasID=k;this.ext="ogg";a=Eb.get().atlases.h[k];null!=a&&a.active&&this.loadGraphics()};h["com.stencyl.models.Sound"]=Fi;Fi.__name__="com.stencyl.models.Sound";Fi.__super__=Tc;Fi.prototype=w(Tc.prototype,{streaming:null,looping:null,panning:null,volume:null,ext:null,src:null,loadGraphics:function(){this.src=Ea.getSound("assets/"+
(this.streaming?"music":"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&&null==this.src&&(this.src=this.getStreamingSource());return null==this.src?null:this.src.play(b)},loop:function(a,b){null==b&&(b=0);this.streaming&&null==this.src&&(this.src=this.getStreamingSource());return null==this.src?null:this.src.play(b,1E8)},getStreamingSource:function(){return Ea.getSound("assets/music/sound-"+
this.ID+"."+this.ext,!1)},stopInstances:function(){for(var a=0;32>a;){var b=a++;b=p.engine.channels[b];b.currentSource==this.src&&b.stopSound()}},__class__:Fi});var $b=function(a,b){this.paused=!1;this.currentClip=this.currentSound=null;this.looping=!1;this.volume=1;this.position=this.panning=0;this.channelNum=b;this.engine=a;this.transform=new Tf;this.tweenVolume=new $e;this.tweenVolume.doOnUpdate(v(this,this.tweenUpdated))};h["com.stencyl.models.SoundChannel"]=$b;$b.__name__="com.stencyl.models.SoundChannel";
$b.resetStatics=function(){$b.muted=!1;$b.masterVolume=1};$b.prototype={currentSource:null,currentSound:null,currentClip:null,volume:null,panning:null,channelNum:null,looping:null,paused:null,position:null,engine:null,transform:null,tweenVolume:null,playSound:function(a,b){null==b&&(b=0);null!=this.currentSound&&(this.currentSound.stop(),this.paused=!1);if(null!=a){a.volume=this.volume*$b.masterVolume;this.currentClip=a;this.currentSound=a.play(this.channelNum,b);if(null==this.currentSound)return this.currentClip=
null;this.setVolume(this.volume);this.setPanning(this.panning);this.currentSound.addEventListener("soundComplete",v(this,this.stopped))}null!=a&&(this.currentSource=a.src);this.looping=!1;return this.currentSound},loopSound:function(a,b){null==b&&(b=0);null!=this.currentSound&&this.currentSound.stop();if(null!=a){a.volume=this.volume*$b.masterVolume;this.currentClip=a;this.currentSound=a.play(this.channelNum,b);if(null==this.currentSound)return this.currentClip=null;this.setVolume(this.volume);this.setPanning(this.panning);
this.currentSound.addEventListener("soundComplete",v(this,this.looped))}null!=a&&(this.currentSource=a.src);this.looping=!0;return this.currentSound},setPause:function(a){null!=this.currentSound&&(a?(this.currentSound.removeEventListener("soundComplete",v(this,this.looped)),this.position=this.currentSound.get_position(),this.currentSound.stop(),this.paused=!0):null!=this.currentSource&&this.paused&&(this.currentSound=this.currentClip.play(this.channelNum,this.position),this.currentSound.set_soundTransform(this.transform),
this.currentSound.addEventListener("soundComplete",v(this,this.stopped)),this.looping&&this.currentSound.addEventListener("soundComplete",v(this,this.looped)),this.paused=!1))},looped:function(a){null!=this.currentSound&&this.currentSound.removeEventListener("soundComplete",v(this,this.looped));this.loopSound(this.currentClip)},stopped:function(a){null!=this.currentSound&&this.currentSound.removeEventListener("soundComplete",v(this,this.stopped));p.engine.soundFinished(this.channelNum)},stopSound:function(){null!=
this.currentSound&&(this.currentSound.stop(),this.position=0,this.currentSound=this.currentSource=null,this.paused=!1)},tweenUpdated:function(){this.setVolume(this.tweenVolume.value)},fadeInSound:function(a){null!=this.currentSound&&this.tweenVolume.tween(this.transform.volume,1,tb.linear,1E3*a|0)},fadeOutSound:function(a){null!=this.currentSound&&this.tweenVolume.tween(this.transform.volume,0,tb.linear,1E3*a|0)},fadeSound:function(a,b){null!=this.currentSound&&this.tweenVolume.tween(this.transform.volume,
b,tb.linear,1E3*a|0)},setVolume:function(a){this.volume=a;null!=this.currentSound&&(this.transform.volume=a*$b.masterVolume,this.currentSound.set_soundTransform(this.transform))},setPanning:function(a){this.panning=a;null!=this.currentSound&&(this.transform.pan=a,this.currentSound.set_soundTransform(this.transform))},__class__:$b};var wh=function(a,b,c,d,e,f){null==f&&(f=0);Bb.call(this,a,-1,e,b,c,-1,1,1,null,null,null,null,!1,!0,!1,!1,d[0]);0==f&&(c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=
0),f=a<<16|b<<8|c);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);if(d[0]instanceof Lb){this.isCircle=!1;var g=new xf;g.setIdentity();var k=new id;L.__cast(d[0],Lb).computeAABB(k,g);a=k.lowerBound.x;b=k.upperBound.x;c=k.lowerBound.y;f=k.upperBound.y;for(var l=0,m=d.length;l<m;){var z=l++,n=new kg;n.isSensor=!1;n.userData=this;n.shape=d[z];n.friction=1;n.density=.1;
n.restitution=0;n.groupID=e;this.body.createFixture(n);L.__cast(d[z],Lb).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(p.toPixelUnits(Math.abs(a-b)));this.originalHeight=this.regionHeight=Math.round(p.toPixelUnits(Math.abs(c-f)))}else d[0]instanceof cd&&(this.isCircle=!0,this.originalWidth=this.regionWidth=p.toPixelUnits(2*L.__cast(d[0],cd).m_radius),this.originalHeight=
this.regionHeight=p.toPixelUnits(2*L.__cast(d[0],cd).m_radius))};h["com.stencyl.models.Terrain"]=wh;wh.__name__="com.stencyl.models.Terrain";wh.__super__=Bb;wh.prototype=w(Bb.prototype,{isCircle:null,fillColor:null,copy:null,originalWidth:null,originalHeight:null,regionWidth:null,regionHeight:null,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=p.toPhysicalUnits(a);b=p.toPhysicalUnits(b);if(this.isCircle){var e=new cd;e.m_radius=a/2}else e=new Lb,e.setAsBox(a/2,b/2);var f=new kg;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=p.toPixelUnits(a);this.regionHeight=p.toPixelUnits(b)}a=this.regionWidth-
c;d=this.regionHeight-d;this.setLocation(this.getX()+a/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__:wh});var oq=function(){this.xy=new bg;this.angle=new $e;this.alpha=new $e;this.realScaleXY=new bg};h["com.stencyl.models.actor.ActorTweenProperties"]=oq;oq.__name__="com.stencyl.models.actor.ActorTweenProperties";
oq.prototype={xy:null,angle:null,alpha:null,realScaleXY:null,pause:function(){this.xy.paused=!0;this.angle.paused=!0;this.alpha.paused=!0;this.realScaleXY.paused=!0},unpause:function(){this.xy.paused=!1;this.angle.paused=!1;this.alpha.paused=!1;this.realScaleXY.paused=!1},cancel:function(){this.xy.active&&Gb.cancel(this.xy);this.angle.active&&Gb.cancel(this.angle);this.alpha.active&&Gb.cancel(this.alpha);this.realScaleXY.active&&Gb.cancel(this.realScaleXY)},__class__:oq};var Gg=function(a,b,c,d,e,
f,g,k,l,m,p){Tc.call(this,a,c,b);this.groupID=d;this.spriteID=e;this.behaviorValues=f;this.bodyDef=g;this.physicsMode=k;this.autoScale=l;this.pausable=m;this.ignoreGravity=p};h["com.stencyl.models.actor.ActorType"]=Gg;Gg.__name__="com.stencyl.models.actor.ActorType";Gg.__super__=Tc;Gg.prototype=w(Tc.prototype,{groupID:null,spriteID:null,behaviorValues:null,bodyDef:null,physicsMode:null,autoScale:null,pausable:null,ignoreGravity:null,toString:function(){return this.name},loadGraphics:function(){ac.get().resources.get(this.spriteID).loadGraphics()},
unloadGraphics:function(){ac.get().resources.get(this.spriteID).unloadGraphics()},__class__:Gg});var Ud=function(a,b,c,d,e,f,g,k,l,m,p,n,h,q,t){this.sharedTimer=this.sharedFrameIndex=0;this.animID=a;this.animName=b;this.parent=c;this.simpleShapes=d;this.physicsShapes=e;this.looping=f;this.sync=g;this.durations=n;null==Ud.UNLOADED&&(Ud.UNLOADED=new na(1,1));a=[];for(b=0;b<h;)b++,a.push(Ud.UNLOADED);this.frames=a;this.frameWidth=k/q|0;this.frameHeight=l/t|0;this.imgWidth=k;this.imgHeight=l;this.frameCount=
h;this.framesAcross=q;this.framesDown=t;this.originX=m;this.originY=p;null==c?this.frames=[Ud.UNLOADED]:(c=Eb.get().atlases.h[c.atlasID],null!=c&&c.active&&this.loadGraphics(),1<h&&f&&Ud.allAnimations.push(this))};h["com.stencyl.models.actor.Animation"]=Ud;Ud.__name__="com.stencyl.models.actor.Animation";Ud.resetStatics=function(){Ud.allAnimations=[]};Ud.updateAll=function(a){for(var b=0,c=Ud.allAnimations;b<c.length;){var d=c[b];++b;d.sharedTimer+=a;1<d.frameCount&&d.sharedTimer>d.durations[d.sharedFrameIndex]&&
(d.sharedTimer-=d.durations[d.sharedFrameIndex],d.sharedFrameIndex++,d.sharedFrameIndex>=d.frameCount&&(d.looping?d.sharedFrameIndex=0:d.sharedFrameIndex--))}};Ud.prototype={animID:null,animName:null,parent:null,simpleShapes:null,physicsShapes:null,looping:null,sync:null,durations:null,frames:null,frameWidth:null,frameHeight:null,originX:null,originY:null,sharedTimer:null,sharedFrameIndex:null,imgWidth:null,imgHeight:null,frameCount:null,framesAcross:null,framesDown:null,graphicsLoaded:null,loadGraphics:function(){if(!this.graphicsLoaded){var a=
Ea.getBitmapData("assets/graphics/"+p.IMG_BASE+"/sprite-"+this.parent.ID+"-"+this.animID+".png",!1);if(null==a){a=[];for(var b=0,c=this.frameCount;b<c;)b++,a.push(Ud.UNLOADED);this.frames=a}else{if(1==this.frameCount)this.frames[0]=a;else{b=this.frameWidth*p.SCALE|0;c=this.frameHeight*p.SCALE|0;for(var d=new pa(0,0),e=0,f=this.frameCount;e<f;){var g=e++,k=new ia(g%this.framesAcross*b,Math.floor(g/this.framesAcross)*c,b,c),l=new na(b,c,!0,0);l.copyPixels(a,k,d);this.frames[g]=l}a.dispose()}if(ma.disposeImages&&
null!=this.parent&&!this.parent.readableImages)for(a=0,b=this.frames;a<b.length;)c=b[a],++a,yd.uploadTexture(c,!0);this.graphicsLoaded=!0}}},unloadGraphics:function(){if(this.graphicsLoaded){for(var a=0,b=this.frameCount;a<b;){var c=a++;this.frames[c].readable&&this.frames[c].dispose();this.frames[c]=Ud.UNLOADED}this.graphicsLoaded=!1}},checkImageReadable:function(){return this.frames[0].readable?!0:!1},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__:Ud};var Cc=function(){this.points=[];this.bounds=new ia;this.clear()};h["com.stencyl.models.actor.Collision"]=Cc;Cc.__name__="com.stencyl.models.actor.Collision";Cc.resetStatics=function(){Cc.recycledCollisions=[];Cc.collisionResponses=new Wa};Cc.addResponse=function(a,b,c){var d=-1,e=-1;a instanceof Gg?
d=a.groupID:a instanceof qj&&(d=a.ID);b instanceof Gg?e=b.groupID:b instanceof qj&&(e=b.ID);null==Cc.collisionResponses.h[d]&&(a=Cc.collisionResponses,b=new Wa,a.h[d]=b);null==Cc.collisionResponses.h[e]&&(a=Cc.collisionResponses,b=new Wa,a.h[e]=b);Cc.collisionResponses.h[d].h[e]=c;Cc.collisionResponses.h[e].h[d]=c};Cc.preSolve=function(a,b){b=a.getFixtureA().getBody().groupID;var c=a.getFixtureB().getBody().groupID;null!=Cc.collisionResponses.h[b]&&"sensor"==Cc.collisionResponses.h[b].h[c]&&a.setEnabled(!1)};
Cc.get=function(){return 0<Cc.recycledCollisions.length?Cc.recycledCollisions.pop():new Cc};Cc.recycle=function(a){a.clear();Cc.recycledCollisions.push(a)};Cc.prototype={thisFromTop:null,thisFromLeft:null,thisFromBottom:null,thisFromRight:null,thisCollidedWithActor:null,thisCollidedWithTile:null,thisCollidedWithSensor:null,thisCollidedWithTerrain:null,otherFromTop:null,otherFromLeft:null,otherFromBottom:null,otherFromRight:null,otherCollidedWithActor:null,otherCollidedWithTile:null,otherCollidedWithSensor:null,
otherCollidedWithTerrain:null,points:null,thisActor:null,otherActor:null,thisShape:null,otherShape:null,actorA:null,actorB:null,maskA:null,maskB:null,groupA:null,groupB:null,bounds:null,useBounds:null,remove:null,solidCollision:null,linkedCollision:null,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__:Cc};var ue=function(a,
b,c,d){this.x=a;this.y=b;this.normalX=c;this.normalY=d};h["com.stencyl.models.actor.CollisionPoint"]=ue;ue.__name__="com.stencyl.models.actor.CollisionPoint";ue.resetStatics=function(){ue.freedCollisionPoints=[]};ue.get=function(a,b,c,d){if(0<ue.freedCollisionPoints.length){var e=ue.freedCollisionPoints.pop();e.x=a;e.y=b;e.normalX=c;e.normalY=d;return e}return new ue(a,b,c,d)};ue.free=function(a){ue.freedCollisionPoints.push(a)};ue.prototype={x:null,y:null,normalX:null,normalY:null,__class__:ue};
var qj=function(a,b){this.name=b;this.ID=a;this.sID="[Group "+a+","+b+"]";this.list=[]};h["com.stencyl.models.actor.Group"]=qj;qj.__name__="com.stencyl.models.actor.Group";qj.prototype={list:null,name:null,ID:null,sID:null,addChild:function(a){this.list.push(a)},removeChild:function(a){},toString:function(){return this.sID},__class__:qj};var nj=function(a,b,c,d,e){Tc.call(this,a,c,b);this.defaultAnimation=d;this.readableImages=e;this.animations=new Wa};h["com.stencyl.models.actor.Sprite"]=nj;nj.__name__=
"com.stencyl.models.actor.Sprite";nj.__super__=Tc;nj.prototype=w(Tc.prototype,{defaultAnimation:null,animations:null,readableImages:null,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()},reloadGraphics:function(a){-1==a?(this.unloadGraphics(),this.loadGraphics()):(this.animations.h[a].unloadGraphics(),this.animations.h[a].loadGraphics());for(var b=
p.engine.allActors.iterator();b.hasNext();){var c=b.next();null==c||c.dead||c.recycled||c.type.spriteID==this.ID&&c.reloadAnimationGraphics(a)}},get_width:function(){var a=this.animations.h[this.defaultAnimation];return a.imgWidth/a.framesAcross|0},get_height:function(){var a=this.animations.h[this.defaultAnimation];return a.imgHeight/a.framesDown|0},__class__:nj,__properties__:{get_height:"get_height",get_width:"get_width"}});var lg=function(a){Tc.call(this,0,"Color Background",-1);this.bgColor=
a;a==lg.WHITE&&(this.bgColor=16777215)};h["com.stencyl.models.background.ColorBackground"]=lg;lg.__name__="com.stencyl.models.background.ColorBackground";lg.__interfaces__=[Ji];lg.__super__=Tc;lg.prototype=w(Tc.prototype,{bgColor:null,update:function(){},draw:function(a,b,c,d,e){this.bgColor!=lg.TRANSPARENT&&(a.clear(),a.beginFill(this.bgColor),a.drawRect(0,0,d,e),a.endFill(),a.drawCircle(1,1,1))},__class__:lg});var tj=function(a,b){Tc.call(this,0,"Gradient Background",-1);this.topColor=a;this.bottomColor=
b};h["com.stencyl.models.background.GradientBackground"]=tj;tj.__name__="com.stencyl.models.background.GradientBackground";tj.__interfaces__=[Ji];tj.__super__=Tc;tj.prototype=w(Tc.prototype,{topColor:null,bottomColor:null,update:function(){},draw:function(a,b,c,d,e){b=[this.topColor,this.bottomColor];c=new Ha;c.createGradientBox(d,e,Math.PI/2,0,0);a.clear();var f=new na(1,1);a.beginBitmapFill(f);a.endFill();a.beginGradientFill(0,b,[100,100],[0,255],c,0);a.drawRect(0,0,d,e);a.endFill()},__class__:tj});
var $g=function(a,b,c,d,e,f,g){Tc.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};h["com.stencyl.models.background.ImageBackground"]=$g;$g.__name__="com.stencyl.models.background.ImageBackground";$g.__interfaces__=[Ji];$g.__super__=Tc;$g.prototype=w(Tc.prototype,{currFrame:null,currTime:null,img:null,frames:null,durations:null,parallaxX:null,parallaxY:null,repeats:null,repeated:null,
graphicsLoaded:null,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 ia(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 na(Math.max(b,a)|0,Math.max(c,d)|0),g=0;for(c=(c/d|0)+1;g<c;)for(var k=g++,l=0,m=(b/a|0)+1;l<m;){var p=l++;f.copyPixels(this.img,e,new pa(p*a,k*d))}this.img=f}this.repeated=!0},loadGraphics:function(){if(!this.graphicsLoaded){var a=[],b=this.durations.length;if(0<b)for(var c=
0;c<b;){var d=c++;a.push(Ea.getBitmapData("assets/graphics/"+p.IMG_BASE+"/background-"+this.ID+"-"+d+".png",!1))}else a.push(Ea.getBitmapData("assets/graphics/"+p.IMG_BASE+"/background-"+this.ID+"-0.png",!1));this.frames=[];b=0;for(c=a.length;b<c;)d=b++,this.repeats?(this.img=a[d],this.drawRepeated(null,p.screenWidth*p.SCALE|0,p.screenHeight*p.SCALE|0),this.frames.push(this.img)):this.frames.push(a[d]);this.img=this.frames[0];this.graphicsLoaded=!0}},unloadGraphics:function(){if(this.graphicsLoaded){this.img=
new na(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);this.graphicsLoaded=!1}},reloadGraphics:function(a){Tc.prototype.reloadGraphics.call(this,a);a=0;for(var b=p.engine.backgroundLayers;a<b.length;){var c=b[a];++a;c.model==this&&c.reload(c.resourceID)}},__class__:$g});var ci=function(a,b,c,d,e,f,g,k,l){$g.call(this,a,b,c,d,e,f,g);this.xVelocity=k;this.yVelocity=l};h["com.stencyl.models.background.ScrollingBackground"]=
ci;ci.__name__="com.stencyl.models.background.ScrollingBackground";ci.__interfaces__=[Ji];ci.__super__=$g;ci.prototype=w($g.prototype,{xVelocity:null,yVelocity:null,update:function(){},draw:function(a,b,c,d,e){},__class__:ci});var ag=function(){this.reset()};h["com.stencyl.models.collision.CollisionInfo"]=ag;ag.__name__="com.stencyl.models.collision.CollisionInfo";ag.resetStatics=function(){ag.infoArray=[]};ag.getCollisionInfo=function(){return 0<ag.infoArray.length?ag.infoArray.pop():new ag};ag.recycle=
function(a){ag.infoArray.push(a)};ag.prototype={max:null,min:null,maskA:null,maskB:null,solidCollision:null,reset:function(){this.max=this.min=0;this.maskA=this.maskB=null;this.solidCollision=!0},__class__:ag};var Mg=function(){this.collideTypes=[];this.solid=!0;this._class=L.getClass(this).__name__;this._check=new ua;var a=Mg.__name__,b=this._check,c=v(this,this.collideMask);null!=q[a]?b.setReserved(a,c):b.h[a]=c;a=wj.__name__;b=this._check;c=v(this,this.collideMasklist);null!=q[a]?b.setReserved(a,
c):b.h[a]=c;this.lastBounds=new ia;this.lastColID=-1};h["com.stencyl.models.collision.Mask"]=Mg;Mg.__name__="com.stencyl.models.collision.Mask";Mg.prototype={parent:null,groupID:null,list:null,lastBounds:null,lastCheckedMask:null,lastColID:null,solid:null,collideTypes:null,collide:function(a){if(null==this.parent)throw new E("Mask must be attached to a parent Entity");var b=a._class,c=this._check;b=null!=q[b]?c.getReserved(b):c.h[b];if(null!=b)return b(a);b=this._class;a=a._check;b=null!=q[b]?a.getReserved(b):
a.h[b];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=-9999999999,d=9999999999,e=-this.parent.currOffset.x*a.x-this.parent.currOffset.y*a.y;e<d&&(d=e);e>c&&(c=e);e=(-this.parent.currOffset.x+this.parent.cacheWidth)*a.x-this.parent.currOffset.y*a.y;e<d&&(d=e);e>c&&(c=e);e=-this.parent.currOffset.x*a.x+(-this.parent.currOffset.y+this.parent.cacheHeight)*a.y;e<d&&(d=e);e>c&&(c=e);e=(-this.parent.currOffset.x+this.parent.cacheWidth)*
a.x+(-this.parent.currOffset.y+this.parent.cacheHeight)*a.y;e<d&&(d=e);e>c&&(c=e);b.min=d;b.max=c},_class:null,_check:null,__class__:Mg};var ld=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);Mg.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=ld.__name__;b=this._check;c=v(this,this.collideHitbox);null!=q[a]?b.setReserved(a,c):b.h[a]=c};h["com.stencyl.models.collision.Hitbox"]=
ld;ld.__name__="com.stencyl.models.collision.Hitbox";ld.__super__=Mg;ld.prototype=w(Mg.prototype,{clone:function(){return new ld(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()},_width:null,_height:null,_x:null,_y:null,__class__:ld,__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 Um=function(a,b,c,d,e,f){null==f&&(f=0);null==e&&(e=0);ld.call(this);if(0==a||0==b||0==c||0==d)throw new E("Illegal Grid, sizes cannot be 0.");this._rect=T.rect;this._point=T.point;this._point2=T.point2;this.columns=a/c|0;this.rows=b/d|0;this._tile=new ia(0,0,c,d);this._x=e;this._y=f;this._width=a;this._height=b;this.usePositions=!1;this.groupID=1;a=Mg.__name__;b=this._check;
c=v(this,this.collideMask);null!=q[a]?b.setReserved(a,c):b.h[a]=c;a=ld.__name__;b=this._check;c=v(this,this.collideHitbox);null!=q[a]?b.setReserved(a,c):b.h[a]=c;a=$k.__name__;b=this._check;c=v(this,this.collidePixelmask);null!=q[a]?b.setReserved(a,c):b.h[a]=c;this.data=[];a=0;for(b=this.rows;a<b;)a++,this.data.push([])};h["com.stencyl.models.collision.Grid"]=Um;Um.__name__="com.stencyl.models.collision.Grid";Um.__super__=ld;Um.prototype=w(ld.prototype,{usePositions:null,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 l=g++;this.setTile(l,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},columns:null,rows:null,data:null,collideMask:function(a){this._rect.x=a.parent.colX-this.parent.colX;this._rect.y=a.parent.colY-this.parent.colY;var b=((this._rect.x+a.parent.cacheWidth-1)/this._tile.width|0)+1,c=this._rect.x/this._tile.width|0,d=this._rect.y/this._tile.height|0;for(a=((this._rect.y+a.parent.cacheHeight-1)/this._tile.height|0)+1;d<a;)for(var e=d++,f=c,g=b;f<g;){var k=f++;if(this.getTile(k,e))return!0}return!1},collideHitbox:function(a){this._rect.x=a.parent.colX+a._x;this._rect.y=
a.parent.colY+a._y;for(var b=((this._rect.x+a._width-1)/this._tile.width|0)+1,c=this._rect.x/this._tile.width|0,d=this._rect.y/this._tile.height|0,e=((this._rect.y+a._height-1)/this._tile.height|0)+1;d<e;)for(var f=d++,g=c,k=b;g<k;){var l=g++;if(this.getTile(l,f))return this.lastBounds.x=l*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)},_tile:null,_rect:null,_point:null,_point2:null,__class__:Um,__properties__:w(ld.prototype.__properties__,{get_tileHeight:"get_tileHeight",get_tileWidth:"get_tileWidth"})});var wj=function(a,b){this._count=0;ld.call(this);this._masks=[];this._temp=[];this.solid=!1;this.parent=b;for(b=0;b<a.length;){var c=a[b];++b;this.add(c)}};h["com.stencyl.models.collision.Masklist"]=wj;wj.__name__="com.stencyl.models.collision.Masklist";
wj.__super__=ld;wj.prototype=w(ld.prototype,{collide:function(a){for(var b=0,c=this._masks;b<c.length;){var d=c[b];++b;d.groupID=-1E3==d.groupID?d.parent.groupID:d.groupID;if((a instanceof wj||-2==a.groupID||Eb.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=-1E3==d.groupID?d.parent.groupID:d.groupID;for(var e=0,f=a._masks;e<f.length;){var g=f[e];++e;g.groupID=-1E3==g.groupID?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=-1E3==a.groupID?this.parent.groupID:a.groupID;var b=Eb.get().groupsCollidesWith.h[a.groupID];if(null!=b)for(var c=0;c<b.length;){var d=b[c];++c;T.contains(this.collideTypes,d)||this.collideTypes.push(d)}return a},remove:function(a){if(0>Lc.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}ld.prototype.assignTo.call(this,a)},update:function(){for(var a=1E5,b=1E5,c=0,d=0,e,f=this._count;0<f--;)e=L.__cast(this._masks[f],ld),null!=e&&(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;ld.prototype.update.call(this)},count:null,get_count:function(){return this._count},_masks:null,_temp:null,_count:null,
__class__:wj,__properties__:w(ld.prototype.__properties__,{get_count:"get_count"})});var $k=function(a,b,c){null==c&&(c=0);null==b&&(b=0);ld.call(this);a instanceof na&&(this._data=a);if(null==this._data)throw new E("Invalid Pixelmask source image.");this.threshold=1;this._rect=T.rect;this._point=T.point;this._point2=T.point2;this._width=this.get_data().width;this._height=this.get_data().height;this._x=b;this._y=c;a=Mg.__name__;b=this._check;c=v(this,this.collideMask);null!=q[a]?b.setReserved(a,c):
b.h[a]=c;a=$k.__name__;b=this._check;c=v(this,this.collidePixelmask);null!=q[a]?b.setReserved(a,c):b.h[a]=c;a=ld.__name__;b=this._check;c=v(this,this.collideHitbox);null!=q[a]?b.setReserved(a,c):b.h[a]=c};h["com.stencyl.models.collision.Pixelmask"]=$k;$k.__name__="com.stencyl.models.collision.Pixelmask";$k.__super__=ld;$k.prototype=w(ld.prototype,{threshold:null,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},_data:null,_rect:null,_point:null,_point2:null,__class__:$k,__properties__:w(ld.prototype.__properties__,{set_data:"set_data",get_data:"get_data"})});var Hm=function(a,b,c,d,e,f,g,k,l,m,p,n){this.elementID=a;this.x=b;this.y=c;this.scaleX=d;this.scaleY=e;this.layerID=f;this.orderInLayer=g;this.angle=k;this.groupID=l;this.actorID=m;this.behaviorValues=
p;this.isCustomized=n;this.actorType=L.__cast(ac.get().resources.get(m),Gg)};h["com.stencyl.models.scene.ActorInstance"]=Hm;Hm.__name__="com.stencyl.models.scene.ActorInstance";Hm.prototype={elementID:null,x:null,y:null,scaleX:null,scaleY:null,layerID:null,orderInLayer:null,angle:null,groupID:null,actorID:null,isCustomized:null,behaviorValues:null,actorType:null,__class__:Hm};var be=function(){};h["com.stencyl.models.scene.Autotile"]=be;be.__name__="com.stencyl.models.scene.Autotile";var rq=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 Aa;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]};h["com.stencyl.models.scene.AutotileFormat"]=rq;rq.__name__="com.stencyl.models.scene.AutotileFormat";
rq.prototype={autotileArrayLength:null,defaultAnimationIndex:null,name:null,id:null,tilesAcross:null,tilesDown:null,animIndex:null,animCorners:null,__class__:rq};var qq=function(a,b,c,d){this.tl=a;this.tr=b;this.bl=c;this.br=d};h["com.stencyl.models.scene.Corners"]=qq;qq.__name__="com.stencyl.models.scene.Corners";qq.prototype={tl:null,tr:null,bl:null,br:null,toString:function(){return"TL: "+K.string(this.tl)+", TR: "+K.string(this.tr)+", BL: "+K.string(this.bl)+", BR: "+K.string(this.br)},__class__:qq};
var Yp=function(a,b,c,d){this.type=a;this.x=b;this.y=c;this.layer=d};h["com.stencyl.models.scene.DeferredActor"]=Yp;Yp.__name__="com.stencyl.models.scene.DeferredActor";Yp.prototype={type:null,x:null,y:null,layer:null,__class__:Yp};var Yg=function(a,b,c,d,e,f,g){qa.call(this);this.ID=a;this.layerName=b;this.order=c;this.scrollFactorX=d;this.scrollFactorY=e;this.set_alpha(f);this.set_blendMode(g)};h["com.stencyl.models.scene.layers.RegularLayer"]=Yg;Yg.__name__="com.stencyl.models.scene.layers.RegularLayer";
Yg.__super__=qa;Yg.prototype=w(qa.prototype,{ID:null,layerName:null,order:null,scrollFactorX:null,scrollFactorY:null,opacity:null,alphaTween:null,updatePosition:function(a,b,c){},__class__:Yg});var Rc=function(a,b,c,d,e,f,g,k){this.cameraOldX=this.cameraOldY=-1;this.cameraMoved=!0;Yg.call(this,a,b,c,d,e,f,g);this.tiles=k;null!=this.tiles&&this.tiles.set_blendMode(g);this.actorContainer=new qa;this.overlay=new qa;null!=this.tiles&&this.addChild(this.tiles);this.addChild(this.actorContainer);this.addChild(this.overlay);
this.attachedImages=[]};h["com.stencyl.models.scene.Layer"]=Rc;Rc.__name__="com.stencyl.models.scene.Layer";Rc.__super__=Yg;Rc.prototype=w(Yg.prototype,{tiles:null,actorContainer:null,overlay:null,attachedImages:null,cameraMoved:null,cameraOldX:null,cameraOldY:null,updatePosition:function(a,b,c){if(ma.pixelsnap){c=a*this.scrollFactorX|0;var d=b*this.scrollFactorY|0;a=Math.round(a);b=Math.round(b);this.set_x(-(a*this.scrollFactorX|0));this.set_y(-(b*this.scrollFactorY|0));var e=c/(p.engine.scene.tileWidth*
p.SCALE)|0;var f=d/(p.engine.scene.tileHeight*p.SCALE)|0}else c=a*this.scrollFactorX,d=b*this.scrollFactorY,this.set_x(-a*this.scrollFactorX),this.set_y(-b*this.scrollFactorY),e=c/(p.engine.scene.tileWidth*p.SCALE),f=d/(p.engine.scene.tileHeight*p.SCALE);this.tiles.setPosition(c,d);this.overlay.set_x(a);this.overlay.set_y(b);this.cameraMoved=this.cameraMoved||this.cameraOldX!=e||this.cameraOldY!=f;this.cameraOldX=e;this.cameraOldY=f},clear:function(){for(var a=0,b=this.attachedImages;a<b.length;){var c=
b[a];++a;this.removeChild(c)}this.attachedImages=[];T.removeAllChildren(this.actorContainer);this.overlay.get_graphics().clear();null!=this.tiles&&this.tiles.clear()},__class__:Rc});var xj=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};h["com.stencyl.models.scene.RegionDef"]=xj;xj.__name__="com.stencyl.models.scene.RegionDef";xj.prototype={x:null,y:null,shape:null,shapes:null,ID:null,name:null,
shapeID:null,simpleBounds:null,__class__:xj};var og=function(a,b,c,d,e,f,g){null==g&&(g=!0);null==f&&(f=0);null==e&&(e=0);null==d&&(d=0);qa.call(this);this.curStep=0;this.running=!0;this.repeats=g;this.image1=new Zc(a);this.addChild(this.image1);this.cacheWidth=this.image1.get_width();this.cacheHeight=this.image1.get_height();g&&(this.image2=new Zc(a),this.image2.set_x(this.image1.get_x()-this.cacheWidth),this.addChild(this.image2),this.image3=new Zc(a),this.image3.set_x(this.image1.get_x()+this.cacheWidth),
this.addChild(this.image3),this.image4=new Zc(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 Zc(a),this.image5.set_y(this.image1.get_y()-this.cacheHeight),this.addChild(this.image5),this.image6=new Zc(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 Zc(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 Zc(a),this.image8.set_y(this.image1.get_y()+this.cacheHeight),this.addChild(this.image8),this.image9=new Zc(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};h["com.stencyl.models.scene.ScrollingBitmap"]=og;og.__name__="com.stencyl.models.scene.ScrollingBitmap";og.__super__=qa;og.prototype=w(qa.prototype,{image1:null,image2:null,image3:null,image4:null,image5:null,image6:null,image7:null,image8:null,image9:null,speed:null,curStep:null,running:null,parallax:null,scrolling:null,cacheWidth:null,cacheHeight:null,xP:null,yP:null,xPos:null,yPos:null,xVelocity:null,yVelocity:null,parallaxX:null,parallaxY:null,backgroundID:null,
repeats:null,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*p.SCALE;this.yP+=this.yVelocity/10*p.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__:og});var sq=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&&(c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),this.fillColor=a<<16|b<<8|c);this.fillColor=g};h["com.stencyl.models.scene.TerrainDef"]=sq;sq.__name__="com.stencyl.models.scene.TerrainDef";sq.prototype=
{x:null,y:null,shape:null,shapes:null,ID:null,name:null,groupID:null,fillColor:null,__class__:sq};var fd=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 l=Eb.get().atlases.h[k.atlasID];if(null!=f){this.autotileFormat=f;this.autotileMergeSet=g;g=[];var m=0;for(f=f.autotileArrayLength;m<f;)m++,g.push(new fd(a,b,c,d,e,null,null,k));this.autotiles=g}null!=l&&l.active&&this.loadGraphics();this.currTime=this.currFrame=0;this.updateSource=
!1};h["com.stencyl.models.scene.Tile"]=fd;fd.__name__="com.stencyl.models.scene.Tile";fd.prototype={tileID:null,collisionID:null,metadata:null,frameIndex:null,parent:null,autotileFormat:null,autotiles:null,autotileMergeSet:null,pixels:null,durations:null,frames:null,currFrame:null,currTime:null,updateSource:null,data:null,update:function(a){1==this.durations.length||p.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 ia(this.currFrame*a*p.SCALE,0,a*p.SCALE,b*p.SCALE)},loadGraphics:function(){var a=null;if(1<this.durations.length||null!=this.autotileFormat)a=Ea.getBitmapData("assets/graphics/"+p.IMG_BASE+"/tileset-"+this.parent.ID+"-"+this.tileID+".png",!1);if(null!=this.autotileFormat){var b=0,c=0;for(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.data=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;c.data=null}},loadAnimationPixels:function(a){if(null!=a){this.pixels=a;this.data=new Gi(a);a=0;for(var b=this.durations.length;a<b;)this.currFrame=a++,this.data.addRect(this.getSource(this.parent.tileWidth,this.parent.tileHeight))}},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;fd.dummyRect.width=g;fd.dummyRect.height=k;for(var l=0,m=b.animCorners;l<m.length;){var p=m[l];++l;for(var n=new na(e*d,f),h=function(a,b){return function(c,d){b[0](a[0],c,d)}}([a],[v(n,n.copyPixels)]),q=0,t=d;q<t;){var r=q++,u=e*b.tilesAcross*r;r*=e;var x=p.tl;fd.dummyRect.x=u+x.x*fd.dummyRect.width;fd.dummyRect.y=x.y*fd.dummyRect.height;h(fd.dummyRect,new pa(r,0));x=p.tr;fd.dummyRect.x=u+x.x*fd.dummyRect.width;
fd.dummyRect.y=x.y*fd.dummyRect.height;h(fd.dummyRect,new pa(r+g,0));x=p.br;fd.dummyRect.x=u+x.x*fd.dummyRect.width;fd.dummyRect.y=x.y*fd.dummyRect.height;h(fd.dummyRect,new pa(r+g,k));x=p.bl;fd.dummyRect.x=u+x.x*fd.dummyRect.width;fd.dummyRect.y=x.y*fd.dummyRect.height;h(fd.dummyRect,new pa(r,k))}c.push(n)}return c},sourceRect:function(a,b){fd.dummyRect.x=b+a.x*fd.dummyRect.width;fd.dummyRect.y=a.y*fd.dummyRect.height;return fd.dummyRect},__class__:fd};var Ce=function(a,b,c,d){qa.call(this);this.layerID=
a;this.scene=b;this.numRows=d;this.numCols=c;this.clear();this.tilemaps=new Aa};h["com.stencyl.models.scene.TileLayer"]=Ce;Ce.__name__="com.stencyl.models.scene.TileLayer";Ce.__interfaces__=[$h];Ce.resetStatics=function(){Ce.cacheSource=new Wa};Ce.__super__=qa;Ce.prototype=w(qa.prototype,{layerID:null,rows:null,autotileData:null,grid:null,scene:null,numRows:null,numCols:null,tilemaps:null,noTiles:null,clear:function(){if(null!=this.tilemaps)for(var a=this.tilemaps.iterator();a.hasNext();)a.next().removeTiles();
this.noTiles=!0;this.rows=[];this.autotileData=[];a=0;for(var b=this.numRows;a<b;){var c=a++;this.rows[c]=[];this.autotileData[c]=[];for(var d=0,e=this.numCols;d<e;){var f=d++;this.rows[c][f]=null;this.autotileData[c][f]=0}}},setPosition:function(a,b){},mountGrid:function(){if(null!=this.grid){var a=new Bb(p.engine,1E8,1,0,0,-1,this.grid.get_width(),this.grid.get_height(),null,new ua,null,null,!1,!0,!1,!1,this.grid,p.NO_PHYSICS);a.set_name("Terrain");a.typeID=-1;a.set_visible(!1);a.ignoreGravity=
!0;p.engine.getGroup(1).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);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){var c=a-1;for(a+=2;c<a;)for(var d=c++,
e=b-1,f=b+2;e<f;){var g=e++;0>g||0>d||g>=this.numCols||d>=this.numRows||this.updateAutotile(d,g)}},updateAutotile:function(a,b){var c=this.rows[a][b];if(null!=c&&null!=c.autotiles){for(var d=0,e=Ce.autotileFlagPointMap.keys();e.hasNext();){var f=e.next(),g=Ce.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){for(var c=this.tilemaps.iterator();c.hasNext();)c.next().removeTiles();
a=Math.floor(a);b=Math.floor(b);var d=this.numRows;c=this.scene.tileWidth;var e=this.scene.tileHeight;a=a/p.SCALE/c|0;var f=b/p.SCALE/e|0;b=2+a+(p.screenWidth/c|0);var g=2+f+(p.screenHeight/e|0);b=Math.min(b,this.numCols)|0;g=Math.min(g,d)|0;for(d=f;d<g;){for(f=a;f<b;){var k=this.getTileAt(d,f);if(null!=k&&k.parent.graphicsLoaded){if(null==Ce.cacheSource.h[1E6*k.parent.ID+k.tileID]||k.updateSource){k.updateSource=!1;if(null==k.pixels&&null==k.autotiles)var l=Ce.cacheSource,m=1E6*k.parent.ID+k.tileID,
h=k.parent.getImageSourceForTile(k.tileID,c,e);else l=Ce.cacheSource,m=1E6*k.parent.ID+k.tileID,h=k.getSource(c,e);l.h[m]=h}null!=Ce.cacheSource.h[1E6*k.parent.ID+k.tileID]&&(null!=k.autotiles&&(k=k.autotiles[this.autotileData[d][f]]),null==k.data?(l=k.parent.sheetMap.h[k.tileID],this.getTilemap(k.parent.flTileset).addTile(new Kg(l,f*c*p.SCALE,d*e*p.SCALE))):(l=k.currFrame,this.getTilemap(k.data).addTile(new Kg(l,f*c*p.SCALE,d*e*p.SCALE))))}++f}++d}}},updateScale:function(){for(var a=this.tilemaps.iterator();a.hasNext();){var b=
a.next();b.set_width(p.sceneWidth*p.SCALE);b.set_height(p.sceneHeight*p.SCALE)}},getTilemap:function(a){if(null==this.tilemaps.h.__keys__[a.__id__]){var b=new Lg(p.sceneWidth*p.SCALE|0,p.sceneHeight*p.SCALE|0,a,ma.antialias);this.tilemaps.set(a,b);this.addChild(b)}return this.tilemaps.h[a.__id__]},__class__:Ce});var Rf=function(a,b,c,d,e,f,g,k,l){Tc.call(this,a,c,b);this.framesAcross=d;this.framesDown=e;this.tileWidth=f;this.tileHeight=g;this.readableImages=k;this.tiles=l};h["com.stencyl.models.scene.Tileset"]=
Rf;Rf.__name__="com.stencyl.models.scene.Tileset";Rf.__super__=Tc;Rf.prototype=w(Tc.prototype,{framesAcross:null,framesDown:null,tileWidth:null,tileHeight:null,tiles:null,readableImages:null,pixels:null,graphicsLoaded:null,flTileset:null,sheetMap:null,setupFLTileset:function(){this.sheetMap=new Wa;if(null!=this.pixels){this.flTileset=new Gi(this.convertPixels(this.pixels));for(var a=0,b=this.tiles;a<b.length;){var c=b[a];++a;if(null!=c){var d=this.getImageSourceForTile(c.tileID,this.tileWidth|0,this.tileHeight|
0),e=this.sheetMap;c=c.tileID;d=this.flTileset.addRect(d);e.h[c]=d}}}},getImageSourceForTile:function(a,b,c){var d=this.tiles[a];null==d?(Rf.temp.x=0,Rf.temp.y=0):(a=Math.floor(d.frameIndex/this.framesAcross),d=Math.floor(d.frameIndex%this.framesAcross),Rf.temp.x=d*b*p.SCALE+2*d+1,Rf.temp.y=a*c*p.SCALE+2*a+1);Rf.temp.width=b*p.SCALE;Rf.temp.height=c*p.SCALE;return Rf.temp.clone()},loadGraphics:function(){if(!this.graphicsLoaded){this.pixels=Ea.getBitmapData("assets/graphics/"+p.IMG_BASE+"/tileset-"+
this.ID+".png",!1);for(var a=0,b=this.tiles;a<b.length;){var c=b[a];++a;null!=c&&c.loadGraphics()}this.setupFLTileset();ma.disposeImages&&!this.readableImages&&this.pixels.dispose();this.graphicsLoaded=!0}},unloadGraphics:function(){if(this.graphicsLoaded){this.pixels.readable&&this.pixels.dispose();this.flTileset=this.pixels=null;for(var a=0,b=this.tiles;a<b.length;){var c=b[a];++a;null!=c&&c.unloadGraphics()}this.graphicsLoaded=!1}},reloadGraphics:function(a){if(-1==a){this.unloadGraphics();this.loadGraphics();
a=0;for(var b=this.tiles;a<b.length;){var c=b[a];++a;null!=c&&(c.updateSource=!0)}}else a=this.tiles[a],null!=a&&(a.unloadGraphics(),a.loadGraphics());p.engine.tileUpdated=!0},convertPixels:function(a){for(var b=this.tileWidth*p.SCALE|0,c=this.tileHeight*p.SCALE|0,d=a.width/b|0,e=a.height/c|0,f=new na(a.width+2*d|0,a.height+2*e|0,!0,0),g,k,l,m,h=0;h<e;){for(g=0;g<d;)k=g*b+2*g+1|0,l=h*c+2*h+1|0,m=new ia(g*b,h*c,b,c),k=new pa(k,l),f.copyPixels(a,m,k),++g;++h}for(h=0;h<e;){for(g=0;g<d;){k=g*b+2*g+1|
0;l=h*c+2*h+1|0;for(a=0;a<b;)m=f.getPixel32(k+a,l),f.setPixel32(k+a,l-1,m),m=f.getPixel32(k+a,l+c-1),f.setPixel32(k+a,l+c,m),++a;for(a=0;a<c;)m=f.getPixel32(k,l+a),f.setPixel32(k-1,l+a,m),m=f.getPixel32(k+b-1,l+a),f.setPixel32(k+b,l+a,m),++a;++g}++h}return f},__class__:Rf});var tq=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};h["com.stencyl.models.scene.Wireframe"]=tq;tq.__name__="com.stencyl.models.scene.Wireframe";tq.prototype={x:null,y:null,shape:null,
shape2:null,width:null,height:null,__class__:tq};var Fd=function(a,b,c,d,e,f,g,k,l){Yg.call(this,a,b,c,d,e,f,g);this.resourceID=k;this.customScroll=l;this.model=L.__cast(ac.get().resources.get(k),$g)};h["com.stencyl.models.scene.layers.BackgroundLayer"]=Fd;Fd.__name__="com.stencyl.models.scene.layers.BackgroundLayer";Fd.__super__=Yg;Fd.prototype=w(Yg.prototype,{model:null,bitmap:null,resourceID:null,customScroll:null,isAnimated:null,frameCount:null,currIndex:null,currTime:null,cacheIndex:null,cacheWidth:null,
cacheHeight:null,bgChild:null,load:function(){if(null!=this.model&&null!=this.model.img){this.bitmap=new Zc(this.model.img,1,!0);this.bitmap.smoothing=ma.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,p.screenWidth*p.SCALE|0,p.screenHeight*p.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=p.screenWidth*p.SCALE|0,f=p.screenHeight*p.SCALE|0,g=p.sceneWidth*p.SCALE|0,k=p.sceneHeight*p.SCALE|0;c>e&&c<g&&(a=1-(g-c)/(g-e));d>f&&d<k&&(b=1-(k-d)/(k-f))}this.model instanceof ci?(c=L.__cast(this.model,ci),a=new og(this.model.img,c.xVelocity,c.yVelocity,a,b,this.resourceID,this.model.repeats),this.addChild(this.bgChild=a)):this.model.repeats?(a=new og(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 ci(-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(this.bgChild instanceof og){var c=L.__cast(this.bgChild,og);c.parallaxX=a;c.parallaxY=b;c.parallax=0!=a||0!=b}},setScrollSpeed:function(a,
b){if(this.bgChild instanceof og){var c=L.__cast(this.bgChild,og);c.xVelocity=a;c.yVelocity=b;c.scrolling=0!=a||0!=b}},reload:function(a){null!=this.bgChild&&(this.removeChild(this.bgChild),this.bgChild=null);this.resourceID=a;this.model=L.__cast(ac.get().resources.get(this.resourceID),$g);this.load()},setImage:function(a){this.bitmap.set_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),this.bgChild instanceof og?(this.cacheIndex=this.currIndex,this.model.repeats&&this.model.drawRepeated(this,p.screenWidth*p.SCALE|0,p.screenHeight*p.SCALE|0),this.currIndex=this.cacheIndex,a=this.bgChild.image1,a.set_bitmapData(this.model.frames[this.currIndex]),this.model.repeats&&(a=this.bgChild.image2,a.set_bitmapData(this.model.frames[this.currIndex]),
a=this.bgChild.image3,a.set_bitmapData(this.model.frames[this.currIndex]),a=this.bgChild.image4,a.set_bitmapData(this.model.frames[this.currIndex]),a=this.bgChild.image5,a.set_bitmapData(this.model.frames[this.currIndex]),a=this.bgChild.image6,a.set_bitmapData(this.model.frames[this.currIndex]),a=this.bgChild.image7,a.set_bitmapData(this.model.frames[this.currIndex]),a=this.bgChild.image8,a.set_bitmapData(this.model.frames[this.currIndex]),a=this.bgChild.image9,a.set_bitmapData(this.model.frames[this.currIndex]))):
this.bitmap.set_bitmapData(this.model.frames[this.currIndex]))},updatePosition:function(a,b,c){this.bgChild instanceof og?L.__cast(this.bgChild,og).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__:Fd});var Jc=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};h["com.stencyl.utils.ARGB"]=Jc;Jc.__name__=
"com.stencyl.utils.ARGB";Jc.setARGBi=function(a,b,c,d){return(a&255)<<24|(b&255)<<16|(c&255)<<8|d&255};Jc.setARGBf=function(a,b,c,d){a=255*(0>a?0:1<a?1:a);b=255*(0>b?0:1<b?1:b);c=255*(0>c?0:1<c?1:c);d=255*(0>d?0:1<d?1:d);return(((0<a?a+.5:0>a?a-.5:0)|0)&255)<<24|(((0<b?b+.5:0>b?b-.5:0)|0)&255)<<16|(((0<c?c+.5:0>c?c-.5:0)|0)&255)<<8|((0<d?d+.5:0>d?d-.5:0)|0)&255};Jc.toARGB=function(a){return new Jc(.00392156862745098*(a>>>24),.00392156862745098*(a>>>16&255),.00392156862745098*(a>>>8&255),.00392156862745098*
(a&255))};Jc.getRGB=function(a){return a&16777215};Jc.setRGB=function(a,b,c,d){return b<<16|c<<8|d|a&-16777216};Jc.getA=function(a){return a>>>24};Jc.getAf=function(a){return.00392156862745098*(a>>>24)};Jc.getR=function(a){return a>>>16&255};Jc.getRf=function(a){return.00392156862745098*(a>>>16&255)};Jc.getG=function(a){return a>>>8&255};Jc.getGf=function(a){return.00392156862745098*(a>>>8&255)};Jc.getB=function(a){return a&255};Jc.getBf=function(a){return.00392156862745098*(a&255)};Jc.setA=function(a,
b){return b<<24|a&16777215};Jc.setAf=function(a,b){b=255*(0>b?0:1<b?1:b);return((0<b?b+.5:0>b?b-.5:0)|0)<<24|a&16777215};Jc.setR=function(a,b){return(b&255)<<16|a&-16711681};Jc.setRf=function(a,b){b=255*(0>b?0:1<b?1:b);return(((0<b?b+.5:0>b?b-.5:0)|0)&255)<<16|a&-16711681};Jc.setG=function(a,b){return b<<8|a&-65281};Jc.setGf=function(a,b){b=255*(0>b?0:1<b?1:b);return((0<b?b+.5:0>b?b-.5:0)|0)<<8|a&-65281};Jc.setB=function(a,b){return b|a&-256};Jc.setBf=function(a,b){b=255*(0>b?0:1<b?1:b);return(0<
b?b+.5:0>b?b-.5:0)|0|a&-256};Jc.prototype={a:null,r:null,g:null,b:null,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(){var a=255*this.a;return(0<a?a+.5:0>a?a-.5:0)|0},getR8:function(){var a=255*this.r;return(0<a?a+.5:0>a?a-.5:0)|0},getG8:function(){var a=255*this.g;return(0<a?a+.5:0>a?a-.5:0)|0},getB8:function(){var a=255*this.b;return(0<a?a+.5:
0>a?a-.5:0)|0},get24:function(){var a=255*this.r,b=255*this.g,c=255*this.b;return((0<a?a+.5:0>a?a-.5:0)|0)<<16|((0<b?b+.5:0>b?b-.5:0)|0)<<8|(0<c?c+.5:0>c?c-.5:0)|0},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(){var a=255*this.a,b=255*this.r,c=255*this.g,d=255*this.b;return((0<a?a+.5:0>a?a-.5:0)|0)<<24|((0<b?b+.5:0>b?b-.5:0)|0)<<16|((0<c?c+.5:0>c?c-.5:0)|0)<<8|(0<d?d+.5:0>d?d-.5:0)|0},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__:Jc};C["com.stencyl.utils.ColorDeficiencyTypes"]={__ename__:"com.stencyl.utils.ColorDeficiencyTypes",__constructs__:"Protanopia Protanomaly Deuteranopia Deuteranomaly Tritanopia Tritanomaly Achromatopsia Achromatomaly".split(" "),Protanopia:{_hx_index:0,__enum__:"com.stencyl.utils.ColorDeficiencyTypes",
toString:u},Protanomaly:{_hx_index:1,__enum__:"com.stencyl.utils.ColorDeficiencyTypes",toString:u},Deuteranopia:{_hx_index:2,__enum__:"com.stencyl.utils.ColorDeficiencyTypes",toString:u},Deuteranomaly:{_hx_index:3,__enum__:"com.stencyl.utils.ColorDeficiencyTypes",toString:u},Tritanopia:{_hx_index:4,__enum__:"com.stencyl.utils.ColorDeficiencyTypes",toString:u},Tritanomaly:{_hx_index:5,__enum__:"com.stencyl.utils.ColorDeficiencyTypes",toString:u},Achromatopsia:{_hx_index:6,__enum__:"com.stencyl.utils.ColorDeficiencyTypes",
toString:u},Achromatomaly:{_hx_index:7,__enum__:"com.stencyl.utils.ColorDeficiencyTypes",toString:u}};var bb=function(){this.identity();this.matrix=[]};h["com.stencyl.utils.ColorMatrix"]=bb;bb.__name__="com.stencyl.utils.ColorMatrix";bb.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};bb.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};bb.prototype={m11:null,m12:null,m13:null,m14:null,m15:null,m21:null,m22:null,m23:null,m24:null,m25:null,m31:null,m32:null,m33:null,m34:null,m35:null,m41:null,m42:null,m43:null,m44:null,
m45:null,matrix:null,preHue:null,postHue:null,hueInitialized:null,getFilter:function(){var a=this.matrix;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 new Sf(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(){var a=this.m11,b=this.m12,c=this.m13,d=this.m14;this.m11=-1*this.m11+0*this.m12+0*this.m13+0*this.m14;this.m12=0*a+-1*this.m12+0*this.m13+0*this.m14;this.m13=0*a+0*b+-1*this.m13+0*this.m14;this.m14=0*a+0*b+0*c+this.m14;this.m15=255*a+255*b+255*c+0*d;a=this.m21;b=this.m22;c=this.m23;d=this.m24;this.m21=-1*this.m21+0*this.m22+0*this.m23+
0*this.m24;this.m22=0*a+-1*this.m22+0*this.m23+0*this.m24;this.m23=0*a+0*b+-1*this.m23+0*this.m24;this.m24=0*a+0*b+0*c+this.m24;this.m25=255*a+255*b+255*c+0*d;a=this.m31;b=this.m32;c=this.m33;d=this.m34;this.m31=-1*this.m31+0*this.m32+0*this.m33+0*this.m34;this.m32=0*a+-1*this.m32+0*this.m33+0*this.m34;this.m33=0*a+0*b+-1*this.m33+0*this.m34;this.m34=0*a+0*b+0*c+this.m34;this.m35=255*a+255*b+255*c+0*d;a=this.m41;b=this.m42;c=this.m43;d=this.m44;this.m41=-1*this.m41+0*this.m42+0*this.m43+0*this.m44;
this.m42=0*a+-1*this.m42+0*this.m43+0*this.m44;this.m43=0*a+0*b+-1*this.m43+0*this.m44;this.m44=0*a+0*b+0*c+this.m44;this.m45=255*a+255*b+255*c+0*d;return this},adjustSaturation:function(a){var b=1-a,c=b*bb.LUMA_R,d=b*bb.LUMA_G;b*=bb.LUMA_B;var e=c+a,f=d+a;a=b+a;var g=this.m11,k=this.m12,l=this.m13,m=this.m14;this.m11=this.m11*e+this.m12*c+this.m13*c+0*this.m14;this.m12=g*d+this.m12*f+this.m13*d+0*this.m14;this.m13=g*b+k*b+this.m13*a+0*this.m14;this.m14=0*g+0*k+0*l+this.m14;this.m15=0*g+0*k+0*l+0*
m;g=this.m21;k=this.m22;l=this.m23;m=this.m24;this.m21=this.m21*e+this.m22*c+this.m23*c+0*this.m24;this.m22=g*d+this.m22*f+this.m23*d+0*this.m24;this.m23=g*b+k*b+this.m23*a+0*this.m24;this.m24=0*g+0*k+0*l+this.m24;this.m25=0*g+0*k+0*l+0*m;g=this.m31;k=this.m32;l=this.m33;m=this.m34;this.m31=this.m31*e+this.m32*c+this.m33*c+0*this.m34;this.m32=g*d+this.m32*f+this.m33*d+0*this.m34;this.m33=g*b+k*b+this.m33*a+0*this.m34;this.m34=0*g+0*k+0*l+this.m34;this.m35=0*g+0*k+0*l+0*m;g=this.m41;k=this.m42;l=this.m43;
m=this.m44;this.m41=this.m41*e+this.m42*c+this.m43*c+0*this.m44;this.m42=g*d+this.m42*f+this.m43*d+0*this.m44;this.m43=g*b+k*b+this.m43*a+0*this.m44;this.m44=0*g+0*k+0*l+this.m44;this.m45=0*g+0*k+0*l+0*m;return this},adjustBrightness:function(a){this.adjustBrightnessRGB(a,a,a);return this},adjustBrightnessRGB:function(a,b,c){a*=255;b*=255;c*=255;var d=this.m11,e=this.m12,f=this.m13,g=this.m14;this.m11=this.m11+0*this.m12+0*this.m13+0*this.m14;this.m12=0*d+this.m12+0*this.m13+0*this.m14;this.m13=0*
d+0*e+this.m13+0*this.m14;this.m14=0*d+0*e+0*f+this.m14;this.m15=d*a+e*b+f*c+0*g;d=this.m21;e=this.m22;f=this.m23;g=this.m24;this.m21=this.m21+0*this.m22+0*this.m23+0*this.m24;this.m22=0*d+this.m22+0*this.m23+0*this.m24;this.m23=0*d+0*e+this.m23+0*this.m24;this.m24=0*d+0*e+0*f+this.m24;this.m25=d*a+e*b+f*c+0*g;d=this.m31;e=this.m32;f=this.m33;g=this.m34;this.m31=this.m31+0*this.m32+0*this.m33+0*this.m34;this.m32=0*d+this.m32+0*this.m33+0*this.m34;this.m33=0*d+0*e+this.m33+0*this.m34;this.m34=0*d+
0*e+0*f+this.m34;this.m35=d*a+e*b+f*c+0*g;d=this.m41;e=this.m42;f=this.m43;g=this.m44;this.m41=this.m41+0*this.m42+0*this.m43+0*this.m44;this.m42=0*d+this.m42+0*this.m43+0*this.m44;this.m43=0*d+0*e+this.m43+0*this.m44;this.m44=0*d+0*e+0*f+this.m44;this.m45=d*a+e*b+f*c+0*g;return this},adjustContrast:function(a){this.adjustContrastRGB(a,a,a);return this},adjustContrastRGB:function(a,b,c){a+=1;b+=1;c+=1;var d=128*(1-a),e=128*(1-b),f=128*(1-c),g=this.m11,k=this.m12,l=this.m13,m=this.m14;this.m11=this.m11*
a+0*this.m12+0*this.m13+0*this.m14;this.m12=0*g+this.m12*b+0*this.m13+0*this.m14;this.m13=0*g+0*k+this.m13*c+0*this.m14;this.m14=0*g+0*k+0*l+this.m14;this.m15=g*d+k*e+l*f+0*m;g=this.m21;k=this.m22;l=this.m23;m=this.m24;this.m21=this.m21*a+0*this.m22+0*this.m23+0*this.m24;this.m22=0*g+this.m22*b+0*this.m23+0*this.m24;this.m23=0*g+0*k+this.m23*c+0*this.m24;this.m24=0*g+0*k+0*l+this.m24;this.m25=g*d+k*e+l*f+0*m;g=this.m31;k=this.m32;l=this.m33;m=this.m34;this.m31=this.m31*a+0*this.m32+0*this.m33+0*this.m34;
this.m32=0*g+this.m32*b+0*this.m33+0*this.m34;this.m33=0*g+0*k+this.m33*c+0*this.m34;this.m34=0*g+0*k+0*l+this.m34;this.m35=g*d+k*e+l*f+0*m;g=this.m41;k=this.m42;l=this.m43;m=this.m44;this.m41=this.m41*a+0*this.m42+0*this.m43+0*this.m44;this.m42=0*g+this.m42*b+0*this.m43+0*this.m44;this.m43=0*g+0*k+this.m43*c+0*this.m44;this.m44=0*g+0*k+0*l+this.m44;this.m45=g*d+k*e+l*f+0*m;return this},adjustHue:function(a){a*=.01745329251994278;var b=Math.cos(a),c=Math.sin(a);a=bb.LUMA_R+b*(1-bb.LUMA_R)+c*-bb.LUMA_R;
var d=bb.LUMA_G+b*-bb.LUMA_G+c*-bb.LUMA_G,e=bb.LUMA_B+b*-bb.LUMA_B+c*(1-bb.LUMA_B),f=bb.LUMA_R+b*-bb.LUMA_R+.143*c,g=bb.LUMA_G+b*(1-bb.LUMA_G)+.14*c,k=bb.LUMA_B+b*-bb.LUMA_B+-.283*c,l=bb.LUMA_R+b*-bb.LUMA_R+c*-(1-bb.LUMA_R),m=bb.LUMA_G+b*-bb.LUMA_G+c*bb.LUMA_G;b=bb.LUMA_B+b*(1-bb.LUMA_B)+c*bb.LUMA_B;c=this.m11;var p=this.m12,n=this.m13,h=this.m14;this.m11=this.m11*a+this.m12*f+this.m13*l+0*this.m14;this.m12=c*d+this.m12*g+this.m13*m+0*this.m14;this.m13=c*e+p*k+this.m13*b+0*this.m14;this.m14=0*c+0*
p+0*n+this.m14;this.m15=0*c+0*p+0*n+0*h;c=this.m21;p=this.m22;n=this.m23;h=this.m24;this.m21=this.m21*a+this.m22*f+this.m23*l+0*this.m24;this.m22=c*d+this.m22*g+this.m23*m+0*this.m24;this.m23=c*e+p*k+this.m23*b+0*this.m24;this.m24=0*c+0*p+0*n+this.m24;this.m25=0*c+0*p+0*n+0*h;c=this.m31;p=this.m32;n=this.m33;h=this.m34;this.m31=this.m31*a+this.m32*f+this.m33*l+0*this.m34;this.m32=c*d+this.m32*g+this.m33*m+0*this.m34;this.m33=c*e+p*k+this.m33*b+0*this.m34;this.m34=0*c+0*p+0*n+this.m34;this.m35=0*c+
0*p+0*n+0*h;c=this.m41;p=this.m42;n=this.m43;h=this.m44;this.m41=this.m41*a+this.m42*f+this.m43*l+0*this.m44;this.m42=c*d+this.m42*g+this.m43*m+0*this.m44;this.m43=c*e+p*k+this.m43*b+0*this.m44;this.m44=0*c+0*p+0*n+this.m44;this.m45=0*c+0*p+0*n+0*h;return this},luminance2Alpha:function(){var a=bb.LUMA_R,b=bb.LUMA_G,c=bb.LUMA_B,d=this.m11,e=this.m12,f=this.m13,g=this.m14;this.m11=0*this.m11+0*this.m12+0*this.m13+this.m14*a;this.m12=0*d+0*this.m12+0*this.m13+this.m14*b;this.m13=0*d+0*e+0*this.m13+this.m14*
c;this.m14=0*d+0*e+0*f+0*this.m14;this.m15=255*d+255*e+255*f+0*g;d=this.m21;e=this.m22;f=this.m23;g=this.m24;this.m21=0*this.m21+0*this.m22+0*this.m23+this.m24*a;this.m22=0*d+0*this.m22+0*this.m23+this.m24*b;this.m23=0*d+0*e+0*this.m23+this.m24*c;this.m24=0*d+0*e+0*f+0*this.m24;this.m25=255*d+255*e+255*f+0*g;d=this.m31;e=this.m32;f=this.m33;g=this.m34;this.m31=0*this.m31+0*this.m32+0*this.m33+this.m34*a;this.m32=0*d+0*this.m32+0*this.m33+this.m34*b;this.m33=0*d+0*e+0*this.m33+this.m34*c;this.m34=
0*d+0*e+0*f+0*this.m34;this.m35=255*d+255*e+255*f+0*g;d=this.m41;e=this.m42;f=this.m43;g=this.m44;this.m41=0*this.m41+0*this.m42+0*this.m43+this.m44*a;this.m42=0*d+0*this.m42+0*this.m43+this.m44*b;this.m43=0*d+0*e+0*this.m43+this.m44*c;this.m44=0*d+0*e+0*f+0*this.m44;this.m45=255*d+255*e+255*f+0*g;return this},adjustAlphaContrast:function(a){a+=1;var b=128*(1-a),c=this.m11,d=this.m12,e=this.m13,f=this.m14;this.m11=this.m11+0*this.m12+0*this.m13+0*this.m14;this.m12=0*c+this.m12+0*this.m13+0*this.m14;
this.m13=0*c+0*d+this.m13+0*this.m14;this.m14=0*c+0*d+0*e+this.m14*a;this.m15=0*c+0*d+0*e+f*b;c=this.m21;d=this.m22;e=this.m23;f=this.m24;this.m21=this.m21+0*this.m22+0*this.m23+0*this.m24;this.m22=0*c+this.m22+0*this.m23+0*this.m24;this.m23=0*c+0*d+this.m23+0*this.m24;this.m24=0*c+0*d+0*e+this.m24*a;this.m25=0*c+0*d+0*e+f*b;c=this.m31;d=this.m32;e=this.m33;f=this.m34;this.m31=this.m31+0*this.m32+0*this.m33+0*this.m34;this.m32=0*c+this.m32+0*this.m33+0*this.m34;this.m33=0*c+0*d+this.m33+0*this.m34;
this.m34=0*c+0*d+0*e+this.m34*a;this.m35=0*c+0*d+0*e+f*b;c=this.m41;d=this.m42;e=this.m43;f=this.m44;this.m41=this.m41+0*this.m42+0*this.m43+0*this.m44;this.m42=0*c+this.m42+0*this.m43+0*this.m44;this.m43=0*c+0*d+this.m43+0*this.m44;this.m44=0*c+0*d+0*e+this.m44*a;this.m45=0*c+0*d+0*e+f*b;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;a=f+b*c*bb.LUMA_R;var g=b*c*bb.LUMA_G;c=b*c*bb.LUMA_B;
var k=b*d*bb.LUMA_R,l=f+b*d*bb.LUMA_G;d=b*d*bb.LUMA_B;var m=b*e*bb.LUMA_R,p=b*e*bb.LUMA_G;b=f+b*e*bb.LUMA_B;e=this.m11;f=this.m12;var n=this.m13,h=this.m14;this.m11=this.m11*a+this.m12*k+this.m13*m+0*this.m14;this.m12=e*g+this.m12*l+this.m13*p+0*this.m14;this.m13=e*c+f*d+this.m13*b+0*this.m14;this.m14=0*e+0*f+0*n+this.m14;this.m15=0*e+0*f+0*n+0*h;e=this.m21;f=this.m22;n=this.m23;h=this.m24;this.m21=this.m21*a+this.m22*k+this.m23*m+0*this.m24;this.m22=e*g+this.m22*l+this.m23*p+0*this.m24;this.m23=
e*c+f*d+this.m23*b+0*this.m24;this.m24=0*e+0*f+0*n+this.m24;this.m25=0*e+0*f+0*n+0*h;e=this.m31;f=this.m32;n=this.m33;h=this.m34;this.m31=this.m31*a+this.m32*k+this.m33*m+0*this.m34;this.m32=e*g+this.m32*l+this.m33*p+0*this.m34;this.m33=e*c+f*d+this.m33*b+0*this.m34;this.m34=0*e+0*f+0*n+this.m34;this.m35=0*e+0*f+0*n+0*h;e=this.m41;f=this.m42;n=this.m43;h=this.m44;this.m41=this.m41*a+this.m42*k+this.m43*m+0*this.m44;this.m42=e*g+this.m42*l+this.m43*p+0*this.m44;this.m43=e*c+f*d+this.m43*b+0*this.m44;
this.m44=0*e+0*f+0*n+this.m44;this.m45=0*e+0*f+0*n+0*h;return this},rotateHue:function(a){if(!this.hueInitialized){this.hueInitialized=!0;this.preHue=new bb;this.preHue.rotateRed(45);this.preHue.rotateGreen(-39.182655);var b=[];b[0]=bb.LUMA_R2;b[1]=bb.LUMA_G2;b[2]=bb.LUMA_B2;b[3]=1;this.preHue.transformVector(b);var c=b[0]/b[2];b=b[1]/b[2];this.preHue.shearBlue(c,b);this.postHue=new bb;this.postHue.shearBlue(-c,-b);this.postHue.rotateGreen(39.182655);this.postHue.rotateRed(-45)}c=this.preHue;b=this.m11;
var d=this.m12,e=this.m13,f=this.m14;this.m11=this.m11*c.m11+this.m12*c.m21+this.m13*c.m31+this.m14*c.m41;this.m12=b*c.m12+this.m12*c.m22+this.m13*c.m32+this.m14*c.m42;this.m13=b*c.m13+d*c.m23+this.m13*c.m33+this.m14*c.m43;this.m14=b*c.m14+d*c.m24+e*c.m34+this.m14*c.m44;this.m15=b*c.m15+d*c.m25+e*c.m35+f*c.m45;b=this.m21;d=this.m22;e=this.m23;f=this.m24;this.m21=this.m21*c.m11+this.m22*c.m21+this.m23*c.m31+this.m24*c.m41;this.m22=b*c.m12+this.m22*c.m22+this.m23*c.m32+this.m24*c.m42;this.m23=b*c.m13+
d*c.m23+this.m23*c.m33+this.m24*c.m43;this.m24=b*c.m14+d*c.m24+e*c.m34+this.m24*c.m44;this.m25=b*c.m15+d*c.m25+e*c.m35+f*c.m45;b=this.m31;d=this.m32;e=this.m33;f=this.m34;this.m31=this.m31*c.m11+this.m32*c.m21+this.m33*c.m31+this.m34*c.m41;this.m32=b*c.m12+this.m32*c.m22+this.m33*c.m32+this.m34*c.m42;this.m33=b*c.m13+d*c.m23+this.m33*c.m33+this.m34*c.m43;this.m34=b*c.m14+d*c.m24+e*c.m34+this.m34*c.m44;this.m35=b*c.m15+d*c.m25+e*c.m35+f*c.m45;b=this.m41;d=this.m42;e=this.m43;f=this.m44;this.m41=this.m41*
c.m11+this.m42*c.m21+this.m43*c.m31+this.m44*c.m41;this.m42=b*c.m12+this.m42*c.m22+this.m43*c.m32+this.m44*c.m42;this.m43=b*c.m13+d*c.m23+this.m43*c.m33+this.m44*c.m43;this.m44=b*c.m14+d*c.m24+e*c.m34+this.m44*c.m44;this.m45=b*c.m15+d*c.m25+e*c.m35+f*c.m45;this.rotateBlue(a);a=this.postHue;c=this.m11;b=this.m12;d=this.m13;e=this.m14;this.m11=this.m11*a.m11+this.m12*a.m21+this.m13*a.m31+this.m14*a.m41;this.m12=c*a.m12+this.m12*a.m22+this.m13*a.m32+this.m14*a.m42;this.m13=c*a.m13+b*a.m23+this.m13*a.m33+
this.m14*a.m43;this.m14=c*a.m14+b*a.m24+d*a.m34+this.m14*a.m44;this.m15=c*a.m15+b*a.m25+d*a.m35+e*a.m45;c=this.m21;b=this.m22;d=this.m23;e=this.m24;this.m21=this.m21*a.m11+this.m22*a.m21+this.m23*a.m31+this.m24*a.m41;this.m22=c*a.m12+this.m22*a.m22+this.m23*a.m32+this.m24*a.m42;this.m23=c*a.m13+b*a.m23+this.m23*a.m33+this.m24*a.m43;this.m24=c*a.m14+b*a.m24+d*a.m34+this.m24*a.m44;this.m25=c*a.m15+b*a.m25+d*a.m35+e*a.m45;c=this.m31;b=this.m32;d=this.m33;e=this.m34;this.m31=this.m31*a.m11+this.m32*a.m21+
this.m33*a.m31+this.m34*a.m41;this.m32=c*a.m12+this.m32*a.m22+this.m33*a.m32+this.m34*a.m42;this.m33=c*a.m13+b*a.m23+this.m33*a.m33+this.m34*a.m43;this.m34=c*a.m14+b*a.m24+d*a.m34+this.m34*a.m44;this.m35=c*a.m15+b*a.m25+d*a.m35+e*a.m45;c=this.m41;b=this.m42;d=this.m43;e=this.m44;this.m41=this.m41*a.m11+this.m42*a.m21+this.m43*a.m31+this.m44*a.m41;this.m42=c*a.m12+this.m42*a.m22+this.m43*a.m32+this.m44*a.m42;this.m43=c*a.m13+b*a.m23+this.m43*a.m33+this.m44*a.m43;this.m44=c*a.m14+b*a.m24+d*a.m34+this.m44*
a.m44;this.m45=c*a.m15+b*a.m25+d*a.m35+e*a.m45;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);var l=1==(a&1)?e:0,m=2==(a&2)?e:0,p=
4==(a&4)?e:0;a=8==(a&8)?e:0;e=1==(b&1)?f:0;var n=2==(b&2)?f:0,h=4==(b&4)?f:0;b=8==(b&8)?f:0;f=1==(c&1)?g:0;var q=2==(c&2)?g:0,t=4==(c&4)?g:0;c=8==(c&8)?g:0;g=1==(d&1)?k:0;var r=2==(d&2)?k:0,u=4==(d&4)?k:0;d=8==(d&8)?k:0;k=this.m11;var x=this.m12,w=this.m13,v=this.m14;this.m11=this.m11*l+this.m12*e+this.m13*f+this.m14*g;this.m12=k*m+this.m12*n+this.m13*q+this.m14*r;this.m13=k*p+x*h+this.m13*t+this.m14*u;this.m14=k*a+x*b+w*c+this.m14*d;this.m15=0*k+0*x+0*w+0*v;k=this.m21;x=this.m22;w=this.m23;v=this.m24;
this.m21=this.m21*l+this.m22*e+this.m23*f+this.m24*g;this.m22=k*m+this.m22*n+this.m23*q+this.m24*r;this.m23=k*p+x*h+this.m23*t+this.m24*u;this.m24=k*a+x*b+w*c+this.m24*d;this.m25=0*k+0*x+0*w+0*v;k=this.m31;x=this.m32;w=this.m33;v=this.m34;this.m31=this.m31*l+this.m32*e+this.m33*f+this.m34*g;this.m32=k*m+this.m32*n+this.m33*q+this.m34*r;this.m33=k*p+x*h+this.m33*t+this.m34*u;this.m34=k*a+x*b+w*c+this.m34*d;this.m35=0*k+0*x+0*w+0*v;k=this.m41;x=this.m42;w=this.m43;v=this.m44;this.m41=this.m41*l+this.m42*
e+this.m43*f+this.m44*g;this.m42=k*m+this.m42*n+this.m43*q+this.m44*r;this.m43=k*p+x*h+this.m43*t+this.m44*u;this.m44=k*a+x*b+w*c+this.m44*d;this.m45=0*k+0*x+0*w+0*v;return this},average:function(a,b,c){null==c&&(c=.33333333);null==b&&(b=.33333333);null==a&&(a=.33333333);var d=this.m11,e=this.m12,f=this.m13,g=this.m14;this.m11=this.m11*a+this.m12*a+this.m13*a+0*this.m14;this.m12=d*b+this.m12*b+this.m13*b+0*this.m14;this.m13=d*c+e*c+this.m13*c+0*this.m14;this.m14=0*d+0*e+0*f+this.m14;this.m15=0*d+
0*e+0*f+0*g;d=this.m21;e=this.m22;f=this.m23;g=this.m24;this.m21=this.m21*a+this.m22*a+this.m23*a+0*this.m24;this.m22=d*b+this.m22*b+this.m23*b+0*this.m24;this.m23=d*c+e*c+this.m23*c+0*this.m24;this.m24=0*d+0*e+0*f+this.m24;this.m25=0*d+0*e+0*f+0*g;d=this.m31;e=this.m32;f=this.m33;g=this.m34;this.m31=this.m31*a+this.m32*a+this.m33*a+0*this.m34;this.m32=d*b+this.m32*b+this.m33*b+0*this.m34;this.m33=d*c+e*c+this.m33*c+0*this.m34;this.m34=0*d+0*e+0*f+this.m34;this.m35=0*d+0*e+0*f+0*g;d=this.m41;e=this.m42;
f=this.m43;g=this.m44;this.m41=this.m41*a+this.m42*a+this.m43*a+0*this.m44;this.m42=d*b+this.m42*b+this.m43*b+0*this.m44;this.m43=d*c+e*c+this.m43*c+0*this.m44;this.m44=0*d+0*e+0*f+this.m44;this.m45=0*d+0*e+0*f+0*g;return this},threshold:function(a,b){null==b&&(b=256);var c=bb.LUMA_R*b,d=bb.LUMA_G*b,e=bb.LUMA_B*b,f=-b*a,g=bb.LUMA_R*b,k=bb.LUMA_G*b,l=bb.LUMA_B*b,m=-b*a,p=bb.LUMA_R*b,n=bb.LUMA_G*b,h=bb.LUMA_B*b;a*=-b;b=this.m11;var q=this.m12,t=this.m13,r=this.m14;this.m11=this.m11*c+this.m12*g+this.m13*
p+0*this.m14;this.m12=b*d+this.m12*k+this.m13*n+0*this.m14;this.m13=b*e+q*l+this.m13*h+0*this.m14;this.m14=0*b+0*q+0*t+this.m14;this.m15=b*f+q*m+t*a+0*r;b=this.m21;q=this.m22;t=this.m23;r=this.m24;this.m21=this.m21*c+this.m22*g+this.m23*p+0*this.m24;this.m22=b*d+this.m22*k+this.m23*n+0*this.m24;this.m23=b*e+q*l+this.m23*h+0*this.m24;this.m24=0*b+0*q+0*t+this.m24;this.m25=b*f+q*m+t*a+0*r;b=this.m31;q=this.m32;t=this.m33;r=this.m34;this.m31=this.m31*c+this.m32*g+this.m33*p+0*this.m34;this.m32=b*d+this.m32*
k+this.m33*n+0*this.m34;this.m33=b*e+q*l+this.m33*h+0*this.m34;this.m34=0*b+0*q+0*t+this.m34;this.m35=b*f+q*m+t*a+0*r;b=this.m41;q=this.m42;t=this.m43;r=this.m44;this.m41=this.m41*c+this.m42*g+this.m43*p+0*this.m44;this.m42=b*d+this.m42*k+this.m43*n+0*this.m44;this.m43=b*e+q*l+this.m43*h+0*this.m44;this.m44=0*b+0*q+0*t+this.m44;this.m45=b*f+q*m+t*a+0*r;return this},desaturate:function(){var a=bb.LUMA_R,b=bb.LUMA_G,c=bb.LUMA_B,d=bb.LUMA_R,e=bb.LUMA_G,f=bb.LUMA_B,g=bb.LUMA_R,k=bb.LUMA_G,l=bb.LUMA_B,
m=this.m11,p=this.m12,n=this.m13,h=this.m14;this.m11=this.m11*a+this.m12*d+this.m13*g+0*this.m14;this.m12=m*b+this.m12*e+this.m13*k+0*this.m14;this.m13=m*c+p*f+this.m13*l+0*this.m14;this.m14=0*m+0*p+0*n+this.m14;this.m15=0*m+0*p+0*n+0*h;m=this.m21;p=this.m22;n=this.m23;h=this.m24;this.m21=this.m21*a+this.m22*d+this.m23*g+0*this.m24;this.m22=m*b+this.m22*e+this.m23*k+0*this.m24;this.m23=m*c+p*f+this.m23*l+0*this.m24;this.m24=0*m+0*p+0*n+this.m24;this.m25=0*m+0*p+0*n+0*h;m=this.m31;p=this.m32;n=this.m33;
h=this.m34;this.m31=this.m31*a+this.m32*d+this.m33*g+0*this.m34;this.m32=m*b+this.m32*e+this.m33*k+0*this.m34;this.m33=m*c+p*f+this.m33*l+0*this.m34;this.m34=0*m+0*p+0*n+this.m34;this.m35=0*m+0*p+0*n+0*h;m=this.m41;p=this.m42;n=this.m43;h=this.m44;this.m41=this.m41*a+this.m42*d+this.m43*g+0*this.m44;this.m42=m*b+this.m42*e+this.m43*k+0*this.m44;this.m43=m*c+p*f+this.m43*l+0*this.m44;this.m44=0*m+0*p+0*n+this.m44;this.m45=0*m+0*p+0*n+0*h;return this},setMultiplicators:function(a,b,c,d){null==d&&(d=
1);null==c&&(c=1);null==b&&(b=1);null==a&&(a=1);var e=this.m11,f=this.m12,g=this.m13,k=this.m14;this.m11=this.m11*a+0*this.m12+0*this.m13+0*this.m14;this.m12=0*e+this.m12*b+0*this.m13+0*this.m14;this.m13=0*e+0*f+this.m13*c+0*this.m14;this.m14=0*e+0*f+0*g+this.m14*d;this.m15=0*e+0*f+0*g+0*k;e=this.m21;f=this.m22;g=this.m23;k=this.m24;this.m21=this.m21*a+0*this.m22+0*this.m23+0*this.m24;this.m22=0*e+this.m22*b+0*this.m23+0*this.m24;this.m23=0*e+0*f+this.m23*c+0*this.m24;this.m24=0*e+0*f+0*g+this.m24*
d;this.m25=0*e+0*f+0*g+0*k;e=this.m31;f=this.m32;g=this.m33;k=this.m34;this.m31=this.m31*a+0*this.m32+0*this.m33+0*this.m34;this.m32=0*e+this.m32*b+0*this.m33+0*this.m34;this.m33=0*e+0*f+this.m33*c+0*this.m34;this.m34=0*e+0*f+0*g+this.m34*d;this.m35=0*e+0*f+0*g+0*k;e=this.m41;f=this.m42;g=this.m43;k=this.m44;this.m41=this.m41*a+0*this.m42+0*this.m43+0*this.m44;this.m42=0*e+this.m42*b+0*this.m43+0*this.m44;this.m43=0*e+0*f+this.m43*c+0*this.m44;this.m44=0*e+0*f+0*g+this.m44*d;this.m45=0*e+0*f+0*g+
0*k;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);a*=-b;var c=this.m11,d=this.m12,e=this.m13,f=this.m14;this.m11=this.m11+0*this.m12+0*this.m13+0*this.m14;this.m12=0*c+this.m12+
0*this.m13+0*this.m14;this.m13=0*c+0*d+this.m13+0*this.m14;this.m14=0*c+0*d+0*e+this.m14*b;this.m15=0*c+0*d+0*e+f*a;c=this.m21;d=this.m22;e=this.m23;f=this.m24;this.m21=this.m21+0*this.m22+0*this.m23+0*this.m24;this.m22=0*c+this.m22+0*this.m23+0*this.m24;this.m23=0*c+0*d+this.m23+0*this.m24;this.m24=0*c+0*d+0*e+this.m24*b;this.m25=0*c+0*d+0*e+f*a;c=this.m31;d=this.m32;e=this.m33;f=this.m34;this.m31=this.m31+0*this.m32+0*this.m33+0*this.m34;this.m32=0*c+this.m32+0*this.m33+0*this.m34;this.m33=0*c+
0*d+this.m33+0*this.m34;this.m34=0*c+0*d+0*e+this.m34*b;this.m35=0*c+0*d+0*e+f*a;c=this.m41;d=this.m42;e=this.m43;f=this.m44;this.m41=this.m41+0*this.m42+0*this.m43+0*this.m44;this.m42=0*c+this.m42+0*this.m43+0*this.m44;this.m43=0*c+0*d+this.m43+0*this.m44;this.m44=0*c+0*d+0*e+this.m44*b;this.m45=0*c+0*d+0*e+f*a;return this},averageRGB2Alpha:function(){var a=bb.INV3,b=bb.INV3,c=bb.INV3,d=this.m11,e=this.m12,f=this.m13,g=this.m14;this.m11=0*this.m11+0*this.m12+0*this.m13+this.m14*a;this.m12=0*d+0*
this.m12+0*this.m13+this.m14*b;this.m13=0*d+0*e+0*this.m13+this.m14*c;this.m14=0*d+0*e+0*f+0*this.m14;this.m15=255*d+255*e+255*f+0*g;d=this.m21;e=this.m22;f=this.m23;g=this.m24;this.m21=0*this.m21+0*this.m22+0*this.m23+this.m24*a;this.m22=0*d+0*this.m22+0*this.m23+this.m24*b;this.m23=0*d+0*e+0*this.m23+this.m24*c;this.m24=0*d+0*e+0*f+0*this.m24;this.m25=255*d+255*e+255*f+0*g;d=this.m31;e=this.m32;f=this.m33;g=this.m34;this.m31=0*this.m31+0*this.m32+0*this.m33+this.m34*a;this.m32=0*d+0*this.m32+0*
this.m33+this.m34*b;this.m33=0*d+0*e+0*this.m33+this.m34*c;this.m34=0*d+0*e+0*f+0*this.m34;this.m35=255*d+255*e+255*f+0*g;d=this.m41;e=this.m42;f=this.m43;g=this.m44;this.m41=0*this.m41+0*this.m42+0*this.m43+this.m44*a;this.m42=0*d+0*this.m42+0*this.m43+this.m44*b;this.m43=0*d+0*e+0*this.m43+this.m44*c;this.m44=0*d+0*e+0*f+0*this.m44;this.m45=255*d+255*e+255*f+0*g;return this},invertAlpha:function(){var a=this.m11,b=this.m12,c=this.m13,d=this.m14;this.m11=this.m11+0*this.m12+0*this.m13+0*this.m14;
this.m12=0*a+this.m12+0*this.m13+0*this.m14;this.m13=0*a+0*b+this.m13+0*this.m14;this.m14=0*a+0*b+0*c+-1*this.m14;this.m15=0*a+0*b+0*c+255*d;a=this.m21;b=this.m22;c=this.m23;d=this.m24;this.m21=this.m21+0*this.m22+0*this.m23+0*this.m24;this.m22=0*a+this.m22+0*this.m23+0*this.m24;this.m23=0*a+0*b+this.m23+0*this.m24;this.m24=0*a+0*b+0*c+-1*this.m24;this.m25=0*a+0*b+0*c+255*d;a=this.m31;b=this.m32;c=this.m33;d=this.m34;this.m31=this.m31+0*this.m32+0*this.m33+0*this.m34;this.m32=0*a+this.m32+0*this.m33+
0*this.m34;this.m33=0*a+0*b+this.m33+0*this.m34;this.m34=0*a+0*b+0*c+-1*this.m34;this.m35=0*a+0*b+0*c+255*d;a=this.m41;b=this.m42;c=this.m43;d=this.m44;this.m41=this.m41+0*this.m42+0*this.m43+0*this.m44;this.m42=0*a+this.m42+0*this.m43+0*this.m44;this.m43=0*a+0*b+this.m43+0*this.m44;this.m44=0*a+0*b+0*c+-1*this.m44;this.m45=0*a+0*b+0*c+255*d;return this},rgb2Alpha:function(a,b,c){var d=this.m11,e=this.m12,f=this.m13,g=this.m14;this.m11=0*this.m11+0*this.m12+0*this.m13+this.m14*a;this.m12=0*d+0*this.m12+
0*this.m13+this.m14*b;this.m13=0*d+0*e+0*this.m13+this.m14*c;this.m14=0*d+0*e+0*f+0*this.m14;this.m15=255*d+255*e+255*f+0*g;d=this.m21;e=this.m22;f=this.m23;g=this.m24;this.m21=0*this.m21+0*this.m22+0*this.m23+this.m24*a;this.m22=0*d+0*this.m22+0*this.m23+this.m24*b;this.m23=0*d+0*e+0*this.m23+this.m24*c;this.m24=0*d+0*e+0*f+0*this.m24;this.m25=255*d+255*e+255*f+0*g;d=this.m31;e=this.m32;f=this.m33;g=this.m34;this.m31=0*this.m31+0*this.m32+0*this.m33+this.m34*a;this.m32=0*d+0*this.m32+0*this.m33+
this.m34*b;this.m33=0*d+0*e+0*this.m33+this.m34*c;this.m34=0*d+0*e+0*f+0*this.m34;this.m35=255*d+255*e+255*f+0*g;d=this.m41;e=this.m42;f=this.m43;g=this.m44;this.m41=0*this.m41+0*this.m42+0*this.m43+this.m44*a;this.m42=0*d+0*this.m42+0*this.m43+this.m44*b;this.m43=0*d+0*e+0*this.m43+this.m44*c;this.m44=0*d+0*e+0*f+0*this.m44;this.m45=255*d+255*e+255*f+0*g;return this},setAlpha:function(a){var b=this.m11,c=this.m12,d=this.m13,e=this.m14;this.m11=this.m11+0*this.m12+0*this.m13+0*this.m14;this.m12=0*
b+this.m12+0*this.m13+0*this.m14;this.m13=0*b+0*c+this.m13+0*this.m14;this.m14=0*b+0*c+0*d+this.m14*a;this.m15=0*b+0*c+0*d+0*e;b=this.m21;c=this.m22;d=this.m23;e=this.m24;this.m21=this.m21+0*this.m22+0*this.m23+0*this.m24;this.m22=0*b+this.m22+0*this.m23+0*this.m24;this.m23=0*b+0*c+this.m23+0*this.m24;this.m24=0*b+0*c+0*d+this.m24*a;this.m25=0*b+0*c+0*d+0*e;b=this.m31;c=this.m32;d=this.m33;e=this.m34;this.m31=this.m31+0*this.m32+0*this.m33+0*this.m34;this.m32=0*b+this.m32+0*this.m33+0*this.m34;this.m33=
0*b+0*c+this.m33+0*this.m34;this.m34=0*b+0*c+0*d+this.m34*a;this.m35=0*b+0*c+0*d+0*e;b=this.m41;c=this.m42;d=this.m43;e=this.m44;this.m41=this.m41+0*this.m42+0*this.m43+0*this.m44;this.m42=0*b+this.m42+0*this.m43+0*this.m44;this.m43=0*b+0*c+this.m43+0*this.m44;this.m44=0*b+0*c+0*d+this.m44*a;this.m45=0*b+0*c+0*d+0*e;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._hx_index){case 0:var b=this.m11,c=this.m12,d=this.m13,e=
this.m14;this.m11=.567*this.m11+.558*this.m12+0*this.m13+0*this.m14;this.m12=.433*b+.442*this.m12+.242*this.m13+0*this.m14;this.m13=0*b+0*c+.758*this.m13+0*this.m14;this.m14=0*b+0*c+0*d+this.m14;this.m15=0*b+0*c+0*d+0*e;var f=this.m21,g=this.m22,k=this.m23,l=this.m24;this.m21=.567*this.m21+.558*this.m22+0*this.m23+0*this.m24;this.m22=.433*f+.442*this.m22+.242*this.m23+0*this.m24;this.m23=0*f+0*g+.758*this.m23+0*this.m24;this.m24=0*f+0*g+0*k+this.m24;this.m25=0*f+0*g+0*k+0*l;var m=this.m31,p=this.m32,
n=this.m33,h=this.m34;this.m31=.567*this.m31+.558*this.m32+0*this.m33+0*this.m34;this.m32=.433*m+.442*this.m32+.242*this.m33+0*this.m34;this.m33=0*m+0*p+.758*this.m33+0*this.m34;this.m34=0*m+0*p+0*n+this.m34;this.m35=0*m+0*p+0*n+0*h;var q=this.m41,t=this.m42,r=this.m43,u=this.m44;this.m41=.567*this.m41+.558*this.m42+0*this.m43+0*this.m44;this.m42=.433*q+.442*this.m42+.242*this.m43+0*this.m44;this.m43=0*q+0*t+.758*this.m43+0*this.m44;this.m44=0*q+0*t+0*r+this.m44;this.m45=0*q+0*t+0*r+0*u;break;case 1:var x=
this.m11,w=this.m12,v=this.m13,Q=this.m14;this.m11=.817*this.m11+.333*this.m12+0*this.m13+0*this.m14;this.m12=.183*x+.667*this.m12+.125*this.m13+0*this.m14;this.m13=0*x+0*w+.875*this.m13+0*this.m14;this.m14=0*x+0*w+0*v+this.m14;this.m15=0*x+0*w+0*v+0*Q;var C=this.m21,J=this.m22,F=this.m23,B=this.m24;this.m21=.817*this.m21+.333*this.m22+0*this.m23+0*this.m24;this.m22=.183*C+.667*this.m22+.125*this.m23+0*this.m24;this.m23=0*C+0*J+.875*this.m23+0*this.m24;this.m24=0*C+0*J+0*F+this.m24;this.m25=0*C+0*
J+0*F+0*B;var D=this.m31,E=this.m32,A=this.m33,I=this.m34;this.m31=.817*this.m31+.333*this.m32+0*this.m33+0*this.m34;this.m32=.183*D+.667*this.m32+.125*this.m33+0*this.m34;this.m33=0*D+0*E+.875*this.m33+0*this.m34;this.m34=0*D+0*E+0*A+this.m34;this.m35=0*D+0*E+0*A+0*I;var H=this.m41,G=this.m42,K=this.m43,M=this.m44;this.m41=.817*this.m41+.333*this.m42+0*this.m43+0*this.m44;this.m42=.183*H+.667*this.m42+.125*this.m43+0*this.m44;this.m43=0*H+0*G+.875*this.m43+0*this.m44;this.m44=0*H+0*G+0*K+this.m44;
this.m45=0*H+0*G+0*K+0*M;break;case 2:var y=this.m11,L=this.m12,N=this.m13,P=this.m14;this.m11=.625*this.m11+.7*this.m12+0*this.m13+0*this.m14;this.m12=.375*y+.3*this.m12+.3*this.m13+0*this.m14;this.m13=0*y+0*L+.7*this.m13+0*this.m14;this.m14=0*y+0*L+0*N+this.m14;this.m15=0*y+0*L+0*N+0*P;var T=this.m21,S=this.m22,Pa=this.m23,Ca=this.m24;this.m21=.625*this.m21+.7*this.m22+0*this.m23+0*this.m24;this.m22=.375*T+.3*this.m22+.3*this.m23+0*this.m24;this.m23=0*T+0*S+.7*this.m23+0*this.m24;this.m24=0*T+0*
S+0*Pa+this.m24;this.m25=0*T+0*S+0*Pa+0*Ca;var da=this.m31,U=this.m32,W=this.m33,Aa=this.m34;this.m31=.625*this.m31+.7*this.m32+0*this.m33+0*this.m34;this.m32=.375*da+.3*this.m32+.3*this.m33+0*this.m34;this.m33=0*da+0*U+.7*this.m33+0*this.m34;this.m34=0*da+0*U+0*W+this.m34;this.m35=0*da+0*U+0*W+0*Aa;var X=this.m41,Z=this.m42,aa=this.m43,O=this.m44;this.m41=.625*this.m41+.7*this.m42+0*this.m43+0*this.m44;this.m42=.375*X+.3*this.m42+.3*this.m43+0*this.m44;this.m43=0*X+0*Z+.7*this.m43+0*this.m44;this.m44=
0*X+0*Z+0*aa+this.m44;this.m45=0*X+0*Z+0*aa+0*O;break;case 3:var ba=this.m11,Y=this.m12,R=this.m13,V=this.m14;this.m11=.8*this.m11+.258*this.m12+0*this.m13+0*this.m14;this.m12=.2*ba+.742*this.m12+.142*this.m13+0*this.m14;this.m13=0*ba+0*Y+.858*this.m13+0*this.m14;this.m14=0*ba+0*Y+0*R+this.m14;this.m15=0*ba+0*Y+0*R+0*V;var ea=this.m21,ia=this.m22,ha=this.m23,ca=this.m24;this.m21=.8*this.m21+.258*this.m22+0*this.m23+0*this.m24;this.m22=.2*ea+.742*this.m22+.142*this.m23+0*this.m24;this.m23=0*ea+0*ia+
.858*this.m23+0*this.m24;this.m24=0*ea+0*ia+0*ha+this.m24;this.m25=0*ea+0*ia+0*ha+0*ca;var cc=this.m31,De=this.m32,ma=this.m33,ka=this.m34;this.m31=.8*this.m31+.258*this.m32+0*this.m33+0*this.m34;this.m32=.2*cc+.742*this.m32+.142*this.m33+0*this.m34;this.m33=0*cc+0*De+.858*this.m33+0*this.m34;this.m34=0*cc+0*De+0*ma+this.m34;this.m35=0*cc+0*De+0*ma+0*ka;var la=this.m41,ja=this.m42,oa=this.m43,na=this.m44;this.m41=.8*this.m41+.258*this.m42+0*this.m43+0*this.m44;this.m42=.2*la+.742*this.m42+.142*this.m43+
0*this.m44;this.m43=0*la+0*ja+.858*this.m43+0*this.m44;this.m44=0*la+0*ja+0*oa+this.m44;this.m45=0*la+0*ja+0*oa+0*na;break;case 4:var pa=this.m11,fa=this.m12,ra=this.m13,qa=this.m14;this.m11=.95*this.m11+0*this.m12+0*this.m13+0*this.m14;this.m12=.05*pa+.433*this.m12+.475*this.m13+0*this.m14;this.m13=0*pa+.567*fa+.525*this.m13+0*this.m14;this.m14=0*pa+0*fa+0*ra+this.m14;this.m15=0*pa+0*fa+0*ra+0*qa;var va=this.m21,Ed=this.m22,xa=this.m23,Lc=this.m24;this.m21=.95*this.m21+0*this.m22+0*this.m23+0*this.m24;
this.m22=.05*va+.433*this.m22+.475*this.m23+0*this.m24;this.m23=0*va+.567*Ed+.525*this.m23+0*this.m24;this.m24=0*va+0*Ed+0*xa+this.m24;this.m25=0*va+0*Ed+0*xa+0*Lc;var Sa=this.m31,ua=this.m32,sa=this.m33,wa=this.m34;this.m31=.95*this.m31+0*this.m32+0*this.m33+0*this.m34;this.m32=.05*Sa+.433*this.m32+.475*this.m33+0*this.m34;this.m33=0*Sa+.567*ua+.525*this.m33+0*this.m34;this.m34=0*Sa+0*ua+0*sa+this.m34;this.m35=0*Sa+0*ua+0*sa+0*wa;var ya=this.m41,Ka=this.m42,Wd=this.m43,ta=this.m44;this.m41=.95*this.m41+
0*this.m42+0*this.m43+0*this.m44;this.m42=.05*ya+.433*this.m42+.475*this.m43+0*this.m44;this.m43=0*ya+.567*Ka+.525*this.m43+0*this.m44;this.m44=0*ya+0*Ka+0*Wd+this.m44;this.m45=0*ya+0*Ka+0*Wd+0*ta;break;case 5:var Ja=this.m11,ed=this.m12,pe=this.m13,Ba=this.m14;this.m11=.967*this.m11+0*this.m12+0*this.m13+0*this.m14;this.m12=.033*Ja+.733*this.m12+.183*this.m13+0*this.m14;this.m13=0*Ja+.267*ed+.817*this.m13+0*this.m14;this.m14=0*Ja+0*ed+0*pe+this.m14;this.m15=0*Ja+0*ed+0*pe+0*Ba;var za=this.m21,Ea=
this.m22,Ia=this.m23,Da=this.m24;this.m21=.967*this.m21+0*this.m22+0*this.m23+0*this.m24;this.m22=.033*za+.733*this.m22+.183*this.m23+0*this.m24;this.m23=0*za+.267*Ea+.817*this.m23+0*this.m24;this.m24=0*za+0*Ea+0*Ia+this.m24;this.m25=0*za+0*Ea+0*Ia+0*Da;var Ha=this.m31,Fa=this.m32,Ga=this.m33,Ua=this.m34;this.m31=.967*this.m31+0*this.m32+0*this.m33+0*this.m34;this.m32=.033*Ha+.733*this.m32+.183*this.m33+0*this.m34;this.m33=0*Ha+.267*Fa+.817*this.m33+0*this.m34;this.m34=0*Ha+0*Fa+0*Ga+this.m34;this.m35=
0*Ha+0*Fa+0*Ga+0*Ua;var La=this.m41,Na=this.m42,Xa=this.m43,Ya=this.m44;this.m41=.967*this.m41+0*this.m42+0*this.m43+0*this.m44;this.m42=.033*La+.733*this.m42+.183*this.m43+0*this.m44;this.m43=0*La+.267*Na+.817*this.m43+0*this.m44;this.m44=0*La+0*Na+0*Xa+this.m44;this.m45=0*La+0*Na+0*Xa+0*Ya;break;case 6:var Ta=this.m11,Wa=this.m12,Oa=this.m13,Va=this.m14;this.m11=.299*this.m11+.299*this.m12+.299*this.m13+0*this.m14;this.m12=.587*Ta+.587*this.m12+.587*this.m13+0*this.m14;this.m13=.114*Ta+.114*Wa+
.114*this.m13+0*this.m14;this.m14=0*Ta+0*Wa+0*Oa+this.m14;this.m15=0*Ta+0*Wa+0*Oa+0*Va;var $a=this.m21,bb=this.m22,Ra=this.m23,Za=this.m24;this.m21=.299*this.m21+.299*this.m22+.299*this.m23+0*this.m24;this.m22=.587*$a+.587*this.m22+.587*this.m23+0*this.m24;this.m23=.114*$a+.114*bb+.114*this.m23+0*this.m24;this.m24=0*$a+0*bb+0*Ra+this.m24;this.m25=0*$a+0*bb+0*Ra+0*Za;var Qa=this.m31,Ma=this.m32,ab=this.m33,eb=this.m34;this.m31=.299*this.m31+.299*this.m32+.299*this.m33+0*this.m34;this.m32=.587*Qa+.587*
this.m32+.587*this.m33+0*this.m34;this.m33=.114*Qa+.114*Ma+.114*this.m33+0*this.m34;this.m34=0*Qa+0*Ma+0*ab+this.m34;this.m35=0*Qa+0*Ma+0*ab+0*eb;var rb=this.m41,db=this.m42,fb=this.m43,hb=this.m44;this.m41=.299*this.m41+.299*this.m42+.299*this.m43+0*this.m44;this.m42=.587*rb+.587*this.m42+.587*this.m43+0*this.m44;this.m43=.114*rb+.114*db+.114*this.m43+0*this.m44;this.m44=0*rb+0*db+0*fb+this.m44;this.m45=0*rb+0*db+0*fb+0*hb;break;case 7:var gb=this.m11,ib=this.m12,We=this.m13,pb=this.m14;this.m11=
.618*this.m11+.163*this.m12+.163*this.m13+0*this.m14;this.m12=.32*gb+.775*this.m12+.32*this.m13+0*this.m14;this.m13=.062*gb+.062*ib+.516*this.m13+0*this.m14;this.m14=0*gb+0*ib+0*We+this.m14;this.m15=0*gb+0*ib+0*We+0*pb;var mb=this.m21,nb=this.m22,qb=this.m23,jb=this.m24;this.m21=.618*this.m21+.163*this.m22+.163*this.m23+0*this.m24;this.m22=.32*mb+.775*this.m22+.32*this.m23+0*this.m24;this.m23=.062*mb+.062*nb+.516*this.m23+0*this.m24;this.m24=0*mb+0*nb+0*qb+this.m24;this.m25=0*mb+0*nb+0*qb+0*jb;var ob=
this.m31,lb=this.m32,cb=this.m33,ub=this.m34;this.m31=.618*this.m31+.163*this.m32+.163*this.m33+0*this.m34;this.m32=.32*ob+.775*this.m32+.32*this.m33+0*this.m34;this.m33=.062*ob+.062*lb+.516*this.m33+0*this.m34;this.m34=0*ob+0*lb+0*cb+this.m34;this.m35=0*ob+0*lb+0*cb+0*ub;var Wc=this.m41,tb=this.m42,sb=this.m43,kb=this.m44;this.m41=.618*this.m41+.163*this.m42+.163*this.m43+0*this.m44;this.m42=.32*Wc+.775*this.m42+.32*this.m43+0*this.m44;this.m43=.062*Wc+.062*tb+.516*this.m43+0*this.m44;this.m44=0*
Wc+0*tb+0*sb+this.m44;this.m45=0*Wc+0*tb+0*sb+0*kb}return this},applyMatrix:function(a,b){var c=a.a,d=a.r,e=a.g,f=a.b;a=T.clamp(.5+d*this.m41+e*this.m42+f*this.m43+c*this.m44+this.m45|0,0,255);var g=T.clamp(.5+d*this.m11+e*this.m12+f*this.m13+c*this.m14+this.m15|0,0,255),k=T.clamp(.5+d*this.m21+e*this.m22+f*this.m23+c*this.m24+this.m25|0,0,255);c=T.clamp(.5+d*this.m31+e*this.m32+f*this.m33+c*this.m34+this.m35|0,0,255);b.a=a;b.r=g;b.g=k;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 bb;this.preHue.rotateRed(45);this.preHue.rotateGreen(-39.182655);var a=[];a[0]=bb.LUMA_R2;a[1]=bb.LUMA_G2;a[2]=bb.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 bb;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,l,m,p,n,h,q,t,r,u,x,w,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=l;this.m25=m;this.m31=p;this.m32=n;this.m33=h;this.m34=q;this.m35=t;this.m41=r;this.m42=u;this.m43=x;this.m44=w;this.m45=v},mul:function(a,b,c,d,e,f,g,k,l,m,p,n,h,q,t,r,u,x,w,v){var z=this.m11,of=this.m12,xd=this.m13,Fk=this.m14;this.m11=this.m11*a+this.m12*f+this.m13*p+this.m14*r;this.m12=z*b+this.m12*g+this.m13*n+this.m14*u;this.m13=z*c+of*k+this.m13*h+this.m14*
x;this.m14=z*d+of*l+xd*q+this.m14*w;this.m15=z*e+of*m+xd*t+Fk*v;z=this.m21;of=this.m22;xd=this.m23;Fk=this.m24;this.m21=this.m21*a+this.m22*f+this.m23*p+this.m24*r;this.m22=z*b+this.m22*g+this.m23*n+this.m24*u;this.m23=z*c+of*k+this.m23*h+this.m24*x;this.m24=z*d+of*l+xd*q+this.m24*w;this.m25=z*e+of*m+xd*t+Fk*v;z=this.m31;of=this.m32;xd=this.m33;Fk=this.m34;this.m31=this.m31*a+this.m32*f+this.m33*p+this.m34*r;this.m32=z*b+this.m32*g+this.m33*n+this.m34*u;this.m33=z*c+of*k+this.m33*h+this.m34*x;this.m34=
z*d+of*l+xd*q+this.m34*w;this.m35=z*e+of*m+xd*t+Fk*v;z=this.m41;of=this.m42;xd=this.m43;Fk=this.m44;this.m41=this.m41*a+this.m42*f+this.m43*p+this.m44*r;this.m42=z*b+this.m42*g+this.m43*n+this.m44*u;this.m43=z*c+of*k+this.m43*h+this.m44*x;this.m44=z*d+of*l+xd*q+this.m44*w;this.m45=z*e+of*m+xd*t+Fk*v},__class__:bb};var hu=function(){};h["com.stencyl.utils.HaxeDefines"]=hu;hu.__name__="com.stencyl.utils.HaxeDefines";var zm=function(a,b){this.map=a;this.initializer=b};h["com.stencyl.utils.LazyIntMap"]=
zm;zm.__name__="com.stencyl.utils.LazyIntMap";zm.prototype={map:null,initializer:null,get:function(a){var b=this.map.h[a];null==b&&(b=this.initializer(a),this.map.h[a]=b);return b},set:function(a,b){this.map.h[a]=b},exists:function(a){return this.map.h.hasOwnProperty(a)},remove:function(a){return this.map.remove(a)},keys:function(){return this.map.keys()},iterator:function(){return this.map.iterator()},__class__:zm};var Xp=function(a,b){this.map=a;this.initializer=b};h["com.stencyl.utils.LazyStringMap"]=
Xp;Xp.__name__="com.stencyl.utils.LazyStringMap";Xp.prototype={map:null,initializer:null,get:function(a){var b=this.map;b=null!=q[a]?b.getReserved(a):b.h[a];if(null==b){b=this.initializer(a);var c=this.map;null!=q[a]?c.setReserved(a,b):c.h[a]=b}return b},set:function(a,b){var c=this.map;null!=q[a]?c.setReserved(a,b):c.h[a]=b},exists:function(a){var b=this.map;return null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a)},remove:function(a){return this.map.remove(a)},keys:function(){return this.map.keys()},
iterator:function(){var a=this.map;return new Pe(a,a.arrayKeys())},__class__:Xp};var uq=function(){};h["com.stencyl.utils.Mathematics"]=uq;uq.__name__="com.stencyl.utils.Mathematics";uq.round=function(a){return(0<a?a+.5:0>a?a-.5:0)|0};uq.clamp=function(a,b,c){return a<b?b:a>c?c:a};uq.fclamp=function(a,b,c){return a<b?b:a>c?c:a};var Uc=function(a){this.points=a;this.combineClosePoints();this.combineColinearPoints();this.makeCCW()};h["com.stencyl.utils.PolyDecompBayazit"]=Uc;Uc.__name__="com.stencyl.utils.PolyDecompBayazit";
Uc.area=function(a,b,c){return(b.x-a.x)*(c.y-a.y)-(c.x-a.x)*(b.y-a.y)};Uc.right=function(a,b,c){return 0>Uc.area(a,b,c)};Uc.rightOn=function(a,b,c){return 0>=Uc.area(a,b,c)};Uc.left=function(a,b,c){return 0<Uc.area(a,b,c)};Uc.leftOn=function(a,b,c){return 0<=Uc.area(a,b,c)};Uc.sqdist=function(a,b){var c=b.x-a.x;a=b.y-a.y;return c*c+a*a};Uc.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 pa((d*a-b*c)/g,(e*c-f*a)/g):null};Uc.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!=Uc.getIntersection(e,f,f,d)&&a.push(f)}this.points=a},points:null,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);Uc.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 Uc.right(this.at(a-
1),this.at(a),this.at(a+1))},polyFromRange:function(a,b){return a<b?new Uc(this.points.slice(a,b+1)):new Uc(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)){var e=Number.MAX_VALUE,f=null;b=0;for(var g=Number.MAX_VALUE,k=null,l=c=0,m=this.points.length;l<m;){var p=l++;if(Uc.left(this.at(d-1),this.at(d),this.at(p))&&Uc.rightOn(this.at(d-1),this.at(d),this.at(p-1))){var n=Uc.getIntersection(this.at(d-
1),this.at(d),this.at(p),this.at(p-1));if(Uc.right(this.at(d+1),this.at(d),n)){var h=Uc.sqdist(this.at(d),n);h<g&&(g=h,k=n,c=p)}}Uc.left(this.at(d+1),this.at(d),this.at(p+1))&&Uc.rightOn(this.at(d+1),this.at(d),this.at(p))&&(n=Uc.getIntersection(this.at(d+1),this.at(d),this.at(p),this.at(p+1)),Uc.left(this.at(d-1),this.at(d),n)&&(h=Uc.sqdist(this.at(d),n),h<e&&(e=h,f=n,b=p)))}if(c==(b+1)%this.points.length)e=new pa(.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;)Uc.leftOn(this.at(d-1),this.at(d),this.at(c))&&Uc.rightOn(this.at(d+1),this.at(d),this.at(c))&&(g=Uc.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}Uc.left(this.at(a-1),this.at(a),this.at(a+1))||this.points.reverse()},__class__:Uc};var ke=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};h["com.stencyl.utils.RGB"]=ke;ke.__name__="com.stencyl.utils.RGB";ke.setRGBi=function(a,b,c){return(a&255)<<16|(b&255)<<8|c&255};ke.setRGBf=function(a,b,c){a=255*(0>a?0:1<a?1:a);b=255*(0>b?0:
1<b?1:b);c=255*(0>c?0:1<c?1:c);return(((0<a?a+.5:0>a?a-.5:0)|0)&255)<<16|(((0<b?b+.5:0>b?b-.5:0)|0)&255)<<8|((0<c?c+.5:0>c?c-.5:0)|0)&255};ke.getR=function(a){return a>>>16&255};ke.getRf=function(a){return.00392156862745098*(a>>>16&255)};ke.getG=function(a){return a>>>8&255};ke.getGf=function(a){return.00392156862745098*(a>>>8&255)};ke.getB=function(a){return a&255};ke.getBf=function(a){return.00392156862745098*(a&255)};ke.setR=function(a,b){return(b&255)<<16|a&-16711681};ke.setRf=function(a,b){b=
255*(0>b?0:1<b?1:b);return(((0<b?b+.5:0>b?b-.5:0)|0)&255)<<16|a&-16711681};ke.setG=function(a,b){return(b&255)<<8|a&-65281};ke.setGf=function(a,b){b=255*(0>b?0:1<b?1:b);return(((0<b?b+.5:0>b?b-.5:0)|0)&255)<<8|a&-65281};ke.setB=function(a,b){return b&255|a&-256};ke.setBf=function(a,b){b=255*(0>b?0:1<b?1:b);return((0<b?b+.5:0>b?b-.5:0)|0)&255|a&-256};ke.prototype={r:null,g:null,b:null,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(){var a=255*this.r;return(0<a?a+.5:0>a?a-.5:0)|0},getG8:function(){var a=255*this.g;return(0<a?a+.5:0>a?a-.5:0)|0},getB8:function(){var a=255*this.b;return(0<a?a+.5:0>a?a-.5:0)|0},get24:function(){var a=255*this.r,b=255*this.g,c=255*this.b;return((0<a?a+.5:0>a?a-.5:0)|0)<<16|((0<b?b+.5:0>b?b-.5:0)|0)<<8|(0<c?c+.5:0>c?c-.5:0)|0},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__:ke};var Tf=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};h["openfl.media.SoundTransform"]=Tf;Tf.__name__="openfl.media.SoundTransform";Tf.prototype={leftToLeft:null,leftToRight:null,pan:null,rightToLeft:null,rightToRight:null,volume:null,clone:function(){return new Tf(this.volume,this.pan)},__class__:Tf};var ua=function(){this.h={}};h["haxe.ds.StringMap"]=
ua;ua.__name__="haxe.ds.StringMap";ua.__interfaces__=[Qb];ua.prototype={h:null,rh:null,set:function(a,b){null!=q[a]?this.setReserved(a,b):this.h[a]=b},get:function(a){return null!=q[a]?this.getReserved(a):this.h[a]},exists:function(a){return null!=q[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!=q[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(){return B.iter(this.arrayKeys())},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 Pe(this,this.arrayKeys())},keyValueIterator:function(){return new sh(this)},
toString:function(){var a="{";for(var b=this.arrayKeys(),c=0,d=b.length;c<d;){var e=c++,f=b[e];a+=null==f?"null":""+f;a+=" => ";a+=K.string(K.string(null!=q[f]?this.getReserved(f):this.h[f]));e<b.length-1&&(a+=", ")}return a+"}"},__class__:ua};var Wa=function(){this.h={}};h["haxe.ds.IntMap"]=Wa;Wa.__name__="haxe.ds.IntMap";Wa.__interfaces__=[Qb];Wa.prototype={h:null,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):null;return B.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]}}},keyValueIterator:function(){return new sh(this)},__class__:Wa};var ei=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};h["lime.math.Matrix3"]=ei;ei.__name__="lime.math.Matrix3";ei.prototype={a:null,b:null,c:null,d:null,tx:null,ty:null,clone:function(){return new ei(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 E("Column "+a+
" out of bounds (2)");0==a?(this.a=b.x,this.b=b.y):1==a?(this.c=b.x,this.d=b.y):(this.tx=b.x,this.ty=b.y)},copyColumnTo:function(a,b){if(2<a)throw new E("Column "+a+" out of bounds (2)");0==a?(b.x=this.a,b.y=this.b,b.z=0):1==a?(b.x=this.c,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 E("Row "+a+" out of bounds (2)");0==a?(this.a=b.x,this.c=b.y,this.tx=b.z):1==
a&&(this.b=b.x,this.d=b.y,this.ty=b.z)},copyRowTo:function(a,b){if(2<a)throw new E("Row "+a+" out of bounds (2)");0==a?(b.x=this.a,b.y=this.c,b.z=this.tx):1==a?(b.x=this.b,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);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},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:!1},deltaTransformVector:function(a,b){null==b&&(b=new Gd);b.x=a.x*this.a+a.y*this.c;b.y=a.x*this.b+a.y*this.d;return b},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{a=1/a;var 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)"},toString:function(){return"matrix("+this.a+", "+this.b+", "+this.c+", "+this.d+", "+this.tx+", "+this.ty+")"},transformRect:function(a,b){null==b&&(b=new he);var c=this.a*a.x+this.c*a.y,d=c,e=this.b*a.x+this.d*a.y,f=e,g=this.a*(a.x+a.width)+this.c*a.y,k=this.b*(a.x+a.width)+this.d*a.y;g<c&&(c=g);k<e&&(e=k);g>d&&(d=g);k>f&&(f=k);g=this.a*(a.x+a.width)+this.c*(a.y+a.height);k=this.b*(a.x+a.width)+this.d*(a.y+a.height);g<c&&(c=
g);k<e&&(e=k);g>d&&(d=g);k>f&&(f=k);g=this.a*a.x+this.c*(a.y+a.height);k=this.b*a.x+this.d*(a.y+a.height);g<c&&(c=g);k<e&&(e=k);g>d&&(d=g);k>f&&(f=k);b.setTo(c+g,e+k,d-c,f-e);return b},transformVector:function(a,b){null==b&&(b=new Gd);b.x=a.x*this.a+a.y*this.c+this.tx;b.y=a.x*this.b+a.y*this.d+this.ty;return b},translate:function(a,b){this.tx+=a;this.ty+=b},__class__:ei};var Ha=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};h["openfl.geom.Matrix"]=Ha;Ha.__name__="openfl.geom.Matrix";Ha.prototype={a:null,b:null,c:null,d:null,tx:null,ty:null,__array:null,clone:function(){return new Ha(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 E("Column "+a+" out of bounds (2)");0==a?(this.a=b.x,this.b=b.y):1==a?(this.c=b.x,this.d=b.y):(this.tx=b.x,this.ty=b.y)},copyColumnTo:function(a,b){if(2<a)throw new E("Column "+a+" out of bounds (2)");0==a?(b.x=this.a,b.y=this.b,b.z=0):1==a?(b.x=this.c,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 E("Row "+a+" out of bounds (2)");0==a?(this.a=
b.x,this.c=b.y,this.tx=b.z):1==a&&(this.b=b.x,this.d=b.y,this.ty=b.z)},copyRowTo:function(a,b){if(2<a)throw new E("Row "+a+" out of bounds (2)");0==a?(b.x=this.a,b.y=this.c,b.z=this.tx):1==a?(b.x=this.b,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 pa(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:!1},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{a=1/a;var 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 pa(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(){Ha.__matrix3.setTo(this.a,this.b,this.c,this.d,this.tx,this.ty);return Ha.__matrix3},__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__:Ha};var Ph=C["openfl._internal.renderer.DisplayObjectType"]={__ename__:"openfl._internal.renderer.DisplayObjectType",__constructs__:"BITMAP DISPLAY_OBJECT DISPLAY_OBJECT_CONTAINER DOM_ELEMENT SHAPE SIMPLE_BUTTON TEXTFIELD TILEMAP VIDEO".split(" "),BITMAP:{_hx_index:0,__enum__:"openfl._internal.renderer.DisplayObjectType",toString:u},DISPLAY_OBJECT:{_hx_index:1,__enum__:"openfl._internal.renderer.DisplayObjectType",toString:u},DISPLAY_OBJECT_CONTAINER:{_hx_index:2,
__enum__:"openfl._internal.renderer.DisplayObjectType",toString:u},DOM_ELEMENT:{_hx_index:3,__enum__:"openfl._internal.renderer.DisplayObjectType",toString:u},SHAPE:{_hx_index:4,__enum__:"openfl._internal.renderer.DisplayObjectType",toString:u},SIMPLE_BUTTON:{_hx_index:5,__enum__:"openfl._internal.renderer.DisplayObjectType",toString:u},TEXTFIELD:{_hx_index:6,__enum__:"openfl._internal.renderer.DisplayObjectType",toString:u},TILEMAP:{_hx_index:7,__enum__:"openfl._internal.renderer.DisplayObjectType",
toString:u},VIDEO:{_hx_index:8,__enum__:"openfl._internal.renderer.DisplayObjectType",toString:u}},Sb=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};h["openfl.geom.ColorTransform"]=Sb;Sb.__name__="openfl.geom.ColorTransform";Sb.prototype={alphaMultiplier:null,
alphaOffset:null,blueMultiplier:null,blueOffset:null,greenMultiplier:null,greenOffset:null,redMultiplier:null,redOffset:null,concat:function(a){this.redOffset=a.redOffset*this.redMultiplier+this.redOffset;this.greenOffset=a.greenOffset*this.greenMultiplier+this.greenOffset;this.blueOffset=a.blueOffset*this.blueMultiplier+this.blueOffset;this.alphaOffset=a.alphaOffset*this.alphaMultiplier+this.alphaOffset;this.redMultiplier*=a.redMultiplier;this.greenMultiplier*=a.greenMultiplier;this.blueMultiplier*=
a.blueMultiplier;this.alphaMultiplier*=a.alphaMultiplier},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 Sb(this.redMultiplier,this.greenMultiplier,this.blueMultiplier,this.alphaMultiplier,this.redOffset,
this.greenOffset,this.blueOffset,this.alphaOffset)},__copyFrom: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},__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},__identity:function(){this.alphaMultiplier=this.blueMultiplier=this.greenMultiplier=this.redMultiplier=1;this.alphaOffset=this.blueOffset=this.greenOffset=this.redOffset=0},__invert:function(){this.redMultiplier=0!=this.redMultiplier?1/this.redMultiplier:1;this.greenMultiplier=0!=this.greenMultiplier?1/this.greenMultiplier:1;this.blueMultiplier=0!=this.blueMultiplier?
1/this.blueMultiplier:1;this.alphaMultiplier=0!=this.alphaMultiplier?1/this.alphaMultiplier:1;this.redOffset=-this.redOffset;this.greenOffset=-this.greenOffset;this.blueOffset=-this.blueOffset;this.alphaOffset=-this.alphaOffset},__equals:function(a,b){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?!1:this.alphaOffset==a.alphaOffset},__isDefault:function(a){return a?1==this.redMultiplier&&1==this.greenMultiplier&&1==this.blueMultiplier&&0==this.redOffset&&0==this.greenOffset&&0==this.blueOffset?0==this.alphaOffset:!1:1==this.redMultiplier&&1==this.greenMultiplier&&1==this.blueMultiplier&&1==this.alphaMultiplier&&0==this.redOffset&&0==this.greenOffset&&0==this.blueOffset?0==this.alphaOffset:!1},__setArrays:function(a,b){a[0]=this.redMultiplier;a[1]=this.greenMultiplier;a[2]=this.blueMultiplier;
a[3]=this.alphaMultiplier;b[0]=this.redOffset;b[1]=this.greenOffset;b[2]=this.blueOffset;b[3]=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(){if(null==Sb.__limeColorMatrix){var a=new Float32Array(20);Sb.__limeColorMatrix=a}Sb.__limeColorMatrix[0]=
this.redMultiplier;Sb.__limeColorMatrix[4]=this.redOffset/255;Sb.__limeColorMatrix[6]=this.greenMultiplier;Sb.__limeColorMatrix[9]=this.greenOffset/255;Sb.__limeColorMatrix[12]=this.blueMultiplier;Sb.__limeColorMatrix[14]=this.blueOffset/255;Sb.__limeColorMatrix[18]=this.alphaMultiplier;Sb.__limeColorMatrix[19]=this.alphaOffset/255;return Sb.__limeColorMatrix},__class__:Sb,__properties__:{set_color:"set_color",get_color:"get_color"}};var T=function(){};h["com.stencyl.utils.Utils"]=T;T.__name__="com.stencyl.utils.Utils";
T.__properties__={set_time:"set_time",set_pan:"set_pan",get_pan:"get_pan",set_volume:"set_volume",get_volume:"get_volume"};T.toBoolean=function(a){return"true"==a?!0:!1};T.clear=function(a){a.length=0};T.removeValueFromArray=function(a,b){for(var c=a.length-1;-1<c;)a[c]==b&&a.splice(c,1),--c};T.contains=function(a,b){if(null==a)return!1;for(var c=a.length-1;-1<c;){if(a[c]==b)return!0;--c}return!1};T.mapContainsValue=function(a,b){for(a=new Pe(a,a.arrayKeys());a.hasNext();)if(a.next()==b)return!0;
return!1};T.mapCount=function(a){var b=0;for(a=new Pe(a,a.arrayKeys());a.hasNext();)a.next(),++b;return b};T.mapToList=function(a,b){var c=[];for(a="keys"==b?a.keys():new Pe(a,a.arrayKeys());a.hasNext();)b=a.next(),c.push(b);return c};T.clone=function(a){return T.cloner.clone(a)};T.copyMap=function(a){for(var b=new ua,c=a.keys();c.hasNext();){var d=c.next(),e=null!=q[d]?a.getReserved(d):a.h[d];null!=q[d]?b.setReserved(d,e):b.h[d]=e}return b};T.applyToAllChildren=function(a,b){for(var c=0,d=a.get_numChildren();c<
d;){var e=c++;e=a.getChildAt(e);e instanceof db&&T.applyToAllChildren(e,b);b(e)}};T.removeAllChildren=function(a){for(;0<a.get_numChildren();){var b=a.getChildAt(0);b instanceof db&&T.removeAllChildren(L.__cast(b,db));b instanceof Lg&&T.removeAllTiles(b);a.removeChild(b)}};T.removeAllTiles=function(a){for(;0<a.get_numTiles();){var b=a.getTileAt(0);L.__implements(b,yj)&&T.removeAllTiles(b);a.removeTile(b)}};T.demouse=function(a){for(var b=0,c=a.get_numChildren();b<c;){var d=b++;d=a.getChildAt(d);d instanceof
db&&T.demouse(L.__cast(d,db));a.mouseChildren=!1;a.mouseEnabled=!1}};T.getAnchorPoint=function(a){a=a.getRect(a);return new pa(-1*a.x,-1*a.y)};T.setCamera=function(a,b){null==b&&(b=0);null==a&&(a=0);T.camera.x=a;T.camera.y=b};T.resetCamera=function(){T.camera.x=T.camera.y=0};T.get_volume=function(){return T._volume};T.set_volume=function(a){0>a&&(a=0);if(T._volume==a)return a;T._soundTransform.volume=T._volume=a;return T._volume};T.get_pan=function(){return T._pan};T.set_pan=function(a){-1>a&&(a=
-1);1<a&&(a=1);if(T._pan==a)return a;T._soundTransform.pan=T._pan=a;return T._pan};T.sign=function(a){return 0>a?-1:0<a?1:0};T.approach=function(a,b,c){return a<b?b<a+c?b:a+c:b>a-c?b:a-c};T.lerp=function(a,b,c){null==c&&(c=1);return a+(b-a)*c};T.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;return d+(((b>>24&255)-d)*c|0)<<24|e+(((b>>16&255)-e)*c|0)<<16|f+(((b>>8&255)-f)*c|0)<<8|a+(((b&255)-a)*c|0)};T.stepTowards=function(a,
b,c,d){null==d&&(d=1);T.point.x=b-a.x;T.point.y=c-a.y;T.point.get_length()<=d?(a.x=b,a.y=c):(T.point.normalize(d),a.x+=T.point.x,a.y+=T.point.y)};T.anchorTo=function(a,b,c){null==c&&(c=0);T.point.x=a.x-b.x;T.point.y=a.y-b.y;T.point.get_length()>c&&T.point.normalize(c);a.x=b.x+T.point.x;a.y=b.y+T.point.y};T.angle=function(a,b,c,d){a=57.29577951308402*Math.atan2(d-b,c-a);return 0>a?a+360:a};T.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};T.rotateAround=function(a,b,c,d){null==d&&(d=!0);null==c&&(c=0);d&&(d=57.29577951308402*Math.atan2(a.y-b.y,a.x-b.x),c+=0>d?d+360:d);d=b.x;var e=b.y,f=a.x,g=a.y;null==g&&(g=0);null==f&&(f=0);d=Math.sqrt((f-d)*(f-d)+(g-e)*(g-e));e=b.x;b=b.y;null==b&&(b=0);null==e&&(e=0);null==d&&(d=1);c*=.01745329251994278;a.x=Math.cos(c)*d+e;a.y=Math.sin(c)*d+b};T.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))};T.distanceSquared=function(a,
b,c,d){null==d&&(d=0);null==c&&(c=0);return(c-a)*(c-a)+(d-b)*(d-b)};T.distanceRects=function(a,b,c,d,e,f,g,k){if(a<e+g&&e<a+c)return b<f+k&&f<b+d?0:b>f?b-(f+k):f-(b+d);if(b<f+k&&f<b+d)return a>e?a-(e+g):e-(a+c);if(a>e){if(b>f)return e+=g,f+=k,null==f&&(f=0),null==e&&(e=0),Math.sqrt((e-a)*(e-a)+(f-b)*(f-b));b+=d;e+=g;null==f&&(f=0);null==e&&(e=0);return Math.sqrt((e-a)*(e-a)+(f-b)*(f-b))}if(b>f)return a+=c,f+=k,null==f&&(f=0),null==e&&(e=0),Math.sqrt((e-a)*(e-a)+(f-b)*(f-b));a+=c;b+=d;null==f&&(f=
0);null==e&&(e=0);return Math.sqrt((e-a)*(e-a)+(f-b)*(f-b))};T.distanceRectPoint=function(a,b,c,d,e,f){if(a>=c&&a<=c+e)return b>=d&&b<=d+f?0:b>d?b-(d+f):d-b;if(b>=d&&b<=d+f)return a>c?a-(c+e):c-a;if(a>c){if(b>d)return c+=e,d+=f,null==d&&(d=0),null==c&&(c=0),Math.sqrt((c-a)*(c-a)+(d-b)*(d-b));f=c+e;null==d&&(d=0);null==f&&(f=0);return Math.sqrt((f-a)*(f-a)+(d-b)*(d-b))}if(b>d)return d+=f,null==d&&(d=0),null==c&&(c=0),Math.sqrt((c-a)*(c-a)+(d-b)*(d-b));f=c;null==d&&(d=0);null==f&&(f=0);return Math.sqrt((f-
a)*(f-a)+(d-b)*(d-b))};T.clamp=function(a,b,c){if(c>b)return a=a<c?a:c,a>b?a:b;a=a<b?a:b;return a>c?a:c};T.clampInRect=function(a,b,c,d,e,f){null==f&&(f=0);a.x=T.clamp(a.x,b+f,b+d-f);a.y=T.clamp(a.y,c+f,c+e-f)};T.scale=function(a,b,c,d,e){return d+(a-b)/(c-b)*(e-d)};T.scaleClamp=function(a,b,c,d,e){a=d+(a-b)/(c-b)*(e-d);if(e>d)return a=a<e?a:e,a>d?a:d;a=a<d?a:d;return a>e?a:e};T.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};T.next=function(a,b,c){null==
c&&(c=!0);return c?b[(T.indexOf(b,a)+1)%b.length]:b[Math.max(T.indexOf(b,a)+1,b.length-1)|0]};T.prev=function(a,b,c){null==c&&(c=!0);return c?b[(T.indexOf(b,a)-1+b.length)%b.length]:b[Math.max(T.indexOf(b,a)-1,0)|0]};T.swap=function(a,b,c){return a==b?c:b};T.getColorRGB=function(a,b,c){null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);return a<<16|b<<8|c};T.getRed=function(a){return a>>16&255};T.getGreen=function(a){return a>>8&255};T.getBlue=function(a){return a&255};T.convertColor=function(a){return 0>
a?a+16777216:a};T.timeFlag=function(){var a=(new Date).getTime()/1E3,b=a-T._time;T._time=a;return b};T.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};T.set_time=function(a){T._time=a;return T._time};T.saveToSharedObject=function(a,b,c){try{a.data[b]=T.clone(c)}catch(d){if(ra.lastException=d,a=d instanceof E?d.val:d,"string"==typeof a){if("deep clone"!=a)throw new E(a);}else throw d;}};T.loadFromSharedObject=function(a,b){return T.cloner.clone(X.field(a.data,
b))};T.flushSharedObject=function(a,b){var c=null;try{c=a.flush()}catch(d){ra.lastException=d;null!=b&&b(!1);return}0==c&&null!=b&&b(!0)};T.saveMap=function(a,b,c){b=Mc.getLocal(b);for(var d=a.keys();d.hasNext();){var e=d.next();b.data[e]=null!=q[e]?a.getReserved(e):a.h[e]}T.flushSharedObject(b,c)};T.loadMap=function(a,b,c){b=Mc.getLocal(b);for(var d=0,e=X.fields(b.data);d<e.length;){var f=e[d];++d;var g=X.field(b.data,f);null!=q[f]?a.setReserved(f,g):a.h[f]=g}null!=c&&c(!0)};T.convertLegacySharedObject=
function(a,b){};T.getFlatName=function(a){a=ba.replace(a,"/","_");a=ba.replace(a,".","_");return a=ba.replace(a,"-","_")};T.getAssetClass=function(a){a="__ASSET__"+T.getFlatName(a);return h[a]};T.getConfigBytes=function(a){return fi.getBytes(T.getFlatName(a))};T.getConfigText=function(a){return fi.getString(T.getFlatName(a))};T.getConfigBitmap=function(a){try{var b=T.getFlatName(ba.replace(a,".png",".txt")),c=fi.getString(b);return na.loadFromBase64(c,"png").then(function(a){return xb.withValue(new Zc(a))})}catch(d){ra.lastException=
d;a=d instanceof E?d.val:d;if("string"==typeof a)return xb.withError("(You probably have a old browser) Error occurred: "+a);throw d;}};T.loadBytes=function(a){a=rb.createInstance(T.getAssetClass(a),[]);return Kc.ofData(za.toArrayBuffer(a))};T.loadText=function(a){a=T.loadBytes(a);return a.getString(0,a.length)};T.loadBitmapData=function(a){a=Ob.fromFile(a);return na.fromImage(a)};T.resetStatics=function(){T.width=0;T.height=0;T.elapsed=0;T.rate=1;T.bounds=null;T.camera=new pa;T._time=0;T._updateTime=
0;T._renderTime=0;T._gameTime=0;T._flashTime=0;T._bitmap=new ua;T._seed=0;T._getSeed=0;T._volume=1;T._pan=0;T._soundTransform=new Tf;T.stage=null;T.point=new pa;T.point2=new pa;T.zero=new pa;T.rect=new ia;T.matrix=new Ha;T.sprite=new qa;T.collision=new Cc};var Ya=function(){};h["com.stencyl.utils.motion.EasingFunction"]=Ya;Ya.__name__="com.stencyl.utils.motion.EasingFunction";Ya.prototype={apply:function(a){return 0},__class__:Ya};var Vm=function(){};h["com.stencyl.utils.motion.BackIn"]=Vm;Vm.__name__=
"com.stencyl.utils.motion.BackIn";Vm.__super__=Ya;Vm.prototype=w(Ya.prototype,{apply:function(a){return 0==a?0:1==a?1:a*a*(2.70158*a-1.70158)},__class__:Vm});var Wm=function(){};h["com.stencyl.utils.motion.BackInOut"]=Wm;Wm.__name__="com.stencyl.utils.motion.BackInOut";Wm.__super__=Ya;Wm.prototype=w(Ya.prototype,{apply:function(a){return 0==a?0:1==a?1:1>(a*=2)?.5*a*a*(3.5949095*a-2.5949095):.5*((a-=2)*a*(3.5949095*a+2.5949095)+2)},__class__:Wm});var Xm=function(){};h["com.stencyl.utils.motion.BackOut"]=
Xm;Xm.__name__="com.stencyl.utils.motion.BackOut";Xm.__super__=Ya;Xm.prototype=w(Ya.prototype,{apply:function(a){return 0==a?0:1==a?1:--a*a*(2.70158*a+1.70158)+1},__class__:Xm});var Ym=function(){};h["com.stencyl.utils.motion.BackOutIn"]=Ym;Ym.__name__="com.stencyl.utils.motion.BackOutIn";Ym.__super__=Ya;Ym.prototype=w(Ya.prototype,{apply:function(a){if(0==a)return 0;if(1==a)return 1;if(.5>a)return a=2*a-1,.5*(a*a*(2.70158*a+1.70158)+1);a=2*a-1;return.5*a*a*(2.70158*a-1.70158)+.5},__class__:Ym});
var Zm=function(){};h["com.stencyl.utils.motion.BounceIn"]=Zm;Zm.__name__="com.stencyl.utils.motion.BounceIn";Zm.__super__=Ya;Zm.prototype=w(Ya.prototype,{apply:function(a){a=1-a;return.36363636363636365>a?1-7.5625*a*a:.7272727272727273>a?1-(7.5625*(a-=.5454545454545454)*a+.75):.9090909090909091>a?1-(7.5625*(a-=.8181818181818182)*a+.9375):1-(7.5625*(a-=.9545454545454546)*a+.984375)},__class__:Zm});var $m=function(){};h["com.stencyl.utils.motion.BounceInOut"]=$m;$m.__name__="com.stencyl.utils.motion.BounceInOut";
$m.__super__=Ya;$m.prototype=w(Ya.prototype,{apply:function(a){if(.5>a)return a=1-2*a,.36363636363636365>a?.5*(1-7.5625*a*a):.7272727272727273>a?.5*(1-(7.5625*(a-=.5454545454545454)*a+.75)):.9090909090909091>a?.5*(1-(7.5625*(a-=.8181818181818182)*a+.9375)):.5*(1-(7.5625*(a-=.9545454545454546)*a+.984375));a=2*a-1;return.36363636363636365>a?7.5625*a*a*.5+.5:.7272727272727273>a?.5*(7.5625*(a-=.5454545454545454)*a+.75)+.5:.9090909090909091>a?.5*(7.5625*(a-=.8181818181818182)*a+.9375)+.5:.5*(7.5625*(a-=
.9545454545454546)*a+.984375)+.5},__class__:$m});var an=function(){};h["com.stencyl.utils.motion.BounceOut"]=an;an.__name__="com.stencyl.utils.motion.BounceOut";an.__super__=Ya;an.prototype=w(Ya.prototype,{apply:function(a){return.36363636363636365>a?7.5625*a*a:.7272727272727273>a?7.5625*(a-=.5454545454545454)*a+.75:.9090909090909091>a?7.5625*(a-=.8181818181818182)*a+.9375:7.5625*(a-=.9545454545454546)*a+.984375},__class__:an});var bn=function(){};h["com.stencyl.utils.motion.BounceOutIn"]=bn;bn.__name__=
"com.stencyl.utils.motion.BounceOutIn";bn.__super__=Ya;bn.prototype=w(Ya.prototype,{apply:function(a){if(.5>a)return.36363636363636365>(a*=2)?3.78125*a*a:.7272727272727273>a?.5*(7.5625*(a-=.5454545454545454)*a+.75):.9090909090909091>a?.5*(7.5625*(a-=.8181818181818182)*a+.9375):.5*(7.5625*(a-=.9545454545454546)*a+.984375);a=1-(2*a-1);return.36363636363636365>a?.5-3.78125*a*a+.5:.7272727272727273>a?.5-.5*(7.5625*(a-=.5454545454545454)*a+.75)+.5:.9090909090909091>a?.5-.5*(7.5625*(a-=.8181818181818182)*
a+.9375)+.5:.5-.5*(7.5625*(a-=.9545454545454546)*a+.984375)+.5},__class__:bn});var cn=function(){};h["com.stencyl.utils.motion.CircIn"]=cn;cn.__name__="com.stencyl.utils.motion.CircIn";cn.__super__=Ya;cn.prototype=w(Ya.prototype,{apply:function(a){return-1>a||1<a?0:1-Math.sqrt(1-a*a)},__class__:cn});var dn=function(){};h["com.stencyl.utils.motion.CircInOut"]=dn;dn.__name__="com.stencyl.utils.motion.CircInOut";dn.__super__=Ya;dn.prototype=w(Ya.prototype,{apply:function(a){return-.5>a||1.5<a?.5:1>(a*=
2)?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)},__class__:dn});var en=function(){};h["com.stencyl.utils.motion.CircOut"]=en;en.__name__="com.stencyl.utils.motion.CircOut";en.__super__=Ya;en.prototype=w(Ya.prototype,{apply:function(a){return 0>a||2<a?0:Math.sqrt(a*(2-a))},__class__:en});var fn=function(){};h["com.stencyl.utils.motion.CircOutIn"]=fn;fn.__name__="com.stencyl.utils.motion.CircOutIn";fn.__super__=Ya;fn.prototype=w(Ya.prototype,{apply:function(a){if(0>a)return 0;if(1<a)return 1;
if(.5>a)return a=2*a-1,.5*Math.sqrt(1-a*a);a=2*a-1;return-.5*(Math.sqrt(1-a*a)-1-1)},__class__:fn});var gn=function(){};h["com.stencyl.utils.motion.CubicIn"]=gn;gn.__name__="com.stencyl.utils.motion.CubicIn";gn.__super__=Ya;gn.prototype=w(Ya.prototype,{apply:function(a){return a*a*a},__class__:gn});var hn=function(){};h["com.stencyl.utils.motion.CubicInOut"]=hn;hn.__name__="com.stencyl.utils.motion.CubicInOut";hn.__super__=Ya;hn.prototype=w(Ya.prototype,{apply:function(a){return 1>(a*=2)?.5*a*a*a:
.5*((a-=2)*a*a+2)},__class__:hn});var jn=function(){};h["com.stencyl.utils.motion.CubicOut"]=jn;jn.__name__="com.stencyl.utils.motion.CubicOut";jn.__super__=Ya;jn.prototype=w(Ya.prototype,{apply:function(a){return--a*a*a+1},__class__:jn});var kn=function(){};h["com.stencyl.utils.motion.CubicOutIn"]=kn;kn.__name__="com.stencyl.utils.motion.CubicOutIn";kn.__super__=Ya;kn.prototype=w(Ya.prototype,{apply:function(a){a=2*a-1;return.5*(a*a*a+1)},__class__:kn});var ln=function(){};h["com.stencyl.utils.motion.ElasticIn"]=
ln;ln.__name__="com.stencyl.utils.motion.ElasticIn";ln.__super__=Ya;ln.prototype=w(Ya.prototype,{apply:function(a){return 0==a?0:1==a?1:-(Math.exp(6.931471805599453*--a)*Math.sin(6.283185307179586*(.001*a-7.5E-5)/3E-4))},__class__:ln});var mn=function(){};h["com.stencyl.utils.motion.ElasticInOut"]=mn;mn.__name__="com.stencyl.utils.motion.ElasticInOut";mn.__super__=Ya;mn.prototype=w(Ya.prototype,{apply:function(a){return 0==a?0:1==a?1:1>(a*=2)?-.5*Math.exp(6.931471805599453*--a)*Math.sin(6.283185307179586*
(.001*a-7.5E-5)/3E-4):Math.exp(-6.931471805599453*--a)*Math.sin(6.283185307179586*(.001*a-7.5E-5)/3E-4)*.5+1},__class__:mn});var nn=function(){};h["com.stencyl.utils.motion.ElasticOut"]=nn;nn.__name__="com.stencyl.utils.motion.ElasticOut";nn.__super__=Ya;nn.prototype=w(Ya.prototype,{apply:function(a){return 0==a?0:1==a?1:Math.exp(-6.931471805599453*a)*Math.sin(6.283185307179586*(.001*a-7.5E-5)/3E-4)+1},__class__:nn});var on=function(){};h["com.stencyl.utils.motion.ElasticOutIn"]=on;on.__name__="com.stencyl.utils.motion.ElasticOutIn";
on.__super__=Ya;on.prototype=w(Ya.prototype,{apply:function(a){if(.5>a)return 0==(a*=2)?0:.5*Math.exp(-6.931471805599453*a)*Math.sin(6.283185307179586*(.001*a-7.5E-5)/3E-4)+.5;if(.5==a)return.5;if(1==a)return 1;a=2*a-1;return-(.5*Math.exp(6.931471805599453*--a)*Math.sin(6.283185307179586*(.001*a-7.5E-5)/3E-4))+.5},__class__:on});var pn=function(){};h["com.stencyl.utils.motion.ExpoIn"]=pn;pn.__name__="com.stencyl.utils.motion.ExpoIn";pn.__super__=Ya;pn.prototype=w(Ya.prototype,{apply:function(a){return 0==
a?0:Math.exp(6.931471805599453*(a-1))},__class__:pn});var qn=function(){};h["com.stencyl.utils.motion.ExpoInOut"]=qn;qn.__name__="com.stencyl.utils.motion.ExpoInOut";qn.__super__=Ya;qn.prototype=w(Ya.prototype,{apply:function(a){return 0==a?0:1==a?1:1>(a*=2)?.5*Math.exp(6.931471805599453*(a-1)):.5*(2-Math.exp(-6.931471805599453*(a-1)))},__class__:qn});var rn=function(){};h["com.stencyl.utils.motion.ExpoOut"]=rn;rn.__name__="com.stencyl.utils.motion.ExpoOut";rn.__super__=Ya;rn.prototype=w(Ya.prototype,
{apply:function(a){return 1==a?1:1-Math.exp(-6.931471805599453*a)},__class__:rn});var sn=function(){};h["com.stencyl.utils.motion.ExpoOutIn"]=sn;sn.__name__="com.stencyl.utils.motion.ExpoOutIn";sn.__super__=Ya;sn.prototype=w(Ya.prototype,{apply:function(a){return.5>a?.5*(1-Math.exp(-13.862943611198906*a)):.5==a?.5:.5*(Math.exp(13.862943611198906*(a-1))+1)},__class__:sn});var tn=function(){};h["com.stencyl.utils.motion.Linear"]=tn;tn.__name__="com.stencyl.utils.motion.Linear";tn.__super__=Ya;tn.prototype=
w(Ya.prototype,{apply:function(a){return a},__class__:tn});var un=function(){};h["com.stencyl.utils.motion.QuadIn"]=un;un.__name__="com.stencyl.utils.motion.QuadIn";un.__super__=Ya;un.prototype=w(Ya.prototype,{apply:function(a){return a*a},__class__:un});var vn=function(){};h["com.stencyl.utils.motion.QuadInOut"]=vn;vn.__name__="com.stencyl.utils.motion.QuadInOut";vn.__super__=Ya;vn.prototype=w(Ya.prototype,{apply:function(a){return.5>a?2*a*a:-2*--a*a+1},__class__:vn});var wn=function(){};h["com.stencyl.utils.motion.QuadOut"]=
wn;wn.__name__="com.stencyl.utils.motion.QuadOut";wn.__super__=Ya;wn.prototype=w(Ya.prototype,{apply:function(a){return-a*(a-2)},__class__:wn});var xn=function(){};h["com.stencyl.utils.motion.QuadOutIn"]=xn;xn.__name__="com.stencyl.utils.motion.QuadOutIn";xn.__super__=Ya;xn.prototype=w(Ya.prototype,{apply:function(a){if(.5>a)return-.5*(a*=2)*(a-2);a=2*a-1;return.5*a*a+.5},__class__:xn});var yn=function(){};h["com.stencyl.utils.motion.QuartIn"]=yn;yn.__name__="com.stencyl.utils.motion.QuartIn";yn.__super__=
Ya;yn.prototype=w(Ya.prototype,{apply:function(a){return(a*=a)*a},__class__:yn});var zn=function(){};h["com.stencyl.utils.motion.QuartInOut"]=zn;zn.__name__="com.stencyl.utils.motion.QuartInOut";zn.__super__=Ya;zn.prototype=w(Ya.prototype,{apply:function(a){if(1>(a*=2))return.5*(a*=a)*a;a*=a-=2;return-.5*(a*a-2)},__class__:zn});var An=function(){};h["com.stencyl.utils.motion.QuartOut"]=An;An.__name__="com.stencyl.utils.motion.QuartOut";An.__super__=Ya;An.prototype=w(Ya.prototype,{apply:function(a){a*=
--a;return 1-a*a},__class__:An});var Bn=function(){};h["com.stencyl.utils.motion.QuartOutIn"]=Bn;Bn.__name__="com.stencyl.utils.motion.QuartOutIn";Bn.__super__=Ya;Bn.prototype=w(Ya.prototype,{apply:function(a){if(.5>a)return a=2*a-1,-.5*(a*=a)*a+.5;a=2*a-1;return.5*(a*=a)*a+.5},__class__:Bn});var Cn=function(){};h["com.stencyl.utils.motion.QuintIn"]=Cn;Cn.__name__="com.stencyl.utils.motion.QuintIn";Cn.__super__=Ya;Cn.prototype=w(Ya.prototype,{apply:function(a){return a*(a*=a)*a},__class__:Cn});var Dn=
function(){};h["com.stencyl.utils.motion.QuintInOut"]=Dn;Dn.__name__="com.stencyl.utils.motion.QuintInOut";Dn.__super__=Ya;Dn.prototype=w(Ya.prototype,{apply:function(a){return 1>(a*=2)?.5*a*(a*=a)*a:.5*(a-=2)*(a*=a)*a+1},__class__:Dn});var En=function(){};h["com.stencyl.utils.motion.QuintOut"]=En;En.__name__="com.stencyl.utils.motion.QuintOut";En.__super__=Ya;En.prototype=w(Ya.prototype,{apply:function(a){return--a*(a*=a)*a+1},__class__:En});var Fn=function(){};h["com.stencyl.utils.motion.QuintOutIn"]=
Fn;Fn.__name__="com.stencyl.utils.motion.QuintOutIn";Fn.__super__=Ya;Fn.prototype=w(Ya.prototype,{apply:function(a){a=2*a-1;return.5*(a*(a*=a)*a+1)},__class__:Fn});var Gn=function(){};h["com.stencyl.utils.motion.SineIn"]=Gn;Gn.__name__="com.stencyl.utils.motion.SineIn";Gn.__super__=Ya;Gn.prototype=w(Ya.prototype,{apply:function(a){return 0==a?0:1==a?1:1-Math.cos(1.5707963267948966*a)},__class__:Gn});var Hn=function(){};h["com.stencyl.utils.motion.SineInOut"]=Hn;Hn.__name__="com.stencyl.utils.motion.SineInOut";
Hn.__super__=Ya;Hn.prototype=w(Ya.prototype,{apply:function(a){return 0==a?0:1==a?1:-.5*(Math.cos(3.141592653589793*a)-1)},__class__:Hn});var In=function(){};h["com.stencyl.utils.motion.SineOut"]=In;In.__name__="com.stencyl.utils.motion.SineOut";In.__super__=Ya;In.prototype=w(Ya.prototype,{apply:function(a){return 0==a?0:1==a?1:Math.sin(1.5707963267948966*a)},__class__:In});var Jn=function(){};h["com.stencyl.utils.motion.SineOutIn"]=Jn;Jn.__name__="com.stencyl.utils.motion.SineOutIn";Jn.__super__=
Ya;Jn.prototype=w(Ya.prototype,{apply:function(a){return 0==a?0:1==a?1:.5>a?.5*Math.sin(3.141592653589793*a):-.5*Math.cos(1.5707963267948966*(2*a-1))+1},__class__:Jn});var Kn=function(){};h["com.stencyl.utils.motion.WarpIn"]=Kn;Kn.__name__="com.stencyl.utils.motion.WarpIn";Kn.__super__=Ya;Kn.prototype=w(Ya.prototype,{apply:function(a){return 1>a?0:1},__class__:Kn});var Ln=function(){};h["com.stencyl.utils.motion.WarpInOut"]=Ln;Ln.__name__="com.stencyl.utils.motion.WarpInOut";Ln.__super__=Ya;Ln.prototype=
w(Ya.prototype,{apply:function(a){return.5>a?0:1},__class__:Ln});var Mn=function(){};h["com.stencyl.utils.motion.WarpOut"]=Mn;Mn.__name__="com.stencyl.utils.motion.WarpOut";Mn.__super__=Ya;Mn.prototype=w(Ya.prototype,{apply:function(a){return 0>=a?0:1},__class__:Mn});var Nn=function(){};h["com.stencyl.utils.motion.WarpOutIn"]=Nn;Nn.__name__="com.stencyl.utils.motion.WarpOutIn";Nn.__super__=Ya;Nn.prototype=w(Ya.prototype,{apply:function(a){return 0>=a?0:1>a?.5:1},__class__:Nn});var tb=function(){};
h["com.stencyl.utils.motion.Easing"]=tb;tb.__name__="com.stencyl.utils.motion.Easing";var Ki=function(){};h["com.stencyl.utils.motion.EasingConstants"]=Ki;Ki.__name__="com.stencyl.utils.motion.EasingConstants";var Ng=function(){this.paused=this.finished=this.active=!1};h["com.stencyl.utils.motion.TweenObject"]=Ng;Ng.__name__="com.stencyl.utils.motion.TweenObject";Ng.prototype={easing:null,time:null,duration:null,active:null,paused:null,updated:null,finished:null,onUpdate:null,onComplete:null,_tween:function(a,
b){null==a&&(a=tb.linear);this.easing=a;this.duration=b;this.active||Gb.markActive(this);this.time=0;this.active=!0;this.paused=this.finished=this.updated=!1;0==b&&(this.duration=1,Gb.finish(this))},update:function(a){if(!this.paused)if(this.time+=a,this.time>this.duration&&(this.time=this.duration),this.updateValue(),this.updated=!0,this.time==this.duration){this.active=!1;this.finished=!0;if(null!=this.onUpdate)this.onUpdate();if(null!=this.onComplete)this.onComplete()}else if(null!=this.onUpdate)this.onUpdate()},
updateValue:function(){},doOnUpdate:function(a){this.onUpdate=a;return this},doOnComplete:function(a){this.onComplete=a;return this},__class__:Ng};var $e=function(){Ng.call(this)};h["com.stencyl.utils.motion.TweenFloat"]=$e;$e.__name__="com.stencyl.utils.motion.TweenFloat";$e.__super__=Ng;$e.prototype=w(Ng.prototype,{startValue:null,endValue:null,value:null,tween:function(a,b,c,d){this.startValue=a;this.endValue=b;this.value=a;this._tween(c,d);return this},updateValue:function(){this.value=mb.lerp(this.easing.apply(this.time/
this.duration),this.startValue,this.endValue)},__class__:$e});var bg=function(){Ng.call(this)};h["com.stencyl.utils.motion.TweenFloat2"]=bg;bg.__name__="com.stencyl.utils.motion.TweenFloat2";bg.__super__=Ng;bg.prototype=w(Ng.prototype,{startValue1:null,endValue1:null,value1:null,startValue2:null,endValue2:null,value2:null,tween:function(a,b,c,d,e,f){this.startValue1=a;this.endValue1=b;this.value1=a;this.startValue2=c;this.endValue2=d;this.value2=c;this._tween(e,f);return this},updateValue:function(){var a=
this.easing.apply(this.time/this.duration);this.value1=mb.lerp(a,this.startValue1,this.endValue1);this.value2=mb.lerp(a,this.startValue2,this.endValue2)},__class__:bg});var Gb=function(){};h["com.stencyl.utils.motion.TweenManager"]=Gb;Gb.__name__="com.stencyl.utils.motion.TweenManager";Gb.resetStatics=function(){Gb.activeObjects=[];Gb.finishedObjects=[]};Gb.markActive=function(a){Gb.activeObjects.push(a)};Gb.cancel=function(a){var b=Gb.activeObjects.indexOf(a);-1!=b&&(a.active=!1,a.updated=!1,a.finished=
!1,a.paused=!1,Gb.activeObjects[b]=Gb.activeObjects[Gb.activeObjects.length-1],Gb.activeObjects.pop())};Gb.finish=function(a){var b=Gb.activeObjects.indexOf(a);-1!=b&&(a.update(a.duration-a.time),Gb.activeObjects[b]=Gb.activeObjects[Gb.activeObjects.length-1],Gb.activeObjects.pop(),Gb.finishedObjects.push(a))};Gb.update=function(a){for(var b=Gb.finishedObjects.length;0<b--;)Gb.finishedObjects.pop().updated=!1;for(b=Gb.activeObjects.length;0<b--;){var c=Gb.activeObjects[b];c.update(a);c.finished&&
(Gb.activeObjects[b]=Gb.activeObjects[Gb.activeObjects.length-1],Gb.activeObjects.pop(),Gb.finishedObjects.push(c))}};Gb.timer=function(a){return(new On).tween(a)};var On=function(){Ng.call(this)};h["com.stencyl.utils.motion.TweenTimer"]=On;On.__name__="com.stencyl.utils.motion.TweenTimer";On.__super__=Ng;On.prototype=w(Ng.prototype,{tween:function(a){this._tween(tb.linear,a);return this},updateValue:function(){},__class__:On});var Pn=C["haxe.StackItem"]={__ename__:"haxe.StackItem",__constructs__:["CFunction",
"Module","FilePos","Method","LocalFunction"],CFunction:{_hx_index:0,__enum__:"haxe.StackItem",toString:u},Module:(x=function(a){return{_hx_index:1,m:a,__enum__:"haxe.StackItem",toString:u}},x.__params__=["m"],x),FilePos:(x=function(a,b,c,d){return{_hx_index:2,s:a,file:b,line:c,column:d,__enum__:"haxe.StackItem",toString:u}},x.__params__=["s","file","line","column"],x),Method:(x=function(a,b){return{_hx_index:3,classname:a,method:b,__enum__:"haxe.StackItem",toString:u}},x.__params__=["classname","method"],
x),LocalFunction:(x=function(a){return{_hx_index:4,v:a,__enum__:"haxe.StackItem",toString:u}},x.__params__=["v"],x)},ra=function(){};h["haxe.CallStack"]=ra;ra.__name__="haxe.CallStack";ra.getStack=function(a){if(null==a)return[];var b=Error.prepareStackTrace;Error.prepareStackTrace=function(a,b){a=[];for(var c=0;c<b.length;){var d=b[c];++c;null!=ra.wrapCallSite&&(d=ra.wrapCallSite(d));var g=null,k=d.getFunctionName();if(null!=k){var l=k.lastIndexOf(".");0<=l&&(g=B.substr(k,0,l),k=B.substr(k,l+1,null),
g=Pn.Method(g,k))}k=d.getFileName();l=null==k?-1:k.indexOf("file:");null!=ra.wrapCallSite&&0<l&&(k=B.substr(k,l+6,null));a.push(Pn.FilePos(g,k,d.getLineNumber(),d.getColumnNumber()))}return a};a=ra.makeStack(a.stack);Error.prepareStackTrace=b;return a};ra.callStack=function(){try{throw Error();}catch(b){ra.lastException=b;var a=ra.getStack(b);a.shift();return a}};ra.exceptionStack=function(){return ra.getStack(ra.lastException)};ra.toString=function(a){for(var b=new bd,c=0;c<a.length;){var d=a[c];
++c;b.b+="\nCalled from ";ra.itemToString(b,d)}return b.b};ra.itemToString=function(a,b){switch(b._hx_index){case 0:a.b+="a C function";break;case 1:b=b.m;a.b+="module ";a.b+=null==b?"null":""+b;break;case 2:var c=b.column,d=b.line,e=b.file;b=b.s;null!=b&&(ra.itemToString(a,b),a.b+=" (");a.b+=null==e?"null":""+e;a.b+=" line ";a.b+=null==d?"null":""+d;null!=c&&(a.b+=" column ",a.b+=null==c?"null":""+c);null!=b&&(a.b+=")");break;case 3:c=b.method;b=b.classname;a.b+=K.string(null==b?"<unknown>":b);a.b+=
".";a.b+=null==c?"null":""+c;break;case 4:b=b.v,a.b+="local function #",a.b+=null==b?"null":""+b}};ra.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 Ca("^   at ([A-Za-z0-9_. ]+) \\(([^)]+):([0-9]+):([0-9]+)\\)$",""),d=0;d<a.length;){var e=a[d];++d;if(c.match(e)){e=c.matched(1).split(".");var f=e.pop(),g=c.matched(2),k=K.parseInt(c.matched(3)),l=K.parseInt(c.matched(4));b.push(Pn.FilePos("Anonymous function"==f?Pn.LocalFunction():
"Global code"==f?null:Pn.Method(e.join("."),f),g,k,l))}else b.push(Pn.Module(ba.trim(e)))}return b}return a};var zj={};h["haxe._Int32.Int32_Impl_"]=zj;zj.__name__="haxe._Int32.Int32_Impl_";zj.ucompare=function(a,b){return 0>a?0>b?~b-~a|0:1:0>b?-1:a-b|0};var Qn={};h["haxe._Int64.Int64_Impl_"]=Qn;Qn.__name__="haxe._Int64.Int64_Impl_";Qn.toString=function(a){var b=a;if(0==b.high&&0==b.low)return"0";a="";var c=!1;0>b.high&&(c=!0);for(var d=new Xb(0,10);0!=b.high||0!=b.low;)if(b=Qn.divMod(b,d),0>b.modulus.high){var e=
b.modulus,f=~e.high;e=~e.low+1|0;0==e&&f++;a=e+a;f=b.quotient;b=~f.high;f=~f.low+1|0;0==f&&(b++,b|=0);b=new Xb(b,f)}else a=b.modulus.low+a,b=b.quotient;c&&(a="-"+a);return a};Qn.divMod=function(a,b){if(0==b.high)switch(b.low){case 0:throw new E("divide by zero");case 1:a=new Xb(a.high,a.low);var c=new Xb(0,0);return{quotient:a,modulus:c}}var d=0>a.high!=0>b.high;if(0>a.high){c=~a.high;var e=~a.low+1|0;0==e&&(c++,c|=0);c=new Xb(c,e)}else c=new Xb(a.high,a.low);0>b.high&&(e=~b.high,b=~b.low+1|0,0==
b&&(e++,e|=0),b=new Xb(e,b));e=new Xb(0,0);for(var f=new Xb(0,1);!(0>b.high);){var g=zj.ucompare(b.high,c.high);g=0!=g?g:zj.ucompare(b.low,c.low);var k=1;k&=63;b=0==k?new Xb(b.high,b.low):32>k?new Xb(b.high<<k|b.low>>>32-k,b.low<<k):new Xb(b.low<<k-32,0);k=1;k&=63;f=0==k?new Xb(f.high,f.low):32>k?new Xb(f.high<<k|f.low>>>32-k,f.low<<k):new Xb(f.low<<k-32,0);if(0<=g)break}for(;0!=f.high||0!=f.low;)g=zj.ucompare(c.high,b.high),0<=(0!=g?g:zj.ucompare(c.low,b.low))&&(e=new Xb(e.high|f.high,e.low|f.low),
g=c.high-b.high|0,k=c.low-b.low|0,0>zj.ucompare(c.low,b.low)&&(g--,g|=0),c=new Xb(g,k)),g=1,g&=63,f=0==g?new Xb(f.high,f.low):32>g?new Xb(f.high>>>g,f.high<<32-g|f.low>>>g):new Xb(0,f.high>>>g-32),g=1,g&=63,b=0==g?new Xb(b.high,b.low):32>g?new Xb(b.high>>>g,b.high<<32-g|b.low>>>g):new Xb(0,b.high>>>g-32);d&&(d=~e.high,b=~e.low+1|0,0==b&&(d++,d|=0),e=new Xb(d,b));0>a.high&&(a=~c.high,c=~c.low+1|0,0==c&&(a++,a|=0),c=new Xb(a,c));return{quotient:e,modulus:c}};var Xb=function(a,b){this.high=a;this.low=
b};h["haxe._Int64.___Int64"]=Xb;Xb.__name__="haxe._Int64.___Int64";Xb.prototype={high:null,low:null,__class__:Xb};var th=function(){};h["haxe.Log"]=th;th.__name__="haxe.Log";th.formatOutput=function(a,b){a=K.string(a);if(null==b)return a;var c=b.fileName+":"+b.lineNumber;if(null!=b.customParams){var d=0;for(b=b.customParams;d<b.length;){var e=b[d];++d;a+=", "+K.string(e)}}return c+": "+a};th.trace=function(a,b){a=th.formatOutput(a,b);"undefined"!=typeof console&&null!=console.log&&console.log(a)};
var fi=function(){};h["haxe.Resource"]=fi;fi.__name__="haxe.Resource";fi.getString=function(a){for(var b=0,c=fi.content;b<c.length;){var d=c[b];++b;if(d.name==a)return null!=d.str?d.str:gi.decode(d.data).toString()}return null};fi.getBytes=function(a){for(var b=0,c=fi.content;b<c.length;){var d=c[b];++b;if(d.name==a)return null!=d.str?hb.ofString(d.str):gi.decode(d.data)}return null};var Id=function(){this.buf=new bd;this.cache=[];this.useCache=Id.USE_CACHE;this.useEnumIndex=Id.USE_ENUM_INDEX;this.shash=
new ua;this.scount=0};h["haxe.Serializer"]=Id;Id.__name__="haxe.Serializer";Id.run=function(a){var b=new Id;b.serialize(a);return b.toString()};Id.prototype={buf:null,cache:null,shash:null,scount:null,useCache:null,useEnumIndex:null,toString:function(){return this.buf.b},serializeString:function(a){var b=this.shash;b=null!=q[a]?b.getReserved(a):b.h[a];if(null!=b)this.buf.b+="R",this.buf.b+=null==b?"null":""+b;else{b=this.shash;var c=this.scount++;null!=q[a]?b.setReserved(a,c):b.h[a]=c;this.buf.b+=
"y";a=encodeURIComponent(a);this.buf.b+=K.string(a.length);this.buf.b+=":";this.buf.b+=null==a?"null":""+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?"null":""+e,!0}this.cache.push(a);return!1},serializeFields:function(a){for(var b=0,c=X.fields(a);b<c.length;){var d=c[b];++b;this.serializeString(d);this.serialize(X.field(a,d))}this.buf.b+="g"},serialize:function(a){var b=rb.typeof(a);
switch(b._hx_index){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?"null":""+a;break;case 2:isNaN(a)?this.buf.b+="k":isFinite(a)?(this.buf.b+="d",this.buf.b+=null==a?"null":""+a):this.buf.b+=0>a?"m":"p";break;case 3:this.buf.b+=a?"t":"f";break;case 4:L.__instanceof(a,et)?(a=a.__name__,this.buf.b+="A",this.serializeString(a)):L.__instanceof(a,iu)?(this.buf.b+="B",this.serializeString(a.__ename__)):this.useCache&&this.serializeRef(a)||(this.buf.b+=
"o",this.serializeFields(a));break;case 5:throw new E("Cannot serialize function");case 6:b=b.c;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=0,d=a.length;c<d;){var e=c++;null==a[e]?++b:(0<b&&(1==b?this.buf.b+="n":(this.buf.b+="u",this.buf.b+=null==b?"null":""+b),b=0),this.serialize(a[e]))}0<b&&(1==b?this.buf.b+="n":(this.buf.b+="u",this.buf.b+=null==b?"null":""+b));this.buf.b+="h";break;case Date:this.buf.b+=
"v";this.buf.b+=K.string(a.getTime());break;case Wa:this.buf.b+="q";for(b=a.keys();b.hasNext();)c=b.next(),this.buf.b+=":",this.buf.b+=null==c?"null":""+c,this.serialize(a.h[c]);this.buf.b+="h";break;case Sa:this.buf.b+="l";for(a=a.h;null!=a;)b=a.item,a=a.next,this.serialize(b);this.buf.b+="h";break;case Aa:this.buf.b+="M";for(b=a.keys();b.hasNext();)c=b.next(),d=X.field(c,"__id__"),X.deleteField(c,"__id__"),this.serialize(c),c.__id__=d,this.serialize(a.h[c.__id__]);this.buf.b+="h";break;case ua:this.buf.b+=
"b";for(b=a.keys();b.hasNext();)c=b.next(),this.serializeString(c),this.serialize(null!=q[c]?a.getReserved(c):a.h[c]);this.buf.b+="h";break;case hb:this.buf.b+="s";this.buf.b+=K.string(Math.ceil(8*a.length/6));this.buf.b+=":";c=0;d=a.length-2;b=Id.BASE64_CODES;if(null==b){b=Array(Id.BASE64.length);e=0;for(var f=Id.BASE64.length;e<f;){var g=e++;b[g]=B.cca(Id.BASE64,g)}Id.BASE64_CODES=b}for(;c<d;)e=a.b[c++],f=a.b[c++],g=a.b[c++],this.buf.b+=String.fromCodePoint(b[e>>2]),this.buf.b+=String.fromCodePoint(b[(e<<
4|f>>4)&63]),this.buf.b+=String.fromCodePoint(b[(f<<2|g>>6)&63]),this.buf.b+=String.fromCodePoint(b[g&63]);c==d?(d=a.b[c++],a=a.b[c++],this.buf.b+=String.fromCodePoint(b[d>>2]),this.buf.b+=String.fromCodePoint(b[(d<<4|a>>4)&63]),this.buf.b+=String.fromCodePoint(b[a<<2&63])):c==d+1&&(a=a.b[c++],this.buf.b+=String.fromCodePoint(b[a>>2]),this.buf.b+=String.fromCodePoint(b[a<<4&63]));break;default:this.useCache&&this.cache.pop(),null!=a.hxSerialize?(this.buf.b+="C",this.serializeString(b.__name__),this.useCache&&
this.cache.push(a),a.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(b.__name__),this.useCache&&this.cache.push(a),this.serializeFields(a))}break;case 7:b=b.e;if(this.useCache){if(this.serializeRef(a))break;this.cache.pop()}this.buf.b+=K.string(this.useEnumIndex?"j":"w");this.serializeString(b.__ename__);this.useEnumIndex?(this.buf.b+=":",this.buf.b+=K.string(a._hx_index)):this.serializeString(C[a.__enum__].__constructs__[a._hx_index]);this.buf.b+=":";b=rb.enumParameters(a);
this.buf.b+=K.string(b.length);for(c=0;c<b.length;)d=b[c],++c,this.serialize(d);this.useCache&&this.cache.push(a);break;default:throw new E("Cannot serialize "+K.string(a));}},__class__:Id};var pf=function(a){var b=this;this.id=setInterval(function(){b.run()},a)};h["haxe.Timer"]=pf;pf.__name__="haxe.Timer";pf.delay=function(a,b){var c=new pf(b);c.run=function(){c.stop();a()};return c};pf.measure=function(a,b){var c=(new Date).getTime()/1E3;a=a();th.trace((new Date).getTime()/1E3-c+"s",b);return a};
pf.stamp=function(){return(new Date).getTime()/1E3};pf.prototype={id:null,stop:function(){null!=this.id&&(clearInterval(this.id),this.id=null)},run:function(){},__class__:pf};var Rn=function(){};h["haxe._Unserializer.DefaultResolver"]=Rn;Rn.__name__="haxe._Unserializer.DefaultResolver";Rn.prototype={resolveClass:function(a){return h[a]},resolveEnum:function(a){return C[a]},__class__:Rn};var af=function(a){this.buf=a;this.length=a.length;this.pos=0;this.scache=[];this.cache=[];a=af.DEFAULT_RESOLVER;
null==a&&(a=new Rn,af.DEFAULT_RESOLVER=a);this.resolver=a};h["haxe.Unserializer"]=af;af.__name__="haxe.Unserializer";af.initCodes=function(){for(var a=[],b=0,c=af.BASE64.length;b<c;){var d=b++;a[af.BASE64.charCodeAt(d)]=d}return a};af.run=function(a){return(new af(a)).unserialize()};af.prototype={buf:null,pos:null,length:null,cache:null,scache:null,resolver:null,setResolver:function(a){null==a?(null==Aj.instance&&(Aj.instance=new Aj),this.resolver=Aj.instance):this.resolver=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(b!=b)break;if(43<=b&&58>b||101==b||69==b)this.pos++;else break}return parseFloat(B.substr(this.buf,a,this.pos-a))},unserializeObject:function(a){for(;;){if(this.pos>=this.length)throw new E("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;
var b=this.unserialize();if("string"!=typeof b)throw new E("Invalid object key");var c=this.unserialize();a[b]=c}this.pos++},unserializeEnum:function(a,b){if(58!=this.buf.charCodeAt(this.pos++))throw new E("Invalid enum format");var c=this.readDigits();if(0==c)return rb.createEnum(a,b);for(var d=[];0<c--;)d.push(this.unserialize());return rb.createEnum(a,b,d)},unserialize:function(){switch(this.buf.charCodeAt(this.pos++)){case 65:var a=this.unserialize(),b=this.resolver.resolveClass(a);if(null==b)throw new E("Class not found "+
a);return b;case 66:a=this.unserialize();b=this.resolver.resolveEnum(a);if(null==b)throw new E("Enum not found "+a);return b;case 67:a=this.unserialize();b=this.resolver.resolveClass(a);if(null==b)throw new E("Class not found "+a);a=Object.create(b.prototype);this.cache.push(a);a.hxUnserialize(this);if(103!=this.buf.charCodeAt(this.pos++))throw new E("Invalid custom data");return a;case 77:a=new Aa;for(this.cache.push(a);104!=this.buf.charCodeAt(this.pos);)b=this.unserialize(),a.set(b,this.unserialize());
this.pos++;return a;case 82:a=this.readDigits();if(0>a||a>=this.scache.length)throw new E("Invalid string reference");return this.scache[a];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 98:a=new ua;for(this.cache.push(a);104!=this.buf.charCodeAt(this.pos);){b=this.unserialize();var c=this.unserialize();null!=q[b]?a.setReserved(b,c):a.h[b]=c}this.pos++;
return a;case 99:a=this.unserialize();b=this.resolver.resolveClass(a);if(null==b)throw new E("Class not found "+a);a=Object.create(b.prototype);this.cache.push(a);this.unserializeObject(a);return a;case 100:return this.readFloat();case 102:return!1;case 105:return this.readDigits();case 106:a=this.unserialize();b=this.resolver.resolveEnum(a);if(null==b)throw new E("Enum not found "+a);this.pos++;c=this.readDigits();var d=b.__constructs__.slice()[c];if(null==d)throw new E("Unknown enum index "+a+"@"+
c);a=this.unserializeEnum(b,d);this.cache.push(a);return a;case 107:return NaN;case 108:a=new Sa;for(this.cache.push(a);104!=this.buf.charCodeAt(this.pos);)a.add(this.unserialize());this.pos++;return a;case 109:return-Infinity;case 110:return null;case 111:return a={},this.cache.push(a),this.unserializeObject(a),a;case 112:return Infinity;case 113:a=new Wa;this.cache.push(a);for(b=this.buf.charCodeAt(this.pos++);58==b;)b=this.readDigits(),c=this.unserialize(),a.h[b]=c,b=this.buf.charCodeAt(this.pos++);
if(104!=b)throw new E("Invalid IntMap format");return a;case 114:a=this.readDigits();if(0>a||a>=this.cache.length)throw new E("Invalid reference");return this.cache[a];case 115:a=this.readDigits();d=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos<a)throw new E("Invalid bytes length");var e=af.CODES;null==e&&(e=af.initCodes(),af.CODES=e);var f=this.pos,g=a&3,k=f+(a-g);b=new hb(new ArrayBuffer(3*(a>>2)+(2<=g?g-1:0)));for(c=0;f<k;){var l=e[d.charCodeAt(f++)],m=e[d.charCodeAt(f++)];
b.b[c++]=(l<<2|m>>4)&255;l=e[d.charCodeAt(f++)];b.b[c++]=(m<<4|l>>2)&255;m=e[d.charCodeAt(f++)];b.b[c++]=(l<<6|m)&255}2<=g&&(m=e[d.charCodeAt(f++)],k=e[d.charCodeAt(f++)],b.b[c++]=(m<<2|k>>4)&255,3==g&&(d=e[d.charCodeAt(f++)],b.b[c++]=(k<<4|d>>2)&255));this.pos+=a;this.cache.push(b);return b;case 116:return!0;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=B.strDate(B.substr(this.buf,this.pos,19)),this.pos+=19):a=new Date(this.readFloat()),this.cache.push(a),a;case 119:a=this.unserialize();b=this.resolver.resolveEnum(a);if(null==b)throw new E("Enum not found "+a);a=this.unserializeEnum(b,this.unserialize());this.cache.push(a);return a;case 120:throw E.wrap(this.unserialize());case 121:a=this.readDigits();
if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos<a)throw new E("Invalid string length");b=B.substr(this.buf,this.pos,a);this.pos+=a;b=decodeURIComponent(b.split("+").join(" "));this.scache.push(b);return b;case 122:return 0}this.pos--;throw new E("Invalid char "+this.buf.charAt(this.pos)+" at position "+this.pos);},__class__:af};var Aj=function(){};h["haxe._Unserializer.NullResolver"]=Aj;Aj.__name__="haxe._Unserializer.NullResolver";Aj.prototype={resolveClass:function(a){return null},
resolveEnum:function(a){return null},__class__:Aj};var Bj=function(){this.a1=1;this.a2=0};h["haxe.crypto.Adler32"]=Bj;Bj.__name__="haxe.crypto.Adler32";Bj.read=function(a){var b=new Bj,c=a.readByte(),d=a.readByte(),e=a.readByte();a=a.readByte();b.a1=e<<8|a;b.a2=c<<8|d;return b};Bj.prototype={a1:null,a2:null,update:function(a,b,c){var d=this.a1,e=this.a2,f=b;for(b+=c;f<b;)c=f++,d=(d+a.b[c])%65521,e=(e+d)%65521;this.a1=d;this.a2=e},equals:function(a){return a.a1==this.a1?a.a2==this.a2:!1},__class__:Bj};
var hb=function(a){this.length=a.byteLength;this.b=new Uint8Array(a);this.b.bufferValue=a;a.hxBytes=this;a.bytes=this.b};h["haxe.io.Bytes"]=hb;hb.__name__="haxe.io.Bytes";hb.alloc=function(a){return new hb(new ArrayBuffer(a))};hb.ofString=function(a,b){b=[];for(var c=0;c<a.length;){var d=a.charCodeAt(c++);55296<=d&&56319>=d&&(d=d-55232<<10|a.charCodeAt(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 hb((new Uint8Array(b)).buffer)};hb.ofData=function(a){var b=a.hxBytes;return null!=b?b:new hb(a)};hb.ofHex=function(a){if(0!=(a.length&1))throw new E("Not a hex string (odd number of digits)");for(var b=[],c=0,d=a.length>>1;c<d;){var e=a.charCodeAt(2*c),f=a.charCodeAt(2*c+1);e=(e&15)+9*((e&64)>>6);f=(f&15)+9*((f&64)>>6);b.push((e<<4|f)&255);++c}return new hb((new Uint8Array(b)).buffer)};hb.fastGet=function(a,b){return a.bytes[b]};hb.prototype={length:null,b:null,data:null,get:function(a){return this.b[a]},
set:function(a,b){this.b[a]=b&255},blit:function(a,b,c,d){if(0>a||0>c||0>d||a+d>this.length||c+d>b.length)throw new E(Li.OutsideBounds);0==c&&d==b.b.byteLength?this.b.set(b.b,a):this.b.set(b.b.subarray(c,c+d),a)},fill:function(a,b,c){for(var d=0;d<b;)d++,this.b[a++]=c&255},sub:function(a,b){if(0>a||0>b||a+b>this.length)throw new E(Li.OutsideBounds);return new hb(this.b.buffer.slice(a+this.b.byteOffset,a+this.b.byteOffset+b))},compare:function(a){for(var b=this.b,c=a.b,d=0,e=this.length<a.length?this.length:
a.length;d<e;){var f=d++;if(b[f]!=c[f])return b[f]-c[f]}return this.length-a.length},initData:function(){null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength))},getDouble:function(a){null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));return this.data.getFloat64(a,!0)},getFloat:function(a){null==this.data&&(this.data=new DataView(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 DataView(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 DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));this.data.setFloat32(a,b,!0)},getUInt16:function(a){null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));return this.data.getUint16(a,!0)},setUInt16:function(a,b){null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,
this.b.byteLength));this.data.setUint16(a,b,!0)},getInt32:function(a){null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));return this.data.getInt32(a,!0)},setInt32:function(a,b){null==this.data&&(this.data=new DataView(this.b.buffer,this.b.byteOffset,this.b.byteLength));this.data.setInt32(a,b,!0)},getInt64:function(a){return new Xb(this.getInt32(a+4),this.getInt32(a))},setInt64:function(a,b){this.setInt32(a,b.low);this.setInt32(a+4,b.high)},getString:function(a,
b,c){if(0>a||0>b||a+b>this.length)throw new E(Li.OutsideBounds);c="";var d=this.b,e=oe.fromCharCode,f=a;for(a+=b;f<a;)if(b=d[f++],128>b){if(0==b)break;c+=e(b)}else if(224>b)c+=e((b&63)<<6|d[f++]&127);else if(240>b){var g=d[f++];c+=e((b&31)<<12|(g&127)<<6|d[f++]&127)}else{g=d[f++];var k=d[f++];b=(b&15)<<18|(g&127)<<12|(k&127)<<6|d[f++]&127;c+=e((b>>10)+55232);c+=e(b&1023|56320)}return c},readString:function(a,b){return this.getString(a,b)},toString:function(){return this.getString(0,this.length)},
toHex:function(){for(var a="",b=[],c=0;16>c;){var d=c++;b.push(B.cca("0123456789abcdef",d))}c=0;for(d=this.length;c<d;){var e=c++;e=this.b[e];a+=String.fromCodePoint(b[e>>4]);a+=String.fromCodePoint(b[e&15])}return a},getData:function(){return this.b.bufferValue},__class__:hb};var gi=function(){};h["haxe.crypto.Base64"]=gi;gi.__name__="haxe.crypto.Base64";gi.decode=function(a,b){null==b&&(b=!0);if(b)for(;61==B.cca(a,a.length-1);)a=B.substr(a,0,-1);return(new Vk(gi.BYTES)).decodeBytes(hb.ofString(a))};
var Vk=function(a){for(var b=a.length,c=1;b>1<<c;)++c;if(8<c||b!=1<<c)throw new E("BaseCode : base length must be a power of two.");this.base=a;this.nbits=c};h["haxe.crypto.BaseCode"]=Vk;Vk.__name__="haxe.crypto.BaseCode";Vk.prototype={base:null,nbits:null,tbl:null,encodeBytes:function(a){for(var b=this.nbits,c=this.base,d=8*a.length/b|0,e=new hb(new ArrayBuffer(d+(0==8*a.length%b?0:1))),f=0,g=0,k=(1<<b)-1,l=0,m=0;m<d;){for(;g<b;)g+=8,f<<=8,f|=a.b[l++];g-=b;e.b[m++]=c.b[f>>g&k]&255}0<g&&(e.b[m++]=
c.b[f<<b-g&k]&255);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=new hb(new ArrayBuffer(d)),f=0,g=0,k=0,l=0;l<d;){for(;8>g;){g+=b;f<<=b;var m=c[a.b[k++]];if(-1==m)throw new E("BaseCode : invalid encoded char");f|=m}g-=8;e.b[l++]=f>>g&255}return e},__class__:Vk};var Me=function(){};h["haxe.ds.ArraySort"]=
Me;Me.__name__="haxe.ds.ArraySort";Me.sort=function(a,b){Me.rec(a,b,0,a.length)};Me.rec=function(a,b,c,d){var e=c+d>>1;if(12>d-c){if(!(d<=c))for(e=c+1;e<d;)for(var f=e++;f>c;){if(0>b(a[f],a[f-1]))Me.swap(a,f-1,f);else break;--f}}else Me.rec(a,b,c,e),Me.rec(a,b,e,d),Me.doMerge(a,b,c,e,d,e-c,d-e)};Me.doMerge=function(a,b,c,d,e,f,g){if(0!=f&&0!=g)if(2==f+g)0>b(a[d],a[c])&&Me.swap(a,d,c);else{if(f>g){var k=f>>1;var l=c+k;var m=Me.lower(a,b,d,e,l);var p=m-d}else p=g>>1,m=d+p,l=Me.upper(a,b,c,d,m),k=l-
c;Me.rotate(a,b,l,d,m);d=l+p;Me.doMerge(a,b,c,l,d,k,p);Me.doMerge(a,b,d,m,e,f-k,g-p)}};Me.rotate=function(a,b,c,d,e){if(c!=d&&d!=e)for(b=Me.gcd(e-c,d-c);0!=b--;){for(var f=a[c+b],g=d-c,k=c+b,l=c+b+g;l!=c+b;)a[k]=a[l],k=l,l=e-l>g?l+g:c+(g-(e-l));a[k]=f}};Me.gcd=function(a,b){for(;0!=b;){var c=a%b;a=b;b=c}return a};Me.upper=function(a,b,c,d,e){d-=c;for(var f,g;0<d;)f=d>>1,g=c+f,0>b(a[e],a[g])?d=f:(c=g+1,d=d-f-1);return c};Me.lower=function(a,b,c,d,e){d-=c;for(var f,g;0<d;)f=d>>1,g=c+f,0>b(a[g],a[e])?
(c=g+1,d=d-f-1):d=f;return c};Me.swap=function(a,b,c){var d=a[b];a[b]=a[c];a[c]=d};var al=function(){};h["haxe.ds.BalancedTree"]=al;al.__name__="haxe.ds.BalancedTree";al.__interfaces__=[Qb];al.prototype={root:null,set:function(a,b){this.root=this.setLoop(a,b,this.root)},get:function(a){for(var b=this.root;null!=b;){var c=this.compare(a,b.key);if(0==c)return b.value;b=0>c?b.left:b.right}return null},remove:function(a){try{return this.root=this.removeLoop(a,this.root),!0}catch(b){ra.lastException=b;
if("string"==typeof(b instanceof E?b.val:b))return!1;throw b;}},exists:function(a){for(var b=this.root;null!=b;){var c=this.compare(a,b.key);if(0==c)return!0;b=0>c?b.left:b.right}return!1},iterator:function(){var a=[];this.iteratorLoop(this.root,a);return B.iter(a)},keyValueIterator:function(){return new sh(this)},keys:function(){var a=[];this.keysLoop(this.root,a);return B.iter(a)},setLoop:function(a,b,c){if(null==c)return new zf(null,a,b,null);var d=this.compare(a,c.key);if(0==d)return new zf(c.left,
a,b,c.right,null==c?0:c._height);if(0>d)return a=this.setLoop(a,b,c.left),this.balance(a,c.key,c.value,c.right);a=this.setLoop(a,b,c.right);return this.balance(c.left,c.key,c.value,a)},removeLoop:function(a,b){if(null==b)throw new E("Not_found");var c=this.compare(a,b.key);return 0==c?this.merge(b.left,b.right):0>c?this.balance(this.removeLoop(a,b.left),b.key,b.value,b.right):this.balance(b.left,b.key,b.value,this.removeLoop(a,b.right))},iteratorLoop:function(a,b){null!=a&&(this.iteratorLoop(a.left,
b),b.push(a.value),this.iteratorLoop(a.right,b))},keysLoop:function(a,b){null!=a&&(this.keysLoop(a.left,b),b.push(a.key),this.keysLoop(a.right,b))},merge:function(a,b){if(null==a)return b;if(null==b)return a;var c=this.minBinding(b);return this.balance(a,c.key,c.value,this.removeMinBinding(b))},minBinding:function(a){if(null==a)throw new E("Not_found");return null==a.left?a:this.minBinding(a.left)},removeMinBinding:function(a){return null==a.left?a.right:this.balance(this.removeMinBinding(a.left),
a.key,a.value,a.right)},balance:function(a,b,c,d){var e=null==a?0:a._height,f=null==d?0:d._height;return e>f+2?(e=a.left,f=a.right,(null==e?0:e._height)>=(null==f?0:f._height)?new zf(a.left,a.key,a.value,new zf(a.right,b,c,d)):new zf(new zf(a.left,a.key,a.value,a.right.left),a.right.key,a.right.value,new zf(a.right.right,b,c,d))):f>e+2?(e=d.right,f=d.left,(null==e?0:e._height)>(null==f?0:f._height)?new zf(new zf(a,b,c,d.left),d.key,d.value,d.right):new zf(new zf(a,b,c,d.left.left),d.left.key,d.left.value,
new zf(d.left.right,d.key,d.value,d.right))):new zf(a,b,c,d,(e>f?e:f)+1)},compare:function(a,b){return X.compare(a,b)},__class__:al};var zf=function(a,b,c,d,e){null==e&&(e=-1);this.left=a;this.key=b;this.value=c;this.right=d;-1==e?(a=this.left,b=this.right,a=(null==a?0:a._height)>(null==b?0:b._height)?this.left:this.right,a=null==a?0:a._height,this._height=a+1):this._height=e};h["haxe.ds.TreeNode"]=zf;zf.__name__="haxe.ds.TreeNode";zf.prototype={left:null,right:null,key:null,value:null,_height:null,
__class__:zf};var Cj=function(){};h["haxe.ds.EnumValueMap"]=Cj;Cj.__name__="haxe.ds.EnumValueMap";Cj.__interfaces__=[Qb];Cj.__super__=al;Cj.prototype=w(al.prototype,{compare:function(a,b){var c=a._hx_index-b._hx_index;if(0!=c)return c;a=rb.enumParameters(a);b=rb.enumParameters(b);return 0==a.length&&0==b.length?0:this.compareArgs(a,b)},compareArgs:function(a,b){var c=a.length-b.length;if(0!=c)return c;c=0;for(var d=a.length;c<d;){var e=c++;e=this.compareArg(a[e],b[e]);if(0!=e)return e}return 0},compareArg:function(a,
b){return X.isEnumValue(a)&&X.isEnumValue(b)?this.compare(a,b):a instanceof Array&&b instanceof Array?this.compareArgs(a,b):X.compare(a,b)},__class__:Cj});var zc=function(a,b){this.elt=a;this.next=b};h["haxe.ds.GenericCell"]=zc;zc.__name__="haxe.ds.GenericCell";zc.prototype={elt:null,next:null,__class__:zc};var vq=function(){};h["haxe.ds.GenericStack"]=vq;vq.__name__="haxe.ds.GenericStack";vq.prototype={head:null,__class__:vq};var am=function(a,b){this.item=a;this.next=b};h["haxe.ds._List.ListNode"]=
am;am.__name__="haxe.ds._List.ListNode";am.prototype={item:null,next:null,__class__:am};var Ip=function(a){this.head=a};h["haxe.ds._List.ListIterator"]=Ip;Ip.__name__="haxe.ds._List.ListIterator";Ip.prototype={head:null,hasNext:function(){return null!=this.head},next:function(){var a=this.head.item;this.head=this.head.next;return a},__class__:Ip};var Pe=function(a,b){this.map=a;this.keys=b;this.index=0;this.count=b.length};h["haxe.ds._StringMap.StringMapIterator"]=Pe;Pe.__name__="haxe.ds._StringMap.StringMapIterator";
Pe.prototype={map:null,keys:null,index:null,count:null,hasNext:function(){return this.index<this.count},next:function(){var a=this.map,b=this.keys[this.index++];return null!=q[b]?a.getReserved(b):a.h[b]},__class__:Pe};var bl=function(){this.size=this.pos=0};h["haxe.io.BytesBuffer"]=bl;bl.__name__="haxe.io.BytesBuffer";bl.prototype={buffer:null,view:null,u8:null,pos:null,size:null,addByte:function(a){this.pos==this.size&&this.grow(1);this.view.setUint8(this.pos++,a)},add:function(a){this.pos+a.length>
this.size&&this.grow(a.length);if(0!=this.size){var b=new Uint8Array(a.b.buffer,a.b.byteOffset,a.length);this.u8.set(b,this.pos);this.pos+=a.length}},addBytes:function(a,b,c){if(0>b||0>c||b+c>a.length)throw new E(Li.OutsideBounds);this.pos+c>this.size&&this.grow(c);0!=this.size&&(a=new Uint8Array(a.b.buffer,a.b.byteOffset+b,c),this.u8.set(a,this.pos),this.pos+=c)},grow:function(a){var b=this.pos+a;for(a=0==this.size?16:this.size;a<b;)a=3*a>>1;b=new ArrayBuffer(a);var c=new Uint8Array(b);0<this.size&&
c.set(this.u8);this.size=a;this.buffer=b;this.u8=c;this.view=new DataView(this.buffer)},getBytes:function(){if(0==this.size)return new hb(new ArrayBuffer(0));var a=new hb(this.buffer);a.length=this.pos;return a},__class__:bl};var Sn=function(){};h["haxe.io.Input"]=Sn;Sn.__name__="haxe.io.Input";Sn.prototype={bigEndian:null,readByte:function(){throw new E("Not implemented");},readBytes:function(a,b,c){var d=c,e=a.b;if(0>b||0>c||b+c>a.length)throw new E(Li.OutsideBounds);try{for(;0<d;)e[b]=this.readByte(),
++b,--d}catch(f){if(ra.lastException=f,!((f instanceof E?f.val:f)instanceof cl))throw f;}return c-d},readFullBytes:function(a,b,c){for(;0<c;){var d=this.readBytes(a,b,c);if(0==d)throw new E(Li.Blocked);b+=d;c-=d}},read:function(a){for(var b=new hb(new ArrayBuffer(a)),c=0;0<a;){var d=this.readBytes(b,c,a);if(0==d)throw new E(Li.Blocked);c+=d;a-=d}return b},readInt16:function(){var a=this.readByte(),b=this.readByte();a=this.bigEndian?b|a<<8:a|b<<8;return 0!=(a&32768)?a-65536:a},readUInt16:function(){var a=
this.readByte(),b=this.readByte();return this.bigEndian?b|a<<8:a|b<<8},readInt32:function(){var a=this.readByte(),b=this.readByte(),c=this.readByte(),d=this.readByte();return this.bigEndian?d|c<<8|b<<16|a<<24:a|b<<8|c<<16|d<<24},readString:function(a,b){var c=new hb(new ArrayBuffer(a));this.readFullBytes(c,0,a);return c.getString(0,a,b)},__class__:Sn};var Mi=function(a,b,c){null==b&&(b=0);null==c&&(c=a.length-b);if(0>b||0>c||b+c>a.length)throw new E(Li.OutsideBounds);this.b=a.b;this.pos=b;this.totlen=
this.len=c};h["haxe.io.BytesInput"]=Mi;Mi.__name__="haxe.io.BytesInput";Mi.__super__=Sn;Mi.prototype=w(Sn.prototype,{b:null,pos:null,len:null,totlen:null,readByte:function(){if(0==this.len)throw new E(new cl);this.len--;return this.b[this.pos++]},readBytes:function(a,b,c){if(0>b||0>c||b+c>a.length)throw new E(Li.OutsideBounds);if(0==this.len&&0<c)throw new E(new cl);this.len<c&&(c=this.len);var d=this.b;a=a.b;for(var e=0,f=c;e<f;){var g=e++;a[b+g]=d[this.pos+g]}this.pos+=c;this.len-=c;return c},__class__:Mi});
var ft=function(){};h["haxe.io.Output"]=ft;ft.__name__="haxe.io.Output";var Tn=function(){this.b=new bl};h["haxe.io.BytesOutput"]=Tn;Tn.__name__="haxe.io.BytesOutput";Tn.__super__=ft;Tn.prototype=w(ft.prototype,{b:null,writeByte:function(a){this.b.addByte(a)},getBytes:function(){return this.b.getBytes()},__class__:Tn});C["haxe.io.Encoding"]={__ename__:"haxe.io.Encoding",__constructs__:["UTF8","RawNative"],UTF8:{_hx_index:0,__enum__:"haxe.io.Encoding",toString:u},RawNative:{_hx_index:1,__enum__:"haxe.io.Encoding",
toString:u}};var cl=function(){};h["haxe.io.Eof"]=cl;cl.__name__="haxe.io.Eof";cl.prototype={toString:function(){return"Eof"},__class__:cl};var Li=C["haxe.io.Error"]={__ename__:"haxe.io.Error",__constructs__:["Blocked","Overflow","OutsideBounds","Custom"],Blocked:{_hx_index:0,__enum__:"haxe.io.Error",toString:u},Overflow:{_hx_index:1,__enum__:"haxe.io.Error",toString:u},OutsideBounds:{_hx_index:2,__enum__:"haxe.io.Error",toString:u},Custom:(x=function(a){return{_hx_index:3,e:a,__enum__:"haxe.io.Error",
toString:u}},x.__params__=["e"],x)},zd=function(){};h["haxe.io.FPHelper"]=zd;zd.__name__="haxe.io.FPHelper";zd.i32ToFloat=function(a){zd.helper.setInt32(0,a,!0);return zd.helper.getFloat32(0,!0)};zd.floatToI32=function(a){zd.helper.setFloat32(0,a,!0);return zd.helper.getInt32(0,!0)};zd.i64ToDouble=function(a,b){zd.helper.setInt32(0,a,!0);zd.helper.setInt32(4,b,!0);return zd.helper.getFloat64(0,!0)};zd.doubleToI64=function(a){var b=zd.i64tmp;zd.helper.setFloat64(0,a,!0);b.low=zd.helper.getInt32(0,
!0);b.high=zd.helper.getInt32(4,!0);return b};var hi=function(a){switch(a){case ".":case "..":this.dir=a;this.file="";return}var b=a.lastIndexOf("/"),c=a.lastIndexOf("\\");b<c?(this.dir=B.substr(a,0,c),a=B.substr(a,c+1,null),this.backslash=!0):c<b?(this.dir=B.substr(a,0,b),a=B.substr(a,b+1,null)):this.dir=null;b=a.lastIndexOf(".");-1!=b?(this.ext=B.substr(a,b+1,null),this.file=B.substr(a,0,b)):(this.ext=null,this.file=a)};h["haxe.io.Path"]=hi;hi.__name__="haxe.io.Path";hi.directory=function(a){a=
new hi(a);return null==a.dir?"":a.dir};hi.prototype={dir:null,file:null,ext:null,backslash:null,__class__:hi};var Un=function(a){Mi.call(this,hb.ofString(a))};h["haxe.io.StringInput"]=Un;Un.__name__="haxe.io.StringInput";Un.__super__=Mi;Un.prototype=w(Mi.prototype,{__class__:Un});var sh=function(a){this.map=a;this.keys=a.keys()};h["haxe.iterators.MapKeyValueIterator"]=sh;sh.__name__="haxe.iterators.MapKeyValueIterator";sh.prototype={map:null,keys:null,hasNext:function(){return this.keys.hasNext()},
next:function(){var a=this.keys.next();return{value:this.map.get(a),key:a}},__class__:sh};var jq={};h["haxe.xml._Access.NodeAccess_Impl_"]=jq;jq.__name__="haxe.xml._Access.NodeAccess_Impl_";jq.resolve=function(a,b){var c=a.elementsNamed(b).next();if(null==c){if(a.nodeType==fa.Document)a="Document";else{if(a.nodeType!=fa.Element)throw new E("Bad node type, expected Element but found "+ea.toString(a.nodeType));a=a.nodeName}throw new E(a+" is missing element "+b);}if(c.nodeType!=fa.Document&&c.nodeType!=
fa.Element)throw new E("Invalid nodeType "+ea.toString(c.nodeType));return c};var dt={};h["haxe.xml._Access.HasNodeAccess_Impl_"]=dt;dt.__name__="haxe.xml._Access.HasNodeAccess_Impl_";dt.resolve=function(a,b){return a.elementsNamed(b).hasNext()};var Rm={};h["haxe.xml._Access.Access_Impl_"]=Rm;Rm.__name__="haxe.xml._Access.Access_Impl_";Rm.__properties__={get_innerData:"get_innerData"};Rm.get_innerData=function(a){if(a.nodeType!=fa.Document&&a.nodeType!=fa.Element)throw new E("Bad node type, expected Element or Document but found "+
ea.toString(a.nodeType));var b=B.iter(a.children);if(!b.hasNext()){if(a.nodeType==fa.Document)a="Document";else{if(a.nodeType!=fa.Element)throw new E("Bad node type, expected Element but found "+ea.toString(a.nodeType));a=a.nodeName}throw new E(a+" does not have data");}var c=b.next();if(b.hasNext()){var d=b.next();if(c.nodeType==fa.PCData&&d.nodeType==fa.CData){if(c.nodeType==fa.Document||c.nodeType==fa.Element)throw new E("Bad node type, unexpected "+ea.toString(c.nodeType));c=""==ba.trim(c.nodeValue)}else c=
!1;if(c){if(!b.hasNext()){if(d.nodeType==fa.Document||d.nodeType==fa.Element)throw new E("Bad node type, unexpected "+ea.toString(d.nodeType));return d.nodeValue}c=b.next();if(c.nodeType==fa.PCData){if(c.nodeType==fa.Document||c.nodeType==fa.Element)throw new E("Bad node type, unexpected "+ea.toString(c.nodeType));c=""==ba.trim(c.nodeValue)}else c=!1;if(c&&!b.hasNext()){if(d.nodeType==fa.Document||d.nodeType==fa.Element)throw new E("Bad node type, unexpected "+ea.toString(d.nodeType));return d.nodeValue}}if(a.nodeType==
fa.Document)a="Document";else{if(a.nodeType!=fa.Element)throw new E("Bad node type, expected Element but found "+ea.toString(a.nodeType));a=a.nodeName}throw new E(a+" does not only have data");}if(c.nodeType!=fa.PCData&&c.nodeType!=fa.CData){if(a.nodeType==fa.Document)a="Document";else{if(a.nodeType!=fa.Element)throw new E("Bad node type, expected Element but found "+ea.toString(a.nodeType));a=a.nodeName}throw new E(a+" does not have data");}if(c.nodeType==fa.Document||c.nodeType==fa.Element)throw new E("Bad node type, unexpected "+
ea.toString(c.nodeType));return c.nodeValue};var Ne=function(a,b,c){this.xml=b;this.message=a;this.position=c;this.lineNumber=1;for(a=this.positionAtLine=0;a<c;){var d=a++;d=b.charCodeAt(d);10==d?(this.lineNumber++,this.positionAtLine=0):13!=d&&this.positionAtLine++}};h["haxe.xml.XmlParserException"]=Ne;Ne.__name__="haxe.xml.XmlParserException";Ne.prototype={message:null,lineNumber:null,positionAtLine:null,position:null,xml:null,toString:function(){return L.getClass(this).__name__+": "+this.message+
" at line "+this.lineNumber+" char "+this.positionAtLine},__class__:Ne};var Qh=function(){};h["haxe.xml.Parser"]=Qh;Qh.__name__="haxe.xml.Parser";Qh.parse=function(a,b){null==b&&(b=!1);var c=fa.createDocument();Qh.doParse(a,b,0,c);return c};Qh.doParse=function(a,b,c,d){null==c&&(c=0);for(var e=null,f=1,g=1,k=null,l=0,m=0,p=0,n=a.charCodeAt(c),h=new bd,t=1,r=-1;n==n;){switch(f){case 0:switch(n){case 9:case 10:case 13:case 32:break;default:f=g;continue}break;case 1:if(60==n)f=0,g=2;else{l=c;f=13;continue}break;
case 2:switch(n){case 33:if(91==a.charCodeAt(c+1)){c+=2;if("CDATA["!=B.substr(a,c,6).toUpperCase())throw new E(new Ne("Expected <![CDATA[",a,c));c+=5;f=17}else if(68==a.charCodeAt(c+1)||100==a.charCodeAt(c+1)){if("OCTYPE"!=B.substr(a,c+2,6).toUpperCase())throw new E(new Ne("Expected <!DOCTYPE",a,c));c+=8;f=16}else{if(45!=a.charCodeAt(c+1)||45!=a.charCodeAt(c+2))throw new E(new Ne("Expected \x3c!--",a,c));c+=2;f=15}l=c+1;break;case 47:if(null==d)throw new E(new Ne("Expected node name",a,c));l=c+1;
f=0;g=10;break;case 63:f=14;l=c;break;default:f=3;l=c;continue}break;case 3:if(!(97<=n&&122>=n||65<=n&&90>=n||48<=n&&57>=n||58==n||46==n||95==n||45==n)){if(c==l)throw new E(new Ne("Expected node name",a,c));e=fa.createElement(B.substr(a,l,c-l));d.addChild(e);++m;f=0;g=4;continue}break;case 4:switch(n){case 47:f=11;break;case 62:f=9;break;default:f=5;l=c;continue}break;case 5:if(!(97<=n&&122>=n||65<=n&&90>=n||48<=n&&57>=n||58==n||46==n||95==n||45==n)){if(l==c)throw new E(new Ne("Expected attribute name",
a,c));k=B.substr(a,l,c-l);if(e.exists(k))throw new E(new Ne("Duplicate attribute ["+k+"]",a,c));f=0;g=6;continue}break;case 6:if(61==n)f=0,g=7;else throw new E(new Ne("Expected =",a,c));break;case 7:switch(n){case 34:case 39:h=new bd;f=8;l=c+1;r=n;break;default:throw new E(new Ne('Expected "',a,c));}break;case 8:switch(n){case 38:t=c-l;h.b+=null==t?B.substr(a,l,null):B.substr(a,l,t);f=18;t=8;l=c+1;break;case 60:case 62:if(b)throw new E(new Ne("Invalid unescaped "+String.fromCodePoint(n)+" in attribute value",
a,c));n==r&&(g=c-l,h.b+=null==g?B.substr(a,l,null):B.substr(a,l,g),g=h.b,h=new bd,e.set(k,g),f=0,g=4);break;default:n==r&&(g=c-l,h.b+=null==g?B.substr(a,l,null):B.substr(a,l,g),g=h.b,h=new bd,e.set(k,g),f=0,g=4)}break;case 9:l=c=Qh.doParse(a,b,c,e);f=1;break;case 10:if(!(97<=n&&122>=n||65<=n&&90>=n||48<=n&&57>=n||58==n||46==n||95==n||45==n)){if(l==c)throw new E(new Ne("Expected node name",a,c));g=B.substr(a,l,c-l);if(null==d||0!=d.nodeType)throw new E(new Ne("Unexpected </"+g+">, tag is not open",
a,c));if(d.nodeType!=fa.Element)throw new E("Bad node type, expected Element but found "+ea.toString(d.nodeType));if(g!=d.nodeName){if(d.nodeType!=fa.Element)throw new E("Bad node type, expected Element but found "+ea.toString(d.nodeType));throw new E(new Ne("Expected </"+d.nodeName+">",a,c));}f=0;g=12;continue}break;case 11:if(62==n)f=1;else throw new E(new Ne("Expected >",a,c));break;case 12:if(62==n)return 0==m&&d.addChild(fa.createPCData("")),c;throw new E(new Ne("Expected >",a,c));case 13:60==
n?(g=c-l,h.b+=null==g?B.substr(a,l,null):B.substr(a,l,g),g=fa.createPCData(h.b),h=new bd,d.addChild(g),++m,f=0,g=2):38==n&&(t=c-l,h.b+=null==t?B.substr(a,l,null):B.substr(a,l,t),f=18,t=13,l=c+1);break;case 14:63==n&&62==a.charCodeAt(c+1)&&(++c,n=B.substr(a,l+1,c-l-2),d.addChild(fa.createProcessingInstruction(n)),++m,f=1);break;case 15:45==n&&45==a.charCodeAt(c+1)&&62==a.charCodeAt(c+2)&&(d.addChild(fa.createComment(B.substr(a,l,c-l))),++m,c+=2,f=1);break;case 16:91==n?++p:93==n?--p:62==n&&0==p&&(d.addChild(fa.createDocType(B.substr(a,
l,c-l))),++m,f=1);break;case 17:93==n&&93==a.charCodeAt(c+1)&&62==a.charCodeAt(c+2)&&(n=fa.createCData(B.substr(a,l,c-l)),d.addChild(n),++m,c+=2,f=1);break;case 18:if(59==n){l=B.substr(a,l,c-l);if(35==l.charCodeAt(0))l=120==l.charCodeAt(1)?K.parseInt("0"+B.substr(l,1,l.length-1)):K.parseInt(B.substr(l,1,l.length-1)),h.b+=String.fromCodePoint(l);else if(n=Qh.escapes,null!=q[l]?n.existsReserved(l):n.h.hasOwnProperty(l))n=Qh.escapes,l=null!=q[l]?n.getReserved(l):n.h[l],h.b+=K.string(l);else{if(b)throw new E(new Ne("Undefined entity: "+
l,a,c));h.b+=K.string("&"+l+";")}l=c+1;f=t}else if(!(97<=n&&122>=n||65<=n&&90>=n||48<=n&&57>=n||58==n||46==n||95==n||45==n)&&35!=n){if(b)throw new E(new Ne("Invalid character in entity: "+String.fromCodePoint(n),a,c));h.b+=String.fromCodePoint(38);n=c-l;h.b+=null==n?B.substr(a,l,null):B.substr(a,l,n);--c;l=c+1;f=t}}n=a.charCodeAt(++c)}1==f&&(l=c,f=13);if(13==f){if(0==d.nodeType){if(d.nodeType!=fa.Element)throw new E("Bad node type, expected Element but found "+ea.toString(d.nodeType));throw new E(new Ne("Unclosed node <"+
d.nodeName+">",a,c));}if(c!=l||0==m)b=c-l,h.b+=null==b?B.substr(a,l,null):B.substr(a,l,b),d.addChild(fa.createPCData(h.b));return c}if(!b&&18==f&&13==t)return h.b+=String.fromCodePoint(38),b=c-l,h.b+=null==b?B.substr(a,l,null):B.substr(a,l,b),d.addChild(fa.createPCData(h.b)),c;throw new E(new Ne("Unexpected end",a,c));};var Ek=function(a){this.output=new bd;this.pretty=a};h["haxe.xml.Printer"]=Ek;Ek.__name__="haxe.xml.Printer";Ek.print=function(a,b){null==b&&(b=!1);b=new Ek(b);b.writeNode(a,"");return b.output.b};
Ek.prototype={output:null,pretty:null,writeNode:function(a,b){switch(a.nodeType){case 0:this.output.b+=K.string(b+"<");if(a.nodeType!=fa.Element)throw new E("Bad node type, expected Element but found "+ea.toString(a.nodeType));this.output.b+=K.string(a.nodeName);for(var c=a.attributes();c.hasNext();){var d=c.next();this.output.b+=K.string(" "+d+'="');d=ba.htmlEscape(a.get(d),!0);this.output.b+=K.string(d);this.output.b+='"'}if(this.hasChildren(a)){this.output.b+=">";this.pretty&&(this.output.b+="\n");
if(a.nodeType!=fa.Document&&a.nodeType!=fa.Element)throw new E("Bad node type, expected Element or Document but found "+ea.toString(a.nodeType));for(c=B.iter(a.children);c.hasNext();)d=c.next(),this.writeNode(d,this.pretty?b+"\t":b);this.output.b+=K.string(b+"</");if(a.nodeType!=fa.Element)throw new E("Bad node type, expected Element but found "+ea.toString(a.nodeType));this.output.b+=K.string(a.nodeName);this.output.b+=">"}else this.output.b+="/>";this.pretty&&(this.output.b+="\n");break;case 1:if(a.nodeType==
fa.Document||a.nodeType==fa.Element)throw new E("Bad node type, unexpected "+ea.toString(a.nodeType));a=a.nodeValue;0!=a.length&&(b+=ba.htmlEscape(a),this.output.b+=K.string(b),this.pretty&&(this.output.b+="\n"));break;case 2:this.output.b+=K.string(b+"<![CDATA[");if(a.nodeType==fa.Document||a.nodeType==fa.Element)throw new E("Bad node type, unexpected "+ea.toString(a.nodeType));this.output.b+=K.string(a.nodeValue);this.output.b+="]]\x3e";this.pretty&&(this.output.b+="\n");break;case 3:if(a.nodeType==
fa.Document||a.nodeType==fa.Element)throw new E("Bad node type, unexpected "+ea.toString(a.nodeType));a=a.nodeValue;a=a.replace(/[\n\r\t]+/g,"");this.output.b+=null==b?"null":""+b;b=ba.trim("\x3c!--"+a+"--\x3e");this.output.b+=K.string(b);this.pretty&&(this.output.b+="\n");break;case 4:if(a.nodeType==fa.Document||a.nodeType==fa.Element)throw new E("Bad node type, unexpected "+ea.toString(a.nodeType));this.output.b+=K.string("<!DOCTYPE "+a.nodeValue+">");this.pretty&&(this.output.b+="\n");break;case 5:if(a.nodeType==
fa.Document||a.nodeType==fa.Element)throw new E("Bad node type, unexpected "+ea.toString(a.nodeType));this.output.b+=K.string("<?"+a.nodeValue+"?>");this.pretty&&(this.output.b+="\n");break;case 6:if(a.nodeType!=fa.Document&&a.nodeType!=fa.Element)throw new E("Bad node type, expected Element or Document but found "+ea.toString(a.nodeType));for(a=B.iter(a.children);a.hasNext();)c=a.next(),this.writeNode(c,b)}},hasChildren:function(a){if(a.nodeType!=fa.Document&&a.nodeType!=fa.Element)throw new E("Bad node type, expected Element or Document but found "+
ea.toString(a.nodeType));for(a=B.iter(a.children);a.hasNext();){var b=a.next();switch(b.nodeType){case 0:case 1:return!0;case 2:case 3:if(b.nodeType==fa.Document||b.nodeType==fa.Element)throw new E("Bad node type, unexpected "+ea.toString(b.nodeType));if(0!=ba.ltrim(b.nodeValue).length)return!0}}return!1},__class__:Ek};var gt=C["haxe.zip.ExtraField"]={__ename__:"haxe.zip.ExtraField",__constructs__:["FUnknown","FInfoZipUnicodePath","FUtf8"],FUnknown:(x=function(a,b){return{_hx_index:0,tag:a,bytes:b,
__enum__:"haxe.zip.ExtraField",toString:u}},x.__params__=["tag","bytes"],x),FInfoZipUnicodePath:(x=function(a,b){return{_hx_index:1,name:a,crc:b,__enum__:"haxe.zip.ExtraField",toString:u}},x.__params__=["name","crc"],x),FUtf8:{_hx_index:2,__enum__:"haxe.zip.ExtraField",toString:u}},Vn=C["haxe.zip.Huffman"]={__ename__:"haxe.zip.Huffman",__constructs__:["Found","NeedBit","NeedBits"],Found:(x=function(a){return{_hx_index:0,i:a,__enum__:"haxe.zip.Huffman",toString:u}},x.__params__=["i"],x),NeedBit:(x=
function(a,b){return{_hx_index:1,left:a,right:b,__enum__:"haxe.zip.Huffman",toString:u}},x.__params__=["left","right"],x),NeedBits:(x=function(a,b){return{_hx_index:2,n:a,table:b,__enum__:"haxe.zip.Huffman",toString:u}},x.__params__=["n","table"],x)},wq=function(){};h["haxe.zip.HuffTools"]=wq;wq.__name__="haxe.zip.HuffTools";wq.prototype={treeDepth:function(a){switch(a._hx_index){case 0:return 0;case 1:var b=a.right;a=this.treeDepth(a.left);b=this.treeDepth(b);return 1+(a<b?a:b);case 2:throw new E("assert");
}},treeCompress:function(a){var b=this.treeDepth(a);if(0==b)return a;if(1==b){if(1==a._hx_index)return b=a.right,Vn.NeedBit(this.treeCompress(a.left),this.treeCompress(b));throw new E("assert");}for(var c=[],d=0,e=1<<b;d<e;)d++,c.push(Vn.Found(-1));this.treeWalk(c,0,0,b,a);return Vn.NeedBits(b,c)},treeWalk:function(a,b,c,d,e){if(1==e._hx_index){var f=e.right,g=e.left;0<d?(this.treeWalk(a,b,c+1,d-1,g),this.treeWalk(a,b|1<<c,c+1,d-1,f)):a[b]=this.treeCompress(e)}else a[b]=this.treeCompress(e)},treeMake:function(a,
b,c,d){if(d>b)throw new E("Invalid huffman");var e=c<<5|d;if(a.h.hasOwnProperty(e))return Vn.Found(a.h[e]);c<<=1;++d;return Vn.NeedBit(this.treeMake(a,b,c,d),this.treeMake(a,b,c|1,d))},make:function(a,b,c,d){var e=[],f=[];if(32<d)throw new E("Invalid huffman");for(var g=0;g<d;)g++,e.push(0),f.push(0);for(g=0;g<c;){var k=g++;k=a[k+b];if(k>=d)throw new E("Invalid huffman");e[k]++}g=0;k=1;for(var l=d-1;k<l;){var m=k++;g=g+e[m]<<1;f[m]=g}e=new Wa;for(g=0;g<c;)k=g++,l=a[k+b],0!=l&&(m=f[l-1],f[l-1]=m+1,
e.h[m<<5|l]=k);return this.treeCompress(Vn.NeedBit(this.treeMake(e,d,0,1),this.treeMake(e,d,1,1)))},__class__:wq};var xq=function(a){this.buffer=new hb(new ArrayBuffer(65536));this.pos=0;a&&(this.crc=new Bj)};h["haxe.zip._InflateImpl.Window"]=xq;xq.__name__="haxe.zip._InflateImpl.Window";xq.prototype={buffer:null,pos:null,crc:null,slide:function(){null!=this.crc&&this.crc.update(this.buffer,0,32768);var a=new hb(new ArrayBuffer(65536));this.pos-=32768;a.blit(0,this.buffer,32768,this.pos);this.buffer=
a},addBytes:function(a,b,c){65536<this.pos+c&&this.slide();this.buffer.blit(this.pos,a,b,c);this.pos+=c},addByte:function(a){65536==this.pos&&this.slide();this.buffer.b[this.pos]=a&255;this.pos++},getLastChar:function(){return this.buffer.b[this.pos-1]},available:function(){return this.pos},checksum:function(){null!=this.crc&&this.crc.update(this.buffer,0,this.pos);return this.crc},__class__:xq};var Hf=C["haxe.zip._InflateImpl.State"]={__ename__:"haxe.zip._InflateImpl.State",__constructs__:"Head Block CData Flat Crc Dist DistOne Done".split(" "),
Head:{_hx_index:0,__enum__:"haxe.zip._InflateImpl.State",toString:u},Block:{_hx_index:1,__enum__:"haxe.zip._InflateImpl.State",toString:u},CData:{_hx_index:2,__enum__:"haxe.zip._InflateImpl.State",toString:u},Flat:{_hx_index:3,__enum__:"haxe.zip._InflateImpl.State",toString:u},Crc:{_hx_index:4,__enum__:"haxe.zip._InflateImpl.State",toString:u},Dist:{_hx_index:5,__enum__:"haxe.zip._InflateImpl.State",toString:u},DistOne:{_hx_index:6,__enum__:"haxe.zip._InflateImpl.State",toString:u},Done:{_hx_index:7,
__enum__:"haxe.zip._InflateImpl.State",toString:u}},gf=function(a,b,c){null==c&&(c=!0);null==b&&(b=!0);this.isFinal=!1;this.htools=new wq;this.huffman=this.buildFixedHuffman();this.huffdist=null;this.dist=this.len=0;this.state=b?Hf.Head:Hf.Block;this.input=a;this.needed=this.nbits=this.bits=0;this.output=null;this.outpos=0;this.lengths=[];this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);
this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.lengths.push(-1);this.window=new xq(c)};h["haxe.zip.InflateImpl"]=gf;gf.__name__="haxe.zip.InflateImpl";gf.prototype={nbits:null,bits:null,state:null,isFinal:null,huffman:null,huffdist:null,htools:null,len:null,dist:null,needed:null,output:null,outpos:null,input:null,lengths:null,
window:null,buildFixedHuffman:function(){if(null!=gf.FIXED_HUFFMAN)return gf.FIXED_HUFFMAN;for(var a=[],b=0;288>b;){var c=b++;a.push(143>=c?8:255>=c?9:279>=c?7:8)}gf.FIXED_HUFFMAN=this.htools.make(a,0,288,10);return gf.FIXED_HUFFMAN},readBytes:function(a,b,c){this.needed=c;this.outpos=b;this.output=a;if(0<c)for(;this.inflateLoop(););return c-this.needed},getBits:function(a){for(;this.nbits<a;)this.bits|=this.input.readByte()<<this.nbits,this.nbits+=8;var b=this.bits&(1<<a)-1;this.nbits-=a;this.bits>>=
a;return b},getBit:function(){0==this.nbits&&(this.nbits=8,this.bits=this.input.readByte());var a=1==(this.bits&1);this.nbits--;this.bits>>=1;return a},getRevBits:function(a){return 0==a?0:this.getBit()?1<<a-1|this.getRevBits(a-1):this.getRevBits(a-1)},resetBits:function(){this.nbits=this.bits=0},addBytes:function(a,b,c){this.window.addBytes(a,b,c);this.output.blit(this.outpos,a,b,c);this.needed-=c;this.outpos+=c},addByte:function(a){this.window.addByte(a);this.output.b[this.outpos]=a&255;this.needed--;
this.outpos++},addDistOne:function(a){for(var b=this.window.getLastChar(),c=0;c<a;)c++,this.addByte(b)},addDist:function(a,b){this.addBytes(this.window.buffer,this.window.pos-a,b)},applyHuffman:function(a){switch(a._hx_index){case 0:return a.i;case 1:var b=a.right;a=a.left;return this.applyHuffman(this.getBit()?b:a);case 2:return this.applyHuffman(a.table[this.getBits(a.n)])}},inflateLengths:function(a,b){for(var c=0,d=0;c<b;){var e=this.applyHuffman(this.huffman);switch(e){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:d=
e;a[c]=e;++c;break;case 16:e=c+3+this.getBits(2);if(e>b)throw new E("Invalid data");for(;c<e;)a[c]=d,++c;break;case 17:c+=3+this.getBits(3);if(c>b)throw new E("Invalid data");break;case 18:c+=11+this.getBits(7);if(c>b)throw new E("Invalid data");break;default:throw new E("Invalid data");}}},inflateLoop:function(){switch(this.state._hx_index){case 0:var a=this.input.readByte();if(8!=(a&15))throw new E("Invalid data");var b=this.input.readByte(),c=0!=(b&32);if(0!=((a<<8)+b)%31)throw new E("Invalid data");
if(c)throw new E("Unsupported dictionary");this.state=Hf.Block;return!0;case 1:switch(this.isFinal=this.getBit(),this.getBits(2)){case 0:this.len=this.input.readUInt16();if(this.input.readUInt16()!=65535-this.len)throw new E("Invalid data");this.state=Hf.Flat;a=this.inflateLoop();this.resetBits();return a;case 1:return this.huffman=this.buildFixedHuffman(),this.huffdist=null,this.state=Hf.CData,!0;case 2:a=this.getBits(5)+257;b=this.getBits(5)+1;c=this.getBits(4)+4;for(var d=0;d<c;){var e=d++;this.lengths[gf.CODE_LENGTHS_POS[e]]=
this.getBits(3)}for(;19>c;)d=c++,this.lengths[gf.CODE_LENGTHS_POS[d]]=0;this.huffman=this.htools.make(this.lengths,0,19,8);c=[];d=0;for(e=a+b;d<e;)d++,c.push(0);this.inflateLengths(c,a+b);this.huffdist=this.htools.make(c,a,b,16);this.huffman=this.htools.make(c,0,a,16);this.state=Hf.CData;return!0;default:throw new E("Invalid data");}case 2:b=this.applyHuffman(this.huffman);if(256>b)return this.addByte(b),0<this.needed;if(256==b)this.state=this.isFinal?Hf.Crc:Hf.Block;else{b-=257;a=gf.LEN_EXTRA_BITS_TBL[b];
if(-1==a)throw new E("Invalid data");this.len=gf.LEN_BASE_VAL_TBL[b]+this.getBits(a);b=null==this.huffdist?this.getRevBits(5):this.applyHuffman(this.huffdist);a=gf.DIST_EXTRA_BITS_TBL[b];if(-1==a)throw new E("Invalid data");this.dist=gf.DIST_BASE_VAL_TBL[b]+this.getBits(a);if(this.dist>this.window.available())throw new E("Invalid data");this.state=1==this.dist?Hf.DistOne:Hf.Dist}return!0;case 3:return a=this.len<this.needed?this.len:this.needed,b=this.input.read(a),this.len-=a,this.addBytes(b,0,a),
0==this.len&&(this.state=this.isFinal?Hf.Crc:Hf.Block),0<this.needed;case 4:a=this.window.checksum();if(null==a)return this.state=Hf.Done,!0;b=Bj.read(this.input);if(!a.equals(b))throw new E("Invalid CRC");this.state=Hf.Done;return!0;case 5:for(;0<this.len&&0<this.needed;)a=this.len<this.dist?this.len:this.dist,a=this.needed<a?this.needed:a,this.addDist(this.dist,a),this.len-=a;0==this.len&&(this.state=Hf.CData);return 0<this.needed;case 6:return a=this.len<this.needed?this.len:this.needed,this.addDistOne(a),
this.len-=a,0==this.len&&(this.state=Hf.CData),0<this.needed;case 7:return!1}},__class__:gf};var dl=function(a){this.i=a};h["haxe.zip.Reader"]=dl;dl.__name__="haxe.zip.Reader";dl.readZip=function(a){return(new dl(a)).read()};dl.prototype={i:null,readZipDate:function(){var a=this.i.readUInt16(),b=a>>11&31,c=a>>5&63;a&=31;var d=this.i.readUInt16();return new Date((d>>9)+1980,(d>>5&15)-1,d&31,b,c,a<<1)},readExtraFields:function(a){for(var b=new Sa;0<a;){if(4>a)throw new E("Invalid extra fields data");
var c=this.i.readUInt16(),d=this.i.readUInt16();if(a<d)throw new E("Invalid extra fields data");if(28789==c){var e=this.i.readByte();if(1!=e){var f=new bl;f.addByte(e);f.add(this.i.read(d-1));b.add(gt.FUnknown(c,f.getBytes()))}else c=this.i.readInt32(),e=this.i.read(d-5).toString(),b.add(gt.FInfoZipUnicodePath(e,c))}else b.add(gt.FUnknown(c,this.i.read(d)));a-=4+d}return b},readEntryHeader:function(){var a=this.i,b=a.readInt32();if(33639248==b||101010256==b)return null;if(67324752!=b)throw new E("Invalid Zip Data");
a.readUInt16();b=a.readUInt16();var c=0!=(b&2048);if(0!=(b&63473))throw new E("Unsupported flags "+b);var d=a.readUInt16(),e=0!=d;if(e&&8!=d)throw new E("Unsupported compression "+d);d=this.readZipDate();var f=a.readInt32(),g=a.readInt32(),k=a.readInt32(),l=a.readInt16(),m=a.readInt16();a=a.readString(l);m=this.readExtraFields(m);c&&m.push(gt.FUtf8);0!=(b&8)&&(f=null);return{fileName:a,fileSize:k,fileTime:d,compressed:e,dataSize:g,data:null,crc32:f,extraFields:m}},read:function(){for(var a=new Sa,
b=null;;){var c=this.readEntryHeader();if(null==c)break;if(null==c.crc32){if(c.compressed){null==b&&(b=new hb(new ArrayBuffer(65536)));for(var d=new bl,e=new gf(this.i,!1,!1);;){var f=e.readBytes(b,0,65536);d.addBytes(b,0,f);if(65536>f)break}c.data=d.getBytes()}else c.data=this.i.read(c.dataSize);c.crc32=this.i.readInt32();134695760==c.crc32&&(c.crc32=this.i.readInt32());c.dataSize=this.i.readInt32();c.fileSize=this.i.readInt32();c.dataSize=c.fileSize;c.compressed=!1}else c.data=this.i.read(c.dataSize);
a.add(c)}return a},__class__:dl};var Ni=C["hscript.Const"]={__ename__:"hscript.Const",__constructs__:["CInt","CFloat","CString"],CInt:(x=function(a){return{_hx_index:0,v:a,__enum__:"hscript.Const",toString:u}},x.__params__=["v"],x),CFloat:(x=function(a){return{_hx_index:1,f:a,__enum__:"hscript.Const",toString:u}},x.__params__=["f"],x),CString:(x=function(a){return{_hx_index:2,s:a,__enum__:"hscript.Const",toString:u}},x.__params__=["s"],x)},ub=C["hscript.Expr"]={__ename__:"hscript.Expr",__constructs__:"EConst EIdent EVar EParent EBlock EField EBinop EUnop ECall EIf EWhile EFor EBreak EContinue EFunction EReturn EArray EArrayDecl ENew EThrow ETry EObject ETernary ESwitch EDoWhile EMeta".split(" "),
EConst:(x=function(a){return{_hx_index:0,c:a,__enum__:"hscript.Expr",toString:u}},x.__params__=["c"],x),EIdent:(x=function(a){return{_hx_index:1,v:a,__enum__:"hscript.Expr",toString:u}},x.__params__=["v"],x),EVar:(x=function(a,b,c){return{_hx_index:2,n:a,t:b,e:c,__enum__:"hscript.Expr",toString:u}},x.__params__=["n","t","e"],x),EParent:(x=function(a){return{_hx_index:3,e:a,__enum__:"hscript.Expr",toString:u}},x.__params__=["e"],x),EBlock:(x=function(a){return{_hx_index:4,e:a,__enum__:"hscript.Expr",
toString:u}},x.__params__=["e"],x),EField:(x=function(a,b){return{_hx_index:5,e:a,f:b,__enum__:"hscript.Expr",toString:u}},x.__params__=["e","f"],x),EBinop:(x=function(a,b,c){return{_hx_index:6,op:a,e1:b,e2:c,__enum__:"hscript.Expr",toString:u}},x.__params__=["op","e1","e2"],x),EUnop:(x=function(a,b,c){return{_hx_index:7,op:a,prefix:b,e:c,__enum__:"hscript.Expr",toString:u}},x.__params__=["op","prefix","e"],x),ECall:(x=function(a,b){return{_hx_index:8,e:a,params:b,__enum__:"hscript.Expr",toString:u}},
x.__params__=["e","params"],x),EIf:(x=function(a,b,c){return{_hx_index:9,cond:a,e1:b,e2:c,__enum__:"hscript.Expr",toString:u}},x.__params__=["cond","e1","e2"],x),EWhile:(x=function(a,b){return{_hx_index:10,cond:a,e:b,__enum__:"hscript.Expr",toString:u}},x.__params__=["cond","e"],x),EFor:(x=function(a,b,c){return{_hx_index:11,v:a,it:b,e:c,__enum__:"hscript.Expr",toString:u}},x.__params__=["v","it","e"],x),EBreak:{_hx_index:12,__enum__:"hscript.Expr",toString:u},EContinue:{_hx_index:13,__enum__:"hscript.Expr",
toString:u},EFunction:(x=function(a,b,c,d){return{_hx_index:14,args:a,e:b,name:c,ret:d,__enum__:"hscript.Expr",toString:u}},x.__params__=["args","e","name","ret"],x),EReturn:(x=function(a){return{_hx_index:15,e:a,__enum__:"hscript.Expr",toString:u}},x.__params__=["e"],x),EArray:(x=function(a,b){return{_hx_index:16,e:a,index:b,__enum__:"hscript.Expr",toString:u}},x.__params__=["e","index"],x),EArrayDecl:(x=function(a){return{_hx_index:17,e:a,__enum__:"hscript.Expr",toString:u}},x.__params__=["e"],
x),ENew:(x=function(a,b){return{_hx_index:18,cl:a,params:b,__enum__:"hscript.Expr",toString:u}},x.__params__=["cl","params"],x),EThrow:(x=function(a){return{_hx_index:19,e:a,__enum__:"hscript.Expr",toString:u}},x.__params__=["e"],x),ETry:(x=function(a,b,c,d){return{_hx_index:20,e:a,v:b,t:c,ecatch:d,__enum__:"hscript.Expr",toString:u}},x.__params__=["e","v","t","ecatch"],x),EObject:(x=function(a){return{_hx_index:21,fl:a,__enum__:"hscript.Expr",toString:u}},x.__params__=["fl"],x),ETernary:(x=function(a,
b,c){return{_hx_index:22,cond:a,e1:b,e2:c,__enum__:"hscript.Expr",toString:u}},x.__params__=["cond","e1","e2"],x),ESwitch:(x=function(a,b,c){return{_hx_index:23,e:a,cases:b,defaultExpr:c,__enum__:"hscript.Expr",toString:u}},x.__params__=["e","cases","defaultExpr"],x),EDoWhile:(x=function(a,b){return{_hx_index:24,cond:a,e:b,__enum__:"hscript.Expr",toString:u}},x.__params__=["cond","e"],x),EMeta:(x=function(a,b,c){return{_hx_index:25,name:a,args:b,e:c,__enum__:"hscript.Expr",toString:u}},x.__params__=
["name","args","e"],x)},ht=C["hscript.CType"]={__ename__:"hscript.CType",__constructs__:["CTPath","CTFun","CTAnon","CTParent"],CTPath:(x=function(a,b){return{_hx_index:0,path:a,params:b,__enum__:"hscript.CType",toString:u}},x.__params__=["path","params"],x),CTFun:(x=function(a,b){return{_hx_index:1,args:a,ret:b,__enum__:"hscript.CType",toString:u}},x.__params__=["args","ret"],x),CTAnon:(x=function(a){return{_hx_index:2,fields:a,__enum__:"hscript.CType",toString:u}},x.__params__=["fields"],x),CTParent:(x=
function(a){return{_hx_index:3,t:a,__enum__:"hscript.CType",toString:u}},x.__params__=["t"],x)},Uf=C["hscript.Error"]={__ename__:"hscript.Error",__constructs__:"EInvalidChar EUnexpected EUnterminatedString EUnterminatedComment EUnknownVariable EInvalidIterator EInvalidOp EInvalidAccess".split(" "),EInvalidChar:(x=function(a){return{_hx_index:0,c:a,__enum__:"hscript.Error",toString:u}},x.__params__=["c"],x),EUnexpected:(x=function(a){return{_hx_index:1,s:a,__enum__:"hscript.Error",toString:u}},x.__params__=
["s"],x),EUnterminatedString:{_hx_index:2,__enum__:"hscript.Error",toString:u},EUnterminatedComment:{_hx_index:3,__enum__:"hscript.Error",toString:u},EUnknownVariable:(x=function(a){return{_hx_index:4,v:a,__enum__:"hscript.Error",toString:u}},x.__params__=["v"],x),EInvalidIterator:(x=function(a){return{_hx_index:5,v:a,__enum__:"hscript.Error",toString:u}},x.__params__=["v"],x),EInvalidOp:(x=function(a){return{_hx_index:6,op:a,__enum__:"hscript.Error",toString:u}},x.__params__=["op"],x),EInvalidAccess:(x=
function(a){return{_hx_index:7,f:a,__enum__:"hscript.Error",toString:u}},x.__params__=["f"],x)},Dj=C["hscript._Interp.Stop"]={__ename__:"hscript._Interp.Stop",__constructs__:["SBreak","SContinue","SReturn"],SBreak:{_hx_index:0,__enum__:"hscript._Interp.Stop",toString:u},SContinue:{_hx_index:1,__enum__:"hscript._Interp.Stop",toString:u},SReturn:(x=function(a){return{_hx_index:2,v:a,__enum__:"hscript._Interp.Stop",toString:u}},x.__params__=["v"],x)},Wn=function(){var a=this;this.variables=new ua;this.locals=
new ua;this.declared=[];var b=this.variables;null!=q["null"]?b.setReserved("null",null):b.h["null"]=null;b=this.variables;null!=q["true"]?b.setReserved("true",!0):b.h["true"]=!0;b=this.variables;null!=q["false"]?b.setReserved("false",!1):b.h["false"]=!1;b=this.variables;var c=function(b){th.trace(K.string(b),a.posInfos())};null!=q.trace?b.setReserved("trace",c):b.h.trace=c;this.initOps()};h["hscript.Interp"]=Wn;Wn.__name__="hscript.Interp";Wn.prototype={variables:null,locals:null,binops:null,depth:null,
inTry:null,declared:null,posInfos:function(){return{fileName:"hscript",lineNumber:0}},initOps:function(){var a=this,b=this.binops=new ua,c=function(b,c){return a.expr(b)+a.expr(c)};null!=q["+"]?b.setReserved("+",c):b.h["+"]=c;b=this.binops;c=function(b,c){return a.expr(b)-a.expr(c)};null!=q["-"]?b.setReserved("-",c):b.h["-"]=c;b=this.binops;c=function(b,c){return a.expr(b)*a.expr(c)};null!=q["*"]?b.setReserved("*",c):b.h["*"]=c;b=this.binops;c=function(b,c){return a.expr(b)/a.expr(c)};null!=q["/"]?
b.setReserved("/",c):b.h["/"]=c;b=this.binops;c=function(b,c){return a.expr(b)%a.expr(c)};null!=q["%"]?b.setReserved("%",c):b.h["%"]=c;b=this.binops;c=function(b,c){return a.expr(b)&a.expr(c)};null!=q["&"]?b.setReserved("&",c):b.h["&"]=c;b=this.binops;c=function(b,c){return a.expr(b)|a.expr(c)};null!=q["|"]?b.setReserved("|",c):b.h["|"]=c;b=this.binops;c=function(b,c){return a.expr(b)^a.expr(c)};null!=q["^"]?b.setReserved("^",c):b.h["^"]=c;b=this.binops;c=function(b,c){return a.expr(b)<<a.expr(c)};
null!=q["<<"]?b.setReserved("<<",c):b.h["<<"]=c;b=this.binops;c=function(b,c){return a.expr(b)>>a.expr(c)};null!=q[">>"]?b.setReserved(">>",c):b.h[">>"]=c;b=this.binops;c=function(b,c){return a.expr(b)>>>a.expr(c)};null!=q[">>>"]?b.setReserved(">>>",c):b.h[">>>"]=c;b=this.binops;c=function(b,c){return a.expr(b)==a.expr(c)};null!=q["=="]?b.setReserved("==",c):b.h["=="]=c;b=this.binops;c=function(b,c){return a.expr(b)!=a.expr(c)};null!=q["!="]?b.setReserved("!=",c):b.h["!="]=c;b=this.binops;c=function(b,
c){return a.expr(b)>=a.expr(c)};null!=q[">="]?b.setReserved(">=",c):b.h[">="]=c;b=this.binops;c=function(b,c){return a.expr(b)<=a.expr(c)};null!=q["<="]?b.setReserved("<=",c):b.h["<="]=c;b=this.binops;c=function(b,c){return a.expr(b)>a.expr(c)};null!=q[">"]?b.setReserved(">",c):b.h[">"]=c;b=this.binops;c=function(b,c){return a.expr(b)<a.expr(c)};null!=q["<"]?b.setReserved("<",c):b.h["<"]=c;b=this.binops;c=function(b,c){return 1!=a.expr(b)?1==a.expr(c):!0};null!=q["||"]?b.setReserved("||",c):b.h["||"]=
c;b=this.binops;c=function(b,c){return 1==a.expr(b)?1==a.expr(c):!1};null!=q["&&"]?b.setReserved("&&",c):b.h["&&"]=c;b=this.binops;c=v(this,this.assign);null!=q["="]?b.setReserved("=",c):b.h["="]=c;b=this.binops;c=function(b,c){return new V(a.expr(b),a.expr(c))};null!=q["..."]?b.setReserved("...",c):b.h["..."]=c;this.assignOp("+=",function(a,b){return a+b});this.assignOp("-=",function(a,b){return a-b});this.assignOp("*=",function(a,b){return a*b});this.assignOp("/=",function(a,b){return a/b});this.assignOp("%=",
function(a,b){return a%b});this.assignOp("&=",function(a,b){return a&b});this.assignOp("|=",function(a,b){return a|b});this.assignOp("^=",function(a,b){return a^b});this.assignOp("<<=",function(a,b){return a<<b});this.assignOp(">>=",function(a,b){return a>>b});this.assignOp(">>>=",function(a,b){return a>>>b})},assign:function(a,b){b=this.expr(b);switch(a._hx_index){case 1:a=a.v;var c=this.locals;c=null!=q[a]?c.getReserved(a):c.h[a];null==c?(c=this.variables,null!=q[a]?c.setReserved(a,b):c.h[a]=b):
c.r=b;break;case 5:c=a.f;b=this.set(this.expr(a.e),c,b);break;case 16:c=a.index;a=this.expr(a.e);c=this.expr(c);L.__implements(a,Qb)?L.__cast(a,Qb).set(c,b):a[c]=b;break;default:throw new E(Uf.EInvalidOp("="));}return b},assignOp:function(a,b){var c=this,d=this.binops,e=function(d,e){return c.evalAssignOp(a,b,d,e)};null!=q[a]?d.setReserved(a,e):d.h[a]=e},evalAssignOp:function(a,b,c,d){switch(c._hx_index){case 1:a=c.v;var e=this.locals;e=null!=q[a]?e.getReserved(a):e.h[a];b=b(this.expr(c),this.expr(d));
null==e?(d=this.variables,null!=q[a]?d.setReserved(a,b):d.h[a]=b):e.r=b;break;case 5:a=c.f;c=this.expr(c.e);b=b(this.get(c,a),this.expr(d));b=this.set(c,a,b);break;case 16:a=c.index;c=this.expr(c.e);a=this.expr(a);L.__implements(c,Qb)?(b=b(L.__cast(c,Qb).get(a),this.expr(d)),L.__cast(c,Qb).set(a,b)):(b=b(c[a],this.expr(d)),c[a]=b);break;default:throw new E(Uf.EInvalidOp(a));}return b},increment:function(a,b,c){switch(a._hx_index){case 1:var d=a.v;a=this.locals;var e=null!=q[d]?a.getReserved(d):a.h[d];
null==e?(a=this.variables,a=null!=q[d]?a.getReserved(d):a.h[d]):a=e.r;b?(a+=c,null==e?(c=this.variables,b=a,null!=q[d]?c.setReserved(d,b):c.h[d]=b):e.r=a):null==e?(b=this.variables,c=a+c,null!=q[d]?b.setReserved(d,c):b.h[d]=c):e.r=a+c;return a;case 5:return d=a.f,a=this.expr(a.e),e=this.get(a,d),b?(e+=c,this.set(a,d,e)):this.set(a,d,e+c),e;case 16:e=a.index;d=this.expr(a.e);a=this.expr(e);if(L.__implements(d,Qb))return e=L.__cast(d,Qb).get(a),b?(e+=c,L.__cast(d,Qb).set(a,e)):L.__cast(d,Qb).set(a,
e+c),e;e=d[a];b?(e+=c,d[a]=e):d[a]=e+c;return e;default:throw new E(Uf.EInvalidOp(0<c?"++":"--"));}},execute:function(a){this.depth=0;this.locals=new ua;this.declared=[];return this.exprReturn(a)},exprReturn:function(a){try{return this.expr(a)}catch(b){if(ra.lastException=b,a=b instanceof E?b.val:b,L.__instanceof(a,Dj))switch(a._hx_index){case 0:throw new E("Invalid break");case 1:throw new E("Invalid continue");case 2:return a.v}else throw b;}},duplicate:function(a){for(var b=new ua,c=a.keys();c.hasNext();){var d=
c.next(),e=null!=q[d]?a.getReserved(d):a.h[d];null!=q[d]?b.setReserved(d,e):b.h[d]=e}return b},restore:function(a){for(;this.declared.length>a;){var b=this.declared.pop(),c=b.n;b=b.old;var d=this.locals;null!=q[c]?d.setReserved(c,b):d.h[c]=b}},edef:function(a){return a},error:function(a){throw new E(a);},resolve:function(a){var b=this.locals;b=null!=q[a]?b.getReserved(a):b.h[a];if(null!=b)return b.r;b=this.variables;b=null!=q[a]?b.getReserved(a):b.h[a];if(null==b){var c=this.variables;c=!(null!=q[a]?
c.existsReserved(a):c.h.hasOwnProperty(a))}else c=!1;if(c)throw new E(Uf.EUnknownVariable(a));return b},expr:function(a){var b=this;switch(a._hx_index){case 0:var c=a.c;switch(c._hx_index){case 0:return c.v;case 1:return c.f;case 2:return c.s}break;case 1:return this.resolve(a.v);case 2:var d=a.e,e=a.n,f=this.locals;this.declared.push({n:e,old:null!=q[e]?f.getReserved(e):f.h[e]});var g=this.locals,k={r:null==d?null:this.expr(d)};null!=q[e]?g.setReserved(e,k):g.h[e]=k;return null;case 3:return this.expr(a.e);
case 4:for(var l=a.e,m=this.declared.length,p=null,n=0;n<l.length;){var h=l[n];++n;p=this.expr(h)}this.restore(m);return p;case 5:var t=a.f;return this.get(this.expr(a.e),t);case 6:var r=a.e2,u=a.e1,x=a.op,w=this.binops,v=null!=q[x]?w.getReserved(x):w.h[x];if(null==v)throw new E(Uf.EInvalidOp(x));return v(u,r);case 7:var Q=a.e,C=a.prefix,J=a.op;switch(J){case "!":return 1!=this.expr(Q);case "++":return this.increment(Q,C,1);case "-":return-this.expr(Q);case "--":return this.increment(Q,C,-1);case "~":return~this.expr(Q);
default:throw new E(Uf.EInvalidOp(J));}case 8:for(var F=a.params,B=a.e,D=[],A=0;A<F.length;){var H=F[A];++A;D.push(this.expr(H))}if(5==B._hx_index){var I=B.f,G=this.expr(B.e);if(null==G)throw new E(Uf.EInvalidAccess(I));return this.fcall(G,I,D)}return this.call(null,this.expr(B),D);case 9:var K=a.e2,M=a.e1;return 1==this.expr(a.cond)?this.expr(M):null==K?null:this.expr(K);case 10:return this.whileLoop(a.cond,a.e),null;case 11:return this.forLoop(a.v,a.it,a.e),null;case 12:throw new E(Dj.SBreak);case 13:throw new E(Dj.SContinue);
case 14:for(var y=a.name,N=a.e,P=a.args,T=this.duplicate(this.locals),S=this,Pa=0,da=0;da<P.length;){var Ca=P[da];++da;Ca.opt||(Pa+=1)}var U=X.makeVarArgs(function(a){if(a.length!=P.length){if(a.length<Pa)throw a="Invalid number of parameters. Got "+a.length+", required "+Pa,null!=y&&(a+=" for function '"+y+"'"),new E(a);for(var c=[],d=a.length-Pa,e=0,f=0;f<P.length;){var g=P[f];++f;g.opt?0<d?(c.push(a[e++]),--d):c.push(null):c.push(a[e++])}a=c}c=S.locals;d=S.depth;S.depth++;S.locals=S.duplicate(T);
e=0;for(f=P.length;e<f;){var k=e++;g=P[k].name;var l=S.locals;k={r:a[k]};null!=q[g]?l.setReserved(g,k):l.h[g]=k}a=null;if(b.inTry)try{a=S.exprReturn(N)}catch(bt){throw ra.lastException=bt,a=bt instanceof E?bt.val:bt,S.locals=c,S.depth=d,E.wrap(a);}else a=S.exprReturn(N);S.locals=c;S.depth=d;return a});if(null!=y)if(0==this.depth){var W=this.variables;null!=q[y]?W.setReserved(y,U):W.h[y]=U}else{var Z=this.declared,aa=this.locals,O=null!=q[y]?aa.getReserved(y):aa.h[y];Z.push({n:y,old:O});var ba={r:U},
Y=this.locals;null!=q[y]?Y.setReserved(y,ba):Y.h[y]=ba;null!=q[y]?T.setReserved(y,ba):T.h[y]=ba}return U;case 15:var R=a.e;throw new E(Dj.SReturn(null==R?null:this.expr(R)));case 16:var V=a.index,ea=this.expr(a.e),ia=this.expr(V);return L.__implements(ea,Qb)?L.__cast(ea,Qb).get(ia):ea[ia];case 17:var ha=a.e;if(0<ha.length){var cc=ha[0];var ca=6==cc._hx_index?"=>"==cc.op:!1}else ca=!1;if(ca){for(var De=!0,ma=!0,la=!0,ka=!0,ja=[],oa=[],na=0;na<ha.length;){var pa=ha[na];++na;if(6==pa._hx_index)if("=>"==
pa.op){var fa=pa.e2,qa=this.expr(pa.e1),va=this.expr(fa);De=De&&"string"==typeof qa;ma=ma&&"number"==typeof qa&&(qa|0)===qa;la=la&&X.isObject(qa);ka=ka&&X.isEnumValue(qa);ja.push(qa);oa.push(va)}else throw new E("=> expected");else throw new E("=> expected");}if(ma)var Ed=new Wa;else if(De)Ed=new ua;else if(ka)Ed=new Cj;else if(la)Ed=new Aa;else throw new E("Inconsistent key types");for(var Sa=0,xa=ja.length;Sa<xa;){var ya=Sa++;L.__cast(Ed,Qb).set(ja[ya],oa[ya])}return Ed}for(var Lc=[],Ka=0;Ka<ha.length;){var sa=
ha[Ka];++Ka;Lc.push(this.expr(sa))}return Lc;case 18:for(var Wd=a.params,wa=a.cl,Ja=[],ta=0;ta<Wd.length;){var ed=Wd[ta];++ta;Ja.push(this.expr(ed))}return this.cnew(wa,Ja);case 19:throw E.wrap(this.expr(a.e));case 20:var pe=a.ecatch,za=a.v,Ba=a.e,Ea=this.declared.length,Ha=this.inTry;try{this.inTry=!0;var Ia=this.expr(Ba);this.restore(Ea);this.inTry=Ha;return Ia}catch(at){ra.lastException=at;var Fa=at instanceof E?at.val:at;if(L.__instanceof(Fa,Dj))throw this.inTry=Ha,new E(Fa);this.restore(Ea);
this.inTry=Ha;var Da=this.locals;this.declared.push({n:za,old:null!=q[za]?Da.getReserved(za):Da.h[za]});var Ga=this.locals,La={r:Fa};null!=q[za]?Ga.setReserved(za,La):Ga.h[za]=La;var Ua=this.expr(pe);this.restore(Ea);return Ua}case 21:for(var Na=a.fl,Ta={},Xa=0;Xa<Na.length;){var Ya=Na[Xa];++Xa;this.set(Ta,Ya.name,this.expr(Ya.e))}return Ta;case 22:var $a=a.e2,Oa=a.e1;return 1==this.expr(a.cond)?this.expr(Oa):this.expr($a);case 23:for(var bb=a.defaultExpr,Va=a.cases,Qa=this.expr(a.e),Ra=!1,Ma=0;Ma<
Va.length;){var Za=Va[Ma];++Ma;for(var ab=0,rb=Za.values;ab<rb.length;){var db=rb[ab];++ab;if(this.expr(db)==Qa){Ra=!0;break}}if(Ra){Qa=this.expr(Za.expr);break}}Ra||(Qa=null==bb?null:this.expr(bb));return Qa;case 24:return this.doWhileLoop(a.cond,a.e),null;case 25:return this.expr(a.e)}},doWhileLoop:function(a,b){var c=this.declared.length;a:for(;;){try{this.expr(b)}catch(e){ra.lastException=e;var d=e instanceof E?e.val:e;if(L.__instanceof(d,Dj))switch(d._hx_index){case 0:break a;case 2:throw new E(d);
}else throw e;}if(1!=this.expr(a))break}this.restore(c)},whileLoop:function(a,b){var c=this.declared.length;a:for(;1==this.expr(a);)try{this.expr(b)}catch(e){ra.lastException=e;var d=e instanceof E?e.val:e;if(L.__instanceof(d,Dj))switch(d._hx_index){case 0:break a;case 2:throw new E(d);}else throw e;}this.restore(c)},makeIterator:function(a){try{a=O(a)}catch(b){ra.lastException=b}if(null==a.hasNext||null==a.next)throw new E(Uf.EInvalidIterator(a));return a},forLoop:function(a,b,c){var d=this.declared.length,
e=this.locals;this.declared.push({n:a,old:null!=q[a]?e.getReserved(a):e.h[a]});b=this.makeIterator(this.expr(b));a:for(;b.hasNext();){var f=this.locals;e={r:b.next()};null!=q[a]?f.setReserved(a,e):f.h[a]=e;try{this.expr(c)}catch(g){if(ra.lastException=g,e=g instanceof E?g.val:g,L.__instanceof(e,Dj))switch(e._hx_index){case 0:break a;case 2:throw new E(e);}else throw g;}}this.restore(d)},isMap:function(a){return L.__implements(a,Qb)},getMapValue:function(a,b){return L.__cast(a,Qb).get(b)},setMapValue:function(a,
b,c){L.__cast(a,Qb).set(b,c)},get:function(a,b){if(null==a)throw new E(Uf.EInvalidAccess(b));return X.getProperty(a,b)},set:function(a,b,c){if(null==a)throw new E(Uf.EInvalidAccess(b));X.setProperty(a,b,c);return c},fcall:function(a,b,c){return this.call(a,this.get(a,b),c)},call:function(a,b,c){return b.apply(a,c)},cnew:function(a,b){var c=h[a];null==c&&(c=this.resolve(a));return rb.createInstance(c,b)},__class__:Wn};var jb=C["hscript.Token"]={__ename__:"hscript.Token",__constructs__:"TEof TConst TId TOp TPOpen TPClose TBrOpen TBrClose TDot TComma TSemicolon TBkOpen TBkClose TQuestion TDoubleDot TMeta".split(" "),
TEof:{_hx_index:0,__enum__:"hscript.Token",toString:u},TConst:(x=function(a){return{_hx_index:1,c:a,__enum__:"hscript.Token",toString:u}},x.__params__=["c"],x),TId:(x=function(a){return{_hx_index:2,s:a,__enum__:"hscript.Token",toString:u}},x.__params__=["s"],x),TOp:(x=function(a){return{_hx_index:3,s:a,__enum__:"hscript.Token",toString:u}},x.__params__=["s"],x),TPOpen:{_hx_index:4,__enum__:"hscript.Token",toString:u},TPClose:{_hx_index:5,__enum__:"hscript.Token",toString:u},TBrOpen:{_hx_index:6,__enum__:"hscript.Token",
toString:u},TBrClose:{_hx_index:7,__enum__:"hscript.Token",toString:u},TDot:{_hx_index:8,__enum__:"hscript.Token",toString:u},TComma:{_hx_index:9,__enum__:"hscript.Token",toString:u},TSemicolon:{_hx_index:10,__enum__:"hscript.Token",toString:u},TBkOpen:{_hx_index:11,__enum__:"hscript.Token",toString:u},TBkClose:{_hx_index:12,__enum__:"hscript.Token",toString:u},TQuestion:{_hx_index:13,__enum__:"hscript.Token",toString:u},TDoubleDot:{_hx_index:14,__enum__:"hscript.Token",toString:u},TMeta:(x=function(a){return{_hx_index:15,
s:a,__enum__:"hscript.Token",toString:u}},x.__params__=["s"],x)},ii=function(){this.uid=0;this.line=1;this.opChars="+*/-=!><&|^%~";this.identChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";var a=[["%"],["*","/"],["+","-"],["<<",">>",">>>"],["|","&","^"],"== != > < >= <=".split(" "),["..."],["&&"],["||"],"= += -= *= /= %= <<= >>= >>>= |= &= ^= =>".split(" ")];this.opPriority=new ua;this.opRightAssoc=new ua;this.unops=new ua;for(var b=0,c=a.length;b<c;)for(var d=b++,e=0,f=a[d];e<
f.length;){var g=f[e];++e;var k=this.opPriority;null!=q[g]?k.setReserved(g,d):k.h[g]=d;9==d&&(k=this.opRightAssoc,null!=q[g]?k.setReserved(g,!0):k.h[g]=!0)}a=this.unops;null!=q["!"]?a.setReserved("!",!1):a.h["!"]=!1;a=this.unops;null!=q["++"]?a.setReserved("++",!0):a.h["++"]=!0;a=this.unops;null!=q["--"]?a.setReserved("--",!0):a.h["--"]=!0;a=this.unops;null!=q["-"]?a.setReserved("-",!1):a.h["-"]=!1;a=this.unops;null!=q["~"]?a.setReserved("~",!1):a.h["~"]=!1};h["hscript.Parser"]=ii;ii.__name__="hscript.Parser";
ii.prototype={line:null,opChars:null,identChars:null,opPriority:null,opRightAssoc:null,unops:null,allowJSON:null,allowTypes:null,allowMetadata:null,input:null,char:null,ops:null,idents:null,uid:null,tokens:null,error:function(a,b,c){throw new E(a);},invalidChar:function(a){throw new E(Uf.EInvalidChar(a));},parseString:function(a,b){null==b&&(b="hscript");this.uid=0;return this.parse(new Un(a),b)},parse:function(a,b){this.line=1;this.tokens=new vq;this.char=-1;this.input=a;this.ops=[];this.idents=
[];a=0;for(b=this.opChars.length;a<b;){var c=a++;this.ops[B.cca(this.opChars,c)]=!0}a=0;for(b=this.identChars.length;a<b;)c=a++,this.idents[B.cca(this.identChars,c)]=!0;for(a=[];;){b=this.token();if(b==jb.TEof)break;c=this.tokens;c.head=new zc(b,c.head);a.push(this.parseFullExpr())}return 1==a.length?a[0]:ub.EBlock(a)},unexpected:function(a){throw new E(Uf.EUnexpected(this.tokenString(a)));},push:function(a){var b=this.tokens;b.head=new zc(a,b.head)},ensure:function(a){var b=this.token();b!=a&&this.unexpected(b)},
getIdent:function(){var a=this.token();if(null==a)return this.unexpected(a),null;if(2==a._hx_index)return a.s;this.unexpected(a);return null},expr:function(a){return a},pmin:function(a){return 0},pmax:function(a){return 0},mk:function(a,b,c){return a},isBlock:function(a){switch(a._hx_index){case 2:return a=a.e,null!=a?this.isBlock(a):!1;case 4:return!0;case 6:return this.isBlock(a.e2);case 7:var b=a.e;return a.prefix?!1:this.isBlock(b);case 9:return b=a.e2,a=a.e1,null!=b?this.isBlock(b):this.isBlock(a);
case 10:return this.isBlock(a.e);case 11:return this.isBlock(a.e);case 14:return this.isBlock(a.e);case 15:return a=a.e,null!=a?this.isBlock(a):!1;case 20:return this.isBlock(a.ecatch);case 21:return!0;case 23:return!0;case 24:return this.isBlock(a.e);default:return!1}},parseFullExpr:function(){var a=this.parseExpr(),b=this.token();if(b!=jb.TSemicolon&&b!=jb.TEof)if(this.isBlock(a)){var c=this.tokens;c.head=new zc(b,c.head)}else this.unexpected(b);return a},parseObject:function(a){a=[];a:for(;;){var b=
this.token(),c=null;if(null==b)this.unexpected(b);else switch(b._hx_index){case 1:var d=b.c;this.allowJSON||this.unexpected(b);2==d._hx_index?c=d.s:this.unexpected(b);break;case 2:c=b.s;break;case 7:break a;default:this.unexpected(b)}b=this.token();b!=jb.TDoubleDot&&this.unexpected(b);a.push({name:c,e:this.parseExpr()});b=this.token();if(null==b)this.unexpected(b);else switch(b._hx_index){case 7:break a;case 9:break;default:this.unexpected(b)}}return this.parseExprNext(ub.EObject(a))},parseExpr:function(){var a=
this.token();if(null==a)return this.unexpected(a);switch(a._hx_index){case 1:return this.parseExprNext(ub.EConst(a.c));case 2:a=a.s;var b=this.parseStructure(a);null==b&&(b=ub.EIdent(a));return this.parseExprNext(b);case 3:b=a.s;var c=this.unops;return(null!=q[b]?c.existsReserved(b):c.h.hasOwnProperty(b))?this.makeUnop(b,this.parseExpr()):this.unexpected(a);case 4:return a=this.parseExpr(),b=this.token(),b!=jb.TPClose&&this.unexpected(b),this.parseExprNext(ub.EParent(a));case 6:a=this.token();if(null==
a)b=this.tokens,b.head=new zc(a,b.head);else switch(a._hx_index){case 1:b=a.c;if(this.allowJSON)if(2==b._hx_index){if(b=this.token(),c=this.tokens,c.head=new zc(b,c.head),c=this.tokens,c.head=new zc(a,c.head),null!=b&&14==b._hx_index)return this.parseExprNext(this.parseObject(0))}else b=this.tokens,b.head=new zc(a,b.head);else b=this.tokens,b.head=new zc(a,b.head);break;case 2:b=this.token();c=this.tokens;c.head=new zc(b,c.head);c=this.tokens;c.head=new zc(a,c.head);if(null!=b&&14==b._hx_index)return this.parseExprNext(this.parseObject(0));
break;case 7:return this.parseExprNext(ub.EObject([]));default:b=this.tokens,b.head=new zc(a,b.head)}for(b=[];;){b.push(this.parseFullExpr());a=this.token();if(a==jb.TBrClose)break;c=this.tokens;c.head=new zc(a,c.head)}return ub.EBlock(b);case 11:b=[];for(a=this.token();a!=jb.TBkClose;)c=this.tokens,c.head=new zc(a,c.head),b.push(this.parseExpr()),a=this.token(),a==jb.TComma&&(a=this.token());if(1==b.length)switch(b[0]._hx_index){case 10:return a="__a_"+this.uid++,a=ub.EBlock([ub.EVar(a,null,ub.EArrayDecl([])),
this.mapCompr(a,b[0]),ub.EIdent(a)]),this.parseExprNext(a);case 11:return a="__a_"+this.uid++,a=ub.EBlock([ub.EVar(a,null,ub.EArrayDecl([])),this.mapCompr(a,b[0]),ub.EIdent(a)]),this.parseExprNext(a);case 24:return a="__a_"+this.uid++,a=ub.EBlock([ub.EVar(a,null,ub.EArrayDecl([])),this.mapCompr(a,b[0]),ub.EIdent(a)]),this.parseExprNext(a)}return this.parseExprNext(ub.EArrayDecl(b));case 15:return b=a.s,this.allowMetadata?(a=this.parseMetaArgs(),ub.EMeta(b,a,this.parseExpr())):this.unexpected(a);default:return this.unexpected(a)}},
parseMetaArgs:function(){var a=this.token();if(a!=jb.TPOpen){var b=this.tokens;b.head=new zc(a,b.head);return null}b=[];a=this.token();if(a!=jb.TPClose){var c=this.tokens;c.head=new zc(a,c.head);a:for(;;)if(b.push(this.parseExpr()),a=this.token(),null==a)this.unexpected(a);else switch(a._hx_index){case 5:break a;case 9:break;default:this.unexpected(a)}}return b},mapCompr:function(a,b){switch(b._hx_index){case 3:a=ub.EParent(this.mapCompr(a,b.e));break;case 4:var c=b.e;a=1==c.length?ub.EBlock([this.mapCompr(a,
c[0])]):ub.ECall(ub.EField(ub.EIdent(a),"push"),[b]);break;case 9:c=b.e1;var d=b.cond;a=null==b.e2?ub.EIf(d,this.mapCompr(a,c),null):ub.ECall(ub.EField(ub.EIdent(a),"push"),[b]);break;case 10:a=ub.EWhile(b.cond,this.mapCompr(a,b.e));break;case 11:a=ub.EFor(b.v,b.it,this.mapCompr(a,b.e));break;case 24:a=ub.EDoWhile(b.cond,this.mapCompr(a,b.e));break;default:a=ub.ECall(ub.EField(ub.EIdent(a),"push"),[b])}return a},makeUnop:function(a,b){switch(b._hx_index){case 6:var c=b.e2;return ub.EBinop(b.op,this.makeUnop(a,
b.e1),c);case 22:c=b.e2;var d=b.e1;return ub.ETernary(this.makeUnop(a,b.cond),d,c);default:return ub.EUnop(a,!0,b)}},makeBinop:function(a,b,c){switch(c._hx_index){case 6:var d=c.e2,e=c.e1,f=c.op;var g=this.opPriority;g=null!=q[a]?g.getReserved(a):g.h[a];var k=this.opPriority;g<=(null!=q[f]?k.getReserved(f):k.h[f])?(g=this.opRightAssoc,g=!(null!=q[a]?g.existsReserved(a):g.h.hasOwnProperty(a))):g=!1;return g?ub.EBinop(f,this.makeBinop(a,b,e),d):ub.EBinop(a,b,c);case 22:return d=c.e2,e=c.e1,f=c.cond,
g=this.opRightAssoc,(null!=q[a]?g.existsReserved(a):g.h.hasOwnProperty(a))?ub.EBinop(a,b,c):ub.ETernary(this.makeBinop(a,b,f),e,d);default:return ub.EBinop(a,b,c)}},parseStructure:function(a){switch(a){case "break":return ub.EBreak;case "continue":return ub.EContinue;case "do":a=this.parseExpr();var b=this.token();null==b?this.unexpected(b):2==b._hx_index?"while"!=b.s&&this.unexpected(b):this.unexpected(b);b=this.parseExpr();return ub.EDoWhile(b,a);case "else":return this.unexpected(jb.TId(a));case "for":a=
this.token();a!=jb.TPOpen&&this.unexpected(a);a=this.getIdent();b=this.token();rb.enumEq(b,jb.TId("in"))||this.unexpected(b);b=this.parseExpr();var c=this.token();c!=jb.TPClose&&this.unexpected(c);c=this.parseExpr();return ub.EFor(a,b,c);case "function":b=this.token();a=null;null==b?(c=this.tokens,c.head=new zc(b,c.head)):2==b._hx_index?a=b.s:(c=this.tokens,c.head=new zc(b,c.head));b=this.token();b!=jb.TPOpen&&this.unexpected(b);c=[];b=this.token();if(b!=jb.TPClose)for(var d=!1;!d;){var e=null,f=
!1;null!=b&&13==b._hx_index&&(f=!0,b=this.token());null==b?this.unexpected(b):2==b._hx_index?e=b.s:this.unexpected(b);b=this.token();e={name:e};c.push(e);f&&(e.opt=!0);b==jb.TDoubleDot&&this.allowTypes&&(e.t=this.parseType(),b=this.token());if(null==b)this.unexpected(b);else switch(b._hx_index){case 5:d=!0;break;case 9:b=this.token();break;default:this.unexpected(b)}}d=null;this.allowTypes&&(b=this.token(),b!=jb.TDoubleDot?(f=this.tokens,f.head=new zc(b,f.head)):d=this.parseType());b=this.parseExpr();
return ub.EFunction(c,b,a,d);case "if":return a=this.token(),a!=jb.TPOpen&&this.unexpected(a),a=this.parseExpr(),b=this.token(),b!=jb.TPClose&&this.unexpected(b),b=this.parseExpr(),c=null,d=!1,f=this.token(),f==jb.TSemicolon&&(d=!0,f=this.token()),rb.enumEq(f,jb.TId("else"))?c=this.parseExpr():(e=this.tokens,e.head=new zc(f,e.head),d&&(d=this.tokens,d.head=new zc(jb.TSemicolon,d.head))),ub.EIf(a,b,c);case "new":a=[];a.push(this.getIdent());for(b=!0;b;)if(c=this.token(),null==c)this.unexpected(c);
else switch(c._hx_index){case 4:b=!1;break;case 8:a.push(this.getIdent());break;default:this.unexpected(c)}b=this.parseExprList(jb.TPClose);return ub.ENew(a.join("."),b);case "return":return a=this.token(),b=this.tokens,b.head=new zc(a,b.head),a=a==jb.TSemicolon?null:this.parseExpr(),ub.EReturn(a);case "switch":a=this.parseExpr();c=null;b=[];d=this.token();d!=jb.TBrOpen&&this.unexpected(d);a:for(;;)if(d=this.token(),null==d)this.unexpected(d);else switch(d._hx_index){case 2:switch(d.s){case "case":f=
{values:[],expr:null};b.push(f);b:for(;;)if(d=this.parseExpr(),f.values.push(d),d=this.token(),null==d)this.unexpected(d);else switch(d._hx_index){case 9:break;case 14:break b;default:this.unexpected(d)}e=[];b:for(;;){d=this.token();var g=this.tokens;g.head=new zc(d,g.head);if(null==d)e.push(this.parseFullExpr());else switch(d._hx_index){case 2:switch(d.s){case "case":case "default":break b;default:e.push(this.parseFullExpr())}break;case 7:break b;default:e.push(this.parseFullExpr())}}f.expr=1==e.length?
e[0]:0==e.length?ub.EBlock([]):ub.EBlock(e);break;case "default":null!=c&&this.unexpected(d);c=this.token();c!=jb.TDoubleDot&&this.unexpected(c);c=[];b:for(;;)if(d=this.token(),f=this.tokens,f.head=new zc(d,f.head),null==d)c.push(this.parseFullExpr());else switch(d._hx_index){case 2:switch(d.s){case "case":case "default":break b;default:c.push(this.parseFullExpr())}break;case 7:break b;default:c.push(this.parseFullExpr())}c=1==c.length?c[0]:0==c.length?ub.EBlock([]):ub.EBlock(c);break;default:this.unexpected(d)}break;
case 7:break a;default:this.unexpected(d)}return ub.ESwitch(a,b,c);case "throw":return a=this.parseExpr(),ub.EThrow(a);case "try":return a=this.parseExpr(),d=this.token(),rb.enumEq(d,jb.TId("catch"))||this.unexpected(d),b=this.token(),b!=jb.TPOpen&&this.unexpected(b),b=this.getIdent(),c=this.token(),c!=jb.TDoubleDot&&this.unexpected(c),c=null,this.allowTypes?c=this.parseType():(d=this.token(),rb.enumEq(d,jb.TId("Dynamic"))||this.unexpected(d)),d=this.token(),d!=jb.TPClose&&this.unexpected(d),d=this.parseExpr(),
ub.ETry(a,b,c,d);case "var":return a=this.getIdent(),b=this.token(),c=null,b==jb.TDoubleDot&&this.allowTypes&&(c=this.parseType(),b=this.token()),d=null,rb.enumEq(b,jb.TOp("="))?d=this.parseExpr():(f=this.tokens,f.head=new zc(b,f.head)),ub.EVar(a,c,d);case "while":return a=this.parseExpr(),b=this.parseExpr(),ub.EWhile(a,b);default:return null}},parseExprNext:function(a){var b=this.token();if(null==b){var c=this.tokens;c.head=new zc(b,c.head);return a}switch(b._hx_index){case 3:c=b.s;var d=this.unops;
return(null!=q[c]?d.getReserved(c):d.h[c])?this.isBlock(a)||3==a._hx_index?(c=this.tokens,c.head=new zc(b,c.head),a):this.parseExprNext(ub.EUnop(c,!1,a)):this.makeBinop(c,a,this.parseExpr());case 4:return this.parseExprNext(ub.ECall(a,this.parseExprList(jb.TPClose)));case 8:return b=this.getIdent(),this.parseExprNext(ub.EField(a,b));case 11:return b=this.parseExpr(),c=this.token(),c!=jb.TBkClose&&this.unexpected(c),this.parseExprNext(ub.EArray(a,b));case 13:return b=this.parseExpr(),c=this.token(),
c!=jb.TDoubleDot&&this.unexpected(c),c=this.parseExpr(),ub.ETernary(a,b,c);default:return c=this.tokens,c.head=new zc(b,c.head),a}},parseType:function(){var a=this.token();if(null==a)return this.unexpected(a);switch(a._hx_index){case 2:for(var b=[a.s];;){a=this.token();if(a!=jb.TDot)break;b.push(this.getIdent())}var c=null;if(null==a){var d=this.tokens;d.head=new zc(a,d.head)}else if(3==a._hx_index)if("<"==a.s)a:for(c=[];;){c.push(this.parseType());a=this.token();if(null!=a)switch(a._hx_index){case 3:d=
a.s;if(">"==d)break a;if(62==B.cca(d,0)){a=this.tokens;a.head=new zc(jb.TOp(B.substr(d,1,null)),a.head);break a}break;case 9:continue}this.unexpected(a)}else d=this.tokens,d.head=new zc(a,d.head);else d=this.tokens,d.head=new zc(a,d.head);return this.parseTypeNext(ht.CTPath(b,c));case 4:return b=this.parseType(),c=this.token(),c!=jb.TPClose&&this.unexpected(c),this.parseTypeNext(ht.CTParent(b));case 6:b=[];c=null;a:for(;;)if(a=this.token(),null==a)this.unexpected(a);else switch(a._hx_index){case 2:a=
a.s;if("var"==a)a=this.getIdent(),d=this.token(),d!=jb.TDoubleDot&&this.unexpected(d),b.push({name:a,t:this.parseType(),meta:c}),c=null,a=this.token(),a!=jb.TSemicolon&&this.unexpected(a);else if(d=this.token(),d!=jb.TDoubleDot&&this.unexpected(d),b.push({name:a,t:this.parseType(),meta:c}),a=this.token(),null==a)this.unexpected(a);else switch(a._hx_index){case 7:break a;case 9:break;default:this.unexpected(a)}break;case 7:break a;case 15:a=a.s;null==c&&(c=[]);c.push({name:a,params:this.parseMetaArgs()});
break;default:this.unexpected(a)}return this.parseTypeNext(ht.CTAnon(b));default:return this.unexpected(a)}},parseTypeNext:function(a){var b=this.token();if(null==b){var c=this.tokens;c.head=new zc(b,c.head);return a}if(3==b._hx_index){if("->"!=b.s)return c=this.tokens,c.head=new zc(b,c.head),a}else return c=this.tokens,c.head=new zc(b,c.head),a;b=this.parseType();return 1==b._hx_index?(b.args.unshift(a),b):ht.CTFun([a],b)},parseExprList:function(a){var b=[],c=this.token();if(c==a)return b;var d=
this.tokens;for(d.head=new zc(c,d.head);;)if(b.push(this.parseExpr()),c=this.token(),null==c){if(c==a)break;this.unexpected(c)}else if(9!=c._hx_index){if(c==a)break;this.unexpected(c)}return b},incPos:function(){},readChar:function(){try{return this.input.readByte()}catch(a){return ra.lastException=a,0}},readString:function(a){for(var b=0,c=new Tn,d=!1,e=this.line,f=this.input;;){try{b=f.readByte()}catch(m){throw ra.lastException=m,this.line=e,new E(Uf.EUnterminatedString);}if(d)switch(d=!1,b){case 34:case 39:case 92:c.writeByte(b);
break;case 47:this.allowJSON?c.writeByte(b):this.invalidChar(b);break;case 110:c.writeByte(10);break;case 114:c.writeByte(13);break;case 116:c.writeByte(9);break;case 117:this.allowJSON||this.invalidChar(b);var g=null;try{g=f.readString(4)}catch(m){throw ra.lastException=m,this.line=e,new E(Uf.EUnterminatedString);}var k=0;k<<=4;var l=B.cca(g,0);if(null==l)this.invalidChar(l);else switch(l){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:k+=l-48;break;case 65:case 66:case 67:case 68:case 69:case 70:k+=
l-55;break;case 97:case 98:case 99:case 100:case 101:case 102:k+=l-87;break;default:this.invalidChar(l)}k<<=4;l=B.cca(g,1);if(null==l)this.invalidChar(l);else switch(l){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:k+=l-48;break;case 65:case 66:case 67:case 68:case 69:case 70:k+=l-55;break;case 97:case 98:case 99:case 100:case 101:case 102:k+=l-87;break;default:this.invalidChar(l)}k<<=4;l=B.cca(g,2);if(null==l)this.invalidChar(l);else switch(l){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:k+=
l-48;break;case 65:case 66:case 67:case 68:case 69:case 70:k+=l-55;break;case 97:case 98:case 99:case 100:case 101:case 102:k+=l-87;break;default:this.invalidChar(l)}k<<=4;g=B.cca(g,3);if(null==g)this.invalidChar(g);else switch(g){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:k+=g-48;break;case 65:case 66:case 67:case 68:case 69:case 70:k+=g-55;break;case 97:case 98:case 99:case 100:case 101:case 102:k+=g-87;break;default:this.invalidChar(g)}127>=k?c.writeByte(k):
(2047>=k?c.writeByte(192|k>>6):(c.writeByte(224|k>>12),c.writeByte(128|k>>6&63)),c.writeByte(128|k&63));break;default:this.invalidChar(b)}else if(92==b)d=!0;else if(b==a)break;else 10==b&&this.line++,c.writeByte(b)}return c.getBytes().toString()},token:function(){if(null!=this.tokens.head){var a=this.tokens,b=a.head;if(null==b)return null;a.head=b.next;return b.elt}0>this.char?a=this.readChar():(a=this.char,this.char=-1);for(;;){switch(a){case 0:return jb.TEof;case 10:this.line++;break;case 9:case 13:case 32:break;
case 34:return jb.TConst(Ni.CString(this.readString(34)));case 39:return jb.TConst(Ni.CString(this.readString(39)));case 40:return jb.TPOpen;case 41:return jb.TPClose;case 44:return jb.TComma;case 46:switch(a=this.readChar(),a){case 46:return a=this.readChar(),46!=a&&this.invalidChar(a),jb.TOp("...");case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:b=a-48;for(var c=1;;)switch(a=this.readChar(),c*=10,a){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:b=
10*b+(a-48);break;default:return this.char=a,jb.TConst(Ni.CFloat(b/c))}default:return this.char=a,jb.TDot}case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:for(b=1*(a-48),c=0;;)switch(a=this.readChar(),c*=10,a){case 46:if(0<c){if(10==c&&46==this.readChar())return a=this.tokens,a.head=new zc(jb.TOp("..."),a.head),a=b|0,jb.TConst(a==b?Ni.CInt(a):Ni.CFloat(b));this.invalidChar(a)}c=1;break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:b=
10*b+(a-48);break;case 120:for((0<b||0<c)&&this.invalidChar(a),b=0;;)switch(a=this.readChar(),a){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:b=(b<<4)+a-48;break;case 65:case 66:case 67:case 68:case 69:case 70:b=(b<<4)+(a-55);break;case 97:case 98:case 99:case 100:case 101:case 102:b=(b<<4)+(a-87);break;default:return this.char=a,jb.TConst(Ni.CInt(b))}default:return this.char=a,a=b|0,jb.TConst(0<c?Ni.CFloat(10*b/c):a==b?Ni.CInt(a):Ni.CFloat(b))}case 58:return jb.TDoubleDot;
case 59:return jb.TSemicolon;case 61:a=this.readChar();if(61==a)return jb.TOp("==");if(62==a)return jb.TOp("=>");this.char=a;return jb.TOp("=");case 63:return jb.TQuestion;case 64:a=this.readChar();if(this.idents[a]||58==a)for(b=String.fromCodePoint(a);;){a=this.readChar();if(!this.idents[a])return this.char=a,jb.TMeta(b);b+=String.fromCodePoint(a)}this.invalidChar(a);break;case 91:return jb.TBkOpen;case 93:return jb.TBkClose;case 123:return jb.TBrOpen;case 125:return jb.TBrClose;default:if(this.ops[a])for(b=
String.fromCodePoint(a),c=-1;;){a=this.readChar();if(!this.ops[a]||61==c){if(47==B.cca(b,0))return this.tokenComment(b,a);this.char=a;return jb.TOp(b)}c=a;b+=String.fromCodePoint(a)}if(this.idents[a])for(b=String.fromCodePoint(a);;){a=this.readChar();if(!this.idents[a])return this.char=a,jb.TId(b);b+=String.fromCodePoint(a)}this.invalidChar(a)}a=this.readChar()}},tokenComment:function(a,b){var c=B.cca(a,1),d=this.input;if(47==c){try{for(;13!=b&&10!=b;)b=d.readByte();this.char=b}catch(e){ra.lastException=
e}return this.token()}if(42==c){c=this.line;if("/**/"==a)return this.char=b,this.token();try{for(;;){for(;42!=b;)10==b&&this.line++,b=d.readByte();b=d.readByte();if(47==b)break}}catch(e){throw ra.lastException=e,this.line=c,new E(Uf.EUnterminatedComment);}return this.token()}this.char=b;return jb.TOp(a)},constString:function(a){switch(a._hx_index){case 0:return a=a.v,null==a?"null":""+a;case 1:return a=a.f,null==a?"null":""+a;case 2:return a.s}},tokenString:function(a){switch(a._hx_index){case 0:return"<eof>";
case 1:return this.constString(a.c);case 2:return a.s;case 3:return a.s;case 4:return"(";case 5:return")";case 6:return"{";case 7:return"}";case 8:return".";case 9:return",";case 10:return";";case 11:return"[";case 12:return"]";case 13:return"?";case 14:return":";case 15:return"@"+a.s}},__class__:ii};var E=function(a){Error.call(this);this.val=a;Error.captureStackTrace&&Error.captureStackTrace(this,E)};h["js._Boot.HaxeError"]=E;E.__name__="js._Boot.HaxeError";E.wrap=function(a){return a instanceof
Error?a:new E(a)};E.__super__=Error;E.prototype=w(Error.prototype,{val:null,__class__:E});var L=function(){};h["js.Boot"]=L;L.__name__="js.Boot";L.getClass=function(a){if(null==a)return null;if(a instanceof Array)return Array;var b=a.__class__;if(null!=b)return b;a=L.__nativeClassName(a);return null!=a?L.__resolveNativeClass(a):null};L.__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 "function":return"<function>";
case "object":if(a.__enum__){var d=C[a.__enum__];c=d.__constructs__[a._hx_index];var e=d[c];if(e.__params__){b+="\t";d=[];var f=0;for(e=e.__params__;f<e.length;){var g=e[f];f+=1;d.push(L.__string_rec(a[g],b))}return c+"("+d.join(",")+")"}return c}if(a instanceof Array){c="[";b+="\t";d=0;for(f=a.length;d<f;)e=d++,c+=(0<e?",":"")+L.__string_rec(a[e],b);return c+"]"}try{d=a.toString}catch(k){return ra.lastException=k,"???"}if(null!=d&&d!=Object.toString&&"function"==typeof d&&(c=a.toString(),"[object Object]"!=
c))return c;c="{\n";b+="\t";d=null!=a.hasOwnProperty;f=null;for(f in a)d&&!a.hasOwnProperty(f)||"prototype"==f||"__class__"==f||"__super__"==f||"__interfaces__"==f||"__properties__"==f||(2!=c.length&&(c+=", \n"),c+=b+f+" : "+L.__string_rec(a[f],b));b=b.substring(1);return c+("\n"+b+"}");case "string":return a;default:return String(a)}};L.__interfLoop=function(a,b){if(null==a)return!1;if(a==b)return!0;if(Object.prototype.hasOwnProperty.call(a,"__interfaces__"))for(var c=a.__interfaces__,d=0,e=c.length;d<
e;){var f=d++;f=c[f];if(f==b||L.__interfLoop(f,b))return!0}return L.__interfLoop(a.__super__,b)};L.__instanceof=function(a,b){if(null==b)return!1;switch(b){case Array:return a instanceof Array;case sj:return"boolean"==typeof a;case tu:return null!=a;case rj:return"number"==typeof a;case Hg:return"number"==typeof a?(a|0)===a:!1;case String:return"string"==typeof a;default:if(null!=a)if("function"==typeof b){if(L.__downcastCheck(a,b))return!0}else{if("object"==typeof b&&L.__isNativeObj(b)&&a instanceof
b)return!0}else return!1;return b==et&&null!=a.__name__||b==iu&&null!=a.__ename__?!0:null!=a.__enum__?C[a.__enum__]==b:!1}};L.__downcastCheck=function(a,b){return a instanceof b?!0:b.__isInterface__?L.__interfLoop(L.getClass(a),b):!1};L.__implements=function(a,b){return L.__interfLoop(L.getClass(a),b)};L.__cast=function(a,b){if(null==a||L.__instanceof(a,b))return a;throw new E("Cannot cast "+K.string(a)+" to "+K.string(b));};L.__nativeClassName=function(a){a=L.__toStr.call(a).slice(8,-1);return"Object"==
a||"Function"==a||"Math"==a||"JSON"==a?null:a};L.__isNativeObj=function(a){return null!=L.__nativeClassName(a)};L.__resolveNativeClass=function(a){return R[a]};var Xn=function(){};h["js.Browser"]=Xn;Xn.__name__="js.Browser";Xn.getLocalStorage=function(){try{var a=window.localStorage;a.getItem("");if(0==a.length){var b="_hx_"+Math.random();a.setItem(b,b);a.removeItem(b)}return a}catch(c){return ra.lastException=c,null}};var it=function(){};h["js.lib._ArrayBuffer.ArrayBufferCompat"]=it;it.__name__=
"js.lib._ArrayBuffer.ArrayBufferCompat";it.sliceImpl=function(a,b){a=new Uint8Array(this,a,null==b?null:b-a);b=new Uint8Array(a.byteLength);b.set(a);return b.buffer};var yq=function(a){this.gameDeviceCache=new Wa;this.parent=a;this.nextUpdate=this.lastUpdate=this.currentUpdate=0;this.framePeriod=-1;Pc.init();this.accelerometer=pg.registerSensor(uu.ACCELEROMETER,0)};h["lime._internal.backend.html5.HTML5Application"]=yq;yq.__name__="lime._internal.backend.html5.HTML5Application";yq.prototype={gameDeviceCache:null,
accelerometer:null,currentUpdate:null,deltaTime:null,framePeriod:null,lastUpdate:null,nextUpdate:null,parent:null,convertKeyCode:function(a){if(65<=a&&90>=a)return a+32;switch(a){case 12:return 1073741980;case 16:return 1073742049;case 17:return 1073742048;case 18:return 1073742050;case 19:return 1073741896;case 20:return 1073741881;case 33:return 1073741899;case 34:return 1073741902;case 35:return 1073741901;case 36:return 1073741898;case 37:return 1073741904;case 38:return 1073741906;case 39:return 1073741903;
case 40:return 1073741905;case 41:return 1073741943;case 43:return 1073741940;case 44:return 1073741894;case 45:return 1073741897;case 46:return 127;case 91:return 1073742051;case 92:return 1073742055;case 93:return 1073742055;case 95:return 1073742106;case 96:return 1073741922;case 97:return 1073741913;case 98:return 1073741914;case 99:return 1073741915;case 100:return 1073741916;case 101:return 1073741917;case 102:return 1073741918;case 103:return 1073741919;case 104:return 1073741920;case 105:return 1073741921;
case 106:return 1073741909;case 107:return 1073741911;case 108:return 1073741923;case 109:return 1073741910;case 110:return 1073741923;case 111:return 1073741908;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 127:return 1073741931;case 128:return 1073741932;case 129:return 1073741933;case 130:return 1073741934;case 131:return 1073741935;case 132:return 1073741936;case 133:return 1073741937;case 134:return 1073741938;case 135:return 1073741939;case 144:return 1073741907;case 145:return 1073741895;case 160:return 94;case 161:return 33;case 163:return 35;case 164:return 36;case 166:return 1073742094;case 167:return 1073742095;case 168:return 1073742097;
case 169:return 41;case 170:return 42;case 171:return 96;case 172:return 1073741898;case 173:return 45;case 174:return 1073741953;case 175:return 1073741952;case 176:return 1073742082;case 177:return 1073742083;case 178:return 1073742084;case 179:return 1073742085;case 180:return 1073742089;case 181:return 1073742086;case 182:return 1073741953;case 183:return 1073741952;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 193:return 63;case 194:return 1073741923;case 219:return 91;case 220:return 92;case 221:return 93;case 222:return 39;case 223:return 96;case 224:return 1073742051;case 226:return 92}return a},exec:function(){window.addEventListener("keydown",v(this,this.handleKeyEvent),!1);window.addEventListener("keyup",v(this,this.handleKeyEvent),!1);window.addEventListener("focus",v(this,this.handleWindowEvent),!1);window.addEventListener("blur",v(this,this.handleWindowEvent),!1);window.addEventListener("resize",
v(this,this.handleWindowEvent),!1);window.addEventListener("beforeunload",v(this,this.handleWindowEvent),!1);window.addEventListener("devicemotion",v(this,this.handleSensorEvent),!1);CanvasRenderingContext2D.prototype.isPointInStroke||(CanvasRenderingContext2D.prototype.isPointInStroke=function(a,b,c){return!1});CanvasRenderingContext2D.prototype.isPointInPath||(CanvasRenderingContext2D.prototype.isPointInPath=function(a,b,c){return!1});0=="performance"in window&&(window.performance={});if(0=="now"in
window.performance){var a=Date.now();performance.timing&&performance.timing.navigationStart&&(a=performance.timing.navigationStart);window.performance.now=function(){return Date.now()-a}}for(var b=0,c=["ms","moz","webkit","o"],d=0;d<c.length&&!window.requestAnimationFrame;++d)window.requestAnimationFrame=window[c[d]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[c[d]+"CancelAnimationFrame"]||window[c[d]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=
function(a,c){var d=(new Date).getTime(),e=Math.max(0,16-(d-b));c=window.setTimeout(function(){a(d+e)},e);b=d+e;return c});window.cancelAnimationFrame||(window.cancelAnimationFrame=function(a){clearTimeout(a)});window.requestAnimFrame=window.requestAnimationFrame;this.lastUpdate=(new Date).getTime();this.handleApplicationEvent();return 0},exit:function(){},handleApplicationEvent:function(a){a=0;for(var b=this.parent.__windows;a<b.length;){var c=b[a];++a;c.__backend.updateSize()}this.updateGameDevices();
this.currentUpdate=(new Date).getTime();if(this.currentUpdate>=this.nextUpdate){this.deltaTime=this.currentUpdate-this.lastUpdate;a=0;for(b=this.parent.__windows;a<b.length;)c=b[a],++a,this.parent.onUpdate.dispatch(this.deltaTime|0),null!=c.context&&c.onRender.dispatch(c.context);this.nextUpdate=0>this.framePeriod?this.currentUpdate:this.currentUpdate-this.currentUpdate%this.framePeriod+this.framePeriod;this.lastUpdate=this.currentUpdate}window.requestAnimationFrame(v(this,this.handleApplicationEvent))},
handleKeyEvent:function(a){if(null!=this.parent.__window){var b=this.convertKeyCode(null!=a.keyCode?a.keyCode:a.which),c=(a.shiftKey?3:0)|(a.ctrlKey?192:0)|(a.altKey?768:0)|(a.metaKey?3072:0);"keydown"==a.type?(this.parent.__window.onKeyDown.dispatch(b,c),this.parent.__window.onKeyDown.canceled&&a.cancelable&&a.preventDefault()):(this.parent.__window.onKeyUp.dispatch(b,c),this.parent.__window.onKeyUp.canceled&&a.cancelable&&a.preventDefault())}},handleSensorEvent:function(a){this.accelerometer.onUpdate.dispatch(a.accelerationIncludingGravity.x,
a.accelerationIncludingGravity.y,a.accelerationIncludingGravity.z)},handleWindowEvent:function(a){if(null!=this.parent.__window)switch(a.type){case "blur":this.parent.__window.onFocusOut.dispatch();this.parent.__window.onDeactivate.dispatch();break;case "focus":this.parent.__window.onFocusIn.dispatch();this.parent.__window.onActivate.dispatch();break;case "resize":this.parent.__window.__backend.handleResizeEvent(a)}},updateGameDevices:function(){var a=pd.__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 zq;f.id=b;f.connected=e.connected;c=0;for(d=e.buttons.length;c<d;){var l=c++;f.buttons.push(e.buttons[l].value)}c=0;for(d=e.axes.length;c<d;)l=c++,f.axes.push(e.axes[l]);"standard"==e.mapping&&(f.isGamepad=!0);this.gameDeviceCache.h[b]=f;e.connected&&(pd.__connect(b),f.isGamepad&&le.__connect(b))}f=this.gameDeviceCache.h[b];d=pd.devices.h[b];c=le.devices.h[b];if(e.connected){for(var m=0,p=e.buttons.length;m<
p;){var n=m++;l=e.buttons[n].value;if(l!=f.buttons[n]){if(6==n)d.onAxisMove.dispatch(e.axes.length,l),null!=c&&c.onAxisMove.dispatch(4,l);else if(7==n)d.onAxisMove.dispatch(e.axes.length+1,l),null!=c&&c.onAxisMove.dispatch(5,l);else if(0<l?d.onButtonDown.dispatch(n):d.onButtonUp.dispatch(n),null!=c){switch(n){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<l?c.onButtonDown.dispatch(b):c.onButtonUp.dispatch(b)}f.buttons[n]=l}}b=0;for(l=e.axes.length;b<l;)m=b++,e.axes[m]!=f.axes[m]&&(d.onAxisMove.dispatch(m,e.axes[m]),null!=c&&c.onAxisMove.dispatch(m,e.axes[m]),f.axes[m]=e.axes[m])}else f.connected&&(f.connected=!1,pd.__disconnect(b),le.__disconnect(b))}},__class__:yq};var zq=function(){this.connected=!0;this.buttons=[];this.axes=[]};h["lime._internal.backend.html5.GameDeviceData"]=
zq;zq.__name__="lime._internal.backend.html5.GameDeviceData";zq.prototype={connected:null,id:null,isGamepad:null,buttons:null,axes:null,__class__:zq};var Aq=function(a){this.parent=a;this.id=-1;this.gain=1;this.position=new Ac};h["lime._internal.backend.html5.HTML5AudioSource"]=Aq;Aq.__name__="lime._internal.backend.html5.HTML5AudioSource";Aq.prototype={completed:null,gain:null,id:null,length:null,loops:null,parent:null,playing:null,position:null,dispose:function(){},init:function(){},play:function(){if(!this.playing&&
null!=this.parent.buffer&&null!=this.parent.buffer.__srcHowl){this.playing=!0;var a=this.getCurrentTime();this.completed=!1;var b=this.parent.buffer.__srcHowl._volume;this.parent.buffer.__srcHowl._volume=this.parent.get_gain();this.id=this.parent.buffer.__srcHowl.play();this.parent.buffer.__srcHowl._volume=b;this.setPosition(this.parent.get_position());this.parent.buffer.__srcHowl.on("end",v(this,this.howl_onEnd),this.id);this.setCurrentTime(a)}},pause:function(){this.playing=!1;null!=this.parent.buffer&&
null!=this.parent.buffer.__srcHowl&&this.parent.buffer.__srcHowl.pause(this.id)},stop:function(){this.playing=!1;null!=this.parent.buffer&&null!=this.parent.buffer.__srcHowl&&(this.parent.buffer.__srcHowl.stop(this.id),this.parent.buffer.__srcHowl.off("end",v(this,this.howl_onEnd),this.id))},update:function(){},howl_onEnd:function(){this.playing=!1;0<this.loops?(this.loops--,this.stop(),this.play()):(null!=this.parent.buffer&&null!=this.parent.buffer.__srcHowl&&(this.parent.buffer.__srcHowl.stop(this.id),
this.parent.buffer.__srcHowl.off("end",v(this,this.howl_onEnd),this.id)),this.completed=!0,this.parent.onComplete.dispatch())},getCurrentTime:function(){if(-1==this.id)return 0;if(this.completed)return this.getLength();if(null!=this.parent.buffer&&null!=this.parent.buffer.__srcHowl){var a=(1E3*this.parent.buffer.__srcHowl.seek(this.id)|0)-this.parent.offset;return 0>a?0:a}return 0},setCurrentTime:function(a){if(null!=this.parent.buffer&&null!=this.parent.buffer.__srcHowl){var b=(a+this.parent.offset)/
1E3;0>b&&(b=0);this.parent.buffer.__srcHowl.seek(b,this.id)}return a},getGain:function(){return this.gain},setGain:function(a){null!=this.parent.buffer&&null!=this.parent.buffer.__srcHowl&&-1!=this.id&&this.parent.buffer.__srcHowl.volume(a,this.id);return this.gain=a},getLength:function(){return 0!=this.length?this.length:null!=this.parent.buffer&&null!=this.parent.buffer.__srcHowl?1E3*this.parent.buffer.__srcHowl.duration()|0:0},setLength:function(a){return this.length=a},getLoops:function(){return this.loops},
setLoops:function(a){return this.loops=a},getPosition:function(){return this.position},setPosition:function(a){this.position.x=a.x;this.position.y=a.y;this.position.z=a.z;this.position.w=a.w;null!=this.parent.buffer.__srcHowl&&null!=this.parent.buffer.__srcHowl.pos&&this.parent.buffer.__srcHowl.pos(this.position.x,this.position.y,this.position.z,this.id);return this.position},__class__:Aq};var fb=function(){this.validStatus0=(new Ca("Tizen","gi")).match(window.navigator.userAgent)};h["lime._internal.backend.html5.HTML5HTTPRequest"]=
fb;fb.__name__="lime._internal.backend.html5.HTML5HTTPRequest";fb.loadImage=function(a){var b=new Jd;fb.activeRequests<fb.requestLimit?(fb.activeRequests++,fb.__loadImage(a,b,0)):fb.requestQueue.add({instance:null,uri:a,promise:b,type:"IMAGE",options:0});return b.future};fb.loadImageFromBytes=function(a,b){var c=URL.createObjectURL(new Blob([a.b.bufferValue],{type:b}));return null!=c?(a=new Jd,fb.activeRequests<fb.requestLimit?(fb.activeRequests++,fb.__loadImage(c,a,1)):fb.requestQueue.add({instance:null,
uri:c,promise:a,type:"IMAGE",options:1}),a.future):fb.loadImage("data:"+b+";base64,"+qg.encode(a))};fb.processQueue=function(){if(fb.activeRequests<fb.requestLimit&&0<fb.requestQueue.length){fb.activeRequests++;var a=fb.requestQueue.pop();switch(a.type){case "BINARY":a.instance.__loadData(a.uri,a.promise);break;case "IMAGE":fb.__loadImage(a.uri,a.promise,a.options);break;case "TEXT":a.instance.__loadText(a.uri,a.promise);break;default:fb.activeRequests--}}};fb.__createBlobURIFromBytes=function(a,
b){return URL.createObjectURL(new Blob([a.b.bufferValue],{type:b}))};fb.__fixHostname=function(a){return null==a?"":a};fb.__fixPort=function(a,b){if(null==a||""==a)switch(b){case "ftp:":return"21";case "gopher:":return"70";case "http:":return"80";case "https:":return"443";case "ws:":return"80";case "wss:":return"443";default:return""}return a};fb.__fixProtocol=function(a){return null==a||""==a?"http:":a};fb.__isInMemoryURI=function(a){return ba.startsWith(a,"data:")?!0:ba.startsWith(a,"blob:")};fb.__isSameOrigin=
function(a){if(null==a||""==a||fb.__isInMemoryURI(a))return!0;null==fb.originElement&&(fb.originElement=window.document.createElement("a"),fb.originHostname=fb.__fixHostname(window.location.hostname),fb.originProtocol=fb.__fixProtocol(window.location.protocol),fb.originPort=fb.__fixPort(window.location.port,fb.originProtocol));var b=fb.originElement;b.href=a;""==b.hostname&&(b.href=b.href);var c=fb.__fixHostname(b.hostname);a=fb.__fixProtocol(b.protocol);b=fb.__fixPort(b.port,a);c=""==c||c==fb.originHostname;
b=""==b||b==fb.originPort;return"file:"!=a&&c?b:!1};fb.__loadImage=function(a,b,c){var d=new Image;fb.__isSameOrigin(a)||(d.crossOrigin="Anonymous");null==fb.supportsImageProgress&&(fb.supportsImageProgress="onprogress"in d);if(fb.supportsImageProgress||fb.__isInMemoryURI(a))d.addEventListener("load",function(e){fb.__revokeBlobURI(a,c);e=new rg(null,d.width,d.height);e.__srcImage=d;fb.activeRequests--;fb.processQueue();b.complete(new Ob(e))},!1),d.addEventListener("progress",function(a){b.progress(a.loaded,
a.total)},!1),d.addEventListener("error",function(d){fb.__revokeBlobURI(a,c);fb.activeRequests--;fb.processQueue();b.error(d.detail)},!1),d.src=a;else{var e=new XMLHttpRequest;e.onload=function(a){fb.activeRequests--;fb.processQueue();(new Ob).__fromBytes(hb.ofData(e.response),function(a){b.complete(a)})};e.onerror=function(a){b.error(a.message)};e.onprogress=function(a){a.lengthComputable&&b.progress(a.loaded,a.total)};e.open("GET",a,!0);e.responseType="arraybuffer";e.overrideMimeType("text/plain; charset=x-user-defined");
e.send(null)}};fb.__revokeBlobURI=function(a,b){0!=(b&1)&&URL.revokeObjectURL(a)};fb.prototype={binary:null,parent:null,request:null,validStatus0:null,cancel:function(){null!=this.request&&this.request.abort()},init:function(a){this.parent=a},load:function(a,b,c){this.request=new XMLHttpRequest;"POST"==this.parent.method?this.request.upload.addEventListener("progress",b,!1):this.request.addEventListener("progress",b,!1);this.request.onreadystatechange=c;b="";if(null==this.parent.data){for(c=this.parent.formData.keys();c.hasNext();){var d=
c.next();0<b.length&&(b+="&");var e=this.parent.formData,f=null!=q[d]?e.getReserved(d):e.h[d];if(-1<d.indexOf("[]")&&f instanceof Array){e=[];for(f=O(f);f.hasNext();){var g=f.next();e.push(encodeURIComponent(g))}e=e.join("&amp;"+d+"=");b+=encodeURIComponent(d)+"="+e}else d=encodeURIComponent(d)+"=",e=K.string(f),b+=d+encodeURIComponent(e)}"GET"==this.parent.method&&""!=b&&(a=-1<a.indexOf("?")?a+("&"+b):a+("?"+b),b="")}this.request.open(K.string(this.parent.method),a,!0);0<this.parent.timeout&&(this.request.timeout=
this.parent.timeout);this.binary&&(this.request.responseType="arraybuffer");a=null;c=0;for(d=this.parent.headers;c<d.length;)e=d[c],++c,"Content-Type"==e.name?a=e.value:this.request.setRequestHeader(e.name,e.value);null!=this.parent.contentType&&(a=this.parent.contentType);null==a&&(null!=this.parent.data?a="application/octet-stream":""!=b&&(a="application/x-www-form-urlencoded"));null!=a&&this.request.setRequestHeader("Content-Type",a);this.parent.withCredentials&&(this.request.withCredentials=!0);
null!=this.parent.data?this.request.send(this.parent.data.b.bufferValue):this.request.send(b)},loadData:function(a){var b=new Jd;fb.activeRequests<fb.requestLimit?(fb.activeRequests++,this.__loadData(a,b)):fb.requestQueue.add({instance:this,uri:a,promise:b,type:"BINARY",options:0});return b.future},loadText:function(a){var b=new Jd;fb.activeRequests<fb.requestLimit?(fb.activeRequests++,this.__loadText(a,b)):fb.requestQueue.add({instance:this,uri:a,promise:b,type:"TEXT",options:0});return b.future},
processResponse:function(){if(this.parent.enableResponseHeaders){this.parent.responseHeaders=[];for(var a,b,c=0,d=this.request.getAllResponseHeaders().split("\n");c<d.length;)b=d[c],++c,a=ba.trim(B.substr(b,0,b.indexOf(":"))),b=ba.trim(B.substr(b,b.indexOf(":")+1,null)),""!=a&&this.parent.responseHeaders.push(new Yn(a,b))}this.parent.responseStatus=this.request.status},__loadData:function(a,b){var c=this;this.binary=!0;this.load(a,function(a){b.progress(a.loaded,a.total)},function(a){4==c.request.readyState&&
(null!=c.request.status&&(200<=c.request.status&&400>c.request.status||c.validStatus0&&0==c.request.status)?(a=null,""==c.request.responseType?null!=c.request.responseText&&(a=hb.ofString(c.request.responseText)):null!=c.request.response&&(a=hb.ofData(c.request.response)),c.processResponse(),b.complete(a)):(c.processResponse(),b.error(c.request.status)),c.request=null,fb.activeRequests--,fb.processQueue())})},__loadText:function(a,b){var c=this;this.binary=!1;this.load(a,function(a){b.progress(a.loaded,
a.total)},function(a){4==c.request.readyState&&(null!=c.request.status&&(200<=c.request.status&&400>=c.request.status||c.validStatus0&&0==c.request.status)?(c.processResponse(),b.complete(c.request.responseText)):(c.processResponse(),b.error(c.request.status)),c.request=null,fb.activeRequests--,fb.processQueue())})},__class__:fb};var Pb=function(a){this.unusedTouchesPool=new Sa;this.scale=1;this.currentTouches=new Wa;this.parent=a;this.cursor=Kd.DEFAULT;this.cacheMouseY=this.cacheMouseX=0;var b=a.__attributes;
Object.prototype.hasOwnProperty.call(b,"context")||(b.context={});this.renderType=b.context.type;Object.prototype.hasOwnProperty.call(b,"element")&&(a.element=b.element);var c=a.element;Object.prototype.hasOwnProperty.call(b,"allowHighDPI")&&b.allowHighDPI&&"dom"!=this.renderType&&(this.scale=window.devicePixelRatio);a.__scale=this.scale;this.setWidth=Object.prototype.hasOwnProperty.call(b,"width")?b.width:0;this.setHeight=Object.prototype.hasOwnProperty.call(b,"height")?b.height:0;a.__width=this.setWidth;
a.__height=this.setHeight;a.id=Pb.windowID++;c instanceof HTMLCanvasElement?this.canvas=c:"dom"==this.renderType?this.div=window.document.createElement("div"):this.canvas=window.document.createElement("canvas");if(null!=this.canvas){var d=this.canvas.style;d.setProperty("-webkit-transform","translateZ(0)",null);d.setProperty("transform","translateZ(0)",null)}else null!=this.div&&(d=this.div.style,d.setProperty("-webkit-transform","translate3D(0,0,0)",null),d.setProperty("transform","translate3D(0,0,0)",
null),d.position="relative",d.overflow="hidden",d.setProperty("-webkit-user-select","none",null),d.setProperty("-moz-user-select","none",null),d.setProperty("-ms-user-select","none",null),d.setProperty("-o-user-select","none",null));0==a.__width&&0==a.__height&&(null!=c?(a.__width=c.clientWidth,a.__height=c.clientHeight):(a.__width=window.innerWidth,a.__height=window.innerHeight),this.cacheElementWidth=a.__width,this.cacheElementHeight=a.__height,this.resizeElement=!0);null!=this.canvas?(this.canvas.width=
Math.round(a.__width*this.scale),this.canvas.height=Math.round(a.__height*this.scale),this.canvas.style.width=a.__width+"px",this.canvas.style.height=a.__height+"px"):(this.div.style.width=a.__width+"px",this.div.style.height=a.__height+"px");if(Object.prototype.hasOwnProperty.call(b,"resizable")&&b.resizable||!Object.prototype.hasOwnProperty.call(b,"width")&&0==this.setWidth&&0==this.setHeight)a.__resizable=!0;this.updateSize();if(null!=c){null!=this.canvas?c!=this.canvas&&c.appendChild(this.canvas):
c.appendChild(this.div);b="mousedown mouseenter mouseleave mousemove mouseup wheel".split(" ");for(d=0;d<b.length;){var e=b[d];++d;c.addEventListener(e,v(this,this.handleMouseEvent),!0)}c.addEventListener("contextmenu",v(this,this.handleContextMenuEvent),!0);c.addEventListener("dragstart",v(this,this.handleDragEvent),!0);c.addEventListener("dragover",v(this,this.handleDragEvent),!0);c.addEventListener("drop",v(this,this.handleDragEvent),!0);c.addEventListener("touchstart",v(this,this.handleTouchEvent),
!0);c.addEventListener("touchmove",v(this,this.handleTouchEvent),!0);c.addEventListener("touchend",v(this,this.handleTouchEvent),!0);c.addEventListener("touchcancel",v(this,this.handleTouchEvent),!0);c.addEventListener("gamepadconnected",v(this,this.handleGamepadEvent),!0);c.addEventListener("gamepaddisconnected",v(this,this.handleGamepadEvent),!0)}this.createContext();"webgl"==a.context.type&&(this.canvas.addEventListener("webglcontextlost",v(this,this.handleContextEvent),!1),this.canvas.addEventListener("webglcontextrestored",
v(this,this.handleContextEvent),!1))};h["lime._internal.backend.html5.HTML5Window"]=Pb;Pb.__name__="lime._internal.backend.html5.HTML5Window";Pb.prototype={canvas:null,div:null,cacheElementHeight:null,cacheElementWidth:null,cacheMouseX:null,cacheMouseY:null,cursor:null,currentTouches:null,isFullscreen:null,parent:null,primaryTouch:null,renderType:null,requestedFullscreen:null,resizeElement:null,scale:null,setHeight:null,setWidth:null,textInputEnabled:null,unusedTouchesPool:null,alert:function(a,b){null!=
a&&window.alert(K.string(a))},close:function(){this.parent.application.__removeWindow(this.parent)},createContext:function(){var a=new Bq,b=this.parent.__attributes.context;a.window=this.parent;a.attributes=b;if(null!=this.div)a.dom=this.div,a.type="dom",a.version="";else if(null!=this.canvas){var c=null,d="canvas"==this.renderType,e="opengl"==this.renderType||"opengles"==this.renderType||"webgl"==this.renderType,f=!Object.prototype.hasOwnProperty.call(b,"version")||"1"!=b.version,g=!1;if(e||!d&&
(!Object.prototype.hasOwnProperty.call(b,"hardware")||b.hardware)){d=Object.prototype.hasOwnProperty.call(b,"background")&&null==b.background;e=Object.prototype.hasOwnProperty.call(b,"colorDepth")?b.colorDepth:16;var k=Object.prototype.hasOwnProperty.call(b,"antialiasing")&&0<b.antialiasing,l=Object.prototype.hasOwnProperty.call(b,"depth")?b.depth:!0;b=Object.prototype.hasOwnProperty.call(b,"stencil")&&b.stencil;b={alpha:d||16<e,antialias:k,depth:l,premultipliedAlpha:!0,stencil:b,preserveDrawingBuffer:!1,
failIfMajorPerformanceCaveat:!0};d=["webgl","experimental-webgl"];f&&d.unshift("webgl2");for(f=0;f<d.length&&(e=d[f],++f,c=this.canvas.getContext(e,b),null!=c&&"webgl2"==e&&(g=!0),null==c););}null==c?(a.canvas2D=this.canvas.getContext("2d"),a.type="canvas",a.version=""):(a.webgl=Ab.fromWebGL2RenderContext(c),g&&(a.webgl2=c),null==t.context&&(t.context=c,t.type="webgl",t.version=g?2:1),a.type="webgl",a.version=g?"2":"1")}this.parent.context=a},focus:function(){},getCursor:function(){return this.cursor},
getDisplay:function(){return Ra.getDisplay(0)},getDisplayMode:function(){return Ra.getDisplay(0).currentMode},getFrameRate:function(){return null==this.parent.application?0:0>this.parent.application.__backend.framePeriod?60:1E3==this.parent.application.__backend.framePeriod?0:1E3/this.parent.application.__backend.framePeriod},getMouseLock:function(){return!1},getTextInputEnabled:function(){return this.textInputEnabled},handleContextEvent:function(a){switch(a.type){case "webglcontextlost":a.cancelable&&
a.preventDefault();this.parent.context=null;this.parent.onRenderContextLost.dispatch();break;case "webglcontextrestored":this.createContext(),this.parent.onRenderContextRestored.dispatch(this.parent.context)}},handleContextMenuEvent:function(a){(this.parent.onMouseUp.canceled||this.parent.onMouseDown.canceled)&&a.cancelable&&a.preventDefault()},handleCutOrCopyEvent:function(a){a.clipboardData.setData("text/plain",He.get_text());a.cancelable&&a.preventDefault()},handleDragEvent:function(a){switch(a.type){case "dragover":return a.preventDefault(),
!1;case "dragstart":if("img"==L.__cast(a.target,HTMLElement).nodeName.toLowerCase()&&a.cancelable)return a.preventDefault(),!1;break;case "drop":if(null!=a.dataTransfer&&0<a.dataTransfer.files.length)return this.parent.onDropFile.dispatch(a.dataTransfer.files),a.preventDefault(),!1}return!0},handleFocusEvent:function(a){var b=this;this.textInputEnabled&&(null==a.relatedTarget||this.isDescendent(a.relatedTarget))&&pf.delay(function(){b.textInputEnabled&&Pb.textInput.focus()},20)},handleFullscreenEvent:function(a){if(null!=
(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement))this.isFullscreen=!0,this.parent.__fullscreen=!0,this.requestedFullscreen&&(this.requestedFullscreen=!1,this.parent.onFullscreen.dispatch());else{this.isFullscreen=!1;this.parent.__fullscreen=!1;this.parent.onRestore.dispatch();a=["fullscreenchange","mozfullscreenchange","webkitfullscreenchange","MSFullscreenChange"];for(var b=["fullscreenerror","mozfullscreenerror","webkitfullscreenerror",
"MSFullscreenError"],c=0,d=a.length;c<d;){var e=c++;window.document.removeEventListener(a[e],v(this,this.handleFullscreenEvent),!1);window.document.removeEventListener(b[e],v(this,this.handleFullscreenEvent),!1)}}},handleGamepadEvent:function(a){switch(a.type){case "gamepadconnected":pd.__connect(a.gamepad.index);"standard"==a.gamepad.mapping&&le.__connect(a.gamepad.index);break;case "gamepaddisconnected":pd.__disconnect(a.gamepad.index),le.__disconnect(a.gamepad.index)}},handleInputEvent:function(a){Pb.textInput.value!=
Pb.dummyCharacter&&(a=ba.replace(Pb.textInput.value,Pb.dummyCharacter,""),0<a.length&&this.parent.onTextInput.dispatch(a),Pb.textInput.value=Pb.dummyCharacter)},handleMouseEvent:function(a){if("wheel"!=a.type){if(null!=this.parent.element)if(null!=this.canvas){var b=this.canvas.getBoundingClientRect();var c=this.parent.__width/b.width*(a.clientX-b.left);b=this.parent.__height/b.height*(a.clientY-b.top)}else null!=this.div?(b=this.div.getBoundingClientRect(),c=a.clientX-b.left,b=a.clientY-b.top):(b=
this.parent.element.getBoundingClientRect(),c=this.parent.__width/b.width*(a.clientX-b.left),b=this.parent.__height/b.height*(a.clientY-b.top));else c=a.clientX,b=a.clientY;switch(a.type){case "mousedown":a.currentTarget==this.parent.element&&window.addEventListener("mouseup",v(this,this.handleMouseEvent));this.parent.onMouseDown.dispatch(c,b,a.button);this.parent.onMouseDown.canceled&&a.cancelable&&a.preventDefault();break;case "mouseenter":a.target==this.parent.element&&(this.parent.onEnter.dispatch(),
this.parent.onEnter.canceled&&a.cancelable&&a.preventDefault());break;case "mouseleave":a.target==this.parent.element&&(this.parent.onLeave.dispatch(),this.parent.onLeave.canceled&&a.cancelable&&a.preventDefault());break;case "mousemove":if(c!=this.cacheMouseX||b!=this.cacheMouseY)this.parent.onMouseMove.dispatch(c,b),this.parent.onMouseMoveRelative.dispatch(c-this.cacheMouseX,b-this.cacheMouseY),(this.parent.onMouseMove.canceled||this.parent.onMouseMoveRelative.canceled)&&a.cancelable&&a.preventDefault();
break;case "mouseup":window.removeEventListener("mouseup",v(this,this.handleMouseEvent)),a.currentTarget==this.parent.element&&a.stopPropagation(),this.parent.onMouseUp.dispatch(c,b,a.button),this.parent.onMouseUp.canceled&&a.cancelable&&a.preventDefault()}this.cacheMouseX=c;this.cacheMouseY=b}else{switch(a.deltaMode){case 0:c=Cq.PIXELS;break;case 1:c=Cq.LINES;break;case 2:c=Cq.PAGES;break;default:c=Cq.UNKNOWN}this.parent.onMouseWheel.dispatch(a.deltaX,-a.deltaY,c);this.parent.onMouseWheel.canceled&&
a.cancelable&&a.preventDefault()}},handlePasteEvent:function(a){if(-1<a.clipboardData.types.indexOf("text/plain")){var b=a.clipboardData.getData("text/plain");He.set_text(b);this.textInputEnabled&&this.parent.onTextInput.dispatch(b);a.cancelable&&a.preventDefault()}},handleResizeEvent:function(a){this.primaryTouch=null;this.updateSize()},handleTouchEvent:function(a){a.cancelable&&a.preventDefault();var b=null;null!=this.parent.element&&(b=null!=this.canvas?this.canvas.getBoundingClientRect():null!=
this.div?this.div.getBoundingClientRect():this.parent.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,f,g,k,l,m=0,p=a.changedTouches;m<p.length;){var n=p[m];++m;null!=b?(f=c/b.width*(n.clientX-b.left),g=d/b.height*(n.clientY-b.top)):(f=n.clientX,g=n.clientY);if("touchstart"==a.type)e=this.unusedTouchesPool.pop(),null==e?e=new Ad(f/c,g/d,n.identifier,0,0,n.force,this.parent.id):(e.x=f/c,e.y=g/d,e.id=n.identifier,e.dx=
0,e.dy=0,e.pressure=n.force,e.device=this.parent.id),this.currentTouches.h[n.identifier]=e,Ad.onStart.dispatch(e),null==this.primaryTouch&&(this.primaryTouch=e),e==this.primaryTouch&&this.parent.onMouseDown.dispatch(f,g,0);else if(e=this.currentTouches.h[n.identifier],null!=e)switch(k=e.x,l=e.y,e.x=f/c,e.y=g/d,e.dx=e.x-k,e.dy=e.y-l,e.pressure=n.force,a.type){case "touchcancel":Ad.onCancel.dispatch(e);this.currentTouches.remove(n.identifier);this.unusedTouchesPool.add(e);e==this.primaryTouch&&(this.primaryTouch=
null);break;case "touchend":Ad.onEnd.dispatch(e);this.currentTouches.remove(n.identifier);this.unusedTouchesPool.add(e);e==this.primaryTouch&&(this.parent.onMouseUp.dispatch(f,g,0),this.primaryTouch=null);break;case "touchmove":Ad.onMove.dispatch(e),e==this.primaryTouch&&this.parent.onMouseMove.dispatch(f,g)}}},isDescendent:function(a){if(a==this.parent.element)return!0;for(;null!=a;){if(a.parentNode==this.parent.element)return!0;a=a.parentNode}return!1},move:function(a,b){},readPixels:function(a){if(null!=
this.canvas){var b=new he(0,0,this.canvas.width,this.canvas.height);null==a?a=b:a.intersection(b,a);if(0<a.width&&0<a.height)return b=window.document.createElement("canvas"),b.width=a.width|0,b.height=a.height|0,b.getContext("2d").drawImage(this.canvas,-a.x,-a.y),Ob.fromCanvas(b)}return null},resize:function(a,b){},setBorderless:function(a){return a},setClipboard:function(a){var b=this.textInputEnabled;this.setTextInputEnabled(!0);var c=Pb.textInput.value;Pb.textInput.value=a;Pb.textInput.select();
window.document.queryCommandEnabled("copy")&&window.document.execCommand("copy");Pb.textInput.value=c;this.setTextInputEnabled(b)},setCursor:function(a){if(this.cursor!=a){if(null==a)this.parent.element.style.cursor="none";else{switch(a._hx_index){case 0:var b="default";break;case 1:b="crosshair";break;case 3:b="move";break;case 4:b="pointer";break;case 5:b="nesw-resize";break;case 6:b="ns-resize";break;case 7:b="nwse-resize";break;case 8:b="ew-resize";break;case 9:b="text";break;case 10:b="wait";
break;case 11:b="wait";break;default:b="auto"}this.parent.element.style.cursor=b}this.cursor=a}return this.cursor},setDisplayMode:function(a){return a},setFrameRate:function(a){null!=this.parent.application&&(60<=a?this.parent==this.parent.application.__window&&(this.parent.application.__backend.framePeriod=-1):0<a?this.parent==this.parent.application.__window&&(this.parent.application.__backend.framePeriod=1E3/a):this.parent==this.parent.application.__window&&(this.parent.application.__backend.framePeriod=
1E3));return a},setFullscreen:function(a){a?this.requestedFullscreen||this.isFullscreen||(this.requestedFullscreen=!0,(x=this.parent.element,v(x,x.requestFullscreen))?(document.addEventListener("fullscreenchange",v(this,this.handleFullscreenEvent),!1),document.addEventListener("fullscreenerror",v(this,this.handleFullscreenEvent),!1),this.parent.element.requestFullscreen()):this.parent.element.mozRequestFullScreen?(document.addEventListener("mozfullscreenchange",v(this,this.handleFullscreenEvent),
!1),document.addEventListener("mozfullscreenerror",v(this,this.handleFullscreenEvent),!1),this.parent.element.mozRequestFullScreen()):this.parent.element.webkitRequestFullscreen?(document.addEventListener("webkitfullscreenchange",v(this,this.handleFullscreenEvent),!1),document.addEventListener("webkitfullscreenerror",v(this,this.handleFullscreenEvent),!1),this.parent.element.webkitRequestFullscreen()):this.parent.element.msRequestFullscreen&&(document.addEventListener("MSFullscreenChange",v(this,
this.handleFullscreenEvent),!1),document.addEventListener("MSFullscreenError",v(this,this.handleFullscreenEvent),!1),this.parent.element.msRequestFullscreen())):this.isFullscreen&&(this.requestedFullscreen=!1,document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen());return a},setIcon:function(a){Ba.convertToCanvas(a);var b=window.document.querySelector("link[rel*='icon']");
null==b&&(b=window.document.createElement("link"));b.type="image/x-icon";b.rel="shortcut icon";b.href=a.buffer.get_src().toDataURL("image/x-icon");window.document.getElementsByTagName("head")[0].appendChild(b)},setMaximized:function(a){return!1},setMinimized:function(a){return!1},setMouseLock:function(a){},setResizable:function(a){return a},setTextInputEnabled:function(a){a?(null==Pb.textInput&&(Pb.textInput=window.document.createElement("input"),Pb.textInput.type="text",Pb.textInput.style.position=
"absolute",Pb.textInput.style.opacity="0",Pb.textInput.style.color="transparent",Pb.textInput.value=Pb.dummyCharacter,Pb.textInput.autocapitalize="off",Pb.textInput.autocorrect="off",Pb.textInput.autocomplete="off",Pb.textInput.style.left="0px",Pb.textInput.style.top="50%",(new Ca("(iPad|iPhone|iPod).*OS 8_","gi")).match(window.navigator.userAgent)?(Pb.textInput.style.fontSize="0px",Pb.textInput.style.width="0px",Pb.textInput.style.height="0px"):(Pb.textInput.style.width="1px",Pb.textInput.style.height=
"1px"),Pb.textInput.style.pointerEvents="none",Pb.textInput.style.zIndex="-10000000"),null==Pb.textInput.parentNode&&this.parent.element.appendChild(Pb.textInput),this.textInputEnabled||(Pb.textInput.addEventListener("input",v(this,this.handleInputEvent),!0),Pb.textInput.addEventListener("blur",v(this,this.handleFocusEvent),!0),Pb.textInput.addEventListener("cut",v(this,this.handleCutOrCopyEvent),!0),Pb.textInput.addEventListener("copy",v(this,this.handleCutOrCopyEvent),!0),Pb.textInput.addEventListener("paste",
v(this,this.handlePasteEvent),!0)),Pb.textInput.focus(),Pb.textInput.select()):null!=Pb.textInput&&(Pb.textInput.removeEventListener("input",v(this,this.handleInputEvent),!0),Pb.textInput.removeEventListener("blur",v(this,this.handleFocusEvent),!0),Pb.textInput.removeEventListener("cut",v(this,this.handleCutOrCopyEvent),!0),Pb.textInput.removeEventListener("copy",v(this,this.handleCutOrCopyEvent),!0),Pb.textInput.removeEventListener("paste",v(this,this.handlePasteEvent),!0),Pb.textInput.blur());return this.textInputEnabled=
a},setTitle:function(a){null!=a&&(window.document.title=a);return a},updateSize:function(){if(this.parent.__resizable){if(null!=this.parent.element){var a=this.parent.element.clientWidth;var b=this.parent.element.clientHeight}else a=window.innerWidth,b=window.innerHeight;if(a!=this.cacheElementWidth||b!=this.cacheElementHeight){this.cacheElementWidth=a;this.cacheElementHeight=b;var c=this.resizeElement||0==this.setWidth&&0==this.setHeight;if(null!=this.parent.element&&(null==this.div||null!=this.div&&
c))if(c){if(this.parent.__width!=a||this.parent.__height!=b)this.parent.__width=a,this.parent.__height=b,null!=this.canvas?this.parent.element!=this.canvas&&(this.canvas.width=Math.round(a*this.scale),this.canvas.height=Math.round(b*this.scale),this.canvas.style.width=a+"px",this.canvas.style.height=b+"px"):(this.div.style.width=a+"px",this.div.style.height=b+"px"),this.parent.onResize.dispatch(a,b)}else{c=0!=this.setWidth?a/this.setWidth:1;var d=0!=this.setHeight?b/this.setHeight:1,e=a,f=b,g=0,k=
0;c<d?(f=Math.floor(this.setHeight*c),k=Math.floor((b-f)/2)):(e=Math.floor(this.setWidth*d),g=Math.floor((a-e)/2));null!=this.canvas?this.parent.element!=this.canvas&&(this.canvas.style.width=e+"px",this.canvas.style.height=f+"px",this.canvas.style.marginLeft=g+"px",this.canvas.style.marginTop=k+"px"):(this.div.style.width=e+"px",this.div.style.height=f+"px",this.div.style.marginLeft=g+"px",this.div.style.marginTop=k+"px")}}}},warpMouse:function(a,b){},__class__:Pb};var ju=function(){};h["lime._internal.backend.native.NativeCFFI"]=
ju;ju.__name__="lime._internal.backend.native.NativeCFFI";var jt=function(){};h["lime._internal.format.BMP"]=jt;jt.__name__="lime._internal.format.BMP";jt.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=Dq.RGB);var c=14,d=40,e=a.width*a.height*4;if(null!=b)switch(b._hx_index){case 0:e=(3*a.width+3*a.width%4)*a.height;break;case 1:d=108;break;case 2:c=0,e+=a.width*a.height}var f=new hb(new ArrayBuffer(c+d+e)),g=0;0<c&&
(f.b[g++]=66,f.b[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==Dq.ICO?2*a.height:a.height);g+=4;f.setUInt16(g,1);g+=2;f.setUInt16(g,b==Dq.RGB?24:32);g+=2;f.setInt32(g,b==Dq.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==Dq.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.b[g++]=32,f.b[g++]=110,f.b[g++]=105,f.b[g++]=87,c=0;48>c;)c++,f.b[g++]=0;c=a.getPixels(new he(0,0,a.width,a.height),1);if(null!=b)switch(b._hx_index){case 0:var k=0;for(var l=a.height;k<l;){b=k++;b=4*(a.height-1-b)*a.width;for(var m=0,p=a.width;m<p;){m++;b++;d=c.b[b++];e=c.b[b++];var n=c.b[b++];f.b[g++]=n&255;f.b[g++]=e&255;f.b[g++]=d&255}b=0;for(d=3*a.width%4;b<d;)b++,f.b[g++]=0}break;case 1:l=0;for(m=a.height;l<m;){b=l++;b=4*(a.height-1-b)*a.width;
p=0;for(var h=a.width;p<h;)p++,k=c.b[b++],d=c.b[b++],e=c.b[b++],n=c.b[b++],f.b[g++]=n&255,f.b[g++]=e&255,f.b[g++]=d&255,f.b[g++]=k&255}break;case 2:l=new hb(new ArrayBuffer(a.width*a.height));p=m=0;for(h=a.height;p<h;){b=p++;b=4*(a.height-1-b)*a.width;for(var q=0,t=a.width;q<t;)q++,k=c.b[b++],d=c.b[b++],e=c.b[b++],n=c.b[b++],f.b[g++]=n&255,f.b[g++]=e&255,f.b[g++]=d&255,f.b[g++]=k&255,l.b[m++]=0}f.blit(g,l,0,a.width*a.height)}return f};var Dq=C["lime._internal.format.BMPType"]={__ename__:"lime._internal.format.BMPType",
__constructs__:["RGB","BITFIELD","ICO"],RGB:{_hx_index:0,__enum__:"lime._internal.format.BMPType",toString:u},BITFIELD:{_hx_index:1,__enum__:"lime._internal.format.BMPType",toString:u},ICO:{_hx_index:2,__enum__:"lime._internal.format.BMPType",toString:u}},qg=function(){};h["lime._internal.format.Base64"]=qg;qg.__name__="lime._internal.format.Base64";qg.decode=function(a){return gi.decode(a)};qg.encode=function(a){var b=[],c=qg.DICTIONARY,d=qg.EXTENDED_DICTIONARY,e=a.length,f=Math.floor(e/3),g=2*f;
b.length=2*Math.ceil(e/3);for(var k=0,l=0,m;l<g;)m=a.b[k]<<16|a.b[k+1]<<8|a.b[k+2],b[l]=d[m>>12&4095],b[l+1]=d[m&4095],k+=3,l+=2;switch(e-3*f){case 1:m=a.b[k]<<16;b[l]=d[m>>12&4095];b[l+1]="==";break;case 2:m=a.b[k]<<16|a.b[k+1]<<8,b[l]=d[m>>12&4095],b[l+1]=c[m>>6&63]+"="}return b.join("")};var Zn=function(){};h["lime._internal.format.Deflate"]=Zn;Zn.__name__="lime._internal.format.Deflate";Zn.compress=function(a){a=pako.deflateRaw(a.b.bufferValue);return hb.ofData(a)};Zn.decompress=function(a){a=
pako.inflateRaw(a.b.bufferValue);return hb.ofData(a)};var $n=function(){};h["lime._internal.format.GZip"]=$n;$n.__name__="lime._internal.format.GZip";$n.compress=function(a){a=pako.gzip(a.b.bufferValue);return hb.ofData(a)};$n.decompress=function(a){a=pako.ungzip(a.b.bufferValue);return hb.ofData(a)};var ao=function(){};h["lime._internal.format.JPEG"]=ao;ao.__name__="lime._internal.format.JPEG";ao.decodeBytes=function(a,b){return null};ao.decodeFile=function(a,b){return null};ao.encode=function(a,
b){if(a.get_premultiplied()||0!=a.get_format())a=a.clone(),a.set_premultiplied(!1),a.set_format(0);Ba.convertToCanvas(a,!1);if(null!=a.buffer.__srcCanvas){a=a.buffer.__srcCanvas.toDataURL("image/jpeg",b/100);a=window.atob(a.split(";base64,")[1]);b=new hb(new ArrayBuffer(a.length));for(var c=0,d=a.length;c<d;){var e=c++;b.b[e]=B.cca(a,e)&255}return b}return null};var bo=function(){};h["lime._internal.format.LZMA"]=bo;bo.__name__="lime._internal.format.LZMA";bo.compress=function(a){return null};bo.decompress=
function(a){return null};var el=function(){};h["lime._internal.format.PNG"]=el;el.__name__="lime._internal.format.PNG";el.decodeBytes=function(a,b){return null};el.decodeFile=function(a,b){return null};el.encode=function(a){if(a.get_premultiplied()||0!=a.get_format())a=a.clone(),a.set_premultiplied(!1),a.set_format(0);Ba.convertToCanvas(a,!1);if(null!=a.buffer.__srcCanvas){a=a.buffer.__srcCanvas.toDataURL("image/png");a=window.atob(a.split(";base64,")[1]);for(var b=new hb(new ArrayBuffer(a.length)),
c=0,d=a.length;c<d;){var e=c++;b.b[e]=B.cca(a,e)&255}return b}return null};var co=function(){};h["lime._internal.format.Zlib"]=co;co.__name__="lime._internal.format.Zlib";co.compress=function(a){a=pako.deflate(a.b.bufferValue);return hb.ofData(a)};co.decompress=function(a){a=pako.inflate(a.b.bufferValue);return hb.ofData(a)};var Ba=function(){};h["lime._internal.graphics.ImageCanvasUtil"]=Ba;Ba.__name__="lime._internal.graphics.ImageCanvasUtil";Ba.colorTransform=function(a,b,c){Ba.convertToData(a);
Qa.colorTransform(a,b,c)};Ba.convertToCanvas=function(a,b){null==b&&(b=!1);var c=a.buffer;null!=c.__srcImage?(null==c.__srcCanvas&&(Ba.createCanvas(a,c.__srcImage.width,c.__srcImage.height),c.__srcContext.drawImage(c.__srcImage,0,0)),c.__srcImage=null):null==c.__srcCanvas&&null!=c.data?(a.set_transparent(!0),Ba.createCanvas(a,c.width,c.height),Ba.createImageData(a),c.__srcContext.putImageData(c.__srcImageData,0,0)):a.type==If.DATA&&null!=c.__srcImageData&&a.dirty&&(c.__srcContext.putImageData(c.__srcImageData,
0,0),a.dirty=!1);b?(c.data=null,c.__srcImageData=null):null==c.data&&null!=c.__srcImageData&&(c.data=c.__srcImageData.data);a.type=If.CANVAS};Ba.convertToData=function(a,b){null==b&&(b=!1);var c=a.buffer;null!=c.__srcImage&&Ba.convertToCanvas(a);if(null!=c.__srcCanvas&&null==c.data)Ba.createImageData(a),a.type==If.CANVAS&&(a.dirty=!1);else if(a.type==If.CANVAS&&null!=c.__srcCanvas&&a.dirty){if(null==c.__srcImageData)Ba.createImageData(a);else{c.__srcImageData=c.__srcContext.getImageData(0,0,c.width,
c.height);var d=c.__srcImageData.data.buffer;d=null!=d?new Uint8Array(d):null;c.data=d}a.dirty=!1}b&&(a.buffer.__srcCanvas=null,a.buffer.__srcContext=null);a.type=If.DATA};Ba.copyChannel=function(a,b,c,d,e,f){Ba.convertToData(b);Ba.convertToData(a);Qa.copyChannel(a,b,c,d,e,f)};Ba.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 Gd),b=b.clone(),b.copyChannel(e,new he(c.x+f.x,c.y+
f.y,c.width,c.height),new Gd(c.x,c.y),Af.ALPHA,Af.ALPHA)),Ba.convertToCanvas(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),Ba.convertToCanvas(b),null!=b.buffer.get_src()&&(a.buffer.__srcContext.globalCompositeOperation="source-over",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)),a.dirty=
!0,a.version++)};Ba.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})))};Ba.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 Uint8Array(b):null;a.data=b}};Ba.fillRect=function(a,b,c,d){Ba.convertToCanvas(a);if(1==d){d=c>>16&255;var e=c>>8&255;var f=c&255;c=a.get_transparent()?c>>24&255:255}else d=c>>24&255,e=c>>16&255,f=c>>8&255,c=a.get_transparent()?c&255:255;0==b.x&&0==b.y&&b.width==a.width&&b.height==a.height&&a.get_transparent()&&0==c?a.buffer.__srcCanvas.width=
a.buffer.width:(255>c&&a.buffer.__srcContext.clearRect(b.x+a.offsetX,b.y+a.offsetY,b.width+a.offsetX,b.height+a.offsetY),0<c&&(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)),a.dirty=!0,a.version++)};Ba.floodFill=function(a,b,c,d,e){Ba.convertToData(a);Qa.floodFill(a,b,c,d,e)};Ba.getPixel=function(a,b,c,d){Ba.convertToData(a);return Qa.getPixel(a,b,c,d)};Ba.getPixel32=function(a,
b,c,d){Ba.convertToData(a);return Qa.getPixel32(a,b,c,d)};Ba.getPixels=function(a,b,c){Ba.convertToData(a);return Qa.getPixels(a,b,c)};Ba.merge=function(a,b,c,d,e,f,g,k){Ba.convertToData(b);Ba.convertToData(a);Qa.merge(a,b,c,d,e,f,g,k)};Ba.resize=function(a,b,c){var d=a.buffer;if(null==d.__srcCanvas)Ba.createCanvas(a,b,c),d.__srcContext.drawImage(d.get_src(),0,0,b,c);else{Ba.convertToCanvas(a,!0);var e=d.__srcCanvas;d.__srcCanvas=null;Ba.createCanvas(a,b,c);d.__srcContext.drawImage(e,0,0,b,c)}d.__srcImageData=
null;d.data=null;a.dirty=!0;a.version++};Ba.scroll=function(a,b,c){if(0!=b%a.width||0!=c%a.height){var d=a.clone();Ba.convertToCanvas(a,!0);a.buffer.__srcContext.clearRect(b,c,a.width,a.height);a.buffer.__srcContext.drawImage(d.get_src(),b,c);a.dirty=!0;a.version++}};Ba.setPixel=function(a,b,c,d,e){Ba.convertToData(a);Qa.setPixel(a,b,c,d,e)};Ba.setPixel32=function(a,b,c,d,e){Ba.convertToData(a);Qa.setPixel32(a,b,c,d,e)};Ba.setPixels=function(a,b,c,d,e){Ba.convertToData(a);Qa.setPixels(a,b,c,d,e)};
Ba.sync=function(a,b){null!=a&&(a.type!=If.CANVAS||null==a.buffer.__srcCanvas&&null==a.buffer.data?a.type==If.DATA&&Ba.convertToData(a,b):Ba.convertToCanvas(a,b))};var Qa=function(){};h["lime._internal.graphics.ImageDataUtil"]=Qa;Qa.__name__="lime._internal.graphics.ImageDataUtil";Qa.displaceMap=function(a,b,c,d,e,f,g){var k=a.buffer.data,l=b.buffer.data,m=c.buffer.data,p=a.buffer.format,n=b.buffer.format,h=c.buffer.format,q=a.get_premultiplied(),t=b.get_premultiplied(),r=c.get_premultiplied();b=
new hf(b);c=new hf(c);for(var u,x,w,v,Q,C,J,F,B,D,E,A,H=0,G=b.height;H<G;){var K=H++;u=b.byteOffset+b.stride*K;for(var y=0,M=b.width;y<M;){var L=y++;x=u+4*L;J=d.x|0;Q=d.y|0;if(g){v=b.byteOffset+b.stride*(K-Q+1)+4*(L-J);C=h;A=r;null==A&&(A=!1);null==C&&(C=0);switch(C){case 0:F=(m[v]&255)<<24|(m[v+1]&255)<<16|(m[v+2]&255)<<8|m[v+3]&255;break;case 1:F=(m[v+1]&255)<<24|(m[v+2]&255)<<16|(m[v+3]&255)<<8|m[v]&255;break;case 2:F=(m[v+2]&255)<<24|(m[v+1]&255)<<16|(m[v]&255)<<8|m[v+3]&255}A&&0!=(F&255)&&255!=
(F&255)&&(I.unmult=255/(F&255),F=(I.__clamp[Math.round((F>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((F>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((F>>>8&255)*I.unmult)]&255)<<8|F&255);v=b.byteOffset+b.stride*(K-Q)+4*(L-J+1);C=h;A=r;null==A&&(A=!1);null==C&&(C=0);switch(C){case 0:B=(m[v]&255)<<24|(m[v+1]&255)<<16|(m[v+2]&255)<<8|m[v+3]&255;break;case 1:B=(m[v+1]&255)<<24|(m[v+2]&255)<<16|(m[v+3]&255)<<8|m[v]&255;break;case 2:B=(m[v+2]&255)<<24|(m[v+1]&255)<<16|(m[v]&255)<<8|m[v+
3]&255}A&&0!=(B&255)&&255!=(B&255)&&(I.unmult=255/(B&255),B=(I.__clamp[Math.round((B>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((B>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((B>>>8&255)*I.unmult)]&255)<<8|B&255);v=b.byteOffset+b.stride*(K-Q+1)+4*(L-J+1);C=h;A=r;null==A&&(A=!1);null==C&&(C=0);switch(C){case 0:D=(m[v]&255)<<24|(m[v+1]&255)<<16|(m[v+2]&255)<<8|m[v+3]&255;break;case 1:D=(m[v+1]&255)<<24|(m[v+2]&255)<<16|(m[v+3]&255)<<8|m[v]&255;break;case 2:D=(m[v+2]&255)<<24|(m[v+1]&
255)<<16|(m[v]&255)<<8|m[v+3]&255}A&&0!=(D&255)&&255!=(D&255)&&(I.unmult=255/(D&255),D=(I.__clamp[Math.round((D>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((D>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((D>>>8&255)*I.unmult)]&255)<<8|D&255);v=b.byteOffset+b.stride*(K-Q)+4*(L-J);C=h;A=r;null==A&&(A=!1);null==C&&(C=0);switch(C){case 0:E=(m[v]&255)<<24|(m[v+1]&255)<<16|(m[v+2]&255)<<8|m[v+3]&255;break;case 1:E=(m[v+1]&255)<<24|(m[v+2]&255)<<16|(m[v+3]&255)<<8|m[v]&255;break;case 2:E=
(m[v+2]&255)<<24|(m[v+1]&255)<<16|(m[v]&255)<<8|m[v+3]&255}A&&0!=(E&255)&&255!=(E&255)&&(I.unmult=255/(E&255),E=(I.__clamp[Math.round((E>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((E>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((E>>>8&255)*I.unmult)]&255)<<8|E&255);v=Qa.bilinear(F,B,D,E,d.x-J,d.y-Q)}else{J=c.byteOffset+c.stride*(K-Q)+4*(L-J);Q=h;C=r;null==C&&(C=!1);null==Q&&(Q=0);switch(Q){case 0:v=(m[J]&255)<<24|(m[J+1]&255)<<16|(m[J+2]&255)<<8|m[J+3]&255;break;case 1:v=(m[J+1]&255)<<
24|(m[J+2]&255)<<16|(m[J+3]&255)<<8|m[J]&255;break;case 2:v=(m[J+2]&255)<<24|(m[J+1]&255)<<16|(m[J]&255)<<8|m[J+3]&255}C&&0!=(v&255)&&255!=(v&255)&&(I.unmult=255/(v&255),v=(I.__clamp[Math.round((v>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((v>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((v>>>8&255)*I.unmult)]&255)<<8|v&255)}J=(v&255)/255;Q=((v>>>24&255)-128)/255*J;C=((v>>>16&255)-128)/255*J;J=Q*e.x+C*f.x;A=Q*e.y+C*f.y;Q=Math.floor(J*b.width);C=Math.floor(A*b.height);if(g){w=b.byteOffset+
b.stride*(K+C+1)+4*(L+Q);var N=n,P=t;null==P&&(P=!1);null==N&&(N=0);switch(N){case 0:F=(l[w]&255)<<24|(l[w+1]&255)<<16|(l[w+2]&255)<<8|l[w+3]&255;break;case 1:F=(l[w+1]&255)<<24|(l[w+2]&255)<<16|(l[w+3]&255)<<8|l[w]&255;break;case 2:F=(l[w+2]&255)<<24|(l[w+1]&255)<<16|(l[w]&255)<<8|l[w+3]&255}P&&0!=(F&255)&&255!=(F&255)&&(I.unmult=255/(F&255),F=(I.__clamp[Math.round((F>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((F>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((F>>>8&255)*I.unmult)]&
255)<<8|F&255);w=b.byteOffset+b.stride*(K+C)+4*(L+Q+1);N=n;P=t;null==P&&(P=!1);null==N&&(N=0);switch(N){case 0:B=(l[w]&255)<<24|(l[w+1]&255)<<16|(l[w+2]&255)<<8|l[w+3]&255;break;case 1:B=(l[w+1]&255)<<24|(l[w+2]&255)<<16|(l[w+3]&255)<<8|l[w]&255;break;case 2:B=(l[w+2]&255)<<24|(l[w+1]&255)<<16|(l[w]&255)<<8|l[w+3]&255}P&&0!=(B&255)&&255!=(B&255)&&(I.unmult=255/(B&255),B=(I.__clamp[Math.round((B>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((B>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((B>>>
8&255)*I.unmult)]&255)<<8|B&255);w=b.byteOffset+b.stride*(K+C+1)+4*(L+Q+1);N=n;P=t;null==P&&(P=!1);null==N&&(N=0);switch(N){case 0:D=(l[w]&255)<<24|(l[w+1]&255)<<16|(l[w+2]&255)<<8|l[w+3]&255;break;case 1:D=(l[w+1]&255)<<24|(l[w+2]&255)<<16|(l[w+3]&255)<<8|l[w]&255;break;case 2:D=(l[w+2]&255)<<24|(l[w+1]&255)<<16|(l[w]&255)<<8|l[w+3]&255}P&&0!=(D&255)&&255!=(D&255)&&(I.unmult=255/(D&255),D=(I.__clamp[Math.round((D>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((D>>>16&255)*I.unmult)]&255)<<16|
(I.__clamp[Math.round((D>>>8&255)*I.unmult)]&255)<<8|D&255);L=b.byteOffset+b.stride*(K+C)+4*(L+Q);w=n;N=t;null==N&&(N=!1);null==w&&(w=0);switch(w){case 0:E=(l[L]&255)<<24|(l[L+1]&255)<<16|(l[L+2]&255)<<8|l[L+3]&255;break;case 1:E=(l[L+1]&255)<<24|(l[L+2]&255)<<16|(l[L+3]&255)<<8|l[L]&255;break;case 2:E=(l[L+2]&255)<<24|(l[L+1]&255)<<16|(l[L]&255)<<8|l[L+3]&255}N&&0!=(E&255)&&255!=(E&255)&&(I.unmult=255/(E&255),E=(I.__clamp[Math.round((E>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((E>>>16&
255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((E>>>8&255)*I.unmult)]&255)<<8|E&255);w=Qa.bilinear(F,B,D,E,J*b.width-Q,A*b.height-C)}else{L=b.byteOffset+b.stride*(K+C)+4*(L+Q);J=n;Q=t;null==Q&&(Q=!1);null==J&&(J=0);switch(J){case 0:w=(l[L]&255)<<24|(l[L+1]&255)<<16|(l[L+2]&255)<<8|l[L+3]&255;break;case 1:w=(l[L+1]&255)<<24|(l[L+2]&255)<<16|(l[L+3]&255)<<8|l[L]&255;break;case 2:w=(l[L+2]&255)<<24|(l[L+1]&255)<<16|(l[L]&255)<<8|l[L+3]&255}Q&&0!=(w&255)&&255!=(w&255)&&(I.unmult=255/(w&255),w=(I.__clamp[Math.round((w>>>
24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((w>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((w>>>8&255)*I.unmult)]&255)<<8|w&255)}L=p;J=q;null==J&&(J=!1);null==L&&(L=0);J&&(0==(w&255)?0!=w&&(w=0):255!=(w&255)&&(I.a16=I.__alpha16[w&255],w=((w>>>24&255)*I.a16>>16&255)<<24|((w>>>16&255)*I.a16>>16&255)<<16|((w>>>8&255)*I.a16>>16&255)<<8|w&255));switch(L){case 0:k[x]=w>>>24&255;k[x+1]=w>>>16&255;k[x+2]=w>>>8&255;k[x+3]=w&255;break;case 1:k[x]=w&255;k[x+1]=w>>>24&255;k[x+2]=w>>>16&255;k[x+
3]=w>>>8&255;break;case 2:k[x]=w>>>8&255,k[x+1]=w>>>16&255,k[x+2]=w>>>24&255,k[x+3]=w&255}}}a.dirty=!0;a.version++};Qa.bilinear=function(a,b,c,d,e,f){return Qa.lerpRGBA(Qa.lerpRGBA(d,b,e),Qa.lerpRGBA(a,c,e),f)};Qa.lerpRGBA=function(a,b,c){var d=0;d=(Math.floor(Qa.lerp(a>>>24&255,b>>>24&255,c))&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|d&255;var e=Math.floor(Qa.lerp(a>>>16&255,b>>>16&255,c));d=(d>>>24&255)<<24|(e&255)<<16|(d>>>8&255)<<8|d&255;e=Math.floor(Qa.lerp(a>>>8&255,b>>>8&255,c));d=(d>>>24&255)<<
24|(d>>>16&255)<<16|(e&255)<<8|d&255;a=Math.floor(Qa.lerp(a&255,b&255,c));return(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|a&255};Qa.lerp4f=function(a,b,c){return new Ac(Qa.lerp(a.x,b.x,c),Qa.lerp(a.y,b.y,c),Qa.lerp(a.z,b.z,c),Qa.lerp(a.w,b.w,c))};Qa.lerp=function(a,b,c){return(1-c)*a+c*b};Qa.colorTransform=function(a,b,c){var d=a.buffer.data;if(null!=d){var e=a.buffer.format,f=a.buffer.premultiplied;b=new hf(a,b);var g=Hb.getAlphaTable(c),k=Hb.getRedTable(c),l=Hb.getGreenTable(c);c=Hb.getBlueTable(c);
for(var m,p,n,h=0,q=b.height;h<q;){m=h++;m=b.byteOffset+b.stride*m;for(var t=0,r=b.width;t<r;){p=t++;p=m+4*p;var u=e,x=f;null==x&&(x=!1);null==u&&(u=0);switch(u){case 0:n=(d[p]&255)<<24|(d[p+1]&255)<<16|(d[p+2]&255)<<8|d[p+3]&255;break;case 1:n=(d[p+1]&255)<<24|(d[p+2]&255)<<16|(d[p+3]&255)<<8|d[p]&255;break;case 2:n=(d[p+2]&255)<<24|(d[p+1]&255)<<16|(d[p]&255)<<8|d[p+3]&255}x&&0!=(n&255)&&255!=(n&255)&&(I.unmult=255/(n&255),n=(I.__clamp[Math.round((n>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((n>>>
16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((n>>>8&255)*I.unmult)]&255)<<8|n&255);n=(k[n>>>24&255]&255)<<24|(l[n>>>16&255]&255)<<16|(c[n>>>8&255]&255)<<8|g[n&255]&255;u=e;x=f;null==x&&(x=!1);null==u&&(u=0);x&&(0==(n&255)?0!=n&&(n=0):255!=(n&255)&&(I.a16=I.__alpha16[n&255],n=((n>>>24&255)*I.a16>>16&255)<<24|((n>>>16&255)*I.a16>>16&255)<<16|((n>>>8&255)*I.a16>>16&255)<<8|n&255));switch(u){case 0:d[p]=n>>>24&255;d[p+1]=n>>>16&255;d[p+2]=n>>>8&255;d[p+3]=n&255;break;case 1:d[p]=n&255;d[p+1]=n>>>
24&255;d[p+2]=n>>>16&255;d[p+3]=n>>>8&255;break;case 2:d[p]=n>>>8&255,d[p+1]=n>>>16&255,d[p+2]=n>>>24&255,d[p+3]=n&255}}}a.dirty=!0;a.version++}};Qa.copyChannel=function(a,b,c,d,e,f){switch(f._hx_index){case 0:var g=0;break;case 1:g=1;break;case 2:g=2;break;case 3:g=3}switch(e._hx_index){case 0:var 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 hf(b,c);d=new hf(a,new he(d.x,d.y,c.width,c.height));var l=b.buffer.format,m=a.buffer.format;
b=b.buffer.premultiplied;for(var p=a.buffer.premultiplied,n,h,q,t,r=0,u=0,x=d.height;u<x;){h=u++;n=c.byteOffset+c.stride*h;h=d.byteOffset+d.stride*h;for(var w=0,v=d.width;w<v;){w++;var Q=l,C=b;null==C&&(C=!1);null==Q&&(Q=0);switch(Q){case 0:q=(e[n]&255)<<24|(e[n+1]&255)<<16|(e[n+2]&255)<<8|e[n+3]&255;break;case 1:q=(e[n+1]&255)<<24|(e[n+2]&255)<<16|(e[n+3]&255)<<8|e[n]&255;break;case 2:q=(e[n+2]&255)<<24|(e[n+1]&255)<<16|(e[n]&255)<<8|e[n+3]&255}C&&0!=(q&255)&&255!=(q&255)&&(I.unmult=255/(q&255),
q=(I.__clamp[Math.round((q>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((q>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((q>>>8&255)*I.unmult)]&255)<<8|q&255);Q=m;C=p;null==C&&(C=!1);null==Q&&(Q=0);switch(Q){case 0:t=(f[h]&255)<<24|(f[h+1]&255)<<16|(f[h+2]&255)<<8|f[h+3]&255;break;case 1:t=(f[h+1]&255)<<24|(f[h+2]&255)<<16|(f[h+3]&255)<<8|f[h]&255;break;case 2:t=(f[h+2]&255)<<24|(f[h+1]&255)<<16|(f[h]&255)<<8|f[h+3]&255}C&&0!=(t&255)&&255!=(t&255)&&(I.unmult=255/(t&255),t=(I.__clamp[Math.round((t>>>
24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((t>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((t>>>8&255)*I.unmult)]&255)<<8|t&255);switch(k){case 0:r=q>>>24&255;break;case 1:r=q>>>16&255;break;case 2:r=q>>>8&255;break;case 3:r=q&255}switch(g){case 0:t=(r&255)<<24|(t>>>16&255)<<16|(t>>>8&255)<<8|t&255;break;case 1:t=(t>>>24&255)<<24|(r&255)<<16|(t>>>8&255)<<8|t&255;break;case 2:t=(t>>>24&255)<<24|(t>>>16&255)<<16|(r&255)<<8|t&255;break;case 3:t=(t>>>24&255)<<24|(t>>>16&255)<<16|(t>>>8&
255)<<8|r&255}Q=m;C=p;null==C&&(C=!1);null==Q&&(Q=0);C&&(0==(t&255)?0!=t&&(t=0):255!=(t&255)&&(I.a16=I.__alpha16[t&255],t=((t>>>24&255)*I.a16>>16&255)<<24|((t>>>16&255)*I.a16>>16&255)<<16|((t>>>8&255)*I.a16>>16&255)<<8|t&255));switch(Q){case 0:f[h]=t>>>24&255;f[h+1]=t>>>16&255;f[h+2]=t>>>8&255;f[h+3]=t&255;break;case 1:f[h]=t&255;f[h+1]=t>>>24&255;f[h+2]=t>>>16&255;f[h+3]=t>>>8&255;break;case 2:f[h]=t>>>8&255,f[h+1]=t>>>16&255,f[h+2]=t>>>24&255,f[h+3]=t&255}n+=4;h+=4}}a.dirty=!0;a.version++}};Qa.copyPixels=
function(a,b,c,d,e,f,g){null==g&&(g=!1);if(a.width==b.width&&a.height==b.height&&c.width==b.width&&c.height==b.height&&0==c.x&&0==c.y&&0==d.x&&0==d.y&&null==e&&null==f&&0==g&&a.get_format()==b.get_format())a.buffer.data.set(b.buffer.data);else{var k=b.buffer.data,l=a.buffer.data;if(null==k||null==l)return;c=new hf(b,c);var m=new he(d.x,d.y,c.width,c.height);m=new hf(a,m);var p=b.buffer.format,n=a.buffer.format,h=b.buffer.premultiplied,q=a.buffer.premultiplied,t=b.buffer.bitsPerPixel/8|0,r=a.buffer.bitsPerPixel/
8|0,u=null!=e&&e.get_transparent();g=g||u&&!a.get_transparent()||!g&&!a.get_transparent()&&b.get_transparent();if(u)if(r=e.buffer.data,b=e.buffer.format,f=new hf(e,new he(c.x+(null==f?0:f.x),c.y+(null==f?0:f.y),c.width,c.height)),m.clip(d.x|0,d.y|0,f.width,f.height),g)for(t=0,u=m.height;t<u;){g=t++;d=c.byteOffset+c.stride*g;e=m.byteOffset+m.stride*g;g=f.byteOffset+f.stride*g;for(var x=0,w=m.width;x<w;){x++;var v=p;var Q=h;null==Q&&(Q=!1);null==v&&(v=0);switch(v){case 0:var C=(k[d]&255)<<24|(k[d+1]&
255)<<16|(k[d+2]&255)<<8|k[d+3]&255;break;case 1:C=(k[d+1]&255)<<24|(k[d+2]&255)<<16|(k[d+3]&255)<<8|k[d]&255;break;case 2:C=(k[d+2]&255)<<24|(k[d+1]&255)<<16|(k[d]&255)<<8|k[d+3]&255}Q&&0!=(C&255)&&255!=(C&255)&&(I.unmult=255/(C&255),C=(I.__clamp[Math.round((C>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((C>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((C>>>8&255)*I.unmult)]&255)<<8|C&255);v=n;Q=q;null==Q&&(Q=!1);null==v&&(v=0);switch(v){case 0:var J=(l[e]&255)<<24|(l[e+1]&255)<<16|
(l[e+2]&255)<<8|l[e+3]&255;break;case 1:J=(l[e+1]&255)<<24|(l[e+2]&255)<<16|(l[e+3]&255)<<8|l[e]&255;break;case 2:J=(l[e+2]&255)<<24|(l[e+1]&255)<<16|(l[e]&255)<<8|l[e+3]&255}Q&&0!=(J&255)&&255!=(J&255)&&(I.unmult=255/(J&255),J=(I.__clamp[Math.round((J>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((J>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((J>>>8&255)*I.unmult)]&255)<<8|J&255);v=b;Q=!1;null==Q&&(Q=!1);null==v&&(v=0);switch(v){case 0:var F=(r[g]&255)<<24|(r[g+1]&255)<<16|(r[g+2]&
255)<<8|r[g+3]&255;break;case 1:F=(r[g+1]&255)<<24|(r[g+2]&255)<<16|(r[g+3]&255)<<8|r[g]&255;break;case 2:F=(r[g+2]&255)<<24|(r[g+1]&255)<<16|(r[g]&255)<<8|r[g+3]&255}Q&&0!=(F&255)&&255!=(F&255)&&(I.unmult=255/(F&255),F=(I.__clamp[Math.round((F>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((F>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((F>>>8&255)*I.unmult)]&255)<<8|F&255);v=(F&255)/255*((C&255)/255);if(0<v){Q=(J&255)/255;var B=1-v;var D=v+Q*B;J=(I.__clamp[Math.round(((C>>>24&255)*v+
(J>>>24&255)*Q*B)/D)]&255)<<24|(J>>>16&255)<<16|(J>>>8&255)<<8|J&255;J=(J>>>24&255)<<24|(I.__clamp[Math.round(((C>>>16&255)*v+(J>>>16&255)*Q*B)/D)]&255)<<16|(J>>>8&255)<<8|J&255;J=(J>>>24&255)<<24|(J>>>16&255)<<16|(I.__clamp[Math.round(((C>>>8&255)*v+(J>>>8&255)*Q*B)/D)]&255)<<8|J&255;J=(J>>>24&255)<<24|(J>>>16&255)<<16|(J>>>8&255)<<8|I.__clamp[Math.round(255*D)]&255;v=n;Q=q;null==Q&&(Q=!1);null==v&&(v=0);Q&&(0==(J&255)?0!=J&&(J=0):255!=(J&255)&&(I.a16=I.__alpha16[J&255],J=((J>>>24&255)*I.a16>>16&
255)<<24|((J>>>16&255)*I.a16>>16&255)<<16|((J>>>8&255)*I.a16>>16&255)<<8|J&255));switch(v){case 0:l[e]=J>>>24&255;l[e+1]=J>>>16&255;l[e+2]=J>>>8&255;l[e+3]=J&255;break;case 1:l[e]=J&255;l[e+1]=J>>>24&255;l[e+2]=J>>>16&255;l[e+3]=J>>>8&255;break;case 2:l[e]=J>>>8&255,l[e+1]=J>>>16&255,l[e+2]=J>>>24&255,l[e+3]=J&255}}d+=4;e+=4;g+=4}}else for(J=0,t=m.height;J<t;)for(g=J++,d=c.byteOffset+c.stride*g,e=m.byteOffset+m.stride*g,g=f.byteOffset+f.stride*g,u=0,x=m.width;u<x;){u++;w=p;v=h;null==v&&(v=!1);null==
w&&(w=0);switch(w){case 0:C=(k[d]&255)<<24|(k[d+1]&255)<<16|(k[d+2]&255)<<8|k[d+3]&255;break;case 1:C=(k[d+1]&255)<<24|(k[d+2]&255)<<16|(k[d+3]&255)<<8|k[d]&255;break;case 2:C=(k[d+2]&255)<<24|(k[d+1]&255)<<16|(k[d]&255)<<8|k[d+3]&255}v&&0!=(C&255)&&255!=(C&255)&&(I.unmult=255/(C&255),C=(I.__clamp[Math.round((C>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((C>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((C>>>8&255)*I.unmult)]&255)<<8|C&255);w=b;v=!1;null==v&&(v=!1);null==w&&(w=0);switch(w){case 0:F=
(r[g]&255)<<24|(r[g+1]&255)<<16|(r[g+2]&255)<<8|r[g+3]&255;break;case 1:F=(r[g+1]&255)<<24|(r[g+2]&255)<<16|(r[g+3]&255)<<8|r[g]&255;break;case 2:F=(r[g+2]&255)<<24|(r[g+1]&255)<<16|(r[g]&255)<<8|r[g+3]&255}v&&0!=(F&255)&&255!=(F&255)&&(I.unmult=255/(F&255),F=(I.__clamp[Math.round((F>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((F>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((F>>>8&255)*I.unmult)]&255)<<8|F&255);C=(C>>>24&255)<<24|(C>>>16&255)<<16|(C>>>8&255)<<8|Math.round((F&255)/255*
(C&255))&255;w=n;v=q;null==v&&(v=!1);null==w&&(w=0);v&&(0==(C&255)?0!=C&&(C=0):255!=(C&255)&&(I.a16=I.__alpha16[C&255],C=((C>>>24&255)*I.a16>>16&255)<<24|((C>>>16&255)*I.a16>>16&255)<<16|((C>>>8&255)*I.a16>>16&255)<<8|C&255));switch(w){case 0:l[e]=C>>>24&255;l[e+1]=C>>>16&255;l[e+2]=C>>>8&255;l[e+3]=C&255;break;case 1:l[e]=C&255;l[e+1]=C>>>24&255;l[e+2]=C>>>16&255;l[e+3]=C>>>8&255;break;case 2:l[e]=C>>>8&255,l[e+1]=C>>>16&255,l[e+2]=C>>>24&255,l[e+3]=C&255}d+=4;e+=4;g+=4}else if(g)for(F=0,r=m.height;F<
r;)for(e=F++,d=c.byteOffset+c.stride*e,e=m.byteOffset+m.stride*e,b=0,f=m.width;b<f;){b++;g=p;t=h;null==t&&(t=!1);null==g&&(g=0);switch(g){case 0:C=(k[d]&255)<<24|(k[d+1]&255)<<16|(k[d+2]&255)<<8|k[d+3]&255;break;case 1:C=(k[d+1]&255)<<24|(k[d+2]&255)<<16|(k[d+3]&255)<<8|k[d]&255;break;case 2:C=(k[d+2]&255)<<24|(k[d+1]&255)<<16|(k[d]&255)<<8|k[d+3]&255}t&&0!=(C&255)&&255!=(C&255)&&(I.unmult=255/(C&255),C=(I.__clamp[Math.round((C>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((C>>>16&255)*I.unmult)]&
255)<<16|(I.__clamp[Math.round((C>>>8&255)*I.unmult)]&255)<<8|C&255);g=n;t=q;null==t&&(t=!1);null==g&&(g=0);switch(g){case 0:J=(l[e]&255)<<24|(l[e+1]&255)<<16|(l[e+2]&255)<<8|l[e+3]&255;break;case 1:J=(l[e+1]&255)<<24|(l[e+2]&255)<<16|(l[e+3]&255)<<8|l[e]&255;break;case 2:J=(l[e+2]&255)<<24|(l[e+1]&255)<<16|(l[e]&255)<<8|l[e+3]&255}t&&0!=(J&255)&&255!=(J&255)&&(I.unmult=255/(J&255),J=(I.__clamp[Math.round((J>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((J>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((J>>>
8&255)*I.unmult)]&255)<<8|J&255);v=(C&255)/255;Q=(J&255)/255;B=1-v;D=v+Q*B;0==D?J=0:(J=(I.__clamp[Math.round(((C>>>24&255)*v+(J>>>24&255)*Q*B)/D)]&255)<<24|(J>>>16&255)<<16|(J>>>8&255)<<8|J&255,J=(J>>>24&255)<<24|(I.__clamp[Math.round(((C>>>16&255)*v+(J>>>16&255)*Q*B)/D)]&255)<<16|(J>>>8&255)<<8|J&255,J=(J>>>24&255)<<24|(J>>>16&255)<<16|(I.__clamp[Math.round(((C>>>8&255)*v+(J>>>8&255)*Q*B)/D)]&255)<<8|J&255,J=(J>>>24&255)<<24|(J>>>16&255)<<16|(J>>>8&255)<<8|I.__clamp[Math.round(255*D)]&255);g=n;t=
q;null==t&&(t=!1);null==g&&(g=0);t&&(0==(J&255)?0!=J&&(J=0):255!=(J&255)&&(I.a16=I.__alpha16[J&255],J=((J>>>24&255)*I.a16>>16&255)<<24|((J>>>16&255)*I.a16>>16&255)<<16|((J>>>8&255)*I.a16>>16&255)<<8|J&255));switch(g){case 0:l[e]=J>>>24&255;l[e+1]=J>>>16&255;l[e+2]=J>>>8&255;l[e+3]=J&255;break;case 1:l[e]=J&255;l[e+1]=J>>>24&255;l[e+2]=J>>>16&255;l[e+3]=J>>>8&255;break;case 2:l[e]=J>>>8&255,l[e+1]=J>>>16&255,l[e+2]=J>>>24&255,l[e+3]=J&255}d+=4;e+=4}else if(p==n&&h==q&&t==r)for(C=0,p=m.height;C<p;)n=
C++,d=c.byteOffset+c.stride*n,e=m.byteOffset+m.stride*n,l.set(k.subarray(d,d+m.width*r),e);else for(J=0,F=m.height;J<F;)for(e=J++,d=c.byteOffset+c.stride*e,e=m.byteOffset+m.stride*e,r=0,b=m.width;r<b;){r++;f=p;g=h;null==g&&(g=!1);null==f&&(f=0);switch(f){case 0:C=(k[d]&255)<<24|(k[d+1]&255)<<16|(k[d+2]&255)<<8|k[d+3]&255;break;case 1:C=(k[d+1]&255)<<24|(k[d+2]&255)<<16|(k[d+3]&255)<<8|k[d]&255;break;case 2:C=(k[d+2]&255)<<24|(k[d+1]&255)<<16|(k[d]&255)<<8|k[d+3]&255}g&&0!=(C&255)&&255!=(C&255)&&(I.unmult=
255/(C&255),C=(I.__clamp[Math.round((C>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((C>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((C>>>8&255)*I.unmult)]&255)<<8|C&255);f=n;g=q;null==g&&(g=!1);null==f&&(f=0);g&&(0==(C&255)?0!=C&&(C=0):255!=(C&255)&&(I.a16=I.__alpha16[C&255],C=((C>>>24&255)*I.a16>>16&255)<<24|((C>>>16&255)*I.a16>>16&255)<<16|((C>>>8&255)*I.a16>>16&255)<<8|C&255));switch(f){case 0:l[e]=C>>>24&255;l[e+1]=C>>>16&255;l[e+2]=C>>>8&255;l[e+3]=C&255;break;case 1:l[e]=C&255;
l[e+1]=C>>>24&255;l[e+2]=C>>>16&255;l[e+3]=C>>>8&255;break;case 2:l[e]=C>>>8&255,l[e+1]=C>>>16&255,l[e+2]=C>>>24&255,l[e+3]=C&255}d+=4;e+=4}}a.dirty=!0;a.version++};Qa.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}a.get_transparent()||(c=(c>>>24&255)<<24|(c>>>16&255)<<16|(c>>>8&255)<<8|255);d=a.buffer.data;if(null!=d){var e=a.buffer.format;a.buffer.premultiplied&&(0==(c&255)?
0!=c&&(c=0):255!=(c&255)&&(I.a16=I.__alpha16[c&255],c=((c>>>24&255)*I.a16>>16&255)<<24|((c>>>16&255)*I.a16>>16&255)<<16|((c>>>8&255)*I.a16>>16&255)<<8|c&255));b=new hf(a,b);for(var f,g=0,k=b.height;g<k;){f=g++;f=b.byteOffset+b.stride*f;for(var l=0,m=b.width;l<m;){var p=l++;p=f+4*p;var n=e,h=!1;null==h&&(h=!1);null==n&&(n=0);h&&(0==(c&255)?0!=c&&(c=0):255!=(c&255)&&(I.a16=I.__alpha16[c&255],c=((c>>>24&255)*I.a16>>16&255)<<24|((c>>>16&255)*I.a16>>16&255)<<16|((c>>>8&255)*I.a16>>16&255)<<8|c&255));switch(n){case 0:d[p]=
c>>>24&255;d[p+1]=c>>>16&255;d[p+2]=c>>>8&255;d[p+3]=c&255;break;case 1:d[p]=c&255;d[p+1]=c>>>24&255;d[p+2]=c>>>16&255;d[p+3]=c>>>8&255;break;case 2:d[p]=c>>>8&255,d[p+1]=c>>>16&255,d[p+2]=c>>>24&255,d[p+3]=c&255}}}a.dirty=!0;a.version++}};Qa.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=4*(c+a.offsetY)*a.buffer.width+4*(b+a.offsetX),l=e,m=g;null==m&&(m=!1);null==l&&(l=0);switch(l){case 0:var p=(f[k]&
255)<<24|(f[k+1]&255)<<16|(f[k+2]&255)<<8|f[k+3]&255;break;case 1:p=(f[k+1]&255)<<24|(f[k+2]&255)<<16|(f[k+3]&255)<<8|f[k]&255;break;case 2:p=(f[k+2]&255)<<24|(f[k+1]&255)<<16|(f[k]&255)<<8|f[k+3]&255}m&&0!=(p&255)&&255!=(p&255)&&(I.unmult=255/(p&255),p=(I.__clamp[Math.round((p>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((p>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((p>>>8&255)*I.unmult)]&255)<<8|p&255);a.get_transparent()||(d=(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|255,
p=(p>>>24&255)<<24|(p>>>16&255)<<16|(p>>>8&255)<<8|255);if(d!=p){g&&(0==(d&255)?0!=d&&(d=0):255!=(d&255)&&(I.a16=I.__alpha16[d&255],d=((d>>>24&255)*I.a16>>16&255)<<24|((d>>>16&255)*I.a16>>16&255)<<16|((d>>>8&255)*I.a16>>16&255)<<8|d&255));k=[0,-1,1,0];l=[-1,0,0,1];m=-a.offsetX;var n=-a.offsetY,h=m+a.width,q=n+a.height,t=[];t.push(b);t.push(c);for(var r,u,x,v;0<t.length;){c=t.pop();b=t.pop();for(var w=0;4>w;)if(u=w++,r=b+k[u],u=c+l[u],!(r<m||u<n||r>=h||u>=q)){x=4*(u*a.width+r);var C=e,J=g;null==J&&
(J=!1);null==C&&(C=0);switch(C){case 0:v=(f[x]&255)<<24|(f[x+1]&255)<<16|(f[x+2]&255)<<8|f[x+3]&255;break;case 1:v=(f[x+1]&255)<<24|(f[x+2]&255)<<16|(f[x+3]&255)<<8|f[x]&255;break;case 2:v=(f[x+2]&255)<<24|(f[x+1]&255)<<16|(f[x]&255)<<8|f[x+3]&255}J&&0!=(v&255)&&255!=(v&255)&&(I.unmult=255/(v&255),v=(I.__clamp[Math.round((v>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((v>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((v>>>8&255)*I.unmult)]&255)<<8|v&255);if(v==p){C=e;J=!1;null==J&&(J=
!1);null==C&&(C=0);J&&(0==(d&255)?0!=d&&(d=0):255!=(d&255)&&(I.a16=I.__alpha16[d&255],d=((d>>>24&255)*I.a16>>16&255)<<24|((d>>>16&255)*I.a16>>16&255)<<16|((d>>>8&255)*I.a16>>16&255)<<8|d&255));switch(C){case 0:f[x]=d>>>24&255;f[x+1]=d>>>16&255;f[x+2]=d>>>8&255;f[x+3]=d&255;break;case 1:f[x]=d&255;f[x+1]=d>>>24&255;f[x+2]=d>>>16&255;f[x+3]=d>>>8&255;break;case 2:f[x]=d>>>8&255,f[x+1]=d>>>16&255,f[x+2]=d>>>24&255,f[x+3]=d&255}t.push(r);t.push(u)}}}a.dirty=!0;a.version++}}};Qa.gaussianBlur=function(a,
b,c,d,e,f,g,k,l){null==g&&(g=1);null==f&&(f=4);null==e&&(e=4);(k=a.get_premultiplied())&&a.set_premultiplied(!1);Bf.blur(a,b,c,d,e,f,g);a.dirty=!0;a.version++;k&&a.set_premultiplied(!0);return a};Qa.getColorBoundsRect=function(a,b,c,d,e){var f=a.width+1,g=0,k=a.height+1,l=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}a.get_transparent()||(c=(c>>>24&255)<<24|(c>>>16&255)<<16|(c>>>8&255)<<8|255,b=(b>>>24&255)<<24|(b>>>16&255)<<16|(b>>>8&255)<<8|255);for(var m=0,p=a.width;m<p;){var n=m++;e=!1;for(var h=0,q=a.height;h<q;)if(e=h++,e=a.getPixel32(n,e,0),e=d?(e&b)==c:(e&b)!=c){n<f&&(f=n);break}if(e)break}m=0;for(p=a.width;m<p;){e=m++;n=a.width-1-e;e=!1;h=0;for(q=a.height;h<q;)if(e=h++,e=a.getPixel32(n,e,0),e=d?(e&b)==c:(e&b)!=c){n>g&&(g=n);break}if(e)break}m=0;for(p=a.height;m<p;){n=m++;
e=!1;h=0;for(q=a.width;h<q;)if(e=h++,e=a.getPixel32(e,n,0),e=d?(e&b)==c:(e&b)!=c){n<k&&(k=n);break}if(e)break}m=0;for(p=a.height;m<p;){e=m++;n=a.height-1-e;e=!1;h=0;for(q=a.width;h<q;)if(e=h++,e=a.getPixel32(e,n,0),e=d?(e&b)==c:(e&b)!=c){n>l&&(l=n);break}if(e)break}d=g-f;c=l-k;0<d&&++d;0<c&&++c;0>d&&(d=0);0>c&&(c=0);f==g&&(d=1);k==l&&(c=1);f>a.width&&(f=0);k>a.height&&(k=0);return new he(f,k,d,c)};Qa.getPixel=function(a,b,c,d){var e=a.buffer.data;b=4*(c+a.offsetY)*a.buffer.width+4*(b+a.offsetX);c=
a.buffer.format;a=a.buffer.premultiplied;null==a&&(a=!1);null==c&&(c=0);switch(c){case 0:var f=(e[b]&255)<<24|(e[b+1]&255)<<16|(e[b+2]&255)<<8|e[b+3]&255;break;case 1:f=(e[b+1]&255)<<24|(e[b+2]&255)<<16|(e[b+3]&255)<<8|e[b]&255;break;case 2:f=(e[b+2]&255)<<24|(e[b+1]&255)<<16|(e[b]&255)<<8|e[b+3]&255}a&&0!=(f&255)&&255!=(f&255)&&(I.unmult=255/(f&255),f=(I.__clamp[Math.round((f>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((f>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((f>>>8&255)*I.unmult)]&
255)<<8|f&255);f=(f>>>24&255)<<24|(f>>>16&255)<<16|(f>>>8&255)<<8|0;switch(d){case 1:return(f&255)<<24|(f>>>24&255)<<16|(f>>>16&255)<<8|f>>>8&255;case 2:return(f>>>8&255)<<24|(f>>>16&255)<<16|(f>>>24&255)<<8|f&255;default:return f}};Qa.getPixel32=function(a,b,c,d){var e=a.buffer.data;b=4*(c+a.offsetY)*a.buffer.width+4*(b+a.offsetX);c=a.buffer.format;a=a.buffer.premultiplied;null==a&&(a=!1);null==c&&(c=0);switch(c){case 0:var f=(e[b]&255)<<24|(e[b+1]&255)<<16|(e[b+2]&255)<<8|e[b+3]&255;break;case 1:f=
(e[b+1]&255)<<24|(e[b+2]&255)<<16|(e[b+3]&255)<<8|e[b]&255;break;case 2:f=(e[b+2]&255)<<24|(e[b+1]&255)<<16|(e[b]&255)<<8|e[b+3]&255}a&&0!=(f&255)&&255!=(f&255)&&(I.unmult=255/(f&255),f=(I.__clamp[Math.round((f>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((f>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((f>>>8&255)*I.unmult)]&255)<<8|f&255);switch(d){case 1:return(f&255)<<24|(f>>>24&255)<<16|(f>>>16&255)<<8|f>>>8&255;case 2:return(f>>>8&255)<<24|(f>>>16&255)<<16|(f>>>24&255)<<8|f&255;
default:return f}};Qa.getPixels=function(a,b,c){if(null==a.buffer.data)return null;var d=new hb(new ArrayBuffer(4*(b.width*b.height|0))),e=a.buffer.data,f=a.buffer.format,g=a.buffer.premultiplied;a=new hf(a,b);for(var k,l,m=b=0,p=a.height;m<p;){k=m++;k=a.byteOffset+a.stride*k;for(var n=0,h=a.width;n<h;){n++;var q=f,t=g;null==t&&(t=!1);null==q&&(q=0);switch(q){case 0:l=(e[k]&255)<<24|(e[k+1]&255)<<16|(e[k+2]&255)<<8|e[k+3]&255;break;case 1:l=(e[k+1]&255)<<24|(e[k+2]&255)<<16|(e[k+3]&255)<<8|e[k]&255;
break;case 2:l=(e[k+2]&255)<<24|(e[k+1]&255)<<16|(e[k]&255)<<8|e[k+3]&255}t&&0!=(l&255)&&255!=(l&255)&&(I.unmult=255/(l&255),l=(I.__clamp[Math.round((l>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((l>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((l>>>8&255)*I.unmult)]&255)<<8|l&255);switch(c){case 1:l=(l&255)<<24|(l>>>24&255)<<16|(l>>>16&255)<<8|l>>>8&255;break;case 2:l=(l>>>8&255)<<24|(l>>>16&255)<<16|(l>>>24&255)<<8|l&255}d.b[b++]=l>>>24&255;d.b[b++]=l>>>16&255;d.b[b++]=l>>>8&255;d.b[b++]=
l&255;k+=4}}return d};Qa.merge=function(a,b,c,d,e,f,g,k){if(null!=a.buffer.data&&null!=b.buffer.data){c=new hf(b,c);d=new hf(a,new he(d.x,d.y,c.width,c.height));var l=b.buffer.data,m=a.buffer.data,p=b.buffer.format,n=a.buffer.format;b=b.buffer.premultiplied;for(var h=a.buffer.premultiplied,q,t,r,u,x=0,v=d.height;x<v;){t=x++;q=c.byteOffset+c.stride*t;t=d.byteOffset+d.stride*t;for(var w=0,C=d.width;w<C;){w++;var J=p,Q=b;null==Q&&(Q=!1);null==J&&(J=0);switch(J){case 0:r=(l[q]&255)<<24|(l[q+1]&255)<<
16|(l[q+2]&255)<<8|l[q+3]&255;break;case 1:r=(l[q+1]&255)<<24|(l[q+2]&255)<<16|(l[q+3]&255)<<8|l[q]&255;break;case 2:r=(l[q+2]&255)<<24|(l[q+1]&255)<<16|(l[q]&255)<<8|l[q+3]&255}Q&&0!=(r&255)&&255!=(r&255)&&(I.unmult=255/(r&255),r=(I.__clamp[Math.round((r>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((r>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((r>>>8&255)*I.unmult)]&255)<<8|r&255);J=n;Q=h;null==Q&&(Q=!1);null==J&&(J=0);switch(J){case 0:u=(m[t]&255)<<24|(m[t+1]&255)<<16|(m[t+2]&255)<<
8|m[t+3]&255;break;case 1:u=(m[t+1]&255)<<24|(m[t+2]&255)<<16|(m[t+3]&255)<<8|m[t]&255;break;case 2:u=(m[t+2]&255)<<24|(m[t+1]&255)<<16|(m[t]&255)<<8|m[t+3]&255}Q&&0!=(u&255)&&255!=(u&255)&&(I.unmult=255/(u&255),u=(I.__clamp[Math.round((u>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((u>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((u>>>8&255)*I.unmult)]&255)<<8|u&255);u=((((r>>>24&255)*e+(u>>>24&255)*(256-e))/256|0)&255)<<24|(u>>>16&255)<<16|(u>>>8&255)<<8|u&255;u=(u>>>24&255)<<24|((((r>>>
16&255)*f+(u>>>16&255)*(256-f))/256|0)&255)<<16|(u>>>8&255)<<8|u&255;u=(u>>>24&255)<<24|(u>>>16&255)<<16|((((r>>>8&255)*g+(u>>>8&255)*(256-g))/256|0)&255)<<8|u&255;u=(u>>>24&255)<<24|(u>>>16&255)<<16|(u>>>8&255)<<8|(((r&255)*k+(u&255)*(256-k))/256|0)&255;J=n;Q=h;null==Q&&(Q=!1);null==J&&(J=0);Q&&(0==(u&255)?0!=u&&(u=0):255!=(u&255)&&(I.a16=I.__alpha16[u&255],u=((u>>>24&255)*I.a16>>16&255)<<24|((u>>>16&255)*I.a16>>16&255)<<16|((u>>>8&255)*I.a16>>16&255)<<8|u&255));switch(J){case 0:m[t]=u>>>24&255;
m[t+1]=u>>>16&255;m[t+2]=u>>>8&255;m[t+3]=u&255;break;case 1:m[t]=u&255;m[t+1]=u>>>24&255;m[t+2]=u>>>16&255;m[t+3]=u>>>8&255;break;case 2:m[t]=u>>>8&255,m[t+1]=u>>>16&255,m[t+2]=u>>>24&255,m[t+3]=u&255}q+=4;t+=4}}a.dirty=!0;a.version++}};Qa.multiplyAlpha=function(a){var b=a.buffer.data;if(null!=b&&a.buffer.transparent){for(var c=a.buffer.format,d,e=0,f=b.length/4|0;e<f;){var g=e++,k=4*g,l=c,m=!1;null==m&&(m=!1);null==l&&(l=0);switch(l){case 0:d=(b[k]&255)<<24|(b[k+1]&255)<<16|(b[k+2]&255)<<8|b[k+
3]&255;break;case 1:d=(b[k+1]&255)<<24|(b[k+2]&255)<<16|(b[k+3]&255)<<8|b[k]&255;break;case 2:d=(b[k+2]&255)<<24|(b[k+1]&255)<<16|(b[k]&255)<<8|b[k+3]&255}m&&0!=(d&255)&&255!=(d&255)&&(I.unmult=255/(d&255),d=(I.__clamp[Math.round((d>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((d>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((d>>>8&255)*I.unmult)]&255)<<8|d&255);g*=4;k=c;l=!0;null==l&&(l=!1);null==k&&(k=0);l&&(0==(d&255)?0!=d&&(d=0):255!=(d&255)&&(I.a16=I.__alpha16[d&255],d=((d>>>24&
255)*I.a16>>16&255)<<24|((d>>>16&255)*I.a16>>16&255)<<16|((d>>>8&255)*I.a16>>16&255)<<8|d&255));switch(k){case 0:b[g]=d>>>24&255;b[g+1]=d>>>16&255;b[g+2]=d>>>8&255;b[g+3]=d&255;break;case 1:b[g]=d&255;b[g+1]=d>>>24&255;b[g+2]=d>>>16&255;b[g+3]=d>>>8&255;break;case 2:b[g]=d>>>8&255,b[g+1]=d>>>16&255,b[g+2]=d>>>24&255,b[g+3]=d&255}}a.buffer.premultiplied=!0;a.dirty=!0;a.version++}};Qa.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 Uint8Array(e):null;e=new rg(e,
b,c);for(var f=a.width,g=a.height,k=a.get_data(),l=e.data,m,p,n,h,q,t,r,u,x,v=0;v<c;)for(var w=v++,C=0,J=b;C<J;)q=C++,u=(q+.5)/b*f-.5,x=(w+.5)/c*g-.5,t=u|0,r=x|0,m=4*(r*f+t),p=t<f-1?m+4:m,n=r<g-1?m+4*f:m,h=p!=m?n+4:n,q=4*(w*b+q),t=u-t,r=x-r,x=1-t,u=1-r,l[q]=(Da.toFloat(k[m])*x+Da.toFloat(k[p])*t)*u+(Da.toFloat(k[n])*x+Da.toFloat(k[h])*t)*r|0,l[q+1]=(Da.toFloat(k[m+1])*x+Da.toFloat(k[p+1])*t)*u+(Da.toFloat(k[n+1])*x+Da.toFloat(k[h+1])*t)*r|0,l[q+2]=(Da.toFloat(k[m+2])*x+Da.toFloat(k[p+2])*t)*u+(Da.toFloat(k[n+
2])*x+Da.toFloat(k[h+2])*t)*r|0,l[q+3]=0==k[p+3]||0==k[n+3]||0==k[h+3]?0:k[m+3];d.data=e.data;d.width=b;d.height=c;d.__srcImage=null;d.__srcImageData=null;d.__srcCanvas=null;d.__srcContext=null;a.dirty=!0;a.version++}};Qa.resizeBuffer=function(a,b,c){var d=a.buffer,e=a.get_data(),f=b*c*4;f=null!=f?new Uint8Array(f):null;for(var g,k,l=0,m=d.height;l<m;)for(var p=l++,n=0,h=d.width;n<h;)k=n++,g=4*(p*d.width+k),k=4*(p*b+k),f[k]=e[g],f[k+1]=e[g+1],f[k+2]=e[g+2],f[k+3]=e[g+3];d.data=f;d.width=b;d.height=
c;d.__srcImage=null;d.__srcImageData=null;d.__srcCanvas=null;d.__srcContext=null;a.dirty=!0;a.version++};Qa.setFormat=function(a,b){var c=a.buffer.data;if(null!=c){var d=c.length/4|0;switch(a.get_format()){case 0:var e=0;var f=1;var g=2;var k=3;break;case 1:e=1;f=2;g=3;k=0;break;case 2:e=2,f=1,g=0,k=3}switch(b){case 0:var l=0;var m=1;var p=2;var n=3;break;case 1:l=1;m=2;p=3;n=0;break;case 2:l=2,m=1,p=0,n=3}for(var h=0;h<d;){var q=4*h++;var t=c[q+e];var r=c[q+f];var u=c[q+g];var x=c[q+k];c[q+l]=t;
c[q+m]=r;c[q+p]=u;c[q+n]=x}a.buffer.format=b;a.dirty=!0;a.version++}};Qa.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}e=0;var f=a.buffer.data,g=4*(c+a.offsetY)*a.buffer.width+4*(b+a.offsetX),k=a.buffer.format,l=a.buffer.premultiplied;null==l&&(l=!1);null==k&&(k=0);switch(k){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;break;case 2:e=(f[g+2]&255)<<24|(f[g+1]&255)<<16|(f[g]&255)<<8|f[g+3]&255}l&&0!=(e&255)&&255!=(e&255)&&(I.unmult=255/(e&255),e=(I.__clamp[Math.round((e>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((e>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((e>>>8&255)*I.unmult)]&255)<<8|e&255);d=(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|e&255;e=a.buffer.data;b=4*(c+a.offsetY)*a.buffer.width+4*(b+a.offsetX);c=a.buffer.format;f=a.buffer.premultiplied;
null==f&&(f=!1);null==c&&(c=0);f&&(0==(d&255)?0!=d&&(d=0):255!=(d&255)&&(I.a16=I.__alpha16[d&255],d=((d>>>24&255)*I.a16>>16&255)<<24|((d>>>16&255)*I.a16>>16&255)<<16|((d>>>8&255)*I.a16>>16&255)<<8|d&255));switch(c){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;break;case 2:e[b]=d>>>8&255,e[b+1]=d>>>16&255,e[b+2]=d>>>24&255,e[b+3]=d&255}a.dirty=!0;a.version++};Qa.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}a.get_transparent()||(d=(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|255);e=a.buffer.data;b=4*(c+a.offsetY)*a.buffer.width+4*(b+a.offsetX);c=a.buffer.format;var f=a.buffer.premultiplied;null==f&&(f=!1);null==c&&(c=0);f&&(0==(d&255)?0!=d&&(d=0):255!=(d&255)&&(I.a16=I.__alpha16[d&255],d=((d>>>24&255)*I.a16>>16&255)<<24|((d>>>16&255)*I.a16>>16&255)<<16|((d>>>8&255)*I.a16>>
16&255)<<8|d&255));switch(c){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;break;case 2:e[b]=d>>>8&255,e[b+1]=d>>>16&255,e[b+2]=d>>>24&255,e[b+3]=d&255}a.dirty=!0;a.version++};Qa.setPixels=function(a,b,c,d,e){if(null!=a.buffer.data){var f=a.buffer.data,g=a.buffer.format,k=a.buffer.premultiplied;b=new hf(a,b);var l=a.get_transparent(),m=c.bytes;c=c.offset;e=e!=Oi.BIG_ENDIAN;for(var p=0,n=b.height;p<
n;){var h=p++;h=b.byteOffset+b.stride*h;for(var q=0,t=b.width;q<t;){var r=q++;var u=e?m.getInt32(c):m.b[c+3]|m.b[c+2]<<8|m.b[c+1]<<16|m.b[c]<<24;c+=4;switch(d){case 1:u=(u>>>16&255)<<24|(u>>>8&255)<<16|(u&255)<<8|u>>>24&255;break;case 2:u=(u>>>8&255)<<24|(u>>>16&255)<<16|(u>>>24&255)<<8|u&255}l||(u=(u>>>24&255)<<24|(u>>>16&255)<<16|(u>>>8&255)<<8|255);r=h+4*r;var x=g,v=k;null==v&&(v=!1);null==x&&(x=0);v&&(0==(u&255)?0!=u&&(u=0):255!=(u&255)&&(I.a16=I.__alpha16[u&255],u=((u>>>24&255)*I.a16>>16&255)<<
24|((u>>>16&255)*I.a16>>16&255)<<16|((u>>>8&255)*I.a16>>16&255)<<8|u&255));switch(x){case 0:f[r]=u>>>24&255;f[r+1]=u>>>16&255;f[r+2]=u>>>8&255;f[r+3]=u&255;break;case 1:f[r]=u&255;f[r+1]=u>>>24&255;f[r+2]=u>>>16&255;f[r+3]=u>>>8&255;break;case 2:f[r]=u>>>8&255,f[r+1]=u>>>16&255,f[r+2]=u>>>24&255,f[r+3]=u&255}}}a.dirty=!0;a.version++}};Qa.threshold=function(a,b,c,d,e,f,g,k,l,m){switch(m){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}switch(e){case "!=":e=0;break;case "<":e=2;break;case "<=":e=3;break;case "==":e=1;break;case ">":e=4;break;case ">=":e=5;break;default:e=-1}if(-1==e)return 0;m=b.buffer.data;var p=a.buffer.data;if(null==m||null==p)return 0;var n=0;c=new hf(b,c);d=new hf(a,
new he(d.x,d.y,c.width,c.height));var h=b.buffer.format,q=a.buffer.format;b=b.buffer.premultiplied;for(var t=a.buffer.premultiplied,r,u,x,v,w=0,C=d.height;w<C;){u=w++;r=c.byteOffset+c.stride*u;u=d.byteOffset+d.stride*u;for(var J=0,Q=d.width;J<Q;){J++;v=h;var F=b;null==F&&(F=!1);null==v&&(v=0);switch(v){case 0:x=(m[r]&255)<<24|(m[r+1]&255)<<16|(m[r+2]&255)<<8|m[r+3]&255;break;case 1:x=(m[r+1]&255)<<24|(m[r+2]&255)<<16|(m[r+3]&255)<<8|m[r]&255;break;case 2:x=(m[r+2]&255)<<24|(m[r+1]&255)<<16|(m[r]&
255)<<8|m[r+3]&255}F&&0!=(x&255)&&255!=(x&255)&&(I.unmult=255/(x&255),x=(I.__clamp[Math.round((x>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((x>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((x>>>8&255)*I.unmult)]&255)<<8|x&255);v=x&k;F=v>>>24&255;var B=f>>>24&255;F!=B?v=Da.gt(F,B)?1:-1:(F=v>>>16&255,B=f>>>16&255,F!=B?v=Da.gt(F,B)?1:-1:(F=v>>>8&255,B=f>>>8&255,F!=B?v=Da.gt(F,B)?1:-1:(F=v&255,B=f&255,v=F!=B?Da.gt(F,B)?1:-1:0)));switch(e){case 0:v=0!=v;break;case 1:v=0==v;break;case 2:v=
-1==v;break;case 3:v=0==v||-1==v;break;case 4:v=1==v;break;case 5:v=0==v||1==v;break;default:v=!1}if(v){v=q;F=t;null==F&&(F=!1);null==v&&(v=0);F&&(0==(g&255)?0!=g&&(g=0):255!=(g&255)&&(I.a16=I.__alpha16[g&255],g=((g>>>24&255)*I.a16>>16&255)<<24|((g>>>16&255)*I.a16>>16&255)<<16|((g>>>8&255)*I.a16>>16&255)<<8|g&255));switch(v){case 0:p[u]=g>>>24&255;p[u+1]=g>>>16&255;p[u+2]=g>>>8&255;p[u+3]=g&255;break;case 1:p[u]=g&255;p[u+1]=g>>>24&255;p[u+2]=g>>>16&255;p[u+3]=g>>>8&255;break;case 2:p[u]=g>>>8&255,
p[u+1]=g>>>16&255,p[u+2]=g>>>24&255,p[u+3]=g&255}++n}else if(l)switch(v=q,F=t,null==F&&(F=!1),null==v&&(v=0),F&&(0==(x&255)?0!=x&&(x=0):255!=(x&255)&&(I.a16=I.__alpha16[x&255],x=((x>>>24&255)*I.a16>>16&255)<<24|((x>>>16&255)*I.a16>>16&255)<<16|((x>>>8&255)*I.a16>>16&255)<<8|x&255)),v){case 0:p[u]=x>>>24&255;p[u+1]=x>>>16&255;p[u+2]=x>>>8&255;p[u+3]=x&255;break;case 1:p[u]=x&255;p[u+1]=x>>>24&255;p[u+2]=x>>>16&255;p[u+3]=x>>>8&255;break;case 2:p[u]=x>>>8&255,p[u+1]=x>>>16&255,p[u+2]=x>>>24&255,p[u+
3]=x&255}r+=4;u+=4}}0<n&&(a.dirty=!0,a.version++);return n};Qa.unmultiplyAlpha=function(a){var b=a.buffer.data;if(null!=b){for(var c=a.buffer.format,d,e=0,f=b.length/4|0;e<f;){var g=e++,k=4*g,l=c,m=!0;null==m&&(m=!1);null==l&&(l=0);switch(l){case 0:d=(b[k]&255)<<24|(b[k+1]&255)<<16|(b[k+2]&255)<<8|b[k+3]&255;break;case 1:d=(b[k+1]&255)<<24|(b[k+2]&255)<<16|(b[k+3]&255)<<8|b[k]&255;break;case 2:d=(b[k+2]&255)<<24|(b[k+1]&255)<<16|(b[k]&255)<<8|b[k+3]&255}m&&0!=(d&255)&&255!=(d&255)&&(I.unmult=255/
(d&255),d=(I.__clamp[Math.round((d>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((d>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((d>>>8&255)*I.unmult)]&255)<<8|d&255);g*=4;k=c;l=!1;null==l&&(l=!1);null==k&&(k=0);l&&(0==(d&255)?0!=d&&(d=0):255!=(d&255)&&(I.a16=I.__alpha16[d&255],d=((d>>>24&255)*I.a16>>16&255)<<24|((d>>>16&255)*I.a16>>16&255)<<16|((d>>>8&255)*I.a16>>16&255)<<8|d&255));switch(k){case 0:b[g]=d>>>24&255;b[g+1]=d>>>16&255;b[g+2]=d>>>8&255;b[g+3]=d&255;break;case 1:b[g]=d&255;
b[g+1]=d>>>24&255;b[g+2]=d>>>16&255;b[g+3]=d>>>8&255;break;case 2:b[g]=d>>>8&255,b[g+1]=d>>>16&255,b[g+2]=d>>>24&255,b[g+3]=d&255}}a.buffer.premultiplied=!1;a.dirty=!0;a.version++}};Qa.__boxBlur=function(a,b,c,d,e,f){b.set(a);e|=0;f|=0;Qa.__boxBlurH(b,a,c,d,e,0);Qa.__boxBlurH(b,a,c,d,e,1);Qa.__boxBlurH(b,a,c,d,e,2);Qa.__boxBlurH(b,a,c,d,e,3);e=1/(f+f+1);for(var g=4*c,k,l,m,p,n,h,q=0;q<c;){l=k=4*q++;m=k+f*g;p=a[k];n=a[k+g*(d-1)];h=(f+1)*p;for(var t=0,r=f;t<r;){var u=t++;h+=a[k+u*g]}t=0;for(r=f+1;t<
r;)t++,h+=a[m]-p,b[k]=Math.round(Da.toFloat(h)*e),m+=g,k+=g;p=f+1;for(t=d-f;p<t;)p++,h+=a[m]-a[l],b[k]=Math.round(Da.toFloat(h)*e),l+=g,m+=g,k+=g;m=d-f;for(p=d;m<p;)m++,h+=n-a[l],b[k]=Math.round(Da.toFloat(h)*e),l+=g,k+=g}e=1/(f+f+1);g=4*c;for(q=0;q<c;){l=k=4*q++ +1;m=k+f*g;p=a[k];n=a[k+g*(d-1)];h=(f+1)*p;t=0;for(r=f;t<r;)u=t++,h+=a[k+u*g];t=0;for(r=f+1;t<r;)t++,h+=a[m]-p,b[k]=Math.round(Da.toFloat(h)*e),m+=g,k+=g;p=f+1;for(t=d-f;p<t;)p++,h+=a[m]-a[l],b[k]=Math.round(Da.toFloat(h)*e),l+=g,m+=g,k+=
g;m=d-f;for(p=d;m<p;)m++,h+=n-a[l],b[k]=Math.round(Da.toFloat(h)*e),l+=g,k+=g}e=1/(f+f+1);g=4*c;for(q=0;q<c;){l=k=4*q++ +2;m=k+f*g;p=a[k];n=a[k+g*(d-1)];h=(f+1)*p;t=0;for(r=f;t<r;)u=t++,h+=a[k+u*g];t=0;for(r=f+1;t<r;)t++,h+=a[m]-p,b[k]=Math.round(Da.toFloat(h)*e),m+=g,k+=g;p=f+1;for(t=d-f;p<t;)p++,h+=a[m]-a[l],b[k]=Math.round(Da.toFloat(h)*e),l+=g,m+=g,k+=g;m=d-f;for(p=d;m<p;)m++,h+=n-a[l],b[k]=Math.round(Da.toFloat(h)*e),l+=g,k+=g}e=1/(f+f+1);g=4*c;for(q=0;q<c;){l=k=4*q++ +3;m=k+f*g;p=a[k];n=a[k+
g*(d-1)];h=(f+1)*p;t=0;for(r=f;t<r;)u=t++,h+=a[k+u*g];t=0;for(r=f+1;t<r;)t++,h+=a[m]-p,b[k]=Math.round(Da.toFloat(h)*e),m+=g,k+=g;p=f+1;for(t=d-f;p<t;)p++,h+=a[m]-a[l],b[k]=Math.round(Da.toFloat(h)*e),l+=g,m+=g,k+=g;m=d-f;for(p=d;m<p;)m++,h+=n-a[l],b[k]=Math.round(Da.toFloat(h)*e),l+=g,k+=g}};Qa.__boxBlurH=function(a,b,c,d,e,f){for(var g=1/(e+e+1),k,l,m,p,n,h,q=0;q<d;){l=k=q++*c;m=k+e;p=a[4*k+f];n=a[4*(k+c-1)+f];h=(e+1)*p;for(var t=0,r=e;t<r;){var u=t++;h+=a[4*(k+u)+f]}t=0;for(r=e+1;t<r;)t++,h+=a[4*
m+f]-p,b[4*k+f]=Math.round(Da.toFloat(h)*g),++m,++k;p=e+1;for(t=c-e;p<t;)p++,h+=a[4*m+f]-a[4*l+f],b[4*k+f]=Math.round(Da.toFloat(h)*g),++m,++l,++k;m=c-e;for(p=c;m<p;)m++,h+=n-a[4*l+f],b[4*k+f]=Math.round(Da.toFloat(h)*g),++l,++k}};Qa.__boxBlurT=function(a,b,c,d,e,f){for(var g=1/(e+e+1),k=4*c,l,m,p,n,h,q,t=0;t<c;){m=l=4*t++ +f;p=l+e*k;n=a[l];h=a[l+k*(d-1)];q=(e+1)*n;for(var r=0,u=e;r<u;){var x=r++;q+=a[l+x*k]}r=0;for(u=e+1;r<u;)r++,q+=a[p]-n,b[l]=Math.round(Da.toFloat(q)*g),p+=k,l+=k;n=e+1;for(r=d-
e;n<r;)n++,q+=a[p]-a[m],b[l]=Math.round(Da.toFloat(q)*g),m+=k,p+=k,l+=k;p=d-e;for(n=d;p<n;)p++,q+=h-a[m],b[l]=Math.round(Da.toFloat(q)*g),m+=k,l+=k}};Qa.__calculateSourceOffset=function(a,b,c,d){c-=b.x|0;b=d-(b.y|0);return 0>c||0>b||c>=a.width||b>=a.height?-1:4*(b*(a.width|0)+c)};Qa.__getBoxesForGaussianBlur=function(a,b){var c=Math.floor(Math.sqrt(12*a*a/b+1));0==c%2&&--c;var d=c+2;a=Math.round((12*a*a-b*c*c-4*b*c-3*b)/(-4*c-4));for(var e=[],f=0;f<b;){var g=f++;e.push(g<a?c:d)}return e};Qa.__pixelCompare=
function(a,b){var c=a>>>24&255,d=b>>>24&255;if(c!=d)return Da.gt(c,d)?1:-1;c=a>>>16&255;d=b>>>16&255;if(c!=d)return Da.gt(c,d)?1:-1;c=a>>>8&255;d=b>>>8&255;if(c!=d)return Da.gt(c,d)?1:-1;c=a&255;d=b&255;return c!=d?Da.gt(c,d)?1:-1:0};Qa.__translatePixel=function(a,b,c,d,e,f,g){c=4*(f*(c.width|0)+e);b=Qa.__calculateSourceOffset(b,d,e,f);0>b?a[c]=a[c+1]=a[c+2]=a[c+3]=0:(a[c]=a[b],a[c+1]=a[b+1],a[c+2]=a[b+2],g=Da.toFloat(a[b+3])*g|0,a[c+3]=0>g?0:255<g?255:g)};var hf=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.__update()};h["lime._internal.graphics._ImageDataUtil.ImageDataView"]=hf;hf.__name__="lime._internal.graphics._ImageDataUtil.ImageDataView";hf.prototype={x:null,y:null,height:null,width:null,byteOffset:null,image:null,rect:null,stride:null,tempRect:null,clip:function(a,
b,c,d){null==this.tempRect&&(this.tempRect=new he);this.tempRect.setTo(a,b,c,d);this.rect.intersection(this.tempRect,this.rect);this.__update()},hasRow:function(a){return 0<=a?a<this.height:!1},offset:function(a,b){0>a?(this.rect.x+=a,0>this.rect.x&&(this.rect.x=0)):(this.rect.x+=a,this.rect.width-=a);0>b?(this.rect.y+=b,0>this.rect.y&&(this.rect.y=0)):(this.rect.y+=b,this.rect.height-=b);this.__update()},row:function(a){return this.byteOffset+this.stride*a},__update:function(){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.byteOffset=this.stride*(this.y+this.image.offsetY)+4*(this.x+this.image.offsetX)},__class__:hf};var Bf=function(){};h["lime._internal.graphics.StackBlur"]=Bf;Bf.__name__="lime._internal.graphics.StackBlur";Bf.blur=function(a,b,c,d,e,f,g){a.copyPixels(b,c,d);Bf.__stackBlurCanvasRGBA(a,c.width|0,c.height|0,e,f,g)};Bf.__stackBlurCanvasRGBA=function(a,b,c,d,e,f){d=Math.round(d)>>1;e=Math.round(e)>>
1;if(null!=Bf.MUL_TABLE&&(d>=Bf.MUL_TABLE.length&&(d=Bf.MUL_TABLE.length-1),e>=Bf.MUL_TABLE.length&&(e=Bf.MUL_TABLE.length-1),!(0>d||0>e))){1>f&&(f=1);3<f&&(f=3);a=a.get_data();var g,k,l,m=d+d+1;var p=e+e+1;var n=b-1,h=c-1,q=d+1,t=e+1,r=new Ej,u=r;for(l=1;l<m;)l++,u=u.n=new Ej;u.n=r;var x=m=new Ej;for(l=1;l<p;)l++,x=x.n=new Ej;x.n=m;for(var v,w=Bf.MUL_TABLE[d],C=Bf.SHG_TABLE[d],J=Bf.MUL_TABLE[e],Q=Bf.SHG_TABLE[e];0<f;){--f;var F=k=0;var B=w,D=C;for(g=c;;){var E=a[k];p=q*E;var A=a[k+1];l=q*A;var H=
a[k+2];var I=q*H;var G=a[k+3];var K=q*G;u=r;for(x=q;u.r=E,u.g=A,u.b=H,u.a=G,u=u.n,-1<--x;);G=1;for(v=q;G<v;)x=G++,x=k+((n<x?n:x)<<2),p+=u.r=a[x],l+=u.g=a[x+1],I+=u.b=a[x+2],K+=u.a=a[x+3],u=u.n;v=r;u=0;for(G=b;u<G;)x=u++,a[k++]=p*B>>>D,a[k++]=l*B>>>D,a[k++]=I*B>>>D,a[k++]=K*B>>>D,x=x+d+1,x=F+(x<n?x:n)<<2,p-=v.r-(v.r=a[x]),l-=v.g-(v.g=a[x+1]),I-=v.b-(v.b=a[x+2]),K-=v.a-(v.a=a[x+3]),v=v.n;F+=b;if(!(0<--g))break}B=J;D=Q;g=0;for(F=b;g<F;){u=g++;k=u<<2;E=a[k];p=t*E;A=a[k+1];l=t*A;H=a[k+2];I=t*H;G=a[k+3];
K=t*G;x=m;k=0;for(v=t;k<v;)k++,x.r=E,x.g=A,x.b=H,x.a=G,x=x.n;G=b;v=1;for(E=e+1;v<E;)A=v++,k=G+u<<2,p+=x.r=a[k],l+=x.g=a[k+1],I+=x.b=a[k+2],K+=x.a=a[k+3],x=x.n,A<h&&(G+=b);k=u;v=m;if(0<f)for(E=0,A=c;E<A;)H=E++,x=k<<2,G=K*B>>>D,a[x+3]=G,0<G?(a[x]=p*B>>>D,a[x+1]=l*B>>>D,a[x+2]=I*B>>>D):a[x]=a[x+1]=a[x+2]=0,x=H+t,x=u+(x<h?x:h)*b<<2,p-=v.r-(v.r=a[x]),l-=v.g-(v.g=a[x+1]),I-=v.b-(v.b=a[x+2]),K-=v.a-(v.a=a[x+3]),v=v.n,k+=b;else for(var y=0,L=c;y<L;){var M=y++;x=k<<2;G=K*B>>>D;a[x+3]=G;0<G?(G=255/G,E=(p*B>>>
D)*G|0,A=(l*B>>>D)*G|0,H=(I*B>>>D)*G|0,a[x]=255<E?255:E,a[x+1]=255<A?255:A,a[x+2]=255<H?255:H):a[x]=a[x+1]=a[x+2]=0;x=M+t;x=u+(x<h?x:h)*b<<2;p-=v.r-(v.r=a[x]);l-=v.g-(v.g=a[x+1]);I-=v.b-(v.b=a[x+2]);K-=v.a-(v.a=a[x+3]);v=v.n;k+=b}}}}};var Ej=function(){this.a=this.b=this.g=this.r=0;this.n=null};h["lime._internal.graphics.BlurStack"]=Ej;Ej.__name__="lime._internal.graphics.BlurStack";Ej.prototype={r:null,g:null,b:null,a:null,n:null,__class__:Ej};var ku=function(){};h["lime._internal.macros.AssetsMacro"]=
ku;ku.__name__="lime._internal.macros.AssetsMacro";var Bh={};h["lime._internal.unifill._CodePoint.CodePoint_Impl_"]=Bh;Bh.__name__="lime._internal.unifill._CodePoint.CodePoint_Impl_";Bh.fromInt=function(a){if(!(0<=a&&1114111>=a)||55296<=a&&56319>=a||56320<=a&&57343>=a)throw new E(new Fj(a));return a};Bh.cons=function(a,b){return(65535>=a?String.fromCodePoint(a):String.fromCodePoint((a>>10)+55232)+String.fromCodePoint(a&1023|56320))+b};Bh.snoc=function(a,b){b=65535>=b?String.fromCodePoint(b):String.fromCodePoint((b>>
10)+55232)+String.fromCodePoint(b&1023|56320);return a+b};Bh.addInt=function(a,b){a+=b;if(!(0<=a&&1114111>=a)||55296<=a&&56319>=a||56320<=a&&57343>=a)throw new E(new Fj(a));return a};Bh.sub=function(a,b){return a-b};Bh.subInt=function(a,b){a-=b;if(!(0<=a&&1114111>=a)||55296<=a&&56319>=a||56320<=a&&57343>=a)throw new E(new Fj(a));return a};Bh._new=function(a){return a};Bh.toString=function(a){return 65535>=a?String.fromCodePoint(a):String.fromCodePoint((a>>10)+55232)+String.fromCodePoint(a&1023|56320)};
Bh.toInt=function(a){return a};var Eq=function(a){this.i=0;this.string=a;this.index=0;this.endIndex=a.length};h["lime._internal.unifill.CodePointIter"]=Eq;Eq.__name__="lime._internal.unifill.CodePointIter";Eq.prototype={string:null,index:null,endIndex:null,hasNext:function(){return this.index<this.endIndex},i:null,next:function(){var a=this.i=this.index,b=this.string.charCodeAt(this.index);this.index=a+(55296<=b&&56319>=b?2:1);return Dc.codePointAt(this.string,this.i)},__class__:Eq};var Gj=function(){};
h["lime._internal.unifill.Exception"]=Gj;Gj.__name__="lime._internal.unifill.Exception";Gj.prototype={toString:function(){throw new E(null);},__class__:Gj};var Fj=function(a){this.code=a};h["lime._internal.unifill.InvalidCodePoint"]=Fj;Fj.__name__="lime._internal.unifill.InvalidCodePoint";Fj.__super__=Gj;Fj.prototype=w(Gj.prototype,{code:null,toString:function(){return"InvalidCodePoint(code: "+this.code+")"},__class__:Fj});var ji=function(a){this.index=a};h["lime._internal.unifill.InvalidCodeUnitSequence"]=
ji;ji.__name__="lime._internal.unifill.InvalidCodeUnitSequence";ji.__super__=Gj;ji.prototype=w(Gj.prototype,{index:null,toString:function(){return"InvalidCodeUnitSequence(index: "+this.index+")"},__class__:ji});var Cf=function(){};h["lime._internal.unifill.InternalEncoding"]=Cf;Cf.__name__="lime._internal.unifill.InternalEncoding";Cf.__properties__={get_internalEncoding:"get_internalEncoding"};Cf.get_internalEncoding=function(){return"UTF-16"};Cf.codeUnitAt=function(a,b){return a.charCodeAt(b)};Cf.codePointAt=
function(a,b){return Dc.codePointAt(a,b)};Cf.charAt=function(a,b){var c=a.charCodeAt(b);return B.substr(a,b,55296<=c&&56319>=c?2:1)};Cf.codePointCount=function(a,b,c){return Dc.codePointCount(a,b,c)};Cf.codePointWidthAt=function(a,b){a=a.charCodeAt(b);return 55296<=a&&56319>=a?2:1};Cf.codePointWidthBefore=function(a,b){a=a.charCodeAt(b-1);return 56320<=a&&57343>=a?2:1};Cf.offsetByCodePoints=function(a,b,c){if(0<=c){for(var d=a.length,e=0;e<c&&b<d;){var f=a.charCodeAt(b);b+=55296<=f&&56319>=f?2:1;
++e}return b}for(d=0;d<-c&&0<b;)e=a.charCodeAt(b-1),b-=56320<=e&&57343>=e?2:1,++d;return b};Cf.backwardOffsetByCodePoints=function(a,b,c){c=-c;if(0<=c){for(var d=a.length,e=0;e<c&&b<d;){var f=a.charCodeAt(b);b+=55296<=f&&56319>=f?2:1;++e}return b}for(d=0;d<-c&&0<b;)e=a.charCodeAt(b-1),b-=56320<=e&&57343>=e?2:1,++d;return b};Cf.fromCodePoint=function(a){return 65535>=a?String.fromCodePoint(a):String.fromCodePoint((a>>10)+55232)+String.fromCodePoint(a&1023|56320)};Cf.fromCodePoints=function(a){var b=
"";for(a=O(a);a.hasNext();){var c=a.next();65535>=c?b+=String.fromCodePoint(c):(b+=String.fromCodePoint((c>>10)+55232),b+=String.fromCodePoint(c&1023|56320))}return b};Cf.validate=function(a){Dc.validate(a)};Cf.isValidString=function(a){try{return Dc.validate(a),!0}catch(b){ra.lastException=b;if((b instanceof E?b.val:b)instanceof ji)return!1;throw b;}};Cf.encodeWith=function(a,b){65535>=b?a(b):(a((b>>10)+55232),a(b&1023|56320))};var kt=function(a,b,c){this.i=0;this.string=a;this.index=b;this.endIndex=
c};h["lime._internal.unifill.InternalEncodingIter"]=kt;kt.__name__="lime._internal.unifill.InternalEncodingIter";kt.prototype={string:null,index:null,endIndex:null,hasNext:function(){return this.index<this.endIndex},i:null,next:function(){var a=this.i=this.index,b=this.string.charCodeAt(this.index);this.index=a+(55296<=b&&56319>=b?2:1);return this.i},__class__:kt};var sg=function(){};h["lime._internal.unifill.Unicode"]=sg;sg.__name__="lime._internal.unifill.Unicode";sg.decodeSurrogate=function(a,
b){return a-55232<<10|b&1023};sg.encodeHighSurrogate=function(a){return(a>>10)+55232};sg.encodeLowSurrogate=function(a){return a&1023|56320};sg.isScalar=function(a){return 0<=a&&1114111>=a&&!(55296<=a&&56319>=a)?!(56320<=a&&57343>=a):!1};sg.isHighSurrogate=function(a){return 55296<=a?56319>=a:!1};sg.isLowSurrogate=function(a){return 56320<=a?57343>=a:!1};var Vf=function(){};h["lime._internal.unifill.Unifill"]=Vf;Vf.__name__="lime._internal.unifill.Unifill";Vf.uLength=function(a){return Dc.codePointCount(a,
0,a.length)};Vf.uCharAt=function(a,b){if(0<=b)for(var c=0,d=a.length,e=0;e<b&&c<d;){var f=a.charCodeAt(c);c+=55296<=f&&56319>=f?2:1;++e}else for(d=c=0;d<-b&&0<c;)e=a.charCodeAt(c-1),c-=56320<=e&&57343>=e?2:1,++d;b=c;c=a.charCodeAt(b);return B.substr(a,b,55296<=c&&56319>=c?2:1)};Vf.uCharCodeAt=function(a,b){if(0<=b)for(var c=0,d=a.length,e=0;e<b&&c<d;){var f=a.charCodeAt(c);c+=55296<=f&&56319>=f?2:1;++e}else for(d=c=0;d<-b&&0<c;)e=a.charCodeAt(c-1),c-=56320<=e&&57343>=e?2:1,++d;b=c;return Dc.codePointAt(a,
b)};Vf.uCodePointAt=function(a,b){if(0<=b)for(var c=0,d=a.length,e=0;e<b&&c<d;){var f=a.charCodeAt(c);c+=55296<=f&&56319>=f?2:1;++e}else for(d=c=0;d<-b&&0<c;)e=a.charCodeAt(c-1),c-=56320<=e&&57343>=e?2:1,++d;b=c;return Dc.codePointAt(a,b)};Vf.uIndexOf=function(a,b,c){null==c&&(c=0);if(0<=c)for(var d=0,e=a.length,f=0;f<c&&d<e;){var g=a.charCodeAt(d);d+=55296<=g&&56319>=g?2:1;++f}else for(e=d=0;e<-c&&0<d;)f=a.charCodeAt(d-1),d-=56320<=f&&57343>=f?2:1,++e;c=d;b=a.indexOf(b,c);return 0<=b?Dc.codePointCount(a,
0,b):-1};Vf.uLastIndexOf=function(a,b,c){null==c&&(c=a.length-1);if(0<=c)for(var d=0,e=a.length,f=0;f<c&&d<e;){var g=a.charCodeAt(d);d+=55296<=g&&56319>=g?2:1;++f}else for(e=d=0;e<-c&&0<d;)f=a.charCodeAt(d-1),d-=56320<=f&&57343>=f?2:1,++e;c=d;b=a.lastIndexOf(b,c);return 0<=b?Dc.codePointCount(a,0,b):-1};Vf.uSplit=function(a,b){if(0==b.length){b=[];for(var c,d=0,e=a.length;d<e;){c=d;var f=a.charCodeAt(d);d+=55296<=f&&56319>=f?2:1;f=a;var g=f.charCodeAt(c);c=B.substr(f,c,55296<=g&&56319>=g?2:1);b.push(c)}return b}return a.split(b)};
Vf.uSubstr=function(a,b,c){var d=0<=b?0:a.length;if(0<=b)for(var e=a.length,f=0;f<b&&d<e;){var g=a.charCodeAt(d);d+=55296<=g&&56319>=g?2:1;++f}else for(e=0;e<-b&&0<d;)f=a.charCodeAt(d-1),d-=56320<=f&&57343>=f?2:1,++e;b=d;if(null==c)c=a.length;else if(0>c)c=b;else{if(0<=c)for(d=b,e=a.length,f=0;f<c&&d<e;)g=a.charCodeAt(d),d+=55296<=g&&56319>=g?2:1,++f;else for(d=b,e=0;e<-c&&0<d;)f=a.charCodeAt(d-1),d-=56320<=f&&57343>=f?2:1,++e;c=d}return a.substring(b,c)};Vf.uSubstring=function(a,b,c){if(0>b)b=0;
else{if(0<=b)for(var d=0,e=a.length,f=0;f<b&&d<e;){var g=a.charCodeAt(d);d+=55296<=g&&56319>=g?2:1;++f}else for(e=d=0;e<-b&&0<d;)f=a.charCodeAt(d-1),d-=56320<=f&&57343>=f?2:1,++e;b=d}if(null==c)c=a.length;else if(0>c)c=0;else{if(0<=c)for(d=0,e=a.length,f=0;f<c&&d<e;)g=a.charCodeAt(d),d+=55296<=g&&56319>=g?2:1,++f;else for(e=d=0;e<-c&&0<d;)f=a.charCodeAt(d-1),d-=56320<=f&&57343>=f?2:1,++e;c=d}return a.substring(b,c)};Vf.uIterator=function(a){return new Eq(a)};Vf.uCompare=function(a,b){for(var c,d=
0,e=a.length,f,g=0,k=b.length;d<e&&g<k;){c=d;f=a.charCodeAt(d);d+=55296<=f&&56319>=f?2:1;c=Dc.codePointAt(a,c);f=g;var l=b.charCodeAt(g);g+=55296<=l&&56319>=l?2:1;f=Dc.codePointAt(b,f);if(c<f)return-1;if(c>f)return 1}return g<k?-1:d<e?1:0};Vf.uToString=function(a){var b="";for(a=O(a);a.hasNext();){var c=a.next();65535>=c?b+=String.fromCodePoint(c):(b+=String.fromCodePoint((c>>10)+55232),b+=String.fromCodePoint(c&1023|56320))}return b};Vf.uAddChar=function(a,b){65535>=b?a.b+=String.fromCodePoint(b):
(a.b+=String.fromCodePoint((b>>10)+55232),a.b+=String.fromCodePoint(b&1023|56320))};var Dc={};h["lime._internal.unifill._Utf16.Utf16_Impl_"]=Dc;Dc.__name__="lime._internal.unifill._Utf16.Utf16_Impl_";Dc.__properties__={get_length:"get_length"};Dc.fromCodePoint=function(a){return 65535>=a?String.fromCodePoint(a):String.fromCodePoint((a>>10)+55232)+String.fromCodePoint(a&1023|56320)};Dc.fromCodePoints=function(a){var b="";for(a=O(a);a.hasNext();){var c=a.next();65535>=c?b+=String.fromCodePoint(c):(b+=
String.fromCodePoint((c>>10)+55232),b+=String.fromCodePoint(c&1023|56320))}return b};Dc.fromString=function(a){return a};Dc.fromArray=function(a){for(var b="",c=0;c<a.length;){var d=a[c];++c;b+=String.fromCodePoint(d)}return b};Dc.encodeWith=function(a,b){65535>=b?a(b):(a((b>>10)+55232),a(b&1023|56320))};Dc.codeUnitAt=function(a,b){return a.charCodeAt(b)};Dc.codePointAt=function(a,b){return Hj.decode_code_point(a.length,function(b){return a.charCodeAt(b)},b)};Dc.charAt=function(a,b){var c=a.charCodeAt(b);
return B.substr(a,b,55296<=c&&56319>=c?2:1)};Dc.codePointCount=function(a,b,c){for(var d=0;b<c;){var e=a.charCodeAt(b);b+=55296<=e&&56319>=e?2:1;++d}return d};Dc.codePointWidthAt=function(a,b){a=a.charCodeAt(b);return 55296<=a&&56319>=a?2:1};Dc.codePointWidthBefore=function(a,b){a=a.charCodeAt(b-1);return 56320<=a&&57343>=a?2:1};Dc.offsetByCodePoints=function(a,b,c){if(0<=c){for(var d=a.length,e=0;e<c&&b<d;){var f=a.charCodeAt(b);b+=55296<=f&&56319>=f?2:1;++e}return b}for(d=0;d<-c&&0<b;)e=a.charCodeAt(b-
1),b-=56320<=e&&57343>=e?2:1,++d;return b};Dc.substr=function(a,b,c){return B.substr(a,b,c)};Dc.validate=function(a){for(var b=a.length,c=function(b){return a.charCodeAt(b)},d=0;d<b;){Hj.decode_code_point(b,c,d);var e=a.charCodeAt(d);d+=55296<=e&&56319>=e?2:1}};Dc.toString=function(a){return a};Dc.toArray=function(a){for(var b=0,c=a.length,d=[];b<c;)d.push(a.charCodeAt(b++));return d};Dc._new=function(a){return a};Dc.get_length=function(a){return a.length};Dc.forward_offset_by_code_points=function(a,
b,c){for(var d=a.length,e=0;e<c&&b<d;){var f=a.charCodeAt(b);b+=55296<=f&&56319>=f?2:1;++e}return b};Dc.backward_offset_by_code_points=function(a,b,c){for(var d=0;d<c&&0<b;){var e=a.charCodeAt(b-1);b-=56320<=e&&57343>=e?2:1;++d}return b};var Hj=function(){};h["lime._internal.unifill._Utf16.Utf16Impl"]=Hj;Hj.__name__="lime._internal.unifill._Utf16.Utf16Impl";Hj.code_point_width=function(a){return 55296<=a&&56319>=a?2:1};Hj.find_prev_code_point=function(a,b){a=a(b-1);return 56320<=a&&57343>=a?2:1};
Hj.encode_code_point=function(a,b){65535>=b?a(b):(a((b>>10)+55232),a(b&1023|56320))};Hj.decode_code_point=function(a,b,c){if(0>c||a<=c)throw new E(new ji(c));var d=b(c);if(55296<=d&&56319>=d){if(0>c+1||a<=c+1)throw new E(new ji(c));a=b(c+1);if(56320<=a&&57343>=a)return d-55232<<10|a&1023;throw new E(new ji(c));}if(56320<=d&&57343>=d)throw new E(new ji(c));return d};var Fq={};h["lime._internal.unifill._Utf16.StringU16Buffer_Impl_"]=Fq;Fq.__name__="lime._internal.unifill._Utf16.StringU16Buffer_Impl_";
Fq._new=function(){return new bd};Fq.addUnit=function(a,b){a.b+=String.fromCodePoint(b)};Fq.getStringU16=function(a){return a.b};var tg={};h["lime._internal.unifill._Utf16.StringU16_Impl_"]=tg;tg.__name__="lime._internal.unifill._Utf16.StringU16_Impl_";tg.__properties__={get_length:"get_length"};tg.fromString=function(a){return a};tg.fromCodeUnit=function(a){return String.fromCodePoint(a)};tg.fromTwoCodeUnits=function(a,b){return String.fromCodePoint(a)+String.fromCodePoint(b)};tg.ofArray=function(a){for(var b=
"",c=0;c<a.length;){var d=a[c];++c;b+=String.fromCodePoint(d)}return b};tg.fromArray=function(a){for(var b="",c=0;c<a.length;){var d=a[c];++c;b+=String.fromCodePoint(d)}return b};tg.codeUnitAt=function(a,b){return a.charCodeAt(b)};tg.substr=function(a,b,c){return B.substr(a,b,c)};tg.toString=function(a){return a};tg.toArray=function(a){for(var b=0,c=a.length,d=[];b<c;)d.push(a.charCodeAt(b++));return d};tg._new=function(a){return a};tg.get_length=function(a){return a.length};var fl=function(){};h["lime.app.IModule"]=
fl;fl.__name__="lime.app.IModule";fl.__isInterface__=!0;fl.prototype={__registerLimeModule:null,__unregisterLimeModule:null,__class__:fl};var gl=function(){this.onExit=new Pi};h["lime.app.Module"]=gl;gl.__name__="lime.app.Module";gl.__interfaces__=[fl];gl.prototype={onExit:null,__registerLimeModule:function(a){},__unregisterLimeModule:function(a){},__class__:gl};var bf=function(){this.onCreateWindow=new Gq;this.onUpdate=new Pi;this.onExit=new Pi;null==bf.current&&(bf.current=this);this.meta=new ua;
this.modules=[];this.__windowByID=new Wa;this.__windows=[];this.__backend=new yq(this);this.__registerLimeModule(this);this.__preloader=new Hq;this.__preloader.onProgress.add(v(this,this.onPreloadProgress));this.__preloader.onComplete.add(v(this,this.onPreloadComplete))};h["lime.app.Application"]=bf;bf.__name__="lime.app.Application";bf.__super__=gl;bf.prototype=w(gl.prototype,{meta:null,modules:null,onUpdate:null,onCreateWindow:null,preloader:null,window:null,windows:null,__backend:null,__preloader:null,
__window:null,__windowByID:null,__windows:null,addModule:function(a){a.__registerLimeModule(this);this.modules.push(a)},createWindow:function(a){a=this.__createWindow(a);this.__addWindow(a);return a},exec:function(){bf.current=this;return this.__backend.exec()},onGamepadAxisMove:function(a,b,c){},onGamepadButtonDown:function(a,b){},onGamepadButtonUp:function(a,b){},onGamepadConnect:function(a){},onGamepadDisconnect:function(a){},onJoystickAxisMove:function(a,b,c){},onJoystickButtonDown:function(a,
b){},onJoystickButtonUp:function(a,b){},onJoystickConnect:function(a){},onJoystickDisconnect:function(a){},onJoystickHatMove:function(a,b,c){},onJoystickTrackballMove:function(a,b,c,d){},onKeyDown:function(a,b){},onKeyUp:function(a,b){},onModuleExit:function(a){},onMouseDown:function(a,b,c){},onMouseMove:function(a,b){},onMouseMoveRelative:function(a,b){},onMouseUp:function(a,b,c){},onMouseWheel:function(a,b,c){},onPreloadComplete:function(){},onPreloadProgress:function(a,b){},onRenderContextLost:function(){},
onRenderContextRestored:function(a){},onTextEdit:function(a,b,c){},onTextInput:function(a){},onTouchCancel:function(a){},onTouchEnd:function(a){},onTouchMove:function(a){},onTouchStart:function(a){},onWindowActivate:function(){},onWindowClose:function(){},onWindowCreate:function(){},onWindowDeactivate:function(){},onWindowDropFile:function(a){},onWindowEnter:function(){},onWindowExpose:function(){},onWindowFocusIn:function(){},onWindowFocusOut:function(){},onWindowFullscreen:function(){},onWindowLeave:function(){},
onWindowMove:function(a,b){},onWindowMinimize:function(){},onWindowResize:function(a,b){},onWindowRestore:function(){},removeModule:function(a){null!=a&&(a.__unregisterLimeModule(this),B.remove(this.modules,a))},render:function(a){},update:function(a){},__addWindow:function(a){if(null!=a){this.__windows.push(a);this.__windowByID.h[a.id]=a;var b=v(this,this.__onWindowClose);a.onClose.add(function(){b(a)},!1,-1E4);null==this.__window&&(this.__window=a,a.onActivate.add(v(this,this.onWindowActivate)),
a.onRenderContextLost.add(v(this,this.onRenderContextLost)),a.onRenderContextRestored.add(v(this,this.onRenderContextRestored)),a.onDeactivate.add(v(this,this.onWindowDeactivate)),a.onDropFile.add(v(this,this.onWindowDropFile)),a.onEnter.add(v(this,this.onWindowEnter)),a.onExpose.add(v(this,this.onWindowExpose)),a.onFocusIn.add(v(this,this.onWindowFocusIn)),a.onFocusOut.add(v(this,this.onWindowFocusOut)),a.onFullscreen.add(v(this,this.onWindowFullscreen)),a.onKeyDown.add(v(this,this.onKeyDown)),a.onKeyUp.add(v(this,
this.onKeyUp)),a.onLeave.add(v(this,this.onWindowLeave)),a.onMinimize.add(v(this,this.onWindowMinimize)),a.onMouseDown.add(v(this,this.onMouseDown)),a.onMouseMove.add(v(this,this.onMouseMove)),a.onMouseMoveRelative.add(v(this,this.onMouseMoveRelative)),a.onMouseUp.add(v(this,this.onMouseUp)),a.onMouseWheel.add(v(this,this.onMouseWheel)),a.onMove.add(v(this,this.onWindowMove)),a.onRender.add(v(this,this.render)),a.onResize.add(v(this,this.onWindowResize)),a.onRestore.add(v(this,this.onWindowRestore)),
a.onTextEdit.add(v(this,this.onTextEdit)),a.onTextInput.add(v(this,this.onTextInput)),this.onWindowCreate());this.onCreateWindow.dispatch(a)}},__createWindow:function(a){a=new Ij(this,a);return-1==a.id?null:a},__registerLimeModule:function(a){a.onUpdate.add(v(this,this.update));a.onExit.add(v(this,this.onModuleExit),!1,0);a.onExit.add(v(this,this.__onModuleExit),!1,0);for(a=le.devices.iterator();a.hasNext();){var b=a.next();this.__onGamepadConnect(b)}le.onConnect.add(v(this,this.__onGamepadConnect));
for(a=pd.devices.iterator();a.hasNext();)b=a.next(),this.__onJoystickConnect(b);pd.onConnect.add(v(this,this.__onJoystickConnect));Ad.onCancel.add(v(this,this.onTouchCancel));Ad.onStart.add(v(this,this.onTouchStart));Ad.onMove.add(v(this,this.onTouchMove));Ad.onEnd.add(v(this,this.onTouchEnd))},__removeWindow:function(a){null!=a&&this.__windowByID.h.hasOwnProperty(a.id)&&(this.__window==a&&(this.__window=null),B.remove(this.__windows,a),this.__windowByID.remove(a.id),a.close(),0==this.__windows.length&&
Ra.exit(0))},__onGamepadConnect:function(a){this.onGamepadConnect(a);var b=v(this,this.onGamepadAxisMove);a.onAxisMove.add(function(c,d){b(a,c,d)});var c=v(this,this.onGamepadButtonDown);a.onButtonDown.add(function(b){c(a,b)});var d=v(this,this.onGamepadButtonUp);a.onButtonUp.add(function(b){d(a,b)});var e=v(this,this.onGamepadDisconnect);a.onDisconnect.add(function(){e(a)})},__onJoystickConnect:function(a){this.onJoystickConnect(a);var b=v(this,this.onJoystickAxisMove);a.onAxisMove.add(function(c,
d){b(a,c,d)});var c=v(this,this.onJoystickButtonDown);a.onButtonDown.add(function(b){c(a,b)});var d=v(this,this.onJoystickButtonUp);a.onButtonUp.add(function(b){d(a,b)});var e=v(this,this.onJoystickDisconnect);a.onDisconnect.add(function(){e(a)});var f=v(this,this.onJoystickHatMove);a.onHatMove.add(function(b,c){f(a,b,c)});var g=v(this,this.onJoystickTrackballMove);a.onTrackballMove.add(function(b,c,d){g(a,b,c,d)})},__onModuleExit:function(a){this.__backend.exit()},__onWindowClose:function(a){if(this.__window==
a)this.onWindowClose();this.__removeWindow(a)},__unregisterLimeModule:function(a){a.onUpdate.remove(v(this,this.update));a.onExit.remove(v(this,this.__onModuleExit));a.onExit.remove(v(this,this.onModuleExit));le.onConnect.remove(v(this,this.__onGamepadConnect));pd.onConnect.remove(v(this,this.__onJoystickConnect));Ad.onCancel.remove(v(this,this.onTouchCancel));Ad.onStart.remove(v(this,this.onTouchStart));Ad.onMove.remove(v(this,this.onTouchMove));Ad.onEnd.remove(v(this,this.onTouchEnd));this.onModuleExit(0)},
get_preloader:function(){return this.__preloader},get_window:function(){return this.__window},get_windows:function(){return this.__windows},__class__:bf,__properties__:{get_windows:"get_windows",get_window:"get_window",get_preloader:"get_preloader"}});var lt=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app.Event"]=lt;lt.__name__="lime.app.Event";lt.prototype={canceled:null,__listeners:null,__repeat:null,__priorities:null,add:function(a,b,c){null==
c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},dispatch:null,has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=
--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__class__:lt};var xb=function(a,b){null==b&&(b=!1);if(null!=a)if(b)b=new Jd,b.future=this,rf.queue({promise:b,work:a});else try{this.value=a(),this.isComplete=!0}catch(c){ra.lastException=c,this.error=c instanceof E?c.val:c,this.isError=!0}};h["lime.app.Future"]=xb;xb.__name__="lime.app.Future";xb.ofEvents=function(a,b,c){var d=new Jd;a.add(function(a){d.complete(a)},
!0);null!=b&&b.add(function(a){d.error(a)},!0);null!=c&&c.add(function(a,b){d.progress(a,b)},!0);return d.future};xb.withError=function(a){var b=new xb;b.isError=!0;b.error=a;return b};xb.withValue=function(a){var b=new xb;b.isComplete=!0;b.value=a;return b};xb.prototype={error:null,isComplete:null,isError:null,value:null,__completeListeners:null,__errorListeners:null,__progressListeners:null,onComplete:function(a){null!=a&&(this.isComplete?a(this.value):this.isError||(null==this.__completeListeners&&
(this.__completeListeners=[]),this.__completeListeners.push(a)));return this},onError:function(a){null!=a&&(this.isError?a(this.error):this.isComplete||(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},ready:function(a){this.isComplete||this.isError||Ta.warn("Cannot block thread in JavaScript",{fileName:"lime/app/Future.hx",
lineNumber:210,className:"lime.app.Future",methodName:"ready"});return this},result:function(a){null==a&&(a=-1);this.ready(a);return this.isComplete?this.value:null},then:function(a){if(this.isComplete)return a(this.value);if(this.isError){var b=new xb;b.isError=!0;b.error=this.error;return b}var c=new Jd;this.onError(v(c,c.error));this.onProgress(v(c,c.progress));this.onComplete(function(b){b=a(b);b.onError(v(c,c.error));b.onComplete(v(c,c.complete))});return c.future},__class__:xb};var rf=function(){};
h["lime.app._Future.FutureWork"]=rf;rf.__name__="lime.app._Future.FutureWork";rf.queue=function(a){null==rf.threadPool&&(rf.threadPool=new Iq,rf.threadPool.doWork.add(rf.threadPool_doWork),rf.threadPool.onComplete.add(rf.threadPool_onComplete),rf.threadPool.onError.add(rf.threadPool_onError));rf.threadPool.queue(a)};rf.threadPool_doWork=function(a){try{var b=a.work();rf.threadPool.sendComplete({promise:a.promise,result:b})}catch(c){ra.lastException=c,rf.threadPool.sendError({promise:a.promise,error:c instanceof
E?c.val:c})}};rf.threadPool_onComplete=function(a){a.promise.complete(a.result)};rf.threadPool_onError=function(a){a.promise.error(a.error)};var Jd=function(){this.future=new xb};h["lime.app.Promise"]=Jd;Jd.__name__="lime.app.Promise";Jd.prototype={future:null,isComplete:null,isError:null,complete:function(a){if(!this.future.isError&&(this.future.isComplete=!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(v(this,this.complete));a.onError(v(this,this.error));a.onProgress(v(this,this.progress));return this},error:function(a){if(!this.future.isComplete&&(this.future.isError=!0,this.future.error=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,b){if(!this.future.isError&&!this.future.isComplete&&null!=this.future.__progressListeners)for(var c=
0,d=this.future.__progressListeners;c<d.length;){var e=d[c];++c;e(a,b)}return this},get_isComplete:function(){return this.future.isComplete},get_isError:function(){return this.future.isError},__class__:Jd,__properties__:{get_isError:"get_isError",get_isComplete:"get_isComplete"}};var Qi=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_Dynamic_Void"]=Qi;Qi.__name__="lime.app._Event_Dynamic_Void";Qi.prototype={canceled:null,__repeat:null,__priorities:null,
add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=
--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__listeners:null,dispatch:function(a){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__:Qi};var Jq=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_Float_Float_Float_Void"]=Jq;Jq.__name__="lime.app._Event_Float_Float_Float_Void";
Jq.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,
a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__listeners:null,dispatch:function(a,b,c){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__:Jq};var Kq=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_Float_Float_Int_Void"]=
Kq;Kq.__name__="lime.app._Event_Float_Float_Int_Void";Kq.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<
c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__listeners:null,dispatch:function(a,b,c){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__:Kq};var hl=function(){this.canceled=!1;this.__listeners=
[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_Float_Float_Void"]=hl;hl.__name__="lime.app._Event_Float_Float_Void";hl.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=
!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__listeners:null,dispatch:function(a,b){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__:hl};
var Lq=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_Float_Float_lime_ui_MouseButton_Void"]=Lq;Lq.__name__="lime.app._Event_Float_Float_lime_ui_MouseButton_Void";Lq.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,
0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__listeners:null,dispatch:function(a,b,c){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__:Lq};var Mq=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_Float_Float_lime_ui_MouseWheelMode_Void"]=Mq;Mq.__name__="lime.app._Event_Float_Float_lime_ui_MouseWheelMode_Void";Mq.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<
e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),
this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__listeners:null,dispatch:function(a,b,c){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__:Mq};var Nq=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_Int_Float_Float_Void"]=Nq;Nq.__name__="lime.app._Event_Int_Float_Float_Void";Nq.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,
b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=
--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__listeners:null,dispatch:function(a,b,c){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__:Nq};var Oq=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_Int_Float_Void"]=Oq;Oq.__name__="lime.app._Event_Int_Float_Void";
Oq.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,
a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__listeners:null,dispatch:function(a,b){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__:Oq};var eo=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_Int_Int_Void"]=
eo;eo.__name__="lime.app._Event_Int_Int_Void";eo.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=
c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__listeners:null,dispatch:function(a,b){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__:eo};var Pi=function(){this.canceled=!1;this.__listeners=[];this.__priorities=
[];this.__repeat=[]};h["lime.app._Event_Int_Void"]=Pi;Pi.__name__="lime.app._Event_Int_Void";Pi.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=
0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__listeners:null,dispatch:function(a){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__:Pi};var Pq=function(){this.canceled=!1;
this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_Int_lime_ui_JoystickHatPosition_Void"]=Pq;Pq.__name__="lime.app._Event_Int_lime_ui_JoystickHatPosition_Void";Pq.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);
this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__listeners:null,dispatch:function(a,b){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__:Pq};var Qq=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_String_Int_Int_Void"]=Qq;Qq.__name__="lime.app._Event_String_Int_Int_Void";Qq.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,
0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__listeners:null,dispatch:function(a,b,
c){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__:Qq};var fo=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_String_Void"]=fo;fo.__name__="lime.app._Event_String_Void";fo.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,
0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__listeners:null,
dispatch:function(a){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__:fo};var me=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_Void_Void"]=me;me.__name__="lime.app._Event_Void_Void";me.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;
if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,
1),this.__repeat.splice(b,1))},__listeners:null,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__:me};var go=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_lime_graphics_RenderContext_Void"]=go;go.__name__="lime.app._Event_lime_graphics_RenderContext_Void";go.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,
b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=
--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__listeners:null,dispatch:function(a){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__:go};var Rq=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_lime_ui_GamepadAxis_Float_Void"]=Rq;Rq.__name__="lime.app._Event_lime_ui_GamepadAxis_Float_Void";
Rq.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,
a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__listeners:null,dispatch:function(a,b){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__:Rq};var ho=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_lime_ui_GamepadButton_Void"]=
ho;ho.__name__="lime.app._Event_lime_ui_GamepadButton_Void";ho.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<
c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__listeners:null,dispatch:function(a){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__:ho};var Sq=function(){this.canceled=!1;this.__listeners=[];this.__priorities=
[];this.__repeat=[]};h["lime.app._Event_lime_ui_Gamepad_Void"]=Sq;Sq.__name__="lime.app._Event_lime_ui_Gamepad_Void";Sq.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=
!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__listeners:null,dispatch:function(a){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__:Sq};var Tq=
function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_lime_ui_Joystick_Void"]=Tq;Tq.__name__="lime.app._Event_lime_ui_Joystick_Void";Tq.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);
this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__listeners:null,dispatch:function(a){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__:Tq};var io=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void"]=io;io.__name__="lime.app._Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void";io.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,
0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__listeners:null,
dispatch:function(a,b){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__:io};var Jj=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_lime_ui_Touch_Void"]=Jj;Jj.__name__="lime.app._Event_lime_ui_Touch_Void";Jj.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<
e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),
this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__listeners:null,dispatch:function(a){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__:Jj};var Gq=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_lime_ui_Window_Void"]=Gq;Gq.__name__="lime.app._Event_lime_ui_Window_Void";Gq.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,
b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=
--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__listeners:null,dispatch:function(a){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__:Gq};var mt=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_ofEvents_T_Void"]=mt;mt.__name__="lime.app._Event_ofEvents_T_Void";mt.prototype=
{canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,e=this.__priorities.length;d<e;){var f=d++;if(c>this.__priorities[f]){this.__listeners.splice(f,0,a);this.__priorities.splice(f,0,c);this.__repeat.splice(f,0,!b);return}}this.__listeners.push(a);this.__priorities.push(c);this.__repeat.push(!b)},cancel:function(){this.canceled=!0},has:function(a){for(var b=0,c=this.__listeners;b<c.length;){var d=c[b];++b;if(X.compareMethods(d,a))return!0}return!1},
remove:function(a){for(var b=this.__listeners.length;0<=--b;)X.compareMethods(this.__listeners[b],a)&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},__listeners:null,dispatch:function(a){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__:mt};var Pt={};h["lime.graphics._CairoRenderContext.CairoRenderContext_Impl_"]=Pt;Pt.__name__="lime.graphics._CairoRenderContext.CairoRenderContext_Impl_";
Pt.fromRenderContext=function(a){return a.cairo};var Qt={};h["lime.graphics._Canvas2DRenderContext.Canvas2DRenderContext_Impl_"]=Qt;Qt.__name__="lime.graphics._Canvas2DRenderContext.Canvas2DRenderContext_Impl_";Qt.fromRenderContext=function(a){return a.canvas2D};var Rt={};h["lime.graphics._DOMRenderContext.DOMRenderContext_Impl_"]=Rt;Rt.__name__="lime.graphics._DOMRenderContext.DOMRenderContext_Impl_";Rt.fromRenderContext=function(a){return a.dom};var St={};h["lime.graphics._FlashRenderContext.FlashRenderContext_Impl_"]=
St;St.__name__="lime.graphics._FlashRenderContext.FlashRenderContext_Impl_";St.fromRenderContext=function(a){return null};var Ob=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;this.version=0;null==g&&(g=If.CANVAS);this.type=g;if(null==a){if(0<d&&0<e)switch(this.type._hx_index){case 0:this.buffer=new rg(null,d,e);Ba.createCanvas(this,d,e);null!=f&&0!=f&&this.fillRect(new he(0,0,d,e),f);break;case 1:a=d*
e*4,a=null!=a?new Uint8Array(a):null,this.buffer=new rg(a,d,e),null!=f&&0!=f&&this.fillRect(new he(0,0,d,e),f)}}else this.__fromImageBuffer(a)};h["lime.graphics.Image"]=Ob;Ob.__name__="lime.graphics.Image";Ob.fromBase64=function(a,b){if(null==a)return null;var c=new Ob;c.__fromBase64(a,b);return c};Ob.fromBitmapData=function(a){return null==a?null:a.image};Ob.fromBytes=function(a){if(null==a)return null;var b=new Ob;return b.__fromBytes(a)?b:null};Ob.fromCanvas=function(a){if(null==a)return null;
var b=new rg(null,a.width,a.height);b.set_src(a);a=new Ob(b);a.type=If.CANVAS;return a};Ob.fromFile=function(a){if(null==a)return null;var b=new Ob;return b.__fromFile(a)?b:null};Ob.fromImageElement=function(a){if(null==a)return null;var b=new rg(null,a.width,a.height);b.set_src(a);a=new Ob(b);a.type=If.CANVAS;return a};Ob.loadFromBase64=function(a,b){return null==a||null==b?xb.withValue(null):fb.loadImage("data:"+b+";base64,"+a)};Ob.loadFromBytes=function(a){if(null==a)return xb.withValue(null);
if(Ob.__isPNG(a))var b="image/png";else if(Ob.__isJPG(a))b="image/jpeg";else if(Ob.__isGIF(a))b="image/gif";else if(Ob.__isWebP(a))b="image/webp";else return xb.withValue(null);return fb.loadImageFromBytes(a,b)};Ob.loadFromFile=function(a){return null==a?xb.withValue(null):fb.loadImage(a)};Ob.__isGIF=function(a){if(null==a||6>a.length)return!1;a=a.getString(0,6);return"GIF87a"!=a?"GIF89a"==a:!0};Ob.__isJPG=function(a){return null==a||4>a.length?!1:255==a.b[0]&&216==a.b[1]&&255==a.b[a.length-2]?217==
a.b[a.length-1]:!1};Ob.__isPNG=function(a){return null==a||8>a.length?!1: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]:!1};Ob.__isWebP=function(a){return null==a||16>a.length?!1:"RIFF"==a.getString(0,4)?"WEBP"==a.getString(8,4):!1};Ob.prototype={buffer:null,dirty:null,height:null,offsetX:null,offsetY:null,rect:null,type:null,version:null,width:null,x:null,y:null,clone:function(){if(null!=this.buffer){this.type==If.CANVAS?Ba.convertToCanvas(this):Ba.convertToData(this);
var a=new Ob(this.buffer.clone(),this.offsetX,this.offsetY,this.width,this.height,null,this.type);a.version=this.version;return a}return new Ob(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._hx_index){case 0:Ba.colorTransform(this,a,b);break;case 1:Ba.convertToData(this);Qa.colorTransform(this,a,b);break;case 2:a.offset(this.offsetX,this.offsetY),this.buffer.__srcBitmapData.colorTransform(a.__toFlashRectangle(),
Hb.__toFlashColorTransform(b))}},copyChannel:function(a,b,c,d,e){b=this.__clipRect(b);if(null!=this.buffer&&null!=b&&!(e==Af.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._hx_index){case 0:Ba.copyChannel(this,a,b,c,d,e);break;case 1:Ba.convertToData(this);Ba.convertToData(a);Qa.copyChannel(this,a,b,c,d,e);break;case 2:switch(d._hx_index){case 0:var f=1;break;case 1:f=2;break;case 2:f=
4;break;case 3:f=8}switch(e._hx_index){case 0:var 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),a==this&&c.x<b.get_right()&&c.y<b.get_bottom()&&(a=this.clone()),d==a&&(null==e||0==e.x&&0==e.y)&&(e=d=null),this.type._hx_index){case 0:null!=d?(Ba.convertToData(this),Ba.convertToData(a),null!=d&&Ba.convertToData(d),Qa.copyPixels(this,a,b,c,d,e,f)):(Ba.convertToCanvas(this),
Ba.convertToCanvas(a),Ba.copyPixels(this,a,b,c,d,e,f));break;case 1:Ba.convertToData(this);Ba.convertToData(a);null!=d&&Ba.convertToData(d);Qa.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);if(null==a)return el.encode(this);switch(a._hx_index){case 0:return jt.encode(this);case 1:return ao.encode(this,b);case 2:return el.encode(this)}},fillRect:function(a,b,c){a=this.__clipRect(a);if(null!=this.buffer&&null!=a)switch(this.type._hx_index){case 0:Ba.fillRect(this,a,b,c);break;case 1:Ba.convertToData(this);if(0==this.buffer.data.length)break;Qa.fillRect(this,a,b,c);break;case 2:a.offset(this.offsetX,this.offsetY);if(null==c)b=(b&255)<<24|(b>>>24&255)<<16|(b>>>16&255)<<8|b>>>8&
255;else 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}this.buffer.__srcBitmapData.fillRect(a.__toFlashRectangle(),b)}},floodFill:function(a,b,c,d){if(null!=this.buffer)switch(this.type._hx_index){case 0:Ba.floodFill(this,a,b,c,d);break;case 1:Ba.convertToData(this);Qa.floodFill(this,a,b,c,d);break;case 2:if(null==d)c=(c&255)<<24|(c>>>24&255)<<16|(c>>>16&255)<<8|c>>>8&255;else 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}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._hx_index){case 0:return Ba.convertToData(this),Qa.getColorBoundsRect(this,a,b,c,d);case 1:return Qa.getColorBoundsRect(this,a,b,c,d);case 2:return a=this.buffer.__srcBitmapData.getColorBoundsRect(a,
b,c),new he(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._hx_index){case 0:return Ba.getPixel(this,a,b,c);case 1:return Ba.convertToData(this),Qa.getPixel(this,a,b,c);case 2:a=this.buffer.__srcBitmapData.getPixel(a+this.offsetX,b+this.offsetY);if(null==c)return(a>>>16&255)<<24|(a>>>8&255)<<16|(a&255)<<8|a>>>24&255;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}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._hx_index){case 0:return Ba.getPixel32(this,a,b,c);case 1:return Ba.convertToData(this),Qa.getPixel32(this,a,b,c);case 2:a=this.buffer.__srcBitmapData.getPixel32(a+this.offsetX,b+this.offsetY);if(null==c)return(a>>>16&255)<<24|(a>>>8&255)<<16|(a&255)<<8|a>>>24&255;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}default:return 0}},getPixels:function(a,b){if(null==this.buffer)return null;switch(this.type._hx_index){case 0:return Ba.getPixels(this,a,b);case 1:return Ba.convertToData(this),Qa.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._hx_index){case 0:Ba.convertToCanvas(this);Ba.merge(this,
a,b,c,d,e,f,g);break;case 1:Ba.convertToData(this);Ba.convertToData(a);Qa.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)}},resize:function(a,b){switch(this.type._hx_index){case 0:Ba.resize(this,a,b);break;case 1:Qa.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._hx_index){case 0:Ba.scroll(this,
a,b);break;case 1:this.copyPixels(this,this.get_rect(),new Gd(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._hx_index){case 0:Ba.setPixel(this,a,b,c,d);break;case 1:Ba.convertToData(this);Qa.setPixel(this,a,b,c,d);break;case 2:if(null==d)c=(c&255)<<24|(c>>>24&255)<<16|(c>>>16&255)<<8|c>>>8&255;else 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}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._hx_index){case 0:Ba.setPixel32(this,a,b,c,d);break;case 1:Ba.convertToData(this);Qa.setPixel32(this,a,b,c,d);break;case 2:if(null==d)c=(c&255)<<24|(c>>>24&255)<<16|(c>>>16&255)<<8|c>>>8&255;else 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}this.buffer.__srcBitmapData.setPixel32(a+this.offsetX,b+this.offsetY,c)}},setPixels:function(a,b,c,d){a=this.__clipRect(a);if(null!=this.buffer&&null!=a)switch(null==d&&(d=Oi.BIG_ENDIAN),this.type._hx_index){case 0:Ba.setPixels(this,a,b,c,d);break;case 1:Ba.convertToData(this),Qa.setPixels(this,a,b,c,d)}},threshold:function(a,b,c,d,e,f,g,k,l){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._hx_index){case 0:case 1:return Ba.convertToData(this),Ba.convertToData(a),Qa.threshold(this,a,b,c,d,e,f,g,k,l);case 2:if(null==l)f=(f&255)<<24|(f>>>24&255)<<16|(f>>>16&255)<<8|f>>>8&255;else switch(l){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}if(null==l)g=(g&255)<<24|(g>>>24&255)<<16|(g>>>16&255)<<8|g>>>
8&255;else switch(l){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}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.addEventListener("load",function(a){d.buffer=new rg(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){if(Ob.__isPNG(a))var c="image/png";else if(Ob.__isJPG(a))c="image/jpeg";
else if(Ob.__isGIF(a))c="image/gif";else return!1;this.__fromBase64(qg.encode(a),c,b);return!0},__fromFile:function(a,b,c){var d=this,e=new Image;fb.__isSameOrigin(a)||(e.crossOrigin="Anonymous");e.onload=function(a){d.buffer=new rg(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;return!0},__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&&Ba.convertToData(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){this.buffer.format!=a&&1==this.type._hx_index&&Qa.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:!1:!1},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;if(b==this.buffer.width&&c==this.buffer.height)return a;switch(this.type._hx_index){case 0:Ba.convertToData(this);Qa.resizeBuffer(this,b,c);break;case 1:Qa.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._hx_index){case 0:case 1:Ba.convertToData(this),
Qa.multiplyAlpha(this)}else!a&&this.buffer.premultiplied&&1==this.type._hx_index&&(Ba.convertToData(this),Qa.unmultiplyAlpha(this));return a},get_rect:function(){return new he(0,0,this.width,this.height)},get_src:function(){null!=this.buffer.__srcCanvas||null==this.buffer.data&&this.type!=If.DATA||Ba.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__:Ob,__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 rg=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.premultiplied=!1;this.transparent=!0};h["lime.graphics.ImageBuffer"]=rg;rg.__name__="lime.graphics.ImageBuffer";rg.prototype={bitsPerPixel:null,data:null,format:null,height:null,premultiplied:null,transparent:null,width:null,__srcBitmapData:null,__srcCanvas:null,__srcContext:null,__srcCustom:null,__srcImage:null,__srcImageData:null,clone:function(){var a=new rg(this.data,this.width,this.height,this.bitsPerPixel);if(null!=
this.data){var b=this.data.byteLength;b=null!=b?new Uint8Array(b):null;a.data=b;b=this.data;b=null!=b?new Uint8Array(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){a instanceof Image?this.__srcImage=a:a instanceof HTMLCanvasElement&&(this.__srcCanvas=a,this.__srcContext=this.__srcCanvas.getContext("2d"));return a},get_stride:function(){return this.width*(this.bitsPerPixel/8|0)},__class__:rg,__properties__:{get_stride:"get_stride",set_src:"set_src",get_src:"get_src"}};var Af=C["lime.graphics.ImageChannel"]={__ename__:"lime.graphics.ImageChannel",__constructs__:["RED","GREEN","BLUE","ALPHA"],RED:{_hx_index:0,__enum__:"lime.graphics.ImageChannel",
toString:u},GREEN:{_hx_index:1,__enum__:"lime.graphics.ImageChannel",toString:u},BLUE:{_hx_index:2,__enum__:"lime.graphics.ImageChannel",toString:u},ALPHA:{_hx_index:3,__enum__:"lime.graphics.ImageChannel",toString:u}},lu=C["lime.graphics.ImageFileFormat"]={__ename__:"lime.graphics.ImageFileFormat",__constructs__:["BMP","JPEG","PNG"],BMP:{_hx_index:0,__enum__:"lime.graphics.ImageFileFormat",toString:u},JPEG:{_hx_index:1,__enum__:"lime.graphics.ImageFileFormat",toString:u},PNG:{_hx_index:2,__enum__:"lime.graphics.ImageFileFormat",
toString:u}},If=C["lime.graphics.ImageType"]={__ename__:"lime.graphics.ImageType",__constructs__:["CANVAS","DATA","FLASH","CUSTOM"],CANVAS:{_hx_index:0,__enum__:"lime.graphics.ImageType",toString:u},DATA:{_hx_index:1,__enum__:"lime.graphics.ImageType",toString:u},FLASH:{_hx_index:2,__enum__:"lime.graphics.ImageType",toString:u},CUSTOM:{_hx_index:3,__enum__:"lime.graphics.ImageType",toString:u}},jo={};h["lime.graphics._OpenGLES2RenderContext.OpenGLES2RenderContext_Impl_"]=jo;jo.__name__="lime.graphics._OpenGLES2RenderContext.OpenGLES2RenderContext_Impl_";
jo.fromGL=function(a){return null};jo.fromOpenGLES3RenderContext=function(a){return null};jo.fromRenderContext=function(a){return null};jo.fromWebGLRenderContext=function(a){return null};var il={};h["lime.graphics._OpenGLES3RenderContext.OpenGLES3RenderContext_Impl_"]=il;il.__name__="lime.graphics._OpenGLES3RenderContext.OpenGLES3RenderContext_Impl_";il.fromRenderContext=function(a){return null};il.fromGL=function(a){return null};il.fromOpenGLES2RenderContext=function(a){return null};il.fromWebGLRenderContext=
function(a){return null};il.fromWebGL2RenderContext=function(a){return null};var Tt={};h["lime.graphics._OpenGLRenderContext.OpenGLRenderContext_Impl_"]=Tt;Tt.__name__="lime.graphics._OpenGLRenderContext.OpenGLRenderContext_Impl_";Tt.fromRenderContext=function(a){return null};var Bq=function(){};h["lime.graphics.RenderContext"]=Bq;Bq.__name__="lime.graphics.RenderContext";Bq.prototype={attributes:null,cairo:null,canvas2D:null,dom:null,flash:null,gl:null,gles2:null,gles3:null,type:null,version:null,
webgl:null,webgl2:null,window:null,__class__:Bq};var Td={};h["lime.graphics._WebGL2RenderContext.WebGL2RenderContext_Impl_"]=Td;Td.__name__="lime.graphics._WebGL2RenderContext.WebGL2RenderContext_Impl_";Td.bufferData=function(a,b,c,d,e,f){null!=e?a.bufferData(b,c,d,e,f):a.bufferData(b,c,d)};Td.bufferSubData=function(a,b,c,d,e,f){null!=e?a.bufferSubData(b,c,d,e,f):a.bufferSubData(b,c,d)};Td.compressedTexImage2D=function(a,b,c,d,e,f,g,k,l,m){null!=l?a.compressedTexImage2D(b,c,d,e,f,g,k,l,m):a.compressedTexImage2D(b,
c,d,e,f,g,k)};Td.compressedTexSubImage2D=function(a,b,c,d,e,f,g,k,l,m,p){null!=m?a.compressedTexSubImage2D(b,c,d,e,f,g,k,l,m,p):a.compressedTexSubImage2D(b,c,d,e,f,g,k,l)};Td.getBufferSubData=function(a,b,c,d,e,f){null!=e?a.getBufferSubData(b,c,d,e,f):a.getBufferSubData(b,c,d)};Td.readPixels=function(a,b,c,d,e,f,g,k,l){null!=l?a.readPixels(b,c,d,e,f,g,k,l):a.readPixels(b,c,d,e,f,g,k)};Td.texImage2D=function(a,b,c,d,e,f,g,k,l,m,p){null!=p?a.texImage2D(b,c,d,e,f,g,k,l,m,p):null!=k?a.texImage2D(b,c,
d,e,f,g,k,l,m):a.texImage2D(b,c,d,e,f,g)};Td.texSubImage2D=function(a,b,c,d,e,f,g,k,l,m,p){null!=p?a.texSubImage2D(b,c,d,e,f,g,k,l,m,p):null!=l?a.texSubImage2D(b,c,d,e,f,g,k,l,m):a.texSubImage2D(b,c,d,e,f,g,k)};Td.uniform1fv=function(a,b,c,d,e){null!=d?a.uniform1fv(b,c,d,e):a.uniform1fv(b,c)};Td.uniform1iv=function(a,b,c,d,e){null!=d?a.uniform1iv(b,c,d,e):a.uniform1iv(b,c)};Td.uniform2fv=function(a,b,c,d,e){null!=d?a.uniform2fv(b,c,d,e):a.uniform2fv(b,c)};Td.uniform2iv=function(a,b,c,d,e){null!=d?
a.uniform2iv(b,c,d,e):a.uniform2iv(b,c)};Td.uniform3fv=function(a,b,c,d,e){null!=d?a.uniform3fv(b,c,d,e):a.uniform3fv(b,c)};Td.uniform3iv=function(a,b,c,d,e){null!=d?a.uniform3iv(b,c,d,e):a.uniform3iv(b,c)};Td.uniform4fv=function(a,b,c,d,e){null!=d?a.uniform4fv(b,c,d,e):a.uniform4fv(b,c)};Td.uniform4iv=function(a,b,c,d,e){null!=d?a.uniform4iv(b,c,d,e):a.uniform4iv(b,c)};Td.uniformMatrix2fv=function(a,b,c,d,e,f){null!=e?a.uniformMatrix2fv(b,c,d,e,f):a.uniformMatrix2fv(b,c,d)};Td.uniformMatrix3fv=function(a,
b,c,d,e,f){null!=e?a.uniformMatrix3fv(b,c,d,e,f):a.uniformMatrix3fv(b,c,d)};Td.uniformMatrix4fv=function(a,b,c,d,e,f){null!=e?a.uniformMatrix4fv(b,c,d,e,f):a.uniformMatrix4fv(b,c,d)};Td.fromGL=function(a){return null};Td.fromRenderContext=function(a){return a.webgl2};Td.toWebGLRenderContext=function(a){return a};var Ab={};h["lime.graphics._WebGLRenderContext.WebGLRenderContext_Impl_"]=Ab;Ab.__name__="lime.graphics._WebGLRenderContext.WebGLRenderContext_Impl_";Ab.bufferData=function(a,b,c,d){a.bufferData(b,
c,d)};Ab.bufferSubData=function(a,b,c,d){a.bufferSubData(b,c,d)};Ab.compressedTexImage2D=function(a,b,c,d,e,f,g,k){a.compressedTexImage2D(b,c,d,e,f,g,k)};Ab.compressedTexSubImage2D=function(a,b,c,d,e,f,g,k,l){a.compressedTexSubImage2D(b,c,d,e,f,g,k,l)};Ab.readPixels=function(a,b,c,d,e,f,g,k){a.readPixels(b,c,d,e,f,g,k)};Ab.texImage2D=function(a,b,c,d,e,f,g,k,l,m){null!=k?a.texImage2D(b,c,d,e,f,g,k,l,m):a.texImage2D(b,c,d,e,f,g)};Ab.texSubImage2D=function(a,b,c,d,e,f,g,k,l,m){null!=l?a.texSubImage2D(b,
c,d,e,f,g,k,l,m):a.texSubImage2D(b,c,d,e,f,g,k)};Ab.uniformMatrix2fv=function(a,b,c,d){a.uniformMatrix2fv(b,c,d)};Ab.uniformMatrix3fv=function(a,b,c,d){a.uniformMatrix3fv(b,c,d)};Ab.uniformMatrix4fv=function(a,b,c,d){a.uniformMatrix4fv(b,c,d)};Ab.fromWebGL2RenderContext=function(a){return a};Ab.fromRenderContext=function(a){return a.webgl};Ab.fromGL=function(a){return t.context};var Kj=function(a){};h["lime.graphics.cairo.Cairo"]=Kj;Kj.__name__="lime.graphics.cairo.Cairo";Kj.__properties__={get_versionString:"get_versionString",
get_version:"get_version"};Kj.get_version=function(){return 0};Kj.get_versionString=function(){return""};Kj.prototype={target:null,userData:null,handle:null,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(){},getOperator:function(){return 0},identityMatrix:function(){},
inClip:function(a,b){return!1},inFill:function(a,b){return!1},inStroke:function(a,b){return!1},lineTo:function(a,b){},mask:function(a){},maskSurface:function(a,b,c){},moveTo:function(a,b){},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(){},rotate:function(a){},save:function(){},scale:function(a,b){},setFontSize:function(a){},setOperator:function(a){return a},setSourceRGB:function(a,b,c){},setSourceRGBA:function(a,b,c,d){},setSourceSurface:function(a,b,c){},showGlyphs:function(a){},showPage:function(){},showText:function(a){},status:function(){return 0},stroke:function(){},strokeExtents:function(a,b,c,d){},strokePreserve:function(){},textPath:function(a){},transform:function(a){},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_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__:Kj,__properties__:{set_tolerance:"set_tolerance",get_tolerance:"get_tolerance",get_target:"get_target",set_source:"set_source",get_source:"get_source",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 Uq={};h["lime.graphics.cairo._CairoFTFontFace.CairoFTFontFace_Impl_"]=Uq;Uq.__name__="lime.graphics.cairo._CairoFTFontFace.CairoFTFontFace_Impl_";Uq._new=
function(){return 0};Uq.create=function(a,b){return 0};var nt={};h["lime.graphics.cairo._CairoFontFace.CairoFontFace_Impl_"]=nt;nt.__name__="lime.graphics.cairo._CairoFontFace.CairoFontFace_Impl_";nt._new=function(){return null};nt.status=function(a){return 0};var ah={};h["lime.graphics.cairo._CairoFontOptions.CairoFontOptions_Impl_"]=ah;ah.__name__="lime.graphics.cairo._CairoFontOptions.CairoFontOptions_Impl_";ah.__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"};ah._new=function(){return null};ah.get_antialias=function(a){return 0};ah.set_antialias=function(a,b){return b};ah.get_hintMetrics=function(a){return 0};ah.set_hintMetrics=function(a,b){return b};ah.get_hintStyle=function(a){return 0};ah.set_hintStyle=function(a,b){return b};ah.get_subpixelOrder=function(a){return 0};
ah.set_subpixelOrder=function(a,b){return b};var ot=function(a,b,c){null==c&&(c=0);null==b&&(b=0);this.index=a;this.x=b;this.y=c};h["lime.graphics.cairo.CairoGlyph"]=ot;ot.__name__="lime.graphics.cairo.CairoGlyph";ot.prototype={index:null,x:null,y:null,__class__:ot};var bh={};h["lime.graphics.cairo._CairoImageSurface.CairoImageSurface_Impl_"]=bh;bh.__name__="lime.graphics.cairo._CairoImageSurface.CairoImageSurface_Impl_";bh.__properties__={get_width:"get_width",get_stride:"get_stride",get_height:"get_height",
get_format:"get_format",get_data:"get_data"};bh._new=function(a,b,c){return 0};bh.create=function(a,b,c,d,e){return 0};bh.fromImage=function(a){return null};bh.get_data=function(a){return oc.fromFloat(0)};bh.get_format=function(a){return 0};bh.get_height=function(a){return 0};bh.get_stride=function(a){return 0};bh.get_width=function(a){return 0};var Bc={};h["lime.graphics.cairo._CairoPattern.CairoPattern_Impl_"]=Bc;Bc.__name__="lime.graphics.cairo._CairoPattern.CairoPattern_Impl_";Bc.__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"};Bc._new=function(a){return a};Bc.addColorStopRGB=function(a,b,c,d,e){};Bc.addColorStopRGBA=function(a,b,c,d,e,f){};Bc.createForSurface=function(a){return 0};Bc.createLinear=function(a,b,c,d){return 0};Bc.createRadial=function(a,b,c,d,e,f){return 0};Bc.createRGB=function(a,b,c){return 0};Bc.createRGBA=function(a,b,
c,d){return 0};Bc.get_colorStopCount=function(a){return 0};Bc.get_extend=function(a){return 0};Bc.set_extend=function(a,b){return b};Bc.get_filter=function(a){return 0};Bc.set_filter=function(a,b){return b};Bc.get_matrix=function(a){return null};Bc.set_matrix=function(a,b){return b};var Vq={};h["lime.graphics.cairo._CairoSurface.CairoSurface_Impl_"]=Vq;Vq.__name__="lime.graphics.cairo._CairoSurface.CairoSurface_Impl_";Vq.flush=function(a){};var t=function(){};h["lime.graphics.opengl.GL"]=t;t.__name__=
"lime.graphics.opengl.GL";t.activeTexture=function(a){t.context.activeTexture(a)};t.attachShader=function(a,b){t.context.attachShader(a,b)};t.beginQuery=function(a,b){t.context.beginQuery(a,b)};t.beginTransformFeedback=function(a){t.context.beginTransformFeedback(a)};t.bindAttribLocation=function(a,b,c){t.context.bindAttribLocation(a,b,c)};t.bindBuffer=function(a,b){t.context.bindBuffer(a,b)};t.bindBufferBase=function(a,b,c){t.context.bindBufferBase(a,b,c)};t.bindBufferRange=function(a,b,c,d,e){t.context.bindBufferRange(a,
b,c,d,oc.fromFloat(e))};t.bindFramebuffer=function(a,b){t.context.bindFramebuffer(a,b)};t.bindRenderbuffer=function(a,b){t.context.bindRenderbuffer(a,b)};t.bindSampler=function(a,b){t.context.bindSampler(a,b)};t.bindTexture=function(a,b){t.context.bindTexture(a,b)};t.bindTransformFeedback=function(a,b){t.context.bindTransformFeedback(a,b)};t.bindVertexArray=function(a){t.context.bindVertexArray(a)};t.blitFramebuffer=function(a,b,c,d,e,f,g,k,l,m){t.context.blitFramebuffer(a,b,c,d,e,f,g,k,l,m)};t.blendColor=
function(a,b,c,d){t.context.blendColor(a,b,c,d)};t.blendEquation=function(a){t.context.blendEquation(a)};t.blendEquationSeparate=function(a,b){t.context.blendEquationSeparate(a,b)};t.blendFunc=function(a,b){t.context.blendFunc(a,b)};t.blendFuncSeparate=function(a,b,c,d){t.context.blendFuncSeparate(a,b,c,d)};t.bufferDataWEBGL=function(a,b,c,d,e){var f=t.context;null!=d?f.bufferData(a,b,c,d,e):f.bufferData(a,b,c)};t.bufferSubDataWEBGL=function(a,b,c,d,e){var f=t.context;null!=d?f.bufferSubData(a,b,
c,d,e):f.bufferSubData(a,b,c)};t.checkFramebufferStatus=function(a){return t.context.checkFramebufferStatus(a)};t.clear=function(a){t.context.clear(a)};t.clearBufferfi=function(a,b,c,d){t.context.clearBufferfi(a,b,c,d)};t.clearBufferfvWEBGL=function(a,b,c,d){t.context.clearBufferfv(a,b,c,d)};t.clearBufferivWEBGL=function(a,b,c,d){t.context.clearBufferiv(a,b,c,d)};t.clearBufferuivWEBGL=function(a,b,c,d){t.context.clearBufferuiv(a,b,c,d)};t.clearColor=function(a,b,c,d){t.context.clearColor(a,b,c,d)};
t.clearDepth=function(a){t.context.clearDepth(a)};t.clearStencil=function(a){t.context.clearStencil(a)};t.clientWaitSync=function(a,b,c){return t.context.clientWaitSync(a,b,c)};t.colorMask=function(a,b,c,d){t.context.colorMask(a,b,c,d)};t.compileShader=function(a){t.context.compileShader(a)};t.compressedTexImage2DWEBGL=function(a,b,c,d,e,f,g,k,l){var m=t.context;null!=k?m.compressedTexImage2D(a,b,c,d,e,f,g,k,l):m.compressedTexImage2D(a,b,c,d,e,f,g)};t.compressedTexImage3DWEBGL=function(a,b,c,d,e,
f,g,k,l,m){t.context.compressedTexImage3D(a,b,c,d,e,f,g,k,l,m)};t.compressedTexSubImage2DWEBGL=function(a,b,c,d,e,f,g,k,l,m){var p=t.context;null!=l?p.compressedTexSubImage2D(a,b,c,d,e,f,g,k,l,m):p.compressedTexSubImage2D(a,b,c,d,e,f,g,k)};t.compressedTexSubImage3DWEBGL=function(a,b,c,d,e,f,g,k,l,m,p,n){t.context.compressedTexSubImage3D(a,b,c,d,e,f,g,k,l,m,p,n)};t.copyTexImage2D=function(a,b,c,d,e,f,g,k){t.context.copyTexImage2D(a,b,c,d,e,f,g,k)};t.copyTexSubImage2D=function(a,b,c,d,e,f,g,k){t.context.copyTexSubImage2D(a,
b,c,d,e,f,g,k)};t.copyTexSubImage3D=function(a,b,c,d,e,f,g,k,l){t.context.copyTexSubImage3D(a,b,c,d,e,f,g,k,l)};t.createBuffer=function(){return t.context.createBuffer()};t.createFramebuffer=function(){return t.context.createFramebuffer()};t.createProgram=function(){return t.context.createProgram()};t.createQuery=function(){return t.context.createQuery()};t.createRenderbuffer=function(){return t.context.createRenderbuffer()};t.createSampler=function(){return t.context.createSampler()};t.createShader=
function(a){return t.context.createShader(a)};t.createTexture=function(){return t.context.createTexture()};t.createTransformFeedback=function(){return t.context.createTransformFeedback()};t.createVertexArray=function(){return t.context.createVertexArray()};t.cullFace=function(a){t.context.cullFace(a)};t.deleteBuffer=function(a){t.context.deleteBuffer(a)};t.deleteFramebuffer=function(a){t.context.deleteFramebuffer(a)};t.deleteProgram=function(a){t.context.deleteProgram(a)};t.deleteQuery=function(a){t.context.deleteQuery(a)};
t.deleteRenderbuffer=function(a){t.context.deleteRenderbuffer(a)};t.deleteSampler=function(a){t.context.deleteSampler(a)};t.deleteShader=function(a){t.context.deleteShader(a)};t.deleteSync=function(a){t.context.deleteSync(a)};t.deleteTexture=function(a){t.context.deleteTexture(a)};t.deleteTransformFeedback=function(a){t.context.deleteTransformFeedback(a)};t.deleteVertexArray=function(a){t.context.deleteVertexArray(a)};t.depthFunc=function(a){t.context.depthFunc(a)};t.depthMask=function(a){t.context.depthMask(a)};
t.depthRange=function(a,b){t.context.depthRange(a,b)};t.detachShader=function(a,b){t.context.detachShader(a,b)};t.disable=function(a){t.context.disable(a)};t.disableVertexAttribArray=function(a){t.context.disableVertexAttribArray(a)};t.drawArrays=function(a,b,c){t.context.drawArrays(a,b,c)};t.drawArraysInstanced=function(a,b,c,d){t.context.drawArraysInstanced(a,b,c,d)};t.drawBuffers=function(a){t.context.drawBuffers(a)};t.drawElements=function(a,b,c,d){t.context.drawElements(a,b,c,d)};t.drawElementsInstanced=
function(a,b,c,d,e){t.context.drawElementsInstanced(a,b,c,d,e)};t.drawRangeElements=function(a,b,c,d,e,f){t.context.drawRangeElements(a,b,c,d,e,f)};t.enable=function(a){t.context.enable(a)};t.enableVertexAttribArray=function(a){t.context.enableVertexAttribArray(a)};t.endQuery=function(a){t.context.endQuery(a)};t.endTransformFeedback=function(){t.context.endTransformFeedback()};t.fenceSync=function(a,b){return t.context.fenceSync(a,b)};t.finish=function(){t.context.finish()};t.flush=function(){t.context.flush()};
t.framebufferRenderbuffer=function(a,b,c,d){t.context.framebufferRenderbuffer(a,b,c,d)};t.framebufferTexture2D=function(a,b,c,d,e){t.context.framebufferTexture2D(a,b,c,d,e)};t.framebufferTextureLayer=function(a,b,c,d,e){t.context.framebufferTextureLayer(a,b,c,d,e)};t.frontFace=function(a){t.context.frontFace(a)};t.generateMipmap=function(a){t.context.generateMipmap(a)};t.getActiveAttrib=function(a,b){return t.context.getActiveAttrib(a,b)};t.getActiveUniform=function(a,b){return t.context.getActiveUniform(a,
b)};t.getActiveUniformBlockName=function(a,b){return t.context.getActiveUniformBlockName(a,b)};t.getActiveUniformBlockParameter=function(a,b,c){return t.context.getActiveUniformBlockParameter(a,b,c)};t.getActiveUniforms=function(a,b,c){return t.context.getActiveUniforms(a,b,c)};t.getAttachedShaders=function(a){return t.context.getAttachedShaders(a)};t.getAttribLocation=function(a,b){return t.context.getAttribLocation(a,b)};t.getBufferParameter=function(a,b){return t.context.getBufferParameter(a,b)};
t.getBufferSubDataWEBGL=function(a,b,c,d,e){var f=t.context;null!=d?f.getBufferSubData(a,b,c,d,e):f.getBufferSubData(a,b,c)};t.getContextAttributes=function(){return t.context.getContextAttributes()};t.getError=function(){return t.context.getError()};t.getExtension=function(a){return t.context.getExtension(a)};t.getFragDataLocation=function(a,b){return t.context.getFragDataLocation(a,b)};t.getFramebufferAttachmentParameter=function(a,b,c){return t.context.getFramebufferAttachmentParameter(a,b,c)};
t.getIndexedParameter=function(a,b){return t.context.getIndexedParameter(a,b)};t.getInternalformatParameter=function(a,b,c){return t.context.getInternalformatParameter(a,b,c)};t.getParameter=function(a){return t.context.getParameter(a)};t.getProgramInfoLog=function(a){return t.context.getProgramInfoLog(a)};t.getProgramParameter=function(a,b){return t.context.getProgramParameter(a,b)};t.getQuery=function(a,b){return t.context.getQuery(a,b)};t.getQueryParameter=function(a,b){return t.context.getQueryParameter(a,
b)};t.getRenderbufferParameter=function(a,b){return t.context.getRenderbufferParameter(a,b)};t.getSamplerParameter=function(a,b){return t.context.getSamplerParameter(a,b)};t.getShaderInfoLog=function(a){return t.context.getShaderInfoLog(a)};t.getShaderParameter=function(a,b){return t.context.getShaderParameter(a,b)};t.getShaderPrecisionFormat=function(a,b){return t.context.getShaderPrecisionFormat(a,b)};t.getShaderSource=function(a){return t.context.getShaderSource(a)};t.getSupportedExtensions=function(){return t.context.getSupportedExtensions()};
t.getSyncParameter=function(a,b){return t.context.getSyncParameter(a,b)};t.getTexParameter=function(a,b){return t.context.getTexParameter(a,b)};t.getTransformFeedbackVarying=function(a,b){return t.context.getTransformFeedbackVarying(a,b)};t.getUniform=function(a,b){return t.context.getUniform(a,b)};t.getUniformBlockIndex=function(a,b){return t.context.getUniformBlockIndex(a,b)};t.getUniformIndices=function(a,b){return t.context.getUniformIndices(a,b)};t.getUniformLocation=function(a,b){return t.context.getUniformLocation(a,
b)};t.getVertexAttrib=function(a,b){return t.context.getVertexAttrib(a,b)};t.getVertexAttribOffset=function(a,b){return oc.fromFloat(t.context.getVertexAttribOffset(a,b))};t.hint=function(a,b){t.context.hint(a,b)};t.invalidateFramebuffer=function(a,b){t.context.invalidateFramebuffer(a,b)};t.invalidateSubFramebuffer=function(a,b,c,d,e,f){t.context.invalidateSubFramebuffer(a,b,c,d,e,f)};t.isBuffer=function(a){return t.context.isBuffer(a)};t.isContextLost=function(){return t.context.isContextLost()};
t.isEnabled=function(a){return t.context.isEnabled(a)};t.isFramebuffer=function(a){return t.context.isFramebuffer(a)};t.isProgram=function(a){return t.context.isProgram(a)};t.isQuery=function(a){return t.context.isQuery(a)};t.isRenderbuffer=function(a){return t.context.isRenderbuffer(a)};t.isSampler=function(a){return t.context.isSampler(a)};t.isShader=function(a){return t.context.isShader(a)};t.isSync=function(a){return t.context.isSync(a)};t.isTexture=function(a){return t.context.isTexture(a)};
t.isTransformFeedback=function(a){return t.context.isTransformFeedback(a)};t.isVertexArray=function(a){return t.context.isVertexArray(a)};t.lineWidth=function(a){t.context.lineWidth(a)};t.linkProgram=function(a){t.context.linkProgram(a)};t.pauseTransformFeedback=function(){t.context.pauseTransformFeedback()};t.pixelStorei=function(a,b){t.context.pixelStorei(a,b)};t.polygonOffset=function(a,b){t.context.polygonOffset(a,b)};t.readBuffer=function(a){t.context.readBuffer(a)};t.readPixelsWEBGL=function(a,
b,c,d,e,f,g,k){var l=t.context;null!=k?l.readPixels(a,b,c,d,e,f,g,k):l.readPixels(a,b,c,d,e,f,g)};t.renderbufferStorage=function(a,b,c,d){t.context.renderbufferStorage(a,b,c,d)};t.renderbufferStorageMultisample=function(a,b,c,d,e){t.context.renderbufferStorageMultisample(a,b,c,d,e)};t.resumeTransformFeedback=function(){t.context.resumeTransformFeedback()};t.sampleCoverage=function(a,b){t.context.sampleCoverage(a,b)};t.samplerParameterf=function(a,b,c){t.context.samplerParameterf(a,b,c)};t.samplerParameteri=
function(a,b,c){t.context.samplerParameteri(a,b,c)};t.scissor=function(a,b,c,d){t.context.scissor(a,b,c,d)};t.shaderSource=function(a,b){t.context.shaderSource(a,b)};t.stencilFunc=function(a,b,c){t.context.stencilFunc(a,b,c)};t.stencilFuncSeparate=function(a,b,c,d){t.context.stencilFuncSeparate(a,b,c,d)};t.stencilMask=function(a){t.context.stencilMask(a)};t.stencilMaskSeparate=function(a,b){t.context.stencilMaskSeparate(a,b)};t.stencilOp=function(a,b,c){t.context.stencilOp(a,b,c)};t.stencilOpSeparate=
function(a,b,c,d){t.context.stencilOpSeparate(a,b,c,d)};t.texImage2DWEBGL=function(a,b,c,d,e,f,g,k,l,m){var p=t.context;null!=m?p.texImage2D(a,b,c,d,e,f,g,k,l,m):null!=g?p.texImage2D(a,b,c,d,e,f,g,k,l):p.texImage2D(a,b,c,d,e,f)};t.texImage3DWEBGL=function(a,b,c,d,e,f,g,k,l,m,p){t.context.texImage3D(a,b,c,d,e,f,g,k,l,m,p)};t.texStorage2D=function(a,b,c,d,e){t.context.texStorage2D(a,b,c,d,e)};t.texStorage3D=function(a,b,c,d,e,f){t.context.texStorage3D(a,b,c,d,e,f)};t.texParameterf=function(a,b,c){t.context.texParameterf(a,
b,c)};t.texParameteri=function(a,b,c){t.context.texParameteri(a,b,c)};t.texSubImage2DWEBGL=function(a,b,c,d,e,f,g,k,l,m){var p=t.context;null!=m?p.texSubImage2D(a,b,c,d,e,f,g,k,l,m):null!=k?p.texSubImage2D(a,b,c,d,e,f,g,k,l):p.texSubImage2D(a,b,c,d,e,f,g)};t.texSubImage3DWEBGL=function(a,b,c,d,e,f,g,k,l,m,p,n){t.context.texSubImage3D(a,b,c,d,e,f,g,k,l,m,p,n)};t.transformFeedbackVaryings=function(a,b,c){t.context.transformFeedbackVaryings(a,b,c)};t.uniform1f=function(a,b){t.context.uniform1f(a,b)};
t.uniform1fvWEBGL=function(a,b,c,d){var e=t.context;null!=c?e.uniform1fv(a,b,c,d):e.uniform1fv(a,b)};t.uniform1i=function(a,b){t.context.uniform1i(a,b)};t.uniform1ivWEBGL=function(a,b,c,d){var e=t.context;null!=c?e.uniform1iv(a,b,c,d):e.uniform1iv(a,b)};t.uniform1ui=function(a,b){t.context.uniform1ui(a,b)};t.uniform1uivWEBGL=function(a,b,c,d){t.context.uniform1uiv(a,b,c,d)};t.uniform2f=function(a,b,c){t.context.uniform2f(a,b,c)};t.uniform2fvWEBGL=function(a,b,c,d){Td.uniform2fv(t.context,a,b,c,d)};
t.uniform2i=function(a,b,c){t.context.uniform2i(a,b,c)};t.uniform2ivWEBGL=function(a,b,c,d){var e=t.context;null!=c?e.uniform2iv(a,b,c,d):e.uniform2iv(a,b)};t.uniform2ui=function(a,b,c){t.context.uniform2ui(a,b,c)};t.uniform2uivWEBGL=function(a,b,c,d){t.context.uniform2uiv(a,b,c,d)};t.uniform3f=function(a,b,c,d){t.context.uniform3f(a,b,c,d)};t.uniform3fvWEBGL=function(a,b,c,d){var e=t.context;null!=c?e.uniform3fv(a,b,c,d):e.uniform3fv(a,b)};t.uniform3i=function(a,b,c,d){t.context.uniform3i(a,b,c,
d)};t.uniform3ivWEBGL=function(a,b,c,d){var e=t.context;null!=c?e.uniform3iv(a,b,c,d):e.uniform3iv(a,b)};t.uniform3ui=function(a,b,c,d){t.context.uniform3ui(a,b,c,d)};t.uniform3uivWEBGL=function(a,b,c,d){t.context.uniform3uiv(a,b,c,d)};t.uniform4f=function(a,b,c,d,e){t.context.uniform4f(a,b,c,d,e)};t.uniform4fvWEBGL=function(a,b,c,d){var e=t.context;null!=c?e.uniform4fv(a,b,c,d):e.uniform4fv(a,b)};t.uniform4i=function(a,b,c,d,e){t.context.uniform4i(a,b,c,d,e)};t.uniform4ivWEBGL=function(a,b,c,d){var e=
t.context;null!=c?e.uniform4iv(a,b,c,d):e.uniform4iv(a,b)};t.uniform4ui=function(a,b,c,d,e){t.context.uniform4ui(a,b,c,d,e)};t.uniform4uivWEBGL=function(a,b,c,d){t.context.uniform4uiv(a,b,c,d)};t.uniformBlockBinding=function(a,b,c){t.context.uniformBlockBinding(a,b,c)};t.uniformMatrix2fvWEBGL=function(a,b,c,d,e){var f=t.context;null!=d?f.uniformMatrix2fv(a,b,c,d,e):f.uniformMatrix2fv(a,b,c)};t.uniformMatrix2x3fvWEBGL=function(a,b,c,d,e){t.context.uniformMatrix2x3fv(a,b,c,d,e)};t.uniformMatrix2x4fvWEBGL=
function(a,b,c,d,e){t.context.uniformMatrix2x4fv(a,b,c,d,e)};t.uniformMatrix3fvWEBGL=function(a,b,c,d,e){var f=t.context;null!=d?f.uniformMatrix3fv(a,b,c,d,e):f.uniformMatrix3fv(a,b,c)};t.uniformMatrix3x2fvWEBGL=function(a,b,c,d,e){t.context.uniformMatrix3x2fv(a,b,c,d,e)};t.uniformMatrix3x4fvWEBGL=function(a,b,c,d,e){t.context.uniformMatrix3x4fv(a,b,c,d,e)};t.uniformMatrix4fvWEBGL=function(a,b,c,d,e){var f=t.context;null!=d?f.uniformMatrix4fv(a,b,c,d,e):f.uniformMatrix4fv(a,b,c)};t.uniformMatrix4x2fvWEBGL=
function(a,b,c,d,e){t.context.uniformMatrix4x2fv(a,b,c,d,e)};t.uniformMatrix4x3fvWEBGL=function(a,b,c,d,e){t.context.uniformMatrix4x3fv(a,b,c,d,e)};t.useProgram=function(a){t.context.useProgram(a)};t.validateProgram=function(a){t.context.validateProgram(a)};t.vertexAttrib1f=function(a,b){t.context.vertexAttrib1f(a,b)};t.vertexAttrib1fv=function(a,b){t.context.vertexAttrib1fv(a,b)};t.vertexAttrib1fvWEBGL=function(a,b){t.context.vertexAttrib1fv(a,b)};t.vertexAttrib2f=function(a,b,c){t.context.vertexAttrib2f(a,
b,c)};t.vertexAttrib2fv=function(a,b){t.context.vertexAttrib2fv(a,b)};t.vertexAttrib2fvWEBGL=function(a,b){t.context.vertexAttrib2fv(a,b)};t.vertexAttrib3f=function(a,b,c,d){t.context.vertexAttrib3f(a,b,c,d)};t.vertexAttrib3fv=function(a,b){t.context.vertexAttrib3fv(a,b)};t.vertexAttrib3fvWEBGL=function(a,b){t.context.vertexAttrib3fv(a,b)};t.vertexAttrib4f=function(a,b,c,d,e){t.context.vertexAttrib4f(a,b,c,d,e)};t.vertexAttrib4fv=function(a,b){t.context.vertexAttrib4fv(a,b)};t.vertexAttrib4fvWEBGL=
function(a,b){t.context.vertexAttrib4fv(a,b)};t.vertexAttribDivisor=function(a,b){t.context.vertexAttribDivisor(a,b)};t.vertexAttribI4i=function(a,b,c,d,e){t.context.vertexAttribI4i(a,b,c,d,e)};t.vertexAttribI4iv=function(a,b){t.context.vertexAttribI4iv(a,b)};t.vertexAttribI4ivWEBGL=function(a,b){t.context.vertexAttribI4iv(a,b)};t.vertexAttribI4ui=function(a,b,c,d,e){t.context.vertexAttribI4ui(a,b,c,d,e)};t.vertexAttribI4uiv=function(a,b){t.context.vertexAttribI4uiv(a,b)};t.vertexAttribI4uivWEBGL=
function(a,b){t.context.vertexAttribI4uiv(a,b)};t.vertexAttribIPointer=function(a,b,c,d,e){t.context.vertexAttribIPointer(a,b,c,d,e)};t.vertexAttribPointer=function(a,b,c,d,e,f){t.context.vertexAttribPointer(a,b,c,d,e,f)};t.viewport=function(a,b,c,d){t.context.viewport(a,b,c,d)};t.waitSync=function(a,b,c){t.context.waitSync(a,b,c)};t.__getObjectID=function(a){return null==a?0:a.id};var Ut={};h["lime.graphics.opengl._GLProgram.GLProgram_Impl_"]=Ut;Ut.__name__="lime.graphics.opengl._GLProgram.GLProgram_Impl_";
Ut.fromSources=function(a,b,c){b=Wq.fromSource(a,b,a.VERTEX_SHADER);var d=Wq.fromSource(a,c,a.FRAGMENT_SHADER);c=a.createProgram();a.attachShader(c,b);a.attachShader(c,d);a.linkProgram(c);0==a.getProgramParameter(c,35714)&&(a="Unable to initialize the shader program\n"+t.context.getProgramInfoLog(c),Ta.error(a,{fileName:"lime/graphics/opengl/GLProgram.hx",lineNumber:39,className:"lime.graphics.opengl._GLProgram.GLProgram_Impl_",methodName:"fromSources"}));return c};var Wq={};h["lime.graphics.opengl._GLShader.GLShader_Impl_"]=
Wq;Wq.__name__="lime.graphics.opengl._GLShader.GLShader_Impl_";Wq.fromSource=function(a,b,c){var d=a.createShader(c);a.shaderSource(d,b);a.compileShader(d);0==a.getShaderParameter(d,a.COMPILE_STATUS)&&(b=c==a.VERTEX_SHADER?"Error compiling vertex shader":c==a.FRAGMENT_SHADER?"Error compiling fragment shader":"Error compiling unknown shader type",b+="\n"+a.getShaderInfoLog(d),Ta.error(b,{fileName:"lime/graphics/opengl/GLShader.hx",lineNumber:40,className:"lime.graphics.opengl._GLShader.GLShader_Impl_",
methodName:"fromSource"}));return d};var pt=function(){this.STACK_UNDERFLOW=1284;this.STACK_OVERFLOW=1283;this.CONTEXT_FLAG_DEBUG_BIT=2;this.DEBUG_OUTPUT=37600;this.DEBUG_SEVERITY_LOW=37192;this.DEBUG_SEVERITY_MEDIUM=37191;this.DEBUG_SEVERITY_HIGH=37190;this.DEBUG_LOGGED_MESSAGES=37189;this.MAX_DEBUG_LOGGED_MESSAGES=37188;this.MAX_DEBUG_MESSAGE_LENGTH=37187;this.MAX_LABEL_LENGTH=33512;this.SAMPLER=33510;this.QUERY=33507;this.PROGRAM=33506;this.SHADER=33505;this.BUFFER=33504;this.DEBUG_GROUP_STACK_DEPTH=
33389;this.MAX_DEBUG_GROUP_STACK_DEPTH=33388;this.DEBUG_SEVERITY_NOTIFICATION=33387;this.DEBUG_TYPE_POP_GROUP=33386;this.DEBUG_TYPE_PUSH_GROUP=33385;this.DEBUG_TYPE_MARKER=33384;this.DEBUG_TYPE_OTHER=33361;this.DEBUG_TYPE_PERFORMANCE=33360;this.DEBUG_TYPE_PORTABILITY=33359;this.DEBUG_TYPE_UNDEFINED_BEHAVIOR=33358;this.DEBUG_TYPE_DEPRECATED_BEHAVIOR=33357;this.DEBUG_TYPE_ERROR=33356;this.DEBUG_SOURCE_OTHER=33355;this.DEBUG_SOURCE_APPLICATION=33354;this.DEBUG_SOURCE_THIRD_PARTY=33353;this.DEBUG_SOURCE_SHADER_COMPILER=
33352;this.DEBUG_SOURCE_WINDOW_SYSTEM=33351;this.DEBUG_SOURCE_API=33350;this.DEBUG_CALLBACK_USER_PARAM=33349;this.DEBUG_CALLBACK_FUNCTION=33348;this.DEBUG_NEXT_LOGGED_MESSAGE_LENGTH=33347;this.DEBUG_OUTPUT_SYNCHRONOUS=33346};h["lime.graphics.opengl.ext.KHR_debug"]=pt;pt.__name__="lime.graphics.opengl.ext.KHR_debug";pt.prototype={DEBUG_OUTPUT_SYNCHRONOUS:null,DEBUG_NEXT_LOGGED_MESSAGE_LENGTH:null,DEBUG_CALLBACK_FUNCTION:null,DEBUG_CALLBACK_USER_PARAM:null,DEBUG_SOURCE_API:null,DEBUG_SOURCE_WINDOW_SYSTEM:null,
DEBUG_SOURCE_SHADER_COMPILER:null,DEBUG_SOURCE_THIRD_PARTY:null,DEBUG_SOURCE_APPLICATION:null,DEBUG_SOURCE_OTHER:null,DEBUG_TYPE_ERROR:null,DEBUG_TYPE_DEPRECATED_BEHAVIOR:null,DEBUG_TYPE_UNDEFINED_BEHAVIOR:null,DEBUG_TYPE_PORTABILITY:null,DEBUG_TYPE_PERFORMANCE:null,DEBUG_TYPE_OTHER:null,DEBUG_TYPE_MARKER:null,DEBUG_TYPE_PUSH_GROUP:null,DEBUG_TYPE_POP_GROUP:null,DEBUG_SEVERITY_NOTIFICATION:null,MAX_DEBUG_GROUP_STACK_DEPTH:null,DEBUG_GROUP_STACK_DEPTH:null,BUFFER:null,SHADER:null,PROGRAM:null,QUERY:null,
SAMPLER:null,MAX_LABEL_LENGTH:null,MAX_DEBUG_MESSAGE_LENGTH:null,MAX_DEBUG_LOGGED_MESSAGES:null,DEBUG_LOGGED_MESSAGES:null,DEBUG_SEVERITY_HIGH:null,DEBUG_SEVERITY_MEDIUM:null,DEBUG_SEVERITY_LOW:null,DEBUG_OUTPUT:null,CONTEXT_FLAG_DEBUG_BIT:null,STACK_OVERFLOW:null,STACK_UNDERFLOW:null,__class__:pt};var Ld={};h["lime.math._ARGB.ARGB_Impl_"]=Ld;Ld.__name__="lime.math._ARGB.ARGB_Impl_";Ld.__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"};Ld._new=function(a){null==a&&(a=0);return a};Ld.create=function(a,b,c,d){return(a&255)<<24|(b&255)<<16|(c&255)<<8|d&255};Ld.multiplyAlpha=function(a){0!=(a>>>24&255)&&255!=(a>>>24&255)&&(Ld.a16=I.__alpha16[a>>>24&255])};Ld.readUInt8=function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=0);switch(d){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;break;case 2:a=(b[c+1]&255)<<24|(b[c]&255)<<16|(b[c+
3]&255)<<8|b[c+2]&255}e&&0!=(a>>>24&255)&&255!=(a>>>24&255)&&(Ld.unmult=255/(a>>>24&255))};Ld.set=function(a,b,c,d,e){};Ld.unmultiplyAlpha=function(a){0!=(a>>>24&255)&&255!=(a>>>24&255)&&(Ld.unmult=255/(a>>>24&255))};Ld.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)&&(Ld.a16=I.__alpha16[a>>>24&255],a=(a>>>24&255)<<24|((a>>>16&255)*Ld.a16>>16&255)<<16|((a>>>8&255)*Ld.a16>>16&255)<<8|(a&255)*Ld.a16>>16&255));switch(d){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;break;case 2:b[c]=a&255,b[c+1]=a>>>8&255,b[c+2]=a>>>16&255,b[c+3]=a>>>24&255}};Ld.__fromBGRA=function(a){return(a&255)<<24|(a>>>8&255)<<16|(a>>>16&255)<<8|a>>>24&255};Ld.__fromRGBA=function(a){return(a&255)<<24|(a>>>24&255)<<16|(a>>>16&255)<<8|a>>>8&255};Ld.get_a=function(a){return a>>>24&255};Ld.set_a=function(a,b){return b};Ld.get_b=function(a){return a&255};Ld.set_b=function(a,
b){return b};Ld.get_g=function(a){return a>>>8&255};Ld.set_g=function(a,b){return b};Ld.get_r=function(a){return a>>>16&255};Ld.set_r=function(a,b){return b};var wd={};h["lime.math._BGRA.BGRA_Impl_"]=wd;wd.__name__="lime.math._BGRA.BGRA_Impl_";wd.__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"};wd._new=function(a){null==a&&(a=0);return a};wd.create=function(a,b,c,d){return(a&255)<<24|(b&255)<<16|(c&255)<<8|d&255};wd.multiplyAlpha=
function(a){0!=(a&255)&&255!=(a&255)&&(wd.a16=I.__alpha16[a&255])};wd.readUInt8=function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=0);switch(d){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;break;case 2:a=(b[c]&255)<<24|(b[c+1]&255)<<16|(b[c+2]&255)<<8|b[c+3]&255}e&&0!=(a&255)&&255!=(a&255)&&(wd.unmult=255/(a&255))};wd.set=function(a,b,c,d,e){};wd.unmultiplyAlpha=function(a){0!=(a&255)&&255!=(a&255)&&(wd.unmult=
255/(a&255))};wd.writeUInt8=function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=0);e&&(0==(a&255)?a=0:255!=(a&255)&&(wd.a16=I.__alpha16[a&255],a=((a>>>24&255)*wd.a16>>16&255)<<24|((a>>>16&255)*wd.a16>>16&255)<<16|((a>>>8&255)*wd.a16>>16&255)<<8|a&255));switch(d){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;break;case 2:b[c]=a>>>24&255,b[c+1]=a>>>16&255,b[c+2]=a>>>8&255,b[c+3]=a&255}};wd.__fromARGB=function(a){return(a&
255)<<24|(a>>>8&255)<<16|(a>>>16&255)<<8|a>>>24&255};wd.__fromRGBA=function(a){return(a>>>8&255)<<24|(a>>>16&255)<<16|(a>>>24&255)<<8|a&255};wd.get_a=function(a){return a&255};wd.set_a=function(a,b){return b};wd.get_b=function(a){return a>>>24&255};wd.set_b=function(a,b){return b};wd.get_g=function(a){return a>>>16&255};wd.set_g=function(a,b){return b};wd.get_r=function(a){return a>>>8&255};wd.set_r=function(a,b){return b};var Hb={};h["lime.math._ColorMatrix.ColorMatrix_Impl_"]=Hb;Hb.__name__="lime.math._ColorMatrix.ColorMatrix_Impl_";
Hb.__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"};Hb._new=function(a){if(null==a||20!=a.length)a=Hb.__identity,a=null!=a?new Float32Array(a):null;return a};Hb.clone=function(a){a=null!=a?new Float32Array(a):null;return Hb._new(a)};Hb.concat=function(a,b){a[0]+=b[0];a[6]+=b[6];a[12]+=b[12];a[18]+=b[18]};Hb.copyFrom=function(a,b){a.set(b)};Hb.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};Hb.getAlphaTable=function(a){if(null==Hb.__alphaTable){var b=new Uint8Array(256);Hb.__alphaTable=b}Hb.__alphaTable[0]=0;for(var c=1;256>c;){var d=c++;b=Math.floor(d*a[18]+255*a[19]);255<b&&(b=255);0>b&&(b=0);Hb.__alphaTable[d]=b}return Hb.__alphaTable};Hb.getBlueTable=function(a){if(null==Hb.__blueTable){var b=new Uint8Array(256);Hb.__blueTable=b}for(var c=0;256>c;){var d=c++;b=Math.floor(d*a[12]+255*a[14]);255<b&&
(b=255);0>b&&(b=0);Hb.__blueTable[d]=b}return Hb.__blueTable};Hb.getGreenTable=function(a){if(null==Hb.__greenTable){var b=new Uint8Array(256);Hb.__greenTable=b}for(var c=0;256>c;){var d=c++;b=Math.floor(d*a[6]+255*a[9]);255<b&&(b=255);0>b&&(b=0);Hb.__greenTable[d]=b}return Hb.__greenTable};Hb.getRedTable=function(a){if(null==Hb.__redTable){var b=new Uint8Array(256);Hb.__redTable=b}for(var c=0;256>c;){var d=c++;b=Math.floor(d*a[0]+255*a[4]);255<b&&(b=255);0>b&&(b=0);Hb.__redTable[d]=b}return Hb.__redTable};
Hb.__toFlashColorTransform=function(a){return null};Hb.get_alphaMultiplier=function(a){return a[18]};Hb.set_alphaMultiplier=function(a,b){return a[18]=b};Hb.get_alphaOffset=function(a){return 255*a[19]};Hb.set_alphaOffset=function(a,b){return a[19]=b/255};Hb.get_blueMultiplier=function(a){return a[12]};Hb.set_blueMultiplier=function(a,b){return a[12]=b};Hb.get_blueOffset=function(a){return 255*a[14]};Hb.set_blueOffset=function(a,b){return a[14]=b/255};Hb.get_color=function(a){return(255*a[4]|0)<<
16|(255*a[9]|0)<<8|255*a[14]|0};Hb.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 Hb.get_color(a)};Hb.get_greenMultiplier=function(a){return a[6]};Hb.set_greenMultiplier=function(a,b){return a[6]=b};Hb.get_greenOffset=function(a){return 255*a[9]};Hb.set_greenOffset=function(a,b){return a[9]=b/255};Hb.get_redMultiplier=function(a){return a[0]};Hb.set_redMultiplier=function(a,b){return a[0]=b};Hb.get_redOffset=function(a){return 255*a[4]};
Hb.set_redOffset=function(a,b){return a[4]=b/255};Hb.get=function(a,b){return a[b]};Hb.set=function(a,b,c){return a[b]=c};var oa={};h["lime.math._Matrix4.Matrix4_Impl_"]=oa;oa.__name__="lime.math._Matrix4.Matrix4_Impl_";oa.__properties__={set_position:"set_position",get_position:"get_position",get_determinant:"get_determinant"};oa._new=function(a){if(null==a||16!=a.length)a=oa.__identity,a=null!=a?new Float32Array(a):null;return a};oa.append=function(a,b){var c=a[0],d=a[4],e=a[8],f=a[12],g=a[1],k=
a[5],l=a[9],m=a[13],p=a[2],n=a[6],h=a[10],q=a[14],t=a[3],r=a[7],u=a[11],x=a[15],v=oa.get(b,0),w=oa.get(b,4),C=oa.get(b,8),J=oa.get(b,12),Q=oa.get(b,1),F=oa.get(b,5),B=oa.get(b,9),D=oa.get(b,13),E=oa.get(b,2),A=oa.get(b,6),G=oa.get(b,10),H=oa.get(b,14),I=oa.get(b,3),K=oa.get(b,7),y=oa.get(b,11);b=oa.get(b,15);a[0]=c*v+g*w+p*C+t*J;a[1]=c*Q+g*F+p*B+t*D;a[2]=c*E+g*A+p*G+t*H;a[3]=c*I+g*K+p*y+t*b;a[4]=d*v+k*w+n*C+r*J;a[5]=d*Q+k*F+n*B+r*D;a[6]=d*E+k*A+n*G+r*H;a[7]=d*I+k*K+n*y+r*b;a[8]=e*v+l*w+h*C+u*J;a[9]=
e*Q+l*F+h*B+u*D;a[10]=e*E+l*A+h*G+u*H;a[11]=e*I+l*K+h*y+u*b;a[12]=f*v+m*w+q*C+x*J;a[13]=f*Q+m*F+q*B+x*D;a[14]=f*E+m*A+q*G+x*H;a[15]=f*I+m*K+q*y+x*b};oa.appendRotation=function(a,b,c,d){b=oa.__getAxisRotation(a,c.x,c.y,c.z,b);null!=d&&oa.appendTranslation(b,d.x,d.y,d.z);oa.append(a,b)};oa.appendScale=function(a,b,c,d){b=[b,0,0,0,0,c,0,0,0,0,d,0,0,0,0,1];b=null!=b?new Float32Array(b):null;oa.append(a,oa._new(b))};oa.appendTranslation=function(a,b,c,d){a[12]+=b;a[13]+=c;a[14]+=d};oa.clone=function(a){a=
null!=a?new Float32Array(a):null;return oa._new(a)};oa.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:Ta.error("Column "+b+" out of bounds [0, ..., 3]",{fileName:"lime/math/Matrix4.hx",lineNumber:187,className:"lime.math._Matrix4.Matrix4_Impl_",methodName:"copyColumnFrom"})}};oa.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:Ta.error("Column "+b+" out of bounds [0, ..., 3]",{fileName:"lime/math/Matrix4.hx",lineNumber:225,className:"lime.math._Matrix4.Matrix4_Impl_",methodName:"copyColumnTo"})}};oa.copyFrom=function(a,b){a.set(b)};oa.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:Ta.error("Row "+b+" out of bounds [0, ..., 3]",{fileName:"lime/math/Matrix4.hx",lineNumber:272,className:"lime.math._Matrix4.Matrix4_Impl_",methodName:"copyRowFrom"})}};oa.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:Ta.error("Row "+b+" out of bounds [0, ..., 3]",{fileName:"lime/math/Matrix4.hx",lineNumber:310,className:"lime.math._Matrix4.Matrix4_Impl_",methodName:"copyRowTo"})}};oa.create2D=function(a,b,c,d,e,f,g){null==g&&(g=0);null==f&&(f=0);a[0]=b;a[1]=c;a[2]=0;a[3]=0;a[4]=d;a[5]=e;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=f;a[13]=g;a[14]=0;a[15]=1};oa.createOrtho=function(a,b,c,d,e,f,g){var k=1/(c-b),l=
1/(e-d),m=1/(g-f);a[0]=2*k;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=2*l;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=-2*m;a[11]=0;a[12]=-(b+c)*k;a[13]=-(d+e)*l;a[14]=-(f+g)*m;a[15]=1};oa.deltaTransformVector=function(a,b,c){null==c&&(c=new Ac);var d=b.x,e=b.y;b=b.z;c.x=d*a[0]+e*a[4]+b*a[8]+a[3];c.y=d*a[1]+e*a[5]+b*a[9]+a[7];c.z=d*a[2]+e*a[6]+b*a[10]+a[11];return c};oa.fromMatrix3=function(a){var b=oa._new();oa.create2D(b,a.a,a.b,a.c,a.d,a.tx,a.ty);return b};oa.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};oa.interpolate=function(a,b,c,d){null==d&&(d=oa._new());for(var e=0;16>e;){var f=e++;oa.set(d,f,oa.get(a,f)+(oa.get(b,f)-oa.get(a,f))*c)}return d};oa.interpolateTo=function(a,b,c){for(var d=0;16>d;){var e=d++;a[e]+=(oa.get(b,e)-a[e])*c}};oa.invert=function(a){var b=oa.get_determinant(a),c=1E-11<Math.abs(b);if(c){b=1/b;var d=a[0],e=a[4],f=a[8],g=a[12],k=a[1],l=a[5],m=a[9],p=a[13],n=a[2],h=a[6],q=a[10],t=a[14],r=a[3],
u=a[7],x=a[11],v=a[15];a[0]=b*(l*(q*v-t*x)-m*(h*v-t*u)+p*(h*x-q*u));a[1]=-b*(k*(q*v-t*x)-m*(n*v-t*r)+p*(n*x-q*r));a[2]=b*(k*(h*v-t*u)-l*(n*v-t*r)+p*(n*u-h*r));a[3]=-b*(k*(h*x-q*u)-l*(n*x-q*r)+m*(n*u-h*r));a[4]=-b*(e*(q*v-t*x)-f*(h*v-t*u)+g*(h*x-q*u));a[5]=b*(d*(q*v-t*x)-f*(n*v-t*r)+g*(n*x-q*r));a[6]=-b*(d*(h*v-t*u)-e*(n*v-t*r)+g*(n*u-h*r));a[7]=b*(d*(h*x-q*u)-e*(n*x-q*r)+f*(n*u-h*r));a[8]=b*(e*(m*v-p*x)-f*(l*v-p*u)+g*(l*x-m*u));a[9]=-b*(d*(m*v-p*x)-f*(k*v-p*r)+g*(k*x-m*r));a[10]=b*(d*(l*v-p*u)-e*
(k*v-p*r)+g*(k*u-l*r));a[11]=-b*(d*(l*x-m*u)-e*(k*x-m*r)+f*(k*u-l*r));a[12]=-b*(e*(m*t-p*q)-f*(l*t-p*h)+g*(l*q-m*h));a[13]=b*(d*(m*t-p*q)-f*(k*t-p*n)+g*(k*q-m*n));a[14]=-b*(d*(l*t-p*h)-e*(k*t-p*n)+g*(k*h-l*n));a[15]=b*(d*(l*q-m*h)-e*(k*q-m*n)+f*(k*h-l*n))}return c};oa.pointAt=function(a,b,c,d){null==c&&(c=new Ac(0,0,1));null==d&&(d=new Ac(0,1,0));var e=null;null==e&&(e=new Ac);e.x=b.x-c.x;e.y=b.y-c.y;e.z=b.z-c.z;c=e;d=new Ac(d.x,d.y,d.z,d.w);e=Math.sqrt(c.x*c.x+c.y*c.y+c.z*c.z);0!=e&&(c.x/=e,c.y/=
e,c.z/=e);e=Math.sqrt(d.x*d.x+d.y*d.y+d.z*d.z);0!=e&&(d.x/=e,d.y/=e,d.z/=e);e=new Ac(c.x,c.y,c.z,c.w);var f=d.x*c.x+d.y*c.y+d.z*c.z;e.x*=f;e.y*=f;e.z*=f;f=null;null==f&&(f=new Ac);f.x=d.x-e.x;f.y=d.y-e.y;f.z=d.z-e.z;d=f;0<Math.sqrt(d.x*d.x+d.y*d.y+d.z*d.z)?(e=Math.sqrt(d.x*d.x+d.y*d.y+d.z*d.z),0!=e&&(d.x/=e,d.y/=e,d.z/=e)):d=0!=c.x?new Ac(-c.y,c.x,0):new Ac(1,0,0);e=null;null==e&&(e=new Ac);f=d.z*c.x-d.x*c.z;var g=d.x*c.y-d.y*c.x;e.x=d.y*c.z-d.z*c.y;e.y=f;e.z=g;e.w=1;f=Math.sqrt(e.x*e.x+e.y*e.y+e.z*
e.z);0!=f&&(e.x/=f,e.y/=f,e.z/=f);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};oa.prepend=function(a,b){var c=oa.get(b,0),d=oa.get(b,4),e=oa.get(b,8),f=oa.get(b,12),g=oa.get(b,1),k=oa.get(b,5),l=oa.get(b,9),m=oa.get(b,13),p=oa.get(b,2),n=oa.get(b,6),h=oa.get(b,10),q=oa.get(b,14),t=oa.get(b,3),r=oa.get(b,7),u=oa.get(b,11);b=oa.get(b,15);var x=a[0],v=a[4],w=a[8],C=a[12],J=a[1],Q=a[5],F=a[9],B=a[13],D=a[2],
E=a[6],A=a[10],G=a[14],H=a[3],I=a[7],K=a[11],y=a[15];a[0]=c*x+g*v+p*w+t*C;a[1]=c*J+g*Q+p*F+t*B;a[2]=c*D+g*E+p*A+t*G;a[3]=c*H+g*I+p*K+t*y;a[4]=d*x+k*v+n*w+r*C;a[5]=d*J+k*Q+n*F+r*B;a[6]=d*D+k*E+n*A+r*G;a[7]=d*H+k*I+n*K+r*y;a[8]=e*x+l*v+h*w+u*C;a[9]=e*J+l*Q+h*F+u*B;a[10]=e*D+l*E+h*A+u*G;a[11]=e*H+l*I+h*K+u*y;a[12]=f*x+m*v+q*w+b*C;a[13]=f*J+m*Q+q*F+b*B;a[14]=f*D+m*E+q*A+b*G;a[15]=f*H+m*I+q*K+b*y};oa.prependRotation=function(a,b,c,d){b=oa.__getAxisRotation(a,c.x,c.y,c.z,b);null!=d&&oa.appendTranslation(b,
d.x,d.y,d.z);oa.prepend(a,b)};oa.prependScale=function(a,b,c,d){b=[b,0,0,0,0,c,0,0,0,0,d,0,0,0,0,1];b=null!=b?new Float32Array(b):null;oa.prepend(a,oa._new(b))};oa.prependTranslation=function(a,b,c,d){var e=oa._new();oa.set_position(e,new Ac(b,c,d));oa.prepend(a,e)};oa.transformVector=function(a,b,c){null==c&&(c=new Ac);var d=b.x,e=b.y;b=b.z;c.x=d*a[0]+e*a[4]+b*a[8]+a[12];c.y=d*a[1]+e*a[5]+b*a[9]+a[13];c.z=d*a[2]+e*a[6]+b*a[10]+a[14];c.w=d*a[3]+e*a[7]+b*a[11]+a[15];return c};oa.transformVectors=function(a,
b,c){for(var d=0,e,f,g;d+3<=b.length;)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};oa.transpose=function(a){var b=a[1];a[1]=a[4];a[4]=b;b=a[2];a[2]=a[8];a[8]=b;b=a[3];a[3]=a[12];a[12]=b;b=a[6];a[6]=a[9];a[9]=b;b=a[7];a[7]=a[13];a[13]=b;b=a[11];a[11]=a[14];a[14]=b};oa.__getAxisRotation=function(a,b,c,d,e){a=oa._new();b=new Ac(b,c,d);e=Math.PI/180*-e;d=Math.cos(e);e=Math.sin(e);c=1-d;oa.set(a,0,d+b.x*b.x*c);oa.set(a,
5,d+b.y*b.y*c);oa.set(a,10,d+b.z*b.z*c);d=b.x*b.y*c;var f=b.z*e;oa.set(a,4,d+f);oa.set(a,1,d-f);d=b.x*b.z*c;f=b.y*e;oa.set(a,8,d-f);oa.set(a,2,d+f);d=b.y*b.z*c;f=b.x*e;oa.set(a,9,d+f);oa.set(a,6,d-f);return a};oa.__swap=function(a,b,c){var d=a[b];a[b]=a[c];a[c]=d};oa.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])};oa.get_position=function(a){return new Ac(a[12],a[13],a[14])};oa.set_position=function(a,b){a[12]=b.x;a[13]=b.y;a[14]=b.z;return b};oa.get=function(a,b){return a[b]};oa.set=function(a,b,c){return a[b]=c};var I={};h["lime.math._RGBA.RGBA_Impl_"]=I;I.__name__="lime.math._RGBA.RGBA_Impl_";I.__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"};
I._new=function(a){null==a&&(a=0);return a};I.create=function(a,b,c,d){return(a&255)<<24|(b&255)<<16|(c&255)<<8|d&255};I.multiplyAlpha=function(a){0!=(a&255)&&255!=(a&255)&&(I.a16=I.__alpha16[a&255])};I.readUInt8=function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=0);switch(d){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;break;case 2:a=(b[c+2]&255)<<24|(b[c+1]&255)<<16|(b[c]&255)<<8|b[c+3]&255}e&&0!=(a&255)&&
255!=(a&255)&&(I.unmult=255/(a&255))};I.set=function(a,b,c,d,e){};I.unmultiplyAlpha=function(a){0!=(a&255)&&255!=(a&255)&&(I.unmult=255/(a&255))};I.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)&&(I.a16=I.__alpha16[a&255],a=((a>>>24&255)*I.a16>>16&255)<<24|((a>>>16&255)*I.a16>>16&255)<<16|((a>>>8&255)*I.a16>>16&255)<<8|a&255));switch(d){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;break;case 2:b[c]=a>>>8&255,b[c+1]=a>>>16&255,b[c+2]=a>>>24&255,b[c+3]=a&255}};I.__fromARGB=function(a){return(a>>>16&255)<<24|(a>>>8&255)<<16|(a&255)<<8|a>>>24&255};I.__fromBGRA=function(a){return(a>>>8&255)<<24|(a>>>16&255)<<16|(a>>>24&255)<<8|a&255};I.get_a=function(a){return a&255};I.set_a=function(a,b){return b};I.get_b=function(a){return a>>>8&255};I.set_b=function(a,b){return b};I.get_g=function(a){return a>>>16&255};I.set_g=function(a,b){return b};I.get_r=
function(a){return a>>>24&255};I.set_r=function(a,b){return b};var he=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};h["lime.math.Rectangle"]=he;he.__name__="lime.math.Rectangle";he.prototype={height:null,width:null,x:null,y:null,clone:function(){return new he(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():!1},containsPoint:function(a){return this.containsVector(a)},
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():!1:a.x>=this.x&&a.y>=this.y&&a.get_right()<=this.get_right()?a.get_bottom()<=this.get_bottom():!1},containsVector:function(a){return this.contains(a.x,a.y)},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:!1},inflate:function(a,
b){this.x-=a;this.width+=2*a;this.y-=b;this.height+=2*b},inflateVector:function(a){this.inflate(a.x,a.y)},intersection:function(a,b){null==b&&(b=new he);var c=this.x<a.x?a.x:this.x,d=this.get_right()>a.get_right()?a.get_right():this.get_right();if(d<=c)return b.setEmpty(),b;var e=this.y<a.y?a.y:this.y;a=this.get_bottom()>a.get_bottom()?a.get_bottom():this.get_bottom();if(a<=e)return b.setEmpty(),b;b.x=c;b.y=e;b.width=d-c;b.height=a-e;return b},intersects:function(a){var 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:0>=this.height},offset:function(a,b){this.x+=a;this.y+=b},offsetVector: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},union:function(a,b){null==b&&(b=new he);if(0==this.width||0==
this.height)b.copyFrom(a);else if(0==a.width||0==a.height)b.copyFrom(this);else{var c=this.x>a.x?a.x:this.x,d=this.get_right()<a.get_right()?a.get_right():this.get_right(),e=this.y>a.y?a.y:this.y;a=this.get_bottom()<a.get_bottom()?a.get_bottom():this.get_bottom();b.setTo(c,e,d-c,a-e)}return b},__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 Gd(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 Gd(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 Gd(this.x,this.y)},set_topLeft:function(a){this.x=a.x;this.y=a.y;return a.clone()},__class__:he,__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 Gd=function(a,
b){null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b};h["lime.math.Vector2"]=Gd;Gd.__name__="lime.math.Vector2";Gd.distance=function(a,b){var c=a.x-b.x;a=a.y-b.y;return Math.sqrt(c*c+a*a)};Gd.interpolate=function(a,b,c,d){null==d&&(d=new Gd);d.x=b.x+c*(a.x-b.x);d.y=b.y+c*(a.y-b.y);return d};Gd.polar=function(a,b,c){null==c&&(c=new Gd);var d=a*Math.sin(b);c.x=a*Math.cos(b);c.y=d;return c};Gd.prototype={x:null,y:null,add:function(a,b){null==b&&(b=new Gd);b.x=a.x+this.x;b.y=a.y+this.y;return b},clone:function(){return new Gd(this.x,
this.y)},equals:function(a){return null!=a&&a.x==this.x?a.y==this.y:!1},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,b){null==b&&(b=new Gd);b.x=this.x-a.x;b.y=this.y-a.y;return b},__toFlashPoint:function(){return null},get_length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},get_lengthSquared:function(){return this.x*this.x+
this.y*this.y},__class__:Gd,__properties__:{get_lengthSquared:"get_lengthSquared",get_length:"get_length"}};var Ac=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};h["lime.math.Vector4"]=Ac;Ac.__name__="lime.math.Vector4";Ac.__properties__={get_Z_AXIS:"get_Z_AXIS",get_Y_AXIS:"get_Y_AXIS",get_X_AXIS:"get_X_AXIS"};Ac.angleBetween=function(a,b){a=new Ac(a.x,a.y,a.z,a.w);var c=Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z);0!=c&&(a.x/=c,a.y/=c,a.z/=
c);b=new Ac(b.x,b.y,b.z,b.w);c=Math.sqrt(b.x*b.x+b.y*b.y+b.z*b.z);0!=c&&(b.x/=c,b.y/=c,b.z/=c);return Math.acos(a.x*b.x+a.y*b.y+a.z*b.z)};Ac.distance=function(a,b){var c=b.x-a.x,d=b.y-a.y;a=b.z-a.z;return Math.sqrt(c*c+d*d+a*a)};Ac.distanceSquared=function(a,b){var c=b.x-a.x,d=b.y-a.y;a=b.z-a.z;return c*c+d*d+a*a};Ac.get_X_AXIS=function(){return new Ac(1,0,0)};Ac.get_Y_AXIS=function(){return new Ac(0,1,0)};Ac.get_Z_AXIS=function(){return new Ac(0,0,1)};Ac.prototype={w:null,x:null,y:null,z:null,add:function(a,
b){null==b&&(b=new Ac);b.x=this.x+a.x;b.y=this.y+a.y;b.z=this.z+a.z;return b},clone:function(){return new Ac(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,b){null==b&&(b=new Ac);var c=this.z*a.x-this.x*a.z,d=this.x*a.y-this.y*a.x;b.x=this.y*a.z-this.z*a.y;b.y=c;b.z=d;b.w=1;return b},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:!0:!1},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:!0:!1},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,b){null==b&&(b=new Ac);b.x=this.x-a.x;b.y=this.y-a.y;b.z=this.z-a.z;return b},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__:Ac,__properties__:{get_lengthSquared:"get_lengthSquared",
get_length:"get_length"}};var ad=function(){};h["lime.media.AudioBuffer"]=ad;ad.__name__="lime.media.AudioBuffer";ad.fromBase64=function(a){if(null==a)return null;-1==a.indexOf(",")&&(a="data:"+ad.__getCodec(qg.decode(a))+";base64,"+a);var b=new ad;b.set_src(new Howl({src:[a],html5:!0,preload:!1}));return b};ad.fromBytes=function(a){if(null==a)return null;var b=new ad;b.set_src(new Howl({src:["data:"+ad.__getCodec(a)+";base64,"+qg.encode(a)],html5:!0,preload:!1}));return b};ad.fromFile=function(a){if(null==
a)return null;var b=new ad;b.__srcHowl=new Howl({src:[a],preload:!1});return b};ad.fromFiles=function(a){var b=new ad;b.__srcHowl=new Howl({src:a,preload:!1});return b};ad.fromVorbisFile=function(a){return null};ad.loadFromFile=function(a){var b=new Jd,c=ad.fromFile(a);null!=c?null!=c&&(c.__srcHowl.on("load",function(){b.complete(c)}),c.__srcHowl.on("loaderror",function(a,c){b.error(c)}),c.__srcHowl.load()):b.error(null);return b.future};ad.loadFromFiles=function(a){var b=new Jd,c=ad.fromFiles(a);
null!=c?(c.__srcHowl.on("load",function(){b.complete(c)}),c.__srcHowl.on("loaderror",function(){b.error(null)}),c.__srcHowl.load()):b.error(null);return b.future};ad.__getCodec=function(a){switch(a.getString(0,4)){case "OggS":return"audio/ogg";case "RIFF":if("WAVE"==a.getString(8,4))return"audio/wav";var b=a.b[2],c=a.b[1];switch(a.b[0]){case 73:if(68==c&&51==b)return"audio/mp3";break;case 255:switch(c){case 243:case 250:case 251:return"audio/mp3"}}break;case "fLaC":return"audio/flac";default:switch(b=
a.b[2],c=a.b[1],a.b[0]){case 73:if(68==c&&51==b)return"audio/mp3";break;case 255:switch(c){case 243:case 250:case 251:return"audio/mp3"}}}Ta.error("Unsupported sound format",{fileName:"lime/media/AudioBuffer.hx",lineNumber:362,className:"lime.media.AudioBuffer",methodName:"__getCodec"});return null};ad.prototype={bitsPerSample:null,channels:null,data:null,sampleRate:null,__srcAudio:null,__srcBuffer:null,__srcCustom:null,__srcHowl:null,__srcSound:null,__srcVorbisFile:null,dispose:function(){this.__srcHowl.unload()},
get_src:function(){return this.__srcHowl},set_src:function(a){return this.__srcHowl=a},__class__:ad,__properties__:{set_src:"set_src",get_src:"get_src"}};var Yq=function(a){if("custom"!=a){if(null==a||"web"==a)try{window.AudioContext=window.AudioContext||window.webkitAudioContext,this.web=new window.AudioContext,this.type="web"}catch(b){ra.lastException=b}null==this.web&&"web"!=a&&(this.html5=new Xq,this.type="html5")}else this.type="custom"};h["lime.media.AudioContext"]=Yq;Yq.__name__="lime.media.AudioContext";
Yq.prototype={custom:null,flash:null,html5:null,openal:null,type:null,web:null,__class__:Yq};var Pc=function(){};h["lime.media.AudioManager"]=Pc;Pc.__name__="lime.media.AudioManager";Pc.init=function(a){if(null==Pc.context){if(null==a&&(Pc.context=new Yq,a=Pc.context,"openal"==a.type)){var b=a.openal,c=b.openDevice();c=b.createContext(c);b.makeContextCurrent(c);b.processContext(c)}Pc.context=a}};Pc.resume=function(){if(null!=Pc.context&&"openal"==Pc.context.type){var a=Pc.context.openal,b=a.getCurrentContext();
if(null!=b){var c=a.getContextsDevice(b);a.resumeDevice(c);a.processContext(b)}}};Pc.addAudioSource=function(a){-1==Pc.audioSources.indexOf(a)&&Pc.audioSources.push(a)};Pc.removeAudioSource=function(a){0<=Pc.audioSources.indexOf(a)&&Pc.sourcesToRemove.push(a)};Pc.update=function(){for(var a=0,b=Pc.audioSources;a<b.length;){var c=b[a];++a;c.update()}for(;0<Pc.sourcesToRemove.length;)a=Pc.sourcesToRemove.pop(),-1!=Pc.audioSources.indexOf(a)&&B.remove(Pc.audioSources,a)};Pc.shutdown=function(){if(null!=
Pc.context&&"openal"==Pc.context.type){var a=Pc.context.openal,b=a.getCurrentContext();if(null!=b){var c=a.getContextsDevice(b);a.makeContextCurrent(null);a.destroyContext(b);null!=c&&a.closeDevice(c)}}Pc.context=null};Pc.suspend=function(){if(null!=Pc.context&&"openal"==Pc.context.type){var a=Pc.context.openal,b=a.getCurrentContext();null!=b&&(a.suspendContext(b),b=a.getContextsDevice(b),null!=b&&a.pauseDevice(b))}};var jl=function(a,b,c,d){null==d&&(d=0);null==b&&(b=0);this.id=jl.ID++;this.onComplete=
new me;this.buffer=a;this.offset=b;this.__backend=new Aq(this);null!=c&&0!=c&&this.set_length(c);this.set_loops(d);null!=a&&this.init()};h["lime.media.AudioSource"]=jl;jl.__name__="lime.media.AudioSource";jl.prototype={onComplete:null,id:null,buffer:null,offset:null,__backend:null,dispose:function(){this.__backend.dispose();Pc.removeAudioSource(this)},init:function(){this.__backend.init();Pc.addAudioSource(this)},play:function(){this.__backend.play()},pause:function(){this.__backend.pause()},stop:function(){this.__backend.stop()},
update:function(){this.__backend.update()},get_currentTime:function(){return this.__backend.getCurrentTime()},set_currentTime:function(a){return this.__backend.setCurrentTime(a)},get_gain:function(){return this.__backend.getGain()},set_gain:function(a){return this.__backend.setGain(a)},get_length:function(){return this.__backend.getLength()},set_length:function(a){return this.__backend.setLength(a)},get_loops:function(){return this.__backend.getLoops()},set_loops:function(a){return this.__backend.setLoops(a)},
get_position:function(){return this.__backend.getPosition()},set_position:function(a){return this.__backend.setPosition(a)},__class__:jl,__properties__:{set_position:"set_position",get_position:"get_position",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 qt=function(){};h["lime.media.FlashAudioContext"]=qt;qt.__name__="lime.media.FlashAudioContext";
qt.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__:qt};var Xq=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};h["lime.media.HTML5AudioContext"]=Xq;Xq.__name__="lime.media.HTML5AudioContext";Xq.prototype={HAVE_CURRENT_DATA:null,HAVE_ENOUGH_DATA:null,HAVE_FUTURE_DATA:null,HAVE_METADATA:null,HAVE_NOTHING:null,NETWORK_EMPTY:null,NETWORK_IDLE:null,NETWORK_LOADING:null,NETWORK_NO_SOURCE:null,
canPlayType:function(a,b){return null!=a.__srcAudio?a.__srcAudio.canPlayType(b):null},createBuffer:function(a){var b=new ad;b.__srcAudio=new Audio;b.__srcAudio.src=a;return b},getAutoplay:function(a){return null!=a.__srcAudio?a.__srcAudio.autoplay:!1},getBuffered:function(a){return null!=a.__srcAudio?a.__srcAudio.buffered:null},getCurrentSrc:function(a){return null!=a.__srcAudio?a.__srcAudio.currentSrc:null},getCurrentTime:function(a){return null!=a.__srcAudio?a.__srcAudio.currentTime:0},getDefaultPlaybackRate:function(a){return null!=
a.__srcAudio?a.__srcAudio.defaultPlaybackRate:1},getDuration:function(a){return null!=a.__srcAudio?a.__srcAudio.duration:0},getEnded:function(a){return null!=a.__srcAudio?a.__srcAudio.ended:!1},getError:function(a){return null!=a.__srcAudio?a.__srcAudio.error:null},getLoop:function(a){return null!=a.__srcAudio?a.__srcAudio.loop:!1},getMuted:function(a){return null!=a.__srcAudio?a.__srcAudio.muted:!1},getNetworkState:function(a){return null!=a.__srcAudio?a.__srcAudio.networkState:0},getPaused:function(a){return null!=
a.__srcAudio?a.__srcAudio.paused:!1},getPlaybackRate:function(a){return null!=a.__srcAudio?a.__srcAudio.playbackRate:1},getPlayed:function(a){return null!=a.__srcAudio?a.__srcAudio.played:null},getPreload:function(a){return null!=a.__srcAudio?a.__srcAudio.preload:null},getReadyState:function(a){return null!=a.__srcAudio?a.__srcAudio.readyState:0},getSeekable:function(a){return null!=a.__srcAudio?a.__srcAudio.seekable:null},getSeeking:function(a){return null!=a.__srcAudio?a.__srcAudio.seeking:!1},
getSrc:function(a){return null!=a.__srcAudio?a.__srcAudio.src:null},getStartTime:function(a){return null!=a.__srcAudio?a.__srcAudio.playbackRate:0},getVolume:function(a){return null!=a.__srcAudio?a.__srcAudio.volume:1},load:function(a){null!=a.__srcAudio&&a.__srcAudio.load()},pause:function(a){null!=a.__srcAudio&&a.__srcAudio.pause()},play:function(a){null!=a.__srcAudio&&a.__srcAudio.play()},setAutoplay:function(a,b){null!=a.__srcAudio&&(a.__srcAudio.autoplay=b)},setCurrentTime:function(a,b){null!=
a.__srcAudio&&(a.__srcAudio.currentTime=b)},setDefaultPlaybackRate:function(a,b){null!=a.__srcAudio&&(a.__srcAudio.defaultPlaybackRate=b)},setLoop:function(a,b){null!=a.__srcAudio&&(a.__srcAudio.loop=b)},setMuted:function(a,b){null!=a.__srcAudio&&(a.__srcAudio.muted=b)},setPlaybackRate:function(a,b){null!=a.__srcAudio&&(a.__srcAudio.playbackRate=b)},setPreload:function(a,b){null!=a.__srcAudio&&(a.__srcAudio.preload=b)},setSrc:function(a,b){null!=a.__srcAudio&&(a.__srcAudio.src=b)},setVolume:function(a,
b){null!=a.__srcAudio&&(a.__srcAudio.volume=b)},__class__:Xq};var rt=function(){this.ALL_DEVICES_SPECIFIER=4115;this.DEFAULT_ALL_DEVICES_SPECIFIER=4114;this.ENUMERATE_ALL_EXT=1;this.DEVICE_SPECIFIER=4101;this.DEFAULT_DEVICE_SPECIFIER=4100;this.ALL_ATTRIBUTES=4099;this.ATTRIBUTES_SIZE=4098;this.INVALID_CONTEXT=40962;this.INVALID_DEVICE=40961;this.STEREO_SOURCES=4113;this.MONO_SOURCES=4112;this.SYNC=4105;this.REFRESH=4104;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};h["lime.media.OpenALAudioContext"]=rt;rt.__name__="lime.media.OpenALAudioContext";rt.prototype={NONE:null,FALSE:null,TRUE:null,SOURCE_RELATIVE:null,CONE_INNER_ANGLE:null,CONE_OUTER_ANGLE:null,PITCH:null,POSITION:null,DIRECTION:null,VELOCITY:null,
LOOPING:null,BUFFER:null,GAIN:null,MIN_GAIN:null,MAX_GAIN:null,ORIENTATION:null,SOURCE_STATE:null,INITIAL:null,PLAYING:null,PAUSED:null,STOPPED:null,BUFFERS_QUEUED:null,BUFFERS_PROCESSED:null,REFERENCE_DISTANCE:null,ROLLOFF_FACTOR:null,CONE_OUTER_GAIN:null,MAX_DISTANCE:null,SEC_OFFSET:null,SAMPLE_OFFSET:null,BYTE_OFFSET:null,SOURCE_TYPE:null,STATIC:null,STREAMING:null,UNDETERMINED:null,FORMAT_MONO8:null,FORMAT_MONO16:null,FORMAT_STEREO8:null,FORMAT_STEREO16:null,FREQUENCY:null,BITS:null,CHANNELS:null,
SIZE:null,NO_ERROR:null,INVALID_NAME:null,INVALID_ENUM:null,INVALID_VALUE:null,INVALID_OPERATION:null,OUT_OF_MEMORY:null,VENDOR:null,VERSION:null,RENDERER:null,EXTENSIONS:null,DOPPLER_FACTOR:null,SPEED_OF_SOUND:null,DOPPLER_VELOCITY:null,DISTANCE_MODEL:null,INVERSE_DISTANCE:null,INVERSE_DISTANCE_CLAMPED:null,LINEAR_DISTANCE:null,LINEAR_DISTANCE_CLAMPED:null,EXPONENT_DISTANCE:null,EXPONENT_DISTANCE_CLAMPED:null,REFRESH:null,SYNC:null,MONO_SOURCES:null,STEREO_SOURCES:null,INVALID_DEVICE:null,INVALID_CONTEXT:null,
ATTRIBUTES_SIZE:null,ALL_ATTRIBUTES:null,DEFAULT_DEVICE_SPECIFIER:null,DEVICE_SPECIFIER:null,ENUMERATE_ALL_EXT:null,DEFAULT_ALL_DEVICES_SPECIFIER:null,ALL_DEVICES_SPECIFIER:null,bufferData:function(a,b,c,d,e){H.bufferData(a,b,c,d,e)},buffer3f:function(a,b,c,d,e){H.buffer3f(a,b,c,d,e)},buffer3i:function(a,b,c,d,e){H.buffer3i(a,b,c,d,e)},bufferf:function(a,b,c){H.bufferf(a,b,c)},bufferfv:function(a,b,c){H.bufferfv(a,b,c)},bufferi:function(a,b,c){H.bufferi(a,b,c)},bufferiv:function(a,b,c){H.bufferiv(a,
b,c)},closeDevice:function(a){return Jb.closeDevice(a)},createContext:function(a,b){return Jb.createContext(a,b)},createBuffer:function(){return H.createBuffer()},createSource:function(){return H.createSource()},deleteBuffer:function(a){H.deleteBuffer(a)},deleteBuffers:function(a){H.deleteBuffers(a)},deleteSource:function(a){H.deleteSource(a)},deleteSources:function(a){H.deleteSources(a)},destroyContext:function(a){null!=a&&Jb.destroyContext(a)},disable:function(a){H.disable(a)},distanceModel:function(a){H.distanceModel(a)},
dopplerFactor:function(a){H.dopplerFactor(a)},dopplerVelocity:function(a){H.dopplerVelocity(a)},enable:function(a){H.enable(a)},genSource:function(){return this.createSource()},genSources:function(a){return H.genSources(a)},genBuffer:function(){return this.createBuffer()},genBuffers:function(a){return H.genBuffers(a)},getBoolean:function(a){return H.getBoolean(a)},getBooleanv:function(a,b){null==b&&(b=1);return H.getBooleanv(a,b)},getBuffer3f:function(a,b){return H.getBuffer3f(a,b)},getBuffer3i:function(a,
b){return H.getBuffer3i(a,b)},getBufferf:function(a,b){return H.getBufferf(a,b)},getBufferfv:function(a,b,c){null==c&&(c=1);return H.getBufferfv(a,b,c)},getBufferi:function(a,b){return H.getBufferi(a,b)},getBufferiv:function(a,b,c){null==c&&(c=1);return H.getBufferiv(a,b,c)},getContextsDevice:function(a){return null==a?null:Jb.getContextsDevice(a)},getCurrentContext:function(){return Jb.getCurrentContext()},getDouble:function(a){return H.getDouble(a)},getDoublev:function(a,b){null==b&&(b=1);return H.getDoublev(a,
b)},getEnumValue:function(a){return H.getEnumValue(a)},getError:function(a){return null==a?H.getError():Jb.getError(a)},getErrorString:function(a){return null==a?H.getErrorString():Jb.getErrorString(a)},getFloat:function(a){return H.getFloat(a)},getFloatv:function(a,b){null==b&&(b=1);return H.getFloatv(a,b)},getInteger:function(a){return H.getInteger(a)},getIntegerv:function(a,b,c){null==b&&(b=1);return null==c?H.getIntegerv(a,b):Jb.getIntegerv(c,a,b)},getListener3f:function(a){return H.getListener3f(a)},
getListener3i:function(a){return H.getListener3i(a)},getListenerf:function(a){return H.getListenerf(a)},getListenerfv:function(a,b){null==b&&(b=1);return H.getListenerfv(a,b)},getListeneri:function(a){return H.getListeneri(a)},getListeneriv:function(a,b){null==b&&(b=1);return H.getListeneriv(a,b)},getProcAddress:function(a){return H.getProcAddress(a)},getSource3f:function(a,b){return H.getSource3f(a,b)},getSourcef:function(a,b){return H.getSourcef(a,b)},getSource3i:function(a,b){return H.getSource3i(a,
b)},getSourcefv:function(a,b,c){return H.getSourcefv(a,b)},getSourcei:function(a,b){return H.getSourcei(a,b)},getSourceiv:function(a,b,c){null==c&&(c=1);return H.getSourceiv(a,b,c)},getString:function(a,b){return null==b?H.getString(a):Jb.getString(b,a)},isBuffer:function(a){return H.isBuffer(a)},isEnabled:function(a){return H.isEnabled(a)},isExtensionPresent:function(a){return H.isExtensionPresent(a)},isSource:function(a){return H.isSource(a)},listener3f:function(a,b,c,d){H.listener3f(a,b,c,d)},
listener3i:function(a,b,c,d){H.listener3i(a,b,c,d)},listenerf:function(a,b){H.listenerf(a,b)},listenerfv:function(a,b){H.listenerfv(a,b)},listeneri:function(a,b){H.listeneri(a,b)},listeneriv:function(a,b){H.listeneriv(a,b)},makeContextCurrent:function(a){return Jb.makeContextCurrent(a)},openDevice:function(a){return Jb.openDevice(a)},pauseDevice:function(a){Jb.pauseDevice(a)},processContext:function(a){Jb.processContext(a)},resumeDevice:function(a){Jb.resumeDevice(a)},source3f:function(a,b,c,d,e){H.source3f(a,
b,c,d,e)},source3i:function(a,b,c,d,e){H.source3i(a,b,c,d,e)},sourcef:function(a,b,c){H.sourcef(a,b,c)},sourcefv:function(a,b,c){H.sourcefv(a,b,c)},sourcei:function(a,b,c){H.sourcei(a,b,c)},sourceiv:function(a,b,c){H.sourceiv(a,b,c)},sourcePlay:function(a){H.sourcePlay(a)},sourcePlayv:function(a){H.sourcePlayv(a)},sourceStop:function(a){H.sourceStop(a)},sourceStopv:function(a){H.sourceStopv(a)},sourceRewind:function(a){H.sourceRewind(a)},sourceRewindv:function(a){H.sourceRewindv(a)},sourcePause:function(a){H.sourcePause(a)},
sourcePausev:function(a){H.sourcePausev(a)},sourceQueueBuffer:function(a,b){H.sourceQueueBuffer(a,b)},sourceQueueBuffers:function(a,b,c){H.sourceQueueBuffers(a,b,c)},sourceUnqueueBuffer:function(a){return H.sourceUnqueueBuffer(a)},sourceUnqueueBuffers:function(a,b){return H.sourceUnqueueBuffers(a,b)},speedOfSound:function(a){H.speedOfSound(a)},suspendContext:function(a){Jb.suspendContext(a)},__class__:rt};var H=function(){};h["lime.media.openal.AL"]=H;H.__name__="lime.media.openal.AL";H.removeDirectFilter=
function(a){};H.removeSend=function(a,b){};H.auxf=function(a,b,c){};H.auxfv=function(a,b,c){};H.auxi=function(a,b,c){};H.auxiv=function(a,b,c){};H.bufferData=function(a,b,c,d,e){};H.buffer3f=function(a,b,c,d,e){};H.buffer3i=function(a,b,c,d,e){};H.bufferf=function(a,b,c){};H.bufferfv=function(a,b,c){};H.bufferi=function(a,b,c){};H.bufferiv=function(a,b,c){};H.createAux=function(){return null};H.createBuffer=function(){return null};H.createEffect=function(){return null};H.createFilter=function(){return null};
H.createSource=function(){return null};H.deleteBuffer=function(a){};H.deleteBuffers=function(a){};H.deleteSource=function(a){};H.deleteSources=function(a){};H.disable=function(a){};H.distanceModel=function(a){};H.dopplerFactor=function(a){};H.dopplerVelocity=function(a){};H.effectf=function(a,b,c){};H.effectfv=function(a,b,c){};H.effecti=function(a,b,c){};H.effectiv=function(a,b,c){};H.enable=function(a){};H.genSource=function(){return null};H.genSources=function(a){return null};H.genBuffer=function(){return null};
H.genBuffers=function(a){return null};H.getBoolean=function(a){return!1};H.getBooleanv=function(a,b){return null};H.getBuffer3f=function(a,b){return null};H.getBuffer3i=function(a,b){return null};H.getBufferf=function(a,b){return 0};H.getBufferfv=function(a,b,c){return null};H.getBufferi=function(a,b){return 0};H.getBufferiv=function(a,b,c){return null};H.getDouble=function(a){return 0};H.getDoublev=function(a,b){return null};H.getEnumValue=function(a){return 0};H.getError=function(){return 0};H.getErrorString=
function(){switch(H.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""}};H.getFilteri=function(a,b){return 0};H.getFloat=function(a){return 0};H.getFloatv=function(a,b){return null};H.getInteger=function(a){return 0};H.getIntegerv=
function(a,b){return null};H.getListener3f=function(a){return null};H.getListener3i=function(a){return null};H.getListenerf=function(a){return 0};H.getListenerfv=function(a,b){return null};H.getListeneri=function(a){return 0};H.getListeneriv=function(a,b){return null};H.getParameter=function(a){return null};H.getProcAddress=function(a){return null};H.getSource3f=function(a,b){return null};H.getSourcef=function(a,b){return 0};H.getSource3i=function(a,b){return null};H.getSourcefv=function(a,b,c){return null};
H.getSourcei=function(a,b){return 0};H.getSourceiv=function(a,b,c){return null};H.getString=function(a){return null};H.isBuffer=function(a){return!1};H.isEnabled=function(a){return!1};H.isExtensionPresent=function(a){return!1};H.isAux=function(a){return!1};H.isEffect=function(a){return!1};H.isFilter=function(a){return!1};H.isSource=function(a){return!1};H.listener3f=function(a,b,c,d){};H.listener3i=function(a,b,c,d){};H.listenerf=function(a,b){};H.listenerfv=function(a,b){};H.listeneri=function(a,
b){};H.listeneriv=function(a,b){};H.source3f=function(a,b,c,d,e){};H.source3i=function(a,b,c,d,e){};H.sourcef=function(a,b,c){};H.sourcefv=function(a,b,c){};H.sourcei=function(a,b,c){};H.filteri=function(a,b,c){};H.filterf=function(a,b,c){};H.sourceiv=function(a,b,c){};H.sourcePlay=function(a){};H.sourcePlayv=function(a){};H.sourceStop=function(a){};H.sourceStopv=function(a){};H.sourceRewind=function(a){};H.sourceRewindv=function(a){};H.sourcePause=function(a){};H.sourcePausev=function(a){};H.sourceQueueBuffer=
function(a,b){};H.sourceQueueBuffers=function(a,b,c){};H.sourceUnqueueBuffer=function(a){return 0};H.sourceUnqueueBuffers=function(a,b){return null};H.speedOfSound=function(a){};var Vt={};h["lime.media.openal._ALAuxiliaryEffectSlot.ALAuxiliaryEffectSlot_Impl_"]=Vt;Vt.__name__="lime.media.openal._ALAuxiliaryEffectSlot.ALAuxiliaryEffectSlot_Impl_";Vt._new=function(a){return a};var Wt={};h["lime.media.openal._ALBuffer.ALBuffer_Impl_"]=Wt;Wt.__name__="lime.media.openal._ALBuffer.ALBuffer_Impl_";Wt._new=
function(a){return a};var Jb=function(){};h["lime.media.openal.ALC"]=Jb;Jb.__name__="lime.media.openal.ALC";Jb.closeDevice=function(a){return!1};Jb.createContext=function(a,b){return null};Jb.destroyContext=function(a){};Jb.getContextsDevice=function(a){return null};Jb.getCurrentContext=function(){return null};Jb.getError=function(a){return 0};Jb.getErrorString=function(a){switch(Jb.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""}};Jb.getIntegerv=function(a,b,c){return null};Jb.getString=function(a,b){return null};Jb.makeContextCurrent=function(a){return!1};Jb.openDevice=function(a){return null};Jb.pauseDevice=function(a){};Jb.processContext=function(a){};Jb.resumeDevice=function(a){};Jb.suspendContext=function(a){};var Xt={};h["lime.media.openal._ALContext.ALContext_Impl_"]=
Xt;Xt.__name__="lime.media.openal._ALContext.ALContext_Impl_";Xt._new=function(a){return a};var Yt={};h["lime.media.openal._ALDevice.ALDevice_Impl_"]=Yt;Yt.__name__="lime.media.openal._ALDevice.ALDevice_Impl_";Yt._new=function(a){return a};var Zt={};h["lime.media.openal._ALEffect.ALEffect_Impl_"]=Zt;Zt.__name__="lime.media.openal._ALEffect.ALEffect_Impl_";Zt._new=function(a){return a};var $t={};h["lime.media.openal._ALFilter.ALFilter_Impl_"]=$t;$t.__name__="lime.media.openal._ALFilter.ALFilter_Impl_";
$t._new=function(a){return a};var au={};h["lime.media.openal._ALSource.ALSource_Impl_"]=au;au.__name__="lime.media.openal._ALSource.ALSource_Impl_";au._new=function(a){return a};var st=function(){};h["lime.media.vorbis.VorbisComment"]=st;st.__name__="lime.media.vorbis.VorbisComment";st.prototype={userComments:null,vendor:null,__class__:st};var ko=function(a){this.handle=a};h["lime.media.vorbis.VorbisFile"]=ko;ko.__name__="lime.media.vorbis.VorbisFile";ko.fromBytes=function(a){return null};ko.fromFile=
function(a){return null};ko.prototype={bitstream:null,handle:null,bitrate:function(a){return 0},bitrateInstant:function(){return 0},clear:function(){},comment:function(a){return null},crosslap:function(a){return 0},info:function(a){return null},pcmSeek:function(a){return 0},pcmSeekLap:function(a){return 0},pcmSeekPage:function(a){return 0},pcmSeekPageLap:function(a){return 0},pcmTell:function(){return new Xb(0,0)},pcmTotal:function(a){return new Xb(0,0)},rawSeek:function(a){return 0},rawSeekLap:function(a){return 0},
rawTell:function(){return new Xb(0,0)},rawTotal:function(a){return new Xb(0,0)},read:function(a,b,c,d,e,f){return 0},readFloat:function(a,b){return 0},seekable:function(){return!1},serialNumber:function(a){return 0},streams:function(){return 0},timeSeek:function(a){return 0},timeSeekLap:function(a){return 0},timeSeekPage:function(a){return 0},timeSeekPageLap:function(a){return 0},timeTell:function(){return 0},timeTotal:function(a){return 0},__class__:ko};var tt=function(){};h["lime.media.vorbis.VorbisInfo"]=
tt;tt.__name__="lime.media.vorbis.VorbisInfo";tt.prototype={bitrateLower:null,bitrateNominal:null,bitrateUpper:null,channels:null,rate:null,version:null,__class__:tt};var lo=function(){};h["lime.net._IHTTPRequest"]=lo;lo.__name__="lime.net._IHTTPRequest";lo.__isInterface__=!0;lo.prototype={contentType:null,data:null,enableResponseHeaders:null,followRedirects:null,formData:null,headers:null,method:null,responseHeaders:null,responseStatus:null,timeout:null,uri:null,userAgent:null,withCredentials:null,
cancel:null,__class__:lo};var Df=function(a){this.uri=a;this.contentType="application/x-www-form-urlencoded";this.followRedirects=!0;this.enableResponseHeaders=!1;this.formData=new ua;this.headers=[];this.method="GET";this.timeout=3E4;this.withCredentials=!1;this.__backend=new fb;this.__backend.init(this)};h["lime.net._HTTPRequest.AbstractHTTPRequest"]=Df;Df.__name__="lime.net._HTTPRequest.AbstractHTTPRequest";Df.__interfaces__=[lo];Df.prototype={contentType:null,data:null,enableResponseHeaders:null,
followRedirects:null,formData:null,headers:null,method:null,responseData:null,responseHeaders:null,responseStatus:null,timeout:null,uri:null,userAgent:null,withCredentials:null,__backend:null,cancel:function(){this.__backend.cancel()},load:function(a){return null},__class__:Df};var Zq=function(a){Df.call(this,a)};h["lime.net.HTTPRequest"]=Zq;Zq.__name__="lime.net.HTTPRequest";Zq.__super__=Df;Zq.prototype=w(Df.prototype,{__class__:Zq});var Ch=function(a){Df.call(this,a)};h["lime.net._HTTPRequest_Bytes"]=
Ch;Ch.__name__="lime.net._HTTPRequest_Bytes";Ch.__super__=Df;Ch.prototype=w(Df.prototype,{fromBytes:function(a){return a},load:function(a){var b=this;null!=a&&(this.uri=a);var c=new Jd;a=this.__backend.loadData(this.uri);a.onProgress(v(c,c.progress));a.onError(v(c,c.error));a.onComplete(function(a){b.responseData=b.fromBytes(a);c.complete(b.responseData)});return c.future},__class__:Ch});var kl=function(a){Df.call(this,a)};h["lime.net._HTTPRequest_String"]=kl;kl.__name__="lime.net._HTTPRequest_String";
kl.__super__=Df;kl.prototype=w(Df.prototype,{load:function(a){var b=this;null!=a&&(this.uri=a);var c=new Jd;a=this.__backend.loadText(this.uri);a.onProgress(v(c,c.progress));a.onError(v(c,c.error));a.onComplete(function(a){b.responseData=a;c.complete(b.responseData)});return c.future},__class__:kl});var Yn=function(a,b){null==b&&(b="");this.name=a;this.value=b};h["lime.net.HTTPRequestHeader"]=Yn;Yn.__name__="lime.net.HTTPRequestHeader";Yn.prototype={name:null,value:null,__class__:Yn};var mo=function(a){Df.call(this,
a)};h["lime.net._HTTPRequest_lime_text_Font"]=mo;mo.__name__="lime.net._HTTPRequest_lime_text_Font";mo.__super__=Ch;mo.prototype=w(Ch.prototype,{fromBytes:function(a){return ne.fromBytes(a)},__class__:mo});var no=function(a){Df.call(this,a)};h["lime.net._HTTPRequest_lime_utils_Bytes"]=no;no.__name__="lime.net._HTTPRequest_lime_utils_Bytes";no.__super__=Ch;no.prototype=w(Ch.prototype,{fromBytes:function(a){return Kc.fromBytes(a)},__class__:no});var oo=function(a){Df.call(this,a)};h["lime.net._HTTPRequest_openfl_utils_ByteArray"]=
oo;oo.__name__="lime.net._HTTPRequest_openfl_utils_ByteArray";oo.__super__=Ch;oo.prototype=w(Ch.prototype,{fromBytes:function(a){return za.fromBytes(a)},__class__:oo});var Dh=function(){};h["lime.system.CFFI"]=Dh;Dh.__name__="lime.system.CFFI";Dh.load=function(a,b,c,d){null==d&&(d=!1);null==c&&(c=0);return Dh.enabled?null:X.makeVarArgs(function(a){return{}})};Dh.__findHaxelib=function(a){return""};Dh.__loaderTrace=function(a){};Dh.__sysName=function(){return null};Dh.__tryLoad=function(a,b,c,d){return null};
var jc={};h["lime.system._CFFIPointer.CFFIPointer_Impl_"]=jc;jc.__name__="lime.system._CFFIPointer.CFFIPointer_Impl_";jc._new=function(a){return a};jc.get=function(a){return 0};jc.equals=function(a,b){return jc.get(a)==b};jc.equalsPointer=function(a,b){return jc.get(a)==jc.get(b)};jc.greaterThan=function(a,b){return jc.get(a)>b};jc.greaterThanPointer=function(a,b){return jc.get(a)>jc.get(b)};jc.greaterThanOrEqual=function(a,b){return jc.get(a)>=b};jc.greaterThanOrEqualPointer=function(a,b){return jc.get(a)>=
jc.get(b)};jc.lessThan=function(a,b){return jc.get(a)<b};jc.lessThanPointer=function(a,b){return jc.get(a)<jc.get(b)};jc.lessThanOrEqual=function(a,b){return jc.get(a)<=b};jc.lessThanOrEqualPointer=function(a,b){return jc.get(a)<=jc.get(b)};jc.notEquals=function(a,b){return jc.get(a)!=b};jc.notEqualsPointer=function(a,b){return jc.get(a)!=jc.get(b)};var He=function(){};h["lime.system.Clipboard"]=He;He.__name__="lime.system.Clipboard";He.__properties__={set_text:"set_text",get_text:"get_text"};He.__update=
function(){var a=He._text;He._text=null;He._text!=a&&He.onUpdate.dispatch()};He.get_text=function(){He.__update();return He._text};He.set_text=function(a){var b=He._text;He._text=a;var c=bf.current.__window;null!=c&&c.__backend.setClipboard(a);He._text!=b&&He.onUpdate.dispatch();return a};var $q=function(){};h["lime.system.Display"]=$q;$q.__name__="lime.system.Display";$q.prototype={bounds:null,currentMode:null,id:null,dpi:null,name:null,supportedModes:null,__class__:$q};var ar=function(a,b,c,d){this.width=
a;this.height=b;this.refreshRate=c;this.pixelFormat=d};h["lime.system.DisplayMode"]=ar;ar.__name__="lime.system.DisplayMode";ar.prototype={height:null,pixelFormat:null,refreshRate:null,width:null,__class__:ar};var Oi=C["lime.system.Endian"]={__ename__:"lime.system.Endian",__constructs__:["LITTLE_ENDIAN","BIG_ENDIAN"],LITTLE_ENDIAN:{_hx_index:0,__enum__:"lime.system.Endian",toString:u},BIG_ENDIAN:{_hx_index:1,__enum__:"lime.system.Endian",toString:u}},Qe=function(){};h["lime.system.JNI"]=Qe;Qe.__name__=
"lime.system.JNI";Qe.callMember=function(a,b,c){switch(c.length){case 0:return a(b);case 1:return a(b,c[0]);case 2:return a(b,c[0],c[1]);case 3:return a(b,c[0],c[1],c[2]);case 4:return a(b,c[0],c[1],c[2],c[3]);case 5:return a(b,c[0],c[1],c[2],c[3],c[4]);case 6:return a(b,c[0],c[1],c[2],c[3],c[4],c[5]);case 7:return a(b,c[0],c[1],c[2],c[3],c[4],c[5],c[6]);default:return null}};Qe.callStatic=function(a,b){switch(b.length){case 0:return a();case 1:return a(b[0]);case 2:return a(b[0],b[1]);case 3:return a(b[0],
b[1],b[2]);case 4:return a(b[0],b[1],b[2],b[3]);case 5:return a(b[0],b[1],b[2],b[3],b[4]);case 6:return a(b[0],b[1],b[2],b[3],b[4],b[5]);case 7:return a(b[0],b[1],b[2],b[3],b[4],b[5],b[6]);default:return null}};Qe.createMemberField=function(a,b,c){Qe.init();return null};Qe.createMemberMethod=function(a,b,c,d,e){Qe.init();return null};Qe.createStaticField=function(a,b,c){Qe.init();return null};Qe.createStaticMethod=function(a,b,c,d,e){Qe.init();return null};Qe.getEnv=function(){Qe.init();return null};
Qe.init=function(){Qe.initialized||(Qe.initialized=!0)};Qe.onCallback=function(a,b,c){b=X.field(a,b);return null!=b?(null==c&&(c=[]),b.apply(a,c)):null};Qe.postUICallback=function(a){a()};var ut=function(a){this.field=a};h["lime.system.JNIMemberField"]=ut;ut.__name__="lime.system.JNIMemberField";ut.prototype={field:null,get:function(a){return null},set:function(a,b){return b},__class__:ut};var vt=function(a){this.field=a};h["lime.system.JNIStaticField"]=vt;vt.__name__="lime.system.JNIStaticField";
vt.prototype={field:null,get:function(){return null},set:function(a){return a},__class__:vt};var wt=function(a){this.method=a};h["lime.system.JNIMethod"]=wt;wt.__name__="lime.system.JNIMethod";wt.prototype={method:null,callMember:function(a){return null},callStatic:function(a){return null},getMemberMethod:function(a){return a?v(this,this.callMember):X.makeVarArgs(v(this,this.callMember))},getStaticMethod:function(a){return a?v(this,this.callStatic):X.makeVarArgs(v(this,this.callStatic))},__class__:wt};
var Bd={};h["lime.system._Locale.Locale_Impl_"]=Bd;Bd.__name__="lime.system._Locale.Locale_Impl_";Bd.__properties__={get_region:"get_region",get_language:"get_language",get_systemLocale:"get_systemLocale",set_currentLocale:"set_currentLocale",get_currentLocale:"get_currentLocale"};Bd._new=function(a){return a};Bd.equals=function(a,b){var c=Bd.get_language(a);a=Bd.get_region(a);var d=Bd.get_language(b);b=Bd.get_region(b);var e=c==d,f=a==b;e||null==c||null==d||(e=c.toLowerCase()==d.toLowerCase());f||
null==a||null==b||(f=a.toLowerCase()==b.toLowerCase());return e?f:!1};Bd.__init=function(){if(null==Bd.__systemLocale){var a=navigator.language;Bd.__systemLocale=null!=a?a:"en-US";Bd.set_currentLocale(Bd.__systemLocale)}};Bd.get_language=function(a){if(null!=a){var b=a.indexOf("_");if(-1<b){var c=a.indexOf("-");-1<c&&c<b&&(b=c);return a.substring(0,b)}b=a.indexOf("-");if(-1<b)return a.substring(0,b)}return a};Bd.get_region=function(a){if(null!=a){var b=a.indexOf("_"),c=a.indexOf("."),d=a.indexOf("-");
if(-1<b)return-1<c?a.substring(b+1,c):a.substring(b+1);if(-1<d)return-1<c?a.substring(d+1,c):a.substring(d+1)}return null};Bd.get_currentLocale=function(){Bd.__init();return Bd.currentLocale};Bd.set_currentLocale=function(a){Bd.__init();return Bd.currentLocale=a};Bd.get_systemLocale=function(){Bd.__init();return Bd.__systemLocale};var pg=function(a,b){this.onUpdate=new Jq;this.type=a;this.id=b};h["lime.system.Sensor"]=pg;pg.__name__="lime.system.Sensor";pg.getSensors=function(a){if(null==a)return pg.sensors.slice();
for(var b=[],c=0,d=pg.sensors;c<d.length;){var e=d[c];++c;e.type==a&&b.push(e)}return b};pg.registerSensor=function(a,b){a=new pg(a,b);pg.sensors.push(a);return pg.sensorByID.h[b]=a};pg.prototype={id:null,onUpdate:null,type:null,__class__:pg};var uu=C["lime.system.SensorType"]={__ename__:"lime.system.SensorType",__constructs__:["ACCELEROMETER"],ACCELEROMETER:{_hx_index:0,__enum__:"lime.system.SensorType",toString:u}},Ra=function(){};h["lime.system.System"]=Ra;Ra.__name__="lime.system.System";Ra.__properties__=
{get_userDirectory:"get_userDirectory",get_platformVersion:"get_platformVersion",get_platformName:"get_platformName",get_platformLabel:"get_platformLabel",get_numDisplays:"get_numDisplays",get_fontsDirectory:"get_fontsDirectory",get_endianness:"get_endianness",get_documentsDirectory:"get_documentsDirectory",get_deviceVendor:"get_deviceVendor",get_deviceModel:"get_deviceModel",get_desktopDirectory:"get_desktopDirectory",get_applicationStorageDirectory:"get_applicationStorageDirectory",get_applicationDirectory:"get_applicationDirectory",
set_allowScreenTimeout:"set_allowScreenTimeout",get_allowScreenTimeout:"get_allowScreenTimeout"};Ra.embed=y.lime.embed=function(a,b,c,d,e){if(null!=Ra.__applicationEntryPoint){var f=Ra.__applicationEntryPoint;if(null!=q[a]?f.existsReserved(a):f.h.hasOwnProperty(a))f="string"==typeof b?window.document.getElementById(b):null==b?window.document.createElement("div"):b,null==f?window.console.log("[lime.embed] ERROR: Cannot find target element: "+K.string(b)):(null==c&&(c=0),null==d&&(d=0),null==e&&(e=
{}),Object.prototype.hasOwnProperty.call(e,"background")&&"string"==typeof e.background&&(b=ba.replace(K.string(e.background),"#",""),-1<b.indexOf("0x")?e.background=K.parseInt(b):e.background=K.parseInt("0x"+b)),e.element=f,e.width=c,e.height=d,c=Ra.__applicationEntryPoint,(null!=q[a]?c.getReserved(a):c.h[a])(e))}};Ra.exit=function(a){};Ra.getDisplay=function(a){return 0==a?(a=new $q,a.id=0,a.name="Generic Display",a.dpi=96*window.devicePixelRatio,a.currentMode=new ar(window.screen.width,window.screen.height,
60,1),a.supportedModes=[a.currentMode],a.bounds=new he(0,0,a.currentMode.width,a.currentMode.height),a):null};Ra.getTimer=function(){return window.performance.now()|0};Ra.load=function(a,b,c,d){null==d&&(d=!1);null==c&&(c=0);return Dh.load(a,b,c,d)};Ra.openFile=function(a){null!=a&&window.open(a,"_blank")};Ra.openURL=function(a,b){null==b&&(b="_blank");null!=a&&window.open(a,b)};Ra.__copyMissingFields=function(a,b){if(null!=b&&null!=a)for(var c=0,d=X.fields(b);c<d.length;){var e=d[c];++c;Object.prototype.hasOwnProperty.call(a,
e)||(a[e]=X.field(b,e))}};Ra.__getDirectory=function(a){return null};Ra.__parseBool=function(a){return"true"==a};Ra.__registerEntryPoint=function(a,b){null==Ra.__applicationEntryPoint&&(Ra.__applicationEntryPoint=new ua);var c=Ra.__applicationEntryPoint;null!=q[a]?c.setReserved(a,b):c.h[a]=b};Ra.__runProcess=function(a,b){return null};Ra.get_allowScreenTimeout=function(){return!0};Ra.set_allowScreenTimeout=function(a){return!0};Ra.get_applicationDirectory=function(){null==Ra.__applicationDirectory&&
(Ra.__applicationDirectory=Ra.__getDirectory(0));return Ra.__applicationDirectory};Ra.get_applicationStorageDirectory=function(){null==Ra.__applicationStorageDirectory&&(Ra.__applicationStorageDirectory=Ra.__getDirectory(1));return Ra.__applicationStorageDirectory};Ra.get_deviceModel=function(){return Ra.__deviceModel};Ra.get_deviceVendor=function(){return Ra.__deviceVendor};Ra.get_desktopDirectory=function(){null==Ra.__desktopDirectory&&(Ra.__desktopDirectory=Ra.__getDirectory(2));return Ra.__desktopDirectory};
Ra.get_documentsDirectory=function(){null==Ra.__documentsDirectory&&(Ra.__documentsDirectory=Ra.__getDirectory(3));return Ra.__documentsDirectory};Ra.get_endianness=function(){if(null==Ra.__endianness){var a=new ArrayBuffer(2),b=null!=a?new Uint8Array(a,0):null;a=null!=a?new Uint16Array(a,0):null;b[0]=170;b[1]=187;Ra.__endianness=43707==a[0]?Oi.BIG_ENDIAN:Oi.LITTLE_ENDIAN}return Ra.__endianness};Ra.get_fontsDirectory=function(){null==Ra.__fontsDirectory&&(Ra.__fontsDirectory=Ra.__getDirectory(4));
return Ra.__fontsDirectory};Ra.get_numDisplays=function(){return 1};Ra.get_platformLabel=function(){if(null==Ra.__platformLabel){var a=Ra.get_platformName(),b=Ra.get_platformVersion();null!=a&&null!=b?Ra.__platformLabel=a+" "+b:null!=a&&(Ra.__platformLabel=a)}return Ra.__platformLabel};Ra.get_platformName=function(){null==Ra.__platformName&&(Ra.__platformName="HTML5");return Ra.__platformName};Ra.get_platformVersion=function(){return Ra.__platformVersion};Ra.get_userDirectory=function(){null==Ra.__userDirectory&&
(Ra.__userDirectory=Ra.__getDirectory(5));return Ra.__userDirectory};var Iq=function(a,b){null==b&&(b=1);null==a&&(a=0);this.onRun=new Qi;this.onProgress=new Qi;this.onError=new Qi;this.onComplete=new Qi;this.doWork=new Qi;this.minThreads=a;this.maxThreads=b;this.currentThreads=0};h["lime.system.ThreadPool"]=Iq;Iq.__name__="lime.system.ThreadPool";Iq.prototype={currentThreads:null,doWork:null,maxThreads:null,minThreads:null,onComplete:null,onError:null,onProgress:null,onRun:null,queue:function(a){this.runWork(a)},
sendComplete:function(a){this.onComplete.dispatch(a)},sendError:function(a){this.onError.dispatch(a)},sendProgress:function(a){this.onProgress.dispatch(a)},runWork:function(a){this.onRun.dispatch(a);this.doWork.dispatch(a)},__class__:Iq};C["lime.system._ThreadPool.ThreadPoolMessageType"]={__ename__:"lime.system._ThreadPool.ThreadPoolMessageType",__constructs__:["COMPLETE","ERROR","EXIT","PROGRESS","WORK"],COMPLETE:{_hx_index:0,__enum__:"lime.system._ThreadPool.ThreadPoolMessageType",toString:u},ERROR:{_hx_index:1,
__enum__:"lime.system._ThreadPool.ThreadPoolMessageType",toString:u},EXIT:{_hx_index:2,__enum__:"lime.system._ThreadPool.ThreadPoolMessageType",toString:u},PROGRESS:{_hx_index:3,__enum__:"lime.system._ThreadPool.ThreadPoolMessageType",toString:u},WORK:{_hx_index:4,__enum__:"lime.system._ThreadPool.ThreadPoolMessageType",toString:u}};var xt=function(a,b){this.type=a;this.state=b};h["lime.system._ThreadPool.ThreadPoolMessage"]=xt;xt.__name__="lime.system._ThreadPool.ThreadPoolMessage";xt.prototype=
{state:null,type:null,__class__:xt};var ne=function(a){null!=a&&(this.name=a);this.__init||(void 0==this.ascender&&(this.ascender=0),void 0==this.descender&&(this.descender=0),void 0==this.height&&(this.height=0),void 0==this.numGlyphs&&(this.numGlyphs=0),void 0==this.underlinePosition&&(this.underlinePosition=0),void 0==this.underlineThickness&&(this.underlineThickness=0),void 0==this.unitsPerEM&&(this.unitsPerEM=0),null!=this.__fontID?ta.isLocal(this.__fontID)&&this.__fromBytes(ta.getBytes(this.__fontID)):
null!=this.__fontPath&&this.__fromFile(this.__fontPath))};h["lime.text.Font"]=ne;ne.__name__="lime.text.Font";ne.fromBytes=function(a){if(null==a)return null;var b=new ne;b.__fromBytes(a);return b};ne.fromFile=function(a){if(null==a)return null;var b=new ne;b.__fromFile(a);return b};ne.loadFromBytes=function(a){return xb.withValue(ne.fromBytes(a))};ne.loadFromFile=function(a){return(new mo).load(a).then(function(a){return null!=a?xb.withValue(a):xb.withError("")})};ne.loadFromName=function(a){return(new ne).__loadFromName(a)};
ne.__measureFontNode=function(a){var b=window.document.createElement("span");b.setAttribute("aria-hidden","true");var c=window.document.createTextNode("BESbswy");b.appendChild(c);c=b.style;c.display="block";c.position="absolute";c.top="-9999px";c.left="-9999px";c.fontSize="300px";c.width="auto";c.height="auto";c.lineHeight="normal";c.margin="0";c.padding="0";c.fontVariant="normal";c.whiteSpace="nowrap";c.fontFamily=a;window.document.body.appendChild(b);return b};ne.prototype={ascender:null,descender:null,
height:null,name:null,numGlyphs:null,src:null,underlinePosition:null,underlineThickness:null,unitsPerEM:null,__fontID:null,__fontPath:null,__init:null,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},__copyFrom:function(a){null!=a&&(this.ascender=a.ascender,this.descender=a.descender,this.height=a.height,this.name=a.name,this.numGlyphs=
a.numGlyphs,this.src=a.src,this.underlinePosition=a.underlinePosition,this.underlineThickness=a.underlineThickness,this.unitsPerEM=a.unitsPerEM,this.__fontID=a.__fontID,this.__fontPath=a.__fontPath,this.__init=!0)},__fromBytes:function(a){this.__fontPath=null},__fromFile:function(a){this.__fontPath=a},__initializeSource:function(){this.__init=!0},__loadFromName:function(a){var b=this,c=new Jd;this.name=a;var d=window.navigator.userAgent.toLowerCase(),e=0<=d.indexOf(" safari/")&&0>d.indexOf(" chrome/");
d=(new Ca("(iPhone|iPod|iPad).*AppleWebKit(?!.*Version)","i")).match(d);if(!e&&!d&&window.document.fonts&&(x=window.document.fonts,v(x,x.load)))window.document.fonts.load("1em '"+a+"'").then(function(a){c.complete(b)},function(d){Ta.warn('Could not load web font "'+a+'"',{fileName:"lime/text/Font.hx",lineNumber:513,className:"lime.text.Font",methodName:"__loadFromName"});c.complete(b)});else{var f=ne.__measureFontNode("'"+a+"', sans-serif"),g=ne.__measureFontNode("'"+a+"', serif"),k=f.offsetWidth,
l=g.offsetWidth,m=-1,p=0,n,h;m=window.setInterval(function(){p+=1;n=f.offsetWidth!=k||g.offsetWidth!=l;h=3E3<=50*p;if(n||h)window.clearInterval(m),f.parentNode.removeChild(f),g.parentNode.removeChild(g),g=f=null,h&&Ta.warn('Could not load web font "'+a+'"',{fileName:"lime/text/Font.hx",lineNumber:548,className:"lime.text.Font",methodName:"__loadFromName"}),c.complete(b)},50)}return c.future},__setSize:function(a){},__class__:ne};var bu={};h["lime.text._Glyph.Glyph_Impl_"]=bu;bu.__name__="lime.text._Glyph.Glyph_Impl_";
bu._new=function(a){return a};var yt=function(){};h["lime.text.GlyphMetrics"]=yt;yt.__name__="lime.text.GlyphMetrics";yt.prototype={advance:null,height:null,horizontalBearing:null,verticalBearing:null,__class__:yt};var cu=function(){};h["lime.text.harfbuzz.HB"]=cu;cu.__name__="lime.text.harfbuzz.HB";cu.shape=function(a,b,c){};var Eh={};h["lime.text.harfbuzz._HBBlob.HBBlob_Impl_"]=Eh;Eh.__name__="lime.text.harfbuzz._HBBlob.HBBlob_Impl_";Eh.__properties__={get_length:"get_length",get_immutable:"get_immutable",
get_dataWritable:"get_dataWritable",get_data:"get_data",get_empty:"get_empty"};Eh._new=function(a,b,c){return null};Eh.createSubBlob=function(a,b,c){return null};Eh.makeImmutable=function(a){};Eh.get_data=function(a){return 0};Eh.get_dataWritable=function(a){return 0};Eh.get_empty=function(){return null};Eh.get_immutable=function(a){return!1};Eh.get_length=function(a){return 0};var Gc={};h["lime.text.harfbuzz._HBBuffer.HBBuffer_Impl_"]=Gc;Gc.__name__="lime.text.harfbuzz._HBBuffer.HBBuffer_Impl_";
Gc.__properties__={set_segmentProperties:"set_segmentProperties",get_segmentProperties:"get_segmentProperties",set_script:"set_script",get_script:"get_script",set_replacementCodepoint:"set_replacementCodepoint",get_replacementCodepoint:"get_replacementCodepoint",set_length:"set_length",get_length:"get_length",set_language:"set_language",get_language:"get_language",set_flags:"set_flags",get_flags:"get_flags",set_direction:"set_direction",get_direction:"get_direction",set_contentType:"set_contentType",
get_contentType:"get_contentType",set_clusterLevel:"set_clusterLevel",get_clusterLevel:"get_clusterLevel",get_allocationSuccessful:"get_allocationSuccessful"};Gc._new=function(){return null};Gc.add=function(a,b,c){};Gc.addCodepoints=function(a,b,c,d,e){};Gc.addUTF8=function(a,b,c,d){};Gc.addUTF16=function(a,b,c,d,e){};Gc.addUTF32=function(a,b,c,d,e){};Gc.clearContents=function(a){};Gc.getGlyphInfo=function(a){return null};Gc.getGlyphPositions=function(a){return null};Gc.guessSegmentProperties=function(a){};
Gc.normalizeGlyphs=function(a){};Gc.preallocate=function(a,b){return!1};Gc.reset=function(a){};Gc.reverse=function(a){};Gc.reverseClusters=function(a){};Gc.get_allocationSuccessful=function(a){return!1};Gc.get_clusterLevel=function(a){return 0};Gc.set_clusterLevel=function(a,b){return b};Gc.get_contentType=function(a){return 0};Gc.set_contentType=function(a,b){return b};Gc.get_direction=function(a){return 0};Gc.set_direction=function(a,b){return b};Gc.get_empty=function(){return null};Gc.get_flags=
function(a){return 0};Gc.set_flags=function(a,b){return b};Gc.get_language=function(a){return null};Gc.set_language=function(a,b){return b};Gc.get_length=function(a){return 0};Gc.set_length=function(a,b){return b};Gc.get_replacementCodepoint=function(a){return 0};Gc.set_replacementCodepoint=function(a,b){return b};Gc.get_script=function(a){return 0};Gc.set_script=function(a,b){return b};Gc.get_segmentProperties=function(a){return null};Gc.set_segmentProperties=function(a,b){return b};var po={};h["lime.text.harfbuzz._HBFTFont.HBFTFont_Impl_"]=
po;po.__name__="lime.text.harfbuzz._HBFTFont.HBFTFont_Impl_";po.__properties__={set_loadFlags:"set_loadFlags",get_loadFlags:"get_loadFlags"};po._new=function(a){return null};po.get_loadFlags=function(a){return 0};po.set_loadFlags=function(a,b){return b};var ch={};h["lime.text.harfbuzz._HBFace.HBFace_Impl_"]=ch;ch.__name__="lime.text.harfbuzz._HBFace.HBFace_Impl_";ch.__properties__={set_upem:"set_upem",get_upem:"get_upem",set_index:"set_index",get_index:"get_index",get_immutable:"get_immutable",set_glyphCount:"set_glyphCount",
get_glyphCount:"get_glyphCount",get_empty:"get_empty"};ch._new=function(a,b){return null};ch.get_empty=function(){return null};ch.get_glyphCount=function(a){return 0};ch.set_glyphCount=function(a,b){return b};ch.get_immutable=function(a){return!1};ch.get_index=function(a){return 0};ch.set_index=function(a,b){return b};ch.get_upem=function(a){return 0};ch.set_upem=function(a,b){return b};var zt=function(){};h["lime.text.harfbuzz.HBFeature"]=zt;zt.__name__="lime.text.harfbuzz.HBFeature";zt.prototype=
{__class__:zt};var Re={};h["lime.text.harfbuzz._HBFont.HBFont_Impl_"]=Re;Re.__name__="lime.text.harfbuzz._HBFont.HBFont_Impl_";Re.__properties__={set_scale:"set_scale",get_scale:"get_scale",set_ppem:"set_ppem",get_ppem:"get_ppem",get_parent:"get_parent",get_immutable:"get_immutable",get_face:"get_face",get_empty:"get_empty"};Re._new=function(a){return null};Re.addGlyphOriginForDirection=function(a,b,c,d,e){};Re.createSubFont=function(a){return null};Re.getGlyphAdvanceForDirection=function(a,b,c){return null};
Re.getGlyphKerningForDirection=function(a,b,c,d,e){return null};Re.getGlyphOriginForDirection=function(a,b,c){return null};Re.glyphFromString=function(a,b){return 0};Re.glyphToString=function(a,b){return null};Re.makeImmutable=function(a){};Re.subtractGlyphOriginForDirection=function(a,b,c,d,e){};Re.get_empty=function(){return null};Re.get_face=function(a){return null};Re.get_immutable=function(a){return!1};Re.get_parent=function(a){return null};Re.get_ppem=function(a){return null};Re.set_ppem=function(a,
b){return b};Re.get_scale=function(a){return null};Re.set_scale=function(a,b){return b};var At=function(){};h["lime.text.harfbuzz.HBGlyphInfo"]=At;At.__name__="lime.text.harfbuzz.HBGlyphInfo";At.prototype={codepoint:null,mask:null,cluster:null,__class__:At};var Bt=function(){};h["lime.text.harfbuzz.HBGlyphPosition"]=Bt;Bt.__name__="lime.text.harfbuzz.HBGlyphPosition";Bt.prototype={xAdvance:null,xOffset:null,yAdvance:null,yOffset:null,__class__:Bt};var ll={};h["lime.text.harfbuzz._HBLanguage.HBLanguage_Impl_"]=
ll;ll.__name__="lime.text.harfbuzz._HBLanguage.HBLanguage_Impl_";ll._new=function(a){return null};ll.toString=function(a){return null};ll.fromString=function(a){return ll._new(a)};var Ct=function(){};h["lime.text.harfbuzz.HBSegmentProperties"]=Ct;Ct.__name__="lime.text.harfbuzz.HBSegmentProperties";Ct.prototype={__class__:Ct};var le=function(a){this.onDisconnect=new me;this.onButtonUp=new ho;this.onButtonDown=new ho;this.onAxisMove=new Rq;this.id=a;this.connected=!0};h["lime.ui.Gamepad"]=le;le.__name__=
"lime.ui.Gamepad";le.addMappings=function(a){};le.__connect=function(a){if(!le.devices.h.hasOwnProperty(a)){var b=new le(a);le.devices.h[a]=b;le.onConnect.dispatch(b)}};le.__disconnect=function(a){var b=le.devices.h[a];null!=b&&(b.connected=!1);le.devices.remove(a);null!=b&&b.onDisconnect.dispatch()};le.prototype={connected:null,id:null,onAxisMove:null,onButtonDown:null,onButtonUp:null,onDisconnect:null,get_guid:function(){return pd.__getDeviceData()[this.id].id},get_name:function(){return pd.__getDeviceData()[this.id].id},
__class__:le,__properties__:{get_name:"get_name",get_guid:"get_guid"}};var Ri={};h["lime.ui._GamepadAxis.GamepadAxis_Impl_"]=Ri;Ri.__name__="lime.ui._GamepadAxis.GamepadAxis_Impl_";Ri.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 sf={};h["lime.ui._GamepadButton.GamepadButton_Impl_"]=sf;sf.__name__="lime.ui._GamepadButton.GamepadButton_Impl_";
sf.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 pd=function(a){this.onTrackballMove=new Nq;this.onHatMove=new Pq;this.onDisconnect=
new me;this.onButtonUp=new Pi;this.onButtonDown=new Pi;this.onAxisMove=new Oq;this.id=a;this.connected=!0};h["lime.ui.Joystick"]=pd;pd.__name__="lime.ui.Joystick";pd.__connect=function(a){if(!pd.devices.h.hasOwnProperty(a)){var b=new pd(a);pd.devices.h[a]=b;pd.onConnect.dispatch(b)}};pd.__disconnect=function(a){var b=pd.devices.h[a];null!=b&&(b.connected=!1);pd.devices.remove(a);null!=b&&b.onDisconnect.dispatch()};pd.__getDeviceData=function(){return navigator.getGamepads?navigator.getGamepads():
navigator.webkitGetGamepads?navigator.webkitGetGamepads():null};pd.prototype={connected:null,id:null,onAxisMove:null,onButtonDown:null,onButtonUp:null,onDisconnect:null,onHatMove:null,onTrackballMove:null,get_guid:function(){return pd.__getDeviceData()[this.id].id},get_name:function(){return pd.__getDeviceData()[this.id].id},get_numAxes:function(){return pd.__getDeviceData()[this.id].axes.length},get_numButtons:function(){return pd.__getDeviceData()[this.id].buttons.length},get_numHats:function(){return 0},
get_numTrackballs:function(){return 0},__class__:pd,__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 Ie={};h["lime.ui._JoystickHatPosition.JoystickHatPosition_Impl_"]=Ie;Ie.__name__="lime.ui._JoystickHatPosition.JoystickHatPosition_Impl_";Ie.__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"};Ie._new=function(a){return a};Ie.get_center=function(a){return 0==a};Ie.set_center=function(a,b){return b};Ie.get_down=function(a){return 0<(a&4)};Ie.set_down=function(a,b){return b};Ie.get_left=function(a){return 0<(a&8)};Ie.set_left=function(a,b){return b};Ie.get_right=function(a){return 0<(a&2)};Ie.set_right=function(a,b){return b};Ie.get_up=function(a){return 0<(a&1)};Ie.set_up=function(a,b){return b};var U=
{};h["lime.ui._KeyCode.KeyCode_Impl_"]=U;U.__name__="lime.ui._KeyCode.KeyCode_Impl_";U.fromScanCode=function(a){return 0};U.toScanCode=function(a){return 0};U.gt=function(a,b){return a>b};U.gte=function(a,b){return a>=b};U.lt=function(a,b){return a<b};U.lte=function(a,b){return a<=b};U.plus=function(a,b){return a+b};var wb={};h["lime.ui._KeyModifier.KeyModifier_Impl_"]=wb;wb.__name__="lime.ui._KeyModifier.KeyModifier_Impl_";wb.__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"};wb.get_altKey=function(a){return 0>=(a&256)?0<(a&512):!0};wb.set_altKey=function(a,b){return b};wb.get_capsLock=function(a){return 0>=(a&8192)?0<(a&8192):!0};wb.set_capsLock=function(a,b){return b};wb.get_ctrlKey=function(a){return 0>=(a&64)?
0<(a&128):!0};wb.set_ctrlKey=function(a,b){return b};wb.get_metaKey=function(a){return 0>=(a&1024)?0<(a&2048):!0};wb.set_metaKey=function(a,b){return b};wb.get_numLock=function(a){return 0>=(a&4096)?0<(a&4096):!0};wb.set_numLock=function(a,b){return b};wb.get_shiftKey=function(a){return 0>=(a&1)?0<(a&2):!0};wb.set_shiftKey=function(a,b){return b};var Kd=C["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(" "),
ARROW:{_hx_index:0,__enum__:"lime.ui.MouseCursor",toString:u},CROSSHAIR:{_hx_index:1,__enum__:"lime.ui.MouseCursor",toString:u},DEFAULT:{_hx_index:2,__enum__:"lime.ui.MouseCursor",toString:u},MOVE:{_hx_index:3,__enum__:"lime.ui.MouseCursor",toString:u},POINTER:{_hx_index:4,__enum__:"lime.ui.MouseCursor",toString:u},RESIZE_NESW:{_hx_index:5,__enum__:"lime.ui.MouseCursor",toString:u},RESIZE_NS:{_hx_index:6,__enum__:"lime.ui.MouseCursor",toString:u},RESIZE_NWSE:{_hx_index:7,__enum__:"lime.ui.MouseCursor",
toString:u},RESIZE_WE:{_hx_index:8,__enum__:"lime.ui.MouseCursor",toString:u},TEXT:{_hx_index:9,__enum__:"lime.ui.MouseCursor",toString:u},WAIT:{_hx_index:10,__enum__:"lime.ui.MouseCursor",toString:u},WAIT_ARROW:{_hx_index:11,__enum__:"lime.ui.MouseCursor",toString:u},CUSTOM:{_hx_index:12,__enum__:"lime.ui.MouseCursor",toString:u}},Cq=C["lime.ui.MouseWheelMode"]={__ename__:"lime.ui.MouseWheelMode",__constructs__:["PIXELS","LINES","PAGES","UNKNOWN"],PIXELS:{_hx_index:0,__enum__:"lime.ui.MouseWheelMode",
toString:u},LINES:{_hx_index:1,__enum__:"lime.ui.MouseWheelMode",toString:u},PAGES:{_hx_index:2,__enum__:"lime.ui.MouseWheelMode",toString:u},UNKNOWN:{_hx_index:3,__enum__:"lime.ui.MouseWheelMode",toString:u}},W={};h["lime.ui._ScanCode.ScanCode_Impl_"]=W;W.__name__="lime.ui._ScanCode.ScanCode_Impl_";W.fromKeyCode=function(a){return U.toScanCode(a)};W.toKeyCode=function(a){return U.fromScanCode(a)};W.gt=function(a,b){return a>b};W.gte=function(a,b){return a>=b};W.lt=function(a,b){return a<b};W.lte=
function(a,b){return a<=b};W.plus=function(a,b){return a+b};var Ad=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};h["lime.ui.Touch"]=Ad;Ad.__name__="lime.ui.Touch";Ad.prototype={device:null,dx:null,dy:null,id:null,pressure:null,x:null,y:null,__class__:Ad};var Ij=function(a,b){this.onTextInput=new fo;this.onTextEdit=new Qq;this.onRestore=new me;this.onResize=new eo;this.onRenderContextRestored=new go;this.onRenderContextLost=new me;this.onRender=
new go;this.onMove=new hl;this.onMouseWheel=new Mq;this.onMouseUp=new Kq;this.onMouseMoveRelative=new hl;this.onMouseMove=new hl;this.onMouseDown=new Lq;this.onMinimize=new me;this.onMaximize=new me;this.onLeave=new me;this.onKeyUp=new io;this.onKeyDown=new io;this.onFullscreen=new me;this.onFocusOut=new me;this.onFocusIn=new me;this.onExpose=new me;this.onEnter=new me;this.onDropFile=new fo;this.onDeactivate=new me;this.onClose=new me;this.onActivate=new me;this.application=a;this.__attributes=null!=
b?b:{};Object.prototype.hasOwnProperty.call(this.__attributes,"parameters")&&(this.parameters=this.__attributes.parameters);this.__height=this.__width=0;this.__fullscreen=!1;this.__scale=1;this.__y=this.__x=0;this.__title="";this.id=-1;this.__backend=new Pb(this)};h["lime.ui.Window"]=Ij;Ij.__name__="lime.ui.Window";Ij.prototype={application:null,context:null,display:null,element:null,hidden:null,id:null,onActivate:null,onClose:null,onDeactivate:null,onDropFile:null,onEnter:null,onExpose:null,onFocusIn:null,
onFocusOut:null,onFullscreen:null,onKeyDown:null,onKeyUp:null,onLeave:null,onMaximize:null,onMinimize:null,onMouseDown:null,onMouseMove:null,onMouseMoveRelative:null,onMouseUp:null,onMouseWheel:null,onMove:null,onRender:null,onRenderContextLost:null,onRenderContextRestored:null,onResize:null,onRestore:null,onTextEdit:null,onTextInput:null,parameters:null,scale:null,stage:null,__attributes:null,__backend:null,__borderless:null,__fullscreen:null,__height:null,__hidden:null,__maximized:null,__minimized:null,
__resizable:null,__scale:null,__title:null,__width:null,__x:null,__y:null,alert:function(a,b){this.__backend.alert(a,b)},close:function(){this.__backend.close()},focus:function(){this.__backend.focus()},move:function(a,b){this.__backend.move(a,b);this.__x=a;this.__y=b},readPixels:function(a){return this.__backend.readPixels(a)},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]"},
warpMouse:function(a,b){this.__backend.warpMouse(a,b)},get_cursor:function(){return this.__backend.getCursor()},set_cursor:function(a){return this.__backend.setCursor(a)},get_display:function(){return this.__backend.getDisplay()},get_displayMode:function(){return this.__backend.getDisplayMode()},set_displayMode:function(a){return this.__backend.setDisplayMode(a)},get_borderless:function(){return this.__borderless},set_borderless:function(a){return this.__borderless=this.__backend.setBorderless(a)},
get_frameRate:function(){return this.__backend.getFrameRate()},set_frameRate:function(a){return this.__backend.setFrameRate(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_hidden:function(){return this.__hidden},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_mouseLock:function(){return this.__backend.getMouseLock()},set_mouseLock:function(a){this.__backend.setMouseLock(a);return 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_textInputEnabled:function(){return this.__backend.getTextInputEnabled()},set_textInputEnabled:function(a){return this.__backend.setTextInputEnabled(a)},get_title:function(){return this.__title},set_title:function(a){return this.__title=this.__backend.setTitle(a)},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__:Ij,__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",set_textInputEnabled:"set_textInputEnabled",get_textInputEnabled:"get_textInputEnabled",get_scale:"get_scale",set_resizable:"set_resizable",get_resizable:"get_resizable",set_mouseLock:"set_mouseLock",get_mouseLock:"get_mouseLock",set_minimized:"set_minimized",get_minimized:"get_minimized",
set_maximized:"set_maximized",get_maximized:"get_maximized",get_hidden:"get_hidden",set_height:"set_height",get_height:"get_height",set_fullscreen:"set_fullscreen",get_fullscreen:"get_fullscreen",set_frameRate:"set_frameRate",get_frameRate:"get_frameRate",set_displayMode:"set_displayMode",get_displayMode:"get_displayMode",get_display:"get_display",set_cursor:"set_cursor",get_cursor:"get_cursor",set_borderless:"set_borderless",get_borderless:"get_borderless"}};C["lime.utils.TAError"]={__ename__:"lime.utils.TAError",
__constructs__:["RangeError"],RangeError:{_hx_index:0,__enum__:"lime.utils.TAError",toString:u}};var ug=function(){this.data=new ua;this.paths=[]};h["lime.utils.AssetBundle"]=ug;ug.__name__="lime.utils.AssetBundle";ug.fromBytes=function(a){a=new Mi(a);return ug.__extractBundle(a)};ug.fromFile=function(a){return null};ug.loadFromBytes=function(a){return xb.withValue(ug.fromBytes(a))};ug.loadFromFile=function(a){return Kc.loadFromFile(a).then(ug.loadFromBytes)};ug.__extractBundle=function(a){var b=
dl.readZip(a);a=new ug;for(b=b.h;null!=b;){var c=b.item;b=b.next;if(c.compressed)var d=a.data,e=c.fileName,f=Kc.decompress(c.data,ml.DEFLATE);else e=c.fileName,f=c.data,d=a.data;null!=q[e]?d.setReserved(e,f):d.h[e]=f;a.paths.push(c.fileName)}return a};ug.prototype={data:null,paths:null,__class__:ug};var br=function(){this.enabled=!0;this.audio=new ua;this.font=new ua;this.image=new ua;this.version=198476};h["lime.utils.AssetCache"]=br;br.__name__="lime.utils.AssetCache";br.prototype={audio:null,enabled:null,
image:null,font:null,version:null,exists:function(a,b){if("IMAGE"==b||null==b){var c=this.image;if(null!=q[a]?c.existsReserved(a):c.h.hasOwnProperty(a))return!0}if("FONT"==b||null==b)if(c=this.font,null!=q[a]?c.existsReserved(a):c.h.hasOwnProperty(a))return!0;if("SOUND"==b||"MUSIC"==b||null==b)if(b=this.audio,null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))return!0;return!1},set:function(a,b,c){switch(b){case "FONT":b=this.font;null!=q[a]?b.setReserved(a,c):b.h[a]=c;break;case "IMAGE":if(!(c instanceof
Ob))throw new E("Cannot cache non-Image asset: "+K.string(c)+" as Image");b=this.image;null!=q[a]?b.setReserved(a,c):b.h[a]=c;break;case "MUSIC":case "SOUND":if(!(c instanceof ad))throw new E("Cannot cache non-AudioBuffer asset: "+K.string(c)+" as AudioBuffer");b=this.audio;null!=q[a]?b.setReserved(a,c):b.h[a]=c;break;default:throw new E(b+" assets are not cachable");}},clear:function(a){if(null==a)this.audio=new ua,this.font=new ua,this.image=new ua;else{for(var b=this.audio.keys();b.hasNext();){var c=
b.next();ba.startsWith(c,a)&&this.audio.remove(c)}for(b=this.font.keys();b.hasNext();)c=b.next(),ba.startsWith(c,a)&&this.font.remove(c);for(b=this.image.keys();b.hasNext();)c=b.next(),ba.startsWith(c,a)&&this.image.remove(c)}},__class__:br};var bc=function(){this.types=new ua;this.sizes=new ua;this.preload=new ua;this.paths=new ua;this.pathGroups=new ua;this.classTypes=new ua;this.cachedText=new ua;this.cachedImages=new ua;this.cachedFonts=new ua;this.cachedBytes=new ua;this.cachedAudioBuffers=new ua;
this.onChange=new me;this.bytesTotal=this.bytesLoaded=0};h["lime.utils.AssetLibrary"]=bc;bc.__name__="lime.utils.AssetLibrary";bc.fromBytes=function(a,b){return bc.fromManifest(rd.fromBytes(a,b))};bc.fromFile=function(a,b){return bc.fromManifest(rd.fromFile(a,b))};bc.fromBundle=function(a){var b=a.data;if(null!=q["library.json"]?b.existsReserved("library.json"):b.h.hasOwnProperty("library.json")){if(b=a.data,b=rd.fromBytes(null!=q["library.json"]?b.getReserved("library.json"):b.h["library.json"]),
null!=b){if(null==b.libraryType)var c=new bc;else if(c=h[b.libraryType],null!=c)c=rb.createInstance(c,b.libraryArgs);else return Ta.warn("Could not find library type: "+b.libraryType,{fileName:"lime/utils/AssetLibrary.hx",lineNumber:122,className:"lime.utils.AssetLibrary",methodName:"fromBundle"}),null;c.__fromBundle(a,b);return c}}else return b=new bc,b.__fromBundle(a),b;return null};bc.fromManifest=function(a){if(null==a)return null;if(null==a.libraryType)var b=new bc;else if(b=h[a.libraryType],
null!=b)b=rb.createInstance(b,a.libraryArgs);else return Ta.warn("Could not find library type: "+a.libraryType,{fileName:"lime/utils/AssetLibrary.hx",lineNumber:160,className:"lime.utils.AssetLibrary",methodName:"fromManifest"}),null;b.__fromManifest(a);return b};bc.loadFromBytes=function(a,b){return rd.loadFromBytes(a,b).then(function(a){return bc.loadFromManifest(a)})};bc.loadFromFile=function(a,b){return rd.loadFromFile(a,b).then(function(a){return bc.loadFromManifest(a)})};bc.loadFromManifest=
function(a){a=bc.fromManifest(a);return null!=a?a.load():xb.withError("Could not load asset manifest")};bc.prototype={onChange:null,assetsLoaded:null,assetsTotal:null,bytesLoaded:null,bytesLoadedCache:null,bytesTotal:null,cachedAudioBuffers:null,cachedBytes:null,cachedFonts:null,cachedImages:null,cachedText:null,classTypes:null,loaded:null,pathGroups:null,paths:null,preload:null,promise:null,sizes:null,types:null,exists:function(a,b){b=null!=b?L.__cast(b,String):null;var c=this.types;a=null!=q[a]?
c.getReserved(a):c.h[a];return null==a||a!=b&&("SOUND"!=b&&"MUSIC"!=b||"MUSIC"!=a&&"SOUND"!=a)&&"BINARY"!=b&&null!=b&&("BINARY"!=a||"TEXT"!=b)?!1:!0},getAsset:function(a,b){switch(b){case "BINARY":return this.getBytes(a);case "FONT":return this.getFont(a);case "IMAGE":return this.getImage(a);case "MUSIC":case "SOUND":return this.getAudioBuffer(a);case "TEMPLATE":throw new E("Not sure how to get template: "+a);case "TEXT":return this.getText(a);default:throw new E("Unknown asset type: "+b);}},getAudioBuffer:function(a){var b=
this.cachedAudioBuffers;if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))return b=this.cachedAudioBuffers,null!=q[a]?b.getReserved(a):b.h[a];b=this.classTypes;if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))return b=this.classTypes,ad.fromBytes(L.__cast(rb.createInstance(null!=q[a]?b.getReserved(a):b.h[a],[]),hb));b=this.paths;return ad.fromFile(null!=q[a]?b.getReserved(a):b.h[a])},getBytes:function(a){var b=this.cachedBytes;if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))return b=
this.cachedBytes,null!=q[a]?b.getReserved(a):b.h[a];b=this.cachedText;if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a)){b=this.cachedText;b=Kc.ofString(null!=q[a]?b.getReserved(a):b.h[a]);var c=this.cachedBytes;null!=q[a]?c.setReserved(a,b):c.h[a]=b;return b}b=this.classTypes;if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))return b=this.classTypes,L.__cast(rb.createInstance(null!=q[a]?b.getReserved(a):b.h[a],[]),hb);b=this.paths;return Kc.fromFile(null!=q[a]?b.getReserved(a):b.h[a])},
getFont:function(a){var b=this.cachedFonts;if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))return b=this.cachedFonts,null!=q[a]?b.getReserved(a):b.h[a];b=this.classTypes;if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))return b=this.classTypes,L.__cast(rb.createInstance(null!=q[a]?b.getReserved(a):b.h[a],[]),ne);b=this.paths;return ne.fromFile(null!=q[a]?b.getReserved(a):b.h[a])},getImage:function(a){var b=this.cachedImages;if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))return b=
this.cachedImages,null!=q[a]?b.getReserved(a):b.h[a];b=this.classTypes;if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))return b=this.classTypes,L.__cast(rb.createInstance(null!=q[a]?b.getReserved(a):b.h[a],[]),Ob);b=this.paths;return Ob.fromFile(null!=q[a]?b.getReserved(a):b.h[a])},getPath:function(a){var b=this.paths;if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))return b=this.paths,null!=q[a]?b.getReserved(a):b.h[a];b=this.pathGroups;return(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))?
(b=this.pathGroups,(null!=q[a]?b.getReserved(a):b.h[a])[0]):null},getText:function(a){var b=this.cachedText;if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))return b=this.cachedText,null!=q[a]?b.getReserved(a):b.h[a];a=this.getBytes(a);return null==a?null:a.getString(0,a.length)},isLocal:function(a,b){var c=this.classTypes;if(null!=q[a]?c.existsReserved(a):c.h.hasOwnProperty(a))return!0;b=null!=b?L.__cast(b,String):null;if(null==b){b=this.cachedBytes;if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))return!0;
b=this.cachedText;return null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a)}switch(b){case "FONT":return b=this.cachedFonts,null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a);case "IMAGE":return b=this.cachedImages,null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a);case "MUSIC":case "SOUND":return b=this.cachedAudioBuffers,null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a);default:b=this.cachedBytes;if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))return!0;b=this.cachedText;return null!=
q[a]?b.existsReserved(a):b.h.hasOwnProperty(a)}},list:function(a){for(var b=null!=a?L.__cast(a,String):null,c=[],d=this.types.keys();d.hasNext();){var e=d.next();(null==b||this.exists(e,a))&&c.push(e)}return c},loadAsset:function(a,b){switch(b){case "BINARY":return this.loadBytes(a);case "FONT":return this.loadFont(a);case "IMAGE":return this.loadImage(a);case "MUSIC":case "SOUND":return this.loadAudioBuffer(a);case "TEMPLATE":throw new E("Not sure how to load template: "+a);case "TEXT":return this.loadText(a);
default:throw new E("Unknown asset type: "+b);}},load:function(){if(this.loaded)return xb.withValue(this);if(null==this.promise){this.promise=new Jd;this.bytesLoadedCache=new ua;this.assetsLoaded=0;this.assetsTotal=1;for(var a=this.preload.keys();a.hasNext();){var b=a.next(),c=this.preload;if(null!=q[b]?c.getReserved(b):c.h[b])if(c=this.types,Ta.verbose("Preloading asset: "+b+" ["+(null!=q[b]?c.getReserved(b):c.h[b])+"]",{fileName:"lime/utils/AssetLibrary.hx",lineNumber:405,className:"lime.utils.AssetLibrary",
methodName:"load"}),c=this.types,c=null!=q[b]?c.getReserved(b):c.h[b],null!=c)switch(c){case "BINARY":this.assetsTotal++;c=this.loadBytes(b);c.onProgress(function(a,b){return function(c,d){b[0](a[0],c,d)}}([b],[v(this,this.load_onProgress)]));c.onError(function(a,b){return function(c){b[0](a[0],c)}}([b],[v(this,this.load_onError)]));c.onComplete(function(a,b){return function(c){b[0](a[0],c)}}([b],[v(this,this.loadBytes_onComplete)]));break;case "FONT":this.assetsTotal++;c=this.loadFont(b);c.onProgress(function(a,
b){return function(c,d){b[0](a[0],c,d)}}([b],[v(this,this.load_onProgress)]));c.onError(function(a,b){return function(c){b[0](a[0],c)}}([b],[v(this,this.load_onError)]));c.onComplete(function(a,b){return function(c){b[0](a[0],c)}}([b],[v(this,this.loadFont_onComplete)]));break;case "IMAGE":this.assetsTotal++;c=this.loadImage(b);c.onProgress(function(a,b){return function(c,d){b[0](a[0],c,d)}}([b],[v(this,this.load_onProgress)]));c.onError(function(a,b){return function(c){b[0](a[0],c)}}([b],[v(this,
this.load_onError)]));c.onComplete(function(a,b){return function(c){b[0](a[0],c)}}([b],[v(this,this.loadImage_onComplete)]));break;case "MUSIC":case "SOUND":this.assetsTotal++;c=this.loadAudioBuffer(b);c.onProgress(function(a,b){return function(c,d){b[0](a[0],c,d)}}([b],[v(this,this.load_onProgress)]));c.onError(function(a,b){return function(c){b[0](a[0],c)}}([b],[v(this,this.loadAudioBuffer_onError)]));c.onComplete(function(a,b){return function(c){b[0](a[0],c)}}([b],[v(this,this.loadAudioBuffer_onComplete)]));
break;case "TEXT":this.assetsTotal++,c=this.loadText(b),c.onProgress(function(a,b){return function(c,d){b[0](a[0],c,d)}}([b],[v(this,this.load_onProgress)])),c.onError(function(a,b){return function(c){b[0](a[0],c)}}([b],[v(this,this.load_onError)])),c.onComplete(function(a,b){return function(c){b[0](a[0],c)}}([b],[v(this,this.loadText_onComplete)]))}}this.__assetLoaded(null)}return this.promise.future},loadAudioBuffer:function(a){var b=this.cachedAudioBuffers;if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))return b=
this.cachedAudioBuffers,xb.withValue(null!=q[a]?b.getReserved(a):b.h[a]);b=this.classTypes;if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))return b=this.classTypes,xb.withValue(rb.createInstance(null!=q[a]?b.getReserved(a):b.h[a],[]));b=this.pathGroups;if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))return b=this.pathGroups,ad.loadFromFiles(null!=q[a]?b.getReserved(a):b.h[a]);b=this.paths;return ad.loadFromFile(null!=q[a]?b.getReserved(a):b.h[a])},loadBytes:function(a){var b=this.cachedBytes;
if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))return b=this.cachedBytes,xb.withValue(null!=q[a]?b.getReserved(a):b.h[a]);b=this.classTypes;if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))return b=this.classTypes,xb.withValue(rb.createInstance(null!=q[a]?b.getReserved(a):b.h[a],[]));b=this.paths;return Kc.loadFromFile(null!=q[a]?b.getReserved(a):b.h[a])},loadFont:function(a){var b=this.cachedFonts;if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))return b=this.cachedFonts,xb.withValue(null!=
q[a]?b.getReserved(a):b.h[a]);b=this.classTypes;if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))return b=this.classTypes,a=rb.createInstance(null!=q[a]?b.getReserved(a):b.h[a],[]),a.__loadFromName(a.name);b=this.paths;return ne.loadFromName(null!=q[a]?b.getReserved(a):b.h[a])},loadImage:function(a){var b=this,c=this.cachedImages;if(null!=q[a]?c.existsReserved(a):c.h.hasOwnProperty(a))return c=this.cachedImages,xb.withValue(null!=q[a]?c.getReserved(a):c.h[a]);c=this.classTypes;if(null!=q[a]?
c.existsReserved(a):c.h.hasOwnProperty(a))return c=this.classTypes,xb.withValue(rb.createInstance(null!=q[a]?c.getReserved(a):c.h[a],[]));c=this.cachedBytes;if(null!=q[a]?c.existsReserved(a):c.h.hasOwnProperty(a))return c=this.cachedBytes,Ob.loadFromBytes(null!=q[a]?c.getReserved(a):c.h[a]).then(function(c){b.cachedBytes.remove(a);var d=b.cachedImages;null!=q[a]?d.setReserved(a,c):d.h[a]=c;return xb.withValue(c)});c=this.paths;return Ob.loadFromFile(null!=q[a]?c.getReserved(a):c.h[a])},loadText:function(a){var b=
this.cachedText;if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))return b=this.cachedText,xb.withValue(null!=q[a]?b.getReserved(a):b.h[a]);b=this.cachedBytes;(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))?b=!0:(b=this.classTypes,b=null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a));if(b){b=this.getBytes(a);if(null==b)return xb.withValue(null);b=b.getString(0,b.length);var c=this.cachedText;null!=q[a]?c.setReserved(a,b):c.h[a]=b;return xb.withValue(b)}b=new kl;c=this.paths;return b.load(null!=
q[a]?c.getReserved(a):c.h[a])},unload:function(){},__assetLoaded:function(a){this.assetsLoaded++;if(null!=a){var b=this.types;Ta.verbose("Loaded asset: "+a+" ["+(null!=q[a]?b.getReserved(a):b.h[a])+"] ("+(this.assetsLoaded-1)+"/"+(this.assetsTotal-1)+")",{fileName:"lime/utils/AssetLibrary.hx",lineNumber:619,className:"lime.utils.AssetLibrary",methodName:"__assetLoaded"})}if(null!=a){b=this.sizes;(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))?(b=this.sizes,b=null!=q[a]?b.getReserved(a):b.h[a]):
b=0;var c=this.bytesLoadedCache;(null!=q[a]?c.existsReserved(a):c.h.hasOwnProperty(a))?(c=this.bytesLoadedCache,c=null!=q[a]?c.getReserved(a):c.h[a],c<b&&(this.bytesLoaded+=b-c)):this.bytesLoaded+=b;c=this.bytesLoadedCache;null!=q[a]?c.setReserved(a,b):c.h[a]=b}this.assetsLoaded<this.assetsTotal?this.promise.progress(this.bytesLoaded,this.bytesTotal):(this.loaded=!0,this.promise.progress(this.bytesTotal,this.bytesTotal),this.promise.complete(this))},__cacheBreak:function(a){return ta.__cacheBreak(a)},
__fromBundle:function(a,b){if(null!=b)for(var c,d,e=0,f=b.assets;e<f.length;){var g=f[e];++e;b=Object.prototype.hasOwnProperty.call(g,"id")?g.id:g.path;c=g.path;d=a.data;c=null!=q[c]?d.getReserved(c):d.h[c];Object.prototype.hasOwnProperty.call(g,"type")?(d=g.type,"TEXT"==d?(c=null!=c?K.string(c):null,d=this.cachedText):d=this.cachedBytes,null!=q[b]?d.setReserved(b,c):d.h[b]=c,g=g.type,c=this.types,null!=q[b]?c.setReserved(b,g):c.h[b]=g):(g=this.cachedBytes,null!=q[b]?g.setReserved(b,c):g.h[b]=c,g=
this.types,null!=q[b]?g.setReserved(b,"BINARY"):g.h[b]="BINARY")}else for(e=0,b=a.paths;e<b.length;)f=b[e],++e,g=this.cachedBytes,c=a.data,c=null!=q[f]?c.getReserved(f):c.h[f],null!=q[f]?g.setReserved(f,c):g.h[f]=c,g=this.types,null!=q[f]?g.setReserved(f,"BINARY"):g.h[f]="BINARY"},__fromManifest:function(a){var b=2<=a.version,c=a.rootPath;null==c&&(c="");""!=c&&(c+="/");for(var d=0,e=a.assets;d<e.length;){var f=e[d];++d;var g=b&&Object.prototype.hasOwnProperty.call(f,"size")?f.size:100;var k=Object.prototype.hasOwnProperty.call(f,
"id")?f.id:f.path;if(Object.prototype.hasOwnProperty.call(f,"path")){var l=this.paths;var m=this.__cacheBreak(this.__resolvePath(c+K.string(X.field(f,"path"))));null!=q[k]?l.setReserved(k,m):l.h[k]=m}if(Object.prototype.hasOwnProperty.call(f,"pathGroup")){m=X.field(f,"pathGroup");l=0;for(var p=m.length;l<p;){var n=l++;m[n]=this.__cacheBreak(this.__resolvePath(c+m[n]))}l=this.pathGroups;null!=q[k]?l.setReserved(k,m):l.h[k]=m}m=this.sizes;null!=q[k]?m.setReserved(k,g):m.h[k]=g;g=f.type;m=this.types;
null!=q[k]?m.setReserved(k,g):m.h[k]=g;Object.prototype.hasOwnProperty.call(f,"preload")&&(g=X.field(f,"preload"),m=this.preload,null!=q[k]?m.setReserved(k,g):m.h[k]=g);Object.prototype.hasOwnProperty.call(f,"className")&&(f=X.field(f,"className"),f=h[f],g=this.classTypes,null!=q[k]?g.setReserved(k,f):g.h[k]=f)}b=this.bytesTotal=0;for(a=a.assets;b<a.length;)k=a[b],++b,k=Object.prototype.hasOwnProperty.call(k,"id")?k.id:k.path,c=this.preload,(null!=q[k]?c.existsReserved(k):c.h.hasOwnProperty(k))?(c=
this.preload,c=null!=q[k]?c.getReserved(k):c.h[k]):c=!1,c?(c=this.sizes,c=null!=q[k]?c.existsReserved(k):c.h.hasOwnProperty(k)):c=!1,c&&(c=this.sizes,this.bytesTotal+=null!=q[k]?c.getReserved(k):c.h[k])},__resolvePath:function(a){a=ba.replace(a,"\\","/");var b=a.indexOf(":");ba.startsWith(a,"http")&&0<b?(b+=3,a=B.substr(a,0,b)+ba.replace(B.substr(a,b,null),"//","/")):a=ba.replace(a,"//","/");if(-1<a.indexOf("./")){a=a.split("/");b=[];for(var c=0,d=a.length;c<d;){var e=c++;".."==a[e]?0==e||".."==b[e-
1]?b.push(".."):b.pop():"."==a[e]?0==e&&b.push("."):b.push(a[e])}a=b.join("/")}return a},loadAudioBuffer_onComplete:function(a,b){var c=this.cachedAudioBuffers;null!=q[a]?c.setReserved(a,b):c.h[a]=b;c=this.pathGroups;if(null!=q[a]?c.existsReserved(a):c.h.hasOwnProperty(a)){c=this.pathGroups;c=null!=q[a]?c.getReserved(a):c.h[a];for(var d=this.pathGroups.keys();d.hasNext();){var e=d.next();if(e!=a)for(var f=0;f<c.length;){var g=c[f];++f;var k=this.pathGroups;if(-1<(null!=q[e]?k.getReserved(e):k.h[e]).indexOf(g)){f=
this.cachedAudioBuffers;null!=q[e]?f.setReserved(e,b):f.h[e]=b;break}}}}this.__assetLoaded(a)},loadAudioBuffer_onError:function(a,b){null!=b&&""!=b?Ta.warn('Could not load "'+a+'": '+K.string(b),{fileName:"lime/utils/AssetLibrary.hx",lineNumber:865,className:"lime.utils.AssetLibrary",methodName:"loadAudioBuffer_onError"}):Ta.warn('Could not load "'+a+'"',{fileName:"lime/utils/AssetLibrary.hx",lineNumber:869,className:"lime.utils.AssetLibrary",methodName:"loadAudioBuffer_onError"});this.loadAudioBuffer_onComplete(a,
new ad)},loadBytes_onComplete:function(a,b){var c=this.cachedBytes;null!=q[a]?c.setReserved(a,b):c.h[a]=b;this.__assetLoaded(a)},loadFont_onComplete:function(a,b){var c=this.cachedFonts;null!=q[a]?c.setReserved(a,b):c.h[a]=b;this.__assetLoaded(a)},loadImage_onComplete:function(a,b){var c=this.cachedImages;null!=q[a]?c.setReserved(a,b):c.h[a]=b;this.__assetLoaded(a)},loadText_onComplete:function(a,b){var c=this.cachedText;null!=q[a]?c.setReserved(a,b):c.h[a]=b;this.__assetLoaded(a)},load_onError:function(a,
b){null!=b&&""!=b?this.promise.error('Error loading asset "'+a+'": '+K.string(b)):this.promise.error('Error loading asset "'+a+'"')},load_onProgress:function(a,b,c){if(0<b){var d=this.sizes;d=null!=q[a]?d.getReserved(a):d.h[a];0<c?(b/=c,1<b&&(b=1),b=Math.floor(b*d)):b>d&&(b=d);c=this.bytesLoadedCache;(null!=q[a]?c.existsReserved(a):c.h.hasOwnProperty(a))?(c=this.bytesLoadedCache,c=null!=q[a]?c.getReserved(a):c.h[a],b!=c&&(this.bytesLoaded+=b-c)):this.bytesLoaded+=b;c=this.bytesLoadedCache;null!=q[a]?
c.setReserved(a,b):c.h[a]=b;this.promise.progress(this.bytesLoaded,this.bytesTotal)}},__class__:bc};var rd=function(){this.assets=[];this.libraryArgs=[];this.version=2};h["lime.utils.AssetManifest"]=rd;rd.__name__="lime.utils.AssetManifest";rd.fromBytes=function(a,b){return null!=a?rd.parse(a.getString(0,a.length),b):null};rd.fromFile=function(a,b){a=rd.__resolvePath(a);b=rd.__resolveRootPath(b,a);return null==a?null:rd.fromBytes(Kc.fromFile(a),b)};rd.loadFromBytes=function(a,b){return xb.withValue(rd.fromBytes(a,
b))};rd.loadFromFile=function(a,b){a=rd.__resolvePath(a);b=rd.__resolveRootPath(b,a);return null==a?null:Kc.loadFromFile(a).then(function(a){return xb.withValue(rd.fromBytes(a,b))})};rd.parse=function(a,b){if(null==a||""==a)return null;a=JSON.parse(a);var c=new rd;Object.prototype.hasOwnProperty.call(a,"name")&&(c.name=a.name);Object.prototype.hasOwnProperty.call(a,"libraryType")&&(c.libraryType=a.libraryType);Object.prototype.hasOwnProperty.call(a,"libraryArgs")&&(c.libraryArgs=a.libraryArgs);if(Object.prototype.hasOwnProperty.call(a,
"assets")){var d=a.assets;Object.prototype.hasOwnProperty.call(a,"version")&&2>=a.version?c.assets=af.run(d):c.assets=d}Object.prototype.hasOwnProperty.call(a,"rootPath")&&(c.rootPath=a.rootPath);null!=b&&""!=b&&(c.rootPath=null==c.rootPath||""==c.rootPath?b:b+"/"+c.rootPath);return c};rd.__resolvePath=function(a){if(null==a)return null;var b=a.indexOf("?");var c=-1<b?B.substr(a,0,b):a;for(c=ba.replace(c,"\\","/");ba.endsWith(c,"/");)c=B.substr(c,0,c.length-1);return ba.endsWith(c,".bundle")?-1<b?
c+"/library.json"+B.substr(a,b,null):c+"/library.json":a};rd.__resolveRootPath=function(a,b){if(null!=a)return a;a=b.indexOf("?");a=-1<a?B.substr(b,0,a):b;for(a=ba.replace(a,"\\","/");ba.endsWith(a,"/");){if("/"==a)return a;a=B.substr(a,0,a.length-1)}return ba.endsWith(a,".bundle")?a:hi.directory(a)};rd.prototype={assets:null,libraryArgs:null,libraryType:null,name:null,rootPath:null,version:null,serialize:function(){var a={};a.version=this.version;a.libraryType=this.libraryType;a.libraryArgs=this.libraryArgs;
a.name=this.name;a.assets=Id.run(this.assets);a.rootPath=this.rootPath;return JSON.stringify(a)},__class__:rd};var ta=function(){};h["lime.utils.Assets"]=ta;ta.__name__="lime.utils.Assets";ta.exists=function(a,b){null==b&&(b="BINARY");var c=a.indexOf(":"),d=a.substring(0,c);a=a.substring(c+1);d=ta.getLibrary(d);return null!=d?d.exists(a,b):!1};ta.getAsset=function(a,b,c){if(c&&ta.cache.enabled)switch(b){case "BINARY":case "TEXT":c=!1;break;case "FONT":var d=ta.cache.font;d=null!=q[a]?d.getReserved(a):
d.h[a];if(null!=d)return d;break;case "IMAGE":d=ta.cache.image;d=null!=q[a]?d.getReserved(a):d.h[a];if(ta.isValidImage(d))return d;break;case "MUSIC":case "SOUND":d=ta.cache.audio;d=null!=q[a]?d.getReserved(a):d.h[a];if(ta.isValidAudio(d))return d;break;case "TEMPLATE":throw new E("Not sure how to get template: "+a);default:return null}var e=a.indexOf(":");d=a.substring(0,e);e=a.substring(e+1);var f=ta.getLibrary(d);if(null!=f)if(f.exists(e,b)){if(f.isLocal(e,b))return d=f.getAsset(e,b),c&&ta.cache.enabled&&
ta.cache.set(a,b,d),d;Ta.error(b+' asset "'+a+'" exists, but only asynchronously',{fileName:"lime/utils/Assets.hx",lineNumber:133,className:"lime.utils.Assets",methodName:"getAsset"})}else Ta.error("There is no "+b+' asset with an ID of "'+a+'"',{fileName:"lime/utils/Assets.hx",lineNumber:138,className:"lime.utils.Assets",methodName:"getAsset"});else Ta.error(ta.__libraryNotFound(d),{fileName:"lime/utils/Assets.hx",lineNumber:143,className:"lime.utils.Assets",methodName:"getAsset"});return null};
ta.getAudioBuffer=function(a,b){null==b&&(b=!0);return ta.getAsset(a,"SOUND",b)};ta.getBytes=function(a){return ta.getAsset(a,"BINARY",!1)};ta.getFont=function(a,b){null==b&&(b=!0);return ta.getAsset(a,"FONT",b)};ta.getImage=function(a,b){null==b&&(b=!0);return ta.getAsset(a,"IMAGE",b)};ta.getLibrary=function(a){if(null==a||""==a)a="default";var b=ta.libraries;return null!=q[a]?b.getReserved(a):b.h[a]};ta.getPath=function(a){var b=a.indexOf(":"),c=a.substring(0,b);b=a.substring(b+1);var d=ta.getLibrary(c);
if(null!=d){if(d.exists(b,null))return d.getPath(b);Ta.error('There is no asset with an ID of "'+a+'"',{fileName:"lime/utils/Assets.hx",lineNumber:224,className:"lime.utils.Assets",methodName:"getPath"})}else Ta.error(ta.__libraryNotFound(c),{fileName:"lime/utils/Assets.hx",lineNumber:229,className:"lime.utils.Assets",methodName:"getPath"});return null};ta.getText=function(a){return ta.getAsset(a,"TEXT",!1)};ta.hasLibrary=function(a){if(null==a||""==a)a="default";var b=ta.libraries;return null!=q[a]?
b.existsReserved(a):b.h.hasOwnProperty(a)};ta.isLocal=function(a,b,c){null==c&&(c=!0);if(c&&ta.cache.enabled&&ta.cache.exists(a,b))return!0;var d=a.indexOf(":");c=a.substring(0,d);a=a.substring(d+1);c=ta.getLibrary(c);return null!=c?c.isLocal(a,b):!1};ta.isValidAudio=function(a){return null!=a};ta.isValidImage=function(a){return null!=a?null!=a.buffer:!1};ta.list=function(a){var b=[],c=ta.libraries;for(c=new Pe(c,c.arrayKeys());c.hasNext();){var d=c.next().list(a);null!=d&&(b=b.concat(d))}return b};
ta.loadAsset=function(a,b,c){if(c&&ta.cache.enabled)switch(b){case "BINARY":case "TEXT":c=!1;break;case "FONT":var d=ta.cache.font;d=null!=q[a]?d.getReserved(a):d.h[a];if(null!=d)return xb.withValue(d);break;case "IMAGE":d=ta.cache.image;d=null!=q[a]?d.getReserved(a):d.h[a];if(ta.isValidImage(d))return xb.withValue(d);break;case "MUSIC":case "SOUND":d=ta.cache.audio;d=null!=q[a]?d.getReserved(a):d.h[a];if(ta.isValidAudio(d))return xb.withValue(d);break;case "TEMPLATE":throw new E("Not sure how to get template: "+
a);default:return null}var e=a.indexOf(":");d=a.substring(0,e);e=a.substring(e+1);var f=ta.getLibrary(d);if(null!=f){if(f.exists(e,b)){d=f.loadAsset(e,b);if(c&&ta.cache.enabled)d.onComplete(function(c){ta.cache.set(a,b,c)});return d}return xb.withError("There is no "+b+' asset with an ID of "'+a+'"')}return xb.withError(ta.__libraryNotFound(d))};ta.loadAudioBuffer=function(a,b){null==b&&(b=!0);return ta.loadAsset(a,"SOUND",b)};ta.loadBytes=function(a){return ta.loadAsset(a,"BINARY",!1)};ta.loadFont=
function(a,b){null==b&&(b=!0);return ta.loadAsset(a,"FONT",b)};ta.loadImage=function(a,b){null==b&&(b=!0);return ta.loadAsset(a,"IMAGE",b)};ta.loadLibrary=function(a){var b=new Jd,c=ta.getLibrary(a);if(null!=c)return c.load();c=a;var d=null;d=ta.bundlePaths;(null!=q[a]?d.existsReserved(a):d.h.hasOwnProperty(a))?(c=ta.bundlePaths,ug.loadFromFile(null!=q[a]?c.getReserved(a):c.h[a]).onComplete(function(c){if(null==c)b.error('Cannot load bundle for library "'+a+'"');else if(c=bc.fromBundle(c),null==c)b.error('Cannot open library "'+
a+'"');else{var d=ta.libraries;null!=q[a]?d.setReserved(a,c):d.h[a]=c;c.onChange.add((x=ta.onChange,v(x,x.dispatch)));c=c.load();b.completeWith(c)}}).onError(function(c){b.error('There is no asset library with an ID of "'+a+'"')})):(d=ta.libraryPaths,(null!=q[a]?d.existsReserved(a):d.h.hasOwnProperty(a))?(c=ta.libraryPaths,c=null!=q[a]?c.getReserved(a):c.h[a],d=hi.directory(c)):(ba.endsWith(c,".bundle")?(d=c,c+="/library.json"):d=hi.directory(c),c=ta.__cacheBreak(c)),rd.loadFromFile(c,d).onComplete(function(c){if(null==
c)b.error('Cannot parse asset manifest for library "'+a+'"');else if(c=bc.fromManifest(c),null==c)b.error('Cannot open library "'+a+'"');else{var d=ta.libraries;null!=q[a]?d.setReserved(a,c):d.h[a]=c;c.onChange.add((x=ta.onChange,v(x,x.dispatch)));c=c.load();b.completeWith(c)}}).onError(function(c){b.error('There is no asset library with an ID of "'+a+'"')}));return b.future};ta.loadText=function(a){return ta.loadAsset(a,"TEXT",!1)};ta.registerLibrary=function(a,b){var c=ta.libraries;if(null!=q[a]?
c.existsReserved(a):c.h.hasOwnProperty(a)){c=ta.libraries;if((null!=q[a]?c.getReserved(a):c.h[a])==b)return;ta.unloadLibrary(a)}null!=b&&b.onChange.add(ta.library_onChange);c=ta.libraries;null!=q[a]?c.setReserved(a,b):c.h[a]=b};ta.unloadLibrary=function(a){var b=ta.libraries;b=null!=q[a]?b.getReserved(a):b.h[a];null!=b&&(ta.cache.clear(a+":"),b.onChange.remove(ta.library_onChange),b.unload());ta.libraries.remove(a)};ta.__cacheBreak=function(a){0<ta.cache.version&&(a=-1<a.indexOf("?")?a+("&"+ta.cache.version):
a+("?"+ta.cache.version));return a};ta.__libraryNotFound=function(a){if(null==a||""==a)a="default";return null==bf.current||null==bf.current.__preloader||bf.current.__preloader.complete?'There is no asset library named "'+a+'"':'There is no asset library named "'+a+'", or it is not yet preloaded'};ta.library_onChange=function(){ta.cache.clear();ta.onChange.dispatch()};var Dt=function(a){var b=a.indexOf(":");this.libraryName=a.substring(0,b);this.symbolName=a.substring(b+1);this.library=ta.getLibrary(this.libraryName)};
h["lime.utils._Assets.LibrarySymbol"]=Dt;Dt.__name__="lime.utils._Assets.LibrarySymbol";Dt.prototype={library:null,libraryName:null,symbolName:null,isLocal:function(a){return this.library.isLocal(this.symbolName,a)},exists:function(a){return this.library.exists(this.symbolName,a)},__class__:Dt};var xe={};h["lime.utils._BytePointer.BytePointer_Impl_"]=xe;xe.__name__="lime.utils._BytePointer.BytePointer_Impl_";xe._new=function(a,b){null==b&&(b=0);return new vg(a,b)};xe.set=function(a,b,c,d,e){null!=
d&&(b=hb.ofData(d));null!=b||null==c?(a.bytes=b,a.offset=null!=e?e:0):(a.bytes=hb.ofData(c.buffer),a.offset=null!=e?c.byteOffset+e:c.byteOffset)};xe.__arrayGet=function(a,b){return null!=a.bytes?a.bytes.b[b+a.offset]:0};xe.__arraySet=function(a,b,c){null==a.bytes&&(a.bytes.b[b+a.offset]=c&255);return c};xe.fromArrayBufferView=function(a){return null==a?null:new vg(hb.ofData(a.buffer),a.byteOffset)};xe.fromArrayBuffer=function(a){return null==a?null:new vg(hb.ofData(a),0)};xe.fromBytes=function(a){return new vg(a,
0)};xe.fromBytesData=function(a){return null==a?new vg(null,0):new vg(hb.ofData(a),0)};xe.fromFile=function(a){return new vg(Kc.fromFile(a),0)};xe.fromLimeBytes=function(a){return new vg(a,0)};xe.toUInt8Array=function(a){var b=a.bytes.b.bufferValue;a=a.offset/8|0;null==a&&(a=0);return null!=b?new Uint8Array(b,a):null};xe.toUInt8ClampedArray=function(a){if(null==a||null==a.bytes)return null;var b=a.bytes.b.bufferValue;a=a.offset/8|0;null==a&&(a=0);return null!=b?new Uint8ClampedArray(b,a):null};xe.toInt8Array=
function(a){if(null==a||null==a.bytes)return null;var b=a.bytes.b.bufferValue;a=a.offset/8|0;null==a&&(a=0);return null!=b?new Int8Array(b,a):null};xe.toUInt16Array=function(a){if(null==a||null==a.bytes)return null;var b=a.bytes.b.bufferValue;a=a.offset/16|0;null==a&&(a=0);return null!=b?new Uint16Array(b,a):null};xe.toInt16Array=function(a){if(null==a||null==a.bytes)return null;var b=a.bytes.b.bufferValue;a=a.offset/16|0;null==a&&(a=0);return null!=b?new Int16Array(b,a):null};xe.toUInt32Array=function(a){if(null==
a||null==a.bytes)return null;var b=a.bytes.b.bufferValue;a=a.offset/32|0;null==a&&(a=0);return null!=b?new Uint32Array(b,a):null};xe.toInt32Array=function(a){if(null==a||null==a.bytes)return null;var b=a.bytes.b.bufferValue;a=a.offset/32|0;null==a&&(a=0);return null!=b?new Int32Array(b,a):null};xe.toFloat32Array=function(a){if(null==a||null==a.bytes)return null;var b=a.bytes.b.bufferValue;a=a.offset/32|0;null==a&&(a=0);return null!=b?new Float32Array(b,a):null};xe.toFloat64Array=function(a){if(null==
a||null==a.bytes)return null;var b=a.bytes.b.bufferValue;a=a.offset/64|0;null==a&&(a=0);return null!=b?new Float64Array(b,a):null};var vg=function(a,b){this.bytes=a;this.offset=b};h["lime.utils.BytePointerData"]=vg;vg.__name__="lime.utils.BytePointerData";vg.prototype={bytes:null,offset:null,__class__:vg};var Kc={};h["lime.utils._Bytes.Bytes_Impl_"]=Kc;Kc.__name__="lime.utils._Bytes.Bytes_Impl_";Kc._new=function(a,b){return new hb(b)};Kc.alloc=function(a){return new hb(new ArrayBuffer(a))};Kc.compress=
function(a,b){switch(b._hx_index){case 0:return Zn.compress(a);case 1:return $n.compress(a);case 2:return bo.compress(a);case 3:return co.compress(a)}};Kc.decompress=function(a,b){switch(b._hx_index){case 0:return Zn.decompress(a);case 1:return $n.decompress(a);case 2:return bo.decompress(a);case 3:return co.decompress(a)}};Kc.fastGet=function(a,b){return a.bytes[b]};Kc.fromBytes=function(a){return null==a?null:Kc._new(a.length,a.b.bufferValue)};Kc.fromFile=function(a){return null};Kc.loadFromBytes=
function(a){return xb.withValue(Kc.fromBytes(a))};Kc.loadFromFile=function(a){return(new no).load(a)};Kc.ofData=function(a){a=hb.ofData(a);return Kc._new(a.length,a.b.bufferValue)};Kc.ofString=function(a){a=hb.ofString(a);return Kc._new(a.length,a.b.bufferValue)};var ml=C["lime.utils.CompressionAlgorithm"]={__ename__:"lime.utils.CompressionAlgorithm",__constructs__:["DEFLATE","GZIP","LZMA","ZLIB"],DEFLATE:{_hx_index:0,__enum__:"lime.utils.CompressionAlgorithm",toString:u},GZIP:{_hx_index:1,__enum__:"lime.utils.CompressionAlgorithm",
toString:u},LZMA:{_hx_index:2,__enum__:"lime.utils.CompressionAlgorithm",toString:u},ZLIB:{_hx_index:3,__enum__:"lime.utils.CompressionAlgorithm",toString:u}},oc={};h["lime.utils._DataPointer.DataPointer_Impl_"]=oc;oc.__name__="lime.utils._DataPointer.DataPointer_Impl_";oc._new=function(a){return a};oc.fromFloat=function(a){return a};oc.fromBytesPointer=function(a){return oc.fromFloat(0)};oc.fromArrayBufferView=function(a){return oc.fromFloat(0)};oc.fromArrayBuffer=function(a){return oc.fromFloat(0)};
oc.fromBytes=function(a){return oc.fromFloat(0)};oc.fromBytesData=function(a){return oc.fromFloat(0)};oc.fromLimeBytes=function(a){return oc.fromBytes(a)};oc.fromCFFIPointer=function(a){return oc.fromFloat(0)};oc.fromFile=function(a){return oc.fromFloat(0)};oc.__withOffset=function(a,b){return oc.fromFloat(0)};oc.equals=function(a,b){return a==b};oc.equalsPointer=function(a,b){return a==b};oc.greaterThan=function(a,b){return a>b};oc.greaterThanPointer=function(a,b){return jc.get(a)>jc.get(b)};oc.greaterThanOrEqual=
function(a,b){return a>=b};oc.greaterThanOrEqualPointer=function(a,b){return jc.get(a)>=jc.get(b)};oc.lessThan=function(a,b){return a<b};oc.lessThanPointer=function(a,b){return jc.get(a)<jc.get(b)};oc.lessThanOrEqual=function(a,b){return a<=b};oc.lessThanOrEqualPointer=function(a,b){return jc.get(a)<=jc.get(b)};oc.notEquals=function(a,b){return a!=b};oc.notEqualsPointer=function(a,b){return a!=b};oc.plus=function(a,b){return oc.__withOffset(a,b)};oc.plusPointer=function(a,b){return oc.__withOffset(a,
b|0)};oc.minus=function(a,b){return oc.__withOffset(a,-b)};oc.minusPointer=function(a,b){return oc.__withOffset(a,-(b|0))};var qo={};h["lime.utils._Float32Array.Float32Array_Impl_"]=qo;qo.__name__="lime.utils._Float32Array.Float32Array_Impl_";qo.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)};qo.toBytes=function(a){return new hb(new Uint8Array(a.buffer))};qo.toString=function(a){return null!=
a?"Float32Array [byteLength:"+a.byteLength+", length:"+a.length+"]":null};var ro={};h["lime.utils._Float64Array.Float64Array_Impl_"]=ro;ro.__name__="lime.utils._Float64Array.Float64Array_Impl_";ro.fromBytes=function(a,b,c){null==b&&(b=0);return null==b?new Float64Array(a.b.bufferValue):null==c?new Float64Array(a.b.bufferValue,b):new Float64Array(a.b.bufferValue,b,c)};ro.toBytes=function(a){return new hb(new Uint8Array(a.buffer))};ro.toString=function(a){return null!=a?"Float64Array [byteLength:"+
a.byteLength+", length:"+a.length+"]":null};var so={};h["lime.utils._Int16Array.Int16Array_Impl_"]=so;so.__name__="lime.utils._Int16Array.Int16Array_Impl_";so.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)};so.toBytes=function(a){return new hb(new Uint8Array(a.buffer))};so.toString=function(a){return null!=a?"Int16Array [byteLength:"+a.byteLength+", length:"+a.length+"]":null};var to=
{};h["lime.utils._Int32Array.Int32Array_Impl_"]=to;to.__name__="lime.utils._Int32Array.Int32Array_Impl_";to.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)};to.toBytes=function(a){return new hb(new Uint8Array(a.buffer))};to.toString=function(a){return null!=a?"Int32Array [byteLength:"+a.byteLength+", length:"+a.length+"]":null};var uo={};h["lime.utils._Int8Array.Int8Array_Impl_"]=
uo;uo.__name__="lime.utils._Int8Array.Int8Array_Impl_";uo.fromBytes=function(a,b,c){null==b&&(b=0);return new Int8Array(a.b.bufferValue,b,c)};uo.toBytes=function(a){return new hb(new Uint8Array(a.buffer))};uo.toString=function(a){return null!=a?"Int8Array [byteLength:"+a.byteLength+", length:"+a.length+"]":null};var Ta=function(){};h["lime.utils.Log"]=Ta;Ta.__name__="lime.utils.Log";Ta.debug=function(a,b){4<=Ta.level&&console.debug("["+b.className+"] "+K.string(a))};Ta.error=function(a,b){if(1<=Ta.level){a=
"["+b.className+"] ERROR: "+K.string(a);if(Ta.throwErrors)throw new E(a);console.error(a)}};Ta.info=function(a,b){3<=Ta.level&&console.info("["+b.className+"] "+K.string(a))};Ta.print=function(a){console.log(a)};Ta.println=function(a){console.log(a)};Ta.verbose=function(a,b){5<=Ta.level&&console.log("["+b.className+"] "+K.string(a))};Ta.warn=function(a,b){2<=Ta.level&&console.warn("["+b.className+"] WARNING: "+K.string(a))};var dh={};h["lime.utils._LogLevel.LogLevel_Impl_"]=dh;dh.__name__="lime.utils._LogLevel.LogLevel_Impl_";
dh.gt=function(a,b){return a>b};dh.gte=function(a,b){return a>=b};dh.lt=function(a,b){return a<b};dh.lte=function(a,b){return a<=b};var Hq=function(){this.bytesTotalCache=new ua;this.bytesLoadedCache2=new ua;this.bytesLoadedCache=new Aa;this.onProgress=new eo;this.onComplete=new me;this.bytesTotal=this.bytesLoaded=0;this.libraries=[];this.libraryNames=[];this.onProgress.add(v(this,this.update))};h["lime.utils.Preloader"]=Hq;Hq.__name__="lime.utils.Preloader";Hq.prototype={complete:null,onComplete:null,
onProgress:null,bytesLoaded:null,bytesLoadedCache:null,bytesLoadedCache2:null,bytesTotal:null,bytesTotalCache:null,initLibraryNames:null,libraries:null,libraryNames:null,loadedLibraries:null,loadedStage:null,preloadComplete:null,preloadStarted:null,simulateProgress:null,addLibrary:function(a){this.libraries.push(a)},addLibraryName:function(a){-1==this.libraryNames.indexOf(a)&&this.libraryNames.push(a)},load:function(){for(var a=this,b=0,c=this.libraries;b<c.length;){var d=c[b];++b;this.bytesTotal+=
d.bytesTotal}this.loadedLibraries=-1;this.preloadStarted=!1;b=0;for(c=this.libraries;b<c.length;)d=[c[b]],++b,Ta.verbose("Preloading asset library",{fileName:"lime/utils/Preloader.hx",lineNumber:132,className:"lime.utils.Preloader",methodName:"load"}),d[0].load().onProgress(function(b){return function(c,d){a.bytesLoaded=null==a.bytesLoadedCache.h.__keys__[b[0].__id__]?a.bytesLoaded+c:a.bytesLoaded+(c-a.bytesLoadedCache.h[b[0].__id__]);a.bytesLoadedCache.set(b[0],c);a.simulateProgress||a.onProgress.dispatch(a.bytesLoaded,
a.bytesTotal)}}(d)).onComplete(function(b){return function(c){a.bytesLoaded=null==a.bytesLoadedCache.h.__keys__[b[0].__id__]?a.bytesLoaded+b[0].bytesTotal:a.bytesLoaded+(b[0].bytesTotal-a.bytesLoadedCache.h[b[0].__id__]);a.loadedAssetLibrary()}}(d)).onError(function(){return function(a){Ta.error(a,{fileName:"lime/utils/Preloader.hx",lineNumber:168,className:"lime.utils.Preloader",methodName:"load"})}}());b=0;for(c=this.libraryNames;b<c.length;)++b,this.bytesTotal+=200;this.loadedLibraries++;this.preloadStarted=
!0;this.updateProgress()},loadedAssetLibrary:function(a){this.loadedLibraries++;var b=this.loadedLibraries;this.preloadStarted||++b;var c=this.libraries.length+this.libraryNames.length;null!=a?Ta.verbose("Loaded asset library: "+a+" ["+b+"/"+c+"]",{fileName:"lime/utils/Preloader.hx",lineNumber:195,className:"lime.utils.Preloader",methodName:"loadedAssetLibrary"}):Ta.verbose("Loaded asset library ["+b+"/"+c+"]",{fileName:"lime/utils/Preloader.hx",lineNumber:199,className:"lime.utils.Preloader",methodName:"loadedAssetLibrary"});
this.updateProgress()},start:function(){this.complete||this.simulateProgress||!this.preloadComplete||(this.complete=!0,this.onComplete.dispatch())},update:function(a,b){},updateProgress:function(){var a=this;this.simulateProgress||this.onProgress.dispatch(this.bytesLoaded,this.bytesTotal);if(this.loadedLibraries==this.libraries.length&&!this.initLibraryNames){this.initLibraryNames=!0;for(var b=0,c=this.libraryNames;b<c.length;){var d=[c[b]];++b;Ta.verbose("Preloading asset library: "+d[0],{fileName:"lime/utils/Preloader.hx",
lineNumber:236,className:"lime.utils.Preloader",methodName:"updateProgress"});ta.loadLibrary(d[0]).onProgress(function(b){return function(c,d){if(0<d){var e=a.bytesTotalCache;(null!=q[b[0]]?e.existsReserved(b[0]):e.h.hasOwnProperty(b[0]))||(e=a.bytesTotalCache,null!=q[b[0]]?e.setReserved(b[0],d):e.h[b[0]]=d,a.bytesTotal+=d-200);c>d&&(c=d);d=a.bytesLoadedCache2;(null!=q[b[0]]?d.existsReserved(b[0]):d.h.hasOwnProperty(b[0]))?(d=a.bytesLoadedCache2,a.bytesLoaded+=c-(null!=q[b[0]]?d.getReserved(b[0]):
d.h[b[0]])):a.bytesLoaded+=c;d=a.bytesLoadedCache2;null!=q[b[0]]?d.setReserved(b[0],c):d.h[b[0]]=c;a.simulateProgress||a.onProgress.dispatch(a.bytesLoaded,a.bytesTotal)}}}(d)).onComplete(function(b){return function(c){c=200;var d=a.bytesTotalCache;if(null!=q[b[0]]?d.existsReserved(b[0]):d.h.hasOwnProperty(b[0]))c=a.bytesTotalCache,c=null!=q[b[0]]?c.getReserved(b[0]):c.h[b[0]];d=a.bytesLoadedCache2;(null!=q[b[0]]?d.existsReserved(b[0]):d.h.hasOwnProperty(b[0]))?(d=a.bytesLoadedCache2,a.bytesLoaded+=
c-(null!=q[b[0]]?d.getReserved(b[0]):d.h[b[0]])):a.bytesLoaded+=c;a.loadedAssetLibrary(b[0])}}(d)).onError(function(){return function(a){Ta.error(a,{fileName:"lime/utils/Preloader.hx",lineNumber:290,className:"lime.utils.Preloader",methodName:"updateProgress"})}}())}}this.simulateProgress||this.loadedLibraries!=this.libraries.length+this.libraryNames.length||(this.preloadComplete||(this.preloadComplete=!0,Ta.verbose("Preload complete",{fileName:"lime/utils/Preloader.hx",lineNumber:301,className:"lime.utils.Preloader",
methodName:"updateProgress"})),this.start())},__class__:Hq};var vo={};h["lime.utils._UInt16Array.UInt16Array_Impl_"]=vo;vo.__name__="lime.utils._UInt16Array.UInt16Array_Impl_";vo.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)};vo.toBytes=function(a){return new hb(new Uint8Array(a.buffer))};vo.toString=function(a){return null!=a?"UInt16Array [byteLength:"+a.byteLength+", length:"+
a.length+"]":null};var wo={};h["lime.utils._UInt32Array.UInt32Array_Impl_"]=wo;wo.__name__="lime.utils._UInt32Array.UInt32Array_Impl_";wo.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)};wo.toBytes=function(a){return new hb(new Uint8Array(a.buffer))};wo.toString=function(a){return null!=a?"UInt32Array [byteLength:"+a.byteLength+", length:"+a.length+"]":null};var xo={};h["lime.utils._UInt8Array.UInt8Array_Impl_"]=
xo;xo.__name__="lime.utils._UInt8Array.UInt8Array_Impl_";xo.fromBytes=function(a,b,c){return null==b?new Uint8Array(a.b.bufferValue):null==c?new Uint8Array(a.b.bufferValue,b):new Uint8Array(a.b.bufferValue,b,c)};xo.toBytes=function(a){return new hb(new Uint8Array(a.buffer))};xo.toString=function(a){return null!=a?"UInt8Array [byteLength:"+a.byteLength+", length:"+a.length+"]":null};var nl={};h["lime.utils._UInt8ClampedArray.UInt8ClampedArray_Impl_"]=nl;nl.__name__="lime.utils._UInt8ClampedArray.UInt8ClampedArray_Impl_";
nl.fromBytes=function(a,b,c){null==b&&(b=0);return null==b?new Uint8ClampedArray(a.b.bufferValue):null==c?new Uint8ClampedArray(a.b.bufferValue,b):new Uint8ClampedArray(a.b.bufferValue,b,c)};nl.toBytes=function(a){return new hb(new Uint8Array(a.buffer))};nl.toString=function(a){return null!=a?"UInt8ClampedArray [byteLength:"+a.byteLength+", length:"+a.length+"]":null};nl._clamp=function(a){a|=0;a=255<a?255:a;return 0>a?0:a};var vj=function(a,b,c){this.name=a;this.type=b;this.address=c};h["mbs.core.MbsField"]=
vj;vj.__name__="mbs.core.MbsField";vj.prototype={name:null,type:null,address:null,getName:function(){return this.name},getType:function(){return this.type},getAddress:function(){return this.address},__class__:vj};var yo=function(a,b,c){vj.call(this,a,null,c);this.typeName=b};h["mbs.core.reflect.SubstituteField"]=yo;yo.__name__="mbs.core.reflect.SubstituteField";yo.__super__=vj;yo.prototype=w(vj.prototype,{typeName:null,toString:function(){return"MbsField [name="+this.getName()+", typeName="+this.typeName+
", address="+this.address+"]"},__class__:yo});var Lj=function(a,b,c,d){Ib.call(this,a);this.parentName=b;this.fields=c.slice(0);this.size=d};h["mbs.core.reflect.SubstituteType"]=Lj;Lj.__name__="mbs.core.reflect.SubstituteType";Lj.__super__=Ib;Lj.prototype=w(Ib.prototype,{parentName:null,mapTypes:function(a){var b=this.parentName;this.parent=null!=q[b]?a.getReserved(b):a.h[b];if(null!=this.fields){b=0;for(var c=this.fields.length;b<c;){var d=b++;d=this.fields[d];var e=d.typeName;d.type=null!=q[e]?
a.getReserved(e):a.h[e]}}},__class__:Lj});var Ee=function(){};h["mbs.io.MbsDynamicHelper"]=Ee;Ee.__name__="mbs.io.MbsDynamicHelper";Ee.writeDynamic=function(a,b,c){"boolean"==typeof c?(a.writeTypecode(b,M.BOOLEAN),a.writeBool(b+M.INTEGER.getSize(),c)):"number"==typeof c?(a.writeTypecode(b,M.FLOAT),a.writeFloat(b+M.INTEGER.getSize(),c)):"number"==typeof c&&(c|0)===c?(a.writeTypecode(b,M.INTEGER),a.writeInt(b+M.INTEGER.getSize(),c)):"string"==typeof c?(a.writeTypecode(b,M.STRING),a.writeString(b+M.INTEGER.getSize(),
c)):(a.writeTypecode(b,c.getMbsType()),a.writeInt(b+M.INTEGER.getSize(),c.getAddress()))};Ee.readDynamic=function(a,b){var c=a.readTypecode(b);if(c==M.BOOLEAN)return a.readBool(b+M.INTEGER.getSize());if(c==M.FLOAT)return a.readFloat(b+M.INTEGER.getSize());if(c==M.INTEGER)return a.readInt(b+M.INTEGER.getSize());if(c==M.STRING)return a.readString(b+M.INTEGER.getSize());if(c==M.LIST)return b=a.readInt(b+M.INTEGER.getSize()),0!=b?(c=a.readTypecode(b+M.INTEGER.getSize()),a=c==M.BOOLEAN?new ol(a):c==M.FLOAT?
new pl(a):c==M.INTEGER?new mg(a):c==M.STRING?new ql(a):c==M.DYNAMIC?new bi(a):new eb(a,c,c.createInstance(a)),a.setAddress(b),a):null;c=c.createInstance(a);c.setAddress(a.readInt(b+M.INTEGER.getSize()));return c};Ee.createObjectPool=function(a){return new Aa};Ee.readDynamicUsingPool=function(a,b,c){var d=a.readTypecode(b);if(d==M.BOOLEAN)return a.readBool(b+M.INTEGER.getSize());if(d==M.FLOAT)return a.readFloat(b+M.INTEGER.getSize());if(d==M.INTEGER)return a.readInt(b+M.INTEGER.getSize());if(d==M.STRING)return a.readString(b+
M.INTEGER.getSize());if(d==M.LIST)return b=a.readInt(b+M.INTEGER.getSize()),0!=b?(d=a.readTypecode(b+M.INTEGER.getSize()),a=d==M.BOOLEAN?new ol(a):d==M.FLOAT?new pl(a):d==M.INTEGER?new mg(a):d==M.STRING?new ql(a):d==M.DYNAMIC?new bi(a):new eb(a,d,d.createInstance(a)),a.setAddress(b),a):null;var e=c.h[d.__id__];null==e&&(e=d.createInstance(a),c.set(d,e));e.setAddress(a.readInt(b+M.INTEGER.getSize()));return e};var zo=function(){};h["mbs.io.MbsIO"]=zo;zo.__name__="mbs.io.MbsIO";zo.__isInterface__=!0;
zo.prototype={readBool:null,readFloat:null,readInt:null,readString:null,writeInt:null,writeBool:null,writeFloat:null,writeString:null,isReader:null,isWriter:null,allocate:null,writeTypecode:null,readTypecode:null,__class__:zo};var Je=function(a,b){this.data=a;null!=b&&(this.type=b,this.elementSize=b.getSize())};h["mbs.io.MbsListBase"]=Je;Je.__name__="mbs.io.MbsListBase";Je.__super__=ob;Je.prototype=w(ob.prototype,{type:null,elementAddress:null,elementSize:null,_length:null,setAddress:function(a){ob.prototype.setAddress.call(this,
a);this.data.isReader()&&(0!=a?(this._length=this.data.readInt(a),this.type=this.data.readTypecode(a+M.INTEGER.getSize()),this.elementSize=this.type.getSize(),this.elementAddress=a+2*M.INTEGER.getSize()):(this.type=null,this.elementAddress=this.elementSize=this._length=0))},allocateNew:function(a){if(this.data.isWriter())return this._length=a,this.address=this.data.allocate(2*M.INTEGER.getSize()+this.elementSize*a),this.data.writeInt(this.address,a),this.data.writeTypecode(this.address+M.INTEGER.getSize(),
this.type),this.elementAddress=this.address+2*M.INTEGER.getSize(),this.address;throw new E("Can't allocate new objects when reading");},length:function(){return this._length},__class__:Je});var eb=function(a,b,c){Je.call(this,a,b);this.obj=c};h["mbs.io.MbsList"]=eb;eb.__name__="mbs.io.MbsList";eb.__super__=Je;eb.prototype=w(Je.prototype,{obj:null,getNextObject:function(){this.obj.setAddress(this.elementAddress);this.elementAddress+=this.elementSize;return this.obj},__class__:eb});var ol=function(a){Je.call(this,
a,M.BOOLEAN)};h["mbs.io.MbsBoolList"]=ol;ol.__name__="mbs.io.MbsBoolList";ol.__super__=Je;ol.prototype=w(Je.prototype,{readBool:function(){var a=this.data.readBool(this.elementAddress);this.elementAddress+=this.elementSize;return a},writeBool:function(a){this.data.writeBool(this.elementAddress,a);this.elementAddress+=this.elementSize},__class__:ol});var pl=function(a){Je.call(this,a,M.FLOAT)};h["mbs.io.MbsFloatList"]=pl;pl.__name__="mbs.io.MbsFloatList";pl.__super__=Je;pl.prototype=w(Je.prototype,
{readFloat:function(){var a=this.data.readFloat(this.elementAddress);this.elementAddress+=this.elementSize;return a},writeFloat:function(a){this.data.writeFloat(this.elementAddress,a);this.elementAddress+=this.elementSize},__class__:pl});var mg=function(a){Je.call(this,a,M.INTEGER)};h["mbs.io.MbsIntList"]=mg;mg.__name__="mbs.io.MbsIntList";mg.__super__=Je;mg.prototype=w(Je.prototype,{readInt:function(){var a=this.data.readInt(this.elementAddress);this.elementAddress+=this.elementSize;return a},writeInt:function(a){this.data.writeInt(this.elementAddress,
a);this.elementAddress+=this.elementSize},__class__:mg});var ql=function(a){Je.call(this,a,M.STRING)};h["mbs.io.MbsStringList"]=ql;ql.__name__="mbs.io.MbsStringList";ql.__super__=Je;ql.prototype=w(Je.prototype,{readString:function(){var a=this.data.readString(this.elementAddress);this.elementAddress+=this.elementSize;return a},writeString:function(a){this.data.writeString(this.elementAddress,a);this.elementAddress+=this.elementSize},__class__:ql});var bi=function(a){Je.call(this,a,M.DYNAMIC)};h["mbs.io.MbsDynamicList"]=
bi;bi.__name__="mbs.io.MbsDynamicList";bi.__super__=Je;bi.prototype=w(Je.prototype,{readObject:function(){var a=Ee.readDynamic(this.data,this.elementAddress);this.elementAddress+=this.elementSize;return a},readObjectUsingPool:function(a){a=Ee.readDynamicUsingPool(this.data,this.elementAddress,a);this.elementAddress+=this.elementSize;return a},writeObject:function(a){Ee.writeDynamic(this.data,this.elementAddress,a);this.elementAddress+=this.elementSize},__class__:bi});var Zh=function(a,b,c){this.typedefSet=
a;this.readStoredTypeInformation=b;this.initStringList=c;this.header=new Fc(this);this.header.setAddress(0)};h["mbs.io.MbsReader"]=Zh;Zh.__name__="mbs.io.MbsReader";Zh.__interfaces__=[zo];Zh.prototype={data:null,stringTable:null,typeTable:null,rootAddress:null,subTypeMap:null,initStringList:null,stringTableAddress:null,readStoredTypeInformation:null,typedefSet:null,header:null,canRead:function(a){var b=null;if(null==a||a.length<this.header.getMbsType().getSize())b="Missing header";this.data=a;1!=
this.header.getVersion()&&(b="Mismatched version -- "+this.header.getVersion());this.header.getTypeTableHash()!=this.typedefSet.getHash()&&(b="Mismatched typetable");this.readStoredTypeInformation&&0==this.header.getTypeTablePointer()&&(b="Missing required type information");this.data=null;return b},readData:function(a){this.data=a;if(1!=this.header.getVersion())throw new E("Can't read mbs. Wrong version.");if(this.header.getTypeTableHash()!=this.typedefSet.getHash())throw new E("Can't read mbs. Wrong typedef info.");
var b=M.INTEGER.getSize();this.stringTableAddress=this.header.getStringTablePointer();this.stringTable=Array(this.readInt(this.stringTableAddress));if(this.initStringList){var c=this.stringTableAddress+b;for(var d=0,e=this.stringTable.length;d<e;){var f=d++,g=this.readInt(c),k=this.readInt(g);this.stringTable[f]=a.getString(g+4,k);c+=b}}if(this.readStoredTypeInformation){a=new gd(this);c=this.header.getTypeTablePointer();this.typeTable=Array(this.readInt(c));c+=b;this.subTypeMap=new ua;d=new ua;e=
M.BOOLEAN;f=e.getName();null!=q[f]?d.setReserved(f,e):d.h[f]=e;e=M.INTEGER;f=e.getName();null!=q[f]?d.setReserved(f,e):d.h[f]=e;e=M.FLOAT;f=e.getName();null!=q[f]?d.setReserved(f,e):d.h[f]=e;e=M.STRING;f=e.getName();null!=q[f]?d.setReserved(f,e):d.h[f]=e;e=M.DYNAMIC;f=e.getName();null!=q[f]?d.setReserved(f,e):d.h[f]=e;e=M.LIST;f=e.getName();null!=q[f]?d.setReserved(f,e):d.h[f]=e;e=0;for(f=this.typeTable.length;e<f;){k=e++;a.setAddress(this.readInt(c));c+=b;g=a.getName();var l=a.getParent(),m=a.getSize(),
p=null,n=a.getFieldsPointer();if(0!=n){var h=this.readInt(n);n+=b;p=Array(h);for(var t=new ud(this),r=0;r<h;){var u=r++;t.setAddress(n);n+=ud.MBS_FIELD_INFO.getSize();var x=t.getName(),v=t.getType(),w=t.getFieldAddress();p[u]=new yo(x,v,w)}}(null!=q[g]?d.existsReserved(g):d.h.hasOwnProperty(g))?this.typeTable[k]=null!=q[g]?d.getReserved(g):d.h[g]:this.typeTable[k]=new Lj(g,l,p,m);k=this.typeTable[k];l=this.subTypeMap;null!=q[g]?l.setReserved(g,k):l.h[g]=k}b=0;for(c=this.typeTable.length;b<c;)a=b++,
this.typeTable[a]instanceof Lj&&L.__cast(this.typeTable[a],Lj).mapTypes(this.subTypeMap)}else for(this.typeTable=Array(this.typedefSet.getTypes().length),b=0,c=this.typedefSet.getTypes();b<c.length;)a=c[b],++b,this.typeTable[this.typedefSet.getTypecode(a)]=a},reconfigureComposition:function(a){var b=this.subTypeMap,c=a.getName();if(null!=q[c]?b.existsReserved(c):b.h.hasOwnProperty(c)){b=this.subTypeMap;c=a.getName();var d=null!=q[c]?b.getReserved(c):b.h[c];b=new ua;c=0;for(d=d.getFields();c<d.length;){var e=
d[c];++c;var f=e.getName();null!=q[f]?b.setReserved(f,e):b.h[f]=e}c=0;for(a=a.getFields();c<a.length;)d=a[c],++c,e=d.getName(),d.address=(null!=q[e]?b.getReserved(e):b.h[e]).address}},getRoot:function(){return this.header.getRoot()},readInt:function(a){return this.data.b[a]<<24|this.data.b[a+1]<<16|this.data.b[a+2]<<8|this.data.b[a+3]},readBool:function(a){return 0!=this.data.b[a]},readFloat:function(a){return zd.i32ToFloat(this.readInt(a))},readString:function(a){if(this.initStringList)return this.stringTable[this.readInt(a)];
a=this.readInt(a);if(null==this.stringTable[a]){var b=this.readInt(this.stringTableAddress+M.INTEGER.getSize()*(a+1)),c=this.readInt(b);this.stringTable[a]=this.data.getString(b+4,c)}return this.stringTable[a]},readTypecode:function(a){return this.typeTable[this.readInt(a)]},getTypeTable:function(){return this.typeTable},writeInt:function(a,b){throw new E("Can't write on an MBS reader");},writeBool:function(a,b){throw new E("Can't write on an MBS reader");},writeFloat:function(a,b){throw new E("Can't write on an MBS reader");
},writeString:function(a,b){throw new E("Can't write on an MBS reader");},isReader:function(){return!0},isWriter:function(){return!1},allocate:function(a){throw new E("Can't allocate on an MBS reader");},writeTypecode:function(a,b){throw new E("Can't write on an MBS reader");},__class__:Zh};var $a=function(){};h["openfl.Lib"]=$a;$a.__name__="openfl.Lib";$a.__properties__={get_current:"get_current",get_application:"get_application"};$a.as=function(a,b){return L.__instanceof(a,b)?a:null};$a.attach=
function(a){return new ye};$a.clearInterval=function(a){$a.__timers.h.hasOwnProperty(a)&&($a.__timers.h[a].stop(),$a.__timers.remove(a))};$a.clearTimeout=function(a){$a.__timers.h.hasOwnProperty(a)&&($a.__timers.h[a].stop(),$a.__timers.remove(a))};$a.getDefinitionByName=function(a){return null==a?null:h[a]};$a.getQualifiedClassName=function(a){if(null==a)return null;var b=L.__instanceof(a,et)?a:L.getClass(a);return null==b?"boolean"==typeof a||a==sj?"Bool":"number"==typeof a&&(a|0)===a||a==Hg?"Int":
"number"==typeof a||a==rj?"Float":null:b.__name__};$a.getQualifiedSuperclassName=function(a){if(null==a)return null;a=L.__instanceof(a,et)?a:L.getClass(a);if(null==a)return null;a=a.__super__;return null==a?null:a.__name__};$a.getTimer=function(){return Ra.getTimer()};$a.getURL=function(a,b){$a.navigateToURL(a,b)};$a.navigateToURL=function(a,b){null==b&&(b="_blank");var c=a.url;if(rb.typeof(a.data)==Dd.TObject){for(var d="",e=X.fields(a.data),f=0;f<e.length;){var g=e[f];++f;0<d.length&&(d+="&");var k=
encodeURIComponent(g)+"=";g=K.string(X.field(a.data,g));d+=k+encodeURIComponent(g)}c=-1<c.indexOf("?")?c+("&"+d):c+("?"+d)}Ra.openURL(c,b)};$a.notImplemented=function(a){var b=a.className+"."+a.methodName,c=$a.__sentWarnings;(null!=q[b]?c.existsReserved(b):c.h.hasOwnProperty(b))||(c=$a.__sentWarnings,null!=q[b]?c.setReserved(b,!0):c.h[b]=!0,Ta.warn(a.methodName+" is not implemented",a))};$a.preventDefaultTouchMove=function(){window.document.addEventListener("touchmove",function(a){a.preventDefault()},
!1)};$a.sendToURL=function(a){(new Zg).load(a)};$a.setInterval=function(a,b,c){var d=++$a.__lastTimerID;b=new pf(b);$a.__timers.h[d]=b;b.run=function(){a.apply(a,null==c?[]:c)};return d};$a.setTimeout=function(a,b,c){var d=++$a.__lastTimerID,e=$a.__timers;b=pf.delay(function(){a.apply(a,null==c?[]:c)},b);e.h[d]=b;return d};$a.trace=function(a){th.trace(a,{fileName:"openfl/Lib.hx",lineNumber:575,className:"openfl.Lib",methodName:"trace"})};$a.get_application=function(){return Xc.application};$a.get_current=
function(){null==Xc.current&&(Xc.current=new ye);return Xc.current};var Fh=function(){};h["openfl._Vector.IVector"]=Fh;Fh.__name__="openfl._Vector.IVector";Fh.__isInterface__=!0;Fh.prototype={get_length:null,set_length:null,fixed:null,concat:null,copy:null,filter:null,get:null,indexOf:null,insertAt:null,iterator:null,join:null,lastIndexOf:null,pop:null,push:null,removeAt:null,reverse:null,set:null,shift:null,slice:null,sort:null,splice:null,toString:null,unshift:null,__class__:Fh,__properties__:{set_length:"set_length",
get_length:"get_length"}};var cg=function(a,b,c){null==b&&(b=!1);null==a&&(a=0);null==c&&(c=[]);this.__array=c;0<a&&this.set_length(a);this.fixed=b};h["openfl._Vector.BoolVector"]=cg;cg.__name__="openfl._Vector.BoolVector";cg.__interfaces__=[Fh];cg.prototype={fixed:null,__array:null,concat:function(a){return null==a?new cg(0,!1,this.__array.slice()):0<a.__array.length?new cg(0,!1,this.__array.concat(a.__array)):new cg(0,!1,this.__array.slice())},copy:function(){return new cg(0,this.fixed,this.__array.slice())},
filter:function(a){for(var b=this.fixed,c=[],d=0,e=this.__array;d<e.length;){var f=e[d];++d;a(f)&&c.push(f)}return new cg(0,b,c)},get:function(a){return a>=this.__array.length?!1:this.__array[a]},indexOf:function(a,b){null==b&&(b=0);for(var c=this.__array.length;b<c;){var d=b++;if(this.__array[d]==a)return d}return-1},insertAt:function(a,b){(!this.fixed||a<this.__array.length)&&this.__array.splice(a,0,b)},iterator:function(){return B.iter(this.__array)},join:function(a){null==a&&(a=",");return this.__array.join(a)},
lastIndexOf:function(a,b){for(b=null==b||b>=this.__array.length?this.__array.length-1:b;0<=b;){if(this.__array[b]==a)return b;--b}return-1},pop:function(){return this.fixed?null:this.__array.pop()},push:function(a){return this.fixed?this.__array.length:this.__array.push(a)},removeAt:function(a){return!this.fixed||a<this.__array.length?this.__array.splice(a,1)[0]:!1},reverse:function(){this.__array.reverse();return this},set:function(a,b){return!this.fixed||a<this.__array.length?this.__array[a]=b:
b},shift:function(){return this.fixed?null:this.__array.shift()},slice:function(a,b){null==a&&(a=0);null==b&&(b=16777215);return new cg(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new cg(0,!1,this.__array.splice(a,b))},toJSON:function(){return this.__array},toString:function(){return null!=this.__array?this.__array.toString():null},unshift:function(a){this.fixed||this.__array.unshift(a)},get_length:function(){return this.__array.length},set_length:function(a){if(!this.fixed){var b=
this.__array.length;0>a&&(a=0);if(a>b)for(;b<a;){var c=b++;this.__array[c]=!1}else for(;this.__array.length>a;)this.__array.pop()}return this.__array.length},__class__:cg,__properties__:{set_length:"set_length",get_length:"get_length"}};var eg=function(a,b,c,d){null==d&&(d=!1);null==b&&(b=!1);null==a&&(a=0);if(d){if(this.__array=[],null!=c){d=0;for(var e=c.length;d<e;){var f=d++;this.__array[f]=c[f]}}}else null==c&&(c=[]),this.__array=c;0<a&&this.set_length(a);this.fixed=b};h["openfl._Vector.FloatVector"]=
eg;eg.__name__="openfl._Vector.FloatVector";eg.__interfaces__=[Fh];eg.prototype={fixed:null,__array:null,concat:function(a){return null==a?new eg(0,!1,this.__array.slice()):0<a.__array.length?new eg(0,!1,this.__array.concat(a.__array)):new eg(0,!1,this.__array.slice())},copy:function(){return new eg(0,this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],d=0,e=this.__array;d<e.length;){var f=e[d];++d;a(f)&&c.push(f)}return new eg(0,b,c)},get:function(a){return this.__array[a]},
indexOf:function(a,b){null==b&&(b=0);for(var c=this.__array.length;b<c;){var d=b++;if(this.__array[d]==a)return d}return-1},insertAt:function(a,b){(!this.fixed||a<this.__array.length)&&this.__array.splice(a,0,b)},iterator:function(){return B.iter(this.__array)},join:function(a){null==a&&(a=",");return this.__array.join(a)},lastIndexOf:function(a,b){for(b=null==b||b>=this.__array.length?this.__array.length-1:b;0<=b;){if(this.__array[b]==a)return b;--b}return-1},pop:function(){return this.fixed?null:
this.__array.pop()},push:function(a){return this.fixed?this.__array.length:this.__array.push(a)},removeAt:function(a){return!this.fixed||a<this.__array.length?this.__array.splice(a,1)[0]:0},reverse:function(){this.__array.reverse();return this},set:function(a,b){return!this.fixed||a<this.__array.length?this.__array[a]=b:b},shift:function(){return this.fixed?null:this.__array.shift()},slice:function(a,b){null==a&&(a=0);null==b&&(b=16777215);return new eg(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},
splice:function(a,b){return new eg(0,!1,this.__array.splice(a,b))},toJSON:function(){return this.__array},toString:function(){return null!=this.__array?this.__array.toString():null},unshift:function(a){this.fixed||this.__array.unshift(a)},get_length:function(){return this.__array.length},set_length:function(a){if(a!=this.__array.length&&!this.fixed){var b=this.__array.length;0>a&&(a=0);if(a>b)for(;b<a;){var c=b++;this.__array[c]=0}else for(;this.__array.length>a;)this.__array.pop()}return this.__array.length},
__class__:eg,__properties__:{set_length:"set_length",get_length:"get_length"}};var fg=function(a,b,c){null==b&&(b=!1);null==a&&(a=0);null==c&&(c=[]);this.__array=c;0<a&&this.set_length(a);this.fixed=b};h["openfl._Vector.FunctionVector"]=fg;fg.__name__="openfl._Vector.FunctionVector";fg.__interfaces__=[Fh];fg.prototype={fixed:null,__array:null,concat:function(a){return null==a?new fg(0,!1,this.__array.slice()):0<a.__array.length?new fg(0,!1,this.__array.concat(a.__array)):new fg(0,!1,this.__array.slice())},
copy:function(){return new fg(0,this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],d=0,e=this.__array;d<e.length;){var f=e[d];++d;a(f)&&c.push(f)}return new fg(0,b,c)},get:function(a){return a>=this.__array.length?null:this.__array[a]},indexOf:function(a,b){null==b&&(b=0);for(var c=this.__array.length;b<c;){var d=b++;if(X.compareMethods(this.__array[d],a))return d}return-1},insertAt:function(a,b){(!this.fixed||a<this.__array.length)&&this.__array.splice(a,0,b)},iterator:function(){return B.iter(this.__array)},
join:function(a){null==a&&(a=",");return this.__array.join(a)},lastIndexOf:function(a,b){for(b=null==b||b>=this.__array.length?this.__array.length-1:b;0<=b;){if(X.compareMethods(this.__array[b],a))return b;--b}return-1},pop:function(){return this.fixed?null:this.__array.pop()},push:function(a){return this.fixed?this.__array.length:this.__array.push(a)},removeAt:function(a){return!this.fixed||a<this.__array.length?this.__array.splice(a,1)[0]:null},reverse:function(){this.__array.reverse();return this},
set:function(a,b){return!this.fixed||a<this.__array.length?this.__array[a]=b:b},shift:function(){return this.fixed?null:this.__array.shift()},slice:function(a,b){null==a&&(a=0);null==b&&(b=16777215);return new fg(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new fg(0,!1,this.__array.splice(a,b))},toJSON:function(){return this.__array},toString:function(){return null!=this.__array?this.__array.toString():null},unshift:function(a){this.fixed||this.__array.unshift(a)},
get_length:function(){return this.__array.length},set_length:function(a){if(!this.fixed){var b=this.__array.length;0>a&&(a=0);if(a>b)for(;b<a;){var c=b++;this.__array[c]=null}else for(;this.__array.length>a;)this.__array.pop()}return this.__array.length},__class__:fg,__properties__:{set_length:"set_length",get_length:"get_length"}};var dg=function(a,b,c){null==b&&(b=!1);null==a&&(a=0);null==c&&(c=[]);this.__array=c;0<a&&this.set_length(a);this.fixed=b};h["openfl._Vector.IntVector"]=dg;dg.__name__=
"openfl._Vector.IntVector";dg.__interfaces__=[Fh];dg.prototype={fixed:null,__array:null,concat:function(a){return null==a?new dg(0,!1,this.__array.slice()):0<a.__array.length?new dg(0,!1,this.__array.concat(a.__array)):new dg(0,!1,this.__array.slice())},copy:function(){return new dg(0,this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],d=0,e=this.__array;d<e.length;){var f=e[d];++d;a(f)&&c.push(f)}return new dg(0,b,c)},get:function(a){return this.__array[a]},indexOf:function(a,
b){null==b&&(b=0);for(var c=this.__array.length;b<c;){var d=b++;if(this.__array[d]==a)return d}return-1},insertAt:function(a,b){(!this.fixed||a<this.__array.length)&&this.__array.splice(a,0,b)},iterator:function(){return B.iter(this.__array)},join:function(a){null==a&&(a=",");return this.__array.join(a)},lastIndexOf:function(a,b){for(b=null==b||b>=this.__array.length?this.__array.length-1:b;0<=b;){if(this.__array[b]==a)return b;--b}return-1},pop:function(){return this.fixed?null:this.__array.pop()},
push:function(a){return this.fixed?this.__array.length:this.__array.push(a)},removeAt:function(a){return!this.fixed||a<this.__array.length?this.__array.splice(a,1)[0]:0},reverse:function(){this.__array.reverse();return this},set:function(a,b){return!this.fixed||a<this.__array.length?this.__array[a]=b:b},shift:function(){return this.fixed?null:this.__array.shift()},slice:function(a,b){null==a&&(a=0);null==b&&(b=16777215);return new dg(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},
splice:function(a,b){return new dg(0,!1,this.__array.splice(a,b))},toJSON:function(){return this.__array},toString:function(){return null!=this.__array?this.__array.toString():null},unshift:function(a){this.fixed||this.__array.unshift(a)},get_length:function(){return this.__array.length},set_length:function(a){if(!this.fixed){var b=this.__array.length;0>a&&(a=0);if(a>b)for(;b<a;){var c=b++;this.__array[c]=0}else for(;this.__array.length>a;)this.__array.pop()}return this.__array.length},__class__:dg,
__properties__:{set_length:"set_length",get_length:"get_length"}};var Pf=function(a,b,c,d){null==d&&(d=!1);null==b&&(b=!1);null==a&&(a=0);if(d){if(this.__array=[],null!=c){d=0;for(var e=c.length;d<e;){var f=d++;this.__array[f]=c[f]}}}else null==c&&(c=[]),this.__array=c;0<a&&this.set_length(a);this.fixed=b};h["openfl._Vector.ObjectVector"]=Pf;Pf.__name__="openfl._Vector.ObjectVector";Pf.__interfaces__=[Fh];Pf.prototype={fixed:null,__array:null,concat:function(a){return null==a?new Pf(0,!1,this.__array.slice()):
0<a.__array.length?new Pf(0,!1,this.__array.concat(a.__array)):new Pf(0,!1,this.__array.slice())},copy:function(){return new Pf(0,this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],d=0,e=this.__array;d<e.length;){var f=e[d];++d;a(f)&&c.push(f)}return new Pf(0,b,c)},get:function(a){return this.__array[a]},indexOf:function(a,b){null==b&&(b=0);for(var c=this.__array.length;b<c;){var d=b++;if(this.__array[d]==a)return d}return-1},insertAt:function(a,b){(!this.fixed||a<this.__array.length)&&
this.__array.splice(a,0,b)},iterator:function(){return B.iter(this.__array)},join:function(a){null==a&&(a=",");return this.__array.join(a)},lastIndexOf:function(a,b){for(b=null==b||b>=this.__array.length?this.__array.length-1:b;0<=b;){if(this.__array[b]==a)return b;--b}return-1},pop:function(){return this.fixed?null:this.__array.pop()},push:function(a){return this.fixed?this.__array.length:this.__array.push(a)},removeAt:function(a){return!this.fixed||a<this.__array.length?this.__array.splice(a,1)[0]:
null},reverse:function(){this.__array.reverse();return this},set:function(a,b){return!this.fixed||a<this.__array.length?this.__array[a]=b:b},shift:function(){return this.fixed?null:this.__array.shift()},slice:function(a,b){null==a&&(a=0);null==b&&(b=16777215);return new Pf(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new Pf(0,!1,this.__array.splice(a,b))},toJSON:function(){return this.__array},toString:function(){return null!=this.__array?this.__array.toString():
null},unshift:function(a){this.fixed||this.__array.unshift(a)},get_length:function(){return this.__array.length},set_length:function(a){if(!this.fixed){var b=this.__array.length;0>a&&(a=0);if(a>b)for(;b<a;)b++,this.__array.push(null);else for(;this.__array.length>a;)this.__array.pop()}return this.__array.length},__class__:Pf,__properties__:{set_length:"set_length",get_length:"get_length"}};var Xc=function(){};h["openfl._internal.Lib"]=Xc;Xc.__name__="openfl._internal.Lib";Xc.notImplemented=function(a){var b=
a.className+"."+a.methodName,c=Xc.__sentWarnings;(null!=q[b]?c.existsReserved(b):c.h.hasOwnProperty(b))||(c=Xc.__sentWarnings,null!=q[b]?c.setReserved(b,!0):c.h[b]=!0,Ta.warn(a.methodName+" is not implemented",a))};var cf=function(){};h["openfl._internal.formats.agal.AGALConverter"]=cf;cf.__name__="openfl._internal.formats.agal.AGALConverter";cf.prefixFromType=function(a,b){switch(a){case 0:return"va";case 1:return b==Si.VERTEX?"vc":"fc";case 2:return b==Si.VERTEX?"vt":"ft";case 3:return"output_";
case 4:return"v";case 5:return"sampler";default:throw new E(new dd("Invalid data!"));}};cf.readUInt64=function(a){var b=a.readInt();a=a.readInt();return new Xb(a,b)};cf.convertToGLSL=function(a,b){a.position=0;a.__endian=1;var c=a.readByte()&255;if(176==c)return a.readUTF();if(160!=c)throw new E(new dd("Magic value must be 0xA0, may not be AGAL"));if(1!=a.readInt())throw new E(new dd("Version must be 1"));if(161!=(a.readByte()&255))throw new E(new dd("Shader type ID must be 0xA1"));c=0==(a.readByte()&
255)?Si.VERTEX:Si.FRAGMENT;for(var d=new Ao,e="";;){var f=a.position;if(!Da.gt(za.get_length(a),f))break;var g=a.readInt();f=a.readUnsignedInt();var k=cf.readUInt64(a),l=cf.readUInt64(a);f=Mj.parse(f,c);k=Ti.parse(k,c,f.mask);var m=Ti.parse(l,c,f.mask);e+="\t";switch(g){case 0:e+=K.string(f.toGLSL()+" = "+k.toGLSL()+"; // mov");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);break;case 1:e+=K.string(f.toGLSL()+" = "+k.toGLSL()+" + "+m.toGLSL()+"; // add");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);
d.addSR(m,Ia.VECTOR_4);break;case 2:e+=K.string(f.toGLSL()+" = "+k.toGLSL()+" - "+m.toGLSL()+"; // sub");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);d.addSR(m,Ia.VECTOR_4);break;case 3:e+=K.string(f.toGLSL()+" = "+k.toGLSL()+" * "+m.toGLSL()+"; // mul");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);d.addSR(m,Ia.VECTOR_4);break;case 4:e+=K.string(f.toGLSL()+" = "+k.toGLSL()+" / "+m.toGLSL()+"; // div");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);d.addSR(m,Ia.VECTOR_4);break;case 5:e=-1<k.toGLSL().indexOf(".")?
e+K.string(f.toGLSL()+" = 1.0 / "+k.toGLSL()+"; // rcp"):e+K.string(f.toGLSL()+" = vec4(1) / "+k.toGLSL()+"; // rcp");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);break;case 6:e+=K.string(f.toGLSL()+" = min("+k.toGLSL()+", "+m.toGLSL()+"); // min");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);d.addSR(m,Ia.VECTOR_4);break;case 7:e+=K.string(f.toGLSL()+" = max("+k.toGLSL()+", "+m.toGLSL()+"); // max");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);d.addSR(m,Ia.VECTOR_4);break;case 8:e+=K.string(f.toGLSL()+
" = fract("+k.toGLSL()+"); // frc");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);break;case 9:e+=K.string(f.toGLSL()+" = sqrt("+k.toGLSL()+"); // sqrt");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);break;case 10:e+=K.string(f.toGLSL()+" = inversesqrt("+k.toGLSL()+"); // rsq");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);break;case 11:e+=K.string(f.toGLSL()+" = pow("+k.toGLSL()+", "+m.toGLSL()+"); // pow");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);d.addSR(m,Ia.VECTOR_4);break;case 12:e+=K.string(f.toGLSL()+
" = log2("+k.toGLSL()+"); // log");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);break;case 13:e+=K.string(f.toGLSL()+" = exp2("+k.toGLSL()+"); // exp");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);break;case 14:e+=K.string(f.toGLSL()+" = normalize("+k.toGLSL()+"); // normalize");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);break;case 15:e+=K.string(f.toGLSL()+" = sin("+k.toGLSL()+"); // sin");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);break;case 16:e+=K.string(f.toGLSL()+" = cos("+k.toGLSL()+
"); // cos");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);break;case 17:k.sourceMask=m.sourceMask=7;e+=K.string(f.toGLSL()+" = cross(vec3("+k.toGLSL()+"), vec3("+m.toGLSL()+")); // crs");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);d.addSR(m,Ia.VECTOR_4);break;case 18:k.sourceMask=m.sourceMask=7;e+=K.string(f.toGLSL()+" = vec4(dot(vec3("+k.toGLSL()+"), vec3("+m.toGLSL()+")))"+f.getWriteMask()+"; // dp3");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);d.addSR(m,Ia.VECTOR_4);break;case 19:k.sourceMask=
m.sourceMask=15;e+=K.string(f.toGLSL()+" = vec4(dot(vec4("+k.toGLSL()+"), vec4("+m.toGLSL()+")))"+f.getWriteMask()+"; // dp4");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);d.addSR(m,Ia.VECTOR_4);break;case 20:e+=K.string(f.toGLSL()+" = abs("+k.toGLSL()+"); // abs");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);break;case 21:e+=K.string(f.toGLSL()+" = -"+k.toGLSL()+"; // neg");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);break;case 22:e+=K.string(f.toGLSL()+" = clamp("+k.toGLSL()+", 0.0, 1.0); // saturate");
d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);break;case 23:g=d.getRegisterUsage(m);g!=Ia.VECTOR_4&&g!=Ia.VECTOR_4_ARRAY?(e+=K.string(f.toGLSL()+" = "+k.toGLSL()+" * mat3("+m.toGLSL(!1)+"); // m33"),d.addDR(f,Ia.VECTOR_4),d.addSR(k,Ia.VECTOR_4),d.addSR(m,Ia.MATRIX_4_4)):(k.sourceMask=m.sourceMask=7,e+=K.string(f.toGLSL()+" = vec3(dot("+k.toGLSL(!0)+","+m.toGLSL(!0,0)+"), dot("+k.toGLSL(!0)+","+m.toGLSL(!0,1)+"),dot("+k.toGLSL(!0)+","+m.toGLSL(!0,2)+")); // m33"),d.addDR(f,Ia.VECTOR_4),d.addSR(k,Ia.VECTOR_4),
d.addSR(m,Ia.VECTOR_4,0),d.addSR(m,Ia.VECTOR_4,1),d.addSR(m,Ia.VECTOR_4,2));break;case 24:g=d.getRegisterUsage(m);g!=Ia.VECTOR_4&&g!=Ia.VECTOR_4_ARRAY?(e+=K.string(f.toGLSL()+" = "+k.toGLSL()+" * "+m.toGLSL(!1)+"; // m44"),d.addDR(f,Ia.VECTOR_4),d.addSR(k,Ia.VECTOR_4),d.addSR(m,Ia.MATRIX_4_4)):(k.sourceMask=m.sourceMask=15,e+=K.string(f.toGLSL()+" = vec4(dot("+k.toGLSL(!0)+","+m.toGLSL(!0,0)+"), dot("+k.toGLSL(!0)+","+m.toGLSL(!0,1)+"), dot("+k.toGLSL(!0)+","+m.toGLSL(!0,2)+"), dot("+k.toGLSL(!0)+
","+m.toGLSL(!0,3)+")); // m44"),d.addDR(f,Ia.VECTOR_4),d.addSR(k,Ia.VECTOR_4),d.addSR(m,Ia.VECTOR_4,0),d.addSR(m,Ia.VECTOR_4,1),d.addSR(m,Ia.VECTOR_4,2),d.addSR(m,Ia.VECTOR_4,3));break;case 25:f.mask&=7;g=d.getRegisterUsage(m);g!=Ia.VECTOR_4&&g!=Ia.VECTOR_4_ARRAY?(e+=K.string(f.toGLSL()+" = "+k.toGLSL()+" * "+m.toGLSL(!1)+"; // m34"),d.addDR(f,Ia.VECTOR_4),d.addSR(k,Ia.VECTOR_4),d.addSR(m,Ia.MATRIX_4_4)):(k.sourceMask=m.sourceMask=15,e+=K.string(f.toGLSL()+" = vec3(dot("+k.toGLSL(!0)+","+m.toGLSL(!0,
0)+"), dot("+k.toGLSL(!0)+","+m.toGLSL(!0,1)+"),dot("+k.toGLSL(!0)+","+m.toGLSL(!0,2)+")); // m34"),d.addDR(f,Ia.VECTOR_4),d.addSR(k,Ia.VECTOR_4),d.addSR(m,Ia.VECTOR_4,0),d.addSR(m,Ia.VECTOR_4,1),d.addSR(m,Ia.VECTOR_4,2));break;case 39:k.sourceMask=15;e+=K.string("if (any(lessThan("+k.toGLSL()+", vec4(0)))) discard;");d.addSR(k,Ia.VECTOR_4);break;case 40:m=Nj.parse(l,c);switch(m.d){case 0:2==m.t?(k.sourceMask=3,d.addSaR(m,Ia.SAMPLER_2D_ALPHA),e+=K.string("if ("+m.toGLSL()+"_alphaEnabled) {\n"),e+=
K.string("\t\t"+f.toGLSL()+" = vec4(texture2D("+m.toGLSL()+", "+k.toGLSL()+").xyz, texture2D("+m.toGLSL()+"_alpha, "+k.toGLSL()+").x); // tex + alpha\n"),e+="\t} else {\n",e+=K.string("\t\t"+f.toGLSL()+" = texture2D("+m.toGLSL()+", "+k.toGLSL()+"); // tex\n"),e+="\t}"):(k.sourceMask=3,d.addSaR(m,Ia.SAMPLER_2D),e+=K.string(f.toGLSL()+" = texture2D("+m.toGLSL()+", "+k.toGLSL()+"); // tex"));break;case 1:2==m.t?(k.sourceMask=7,d.addSaR(m,Ia.SAMPLER_CUBE_ALPHA),e+=K.string("if ("+m.toGLSL()+"_alphaEnabled) {\n"),
e+=K.string("\t\t"+f.toGLSL()+" = vec4(textureCube("+m.toGLSL()+", "+k.toGLSL()+").xyz, textureCube("+m.toGLSL()+"_alpha, "+k.toGLSL()+").x); // tex + alpha\n"),e+="\t} else {\n",e+=K.string("\t\t"+f.toGLSL()+" = textureCube("+m.toGLSL()+", "+k.toGLSL()+"); // tex"),e+="\t}"):(k.sourceMask=7,e+=K.string(f.toGLSL()+" = textureCube("+m.toGLSL()+", "+k.toGLSL()+"); // tex"),d.addSaR(m,Ia.SAMPLER_CUBE))}d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);null!=b&&(b[m.n]=m.toSamplerState());break;case 41:k.sourceMask=
m.sourceMask=15;e+=K.string(f.toGLSL()+" = vec4(greaterThanEqual("+k.toGLSL()+", "+m.toGLSL()+"))"+f.getWriteMask()+"; // ste");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);d.addSR(m,Ia.VECTOR_4);break;case 42:k.sourceMask=m.sourceMask=15;e+=K.string(f.toGLSL()+" = vec4(lessThan("+k.toGLSL()+", "+m.toGLSL()+"))"+f.getWriteMask()+"; // slt");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);d.addSR(m,Ia.VECTOR_4);break;case 44:k.sourceMask=m.sourceMask=15;e+=K.string(f.toGLSL()+" = vec4(equal("+k.toGLSL()+
", "+m.toGLSL()+"))"+f.getWriteMask()+"; // seq");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);d.addSR(m,Ia.VECTOR_4);break;case 45:k.sourceMask=m.sourceMask=15;e+=K.string(f.toGLSL()+" = vec4(notEqual("+k.toGLSL()+", "+m.toGLSL()+"))"+f.getWriteMask()+"; // sne");d.addDR(f,Ia.VECTOR_4);d.addSR(k,Ia.VECTOR_4);d.addSR(m,Ia.VECTOR_4);break;default:throw new E(new dd("Opcode "+g));}e+="\n"}null==cf.limitedProfile&&(a=t.context.getParameter(7938),cf.limitedProfile=-1<a.indexOf("OpenGL ES")||-1<a.indexOf("WebGL"));
a=""+K.string("// AGAL "+(c==Si.VERTEX?"vertex":"fragment")+" shader\n");a=cf.limitedProfile?a+"#version 100\nprecision highp float;\n":a+"#version 120\n";a+=K.string(d.toGLSL(!1));c==Si.VERTEX&&(a+="uniform vec4 vcPositionScale;\n");a=a+"void main() {\n"+K.string(d.toGLSL(!0));a+=K.string(e);c==Si.VERTEX&&(a+="\tgl_Position *= vcPositionScale;\n");return a+"}\n"};var Mj=function(){};h["openfl._internal.formats.agal._AGALConverter.DestRegister"]=Mj;Mj.__name__="openfl._internal.formats.agal._AGALConverter.DestRegister";
Mj.parse=function(a,b){var c=new Mj;c.programType=b;c.type=a>>>24&15;c.mask=a>>>16&15;c.n=a&65535;return c};Mj.prototype={mask:null,n:null,programType:null,type:null,getWriteMask:function(){var a=".";0!=(this.mask&1)&&(a+="x");0!=(this.mask&2)&&(a+="y");0!=(this.mask&4)&&(a+="z");0!=(this.mask&8)&&(a+="w");return a},toGLSL:function(a){null==a&&(a=!0);var b=3==this.type?this.programType==Si.VERTEX?"gl_Position":"gl_FragColor":cf.prefixFromType(this.type,this.programType)+this.n;a&&15!=this.mask&&(b+=
this.getWriteMask());return b},__class__:Mj};var Si=C["openfl._internal.formats.agal._AGALConverter.ProgramType"]={__ename__:"openfl._internal.formats.agal._AGALConverter.ProgramType",__constructs__:["VERTEX","FRAGMENT"],VERTEX:{_hx_index:0,__enum__:"openfl._internal.formats.agal._AGALConverter.ProgramType",toString:u},FRAGMENT:{_hx_index:1,__enum__:"openfl._internal.formats.agal._AGALConverter.ProgramType",toString:u}},Ao=function(){this.mEntries=[]};h["openfl._internal.formats.agal.RegisterMap"]=
Ao;Ao.__name__="openfl._internal.formats.agal.RegisterMap";Ao.prototype={mEntries:null,add:function(a,b,c,d){for(var e=0,f=this.mEntries;e<f.length;){var g=f[e];++e;if(g.type==a&&g.name==b&&g.number==c){if(g.usage!=d)throw new E(new dd("Cannot use register in multiple ways yet (mat4/vec4)"));return}}e=new cr;e.type=a;e.name=b;e.number=c;e.usage=d;this.mEntries.push(e)},addDR:function(a,b){this.add(a.type,a.toGLSL(!1),a.n,b)},addSaR:function(a,b){this.add(a.type,a.toGLSL(),a.n,b)},addSR:function(a,
b,c){null==c&&(c=0);0!=a.d?(this.add(a.itype,cf.prefixFromType(a.itype,a.programType)+a.n,a.n,Ia.VECTOR_4),this.add(a.type,cf.prefixFromType(a.type,a.programType)+a.o,a.o,Ia.VECTOR_4_ARRAY)):this.add(a.type,a.toGLSL(!1,c),a.n+c,b)},getRegisterUsage:function(a){return 0!=a.d?Ia.VECTOR_4_ARRAY:this.getUsage(a.type,a.toGLSL(!1),a.n)},getUsage:function(a,b,c){for(var d=0,e=this.mEntries;d<e.length;){var f=e[d];++d;if(f.type==a&&f.name==b&&f.number==c)return f.usage}return Ia.UNUSED},toGLSL:function(a){this.mEntries.sort(function(a,
b){return a.number-b.number});this.mEntries.sort(function(a,b){return L.__cast(a.type,Hg)-L.__cast(b.type,Hg)});for(var b="",c=0,d=this.mEntries.length;c<d;){var e=c++;e=this.mEntries[e];if(!(a&&2!=e.type||!a&&2==e.type)&&3!=e.type){switch(e.type){case 0:b+="attribute ";break;case 1:b+="uniform ";break;case 2:b+="\t";break;case 3:break;case 4:b+="varying ";break;case 5:b+="uniform ";break;default:throw new E(new dd);}switch(e.usage._hx_index){case 0:Ta.info("Missing switch patten: RegisterUsage.UNUSED",
{fileName:"openfl/_internal/formats/agal/AGALConverter.hx",lineNumber:746,className:"openfl._internal.formats.agal.RegisterMap",methodName:"toGLSL"});break;case 1:b+="vec4 ";break;case 2:b+="mat4 ";break;case 3:b+="sampler2D ";break;case 5:b+="samplerCube ";break;case 7:b+="vec4 "}e.usage==Ia.SAMPLER_2D_ALPHA?(b+="sampler2D ",b+=K.string(e.name),b+=";\n",b+="uniform ",b+="sampler2D ",b+=K.string(e.name+"_alpha"),b+=";\n",b+="uniform ",b+="bool ",b+=K.string(e.name+"_alphaEnabled")):e.usage==Ia.SAMPLER_CUBE_ALPHA?
(b+="samplerCube ",b+=K.string(e.name),b+=";\n",b+="uniform ",b+="samplerCube ",b+=K.string(e.name+"_alpha"),b+=";\n",b+="uniform ",b+="bool ",b+=K.string(e.name+"_alphaEnabled")):b=e.usage==Ia.VECTOR_4_ARRAY?b+K.string(e.name+"[32]"):b+K.string(e.name);b+=";\n"}}return b},__class__:Ao};var cr=function(){};h["openfl._internal.formats.agal._AGALConverter.RegisterMapEntry"]=cr;cr.__name__="openfl._internal.formats.agal._AGALConverter.RegisterMapEntry";cr.prototype={name:null,number:null,type:null,usage:null,
__class__:cr};var Ia=C["openfl._internal.formats.agal._AGALConverter.RegisterUsage"]={__ename__:"openfl._internal.formats.agal._AGALConverter.RegisterUsage",__constructs__:"UNUSED VECTOR_4 MATRIX_4_4 SAMPLER_2D SAMPLER_2D_ALPHA SAMPLER_CUBE SAMPLER_CUBE_ALPHA VECTOR_4_ARRAY".split(" "),UNUSED:{_hx_index:0,__enum__:"openfl._internal.formats.agal._AGALConverter.RegisterUsage",toString:u},VECTOR_4:{_hx_index:1,__enum__:"openfl._internal.formats.agal._AGALConverter.RegisterUsage",toString:u},MATRIX_4_4:{_hx_index:2,
__enum__:"openfl._internal.formats.agal._AGALConverter.RegisterUsage",toString:u},SAMPLER_2D:{_hx_index:3,__enum__:"openfl._internal.formats.agal._AGALConverter.RegisterUsage",toString:u},SAMPLER_2D_ALPHA:{_hx_index:4,__enum__:"openfl._internal.formats.agal._AGALConverter.RegisterUsage",toString:u},SAMPLER_CUBE:{_hx_index:5,__enum__:"openfl._internal.formats.agal._AGALConverter.RegisterUsage",toString:u},SAMPLER_CUBE_ALPHA:{_hx_index:6,__enum__:"openfl._internal.formats.agal._AGALConverter.RegisterUsage",
toString:u},VECTOR_4_ARRAY:{_hx_index:7,__enum__:"openfl._internal.formats.agal._AGALConverter.RegisterUsage",toString:u}},Nj=function(){};h["openfl._internal.formats.agal._AGALConverter.SamplerRegister"]=Nj;Nj.__name__="openfl._internal.formats.agal._AGALConverter.SamplerRegister";Nj.parse=function(a,b){var c=new Nj;c.programType=b;b=new Xb(a.high>>31,a.high>>28);c.f=b.low&15;b=new Xb(a.high>>31,a.high>>24);c.m=b.low&15;b=new Xb(a.high>>31,a.high>>20);c.w=b.low&15;b=new Xb(a.high>>31,a.high>>16);
c.s=b.low&15;b=new Xb(a.high>>31,a.high>>12);c.d=b.low&15;b=new Xb(a.high>>31,a.high>>8);c.t=b.low&15;b=new Xb(a.high>>31,a.high>>0);c.type=b.low&15;b=new Xb(a.high>>16,a.high<<16|a.low>>>16);c.b=b.low&255;c.n=a.low&65535;return c};Nj.prototype={b:null,d:null,f:null,m:null,n:null,programType:null,s:null,t:null,type:null,w:null,toGLSL:function(){return cf.prefixFromType(this.type,this.programType)+this.n},toSamplerState:function(){switch(this.f){case 0:var a=5;break;case 1:a=4;break;default:throw new E(new dd);
}switch(this.m){case 0:var b=2;break;case 1:b=1;break;case 2:b=0;break;default:throw new E(new dd);}switch(this.w){case 0:var c=0;break;case 1:c=2;break;default:throw new E(new dd);}return new zh(c,a,b,(this.b<<24>>24)/8,4==(this.s&4),1==(this.s&1),2==this.t)},__class__:Nj};var Ti=function(){};h["openfl._internal.formats.agal._AGALConverter.SourceRegister"]=Ti;Ti.__name__="openfl._internal.formats.agal._AGALConverter.SourceRegister";Ti.parse=function(a,b,c){var d=new Ti;d.programType=b;b=new Xb(a.high>>
31,a.high>>31);d.d=b.low&1;b=new Xb(a.high>>31,a.high>>16);d.q=b.low&3;b=new Xb(a.high>>31,a.high>>8);d.itype=b.low&15;b=new Xb(a.high>>31,a.high>>0);d.type=b.low&15;b=new Xb(a.high>>24,a.high<<8|a.low>>>24);d.s=b.low&255;b=new Xb(a.high>>16,a.high<<16|a.low>>>16);d.o=b.low&255;d.n=a.low&65535;d.sourceMask=c;return d};Ti.prototype={d:null,itype:null,n:null,o:null,programType:null,q:null,s:null,sourceMask:null,type:null,toGLSL:function(a,b){null==b&&(b=0);null==a&&(a=!0);if(3==this.type)return this.programType==
Si.VERTEX?"gl_Position":"gl_FragColor";var c=228==this.s&&15==this.sourceMask,d="";if(5!=this.type&&!c){if(0!=(this.sourceMask&1))switch(this.s&3){case 0:d+="x";break;case 1:d+="y";break;case 2:d+="z";break;case 3:d+="w"}if(0!=(this.sourceMask&2))switch(this.s>>2&3){case 0:d+="x";break;case 1:d+="y";break;case 2:d+="z";break;case 3:d+="w"}if(0!=(this.sourceMask&4))switch(this.s>>4&3){case 0:d+="x";break;case 1:d+="y";break;case 2:d+="z";break;case 3:d+="w"}if(0!=(this.sourceMask&8))switch(this.s>>
6&3){case 0:d+="x";break;case 1:d+="y";break;case 2:d+="z";break;case 3:d+="w"}}c=cf.prefixFromType(this.type,this.programType);if(0==this.d)c+=this.n+b;else{c+=this.o;var e="";switch(this.q){case 0:e="x";break;case 1:e="y";break;case 2:e="z";break;case 3:e="w"}e=cf.prefixFromType(this.itype,this.programType)+this.n+"."+e;c+="[ int("+e+") +"+b+"]"}a&&""!=d&&(c+="."+d);return c},__class__:Ti};var tf=function(){};h["openfl._internal.formats.animate.AnimateSymbol"]=tf;tf.__name__="openfl._internal.formats.animate.AnimateSymbol";
tf.prototype={className:null,id:null,__createObject:function(a){return null},__initObject:function(a,b){},__class__:tf};var Bo=function(){};h["openfl._internal.formats.animate.AnimateBitmapSymbol"]=Bo;Bo.__name__="openfl._internal.formats.animate.AnimateBitmapSymbol";Bo.__super__=tf;Bo.prototype=w(tf.prototype,{alpha:null,path:null,smooth:null,__createObject:function(a){return new Zc(na.fromImage(a.getImage(this.path)),1,0!=this.smooth)},__class__:Bo});var Co=function(){};h["openfl._internal.formats.animate.AnimateButtonSymbol"]=
Co;Co.__name__="openfl._internal.formats.animate.AnimateButtonSymbol";Co.__super__=tf;Co.prototype=w(tf.prototype,{downState:null,hitState:null,overState:null,upState:null,library:null,__constructor:function(a){null!=this.downState&&a.set_downState(this.downState.__createObject(this.library));null!=this.hitState&&a.set_hitTestState(this.hitState.__createObject(this.library));null!=this.overState&&a.set_overState(this.overState.__createObject(this.library));null!=this.upState&&a.set_upState(this.upState.__createObject(this.library))},
__createObject:function(a){var b=null;uf.__constructor=v(this,this.__constructor);this.library=a;null!=this.className&&(a=h[this.className],null!=a&&(b=rb.createInstance(a,[])));null==b&&(b=new uf);return b},__initObject:function(a,b){this.library=a;this.__constructor(b)},__class__:Co});var Do=function(){};h["openfl._internal.formats.animate.AnimateDynamicTextSymbol"]=Do;Do.__name__="openfl._internal.formats.animate.AnimateDynamicTextSymbol";Do.__super__=tf;Do.prototype=w(tf.prototype,{align:null,
border:null,color:null,fontHeight:null,fontID:null,fontName:null,height:null,html:null,indent:null,input:null,leading:null,leftMargin:null,multiline:null,password:null,rightMargin:null,selectable:null,text:null,width:null,wordWrap:null,x:null,y:null,__createObject:function(a){var b=new ge;b.set_width(this.width);b.set_height(this.height);b.__offsetX=this.x;b.__offsetY=this.y;b.set_multiline(this.multiline);b.set_wordWrap(this.wordWrap);b.set_displayAsPassword(this.password);this.border&&(b.set_border(!0),
b.set_background(!0));b.set_selectable(this.selectable);this.input&&b.set_type(1);var c=new Eg;null!=this.color&&(c.color=this.color&16777215);c.size=Math.round(this.fontHeight/20);a=a.symbols.h[this.fontID];null!=a&&(c.__ascent=a.ascent/20/1024,c.__descent=a.descent/20/1024);c.font=this.fontName;a=!1;var d=c.font;if(null==d)a=!0;else switch(d){case "":case "_sans":case "_serif":case "_typewriter":a=!0;break;default:d=0;for(var e=tc.enumerateFonts();d<e.length;){var f=e[d];++d;if(f.name==c.font){a=
!0;break}}}if(!a)for(d=/[^a-zA-Z]+/g,e=0,f=tc.enumerateFonts();e<f.length;){var g=f[e];++e;if(B.substr(g.name.replace(d,""),0,this.fontName.length)==this.fontName){c.font=g.name;a=!0;break}}a?b.set_embedFonts(!0):(a=c.font,d=ge.__missingFontWarning,(null!=q[a]?d.existsReserved(a):d.h.hasOwnProperty(a))||(a=c.font,d=ge.__missingFontWarning,null!=q[a]?d.setReserved(a,!0):d.h[a]=!0,Ta.warn('Could not find required font "'+c.font+'", it has not been embedded',{fileName:"openfl/_internal/formats/animate/AnimateDynamicTextSymbol.hx",
lineNumber:145,className:"openfl._internal.formats.animate.AnimateDynamicTextSymbol",methodName:"__createObject"})));null!=this.align&&("center"==this.align?c.align=0:"right"==this.align?c.align=4:"justify"==this.align&&(c.align=2),c.leftMargin=this.leftMargin/20|0,c.rightMargin=this.rightMargin/20|0,c.indent=this.indent/20|0,c.leading=this.leading/20|0);b.set_defaultTextFormat(c);null!=this.text&&(this.html?b.set_htmlText(this.text):b.set_text(this.text));return b},__class__:Do});var Eo=function(){};
h["openfl._internal.formats.animate.AnimateFontSymbol"]=Eo;Eo.__name__="openfl._internal.formats.animate.AnimateFontSymbol";Eo.__super__=tf;Eo.prototype=w(tf.prototype,{advances:null,ascent:null,bold:null,codes:null,descent:null,glyphs:null,italic:null,leading:null,name:null,__class__:Eo});var dr=function(){};h["openfl._internal.formats.animate.AnimateFrame"]=dr;dr.__name__="openfl._internal.formats.animate.AnimateFrame";dr.prototype={label:null,objects:null,script:null,scriptSource:null,__class__:dr};
var er=function(){};h["openfl._internal.formats.animate.AnimateFrameObject"]=er;er.__name__="openfl._internal.formats.animate.AnimateFrameObject";er.prototype={blendMode:null,cacheAsBitmap:null,clipDepth:null,colorTransform:null,depth:null,filters:null,id:null,matrix:null,name:null,symbol:null,type:null,visible:null,__class__:er};var kc=function(){bc.call(this)};h["openfl.utils.AssetLibrary"]=kc;kc.__name__="openfl.utils.AssetLibrary";kc.fromBundle=function(a){a=bc.fromBundle(a);if(null!=a){if(a instanceof
kc)return a;var b=new kc;b.__proxy=a;return b}return null};kc.fromBytes=function(a,b){return kc.fromManifest(rd.fromBytes(za.toBytes(a),b))};kc.fromFile=function(a,b){return kc.fromManifest(rd.fromFile(a,b))};kc.fromManifest=function(a){a=bc.fromManifest(a);if(null!=a){if(a instanceof kc)return a;var b=new kc;b.__proxy=a;return b}return null};kc.loadFromBytes=function(a,b){return rd.loadFromBytes(za.toBytes(a),b).then(function(a){return kc.loadFromManifest(a)})};kc.loadFromFile=function(a,b){return rd.loadFromFile(a,
b).then(function(a){return kc.loadFromManifest(a)})};kc.loadFromManifest=function(a){a=kc.fromManifest(a);return null!=a?a.load().then(function(a){return xb.withValue(a)}):xb.withError("Could not load asset manifest")};kc.__super__=bc;kc.prototype=w(bc.prototype,{__proxy:null,exists:function(a,b){return null!=this.__proxy?this.__proxy.exists(a,b):bc.prototype.exists.call(this,a,b)},getAsset:function(a,b){return null!=this.__proxy?this.__proxy.getAsset(a,b):bc.prototype.getAsset.call(this,a,b)},getAudioBuffer:function(a){return null!=
this.__proxy?this.__proxy.getAudioBuffer(a):bc.prototype.getAudioBuffer.call(this,a)},getBytes:function(a){return null!=this.__proxy?this.__proxy.getBytes(a):bc.prototype.getBytes.call(this,a)},getFont:function(a){return null!=this.__proxy?this.__proxy.getFont(a):bc.prototype.getFont.call(this,a)},getImage:function(a){return null!=this.__proxy?this.__proxy.getImage(a):bc.prototype.getImage.call(this,a)},getMovieClip:function(a){return null},getPath:function(a){return null!=this.__proxy?this.__proxy.getPath(a):
bc.prototype.getPath.call(this,a)},getText:function(a){return null!=this.__proxy?this.__proxy.getText(a):bc.prototype.getText.call(this,a)},isLocal:function(a,b){return null!=this.__proxy?this.__proxy.isLocal(a,b):bc.prototype.isLocal.call(this,a,b)},list:function(a){return null!=this.__proxy?this.__proxy.list(a):bc.prototype.list.call(this,a)},loadAsset:function(a,b){return null!=this.__proxy?this.__proxy.loadAsset(a,b):bc.prototype.loadAsset.call(this,a,b)},load:function(){return null!=this.__proxy?
this.__proxy.load():bc.prototype.load.call(this)},loadAudioBuffer:function(a){return null!=this.__proxy?this.__proxy.loadAudioBuffer(a):bc.prototype.loadAudioBuffer.call(this,a)},loadBytes:function(a){return null!=this.__proxy?this.__proxy.loadBytes(a):bc.prototype.loadBytes.call(this,a)},loadFont:function(a){return null!=this.__proxy?this.__proxy.loadFont(a):bc.prototype.loadFont.call(this,a)},loadImage:function(a){return null!=this.__proxy?this.__proxy.loadImage(a):bc.prototype.loadImage.call(this,
a)},loadMovieClip:function(a){return xb.withValue(this.getMovieClip(a))},loadText:function(a){return null!=this.__proxy?this.__proxy.loadText(a):bc.prototype.loadText.call(this,a)},unload:function(){null!=this.__proxy?this.__proxy.unload():bc.prototype.unload.call(this)},__class__:kc});var Og=function(a,b){bc.call(this);this.id=a;this.instanceID=null!=b?b:a;this.alphaCheck=new ua;this.bitmapClassNames=new ua;this.rootPath="";null==Og.instances&&(Og.instances=new ua);a=Og.instances;null!=q[b]?a.setReserved(b,
this):a.h[b]=this};h["openfl._internal.formats.animate.AnimateLibrary"]=Og;Og.__name__="openfl._internal.formats.animate.AnimateLibrary";Og.get=function(a){if(null==Og.instances)return null;var b=Og.instances;return null!=q[a]?b.getReserved(a):b.h[a]};Og.__super__=kc;Og.prototype=w(kc.prototype,{alphaCheck:null,bitmapClassNames:null,bitmapSymbols:null,frameRate:null,id:null,instanceID:null,preloading:null,root:null,rootPath:null,symbols:null,symbolsByClassName:null,uuid:null,exists:function(a,b){if(null!=
this.symbols){if(""==a&&"MOVIE_CLIP"==b)return!0;if("IMAGE"==b||"MOVIE_CLIP"==b)return null!=this.symbolsByClassName?(b=this.symbolsByClassName,null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a)):!1}return kc.prototype.exists.call(this,a,b)},getImage:function(a){var b=this.bitmapClassNames;if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))b=this.bitmapClassNames,a=null!=q[a]?b.getReserved(a):b.h[a];b=this.alphaCheck;if(null!=q[a]?!b.existsReserved(a):!b.h.hasOwnProperty(a)){for(var c=0,d=
this.bitmapSymbols;c<d.length;)if(b=d[c],++c,b.path==a&&null!=b.alpha)return c=kc.prototype.getImage.call(this,a),d=kc.prototype.getImage.call(this,b.alpha),this.__copyChannel(c,d),d=this.cachedImages,null!=q[a]?d.setReserved(a,c):d.h[a]=c,this.cachedImages.remove(b.alpha),b=this.alphaCheck,null!=q[a]?b.setReserved(a,!0):b.h[a]=!0,c;b=this.alphaCheck;null!=q[a]?b.setReserved(a,!0):b.h[a]=!0}return kc.prototype.getImage.call(this,a)},getMovieClip:function(a){if(null==this.symbols)return null;if(""==
a)return this.root.__createObject(this);var b=this.symbolsByClassName;a=null!=q[a]?b.getReserved(a):b.h[a];return null!=a&&a instanceof Oj?L.__cast(a,Oj).__createObject(this):null},isLocal:function(a,b){return!0},load:function(){var a=this;if(null!=this.id){var b=this.id,c=this.preload;null!=q[b]?c.setReserved(b,!0):c.h[b]=!0}var d=new Jd;this.preloading=!0;var e=function(b){var c=a.id,e=a.cachedText;null!=q[c]?e.setReserved(c,b):e.h[c]=b;c=JSON.parse(b);a.frameRate=c.frameRate;b=c.root;c=c.symbols;
var f=null;a.symbols=new Wa;a.symbolsByClassName=new ua;a.bitmapSymbols=[];e=0;for(var g=c.length;e<g;){var k=e++;var p=c[k];if(null!=p){var h=p.type;switch(h){case 0:f=a.__parseBitmap(p);a.bitmapSymbols.push(f);null!=f.className&&(k=f.className,p=f.path,h=a.bitmapClassNames,null!=q[k]?h.setReserved(k,p):h.h[k]=p);break;case 1:f=a.__parseButton(p);break;case 2:f=a.__parseDynamicText(p);break;case 3:f=a.__parseFont(p);break;case 4:f=a.__parseShape(p);break;case 5:f=a.__parseSprite(p);k==b&&(a.root=
f);break;case 6:f=a.__parseStaticText(p)}null!=f&&(a.symbols.h[f.id]=f,null!=f.className&&(k=f.className,p=a.symbolsByClassName,null!=q[k]?p.setReserved(k,f):p.h[k]=f))}}a.__load().onProgress(v(d,d.progress)).onError(v(d,d.error)).onComplete(function(b){a.preloading=!1;d.complete(a)})};if(this.exists(this.id,"TEXT")||this.exists(this.id,"BINARY")){for(b=this.paths.keys();b.hasNext();){c=b.next();var f=this.preload;null!=q[c]?f.setReserved(c,!0):f.h[c]=!0}for(b=this.types.keys();b.hasNext();)c=b.next(),
f=this.types,"IMAGE"==(null!=q[c]?f.getReserved(c):f.h[c])&&(f=this.preload,null!=q[c]?f.setReserved(c,!0):f.h[c]=!0);this.loadText(this.id).onError(v(d,d.error)).onComplete(e)}else{for(b=this.paths.keys();b.hasNext();)c=b.next(),f=this.preload,null!=q[c]?f.setReserved(c,!0):f.h[c]=!0;b=null;b=this.id;c=this.paths;(null!=q[b]?c.existsReserved(b):c.h.hasOwnProperty(b))?(b=this.id,c=this.paths,b=null!=q[b]?c.getReserved(b):c.h[b]):b=null!=this.rootPath&&""!=this.rootPath?this.rootPath+"/"+this.id:this.id;
var g=new Zg;g.addEventListener("complete",function(a){e(g.data)});g.addEventListener("ioError",function(a){d.error(a)});g.load(new Jg(b))}return d.future},loadImage:function(a){var b=this,c=this.bitmapClassNames;if(null!=q[a]?c.existsReserved(a):c.h.hasOwnProperty(a))c=this.bitmapClassNames,a=null!=q[a]?c.getReserved(a):c.h[a];this.preloading?c=!1:(c=this.alphaCheck,c=!(null!=q[a]?c.existsReserved(a):c.h.hasOwnProperty(a)));if(c){c=0;for(var d=this.bitmapSymbols;c<d.length;){var e=[d[c]];++c;if(e[0].path==
a&&null!=e[0].alpha)return c=[new Jd],this.__loadImage(a).onError((x=c[0],v(x,x.error))).onComplete(function(c,d){return function(e){b.__loadImage(d[0].alpha).onError((x=c[0],v(x,x.error))).onComplete(function(c,d){return function(f){b.__copyChannel(e,f);f=b.cachedImages;null!=q[a]?f.setReserved(a,e):f.h[a]=e;b.cachedImages.remove(d[0].alpha);f=b.alphaCheck;null!=q[a]?f.setReserved(a,!0):f.h[a]=!0;c[0].complete(e)}}(c,d))}}(c,e)),c[0].future;e=this.alphaCheck;null!=q[a]?e.setReserved(a,!0):e.h[a]=
!0}}return kc.prototype.loadImage.call(this,a)},unload:function(){Og.instances.remove(this.uuid);if(null!=this.symbols)for(var a=0,b=this.bitmapSymbols;a<b.length;){var c=b[a];++a;Ea.cache.removeBitmapData(c.path)}},__copyChannel:function(a,b){null!=b&&a.copyChannel(b,b.get_rect(),new Gd,Af.RED,Af.ALPHA);a.buffer.premultiplied=!0;a.set_premultiplied(!1)},__fromManifest:function(a){this.rootPath=a.rootPath;kc.prototype.__fromManifest.call(this,a);this.bytesTotal=0;for(a=this.paths.keys();a.hasNext();){var b=
a.next(),c=this.sizes;this.bytesTotal+=null!=q[b]?c.getReserved(b):c.h[b]}},__load:function(){return kc.prototype.load.call(this)},__loadImage:function(a){return kc.prototype.loadImage.call(this,a)},__parseBitmap:function(a){var b=new Bo;b.id=a.id;b.className=a.className;b.alpha=a.alpha;b.path=a.path;b.smooth=a.smooth;return b},__parseButton:function(a){var b=new Co;b.id=a.id;b.className=a.className;b.downState=this.__parseSprite(a.downState);b.hitState=this.__parseSprite(a.hitState);b.overState=
this.__parseSprite(a.overState);b.upState=this.__parseSprite(a.upState);return b},__parseDynamicText:function(a){var b=new Do;b.id=a.id;b.align=a.align;b.border=a.border;b.color=a.color;b.fontHeight=a.fontHeight;b.fontID=a.fontID;b.fontName=a.fontName;b.html=a.html;b.indent=a.indent;b.input=a.input;b.leading=a.leading;b.leftMargin=a.leftMargin;b.multiline=a.multiline;b.password=a.password;b.rightMargin=a.rightMargin;b.selectable=a.selectable;b.text=a.text;b.wordWrap=a.wordWrap;b.x=a.rect[0]/20;b.y=
a.rect[1]/20;b.width=a.rect[2]/20;b.height=a.rect[3]/20;return b},__parseFont:function(a){var b=new Eo;b.id=a.id;b.advances=a.advances;b.ascent=a.ascent;b.bold=a.bold;b.codes=a.codes;b.descent=a.descent;b.italic=a.italic;b.leading=a.leading;b.name=a.name;if(Object.prototype.hasOwnProperty.call(a,"glyphs")){b.glyphs=[];a=a.glyphs;for(var c=0,d=a.length;c<d;){var e=c++,f=a[e];if(null!=f){var g=[];b.glyphs[e]=g;for(e=0;e<f.length;)switch(f[e]){case 0:g.push(vf.BeginBitmapFill(f[e+1],this.__parseMatrix(f[e+
2]),f[e+3],f[e+4]));e+=5;break;case 1:g.push(vf.BeginFill(f[e+1],f[e+2]));e+=3;break;case 2:g.push(vf.BeginGradientFill(f[e+1],f[e+2],f[e+3],f[e+4],this.__parseMatrix(f[e+5]),f[e+6],f[e+7],f[e+8]));e+=9;break;case 3:g.push(vf.LineStyle(null,null,null,null,null,null,null,null));++e;break;case 4:g.push(vf.CurveTo(f[e+1]/20,f[e+2]/20,f[e+3]/20,f[e+4]/20));e+=5;break;case 5:g.push(vf.EndFill);++e;break;case 6:g.push(vf.LineStyle(f[e+1],f[e+2],f[e+3],f[e+4],f[e+5],f[e+6],f[e+7],f[e+8]));e+=9;break;case 7:g.push(vf.LineTo(f[e+
1]/20,f[e+2]/20));e+=3;break;case 8:g.push(vf.MoveTo(f[e+1]/20,f[e+2]/20));e+=3;break;default:++e}}}}return b},__parseMatrix:function(a){return null!=a?new Ha(a[0],a[1],a[2],a[3],a[4]/20,a[5]/20):null},__parseShape:function(a){var b=new Fo;b.id=a.id;b.commands=[];a=a.commands;for(var c=b.commands,d=0;d<a.length;)switch(a[d]){case 0:c.push(vf.BeginBitmapFill(a[d+1],this.__parseMatrix(a[d+2]),a[d+3],a[d+4]));d+=5;break;case 1:c.push(vf.BeginFill(a[d+1],a[d+2]));d+=3;break;case 2:c.push(vf.BeginGradientFill(a[d+
1],a[d+2],a[d+3],a[d+4],this.__parseMatrix(a[d+5]),a[d+6],a[d+7],a[d+8]));d+=9;break;case 3:c.push(vf.LineStyle(null,null,null,null,null,null,null,null));++d;break;case 4:c.push(vf.CurveTo(a[d+1]/20,a[d+2]/20,a[d+3]/20,a[d+4]/20));d+=5;break;case 5:c.push(vf.EndFill);++d;break;case 6:c.push(vf.LineStyle(a[d+1],a[d+2],a[d+3],a[d+4],a[d+5],a[d+6],a[d+7],a[d+8]));d+=9;break;case 7:c.push(vf.LineTo(a[d+1]/20,a[d+2]/20));d+=3;break;case 8:c.push(vf.MoveTo(a[d+1]/20,a[d+2]/20));d+=3;break;default:++d}return b},
__parseSprite:function(a){var b=new Oj;b.id=a.id;b.className=a.className;b.baseClassName=a.baseClassName;b.scale9Grid=null!=a.scale9Grid?new ia(a.scale9Grid[0]/20,a.scale9Grid[1]/20,a.scale9Grid[2]/20,a.scale9Grid[3]/20):null;a=a.frames;for(var c,d,e,f=0;f<a.length;){d=a[f];++f;c=new dr;c.label=d.label;d=d.objects;if(null!=d&&0<d.length){c.objects=[];for(var g=0;g<d.length;){var k=d[g];++g;e=new er;e.blendMode=k.blendMode;e.cacheAsBitmap=k.cacheAsBitmap;e.clipDepth=k.clipDepth;e.colorTransform=null!=
k.colorTransform?new Sb(k.colorTransform[0]/20,k.colorTransform[1]/20,k.colorTransform[2]/20,k.colorTransform[3]/20,k.colorTransform[4]/20,k.colorTransform[5]/20,k.colorTransform[6]/20,k.colorTransform[7]/20):null;e.depth=k.depth;e.filters=k.filters;e.id=k.id;e.matrix=this.__parseMatrix(k.matrix);e.name=k.name;e.symbol=k.symbol;e.type=k.type;e.visible=k.visible;c.objects.push(e)}}b.frames.push(c)}return b},__parseStaticText:function(a){var b=new Go;b.id=a.id;b.matrix=this.__parseMatrix(a.matrix);
b.records=a.records;return b},__pixel:function(a){return a/20},__class__:Og});var Fo=function(){};h["openfl._internal.formats.animate.AnimateShapeSymbol"]=Fo;Fo.__name__="openfl._internal.formats.animate.AnimateShapeSymbol";Fo.__super__=tf;Fo.prototype=w(tf.prototype,{commands:null,rendered:null,__createObject:function(a){var b=new Ue,c=b.get_graphics();if(null!=this.rendered)return c.copyFrom(this.rendered.get_graphics()),b;for(var d=0,e=this.commands;d<e.length;){var f=e[d];++d;switch(f._hx_index){case 0:var g=
f.smooth,k=f.repeat,l=f.matrix;f=a.getImage(a.symbols.h[f.bitmap].path);null!=f&&c.beginBitmapFill(na.fromImage(f),l,k,g);break;case 1:c.beginFill(f.color,f.alpha);break;case 2:c.beginGradientFill(f.fillType,f.colors,f.alphas,f.ratios,f.matrix,f.spreadMethod,f.interpolationMethod,f.focalPointRatio);break;case 3:c.curveTo(f.controlX,f.controlY,f.anchorX,f.anchorY);break;case 4:c.endFill();break;case 5:g=f.miterLimit;k=f.joints;l=f.caps;var m=f.scaleMode,p=f.pixelHinting,n=f.alpha,h=f.color;f=f.thickness;
null!=f?c.lineStyle(f,h,n,p,m,l,k,g):c.lineStyle();break;case 6:c.lineTo(f.x,f.y);break;case 7:c.moveTo(f.x,f.y)}}this.commands=null;this.rendered=new Ue;this.rendered.get_graphics().copyFrom(b.get_graphics());return b},__class__:Fo});var Oj=function(){this.frames=[]};h["openfl._internal.formats.animate.AnimateSpriteSymbol"]=Oj;Oj.__name__="openfl._internal.formats.animate.AnimateSpriteSymbol";Oj.__super__=tf;Oj.prototype=w(tf.prototype,{baseClassName:null,frames:null,scale9Grid:null,library:null,
__constructor:function(a){a.__timeline=new rl(a,this.library,this);a.set_scale9Grid(this.scale9Grid)},__createObject:function(a){ye.__constructor=v(this,this.__constructor);this.library=a;a=null;null!=this.className&&(a=h[this.className]);null==a&&null!=this.baseClassName&&(a=h[this.baseClassName]);return null!=a?rb.createInstance(a,[]):new ye},__initObject:function(a,b){this.library=a;this.__constructor(b)},__class__:Oj});var Go=function(){};h["openfl._internal.formats.animate.AnimateStaticTextSymbol"]=
Go;Go.__name__="openfl._internal.formats.animate.AnimateStaticTextSymbol";Go.__super__=tf;Go.prototype=w(tf.prototype,{matrix:null,records:null,rendered:null,__createObject:function(a){var b=new Ui,c=b.__graphics;if(null!=this.rendered)return b.text=this.rendered.text,c.copyFrom(this.rendered.__graphics),b;var d="";if(null!=this.records)for(var e=null,f=16777215,g=this.matrix.tx,k=this.matrix.ty,l,m,p=0,n=this.records;p<n.length;){var h=n[p];++p;null!=h.fontID&&(e=a.symbols.h[h.fontID]);null!=h.offset&&
(g=this.matrix.tx+.05*h.offset[0],k=this.matrix.ty+.05*h.offset[1]);null!=h.color&&(f=h.color);if(null!=e){l=h.fontHeight/1024*.05;for(var q=0,t=h.glyphs.length;q<t;){var r=q++;m=h.glyphs[r];d+=String.fromCodePoint(e.codes[m]);var u=0;for(m=e.glyphs[m];u<m.length;){var x=m[u];++u;switch(x._hx_index){case 1:c.beginFill(f&16777215,(f>>24&255)/255);break;case 3:c.curveTo(x.controlX*l+g,x.controlY*l+k,x.anchorX*l+g,x.anchorY*l+k);break;case 4:c.endFill();break;case 5:var v=x.miterLimit,w=x.joints,C=x.caps,
J=x.scaleMode,Q=x.pixelHinting,F=x.alpha,B=x.color;x=x.thickness;null!=x?c.lineStyle(x,B,F,Q,J,C,w,v):c.lineStyle();break;case 6:c.lineTo(x.x*l+g,x.y*l+k);break;case 7:c.moveTo(x.x*l+g,x.y*l+k)}}g+=.05*h.advances[r]}}}b.text=d;this.records=null;this.rendered=new Ui;this.rendered.text=d;this.rendered.__graphics.copyFrom(b.__graphics);return b},__class__:Go});var Ho=function(){};h["openfl._internal.utils.ITimeline"]=Ho;Ho.__name__="openfl._internal.utils.ITimeline";Ho.__isInterface__=!0;Ho.prototype=
{addFrameScript:null,enterFrame:null,gotoAndPlay:null,gotoAndStop:null,nextFrame:null,play:null,prevFrame:null,stop:null,__class__:Ho};var rl=function(a,b,c){this.__movieClip=a;this.__library=b;this.__symbol=c;this.__currentFrame=1;this.__currentLabels=[];this.__instanceFields=[];this.__totalFrames=0;this.__enabled=!0;this.init()};h["openfl._internal.formats.animate.AnimateTimeline"]=rl;rl.__name__="openfl._internal.formats.animate.AnimateTimeline";rl.__interfaces__=[Ho];rl.prototype={__activeInstances:null,
__activeInstancesByFrameObjectID:null,__currentFrame:null,__currentFrameLabel:null,__currentLabel:null,__currentLabels:null,__enabled:null,__frameScripts:null,__frameTime:null,__hasDown:null,__hasOver:null,__hasUp:null,__instanceFields:null,__lastFrameScriptEval:null,__lastFrameUpdate:null,__library:null,__mouseIsDown:null,__movieClip:null,__playing:null,__symbol:null,__timeElapsed:null,__totalFrames:null,addFrameScript:function(a,b){0>a||(a+=1,null!=b?(null==this.__frameScripts&&(this.__frameScripts=
new Wa),this.__frameScripts.h[a]=b):null!=this.__frameScripts&&this.__frameScripts.remove(a))},gotoAndPlay:function(a,b){this.play();this.__goto(this.__resolveFrameReference(a))},gotoAndStop:function(a,b){this.stop();this.__goto(this.__resolveFrameReference(a))},init:function(){if(null==this.__activeInstances){this.__activeInstances=[];this.__activeInstancesByFrameObjectID=new Wa;this.__currentFrame=1;this.__lastFrameUpdate=this.__lastFrameScriptEval=-1;this.__totalFrames=this.__symbol.frames.length;
for(var a,b,c=null,d=0,e=this.__symbol.frames.length;d<e;){var f=d++;a=f+1;b=this.__symbol.frames[f];null!=b.label&&this.__currentLabels.push(new sl(b.label,f+1));if(null!=b.script)null==this.__frameScripts&&(this.__frameScripts=new Wa),this.__frameScripts.h[a]=b.script;else if(null!=b.scriptSource){null==this.__frameScripts&&(this.__frameScripts=new Wa);try{null==c&&(c=new ii,c.allowTypes=!0);var g=[c.parseString(b.scriptSource)],k=[new Wn],l=k[0].variables;null!=q["this"]?l.setReserved("this",this):
l.h["this"]=this;var m=function(a,b){return function(){a[0].execute(b[0])}}(k,g);this.__frameScripts.h[a]=m}catch(n){ra.lastException=n,null!=this.__symbol.className?Ta.warn('Unable to evaluate frame script source for symbol "'+this.__symbol.className+'" frame '+a+"\n"+b.scriptSource,{fileName:"openfl/_internal/formats/animate/AnimateTimeline.hx",lineNumber:267,className:"openfl._internal.formats.animate.AnimateTimeline",methodName:"init"}):Ta.warn("Unable to evaluate frame script source:\n"+b.scriptSource,
{fileName:"openfl/_internal/formats/animate/AnimateTimeline.hx",lineNumber:272,className:"openfl._internal.formats.animate.AnimateTimeline",methodName:"init"})}}}b=0;for(c=this.__totalFrames;b<c;)if(d=b++,a=d+1,e=this.__symbol.frames[d],null!=e.objects)for(d=0,g=e.objects;d<g.length;)if(k=g[d],++d,0==k.type&&!this.__activeInstancesByFrameObjectID.h.hasOwnProperty(k.id)){e=null;f=!1;l=0;for(m=this.__activeInstances;l<m.length;){var p=m[l];++l;if(null!=p.displayObject&&p.characterID==k.symbol&&p.depth==
k.depth){e=p;f=!0;break}}null==e&&(l=this.__library.symbols.h[k.symbol],null!=l&&(l=l.__createObject(this.__library),null!=l&&(l.parent=this.__movieClip,l.stage=this.__movieClip.stage,null!=this.__movieClip.stage&&l.dispatchEvent(new da("addedToStage",!1,!1)),e=new fr(a,k.id,k.symbol,k.depth,l,k.clipDepth))));null!=e&&(this.__activeInstancesByFrameObjectID.h[k.id]=e,f||(this.__activeInstances.push(e),this.__updateDisplayObject(e.displayObject,k)))}1<this.__totalFrames&&this.play();this.enterFrame(0);
this.__instanceFields=rb.getInstanceFields(L.getClass(this.__movieClip));this.__updateInstanceFields()}},nextFrame:function(){this.stop();this.__goto(this.__currentFrame+1)},play:function(){null==this.__symbol||this.__playing||2>this.__totalFrames||(this.__playing=!0,this.__frameTime=1E3/this.__library.frameRate|0,this.__timeElapsed=0)},prevFrame:function(){this.stop();this.__goto(this.__currentFrame-1)},stop:function(){this.__playing=!1},enterFrame:function(a){this.__updateFrameScript(a);this.__updateSymbol(this.__currentFrame)},
__updateFrameScript:function(a){if(null!=this.__symbol&&this.__playing&&(a=this.__getNextFrame(a),this.__lastFrameScriptEval!=a))if(null!=this.__frameScripts){if(a<this.__currentFrame){if(!this.__evaluateFrameScripts(this.__totalFrames))return;this.__currentFrame=1}this.__evaluateFrameScripts(a)}else this.__currentFrame=a},__updateSymbol:function(a){if(null!=this.__symbol&&this.__currentFrame!=this.__lastFrameUpdate){this.__updateFrameLabel();for(var b=new Wa,c,d=0;d<a;)if(c=d++,c=this.__symbol.frames[c],
null!=c.objects)for(var e=0,f=c.objects;e<f.length;){var g=f[e];++e;switch(g.type){case 0:c=this.__activeInstancesByFrameObjectID.h[g.id];null!=c&&(b.h[g.id]=c,this.__updateDisplayObject(c.displayObject,g,!0));break;case 1:c=b.h[g.id];null!=c&&null!=c.displayObject&&this.__updateDisplayObject(c.displayObject,g);break;case 2:b.remove(g.id)}}a=[];d=[];for(c=b.iterator();c.hasNext();)b=c.next(),-1==a.indexOf(b)&&(a.push(b),0<b.clipDepth&&d.push(b));a.sort(v(this,this.__sortDepths));e=0;for(f=a.length;e<
f;){g=e++;var k=this.__movieClip.__children[g];c=a[g];b=c.depth;var l=c.displayObject;k!=l?(c=l,this.__movieClip.addChildAt(l,g)):c=this.__movieClip.__children[g];g=!1;for(k=0;k<d.length;)if(l=d[k],++k,b>l.depth&&b<=l.clipDepth){c.set_mask(l.displayObject);g=!0;break}0<d.length&&!g&&null!=c.get_mask()&&c.set_mask(null)}d=a.length;for(c=this.__movieClip.__children.length;d<c;){a=this.__movieClip.__children[d];b=0;for(e=this.__activeInstances;b<e.length;)f=e[b],++b,f.displayObject==a&&(a instanceof
ye&&a.gotoAndPlay(1),this.__movieClip.removeChild(a),--d,--c);++d}this.__lastFrameUpdate=this.__currentFrame;this.__updateInstanceFields()}},__evaluateFrameScripts:function(a){var b=this.__currentFrame;for(a+=1;b<a;){var c=b++;if(c!=this.__lastFrameScriptEval&&(this.__currentFrame=this.__lastFrameScriptEval=c,this.__frameScripts.h.hasOwnProperty(c)&&(this.__updateSymbol(c),(0,this.__frameScripts.h[c])(),this.__currentFrame!=c)||!this.__playing))return!1}return!0},__fromSymbol:function(a,b){},__getNextFrame:function(a){this.__timeElapsed+=
a;a=this.__currentFrame+Math.floor(this.__timeElapsed/this.__frameTime);1>a&&(a=1);a>this.__totalFrames&&(a=Math.floor((a-1)%this.__totalFrames)+1);this.__timeElapsed%=this.__frameTime;return a},__goto:function(a){null!=this.__symbol&&(1>a?a=1:a>this.__totalFrames&&(a=this.__totalFrames),this.__currentFrame=a,this.enterFrame(0))},__resolveFrameReference:function(a){if("number"==typeof a&&(a|0)===a)return a;if("string"==typeof a){for(var b=0,c=this.__currentLabels;b<c.length;){var d=c[b];++b;if(d.get_name()==
a)return d.get_frame()}throw new E(new zi("Error #2109: Frame label "+a+" not found in scene."));}throw new E("Invalid type for frame "+a.__name__);},__sortDepths:function(a,b){return a.depth-b.depth},__updateDisplayObject:function(a,b,c){null==c&&(c=!1);if(null!=a){null!=b.name&&a.set_name(b.name);null!=b.matrix&&a.get_transform().set_matrix(b.matrix);null!=b.colorTransform?a.get_transform().set_colorTransform(b.colorTransform):c&&!a.get_transform().get_colorTransform().__isDefault(!0)&&a.get_transform().set_colorTransform(new Sb);
a.set_transform(a.get_transform());if(null!=b.filters){c=[];for(var d=0,e=b.filters;d<e.length;){var f=e[d];++d;switch(f._hx_index){case 0:c.push(new wg(f.blurX,f.blurY,f.quality));break;case 1:c.push(new Sf(f.matrix));break;case 2:c.push(new ki(f.distance,f.angle,f.color,f.alpha,f.blurX,f.blurY,f.strength,f.quality,f.inner,f.knockout,f.hideObject));break;case 3:c.push(new se(f.color,f.alpha,f.blurX,f.blurY,f.strength,f.quality,f.inner,f.knockout))}}a.set_filters(c)}else a.set_filters(null);null!=
b.visible&&a.set_visible(b.visible);null!=b.blendMode&&a.set_blendMode(b.blendMode);null!=b.cacheAsBitmap&&a.set_cacheAsBitmap(b.cacheAsBitmap)}},__updateFrameLabel:function(){this.__currentFrameLabel=this.__symbol.frames[this.__currentFrame-1].label;if(null!=this.__currentFrameLabel)this.__currentLabel=this.__currentFrameLabel;else{this.__currentLabel=null;for(var a=0,b=this.__currentLabels;a<b.length;){var c=b[a];++a;if(c.get_frame()<this.__currentFrame)this.__currentLabel=c.get_name();else break}}},
__updateInstanceFields:function(){for(var a=0,b=this.__instanceFields;a<b.length;){var c=b[a];++a;for(var d=0,e=this.__movieClip.__children.length;d<e;){var f=d++;f=this.__movieClip.__children[f];if(f.get_name()==c){this.__movieClip[c]=f;break}}}},__class__:rl};var fr=function(a,b,c,d,e,f){this.initFrame=a;this.initFrameObjectID=b;this.characterID=c;this.depth=d;this.displayObject=e;this.clipDepth=f};h["openfl._internal.formats.animate._AnimateTimeline.FrameSymbolInstance"]=fr;fr.__name__="openfl._internal.formats.animate._AnimateTimeline.FrameSymbolInstance";
fr.prototype={characterID:null,clipDepth:null,depth:null,displayObject:null,initFrame:null,initFrameObjectID:null,__class__:fr};var tl=function(a,b){this.version=0;a.position=b;var c=a.readUTFBytes(3);a.position=b;if("ATF"!=c)throw new E(new dd("ATF signature not found"));255==a.b[b+6]?(this.version=a.b[b+7],a.position=b+8,c=this.__readUInt32(a)):(this.version=0,a.position=b+3,c=this.__readUInt24(a));if(Da.gt(L.__cast(b+c,Hg),za.get_length(a)))throw new E(new dd("ATF length exceeds byte array length"));
this.data=a};h["openfl._internal.formats.atf.ATFReader"]=tl;tl.__name__="openfl._internal.formats.atf.ATFReader";tl.prototype={atfFormat:null,cubeMap:null,data:null,height:null,mipCount:null,version:null,width:null,readHeader:function(a,b,c){var d=this.data.readUnsignedByte(),e=d>>>7;if(!c&&0!=e)throw new E(new dd("ATF Cube map not expected"));if(c&&1!=e)throw new E(new dd("ATF Cube map expected"));this.cubeMap=c;this.atfFormat=d&127;3!=this.atfFormat&&5!=this.atfFormat&&Ta.warn("Only ATF block compressed textures without JPEG-XR+LZMA are supported",
{fileName:"openfl/_internal/formats/atf/ATFReader.hx",lineNumber:96,className:"openfl._internal.formats.atf.ATFReader",methodName:"readHeader"});this.width=1<<this.data.readUnsignedByte();this.height=1<<this.data.readUnsignedByte();if(this.width!=a||this.height!=b)throw new E(new dd("ATF width and height dont match"));this.mipCount=this.data.readUnsignedByte();return 5==this.atfFormat},readTextures:function(a){for(var b=3>this.version?3:4,c=0,d=this.cubeMap?6:1;c<d;)for(var e=c++,f=0,g=this.mipCount;f<
g;)for(var k=f++,l=0,m=b;l<m;){var p=l++,n=0==this.version?this.__readUInt24(this.data):this.__readUInt32(this.data);if(Da.gt(this.data.position+n,za.get_length(this.data)))throw new E(new dd("Block length exceeds ATF file length"));if(Da.gt(n,0)){var h=new hb(new ArrayBuffer(n)),q=this.data,t=za.fromBytes(h),r=0,u=n;null==u&&(u=0);null==r&&(r=0);q.readBytes(t,r,u);a(e,k,p,this.width>>k,this.height>>k,n,h)}}},__readUInt24:function(a){var b=a.readUnsignedByte()<<16;b|=a.readUnsignedByte()<<8;return b|=
a.readUnsignedByte()},__readUInt32:function(a){var b=a.readUnsignedByte()<<24;b|=a.readUnsignedByte()<<16;b|=a.readUnsignedByte()<<8;return b|=a.readUnsignedByte()},__class__:tl};var sb=function(){};h["openfl._internal.formats.html.HTMLParser"]=sb;sb.__name__="openfl._internal.formats.html.HTMLParser";sb.parse=function(a,b,c){a=a.replace(sb.__regexBreakTag.r,"\n");a=a.replace(sb.__regexEntities[0].r,'"');a=a.replace(sb.__regexEntities[1].r,"'");a=a.replace(sb.__regexEntities[2].r,"&");a=a.replace(sb.__regexEntities[5].r,
" ");var d=a.split("<");if(1==d.length)a=a.replace(sb.__regexHTMLTag.r,""),1<c.get_length()&&c.splice(1,c.get_length()-1),a=a.replace(sb.__regexEntities[3].r,"<"),a=a.replace(sb.__regexEntities[4].r,">"),c=c.get(0),c.format=b,c.start=0,c.end=a.length;else{c.splice(0,c.get_length());a="";for(var e,f=0,g=d.length;f<g;){var k=f++;e=d[k];e=e.replace(sb.__regexEntities[3].r,"<");e=e.replace(sb.__regexEntities[4].r,">");d[k]=e}e=[b.clone()];f=[];k=!1;for(g=0;g<d.length;){var l=d[g];++g;if(""!=l){var m=
"/"==B.substr(l,0,1),p=l.indexOf(">"),n=p+1,h=l.indexOf(" ");h=l.substring(m?1:0,-1<h&&h<p?h:p);if(m)0==f.length||h.toLowerCase()!=f[f.length-1].toLowerCase()?Ta.info("Invalid HTML, unexpected closing tag ignored: "+h,{fileName:"openfl/_internal/formats/html/HTMLParser.hx",lineNumber:97,className:"openfl._internal.formats.html.HTMLParser",methodName:"parse"}):(f.pop(),e.pop(),m=e[e.length-1].clone(),"p"==h.toLowerCase()&&0<c.get_length()&&(a+="\n",k=!0,c.get(c.get_length()-1).end++),n<l.length&&(k=
B.substr(l,n,null),c.push(new Gh(m,a.length,a.length+k.length)),a+=k,k=!1));else if(m=e[e.length-1].clone(),-1<p){switch(h.toLowerCase()){case "a":sb.__regexHref.match(l)&&(m.url=sb.__getAttributeMatch(sb.__regexHref));break;case "b":m.bold=!0;break;case "em":case "i":m.italic=!0;break;case "font":sb.__regexFace.match(l)&&(m.font=sb.__getAttributeMatch(sb.__regexFace));sb.__regexColor.match(l)&&(m.color=K.parseInt("0x"+sb.__getAttributeMatch(sb.__regexColor)));if(sb.__regexSize.match(l)){p=sb.__getAttributeMatch(sb.__regexSize);
var q=B.cca(p,0);m.size=43==q||45==q?(2<=e.length?e[e.length-2]:b).size+K.parseInt(p):K.parseInt(p)}break;case "p":0<c.get_length()&&!k&&(a+="\n");sb.__regexAlign.match(l)&&(p=sb.__getAttributeMatch(sb.__regexAlign).toLowerCase(),m.align=Hh.fromString(p));break;case "textformat":sb.__regexBlockIndent.match(l)&&(m.blockIndent=K.parseInt(sb.__getAttributeMatch(sb.__regexBlockIndent)));sb.__regexIndent.match(l)&&(m.indent=K.parseInt(sb.__getAttributeMatch(sb.__regexIndent)));sb.__regexLeading.match(l)&&
(m.leading=K.parseInt(sb.__getAttributeMatch(sb.__regexLeading)));sb.__regexLeftMargin.match(l)&&(m.leftMargin=K.parseInt(sb.__getAttributeMatch(sb.__regexLeftMargin)));sb.__regexRightMargin.match(l)&&(m.rightMargin=K.parseInt(sb.__getAttributeMatch(sb.__regexRightMargin)));if(sb.__regexTabStops.match(l)){p=sb.__getAttributeMatch(sb.__regexTabStops).split(" ");q=[];for(var t=0;t<p.length;){var r=p[t];++t;q.push(K.parseInt(r))}m.tabStops=q}break;case "u":m.underline=!0}e.push(m);f.push(h);n<l.length&&
(k=l.substring(n),c.push(new Gh(m,a.length,a.length+k.length)),a+=k,k=!1)}else c.push(new Gh(m,a.length,a.length+l.length)),a+=l,k=!1}}0==c.get_length()&&c.push(new Gh(e[0],0,0))}return a};sb.__getAttributeMatch=function(a){return null!=a.matched(2)?a.matched(2):a.matched(3)};C["openfl._internal.formats.swf.FilterType"]={__ename__:"openfl._internal.formats.swf.FilterType",__constructs__:["BlurFilter","ColorMatrixFilter","DropShadowFilter","GlowFilter"],BlurFilter:(x=function(a,b,c){return{_hx_index:0,
blurX:a,blurY:b,quality:c,__enum__:"openfl._internal.formats.swf.FilterType",toString:u}},x.__params__=["blurX","blurY","quality"],x),ColorMatrixFilter:(x=function(a){return{_hx_index:1,matrix:a,__enum__:"openfl._internal.formats.swf.FilterType",toString:u}},x.__params__=["matrix"],x),DropShadowFilter:(x=function(a,b,c,d,e,f,g,k,l,m,p){return{_hx_index:2,distance:a,angle:b,color:c,alpha:d,blurX:e,blurY:f,strength:g,quality:k,inner:l,knockout:m,hideObject:p,__enum__:"openfl._internal.formats.swf.FilterType",
toString:u}},x.__params__="distance angle color alpha blurX blurY strength quality inner knockout hideObject".split(" "),x),GlowFilter:(x=function(a,b,c,d,e,f,g,k){return{_hx_index:3,color:a,alpha:b,blurX:c,blurY:d,strength:e,quality:f,inner:g,knockout:k,__enum__:"openfl._internal.formats.swf.FilterType",toString:u}},x.__params__="color alpha blurX blurY strength quality inner knockout".split(" "),x)};var Jf=function(){this.symbols=new Wa;this.symbolsByClassName=new ua};h["openfl._internal.formats.swf.SWFLite"]=
Jf;Jf.__name__="openfl._internal.formats.swf.SWFLite";Jf.resolveClass=function(a){var b=h[a];null==b&&(b=ba.replace(a,"openfl._legacy","openfl"),b=h[b]);null==b&&(a=ba.replace(a,"openfl._v2","openfl"),b=h[a]);return b};Jf.resolveEnum=function(a){var b=C[a];null==b&&(b=ba.replace(a,"openfl._legacy","openfl"),b=C[b]);null==b&&(a=ba.replace(a,"openfl._v2","openfl"),b=C[a]);return b};Jf.unserialize=function(a){if(null==a)return null;a=new af(a);a.setResolver({resolveClass:Jf.resolveClass,resolveEnum:Jf.resolveEnum});
a=a.unserialize();null!=a&&a.__init();return a};Jf.prototype={frameRate:null,library:null,root:null,symbols:null,symbolsByClassName:null,createButton:function(a){return null},createMovieClip:function(a){null==a&&(a="");if(""==a)return this.root.__createObject(this);var b=this.symbolsByClassName;a=null!=q[a]?b.getReserved(a):b.h[a];return null!=a&&a instanceof ul?L.__cast(a,ul).__createObject(this):null},getBitmapData:function(a){var b=this.symbolsByClassName;a=null!=q[a]?b.getReserved(a):b.h[a];return null!=
a&&a instanceof eh?Ea.getBitmapData(a.path):null},hasSymbol:function(a){var b=this.symbolsByClassName;return null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a)},serialize:function(){var a=new Id;a.serialize(this);return a.toString()},__init:function(){if(null!=this.symbols){null==this.symbolsByClassName&&(this.symbolsByClassName=new ua);for(var a=this.symbols.iterator();a.hasNext();){var b=a.next();if(null!=b&&null!=b.className){var c=b.className,d=this.symbolsByClassName;null!=q[c]?d.setReserved(c,
b):d.h[c]=b}}}},__class__:Jf};var Io=function(a,b){bc.call(this);this.id=a;this.instanceID=null!=b?b:a;this.alphaCheck=new ua;this.imageClassNames=new ua;this.rootPath=""};h["openfl._internal.formats.swf.SWFLiteLibrary"]=Io;Io.__name__="openfl._internal.formats.swf.SWFLiteLibrary";Io.__super__=kc;Io.prototype=w(kc.prototype,{alphaCheck:null,id:null,imageClassNames:null,instanceID:null,preloading:null,rootPath:null,swf:null,exists:function(a,b){return null==this.swf?!1:""==a&&"MOVIE_CLIP"==b?!0:"IMAGE"!=
b&&"MOVIE_CLIP"!=b||null==this.swf?!1:this.swf.hasSymbol(a)},getImage:function(a){var b=this.imageClassNames;if(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))b=this.imageClassNames,a=null!=q[a]?b.getReserved(a):b.h[a];b=this.alphaCheck;if(null!=q[a]?!b.existsReserved(a):!b.h.hasOwnProperty(a)){for(var c=this.swf.symbols.iterator();c.hasNext();)if(b=c.next(),b instanceof eh&&L.__cast(b,eh).path==a&&null!=b.alpha){c=kc.prototype.getImage.call(this,a);var d=kc.prototype.getImage.call(this,b.alpha);
this.__copyChannel(c,d);d=this.cachedImages;null!=q[a]?d.setReserved(a,c):d.h[a]=c;this.cachedImages.remove(b.alpha);b=this.alphaCheck;null!=q[a]?b.setReserved(a,!0):b.h[a]=!0;return c}b=this.alphaCheck;null!=q[a]?b.setReserved(a,!0):b.h[a]=!0}return kc.prototype.getImage.call(this,a)},getMovieClip:function(a){return null!=this.swf?this.swf.createMovieClip(a):null},isLocal:function(a,b){return!0},load:function(){var a=this;if(null!=this.id){var b=this.id,c=this.preload;null!=q[b]?c.setReserved(b,
!0):c.h[b]=!0}var d=new Jd;this.preloading=!0;var e=function(b){var c=a.id,e=a.cachedText;null!=q[c]?e.setReserved(c,b):e.h[c]=b;a.swf=Jf.unserialize(b);a.swf.library=a;for(b=a.swf.symbols.iterator();b.hasNext();)if(c=b.next(),c instanceof eh&&(e=c,null!=e.className)){c=e.className;e=e.path;var f=a.imageClassNames;null!=q[c]?f.setReserved(c,e):f.h[c]=e}b=a.instanceID;c=a.swf;e=Jf.instances;null!=q[b]?e.setReserved(b,c):e.h[b]=c;a.__load().onProgress(v(d,d.progress)).onError(v(d,d.error)).onComplete(function(b){a.preloading=
!1;d.complete(a)})};if(Ea.exists(this.id)){for(b=this.paths.keys();b.hasNext();){c=b.next();var f=this.preload;null!=q[c]?f.setReserved(c,!0):f.h[c]=!0}this.loadText(this.id).onError(v(d,d.error)).onComplete(e)}else{for(b=this.paths.keys();b.hasNext();)c=b.next(),f=this.preload,null!=q[c]?f.setReserved(c,!0):f.h[c]=!0;b=null;b=this.id;c=this.paths;(null!=q[b]?c.existsReserved(b):c.h.hasOwnProperty(b))?(b=this.id,c=this.paths,b=null!=q[b]?c.getReserved(b):c.h[b]):b=null!=this.rootPath&&""!=this.rootPath?
this.rootPath+"/"+this.id:this.id;var g=new Zg;g.addEventListener("complete",function(a){e(g.data)});g.addEventListener("ioError",function(a){d.error(a)});g.load(new Jg(b))}return d.future},loadImage:function(a){var b=this,c=this.imageClassNames;if(null!=q[a]?c.existsReserved(a):c.h.hasOwnProperty(a))c=this.imageClassNames,a=null!=q[a]?c.getReserved(a):c.h[a];this.preloading?c=!1:(c=this.alphaCheck,c=!(null!=q[a]?c.existsReserved(a):c.h.hasOwnProperty(a)));if(c)for(c=this.swf.symbols.iterator();c.hasNext();){var d=
c.next();if(d instanceof eh&&L.__cast(d,eh).path==a){d=[d];if(null!=d[0].alpha)return c=[new Jd],this.__loadImage(a).onError((x=c[0],v(x,x.error))).onComplete(function(c,d){return function(e){b.__loadImage(d[0].alpha).onError((x=c[0],v(x,x.error))).onComplete(function(c,d){return function(f){b.__copyChannel(e,f);f=b.cachedImages;null!=q[a]?f.setReserved(a,e):f.h[a]=e;b.cachedImages.remove(d[0].alpha);f=b.alphaCheck;null!=q[a]?f.setReserved(a,!0):f.h[a]=!0;c[0].complete(e)}}(c,d))}}(c,d)),c[0].future;
d=this.alphaCheck;null!=q[a]?d.setReserved(a,!0):d.h[a]=!0}}return kc.prototype.loadImage.call(this,a)},unload:function(){if(null!=this.swf){var a=this.instanceID;var b=Jf.instances;(null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a))?(a=this.instanceID,b=Jf.instances,a=(null!=q[a]?b.getReserved(a):b.h[a])==this.swf):a=!1;a&&Jf.instances.remove(this.instanceID);for(a=this.swf.symbols.iterator();a.hasNext();)b=a.next(),b instanceof eh&&Ea.cache.removeBitmapData(b.path)}},__copyChannel:function(a,
b){null!=b&&a.copyChannel(b,b.get_rect(),new Gd,Af.RED,Af.ALPHA);a.buffer.premultiplied=!0;a.set_premultiplied(!1)},__fromManifest:function(a){this.rootPath=a.rootPath;kc.prototype.__fromManifest.call(this,a);this.bytesTotal=0;for(a=this.paths.keys();a.hasNext();){var b=a.next(),c=this.sizes;this.bytesTotal+=null!=q[b]?c.getReserved(b):c.h[b]}},__load:function(){return kc.prototype.load.call(this)},__loadImage:function(a){return kc.prototype.loadImage.call(this,a)},__class__:Io});var vf=C["openfl._internal.formats.swf.ShapeCommand"]=
{__ename__:"openfl._internal.formats.swf.ShapeCommand",__constructs__:"BeginBitmapFill BeginFill BeginGradientFill CurveTo EndFill LineStyle LineTo MoveTo".split(" "),BeginBitmapFill:(x=function(a,b,c,d){return{_hx_index:0,bitmap:a,matrix:b,repeat:c,smooth:d,__enum__:"openfl._internal.formats.swf.ShapeCommand",toString:u}},x.__params__=["bitmap","matrix","repeat","smooth"],x),BeginFill:(x=function(a,b){return{_hx_index:1,color:a,alpha:b,__enum__:"openfl._internal.formats.swf.ShapeCommand",toString:u}},
x.__params__=["color","alpha"],x),BeginGradientFill:(x=function(a,b,c,d,e,f,g,k){return{_hx_index:2,fillType:a,colors:b,alphas:c,ratios:d,matrix:e,spreadMethod:f,interpolationMethod:g,focalPointRatio:k,__enum__:"openfl._internal.formats.swf.ShapeCommand",toString:u}},x.__params__="fillType colors alphas ratios matrix spreadMethod interpolationMethod focalPointRatio".split(" "),x),CurveTo:(x=function(a,b,c,d){return{_hx_index:3,controlX:a,controlY:b,anchorX:c,anchorY:d,__enum__:"openfl._internal.formats.swf.ShapeCommand",
toString:u}},x.__params__=["controlX","controlY","anchorX","anchorY"],x),EndFill:{_hx_index:4,__enum__:"openfl._internal.formats.swf.ShapeCommand",toString:u},LineStyle:(x=function(a,b,c,d,e,f,g,k){return{_hx_index:5,thickness:a,color:b,alpha:c,pixelHinting:d,scaleMode:e,caps:f,joints:g,miterLimit:k,__enum__:"openfl._internal.formats.swf.ShapeCommand",toString:u}},x.__params__="thickness color alpha pixelHinting scaleMode caps joints miterLimit".split(" "),x),LineTo:(x=function(a,b){return{_hx_index:6,
x:a,y:b,__enum__:"openfl._internal.formats.swf.ShapeCommand",toString:u}},x.__params__=["x","y"],x),MoveTo:(x=function(a,b){return{_hx_index:7,x:a,y:b,__enum__:"openfl._internal.formats.swf.ShapeCommand",toString:u}},x.__params__=["x","y"],x)},Jo=function(a,b){null==a&&(a=2);this.__lifetime=a;this.__context=b;this.__bitmapData=new Wa;this.__bitmapDataAge=new Aa;this.__bitmapDataList=[]};h["openfl._internal.renderer.BitmapDataPool"]=Jo;Jo.__name__="openfl._internal.renderer.BitmapDataPool";Jo.prototype=
{__bitmapData:null,__bitmapDataAge:null,__bitmapDataList:null,__context:null,__lifetime:null,cleanup:function(){for(var a=0,b=this.__bitmapDataList;a<b.length;){var c=b[a];++a;var d=this.__bitmapDataAge.h[c.__id__];d>=this.__lifetime?(this.__bitmapData.h[c.width].h[c.height].remove(c),c.dispose(),this.__bitmapDataAge.remove(c),B.remove(this.__bitmapDataList,c)):-1<d&&this.__bitmapDataAge.set(c,d+1)}},get:function(a,b){var c=this.__bitmapData.h[a];if(null==c){c=this.__bitmapData;var d=new Wa;c=c.h[a]=
d}d=c.h[b];if(null==d){var e=v(this,this.__createBitmapData);d=new Ma(function(){return e(a,b)},v(this,this.__cleanBitmapData));c.h[b]=d}c=d.get();if(null==c)return null;null==this.__bitmapDataAge.h.__keys__[c.__id__]&&this.__bitmapDataList.push(c);this.__bitmapDataAge.set(c,-1);return c},release:function(a){null!=this.__bitmapDataAge.h.__keys__[a.__id__]&&(this.__bitmapData.h[a.width].h[a.height].release(a),this.__bitmapDataAge.set(a,0))},__cleanBitmapData:function(a){a.fillRect(a.rect,0)},__createBitmapData:function(a,
b){return null!=this.__context?(a=this.__context.createRectangleTexture(a,b,1,!0),na.fromTexture(a)):new na(a,b,!0,0)},__class__:Jo};var df=function(){this.__dirty=!0;this.t_i=this.b_i=this.f_i=this.ff_i=this.i_i=this.ii_i=this.o_i=this.__lastLength=0;null==df.empty?(this.types=[],this.b=[],this.i=[],this.f=[],this.o=[],this.ff=[],this.ii=[],this.objVersions=[],this.copyOnWrite=!0):this.__initFromEmpty()};h["openfl._internal.renderer.DrawCommandBuffer"]=df;df.__name__="openfl._internal.renderer.DrawCommandBuffer";
df.prototype={__replace_openfl_display_TriangleCulling:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_openfl_Vector_Int:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_openfl_Vector_Float:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_openfl__internal_renderer_ShaderBuffer:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_openfl_display_JointStyle:function(a,
b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_openfl_display_CapsStyle:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_openfl_display_LineScaleMode:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_Bool:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_openfl_display_InterpolationMethod:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&
(this.__dirty=!0);a[b]=c},__replace_openfl_display_SpreadMethod:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_Array_Float:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_Array_Int:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_openfl_display_GradientType:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_Int:function(a,b,c){!this.__dirty&&
(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_Float:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},__replace_openfl__internal_renderer_DrawCommandType:function(a,b,c){!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},dirty:null,types:null,b:null,copyOnWrite:null,f:null,ff:null,i:null,ii:null,o:null,t_i:null,b_i:null,f_i:null,ff_i:null,i_i:null,ii_i:null,o_i:null,objVersions:null,__lastLength:null,__dirty:null,append:function(a){if(0==
this.get_length())return this.types=a.types,this.b=a.b,this.i=a.i,this.f=a.f,this.o=a.o,this.ff=a.ff,this.ii=a.ii,this.t_i=a.t_i,this.b_i=a.b_i,this.f_i=a.f_i,this.ff_i=a.ff_i,this.i_i=a.i_i,this.ii_i=a.ii_i,this.o_i=a.o_i,this.objVersions=a.objVersions,this.copyOnWrite=a.copyOnWrite=!0,a;for(var b=new xg(a),c=0,d=a.types;c<d.length;){var e=d[c];++c;switch(e._hx_index){case 0:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=
1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.BEGIN_BITMAP_FILL;e=
b;this.beginBitmapFill(e.buffer.o[e.oPos],e.buffer.o[e.oPos+1],e.buffer.b[e.bPos],e.buffer.b[e.bPos+1]);break;case 1:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=
2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.BEGIN_FILL;e=b;this.beginFill(e.buffer.i[e.iPos],e.buffer.f[e.fPos]);break;case 2:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=
4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.BEGIN_GRADIENT_FILL;e=b;this.beginGradientFill(e.buffer.o[e.oPos],e.buffer.ii[e.iiPos],e.buffer.ff[e.ffPos],
e.buffer.ii[e.iiPos+1],e.buffer.o[e.oPos+1],e.buffer.o[e.oPos+2],e.buffer.o[e.oPos+3],e.buffer.f[e.fPos]);break;case 3:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;
b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.BEGIN_SHADER_FILL;e=b;this.beginShaderFill(e.buffer.o[e.oPos]);break;case 4:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=
4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.CUBIC_CURVE_TO;e=b;this.cubicCurveTo(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1],e.buffer.f[e.fPos+2],e.buffer.f[e.fPos+
3],e.buffer.f[e.fPos+4],e.buffer.f[e.fPos+5]);break;case 5:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=
1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.CURVE_TO;e=b;this.curveTo(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1],e.buffer.f[e.fPos+2],e.buffer.f[e.fPos+3]);break;case 6:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=
3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.DRAW_CIRCLE;e=b;this.drawCircle(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1],e.buffer.f[e.fPos+2]);break;case 7:switch(b.prev._hx_index){case 0:b.oPos+=
2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=
2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.DRAW_ELLIPSE;e=b;this.drawEllipse(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1],e.buffer.f[e.fPos+2],e.buffer.f[e.fPos+3]);break;case 8:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=
5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.DRAW_QUADS;e=b;this.drawQuads(e.buffer.o[e.oPos],e.buffer.o[e.oPos+1],e.buffer.o[e.oPos+2]);break;case 9:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=
2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.DRAW_RECT;
e=b;this.drawRect(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1],e.buffer.f[e.fPos+2],e.buffer.f[e.fPos+3]);break;case 10:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=
2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.DRAW_ROUND_RECT;e=b;this.drawRoundRect(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1],e.buffer.f[e.fPos+2],e.buffer.f[e.fPos+3],e.buffer.f[e.fPos+4],e.buffer.o[e.oPos]);break;case 12:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;
b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.DRAW_TRIANGLES;
e=b;this.drawTriangles(e.buffer.o[e.oPos],e.buffer.o[e.oPos+1],e.buffer.o[e.oPos+2],e.buffer.o[e.oPos+3]);break;case 13:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=
2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.END_FILL;this.endFill();break;case 14:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;
case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.LINE_BITMAP_STYLE;e=b;this.lineBitmapStyle(e.buffer.o[e.oPos],e.buffer.o[e.oPos+1],e.buffer.b[e.bPos],e.buffer.b[e.bPos+1]);break;
case 15:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;
b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.LINE_GRADIENT_STYLE;e=b;this.lineGradientStyle(e.buffer.o[e.oPos],e.buffer.ii[e.iiPos],e.buffer.ff[e.ffPos],e.buffer.ii[e.iiPos+1],e.buffer.o[e.oPos+1],e.buffer.o[e.oPos+2],e.buffer.o[e.oPos+3],e.buffer.f[e.fPos]);break;case 16:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=
1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.LINE_STYLE;e=b;this.lineStyle(e.buffer.o[e.oPos],e.buffer.i[e.iPos],
e.buffer.f[e.fPos],e.buffer.b[e.bPos],e.buffer.o[e.oPos+1],e.buffer.o[e.oPos+2],e.buffer.o[e.oPos+3],e.buffer.f[e.fPos+1]);break;case 17:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;
case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.LINE_TO;e=b;this.lineTo(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1]);break;case 18:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=
6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.MOVE_TO;e=b;this.moveTo(e.buffer.f[e.fPos],e.buffer.f[e.fPos+1]);break;case 20:switch(b.prev._hx_index){case 0:b.oPos+=
2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=
2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.OVERRIDE_MATRIX;e=b;this.overrideMatrix(e.buffer.o[e.oPos]);break;case 21:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=
2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.WINDING_EVEN_ODD;this.windingEvenOdd();break;case 22:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=
3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.WINDING_NON_ZERO;this.windingNonZero()}}b.destroy();return a},beginBitmapFill:function(a,b,c,d){this.prepareWrite();var e=
this.types,f=this.t_i++,g=ka.BEGIN_BITMAP_FILL;!this.__dirty&&(f>=e.length||e[f]!=g)&&(this.__dirty=!0);e[f]=g;e=this.o;f=this.o_i++;!this.__dirty&&(f>=e.length||a!=e[f]||a.image.version!=this.objVersions[f])&&(this.__dirty=!0);for(e[f]=a;this.objVersions.length<f;)this.objVersions.push(0);this.objVersions[f]=a.image.version;a=this.o;e=this.o_i++;this.__dirty||!(e>=a.length)&&b.equals(a[e])||(this.__dirty=!0);a[e]=b;b=this.b;a=this.b_i++;!this.__dirty&&(a>=b.length||b[a]!=c)&&(this.__dirty=!0);b[a]=
c;c=this.b;b=this.b_i++;!this.__dirty&&(b>=c.length||c[b]!=d)&&(this.__dirty=!0);c[b]=d},beginFill:function(a,b){this.prepareWrite();var c=this.types,d=this.t_i++,e=ka.BEGIN_FILL;!this.__dirty&&(d>=c.length||c[d]!=e)&&(this.__dirty=!0);c[d]=e;c=this.i;d=this.i_i++;!this.__dirty&&(d>=c.length||c[d]!=a)&&(this.__dirty=!0);c[d]=a;a=this.f;c=this.f_i++;!this.__dirty&&(c>=a.length||a[c]!=b)&&(this.__dirty=!0);a[c]=b},beginGradientFill:function(a,b,c,d,e,f,g,k){this.prepareWrite();var l=this.types,m=this.t_i++,
p=ka.BEGIN_GRADIENT_FILL;!this.__dirty&&(m>=l.length||l[m]!=p)&&(this.__dirty=!0);l[m]=p;l=this.o;m=this.o_i++;!this.__dirty&&(m>=l.length||l[m]!=a)&&(this.__dirty=!0);l[m]=a;a=this.ii;l=this.ii_i++;!this.__dirty&&(l>=a.length||a[l]!=b)&&(this.__dirty=!0);a[l]=b;b=this.ff;a=this.ff_i++;!this.__dirty&&(a>=b.length||b[a]!=c)&&(this.__dirty=!0);b[a]=c;c=this.ii;b=this.ii_i++;!this.__dirty&&(b>=c.length||c[b]!=d)&&(this.__dirty=!0);c[b]=d;d=this.o;c=this.o_i++;this.__dirty||!(c>=d.length)&&e.equals(d[c])||
(this.__dirty=!0);d[c]=e;e=this.o;d=this.o_i++;!this.__dirty&&(d>=e.length||e[d]!=f)&&(this.__dirty=!0);e[d]=f;f=this.o;e=this.o_i++;!this.__dirty&&(e>=f.length||f[e]!=g)&&(this.__dirty=!0);f[e]=g;g=this.f;f=this.f_i++;!this.__dirty&&(f>=g.length||g[f]!=k)&&(this.__dirty=!0);g[f]=k},beginShaderFill:function(a){this.prepareWrite();var b=this.types,c=this.t_i++,d=ka.BEGIN_SHADER_FILL;!this.__dirty&&(c>=b.length||b[c]!=d)&&(this.__dirty=!0);b[c]=d;b=this.o;c=this.o_i++;!this.__dirty&&(c>=b.length||b[c]!=
a)&&(this.__dirty=!0);b[c]=a},clear:function(){this.o_i=this.ii_i=this.i_i=this.ff_i=this.f_i=this.b_i=this.t_i=0},copy:function(){var a=new df;a.append(this);return a},cubicCurveTo:function(a,b,c,d,e,f){this.prepareWrite();var g=this.types,k=this.t_i++,l=ka.CUBIC_CURVE_TO;!this.__dirty&&(k>=g.length||g[k]!=l)&&(this.__dirty=!0);g[k]=l;g=this.f;k=this.f_i++;!this.__dirty&&(k>=g.length||g[k]!=a)&&(this.__dirty=!0);g[k]=a;a=this.f;g=this.f_i++;!this.__dirty&&(g>=a.length||a[g]!=b)&&(this.__dirty=!0);
a[g]=b;b=this.f;a=this.f_i++;!this.__dirty&&(a>=b.length||b[a]!=c)&&(this.__dirty=!0);b[a]=c;c=this.f;b=this.f_i++;!this.__dirty&&(b>=c.length||c[b]!=d)&&(this.__dirty=!0);c[b]=d;d=this.f;c=this.f_i++;!this.__dirty&&(c>=d.length||d[c]!=e)&&(this.__dirty=!0);d[c]=e;e=this.f;d=this.f_i++;!this.__dirty&&(d>=e.length||e[d]!=f)&&(this.__dirty=!0);e[d]=f},curveTo:function(a,b,c,d){this.prepareWrite();var e=this.types,f=this.t_i++,g=ka.CURVE_TO;!this.__dirty&&(f>=e.length||e[f]!=g)&&(this.__dirty=!0);e[f]=
g;e=this.f;f=this.f_i++;!this.__dirty&&(f>=e.length||e[f]!=a)&&(this.__dirty=!0);e[f]=a;a=this.f;e=this.f_i++;!this.__dirty&&(e>=a.length||a[e]!=b)&&(this.__dirty=!0);a[e]=b;b=this.f;a=this.f_i++;!this.__dirty&&(a>=b.length||b[a]!=c)&&(this.__dirty=!0);b[a]=c;c=this.f;b=this.f_i++;!this.__dirty&&(b>=c.length||c[b]!=d)&&(this.__dirty=!0);c[b]=d},destroy:function(){this.ii=this.ff=this.o=this.f=this.i=this.b=this.types=null},drawCircle:function(a,b,c){this.prepareWrite();var d=this.types,e=this.t_i++,
f=ka.DRAW_CIRCLE;!this.__dirty&&(e>=d.length||d[e]!=f)&&(this.__dirty=!0);d[e]=f;d=this.f;e=this.f_i++;!this.__dirty&&(e>=d.length||d[e]!=a)&&(this.__dirty=!0);d[e]=a;a=this.f;d=this.f_i++;!this.__dirty&&(d>=a.length||a[d]!=b)&&(this.__dirty=!0);a[d]=b;b=this.f;a=this.f_i++;!this.__dirty&&(a>=b.length||b[a]!=c)&&(this.__dirty=!0);b[a]=c},drawEllipse:function(a,b,c,d){this.prepareWrite();var e=this.types,f=this.t_i++,g=ka.DRAW_ELLIPSE;!this.__dirty&&(f>=e.length||e[f]!=g)&&(this.__dirty=!0);e[f]=g;
e=this.f;f=this.f_i++;!this.__dirty&&(f>=e.length||e[f]!=a)&&(this.__dirty=!0);e[f]=a;a=this.f;e=this.f_i++;!this.__dirty&&(e>=a.length||a[e]!=b)&&(this.__dirty=!0);a[e]=b;b=this.f;a=this.f_i++;!this.__dirty&&(a>=b.length||b[a]!=c)&&(this.__dirty=!0);b[a]=c;c=this.f;b=this.f_i++;!this.__dirty&&(b>=c.length||c[b]!=d)&&(this.__dirty=!0);c[b]=d},drawQuads:function(a,b,c){this.prepareWrite();var d=this.types,e=this.t_i++,f=ka.DRAW_QUADS;!this.__dirty&&(e>=d.length||d[e]!=f)&&(this.__dirty=!0);d[e]=f;
d=this.o;e=this.o_i++;!this.__dirty&&(e>=d.length||d[e]!=a)&&(this.__dirty=!0);d[e]=a;a=this.o;d=this.o_i++;!this.__dirty&&(d>=a.length||a[d]!=b)&&(this.__dirty=!0);a[d]=b;b=this.o;a=this.o_i++;!this.__dirty&&(a>=b.length||b[a]!=c)&&(this.__dirty=!0);b[a]=c},drawRect:function(a,b,c,d){this.prepareWrite();var e=this.types,f=this.t_i++,g=ka.DRAW_RECT;!this.__dirty&&(f>=e.length||e[f]!=g)&&(this.__dirty=!0);e[f]=g;e=this.f;f=this.f_i++;!this.__dirty&&(f>=e.length||e[f]!=a)&&(this.__dirty=!0);e[f]=a;
a=this.f;e=this.f_i++;!this.__dirty&&(e>=a.length||a[e]!=b)&&(this.__dirty=!0);a[e]=b;b=this.f;a=this.f_i++;!this.__dirty&&(a>=b.length||b[a]!=c)&&(this.__dirty=!0);b[a]=c;c=this.f;b=this.f_i++;!this.__dirty&&(b>=c.length||c[b]!=d)&&(this.__dirty=!0);c[b]=d},drawRoundRect:function(a,b,c,d,e,f){this.prepareWrite();var g=this.types,k=this.t_i++,l=ka.DRAW_ROUND_RECT;!this.__dirty&&(k>=g.length||g[k]!=l)&&(this.__dirty=!0);g[k]=l;g=this.f;k=this.f_i++;!this.__dirty&&(k>=g.length||g[k]!=a)&&(this.__dirty=
!0);g[k]=a;a=this.f;g=this.f_i++;!this.__dirty&&(g>=a.length||a[g]!=b)&&(this.__dirty=!0);a[g]=b;b=this.f;a=this.f_i++;!this.__dirty&&(a>=b.length||b[a]!=c)&&(this.__dirty=!0);b[a]=c;c=this.f;b=this.f_i++;!this.__dirty&&(b>=c.length||c[b]!=d)&&(this.__dirty=!0);c[b]=d;d=this.f;c=this.f_i++;!this.__dirty&&(c>=d.length||d[c]!=e)&&(this.__dirty=!0);d[c]=e;!this.__dirty&&(this.o_i>=this.o.length||this.o[this.o_i]!=f)&&(this.__dirty=!0);this.o[this.o_i++]=f},drawTriangles:function(a,b,c,d){this.prepareWrite();
var e=this.types,f=this.t_i++,g=ka.DRAW_TRIANGLES;!this.__dirty&&(f>=e.length||e[f]!=g)&&(this.__dirty=!0);e[f]=g;e=this.o;f=this.o_i++;!this.__dirty&&(f>=e.length||e[f]!=a)&&(this.__dirty=!0);e[f]=a;a=this.o;e=this.o_i++;!this.__dirty&&(e>=a.length||a[e]!=b)&&(this.__dirty=!0);a[e]=b;b=this.o;a=this.o_i++;!this.__dirty&&(a>=b.length||b[a]!=c)&&(this.__dirty=!0);b[a]=c;c=this.o;b=this.o_i++;!this.__dirty&&(b>=c.length||c[b]!=d)&&(this.__dirty=!0);c[b]=d},endFill:function(){this.prepareWrite();var a=
this.types,b=this.t_i++,c=ka.END_FILL;!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},lineBitmapStyle:function(a,b,c,d){this.prepareWrite();var e=this.types,f=this.t_i++,g=ka.LINE_BITMAP_STYLE;!this.__dirty&&(f>=e.length||e[f]!=g)&&(this.__dirty=!0);e[f]=g;e=this.o;f=this.o_i++;!this.__dirty&&(f>=e.length||a!=e[f]||a.image.version!=this.objVersions[f])&&(this.__dirty=!0);for(e[f]=a;this.objVersions.length<f;)this.objVersions.push(0);this.objVersions[f]=a.image.version;a=this.o;e=
this.o_i++;this.__dirty||!(e>=a.length)&&b.equals(a[e])||(this.__dirty=!0);a[e]=b;b=this.b;a=this.b_i++;!this.__dirty&&(a>=b.length||b[a]!=c)&&(this.__dirty=!0);b[a]=c;c=this.b;b=this.b_i++;!this.__dirty&&(b>=c.length||c[b]!=d)&&(this.__dirty=!0);c[b]=d},lineGradientStyle:function(a,b,c,d,e,f,g,k){this.prepareWrite();var l=this.types,m=this.t_i++,p=ka.LINE_GRADIENT_STYLE;!this.__dirty&&(m>=l.length||l[m]!=p)&&(this.__dirty=!0);l[m]=p;l=this.o;m=this.o_i++;!this.__dirty&&(m>=l.length||l[m]!=a)&&(this.__dirty=
!0);l[m]=a;a=this.ii;l=this.ii_i++;!this.__dirty&&(l>=a.length||a[l]!=b)&&(this.__dirty=!0);a[l]=b;b=this.ff;a=this.ff_i++;!this.__dirty&&(a>=b.length||b[a]!=c)&&(this.__dirty=!0);b[a]=c;c=this.ii;b=this.ii_i++;!this.__dirty&&(b>=c.length||c[b]!=d)&&(this.__dirty=!0);c[b]=d;d=this.o;c=this.o_i++;this.__dirty||!(c>=d.length)&&e.equals(d[c])||(this.__dirty=!0);d[c]=e;e=this.o;d=this.o_i++;!this.__dirty&&(d>=e.length||e[d]!=f)&&(this.__dirty=!0);e[d]=f;f=this.o;e=this.o_i++;!this.__dirty&&(e>=f.length||
f[e]!=g)&&(this.__dirty=!0);f[e]=g;g=this.f;f=this.f_i++;!this.__dirty&&(f>=g.length||g[f]!=k)&&(this.__dirty=!0);g[f]=k},lineStyle:function(a,b,c,d,e,f,g,k){this.prepareWrite();var l=this.types,m=this.t_i++,p=ka.LINE_STYLE;!this.__dirty&&(m>=l.length||l[m]!=p)&&(this.__dirty=!0);l[m]=p;!this.__dirty&&(this.o_i>=this.o.length||this.o[this.o_i]!=a)&&(this.__dirty=!0);this.o[this.o_i++]=a;a=this.i;l=this.i_i++;!this.__dirty&&(l>=a.length||a[l]!=b)&&(this.__dirty=!0);a[l]=b;b=this.f;a=this.f_i++;!this.__dirty&&
(a>=b.length||b[a]!=c)&&(this.__dirty=!0);b[a]=c;c=this.b;b=this.b_i++;!this.__dirty&&(b>=c.length||c[b]!=d)&&(this.__dirty=!0);c[b]=d;d=this.o;c=this.o_i++;!this.__dirty&&(c>=d.length||d[c]!=e)&&(this.__dirty=!0);d[c]=e;e=this.o;d=this.o_i++;!this.__dirty&&(d>=e.length||e[d]!=f)&&(this.__dirty=!0);e[d]=f;f=this.o;e=this.o_i++;!this.__dirty&&(e>=f.length||f[e]!=g)&&(this.__dirty=!0);f[e]=g;g=this.f;f=this.f_i++;!this.__dirty&&(f>=g.length||g[f]!=k)&&(this.__dirty=!0);g[f]=k},lineTo:function(a,b){this.prepareWrite();
var c=this.types,d=this.t_i++,e=ka.LINE_TO;!this.__dirty&&(d>=c.length||c[d]!=e)&&(this.__dirty=!0);c[d]=e;c=this.f;d=this.f_i++;!this.__dirty&&(d>=c.length||c[d]!=a)&&(this.__dirty=!0);c[d]=a;a=this.f;c=this.f_i++;!this.__dirty&&(c>=a.length||a[c]!=b)&&(this.__dirty=!0);a[c]=b},markAsClean:function(){this.__dirty=!1},moveTo:function(a,b){this.prepareWrite();var c=this.types,d=this.t_i++,e=ka.MOVE_TO;!this.__dirty&&(d>=c.length||c[d]!=e)&&(this.__dirty=!0);c[d]=e;c=this.f;d=this.f_i++;!this.__dirty&&
(d>=c.length||c[d]!=a)&&(this.__dirty=!0);c[d]=a;a=this.f;c=this.f_i++;!this.__dirty&&(c>=a.length||a[c]!=b)&&(this.__dirty=!0);a[c]=b},prepareWrite:function(){this.copyOnWrite&&(this.types=this.types.slice(),this.b=this.b.slice(),this.i=this.i.slice(),this.f=this.f.slice(),this.o=this.o.slice(),this.ff=this.ff.slice(),this.ii=this.ii.slice(),this.objVersions=this.objVersions.slice(),this.copyOnWrite=!1)},overrideBlendMode:function(a){this.prepareWrite();this.types.push(ka.OVERRIDE_BLEND_MODE);this.o.push(a)},
overrideMatrix:function(a){this.prepareWrite();var b=this.types,c=this.t_i++,d=ka.OVERRIDE_MATRIX;!this.__dirty&&(c>=b.length||b[c]!=d)&&(this.__dirty=!0);b[c]=d;b=this.o;c=this.o_i++;this.__dirty||!(c>=b.length)&&a.equals(b[c])||(this.__dirty=!0);b[c]=a},windingEvenOdd:function(){this.prepareWrite();var a=this.types,b=this.t_i++,c=ka.WINDING_EVEN_ODD;!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},windingNonZero:function(){this.prepareWrite();var a=this.types,b=this.t_i++,c=ka.WINDING_NON_ZERO;
!this.__dirty&&(b>=a.length||a[b]!=c)&&(this.__dirty=!0);a[b]=c},get_dirty:function(){return this.__dirty},get_length:function(){return this.t_i},__initFromEmpty:function(){this.types=df.empty.types;this.b=df.empty.b;this.i=df.empty.i;this.f=df.empty.f;this.o=df.empty.o;this.ff=df.empty.ff;this.ii=df.empty.ii;this.objVersions=df.empty.objVersions;this.copyOnWrite=!0},__endBuffer:function(){this.__lastLength!=this.t_i&&(this.__dirty=!0);this.__lastLength=this.t_i},__replaceMtx:function(a,b,c){this.__dirty||
!(b>=a.length)&&c.equals(a[b])||(this.__dirty=!0);a[b]=c},__replaceBmp:function(a,b,c){!this.__dirty&&(b>=a.length||c!=a[b]||c.image.version!=this.objVersions[b])&&(this.__dirty=!0);for(a[b]=c;this.objVersions.length<b;)this.objVersions.push(0);this.objVersions[b]=c.image.version},__class__:df,__properties__:{get_length:"get_length",get_dirty:"get_dirty"}};var xg=function(a){this.buffer=a;this.bPos=this.iPos=this.fPos=this.oPos=this.ffPos=this.iiPos=this.tsPos=0;this.prev=ka.UNKNOWN};h["openfl._internal.renderer.DrawCommandReader"]=
xg;xg.__name__="openfl._internal.renderer.DrawCommandReader";xg.prototype={buffer:null,bPos:null,iiPos:null,iPos:null,ffPos:null,fPos:null,oPos:null,prev:null,tsPos:null,advance:function(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=
3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20: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(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=
3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=ka.BEGIN_BITMAP_FILL;return this},readBeginFill:function(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=ka.BEGIN_FILL;return this},readBeginGradientFill:function(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=ka.BEGIN_GRADIENT_FILL;return this},readBeginShaderFill:function(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=ka.BEGIN_SHADER_FILL;return this},readCubicCurveTo:function(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=ka.CUBIC_CURVE_TO;return this},readCurveTo:function(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=ka.CURVE_TO;return this},readDrawCircle:function(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=ka.DRAW_CIRCLE;return this},readDrawEllipse:function(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=ka.DRAW_ELLIPSE;return this},readDrawQuads:function(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=ka.DRAW_QUADS;return this},readDrawRect:function(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=ka.DRAW_RECT;return this},readDrawRoundRect:function(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=ka.DRAW_ROUND_RECT;return this},readDrawTriangles:function(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=ka.DRAW_TRIANGLES;return this},readEndFill:function(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=ka.END_FILL;return this},readLineBitmapStyle:function(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=ka.LINE_BITMAP_STYLE;return this},readLineGradientStyle:function(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;
case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=ka.LINE_GRADIENT_STYLE;return this},readLineStyle:function(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=ka.LINE_STYLE;return this},readLineTo:function(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=ka.LINE_TO;return this},readMoveTo:function(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=ka.MOVE_TO;return this},readOverrideBlendMode:function(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=ka.OVERRIDE_BLEND_MODE;return this},readOverrideMatrix:function(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=ka.OVERRIDE_MATRIX;return this},readWindingEvenOdd:function(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=
4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=ka.WINDING_EVEN_ODD;return this},readWindingNonZero:function(){switch(this.prev._hx_index){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.oPos+=1;break;case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=
4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=ka.WINDING_NON_ZERO;return this},reset:function(){this.bPos=this.iPos=this.fPos=this.oPos=this.ffPos=this.iiPos=this.tsPos=0},skip:function(a){switch(this.prev._hx_index){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.oPos+=1;break;
case 4:this.fPos+=6;break;case 5:this.fPos+=4;break;case 6:this.fPos+=3;break;case 7:this.fPos+=4;break;case 8:this.oPos+=3;break;case 9:this.fPos+=4;break;case 10:this.fPos+=5;this.oPos+=1;break;case 12:this.oPos+=4;break;case 14:this.oPos+=2;this.bPos+=2;break;case 15:this.oPos+=4;this.iiPos+=2;this.ffPos+=1;this.fPos+=1;break;case 16:this.oPos+=4;this.iPos+=1;this.fPos+=2;this.bPos+=1;break;case 17:this.fPos+=2;break;case 18:this.fPos+=2;break;case 19:this.oPos+=1;break;case 20:this.oPos+=1}this.prev=
a},__class__:xg};var Pj={};h["openfl._internal.renderer._DrawCommandReader.BeginBitmapFillView_Impl_"]=Pj;Pj.__name__="openfl._internal.renderer._DrawCommandReader.BeginBitmapFillView_Impl_";Pj.__properties__={get_smooth:"get_smooth",get_repeat:"get_repeat",get_matrix:"get_matrix",get_bitmap:"get_bitmap"};Pj._new=function(a){return a};Pj.get_bitmap=function(a){return a.buffer.o[a.oPos]};Pj.get_matrix=function(a){return a.buffer.o[a.oPos+1]};Pj.get_repeat=function(a){return a.buffer.b[a.bPos]};Pj.get_smooth=
function(a){return a.buffer.b[a.bPos+1]};var Ko={};h["openfl._internal.renderer._DrawCommandReader.BeginFillView_Impl_"]=Ko;Ko.__name__="openfl._internal.renderer._DrawCommandReader.BeginFillView_Impl_";Ko.__properties__={get_alpha:"get_alpha",get_color:"get_color"};Ko._new=function(a){return a};Ko.get_color=function(a){return a.buffer.i[a.iPos]};Ko.get_alpha=function(a){return a.buffer.f[a.fPos]};var fh={};h["openfl._internal.renderer._DrawCommandReader.BeginGradientFillView_Impl_"]=fh;fh.__name__=
"openfl._internal.renderer._DrawCommandReader.BeginGradientFillView_Impl_";fh.__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"};fh._new=function(a){return a};fh.get_type=function(a){return a.buffer.o[a.oPos]};fh.get_colors=function(a){return a.buffer.ii[a.iiPos]};fh.get_alphas=function(a){return a.buffer.ff[a.ffPos]};
fh.get_ratios=function(a){return a.buffer.ii[a.iiPos+1]};fh.get_matrix=function(a){return a.buffer.o[a.oPos+1]};fh.get_spreadMethod=function(a){return a.buffer.o[a.oPos+2]};fh.get_interpolationMethod=function(a){return a.buffer.o[a.oPos+3]};fh.get_focalPointRatio=function(a){return a.buffer.f[a.fPos]};var gr={};h["openfl._internal.renderer._DrawCommandReader.BeginShaderFillView_Impl_"]=gr;gr.__name__="openfl._internal.renderer._DrawCommandReader.BeginShaderFillView_Impl_";gr.__properties__={get_shaderBuffer:"get_shaderBuffer"};
gr._new=function(a){return a};gr.get_shaderBuffer=function(a){return a.buffer.o[a.oPos]};var li={};h["openfl._internal.renderer._DrawCommandReader.CubicCurveToView_Impl_"]=li;li.__name__="openfl._internal.renderer._DrawCommandReader.CubicCurveToView_Impl_";li.__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"};li._new=function(a){return a};li.get_controlX1=function(a){return a.buffer.f[a.fPos]};
li.get_controlY1=function(a){return a.buffer.f[a.fPos+1]};li.get_controlX2=function(a){return a.buffer.f[a.fPos+2]};li.get_controlY2=function(a){return a.buffer.f[a.fPos+3]};li.get_anchorX=function(a){return a.buffer.f[a.fPos+4]};li.get_anchorY=function(a){return a.buffer.f[a.fPos+5]};var Qj={};h["openfl._internal.renderer._DrawCommandReader.CurveToView_Impl_"]=Qj;Qj.__name__="openfl._internal.renderer._DrawCommandReader.CurveToView_Impl_";Qj.__properties__={get_anchorY:"get_anchorY",get_anchorX:"get_anchorX",
get_controlY:"get_controlY",get_controlX:"get_controlX"};Qj._new=function(a){return a};Qj.get_controlX=function(a){return a.buffer.f[a.fPos]};Qj.get_controlY=function(a){return a.buffer.f[a.fPos+1]};Qj.get_anchorX=function(a){return a.buffer.f[a.fPos+2]};Qj.get_anchorY=function(a){return a.buffer.f[a.fPos+3]};var vl={};h["openfl._internal.renderer._DrawCommandReader.DrawCircleView_Impl_"]=vl;vl.__name__="openfl._internal.renderer._DrawCommandReader.DrawCircleView_Impl_";vl.__properties__={get_radius:"get_radius",
get_y:"get_y",get_x:"get_x"};vl._new=function(a){return a};vl.get_x=function(a){return a.buffer.f[a.fPos]};vl.get_y=function(a){return a.buffer.f[a.fPos+1]};vl.get_radius=function(a){return a.buffer.f[a.fPos+2]};var Rj={};h["openfl._internal.renderer._DrawCommandReader.DrawEllipseView_Impl_"]=Rj;Rj.__name__="openfl._internal.renderer._DrawCommandReader.DrawEllipseView_Impl_";Rj.__properties__={get_height:"get_height",get_width:"get_width",get_y:"get_y",get_x:"get_x"};Rj._new=function(a){return a};
Rj.get_x=function(a){return a.buffer.f[a.fPos]};Rj.get_y=function(a){return a.buffer.f[a.fPos+1]};Rj.get_width=function(a){return a.buffer.f[a.fPos+2]};Rj.get_height=function(a){return a.buffer.f[a.fPos+3]};var wl={};h["openfl._internal.renderer._DrawCommandReader.DrawQuadsView_Impl_"]=wl;wl.__name__="openfl._internal.renderer._DrawCommandReader.DrawQuadsView_Impl_";wl.__properties__={get_transforms:"get_transforms",get_indices:"get_indices",get_rects:"get_rects"};wl._new=function(a){return a};wl.get_rects=
function(a){return a.buffer.o[a.oPos]};wl.get_indices=function(a){return a.buffer.o[a.oPos+1]};wl.get_transforms=function(a){return a.buffer.o[a.oPos+2]};var Sj={};h["openfl._internal.renderer._DrawCommandReader.DrawRectView_Impl_"]=Sj;Sj.__name__="openfl._internal.renderer._DrawCommandReader.DrawRectView_Impl_";Sj.__properties__={get_height:"get_height",get_width:"get_width",get_y:"get_y",get_x:"get_x"};Sj._new=function(a){return a};Sj.get_x=function(a){return a.buffer.f[a.fPos]};Sj.get_y=function(a){return a.buffer.f[a.fPos+
1]};Sj.get_width=function(a){return a.buffer.f[a.fPos+2]};Sj.get_height=function(a){return a.buffer.f[a.fPos+3]};var mi={};h["openfl._internal.renderer._DrawCommandReader.DrawRoundRectView_Impl_"]=mi;mi.__name__="openfl._internal.renderer._DrawCommandReader.DrawRoundRectView_Impl_";mi.__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"};mi._new=function(a){return a};mi.get_x=function(a){return a.buffer.f[a.fPos]};
mi.get_y=function(a){return a.buffer.f[a.fPos+1]};mi.get_width=function(a){return a.buffer.f[a.fPos+2]};mi.get_height=function(a){return a.buffer.f[a.fPos+3]};mi.get_ellipseWidth=function(a){return a.buffer.f[a.fPos+4]};mi.get_ellipseHeight=function(a){return a.buffer.o[a.oPos]};var Tj={};h["openfl._internal.renderer._DrawCommandReader.DrawTrianglesView_Impl_"]=Tj;Tj.__name__="openfl._internal.renderer._DrawCommandReader.DrawTrianglesView_Impl_";Tj.__properties__={get_culling:"get_culling",get_uvtData:"get_uvtData",
get_indices:"get_indices",get_vertices:"get_vertices"};Tj._new=function(a){return a};Tj.get_vertices=function(a){return a.buffer.o[a.oPos]};Tj.get_indices=function(a){return a.buffer.o[a.oPos+1]};Tj.get_uvtData=function(a){return a.buffer.o[a.oPos+2]};Tj.get_culling=function(a){return a.buffer.o[a.oPos+3]};var du={};h["openfl._internal.renderer._DrawCommandReader.EndFillView_Impl_"]=du;du.__name__="openfl._internal.renderer._DrawCommandReader.EndFillView_Impl_";du._new=function(a){return a};var Uj=
{};h["openfl._internal.renderer._DrawCommandReader.LineBitmapStyleView_Impl_"]=Uj;Uj.__name__="openfl._internal.renderer._DrawCommandReader.LineBitmapStyleView_Impl_";Uj.__properties__={get_smooth:"get_smooth",get_repeat:"get_repeat",get_matrix:"get_matrix",get_bitmap:"get_bitmap"};Uj._new=function(a){return a};Uj.get_bitmap=function(a){return a.buffer.o[a.oPos]};Uj.get_matrix=function(a){return a.buffer.o[a.oPos+1]};Uj.get_repeat=function(a){return a.buffer.b[a.bPos]};Uj.get_smooth=function(a){return a.buffer.b[a.bPos+
1]};var gh={};h["openfl._internal.renderer._DrawCommandReader.LineGradientStyleView_Impl_"]=gh;gh.__name__="openfl._internal.renderer._DrawCommandReader.LineGradientStyleView_Impl_";gh.__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"};gh._new=function(a){return a};gh.get_type=function(a){return a.buffer.o[a.oPos]};
gh.get_colors=function(a){return a.buffer.ii[a.iiPos]};gh.get_alphas=function(a){return a.buffer.ff[a.ffPos]};gh.get_ratios=function(a){return a.buffer.ii[a.iiPos+1]};gh.get_matrix=function(a){return a.buffer.o[a.oPos+1]};gh.get_spreadMethod=function(a){return a.buffer.o[a.oPos+2]};gh.get_interpolationMethod=function(a){return a.buffer.o[a.oPos+3]};gh.get_focalPointRatio=function(a){return a.buffer.f[a.fPos]};var hh={};h["openfl._internal.renderer._DrawCommandReader.LineStyleView_Impl_"]=hh;hh.__name__=
"openfl._internal.renderer._DrawCommandReader.LineStyleView_Impl_";hh.__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"};hh._new=function(a){return a};hh.get_thickness=function(a){return a.buffer.o[a.oPos]};hh.get_color=function(a){return a.buffer.i[a.iPos]};hh.get_alpha=function(a){return a.buffer.f[a.fPos]};hh.get_pixelHinting=
function(a){return a.buffer.b[a.bPos]};hh.get_scaleMode=function(a){return a.buffer.o[a.oPos+1]};hh.get_caps=function(a){return a.buffer.o[a.oPos+2]};hh.get_joints=function(a){return a.buffer.o[a.oPos+3]};hh.get_miterLimit=function(a){return a.buffer.f[a.fPos+1]};var Lo={};h["openfl._internal.renderer._DrawCommandReader.LineToView_Impl_"]=Lo;Lo.__name__="openfl._internal.renderer._DrawCommandReader.LineToView_Impl_";Lo.__properties__={get_y:"get_y",get_x:"get_x"};Lo._new=function(a){return a};Lo.get_x=
function(a){return a.buffer.f[a.fPos]};Lo.get_y=function(a){return a.buffer.f[a.fPos+1]};var Mo={};h["openfl._internal.renderer._DrawCommandReader.MoveToView_Impl_"]=Mo;Mo.__name__="openfl._internal.renderer._DrawCommandReader.MoveToView_Impl_";Mo.__properties__={get_y:"get_y",get_x:"get_x"};Mo._new=function(a){return a};Mo.get_x=function(a){return a.buffer.f[a.fPos]};Mo.get_y=function(a){return a.buffer.f[a.fPos+1]};var hr={};h["openfl._internal.renderer._DrawCommandReader.OverrideBlendModeView_Impl_"]=
hr;hr.__name__="openfl._internal.renderer._DrawCommandReader.OverrideBlendModeView_Impl_";hr.__properties__={get_blendMode:"get_blendMode"};hr._new=function(a){return a};hr.get_blendMode=function(a){return a.buffer.o[a.oPos]};var ir={};h["openfl._internal.renderer._DrawCommandReader.OverrideMatrixView_Impl_"]=ir;ir.__name__="openfl._internal.renderer._DrawCommandReader.OverrideMatrixView_Impl_";ir.__properties__={get_matrix:"get_matrix"};ir._new=function(a){return a};ir.get_matrix=function(a){return a.buffer.o[a.oPos]};
var eu={};h["openfl._internal.renderer._DrawCommandReader.WindingEvenOddView_Impl_"]=eu;eu.__name__="openfl._internal.renderer._DrawCommandReader.WindingEvenOddView_Impl_";eu._new=function(a){return a};var fu={};h["openfl._internal.renderer._DrawCommandReader.WindingNonZeroView_Impl_"]=fu;fu.__name__="openfl._internal.renderer._DrawCommandReader.WindingNonZeroView_Impl_";fu._new=function(a){return a};var ka=C["openfl._internal.renderer.DrawCommandType"]={__ename__:"openfl._internal.renderer.DrawCommandType",
__constructs__:"BEGIN_BITMAP_FILL BEGIN_FILL BEGIN_GRADIENT_FILL BEGIN_SHADER_FILL CUBIC_CURVE_TO CURVE_TO DRAW_CIRCLE DRAW_ELLIPSE DRAW_QUADS DRAW_RECT DRAW_ROUND_RECT DRAW_TILES DRAW_TRIANGLES END_FILL LINE_BITMAP_STYLE LINE_GRADIENT_STYLE LINE_STYLE LINE_TO MOVE_TO OVERRIDE_BLEND_MODE OVERRIDE_MATRIX WINDING_EVEN_ODD WINDING_NON_ZERO UNKNOWN".split(" "),BEGIN_BITMAP_FILL:{_hx_index:0,__enum__:"openfl._internal.renderer.DrawCommandType",toString:u},BEGIN_FILL:{_hx_index:1,__enum__:"openfl._internal.renderer.DrawCommandType",
toString:u},BEGIN_GRADIENT_FILL:{_hx_index:2,__enum__:"openfl._internal.renderer.DrawCommandType",toString:u},BEGIN_SHADER_FILL:{_hx_index:3,__enum__:"openfl._internal.renderer.DrawCommandType",toString:u},CUBIC_CURVE_TO:{_hx_index:4,__enum__:"openfl._internal.renderer.DrawCommandType",toString:u},CURVE_TO:{_hx_index:5,__enum__:"openfl._internal.renderer.DrawCommandType",toString:u},DRAW_CIRCLE:{_hx_index:6,__enum__:"openfl._internal.renderer.DrawCommandType",toString:u},DRAW_ELLIPSE:{_hx_index:7,
__enum__:"openfl._internal.renderer.DrawCommandType",toString:u},DRAW_QUADS:{_hx_index:8,__enum__:"openfl._internal.renderer.DrawCommandType",toString:u},DRAW_RECT:{_hx_index:9,__enum__:"openfl._internal.renderer.DrawCommandType",toString:u},DRAW_ROUND_RECT:{_hx_index:10,__enum__:"openfl._internal.renderer.DrawCommandType",toString:u},DRAW_TILES:{_hx_index:11,__enum__:"openfl._internal.renderer.DrawCommandType",toString:u},DRAW_TRIANGLES:{_hx_index:12,__enum__:"openfl._internal.renderer.DrawCommandType",
toString:u},END_FILL:{_hx_index:13,__enum__:"openfl._internal.renderer.DrawCommandType",toString:u},LINE_BITMAP_STYLE:{_hx_index:14,__enum__:"openfl._internal.renderer.DrawCommandType",toString:u},LINE_GRADIENT_STYLE:{_hx_index:15,__enum__:"openfl._internal.renderer.DrawCommandType",toString:u},LINE_STYLE:{_hx_index:16,__enum__:"openfl._internal.renderer.DrawCommandType",toString:u},LINE_TO:{_hx_index:17,__enum__:"openfl._internal.renderer.DrawCommandType",toString:u},MOVE_TO:{_hx_index:18,__enum__:"openfl._internal.renderer.DrawCommandType",
toString:u},OVERRIDE_BLEND_MODE:{_hx_index:19,__enum__:"openfl._internal.renderer.DrawCommandType",toString:u},OVERRIDE_MATRIX:{_hx_index:20,__enum__:"openfl._internal.renderer.DrawCommandType",toString:u},WINDING_EVEN_ODD:{_hx_index:21,__enum__:"openfl._internal.renderer.DrawCommandType",toString:u},WINDING_NON_ZERO:{_hx_index:22,__enum__:"openfl._internal.renderer.DrawCommandType",toString:u},UNKNOWN:{_hx_index:23,__enum__:"openfl._internal.renderer.DrawCommandType",toString:u}},zh=function(a,b,
c,d,e,f,g){null==g&&(g=!1);null==f&&(f=!1);null==e&&(e=!1);null==d&&(d=0);null==c&&(c=2);null==b&&(b=5);null==a&&(a=0);this.wrap=a;this.filter=b;this.mipfilter=c;this.lodBias=d;this.ignoreSampler=e;this.centroid=f;this.textureAlpha=g};h["openfl._internal.renderer.SamplerState"]=zh;zh.__name__="openfl._internal.renderer.SamplerState";zh.prototype={centroid:null,filter:null,ignoreSampler:null,lodBias:null,mipfilter:null,mipmapGenerated:null,textureAlpha:null,wrap:null,clone:function(){var a=new zh(this.wrap,
this.filter,this.mipfilter,this.lodBias,this.ignoreSampler,this.centroid,this.textureAlpha);a.mipmapGenerated=this.mipmapGenerated;return a},copyFrom:function(a){null==a||a.ignoreSampler||(this.wrap=a.wrap,this.filter=a.filter,this.mipfilter=a.mipfilter,this.lodBias=a.lodBias,this.centroid=a.centroid,this.textureAlpha=a.textureAlpha)},equals:function(a){return null==a?!1:this.wrap==a.wrap&&this.filter==a.filter&&this.mipfilter==a.mipfilter&&this.lodBias==a.lodBias?this.textureAlpha==a.textureAlpha:
!1},__class__:zh};var No=function(){this.inputRefs=[];this.inputFilter=[];this.inputMipFilter=[];this.inputs=[];this.inputWrap=[];this.overrideIntNames=[];this.overrideIntValues=[];this.overrideFloatNames=[];this.overrideFloatValues=[];this.overrideBoolNames=[];this.overrideBoolValues=[];this.paramLengths=[];this.paramPositions=[];this.paramRefs_Bool=[];this.paramRefs_Float=[];this.paramRefs_Int=[];this.paramTypes=[]};h["openfl._internal.renderer.ShaderBuffer"]=No;No.__name__="openfl._internal.renderer.ShaderBuffer";
No.prototype={inputCount:null,inputRefs:null,inputFilter:null,inputMipFilter:null,inputs:null,inputWrap:null,overrideBoolCount:null,overrideBoolNames:null,overrideBoolValues:null,overrideFloatCount:null,overrideFloatNames:null,overrideFloatValues:null,overrideIntCount:null,overrideIntNames:null,overrideIntValues:null,paramBoolCount:null,paramCount:null,paramData:null,paramDataBuffer:null,paramDataLength:null,paramFloatCount:null,paramIntCount:null,paramLengths:null,paramPositions:null,paramRefs_Bool:null,
paramRefs_Float:null,paramRefs_Int:null,paramTypes:null,shader:null,addBoolOverride:function(a,b){this.overrideBoolNames[this.overrideBoolCount]=a;this.overrideBoolValues[this.overrideBoolCount]=b;this.overrideBoolCount++},addFloatOverride:function(a,b){this.overrideFloatNames[this.overrideFloatCount]=a;this.overrideFloatValues[this.overrideFloatCount]=b;this.overrideFloatCount++},addIntOverride:function(a,b){this.overrideIntNames[this.overrideIntCount]=a;this.overrideIntValues[this.overrideIntCount]=
b;this.overrideIntCount++},clearOverride:function(){this.overrideBoolCount=this.overrideFloatCount=this.overrideIntCount=0},update:function(a){this.paramIntCount=this.paramFloatCount=this.paramDataLength=this.paramCount=this.paramBoolCount=this.overrideBoolCount=this.overrideFloatCount=this.overrideIntCount=this.inputCount=0;this.shader=null;if(null!=a){a.__init();this.inputCount=a.__inputBitmapData.length;for(var b,c=0,d=this.inputCount;c<d;){var e=c++;b=a.__inputBitmapData[e];this.inputs[e]=b.input;
this.inputFilter[e]=b.filter;this.inputMipFilter[e]=b.mipFilter;this.inputRefs[e]=b;this.inputWrap[e]=b.wrap}b=a.__paramBool.length;c=a.__paramFloat.length;d=a.__paramInt.length;this.paramCount=b+c+d;this.paramBoolCount=b;this.paramFloatCount=c;this.paramIntCount=d;for(var f=0,g,k=0;k<b;){var l=k++;g=a.__paramBool[l];this.paramPositions[f]=this.paramDataLength;e=null!=g.value?g.value.length:0;this.paramLengths[f]=e;this.paramDataLength+=e;this.paramTypes[f]=0;this.paramRefs_Bool[l]=g;++f}for(k=0;k<
c;)l=k++,g=a.__paramFloat[l],this.paramPositions[f]=this.paramDataLength,e=null!=g.value?g.value.length:0,this.paramLengths[f]=e,this.paramDataLength+=e,this.paramTypes[f]=1,this.paramRefs_Float[l]=g,++f;for(k=0;k<d;)l=k++,g=a.__paramInt[l],this.paramPositions[f]=this.paramDataLength,e=null!=g.value?g.value.length:0,this.paramLengths[f]=e,this.paramDataLength+=e,this.paramTypes[f]=2,this.paramRefs_Int[l]=g,++f;0<this.paramDataLength&&(null==this.paramData?(d=this.paramDataLength,this.paramData=null!=
d?new Float32Array(d):null):this.paramDataLength>this.paramData.length&&(d=this.paramDataLength,d=null!=d?new Float32Array(d):null,d.set(this.paramData),this.paramData=d));g=f=e=d=0;k=0;for(l=this.paramCount;k<l;){var m=k++;var p=this.paramLengths[m];if(m<b){m=this.paramRefs_Bool[d];++d;for(var n=0;n<p;){var h=n++;this.paramData[g]=m.value[h]?1:0;++g}}else for(m<b+c?(m=this.paramRefs_Float[e],++e):(m=this.paramRefs_Int[f],++f),n=0;n<p;)h=n++,this.paramData[g]=m.value[h],++g}this.shader=a}},__class__:No};
var Et=function(){};h["openfl._internal.renderer.cairo.CairoBitmap"]=Et;Et.__name__="openfl._internal.renderer.cairo.CairoBitmap";Et.render=function(a,b){if(a.__renderable){var c=b.__getAlpha(a.__worldAlpha);if(0<c&&null!=a.__bitmapData&&a.__bitmapData.__isValid){var d=b.cairo;b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);b.applyMatrix(a.__renderTransform,d);var e=a.__bitmapData.getSurface();null!=e&&(e=Bc.createForSurface(e),Bc.set_filter(e,b.__allowSmoothing&&a.smoothing?1:3),d.set_source(e),
1==c?d.paint():d.paintWithAlpha(c));b.__popMaskObject(a);b.__setBlendMode(10)}}};var Vi=function(){};h["openfl._internal.renderer.cairo.CairoDisplayObject"]=Vi;Vi.__name__="openfl._internal.renderer.cairo.CairoDisplayObject";Vi.render=function(a,b){};var Vj=function(){};h["openfl._internal.renderer.cairo.CairoGraphics"]=Vj;Vj.__name__="openfl._internal.renderer.cairo.CairoGraphics";Vj.hitTest=function(a,b,c){return!1};Vj.render=function(a,b){};Vj.renderMask=function(a,b){};var jf=function(){A.call(this);
this.__allowSmoothing=!0;this.__worldAlpha=1};h["openfl.display.DisplayObjectRenderer"]=jf;jf.__name__="openfl.display.DisplayObjectRenderer";jf.__super__=A;jf.prototype=w(A.prototype,{__allowSmoothing:null,__blendMode:null,__cleared:null,__overrideBlendMode:null,__roundPixels:null,__stage:null,__transparent:null,__type:null,__worldAlpha:null,__worldColorTransform:null,__worldTransform:null,__clear:function(){},__drawBitmapData:function(a,b,c){},__render:function(a){},__resize:function(a,b){},__class__:jf});
var Wi=function(a){jf.call(this);this.cairo=a};h["openfl.display.CairoRenderer"]=Wi;Wi.__name__="openfl.display.CairoRenderer";Wi.__super__=jf;Wi.prototype=w(jf.prototype,{cairo:null,applyMatrix:function(a,b){},__class__:Wi});var Wj=function(a){Wi.call(this,a);this.__colorTransform=new Sb;this.__matrix=new Ha;this.__matrix3=new ei;this.__type="cairo"};h["openfl._internal.renderer.cairo.CairoRenderer"]=Wj;Wj.__name__="openfl._internal.renderer.cairo.CairoRenderer";Wj.__super__=Wi;Wj.prototype=w(Wi.prototype,
{__matrix:null,__matrix3:null,__colorTransform:null,applyMatrix:function(a,b){null==b&&(b=this.cairo);this.__matrix.copyFrom(a);this.cairo==b&&null!=this.__worldTransform&&this.__matrix.concat(this.__worldTransform);this.__matrix3.a=this.__matrix.a;this.__matrix3.b=this.__matrix.b;this.__matrix3.c=this.__matrix.c;this.__matrix3.d=this.__matrix.d;this.__roundPixels?(this.__matrix3.tx=Math.round(this.__matrix.tx),this.__matrix3.ty=Math.round(this.__matrix.ty)):(this.__matrix3.tx=this.__matrix.tx,this.__matrix3.ty=
this.__matrix.ty);b.set_matrix(this.__matrix3)},__clear:function(){if(null!=this.cairo&&(this.cairo.identityMatrix(),null!=this.__stage&&this.__stage.__clearBeforeRender)){var a=this.__blendMode;this.__setBlendMode(10);this.cairo.setSourceRGB(this.__stage.__colorSplit[0],this.__stage.__colorSplit[1],this.__stage.__colorSplit[2]);this.cairo.paint();this.__setBlendMode(a)}},__drawBitmapData:function(a,b,c){null!=c&&this.__pushMaskRect(c,b.__renderTransform);b==a&&(b=a.clone());this.__allowSmoothing||
this.cairo.set_antialias(1);this.__render(b);this.__allowSmoothing||this.cairo.set_antialias(5);Vq.flush(this.cairo.get_target());a.image.dirty=!0;a.image.version++;null!=c&&this.__popMaskRect()},__getAlpha:function(a){return a*this.__worldAlpha},__getColorTransform:function(a){return null!=this.__worldColorTransform?(this.__colorTransform.__copyFrom(this.__worldColorTransform),this.__colorTransform.__combine(a),this.__colorTransform):a},__popMask:function(){this.cairo.restore()},__popMaskObject:function(a,
b){null==b&&(b=!0);a.__isCacheBitmapRender||null==a.__mask||this.__popMask();b&&null!=a.__scrollRect&&this.__popMaskRect()},__popMaskRect:function(){this.cairo.restore()},__pushMask:function(a){this.cairo.save();this.applyMatrix(a.__renderTransform,this.cairo);this.cairo.newPath();this.__renderMask(a);this.cairo.clip()},__pushMaskObject:function(a,b){null==b&&(b=!0);b&&null!=a.__scrollRect&&this.__pushMaskRect(a.__scrollRect,a.__renderTransform);a.__isCacheBitmapRender||null==a.__mask||this.__pushMask(a.__mask)},
__pushMaskRect:function(a,b){this.cairo.save();this.applyMatrix(b,this.cairo);this.cairo.newPath();this.cairo.rectangle(a.x,a.y,a.width,a.height);this.cairo.clip()},__render:function(a){null!=this.cairo&&null!=a&&(null!=a.__type?this.__renderDisplayObject(a):this.__renderBitmapData(a))},__renderBitmap:function(a){this.__updateCacheBitmap(a,!1);null!=a.__bitmapData&&null!=a.__bitmapData.image&&(a.__imageVersion=a.__bitmapData.image.version);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){if(Vi.render(a,
this),a.__renderable){var b=this.__getAlpha(a.__worldAlpha);if(0<b&&null!=a.__bitmapData&&a.__bitmapData.__isValid){var c=this.cairo;this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);this.applyMatrix(a.__renderTransform,c);var d=a.__bitmapData.getSurface();null!=d&&(d=Bc.createForSurface(d),Bc.set_filter(d,this.__allowSmoothing&&a.smoothing?1:3),c.set_source(d),1==b?c.paint():c.paintWithAlpha(b));this.__popMaskObject(a);this.__setBlendMode(10)}}}else a=a.__cacheBitmap,a.__renderable&&
(b=this.__getAlpha(a.__worldAlpha),0<b&&null!=a.__bitmapData&&a.__bitmapData.__isValid&&(c=this.cairo,this.__setBlendMode(a.__worldBlendMode),this.__pushMaskObject(a),this.applyMatrix(a.__renderTransform,c),d=a.__bitmapData.getSurface(),null!=d&&(d=Bc.createForSurface(d),Bc.set_filter(d,this.__allowSmoothing&&a.smoothing?1:3),c.set_source(d),1==b?c.paint():c.paintWithAlpha(b)),this.__popMaskObject(a),this.__setBlendMode(10)))},__renderBitmapData:function(a){a.readable&&(this.applyMatrix(a.__renderTransform,
this.cairo),a=a.getSurface(),null!=a&&(a=Bc.createForSurface(a),this.__allowSmoothing&&1!=this.cairo.get_antialias()?Bc.set_filter(a,1):Bc.set_filter(a,3),this.cairo.set_source(a),this.cairo.paint()))},__renderDisplayObject:function(a){if(null!=a&&null!=a.__type){switch(a.__type._hx_index){case 0:this.__renderBitmap(a);break;case 2:this.__renderDisplayObjectContainer(a);break;case 1:case 4:this.__renderShape(a);break;case 5:this.__renderSimpleButton(a);break;case 6:this.__renderTextField(a);break;
case 7:this.__renderTilemap(a);break;case 8:this.__renderVideo(a)}if(null!=a.__customRenderEvent){var b=a.__customRenderEvent;b.allowSmoothing=this.__allowSmoothing;b.objectMatrix.copyFrom(a.__renderTransform);b.objectColorTransform.__copyFrom(a.__worldColorTransform);b.renderer=this;b.type="renderCairo";this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);a.dispatchEvent(b);this.__popMaskObject(a)}}},__renderDisplayObjectContainer:function(a){for(var b=a.__removedChildren.iterator();b.hasNext();){var c=
b.next();null==c.stage&&c.__cleanup()}a.__removedChildren.set_length(0);if(a.__renderable&&!(0>=a.__worldAlpha)){this.__updateCacheBitmap(a,!1);if(null==a.__cacheBitmap||a.__isCacheBitmapRender)Vi.render(a,this);else if(b=a.__cacheBitmap,b.__renderable&&(c=this.__getAlpha(b.__worldAlpha),0<c&&null!=b.__bitmapData&&b.__bitmapData.__isValid)){var d=this.cairo;this.__setBlendMode(b.__worldBlendMode);this.__pushMaskObject(b);this.applyMatrix(b.__renderTransform,d);var e=b.__bitmapData.getSurface();null!=
e&&(e=Bc.createForSurface(e),Bc.set_filter(e,this.__allowSmoothing&&b.smoothing?1:3),d.set_source(e),1==c?d.paint():d.paintWithAlpha(c));this.__popMaskObject(b);this.__setBlendMode(10)}if(null==a.__cacheBitmap||a.__isCacheBitmapRender){this.__pushMaskObject(a);if(null!=this.__stage){b=0;for(c=a.__children;b<c.length;)d=c[b],++b,this.__renderDisplayObject(d),d.__renderDirty=!1;a.__renderDirty=!1}else for(b=0,c=a.__children;b<c.length;)d=c[b],++b,this.__renderDisplayObject(d);this.__popMaskObject(a)}}},
__renderMask:function(a){if(null!=a)switch(a.__type._hx_index){case 0:this.cairo.rectangle(0,0,a.get_width(),a.get_height());break;case 2:for(var b=a.__removedChildren.iterator();b.hasNext();){var c=b.next();null==c.stage&&c.__cleanup()}a.__removedChildren.set_length(0);null!=a.__graphics&&Vj.renderMask(a.__graphics,this);b=0;for(a=a.__children;b<a.length;)c=a[b],++b,this.__renderMask(c);break;case 3:break;case 5:this.__renderMask(a.__currentState);break;default:null!=a.__graphics&&Vj.renderMask(a.__graphics,
this)}},__renderShape:function(a){this.__updateCacheBitmap(a,!1);if(null==a.__cacheBitmap||a.__isCacheBitmapRender)Vi.render(a,this);else if(a=a.__cacheBitmap,a.__renderable){var b=this.__getAlpha(a.__worldAlpha);if(0<b&&null!=a.__bitmapData&&a.__bitmapData.__isValid){var c=this.cairo;this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);this.applyMatrix(a.__renderTransform,c);var d=a.__bitmapData.getSurface();null!=d&&(d=Bc.createForSurface(d),Bc.set_filter(d,this.__allowSmoothing&&a.smoothing?
1:3),c.set_source(d),1==b?c.paint():c.paintWithAlpha(b));this.__popMaskObject(a);this.__setBlendMode(10)}}},__renderSimpleButton:function(a){!a.__renderable||0>=a.__worldAlpha||null==a.__currentState||(this.__pushMaskObject(a),this.__renderDisplayObject(a.__currentState),this.__popMaskObject(a))},__renderTextField:function(a){this.__updateCacheBitmap(a,!1);if(null==a.__cacheBitmap||a.__isCacheBitmapRender)jr.render(a,this,a.__worldTransform),Vi.render(a,this);else if(a=a.__cacheBitmap,a.__renderable){var b=
this.__getAlpha(a.__worldAlpha);if(0<b&&null!=a.__bitmapData&&a.__bitmapData.__isValid){var c=this.cairo;this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);this.applyMatrix(a.__renderTransform,c);var d=a.__bitmapData.getSurface();null!=d&&(d=Bc.createForSurface(d),Bc.set_filter(d,this.__allowSmoothing&&a.smoothing?1:3),c.set_source(d),1==b?c.paint():c.paintWithAlpha(b));this.__popMaskObject(a);this.__setBlendMode(10)}}},__renderTilemap:function(a){this.__updateCacheBitmap(a,!1);if(null==
a.__cacheBitmap||a.__isCacheBitmapRender)Vi.render(a,this),Xj.render(a,this);else if(a=a.__cacheBitmap,a.__renderable){var b=this.__getAlpha(a.__worldAlpha);if(0<b&&null!=a.__bitmapData&&a.__bitmapData.__isValid){var c=this.cairo;this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);this.applyMatrix(a.__renderTransform,c);var d=a.__bitmapData.getSurface();null!=d&&(d=Bc.createForSurface(d),Bc.set_filter(d,this.__allowSmoothing&&a.smoothing?1:3),c.set_source(d),1==b?c.paint():c.paintWithAlpha(b));
this.__popMaskObject(a);this.__setBlendMode(10)}}},__renderVideo:function(a){},__setBlendMode:function(a){null!=this.__overrideBlendMode&&(a=this.__overrideBlendMode);this.__blendMode!=a&&(this.__blendMode=a,this.__setBlendModeCairo(this.cairo,a))},__setBlendModeCairo:function(a,b){switch(b){case 0:a.setOperator(12);break;case 2:a.setOperator(17);break;case 3:a.setOperator(23);break;case 5:a.setOperator(21);break;case 7:a.setOperator(2);break;case 8:a.setOperator(18);break;case 9:a.setOperator(14);
break;case 11:a.setOperator(16);break;case 12:a.setOperator(15);break;default:a.setOperator(2)}},__updateCacheBitmap:function(a,b){if(a.__isCacheBitmapRender)return!1;var c=!1;if(a.get_cacheAsBitmap()||!a.__worldColorTransform.__isDefault(!0)||null!=this.__worldColorTransform&&!this.__worldColorTransform.__isDefault(!0)){null==a.__cacheBitmapMatrix&&(a.__cacheBitmapMatrix=new Ha);var d=null!=a.__filters,e=null!=a.__cacheAsBitmapMatrix?a.__cacheAsBitmapMatrix:a.__renderTransform;c=null;var f=Sb.__pool.get();
f.__copyFrom(a.__worldColorTransform);null!=this.__worldColorTransform&&f.__combine(this.__worldColorTransform);var g=null==a.__cacheBitmap||a.__renderDirty&&(b||null!=a.__children&&0<a.__children.length)||a.opaqueBackground!=a.__cacheBitmapBackground||null!=a.__graphics&&a.__graphics.__softwareDirty||null!=a.__cacheBitmapColorTransform&&!a.__cacheBitmapColorTransform.__equals(f,!0);g||e.a==a.__cacheBitmapMatrix.a&&e.b==a.__cacheBitmapMatrix.b&&e.c==a.__cacheBitmapMatrix.c&&e.d==a.__cacheBitmapMatrix.d||
(g=!0);if(d&&!g){b=0;for(var k=a.__filters;b<k.length;){var l=k[b];++b;if(l.__renderDirty){g=!0;break}}}!g&&null!=a.__cacheBitmapData&&null!=a.__cacheBitmapData.image&&a.__cacheBitmapData.image.version<a.__cacheBitmapData.__textureVersion&&(g=!0);b=g||!a.__cacheBitmap.__worldTransform.equals(a.__worldTransform);a.__cacheBitmapMatrix.copyFrom(e);a.__cacheBitmapMatrix.tx=0;var m=l=k=a.__cacheBitmapMatrix.ty=0,p=0,n=0,h=0;b&&(c=ia.__pool.get(),a.__getFilterBounds(c,a.__cacheBitmapMatrix),m=Math.ceil(c.width),
p=Math.ceil(c.height),n=0<c.x?Math.ceil(c.x):Math.floor(c.x),h=0<c.y?Math.ceil(c.y):Math.floor(c.y),null!=a.__cacheBitmapData?m>a.__cacheBitmapData.width||p>a.__cacheBitmapData.height?(k=Math.ceil(Math.max(1.25*m,a.__cacheBitmapData.width)),l=Math.ceil(Math.max(1.25*p,a.__cacheBitmapData.height)),g=!0):(k=a.__cacheBitmapData.width,l=a.__cacheBitmapData.height):(k=m,l=p));if(g)if(a.__cacheBitmapBackground=a.opaqueBackground,.5<=m&&.5<=p){var q=null!=a.opaqueBackground&&(k!=m||l!=p),t=null!=a.opaqueBackground?
-16777216|a.opaqueBackground:0,r=q?0:t;null==a.__cacheBitmapData||k>a.__cacheBitmapData.width||l>a.__cacheBitmapData.height?(a.__cacheBitmapData=new na(k,l,!0,r),null==a.__cacheBitmap&&(a.__cacheBitmap=new Zc),a.__cacheBitmap.__bitmapData=a.__cacheBitmapData,a.__cacheBitmapRendererSW=null):a.__cacheBitmapData.fillRect(a.__cacheBitmapData.rect,r);q&&(c.setTo(0,0,m,p),a.__cacheBitmapData.fillRect(c,t))}else return Sb.__pool.release(f),a.__cacheBitmap=null,a.__cacheBitmapData=null,a.__cacheBitmapData2=
null,a.__cacheBitmapData3=null,a.__cacheBitmapRendererSW=null,!0;else a.__cacheBitmapData=a.__cacheBitmap.get_bitmapData(),a.__cacheBitmapData2=null,a.__cacheBitmapData3=null;b&&(a.__cacheBitmap.__worldTransform.copyFrom(a.__worldTransform),e==a.__renderTransform?(a.__cacheBitmap.__renderTransform.identity(),a.__cacheBitmap.__renderTransform.tx=a.__renderTransform.tx+n,a.__cacheBitmap.__renderTransform.ty=a.__renderTransform.ty+h):(a.__cacheBitmap.__renderTransform.copyFrom(a.__cacheBitmapMatrix),
a.__cacheBitmap.__renderTransform.invert(),a.__cacheBitmap.__renderTransform.concat(a.__renderTransform),a.__cacheBitmap.__renderTransform.tx+=n,a.__cacheBitmap.__renderTransform.ty+=h));a.__cacheBitmap.smoothing=this.__allowSmoothing;a.__cacheBitmap.__renderable=a.__renderable;a.__cacheBitmap.__worldAlpha=a.__worldAlpha;a.__cacheBitmap.__worldBlendMode=a.__worldBlendMode;a.__cacheBitmap.__worldShader=a.__worldShader;a.__cacheBitmap.set_mask(a.__mask);if(g){if(null==a.__cacheBitmapRendererSW||"cairo"!=
a.__cacheBitmapRendererSW.__type)null==a.__cacheBitmapData.image&&(a.__cacheBitmapData=new na(k,l,!0,null!=a.opaqueBackground?-16777216|a.opaqueBackground:0),a.__cacheBitmap.__bitmapData=a.__cacheBitmapData),a.__cacheBitmapRendererSW=new Wj(new Kj(a.__cacheBitmapData.getSurface())),a.__cacheBitmapRendererSW.__worldTransform=new Ha,a.__cacheBitmapRendererSW.__worldColorTransform=new Sb;null==a.__cacheBitmapColorTransform&&(a.__cacheBitmapColorTransform=new Sb);a.__cacheBitmapRendererSW.__stage=a.stage;
a.__cacheBitmapRendererSW.__allowSmoothing=this.__allowSmoothing;L.__cast(a.__cacheBitmapRendererSW,Wj).__setBlendMode(10);a.__cacheBitmapRendererSW.__worldAlpha=1/a.__worldAlpha;a.__cacheBitmapRendererSW.__worldTransform.copyFrom(a.__renderTransform);a.__cacheBitmapRendererSW.__worldTransform.invert();a.__cacheBitmapRendererSW.__worldTransform.concat(a.__cacheBitmapMatrix);a.__cacheBitmapRendererSW.__worldTransform.tx-=n;a.__cacheBitmapRendererSW.__worldTransform.ty-=h;a.__cacheBitmapRendererSW.__worldColorTransform.__copyFrom(f);
a.__cacheBitmapRendererSW.__worldColorTransform.__invert();a.__isCacheBitmapRender=!0;a.__cacheBitmapRendererSW.__drawBitmapData(a.__cacheBitmapData,a,null);if(d){p=d=!1;e=0;for(g=a.__filters;e<g.length;)m=g[e],++e,m.__needSecondBitmapData&&(d=!0),m.__preserveObject&&(p=!0);e=a.__cacheBitmapData;m=null;d?(null==a.__cacheBitmapData2||null==a.__cacheBitmapData2.image||k>a.__cacheBitmapData2.width||l>a.__cacheBitmapData2.height?a.__cacheBitmapData2=new na(k,l,!0,0):a.__cacheBitmapData2.fillRect(a.__cacheBitmapData2.rect,
0),g=a.__cacheBitmapData2):g=e;p&&(null==a.__cacheBitmapData3||null==a.__cacheBitmapData3.image||k>a.__cacheBitmapData3.width||l>a.__cacheBitmapData3.height?a.__cacheBitmapData3=new na(k,l,!0,0):a.__cacheBitmapData3.fillRect(a.__cacheBitmapData3.rect,0),m=a.__cacheBitmapData3);null==a.__tempPoint&&(a.__tempPoint=new pa);k=a.__tempPoint;l=0;for(p=a.__filters;l<p.length;)h=p[l],++l,h.__preserveObject&&m.copyPixels(e,e.rect,k),n=h.__applyFilter(g,e,e.rect,k),h.__preserveObject&&n.draw(m,null,null!=a.__objectTransform?
a.__objectTransform.get_colorTransform():null),h.__renderDirty=!1,d&&n==g&&(n=e,e=g,g=n);a.__cacheBitmapData!=e&&(n=a.__cacheBitmapData,a.__cacheBitmapData=e,a.__cacheBitmapData2=n,a.__cacheBitmap.__bitmapData=a.__cacheBitmapData,a.__cacheBitmapRendererSW=null);a.__cacheBitmap.__imageVersion=a.__cacheBitmapData.__textureVersion}a.__cacheBitmapColorTransform.__copyFrom(f);a.__cacheBitmapColorTransform.__isDefault(!0)||(a.__cacheBitmapColorTransform.alphaMultiplier=1,a.__cacheBitmapData.colorTransform(a.__cacheBitmapData.rect,
a.__cacheBitmapColorTransform));a.__isCacheBitmapRender=!1}b&&ia.__pool.release(c);c=b;Sb.__pool.release(f)}else null!=a.__cacheBitmap&&(a.__cacheBitmap=null,a.__cacheBitmapData=null,a.__cacheBitmapData2=null,a.__cacheBitmapData3=null,a.__cacheBitmapColorTransform=null,a.__cacheBitmapRendererSW=null,c=!0);return c},__class__:Wj});var jr=function(){};h["openfl._internal.renderer.cairo.CairoTextField"]=jr;jr.__name__="openfl._internal.renderer.cairo.CairoTextField";jr.render=function(a,b,c){};var Xj=
function(){};h["openfl._internal.renderer.cairo.CairoTilemap"]=Xj;Xj.__name__="openfl._internal.renderer.cairo.CairoTilemap";Xj.render=function(a,b){if(a.__renderable&&0!=a.__group.__tiles.length){var c=b.__getAlpha(a.__worldAlpha);if(!(0>=c)){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var d=ia.__pool.get();d.setTo(0,0,a.__width,a.__height);b.__pushMaskRect(d,a.__renderTransform);Xj.renderTileContainer(a.__group,b,a.__renderTransform,a.__tileset,b.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,
c,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,null,d,new ei);b.__popMaskRect();b.__popMaskObject(a);ia.__pool.release(d)}}};Xj.renderTileContainer=function(a,b,c,d,e,f,g,k,l,m,p,n,h,q){var t=b.cairo,r=Ha.__pool.get();a=a.__tiles;for(var u,z,x,v=null,w,C=0;C<a.length;)if(w=a[C],++C,r.setTo(1,0,0,1,-w.get_originX(),-w.get_originY()),r.concat(w.get_matrix()),r.concat(c),u=null!=w.get_tileset()?w.get_tileset():d,z=w.get_alpha()*g,(x=w.get_visible())&&!(0>=z))if(f||(z=1),k&&(v=null!=w.__blendMode?
w.__blendMode:l),0<w.__length)Xj.renderTileContainer(w,b,r,u,e,f,z,k,v,m,p,n,h,q);else if(null!=u){x=w.get_id();if(-1==x){if(w=w.__rect,null==w||0>=w.width||0>=w.height)continue}else{w=u.__data[x];if(null==w)continue;h.setTo(w.x,w.y,w.width,w.height);w=h}u=u.__bitmapData;null!=u&&(u!=m&&(p=u.getSurface(),n=Bc.createForSurface(p),Bc.set_filter(n,e?1:3),t.set_source(n),m=u),k&&b.__setBlendMode(v),b.applyMatrix(r,t),q.tx=w.x,q.ty=w.y,Bc.set_matrix(n,q),t.set_source(n),t.save(),t.newPath(),t.rectangle(0,
0,w.width,w.height),t.clip(),1==z?t.paint():t.paintWithAlpha(z),t.restore())}Ha.__pool.release(r)};var Ft=function(){};h["openfl._internal.renderer.canvas.CanvasBitmap"]=Ft;Ft.__name__="openfl._internal.renderer.canvas.CanvasBitmap";Ft.render=function(a,b){if(a.__renderable){var c=b.__getAlpha(a.__worldAlpha);if(0<c&&null!=a.__bitmapData&&a.__bitmapData.__isValid&&a.__bitmapData.readable){var d=b.context;b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a,!1);Ba.convertToCanvas(a.__bitmapData.image);
d.globalAlpha=c;c=a.__scrollRect;b.setTransform(a.__renderTransform,d);b.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=!1);null==c?d.drawImage(a.__bitmapData.image.get_src(),0,0,a.__bitmapData.image.width,a.__bitmapData.image.height):d.drawImage(a.__bitmapData.image.get_src(),c.x,c.y,c.width,c.height);b.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=!0);b.__popMaskObject(a,!1)}}};var Gt=function(){};h["openfl._internal.renderer.canvas.CanvasDisplayObject"]=Gt;Gt.__name__="openfl._internal.renderer.canvas.CanvasDisplayObject";
Gt.render=function(a,b){if(!(null==a.opaqueBackground&&null==a.__graphics||!a.__renderable||0>=b.__getAlpha(a.__worldAlpha))){if(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var c=b.context;b.setTransform(a.__renderTransform,c);var d=a.opaqueBackground;c.fillStyle="rgb("+(d>>>16&255)+","+(d>>>8&255)+","+(d&255)+")";c.fillRect(0,0,a.get_width(),a.get_height());b.__popMaskObject(a)}if(null!=a.__graphics&&
a.__renderable){var e=b.__getAlpha(a.__worldAlpha);if(!(0>=e)){var f=a.__graphics;if(null!=f){D.render(f,b);var g=f.__width,k=f.__height;c=f.__canvas;if(null!=c&&f.__visible&&1<=g&&1<=k){var l=f.__worldTransform;d=b.context;var m=a.__scrollRect,p=a.__worldScale9Grid;if(null==m||0<m.width&&0<m.height){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);d.globalAlpha=e;if(null!=p&&0==l.b&&0==l.c){d.setTransform(1,0,0,1,l.tx,l.ty);var n=f.__bounds,h=f.__renderTransform.a,q=f.__renderTransform.d,
t=l.a,r=l.d;l=Math.max(1,Math.round(p.x*h));f=Math.round(p.y*q);e=Math.max(1,Math.round((n.get_right()-p.get_right())*h));m=Math.round((n.get_bottom()-p.get_bottom())*q);h=Math.round(p.width*h);q=Math.round(p.height*q);var u=Math.round(p.x*t),x=Math.round(p.y*r),v=Math.round((n.get_right()-p.get_right())*t);p=Math.round((n.get_bottom()-p.get_bottom())*r);n=Math.round(g*t)-u-v;t=Math.round(k*r)-x-p;b.applySmoothing(d,!1);0!=h&&0!=q?(d.drawImage(c,0,0,l,f,0,0,u,x),d.drawImage(c,l,0,h,f,u,0,n,x),d.drawImage(c,
l+h,0,e,f,u+n,0,v,x),d.drawImage(c,0,f,l,q,0,x,u,t),d.drawImage(c,l,f,h,q,u,x,n,t),d.drawImage(c,l+h,f,e,q,u+n,x,v,t),d.drawImage(c,0,f+q,l,m,0,x+t,u,p),d.drawImage(c,l,f+q,h,m,u,x+t,n,p),d.drawImage(c,l+h,f+q,e,m,u+n,x+t,v,p)):0==h&&0!=q?(k=u+n+v,d.drawImage(c,0,0,g,f,0,0,k,x),d.drawImage(c,0,f,g,q,0,x,k,t),d.drawImage(c,0,f+q,g,m,0,x+t,k,p)):0==q&&0!=h&&(g=x+t+p,d.drawImage(c,0,0,l,k,0,0,u,g),d.drawImage(c,l,0,h,k,u,0,n,g),d.drawImage(c,l+h,0,e,k,u+n,0,v,g))}else b.setTransform(l,d),null!=b.__domRenderer&&
(p=1/b.pixelRatio,d.scale(p,p)),d.drawImage(c,0,0,g,k);b.__popMaskObject(a)}}}}}}};var D=function(){};h["openfl._internal.renderer.canvas.CanvasGraphics"]=D;D.__name__="openfl._internal.renderer.canvas.CanvasGraphics";D.closePath=function(a){null==a&&(a=!1);null!=D.context.strokeStyle&&(a||D.context.closePath(),D.context.stroke(),a&&D.context.closePath(),D.context.beginPath())};D.createBitmapFill=function(a,b,c){Ba.convertToCanvas(a.image);D.setSmoothing(c);return D.context.createPattern(a.image.get_src(),
b?"repeat":"no-repeat")};D.createGradientPattern=function(a,b,c,d,e,f,g,k){var l=null;k=f=null;g=!1;null==e&&(e=Ha.__pool.get(),g=!0);switch(a){case 0:f=pa.__pool.get();f.setTo(-819.2,0);k=f.x;l=f.y;f.x=k*e.a+l*e.c+e.tx;f.y=k*e.b+l*e.d+e.ty;k=pa.__pool.get();k.setTo(819.2,0);l=k.x;a=k.y;k.x=l*e.a+a*e.c+e.tx;k.y=l*e.b+a*e.d+e.ty;l=D.context.createLinearGradient(f.x,f.y,k.x,k.y);break;case 1:f=pa.__pool.get(),f.setTo(1638.4,0),l=f.x,a=f.y,f.x=l*e.a+a*e.c+e.tx,f.y=l*e.b+a*e.d+e.ty,l=D.context.createRadialGradient(e.tx,
e.ty,0,e.tx,e.ty,Math.abs((f.x-e.tx)/2))}for(var m,p,n,h,q=0,t=b.length;q<t;)h=q++,m=b[h],a=c[h],p=(m&16711680)>>>16,n=(m&65280)>>>8,m&=255,h=d[h]/255,0>h&&(h=0),1<h&&(h=1),l.addColorStop(h,"rgba("+p+", "+n+", "+m+", "+a+")");null!=f&&pa.__pool.release(f);null!=k&&pa.__pool.release(k);g&&Ha.__pool.release(e);return l};D.createTempPatternCanvas=function(a,b,c,d){var e=window.document.createElement("canvas"),f=e.getContext("2d");e.width=c;e.height=d;a=a.image.get_src();f.fillStyle=f.createPattern(a,
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();D.hitTesting||f.fill(D.windingRule);return e};D.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+.7071067811865476*e,k=-e+.41421356237309503*e,l=-f+.7071067811865476*f,m=-f+.41421356237309503*f;D.context.moveTo(c,d-f);D.context.quadraticCurveTo(c,d+m,c+g,d+l);D.context.quadraticCurveTo(c+k,d,c-e,d);D.context.lineTo(a+
e,d);D.context.quadraticCurveTo(a-k,d,a-g,d+l);D.context.quadraticCurveTo(a,d+m,a,d-f);D.context.lineTo(a,b+f);D.context.quadraticCurveTo(a,b-m,a-g,b-l);D.context.quadraticCurveTo(a-k,b,a+e,b);D.context.lineTo(c-e,b);D.context.quadraticCurveTo(c+k,b,c+g,b-l);D.context.quadraticCurveTo(c,b-m,c,b+f);D.context.lineTo(c,d-f)};D.endFill=function(){D.context.beginPath();D.playCommands(D.fillCommands,!1);D.fillCommands.clear()};D.endStroke=function(){D.context.beginPath();D.playCommands(D.strokeCommands,
!0);D.context.closePath();D.strokeCommands.clear()};D.hitTest=function(a,b,c){D.bounds=a.__bounds;D.graphics=a;if(0==a.__commands.get_length()||null==D.bounds||0>=D.bounds.width||0>=D.bounds.height)return!1;D.hitTesting=!0;var d=a.__renderTransform,e=b*d.b+c*d.d+d.ty;b=b*d.a+c*d.c+d.tx-(D.bounds.x*d.a+D.bounds.y*d.c+d.tx);c=e-(D.bounds.x*d.b+D.bounds.y*d.d+d.ty);e=a.__canvas;var f=a.__context;a.__canvas=D.hitTestCanvas;a.__context=D.hitTestContext;D.context=a.__context;D.context.setTransform(d.a,
d.b,d.c,d.d,d.tx,d.ty);D.fillCommands.clear();D.strokeCommands.clear();D.hasFill=!1;D.hasStroke=!1;D.bitmapFill=null;D.bitmapRepeat=!1;D.windingRule="evenodd";d=new xg(a.__commands);for(var g=a.__commands.types,k=0,l=a.__commands.get_length();k<l;){var m=k++;m=g[m];switch(m._hx_index){case 0:case 1:case 2:case 3:D.endFill();if(D.hasFill&&D.context.isPointInPath(b,c,D.windingRule))return d.destroy(),a.__canvas=e,a.__context=f,!0;D.endStroke();if(D.hasStroke&&D.context.isPointInStroke(b,c))return d.destroy(),
a.__canvas=e,a.__context=f,!0;if(m==ka.BEGIN_BITMAP_FILL){switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=
1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=ka.BEGIN_BITMAP_FILL;m=d;D.fillCommands.beginBitmapFill(m.buffer.o[m.oPos],m.buffer.o[m.oPos+1],m.buffer.b[m.bPos],m.buffer.b[m.bPos+1]);D.strokeCommands.beginBitmapFill(m.buffer.o[m.oPos],m.buffer.o[m.oPos+1],m.buffer.b[m.bPos],m.buffer.b[m.bPos+1])}else if(m==ka.BEGIN_GRADIENT_FILL){switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;
case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=
1;break;case 20:d.oPos+=1}d.prev=ka.BEGIN_GRADIENT_FILL;m=d;D.fillCommands.beginGradientFill(m.buffer.o[m.oPos],m.buffer.ii[m.iiPos],m.buffer.ff[m.ffPos],m.buffer.ii[m.iiPos+1],m.buffer.o[m.oPos+1],m.buffer.o[m.oPos+2],m.buffer.o[m.oPos+3],m.buffer.f[m.fPos]);D.strokeCommands.beginGradientFill(m.buffer.o[m.oPos],m.buffer.ii[m.iiPos],m.buffer.ff[m.ffPos],m.buffer.ii[m.iiPos+1],m.buffer.o[m.oPos+1],m.buffer.o[m.oPos+2],m.buffer.o[m.oPos+3],m.buffer.f[m.fPos])}else if(m==ka.BEGIN_SHADER_FILL){switch(d.prev._hx_index){case 0:d.oPos+=
2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=
2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=ka.BEGIN_SHADER_FILL;m=d;D.fillCommands.beginShaderFill(m.buffer.o[m.oPos]);D.strokeCommands.beginShaderFill(m.buffer.o[m.oPos])}else{switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=
5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=ka.BEGIN_FILL;m=d;D.fillCommands.beginFill(m.buffer.i[m.iPos],1);D.strokeCommands.beginFill(m.buffer.i[m.iPos],1)}break;case 4:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;
case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=
1}d.prev=ka.CUBIC_CURVE_TO;m=d;D.fillCommands.cubicCurveTo(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2],m.buffer.f[m.fPos+3],m.buffer.f[m.fPos+4],m.buffer.f[m.fPos+5]);D.strokeCommands.cubicCurveTo(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2],m.buffer.f[m.fPos+3],m.buffer.f[m.fPos+4],m.buffer.f[m.fPos+5]);break;case 5:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=
1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=ka.CURVE_TO;m=d;D.fillCommands.curveTo(m.buffer.f[m.fPos],
m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2],m.buffer.f[m.fPos+3]);D.strokeCommands.curveTo(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2],m.buffer.f[m.fPos+3]);break;case 6:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=
5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=ka.DRAW_CIRCLE;m=d;D.fillCommands.drawCircle(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2]);D.strokeCommands.drawCircle(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2]);break;case 7:switch(d.prev._hx_index){case 0:d.oPos+=
2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=
2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=ka.DRAW_ELLIPSE;m=d;D.fillCommands.drawEllipse(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2],m.buffer.f[m.fPos+3]);D.strokeCommands.drawEllipse(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2],m.buffer.f[m.fPos+3]);break;case 9:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;
case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=ka.DRAW_RECT;m=d;D.fillCommands.drawRect(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+
2],m.buffer.f[m.fPos+3]);D.strokeCommands.drawRect(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2],m.buffer.f[m.fPos+3]);break;case 10:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=
4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=ka.DRAW_ROUND_RECT;m=d;D.fillCommands.drawRoundRect(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2],m.buffer.f[m.fPos+3],m.buffer.f[m.fPos+4],m.buffer.o[m.oPos]);D.strokeCommands.drawRoundRect(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+
2],m.buffer.f[m.fPos+3],m.buffer.f[m.fPos+4],m.buffer.o[m.oPos]);break;case 13:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=
2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=ka.END_FILL;D.endFill();if(D.hasFill&&D.context.isPointInPath(b,c,D.windingRule))return d.destroy(),a.__canvas=e,a.__context=f,!0;D.endStroke();if(D.hasStroke&&D.context.isPointInStroke(b,c))return d.destroy(),a.__canvas=e,a.__context=f,!0;D.hasFill=!1;D.bitmapFill=null;break;case 14:switch(d.prev._hx_index){case 0:d.oPos+=
2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=
2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=ka.LINE_BITMAP_STYLE;m=d;D.strokeCommands.lineBitmapStyle(m.buffer.o[m.oPos],m.buffer.o[m.oPos+1],m.buffer.b[m.bPos],m.buffer.b[m.bPos+1]);break;case 15:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=
4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=ka.LINE_GRADIENT_STYLE;m=d;D.strokeCommands.lineGradientStyle(m.buffer.o[m.oPos],m.buffer.ii[m.iiPos],m.buffer.ff[m.ffPos],m.buffer.ii[m.iiPos+1],m.buffer.o[m.oPos+1],m.buffer.o[m.oPos+2],m.buffer.o[m.oPos+
3],m.buffer.f[m.fPos]);break;case 16:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=
4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=ka.LINE_STYLE;m=d;D.strokeCommands.lineStyle(m.buffer.o[m.oPos],m.buffer.i[m.iPos],1,m.buffer.b[m.bPos],m.buffer.o[m.oPos+1],m.buffer.o[m.oPos+2],m.buffer.o[m.oPos+3],m.buffer.f[m.fPos+1]);break;case 17:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;
break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=ka.LINE_TO;m=d;D.fillCommands.lineTo(m.buffer.f[m.fPos],m.buffer.f[m.fPos+
1]);D.strokeCommands.lineTo(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1]);break;case 18:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=
2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=1}d.prev=ka.MOVE_TO;m=d;D.fillCommands.moveTo(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1]);D.strokeCommands.moveTo(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1]);break;case 21:D.windingRule="evenodd";break;case 22:D.windingRule="nonzero";break;default:switch(d.prev._hx_index){case 0:d.oPos+=2;d.bPos+=2;break;case 1:d.iPos+=1;d.fPos+=1;break;
case 2:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 3:d.oPos+=1;break;case 4:d.fPos+=6;break;case 5:d.fPos+=4;break;case 6:d.fPos+=3;break;case 7:d.fPos+=4;break;case 8:d.oPos+=3;break;case 9:d.fPos+=4;break;case 10:d.fPos+=5;d.oPos+=1;break;case 12:d.oPos+=4;break;case 14:d.oPos+=2;d.bPos+=2;break;case 15:d.oPos+=4;d.iiPos+=2;d.ffPos+=1;d.fPos+=1;break;case 16:d.oPos+=4;d.iPos+=1;d.fPos+=2;d.bPos+=1;break;case 17:d.fPos+=2;break;case 18:d.fPos+=2;break;case 19:d.oPos+=1;break;case 20:d.oPos+=
1}d.prev=m}}g=!1;0<D.fillCommands.get_length()&&D.endFill();D.hasFill&&D.context.isPointInPath(b,c,D.windingRule)&&(g=!0);0<D.strokeCommands.get_length()&&D.endStroke();D.hasStroke&&D.context.isPointInStroke(b,c)&&(g=!0);d.destroy();a.__canvas=e;a.__context=f;return g};D.isCCW=function(a,b,c,d,e,f){return 0>(c-a)*(f-b)-(d-b)*(e-a)};D.normalizeUVT=function(a,b){null==b&&(b=!1);for(var c=-Infinity,d,e=a.get_length(),f=1,g=e+1;f<g;)d=f++,b&&0==d%3||(d=a.get(d-1),c<d&&(c=d));if(!b)return{max:c,uvt:a};
f=Ua.toFloatVector(null);g=1;for(e+=1;g<e;)d=g++,b&&0==d%3||f.push(a.get(d-1));return{max:c,uvt:f}};D.playCommands=function(a,b){null==b&&(b=!1);D.bounds=D.graphics.__bounds;var c=D.bounds.x,d=D.bounds.y,e=0,f=0,g=!1,k=0,l=0,m=!1;D.windingRule="evenodd";D.setSmoothing(!0);var p=!1,n=new xg(a),h,q,t,r=null,u=null,x=a.types,v=0,w=a.get_length();a:for(;v<w;){var C=v++,J=x[C];switch(J._hx_index){case 0:switch(n.prev._hx_index){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=
4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1}n.prev=ka.BEGIN_BITMAP_FILL;
var Q=n;D.bitmapFill=Q.buffer.o[Q.oPos];D.context.fillStyle=D.createBitmapFill(Q.buffer.o[Q.oPos],Q.buffer.b[Q.bPos],Q.buffer.b[Q.bPos+1]);D.hasFill=!0;null!=Q.buffer.o[Q.oPos+1]?(D.pendingMatrix=Q.buffer.o[Q.oPos+1],D.inversePendingMatrix=Q.buffer.o[Q.oPos+1].clone(),D.inversePendingMatrix.invert()):(D.pendingMatrix=null,D.inversePendingMatrix=null);break;case 1:switch(n.prev._hx_index){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=
1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1}n.prev=ka.BEGIN_FILL;var F=n;if(.005>F.buffer.f[F.fPos])D.hasFill=
!1;else{if(1==F.buffer.f[F.fPos]){var B=ba.hex(F.buffer.i[F.iPos]&16777215,6);D.context.fillStyle="#"+B}else{var E=(F.buffer.i[F.iPos]&16711680)>>>16;var A=(F.buffer.i[F.iPos]&65280)>>>8;var G=F.buffer.i[F.iPos]&255;D.context.fillStyle="rgba("+E+", "+A+", "+G+", "+F.buffer.f[F.fPos]+")"}D.bitmapFill=null;D.setSmoothing(!0);D.hasFill=!0}break;case 2:switch(n.prev._hx_index){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=
1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1}n.prev=ka.BEGIN_GRADIENT_FILL;var H=n;D.context.fillStyle=D.createGradientPattern(H.buffer.o[H.oPos],
H.buffer.ii[H.iiPos],H.buffer.ff[H.ffPos],H.buffer.ii[H.iiPos+1],H.buffer.o[H.oPos+1],H.buffer.o[H.oPos+2],H.buffer.o[H.oPos+3],H.buffer.f[H.fPos]);D.bitmapFill=null;D.setSmoothing(!0);D.hasFill=!0;break;case 3:switch(n.prev._hx_index){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=
4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1}n.prev=ka.BEGIN_SHADER_FILL;var I=n,K=I.buffer.o[I.oPos];0<K.inputCount&&(D.bitmapFill=K.inputs[0],D.context.fillStyle=D.createBitmapFill(D.bitmapFill,0!=K.inputWrap[0],5!=K.inputFilter[0]),D.hasFill=!0,
D.pendingMatrix=null,D.inversePendingMatrix=null);break;case 4:switch(n.prev._hx_index){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;
n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1}n.prev=ka.CUBIC_CURVE_TO;var y=n;p=!0;D.context.bezierCurveTo(y.buffer.f[y.fPos]-c,y.buffer.f[y.fPos+1]-d,y.buffer.f[y.fPos+2]-c,y.buffer.f[y.fPos+3]-d,y.buffer.f[y.fPos+4]-c,y.buffer.f[y.fPos+5]-d);break;case 5:switch(n.prev._hx_index){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;
n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1}n.prev=ka.CURVE_TO;var L=n;p=!0;
D.context.quadraticCurveTo(L.buffer.f[L.fPos]-c,L.buffer.f[L.fPos+1]-d,L.buffer.f[L.fPos+2]-c,L.buffer.f[L.fPos+3]-d);break;case 6:switch(n.prev._hx_index){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 14:n.oPos+=
2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1}n.prev=ka.DRAW_CIRCLE;var M=n;p=!0;D.context.moveTo(M.buffer.f[M.fPos]-c+M.buffer.f[M.fPos+2],M.buffer.f[M.fPos+1]-d);D.context.arc(M.buffer.f[M.fPos]-c,M.buffer.f[M.fPos+1]-d,M.buffer.f[M.fPos+2],0,2*Math.PI,!0);break;case 7:switch(n.prev._hx_index){case 0:n.oPos+=2;n.bPos+=2;break;
case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=
1;break;case 20:n.oPos+=1}n.prev=ka.DRAW_ELLIPSE;var N=n;p=!0;var P=N.buffer.f[N.fPos];var S=N.buffer.f[N.fPos+1];var T=N.buffer.f[N.fPos+2];var Pa=N.buffer.f[N.fPos+3];P-=c;S-=d;var da=T/2*.5522848;var Ca=Pa/2*.5522848;var U=P+T;var W=S+Pa;var Aa=P+T/2;var X=S+Pa/2;D.context.moveTo(P,X);D.context.bezierCurveTo(P,X-Ca,Aa-da,S,Aa,S);D.context.bezierCurveTo(Aa+da,S,U,X-Ca,U,X);D.context.bezierCurveTo(U,X+Ca,Aa+da,W,Aa,W);D.context.bezierCurveTo(Aa-da,W,P,X+Ca,P,X);break;case 8:switch(n.prev._hx_index){case 0:n.oPos+=
2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=
2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1}n.prev=ka.DRAW_QUADS;var Z=n,aa=Z.buffer.o[Z.oPos],O=Z.buffer.o[Z.oPos+1],Y=Z.buffer.o[Z.oPos+2],R=null!=O,ea=!1,V=!1,ha=R?O.get_length():Math.floor(aa.get_length()/4);if(0==ha)return;null!=Y&&(Y.get_length()>=6*ha?V=ea=!0:Y.get_length()>=4*ha?ea=!0:Y.get_length()>=2*ha&&(V=!0));var cc=ia.__pool.get(),ca=Ha.__pool.get(),De=D.graphics.__renderTransform;D.context.save();for(var ma=0,la=ha;ma<la;){var ja=ma++;var oa=R?4*O.get(ja):4*ja;if(!(0>oa||(cc.setTo(aa.get(oa),
aa.get(oa+1),aa.get(oa+2),aa.get(oa+3)),0>=cc.width||0>=cc.height))){if(ea&&V){var na=6*ja;ca.setTo(Y.get(na),Y.get(na+1),Y.get(na+2),Y.get(na+3),Y.get(na+4),Y.get(na+5))}else ea?(na=4*ja,ca.setTo(Y.get(na),Y.get(na+1),Y.get(na+2),Y.get(na+3),cc.x,cc.y)):V?(na=2*ja,ca.tx=Y.get(na),ca.ty=Y.get(na+1)):(ca.tx=cc.x,ca.ty=cc.y);ca.tx+=e-c;ca.ty+=f-d;ca.concat(De);D.context.setTransform(ca.a,ca.b,ca.c,ca.d,ca.tx,ca.ty);null!=D.bitmapFill?D.context.drawImage(D.bitmapFill.image.get_src(),cc.x,cc.y,cc.width,
cc.height,0,0,cc.width,cc.height):D.context.fillRect(0,0,cc.width,cc.height)}}ia.__pool.release(cc);Ha.__pool.release(ca);D.context.restore();break;case 9:switch(n.prev._hx_index){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=
4;break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1}n.prev=ka.DRAW_RECT;var fa=n;var qa=!1;if(null!=D.bitmapFill&&!D.hitTesting){var ra=t=q=h=0;var va=!0;if(null!=D.pendingMatrix)if(0!=D.pendingMatrix.b||0!=D.pendingMatrix.c)va=!1;else{null==r&&(r=pa.__pool.get());null==u&&(u=pa.__pool.get());r.setTo(fa.buffer.f[fa.fPos],
fa.buffer.f[fa.fPos+1]);var Ed=D.inversePendingMatrix,Sa=r.x,ya=r.y;r.x=Sa*Ed.a+ya*Ed.c+Ed.tx;r.y=Sa*Ed.b+ya*Ed.d+Ed.ty;u.setTo(fa.buffer.f[fa.fPos]+fa.buffer.f[fa.fPos+2],fa.buffer.f[fa.fPos+1]+fa.buffer.f[fa.fPos+3]);var Ka=D.inversePendingMatrix,xa=u.x,Lc=u.y;u.x=xa*Ka.a+Lc*Ka.c+Ka.tx;u.y=xa*Ka.b+Lc*Ka.d+Ka.ty;h=r.y;ra=r.x;t=u.y;q=u.x}else h=fa.buffer.f[fa.fPos+1],ra=fa.buffer.f[fa.fPos],t=fa.buffer.f[fa.fPos+1]+fa.buffer.f[fa.fPos+3],q=fa.buffer.f[fa.fPos]+fa.buffer.f[fa.fPos+2];va&&0<=h&&0<=
ra&&q<=D.bitmapFill.width&&t<=D.bitmapFill.height&&(qa=!0,D.hitTesting||D.context.drawImage(D.bitmapFill.image.get_src(),ra,h,q-ra,t-h,fa.buffer.f[fa.fPos]-c,fa.buffer.f[fa.fPos+1]-d,fa.buffer.f[fa.fPos+2],fa.buffer.f[fa.fPos+3]))}qa||(p=!0,D.context.rect(fa.buffer.f[fa.fPos]-c,fa.buffer.f[fa.fPos+1]-d,fa.buffer.f[fa.fPos+2],fa.buffer.f[fa.fPos+3]));break;case 10:switch(n.prev._hx_index){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=
1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1}n.prev=ka.DRAW_ROUND_RECT;var sa=n;p=!0;
D.drawRoundRect(sa.buffer.f[sa.fPos]-c,sa.buffer.f[sa.fPos+1]-d,sa.buffer.f[sa.fPos+2],sa.buffer.f[sa.fPos+3],sa.buffer.f[sa.fPos+4],sa.buffer.o[sa.oPos]);break;case 12:switch(n.prev._hx_index){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=
1;break;case 12:n.oPos+=4;break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1}n.prev=ka.DRAW_TRIANGLES;var Wd=n,ua=Wd.buffer.o[Wd.oPos],wa=Wd.buffer.o[Wd.oPos+1],Ja=Wd.buffer.o[Wd.oPos+2],ta=null,za=null==D.bitmapFill;if(za&&null!=Ja)break a;if(!za){if(null==Ja){Ja=Ua.toFloatVector(null);for(var ed=0,pe=ua.get_length()/
2|0;ed<pe;){var Ba=ed++;Ja.push(ua.get(2*Ba)-c/D.bitmapFill.width);Ja.push(ua.get(2*Ba+1)-d/D.bitmapFill.height)}}var Ea=Ja.get_length()!=ua.get_length(),Fa=D.normalizeUVT(Ja,Ea),Ia=Fa.max;Ja=Fa.uvt;ta=1<Ia?D.createTempPatternCanvas(D.bitmapFill,D.bitmapRepeat,D.bounds.width|0,D.bounds.height|0):D.createTempPatternCanvas(D.bitmapFill,D.bitmapRepeat,D.bitmapFill.width,D.bitmapFill.height)}for(var Da=0,Ga=wa.get_length(),La,Na,Xa,Ta,Ya,Qa,$a,Oa,bb,Ra,Va,Wa,Ma,Za,ab,rb,db,eb,fb,gb,hb,ib,We,mb,nb,pb,
ob,qb;Da<Ga;){La=Da;Na=Da+1;Xa=Da+2;Ta=2*wa.get(La);Ya=2*wa.get(La)+1;Qa=2*wa.get(Na);$a=2*wa.get(Na)+1;Oa=2*wa.get(Xa);bb=2*wa.get(Xa)+1;Ra=ua.get(Ta)-c;Va=ua.get(Ya)-d;Wa=ua.get(Qa)-c;Ma=ua.get($a)-d;Za=ua.get(Oa)-c;ab=ua.get(bb)-d;switch(Wd.buffer.o[Wd.oPos+3]){case 0:if(0>(Wa-Ra)*(ab-Va)-(Ma-Va)*(Za-Ra)){Da+=3;continue}break;case 2:if(!(0>(Wa-Ra)*(ab-Va)-(Ma-Va)*(Za-Ra))){Da+=3;continue}}za?(D.context.beginPath(),D.context.moveTo(Ra,Va),D.context.lineTo(Wa,Ma),D.context.lineTo(Za,ab),D.context.closePath(),
D.hitTesting||D.context.fill(D.windingRule),Da+=3):(rb=Ja.get(Ta)*ta.width,eb=Ja.get(Qa)*ta.width,gb=Ja.get(Oa)*ta.width,db=Ja.get(Ya)*ta.height,fb=Ja.get($a)*ta.height,hb=Ja.get(bb)*ta.height,ib=rb*(hb-fb)-eb*hb+gb*fb+(eb-gb)*db,0==ib?(Da+=3,D.context.restore()):(D.context.save(),D.context.beginPath(),D.context.moveTo(Ra,Va),D.context.lineTo(Wa,Ma),D.context.lineTo(Za,ab),D.context.closePath(),D.context.clip(),We=-(db*(Za-Wa)-fb*Za+hb*Wa+(fb-hb)*Ra)/ib,mb=(fb*ab+db*(Ma-ab)-hb*Ma+(hb-fb)*Va)/ib,nb=
(rb*(Za-Wa)-eb*Za+gb*Wa+(eb-gb)*Ra)/ib,pb=-(eb*ab+rb*(Ma-ab)-gb*Ma+(gb-eb)*Va)/ib,ob=(rb*(hb*Wa-fb*Za)+db*(eb*Za-gb*Wa)+(gb*fb-eb*hb)*Ra)/ib,qb=(rb*(hb*Ma-fb*ab)+db*(eb*ab-gb*Ma)+(gb*fb-eb*hb)*Va)/ib,D.context.transform(We,mb,nb,pb,ob,qb),D.context.drawImage(ta,0,0,ta.width,ta.height),D.context.restore(),Da+=3))}break;case 14:switch(n.prev._hx_index){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=
6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1}n.prev=ka.LINE_BITMAP_STYLE;var lb=n;b&&D.hasStroke&&D.closePath();D.context.moveTo(e-
c,f-d);D.context.strokeStyle=D.createBitmapFill(lb.buffer.o[lb.oPos],lb.buffer.b[lb.bPos],lb.buffer.b[lb.bPos+1]);D.hasStroke=!0;break;case 15:switch(n.prev._hx_index){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;
break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1}n.prev=ka.LINE_GRADIENT_STYLE;var jb=n;b&&D.hasStroke&&D.closePath();D.context.moveTo(e-c,f-d);D.context.strokeStyle=D.createGradientPattern(jb.buffer.o[jb.oPos],jb.buffer.ii[jb.iiPos],jb.buffer.ff[jb.ffPos],jb.buffer.ii[jb.iiPos+1],jb.buffer.o[jb.oPos+1],jb.buffer.o[jb.oPos+
2],jb.buffer.o[jb.oPos+3],jb.buffer.f[jb.fPos]);D.setSmoothing(!0);D.hasStroke=!0;break;case 16:switch(n.prev._hx_index){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=
4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1}n.prev=ka.LINE_STYLE;var cb=n;b&&D.hasStroke&&D.closePath(!0);D.context.moveTo(e-c,f-d);if(null==cb.buffer.o[cb.oPos])D.hasStroke=!1;else{D.context.lineWidth=0<cb.buffer.o[cb.oPos]?cb.buffer.o[cb.oPos]:1;var Wc=null==cb.buffer.o[cb.oPos+3]?"round":ni.toString(cb.buffer.o[cb.oPos+3]).toLowerCase();D.context.lineJoin=
Wc;var tb=null==cb.buffer.o[cb.oPos+2]?"round":0==cb.buffer.o[cb.oPos+2]?"butt":oi.toString(cb.buffer.o[cb.oPos+2]).toLowerCase();D.context.lineCap=tb;D.context.miterLimit=cb.buffer.f[cb.fPos+1];if(1==cb.buffer.f[cb.fPos]){var ub=ba.hex(cb.buffer.i[cb.iPos]&16777215,6);D.context.strokeStyle="#"+ub}else E=(cb.buffer.i[cb.iPos]&16711680)>>>16,A=(cb.buffer.i[cb.iPos]&65280)>>>8,G=cb.buffer.i[cb.iPos]&255,D.context.strokeStyle="rgba("+E+", "+A+", "+G+", "+cb.buffer.f[cb.fPos]+")";D.setSmoothing(!0);D.hasStroke=
!0}break;case 17:switch(n.prev._hx_index){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=
2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1}n.prev=ka.LINE_TO;var sb=n;p=!0;D.context.lineTo(sb.buffer.f[sb.fPos]-c,sb.buffer.f[sb.fPos+1]-d);e=sb.buffer.f[sb.fPos];f=sb.buffer.f[sb.fPos+1];e==k&&f==l&&(g=!0);break;case 18:switch(n.prev._hx_index){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;
case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;n.oPos+=1;break;case 12:n.oPos+=4;break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1}n.prev=ka.MOVE_TO;var kb=n;D.context.moveTo(kb.buffer.f[kb.fPos]-c,kb.buffer.f[kb.fPos+1]-d);e=kb.buffer.f[kb.fPos];f=
kb.buffer.f[kb.fPos+1];m&&(g=!0);k=kb.buffer.f[kb.fPos];l=kb.buffer.f[kb.fPos+1];m=!0;break;case 21:D.windingRule="evenodd";break;case 22:D.windingRule="nonzero";break;default:switch(n.prev._hx_index){case 0:n.oPos+=2;n.bPos+=2;break;case 1:n.iPos+=1;n.fPos+=1;break;case 2:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 3:n.oPos+=1;break;case 4:n.fPos+=6;break;case 5:n.fPos+=4;break;case 6:n.fPos+=3;break;case 7:n.fPos+=4;break;case 8:n.oPos+=3;break;case 9:n.fPos+=4;break;case 10:n.fPos+=5;
n.oPos+=1;break;case 12:n.oPos+=4;break;case 14:n.oPos+=2;n.bPos+=2;break;case 15:n.oPos+=4;n.iiPos+=2;n.ffPos+=1;n.fPos+=1;break;case 16:n.oPos+=4;n.iPos+=1;n.fPos+=2;n.bPos+=1;break;case 17:n.fPos+=2;break;case 18:n.fPos+=2;break;case 19:n.oPos+=1;break;case 20:n.oPos+=1}n.prev=J}}null!=r&&pa.__pool.release(r);null!=u&&pa.__pool.release(u);n.destroy();p&&(b&&D.hasStroke&&(D.hasFill&&g?(D.context.lineTo(k-c,l-d),D.closePath(!1)):g&&e==k&&f==l&&D.closePath(!1),D.hitTesting||D.context.stroke()),b||
!D.hasFill&&null==D.bitmapFill||(D.context.translate(-D.bounds.x,-D.bounds.y),null!=D.pendingMatrix?(D.context.transform(D.pendingMatrix.a,D.pendingMatrix.b,D.pendingMatrix.c,D.pendingMatrix.d,D.pendingMatrix.tx,D.pendingMatrix.ty),D.hitTesting||D.context.fill(D.windingRule),D.context.transform(D.inversePendingMatrix.a,D.inversePendingMatrix.b,D.inversePendingMatrix.c,D.inversePendingMatrix.d,D.inversePendingMatrix.tx,D.inversePendingMatrix.ty)):D.hitTesting||D.context.fill(D.windingRule),D.context.translate(D.bounds.x,
D.bounds.y),D.context.closePath()))};D.render=function(a,b){a.__update(b.__worldTransform);a.__commands.__endBuffer();if(a.__softwareDirty&&a.__commands.get_dirty()){D.hitTesting=!1;D.graphics=a;D.allowSmoothing=b.__allowSmoothing;D.worldAlpha=b.__getAlpha(a.__owner.__worldAlpha);D.bounds=a.__bounds;var c=a.__width,d=a.__height;if(!a.__visible||0==a.__commands.get_length()||null==D.bounds||1>c||1>d)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"));D.context=a.__context;var e=a.__renderTransform,f=a.__canvas,g=b.pixelRatio,k=c*g|0,l=d*g|0;b.__setBlendModeContext(D.context,10);null!=b.__domRenderer?(f.width==k&&f.height==l?D.context.clearRect(0,0,k,l):(f.width=k,f.height=l,f.style.width=c+"px",f.style.height=d+"px"),c=a.__renderTransform,D.context.setTransform(c.a*g,c.b*g,c.c*g,c.d*g,c.tx*g,c.ty*g)):(f.width==k&&f.height==l?(D.context.closePath(),D.context.setTransform(1,0,0,1,0,0),D.context.clearRect(0,
0,k,l)):(f.width=c,f.height=d),D.context.setTransform(e.a,e.b,e.c,e.d,e.tx,e.ty));D.fillCommands.clear();D.strokeCommands.clear();D.hasFill=!1;D.hasStroke=!1;D.bitmapFill=null;g=D.bitmapRepeat=!1;d=c=0;D.windingRule="evenodd";e=new xg(a.__commands);f=a.__commands.types;k=0;for(l=a.__commands.get_length();k<l;){var m=k++;m=f[m];switch(m._hx_index){case 0:case 1:case 2:case 3:D.endFill();D.endStroke();if(m==ka.BEGIN_BITMAP_FILL){switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=
1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;
break;case 20:e.oPos+=1}e.prev=ka.BEGIN_BITMAP_FILL;m=e;D.fillCommands.beginBitmapFill(m.buffer.o[m.oPos],m.buffer.o[m.oPos+1],m.buffer.b[m.bPos],m.buffer.b[m.bPos+1]);D.strokeCommands.beginBitmapFill(m.buffer.o[m.oPos],m.buffer.o[m.oPos+1],m.buffer.b[m.bPos],m.buffer.b[m.bPos+1])}else if(m==ka.BEGIN_GRADIENT_FILL){switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=
6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=ka.BEGIN_GRADIENT_FILL;m=e;D.fillCommands.beginGradientFill(m.buffer.o[m.oPos],
m.buffer.ii[m.iiPos],m.buffer.ff[m.ffPos],m.buffer.ii[m.iiPos+1],m.buffer.o[m.oPos+1],m.buffer.o[m.oPos+2],m.buffer.o[m.oPos+3],m.buffer.f[m.fPos]);D.strokeCommands.beginGradientFill(m.buffer.o[m.oPos],m.buffer.ii[m.iiPos],m.buffer.ff[m.ffPos],m.buffer.ii[m.iiPos+1],m.buffer.o[m.oPos+1],m.buffer.o[m.oPos+2],m.buffer.o[m.oPos+3],m.buffer.f[m.fPos])}else if(m==ka.BEGIN_SHADER_FILL){switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;
e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=ka.BEGIN_SHADER_FILL;
m=e;D.fillCommands.beginShaderFill(m.buffer.o[m.oPos]);D.strokeCommands.beginShaderFill(m.buffer.o[m.oPos])}else{switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=
2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=ka.BEGIN_FILL;m=e;D.fillCommands.beginFill(m.buffer.i[m.iPos],m.buffer.f[m.fPos]);D.strokeCommands.beginFill(m.buffer.i[m.iPos],m.buffer.f[m.fPos])}break;case 4:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=
1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=ka.CUBIC_CURVE_TO;m=e;D.fillCommands.cubicCurveTo(m.buffer.f[m.fPos],
m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2],m.buffer.f[m.fPos+3],m.buffer.f[m.fPos+4],m.buffer.f[m.fPos+5]);g?D.strokeCommands.cubicCurveTo(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2],m.buffer.f[m.fPos+3],m.buffer.f[m.fPos+4],m.buffer.f[m.fPos+5]):(c=m.buffer.f[m.fPos+4],d=m.buffer.f[m.fPos+5]);break;case 5:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=
6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=ka.CURVE_TO;m=e;D.fillCommands.curveTo(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],
m.buffer.f[m.fPos+2],m.buffer.f[m.fPos+3]);g?D.strokeCommands.curveTo(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2],m.buffer.f[m.fPos+3]):(c=m.buffer.f[m.fPos+2],d=m.buffer.f[m.fPos+3]);break;case 6:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=
4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=ka.DRAW_CIRCLE;m=e;D.fillCommands.drawCircle(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2]);g&&D.strokeCommands.drawCircle(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+
2]);break;case 7:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=
2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=ka.DRAW_ELLIPSE;m=e;D.fillCommands.drawEllipse(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2],m.buffer.f[m.fPos+3]);g&&D.strokeCommands.drawEllipse(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2],m.buffer.f[m.fPos+3]);break;case 8:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=
1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=ka.DRAW_QUADS;m=e;D.fillCommands.drawQuads(m.buffer.o[m.oPos],
m.buffer.o[m.oPos+1],m.buffer.o[m.oPos+2]);break;case 9:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=
1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=ka.DRAW_RECT;m=e;D.fillCommands.drawRect(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2],m.buffer.f[m.fPos+3]);g&&D.strokeCommands.drawRect(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2],m.buffer.f[m.fPos+3]);break;case 10:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=
4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=ka.DRAW_ROUND_RECT;
m=e;D.fillCommands.drawRoundRect(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2],m.buffer.f[m.fPos+3],m.buffer.f[m.fPos+4],m.buffer.o[m.oPos]);g&&D.strokeCommands.drawRoundRect(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2],m.buffer.f[m.fPos+3],m.buffer.f[m.fPos+4],m.buffer.o[m.oPos]);break;case 12:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=
6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=ka.DRAW_TRIANGLES;m=e;D.fillCommands.drawTriangles(m.buffer.o[m.oPos],m.buffer.o[m.oPos+
1],m.buffer.o[m.oPos+2],m.buffer.o[m.oPos+3]);break;case 13:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=
1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=ka.END_FILL;D.endFill();D.endStroke();g=D.hasFill=!1;D.bitmapFill=null;d=c=0;break;case 14:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=
4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=ka.LINE_BITMAP_STYLE;m=e;g||0==c&&0==d||(D.strokeCommands.moveTo(c,d),d=c=0);g=!0;D.strokeCommands.lineBitmapStyle(m.buffer.o[m.oPos],m.buffer.o[m.oPos+
1],m.buffer.b[m.bPos],m.buffer.b[m.bPos+1]);break;case 15:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=
1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=ka.LINE_GRADIENT_STYLE;m=e;g||0==c&&0==d||(D.strokeCommands.moveTo(c,d),d=c=0);g=!0;D.strokeCommands.lineGradientStyle(m.buffer.o[m.oPos],m.buffer.ii[m.iiPos],m.buffer.ff[m.ffPos],m.buffer.ii[m.iiPos+1],m.buffer.o[m.oPos+1],m.buffer.o[m.oPos+2],m.buffer.o[m.oPos+3],m.buffer.f[m.fPos]);break;case 16:switch(e.prev._hx_index){case 0:e.oPos+=2;
e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=
2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=ka.LINE_STYLE;m=e;g||null==m.buffer.o[m.oPos]||0==c&&0==d||(D.strokeCommands.moveTo(c,d),d=c=0);g=null!=m.buffer.o[m.oPos];D.strokeCommands.lineStyle(m.buffer.o[m.oPos],m.buffer.i[m.iPos],m.buffer.f[m.fPos],m.buffer.b[m.bPos],m.buffer.o[m.oPos+1],m.buffer.o[m.oPos+2],m.buffer.o[m.oPos+3],m.buffer.f[m.fPos+1]);break;case 17:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;
e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=ka.LINE_TO;m=e;
D.fillCommands.lineTo(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1]);g?D.strokeCommands.lineTo(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1]):(c=m.buffer.f[m.fPos],d=m.buffer.f[m.fPos+1]);break;case 18:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=
5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=ka.MOVE_TO;m=e;D.fillCommands.moveTo(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1]);g?D.strokeCommands.moveTo(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1]):(c=m.buffer.f[m.fPos],d=m.buffer.f[m.fPos+1]);break;case 19:switch(e.prev._hx_index){case 0:e.oPos+=
2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=
2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=ka.OVERRIDE_BLEND_MODE;m=e;b.__setBlendModeContext(D.context,m.buffer.o[m.oPos]);break;case 21:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=
4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=ka.WINDING_EVEN_ODD;D.fillCommands.windingEvenOdd();D.windingRule="evenodd";break;case 22:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;
break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=ka.WINDING_NON_ZERO;D.fillCommands.windingNonZero();D.windingRule=
"nonzero";break;default:switch(e.prev._hx_index){case 0:e.oPos+=2;e.bPos+=2;break;case 1:e.iPos+=1;e.fPos+=1;break;case 2:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 3:e.oPos+=1;break;case 4:e.fPos+=6;break;case 5:e.fPos+=4;break;case 6:e.fPos+=3;break;case 7:e.fPos+=4;break;case 8:e.oPos+=3;break;case 9:e.fPos+=4;break;case 10:e.fPos+=5;e.oPos+=1;break;case 12:e.oPos+=4;break;case 14:e.oPos+=2;e.bPos+=2;break;case 15:e.oPos+=4;e.iiPos+=2;e.ffPos+=1;e.fPos+=1;break;case 16:e.oPos+=4;e.iPos+=
1;e.fPos+=2;e.bPos+=1;break;case 17:e.fPos+=2;break;case 18:e.fPos+=2;break;case 19:e.oPos+=1;break;case 20:e.oPos+=1}e.prev=m}}0<D.fillCommands.get_length()&&D.endFill();0<D.strokeCommands.get_length()&&D.endStroke();e.destroy();a.__bitmap=na.fromCanvas(a.__canvas)}a.__softwareDirty=!1;a.set___dirty(!1)}};D.renderMask=function(a,b){if(0!=a.__commands.get_length()){D.context=b.context;b=new xg(a.__commands);var c=a.__commands.types,d=0;for(a=a.__commands.get_length();d<a;){var e=d++;e=c[e];switch(e._hx_index){case 4:switch(b.prev._hx_index){case 0:b.oPos+=
2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=
2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.CUBIC_CURVE_TO;e=b;D.context.bezierCurveTo(e.buffer.f[e.fPos]-0,e.buffer.f[e.fPos+1]-0,e.buffer.f[e.fPos+2]-0,e.buffer.f[e.fPos+3]-0,e.buffer.f[e.fPos+4]-0,e.buffer.f[e.fPos+5]-0);break;case 5:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=
4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.CURVE_TO;e=b;D.context.quadraticCurveTo(e.buffer.f[e.fPos]-0,e.buffer.f[e.fPos+1]-0,e.buffer.f[e.fPos+2]-0,e.buffer.f[e.fPos+3]-0);break;case 6:switch(b.prev._hx_index){case 0:b.oPos+=
2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=
2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.DRAW_CIRCLE;e=b;D.context.arc(e.buffer.f[e.fPos]-0,e.buffer.f[e.fPos+1]-0,e.buffer.f[e.fPos+2],0,2*Math.PI,!0);break;case 7:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=
5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.DRAW_ELLIPSE;var f=b;e=f.buffer.f[f.fPos];var g=f.buffer.f[f.fPos+1];var k=f.buffer.f[f.fPos+2];var l=f.buffer.f[f.fPos+3];e-=0;g-=0;f=k/2*.5522848;var m=l/2*.5522848;var p=e+k;var n=g+l;k=e+k/2;l=g+l/2;D.context.moveTo(e,
l);D.context.bezierCurveTo(e,l-m,k-f,g,k,g);D.context.bezierCurveTo(k+f,g,p,l-m,p,l);D.context.bezierCurveTo(p,l+m,k+f,n,k,n);D.context.bezierCurveTo(k-f,n,e,l+m,e,l);break;case 9:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=
5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.DRAW_RECT;e=b;D.context.beginPath();D.context.rect(e.buffer.f[e.fPos]-0,e.buffer.f[e.fPos+1]-0,e.buffer.f[e.fPos+2],e.buffer.f[e.fPos+3]);D.context.closePath();break;case 10:switch(b.prev._hx_index){case 0:b.oPos+=2;
b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=
2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.DRAW_ROUND_RECT;e=b;D.drawRoundRect(e.buffer.f[e.fPos]-0,e.buffer.f[e.fPos+1]-0,e.buffer.f[e.fPos+2],e.buffer.f[e.fPos+3],e.buffer.f[e.fPos+4],e.buffer.o[e.oPos]);break;case 17:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=
3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.LINE_TO;e=b;D.context.lineTo(e.buffer.f[e.fPos]-0,e.buffer.f[e.fPos+1]-0);break;case 18:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=
1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=
1}b.prev=ka.MOVE_TO;e=b;D.context.moveTo(e.buffer.f[e.fPos]-0,e.buffer.f[e.fPos+1]-0);break;default:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=
4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=e}}b.destroy()}};D.setSmoothing=function(a){D.allowSmoothing||(a=!1);D.context.imageSmoothingEnabled!=a&&(D.context.imageSmoothingEnabled=a)};var Xi=function(a){this.pixelRatio=1;jf.call(this);this.context=a};h["openfl.display.CanvasRenderer"]=Xi;Xi.__name__="openfl.display.CanvasRenderer";Xi.__super__=jf;Xi.prototype=
w(jf.prototype,{context:null,pixelRatio:null,applySmoothing:function(a,b){},setTransform:function(a,b){},__class__:Xi});var ih=function(a){Xi.call(this,a);this.__colorTransform=new Sb;this.__transform=new Ha;this.__type="canvas"};h["openfl._internal.renderer.canvas.CanvasRenderer"]=ih;ih.__name__="openfl._internal.renderer.canvas.CanvasRenderer";ih.__super__=Xi;ih.prototype=w(Xi.prototype,{__colorTransform:null,__domRenderer:null,__transform:null,applySmoothing:function(a,b){a.imageSmoothingEnabled=
b},setTransform:function(a,b){null==b?b=this.context:this.context==b&&null!=this.__worldTransform&&(this.__transform.copyFrom(a),this.__transform.concat(this.__worldTransform),a=this.__transform);this.__roundPixels?b.setTransform(a.a,a.b,a.c,a.d,a.tx|0,a.ty|0):b.setTransform(a.a,a.b,a.c,a.d,a.tx,a.ty)},__clear:function(){if(null!=this.__stage){var a=this.__blendMode;this.__blendMode=null;this.__setBlendMode(10);this.context.setTransform(1,0,0,1,0,0);this.context.globalAlpha=1;!this.__stage.__transparent&&
this.__stage.__clearBeforeRender?(this.context.fillStyle=this.__stage.__colorString,this.context.fillRect(0,0,this.__stage.stageWidth*this.__stage.window.__scale,this.__stage.stageHeight*this.__stage.window.__scale)):this.__stage.__transparent&&this.__stage.__clearBeforeRender&&this.context.clearRect(0,0,this.__stage.stageWidth*this.__stage.window.__scale,this.__stage.stageHeight*this.__stage.window.__scale);this.__setBlendMode(a)}},__drawBitmapData:function(a,b,c){null!=c&&this.__pushMaskRect(c,
b.__renderTransform);var d=a.image.buffer;this.__allowSmoothing||this.applySmoothing(d.__srcContext,!1);this.__render(b);this.__allowSmoothing||this.applySmoothing(d.__srcContext,!0);d.__srcContext.setTransform(1,0,0,1,0,0);d.__srcImageData=null;d.data=null;a.image.dirty=!0;a.image.version++;null!=c&&this.__popMaskRect()},__getAlpha:function(a){return a*this.__worldAlpha},__getColorTransform:function(a){return null!=this.__worldColorTransform?(this.__colorTransform.__copyFrom(this.__worldColorTransform),
this.__colorTransform.__combine(a),this.__colorTransform):a},__popMask:function(){this.context.restore()},__popMaskObject:function(a,b){null==b&&(b=!0);a.__isCacheBitmapRender||null==a.__mask||this.__popMask();b&&null!=a.__scrollRect&&this.__popMaskRect()},__popMaskRect:function(){this.context.restore()},__pushMask:function(a){this.context.save();this.setTransform(a.__renderTransform,this.context);this.context.beginPath();this.__renderMask(a);this.context.closePath();this.context.clip()},__pushMaskObject:function(a,
b){null==b&&(b=!0);b&&null!=a.__scrollRect&&this.__pushMaskRect(a.__scrollRect,a.__renderTransform);a.__isCacheBitmapRender||null==a.__mask||this.__pushMask(a.__mask)},__pushMaskRect:function(a,b){this.context.save();this.setTransform(b,this.context);this.context.beginPath();this.context.rect(a.x,a.y,a.width,a.height);this.context.clip()},__render:function(a){null!=a&&(null!=a.__type?this.__renderDisplayObject(a):this.__renderBitmapData(a))},__renderBitmap:function(a){this.__updateCacheBitmap(a,!1);
null!=a.__bitmapData&&null!=a.__bitmapData.image&&(a.__imageVersion=a.__bitmapData.image.version);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){if(!(null==a.opaqueBackground&&null==a.__graphics||!a.__renderable||0>=this.__getAlpha(a.__worldAlpha))){if(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);var b=this.context;this.setTransform(a.__renderTransform,b);var c=a.opaqueBackground;b.fillStyle=
"rgb("+(c>>>16&255)+","+(c>>>8&255)+","+(c&255)+")";b.fillRect(0,0,a.get_width(),a.get_height());this.__popMaskObject(a)}if(null!=a.__graphics&&a.__renderable){var d=this.__getAlpha(a.__worldAlpha);if(!(0>=d)){var e=a.__graphics;if(null!=e){D.render(e,this);var f=e.__width,g=e.__height;b=e.__canvas;if(null!=b&&e.__visible&&1<=f&&1<=g){var k=e.__worldTransform;c=this.context;var l=a.__scrollRect,m=a.__worldScale9Grid;if(null==l||0<l.width&&0<l.height){this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);
c.globalAlpha=d;if(null!=m&&0==k.b&&0==k.c){c.setTransform(1,0,0,1,k.tx,k.ty);var p=e.__bounds,n=e.__renderTransform.a,h=e.__renderTransform.d,q=k.a,t=k.d;k=Math.max(1,Math.round(m.x*n));e=Math.round(m.y*h);d=Math.max(1,Math.round((p.get_right()-m.get_right())*n));l=Math.round((p.get_bottom()-m.get_bottom())*h);n=Math.round(m.width*n);h=Math.round(m.height*h);var r=Math.round(m.x*q),u=Math.round(m.y*t),x=Math.round((p.get_right()-m.get_right())*q);m=Math.round((p.get_bottom()-m.get_bottom())*t);p=
Math.round(f*q)-r-x;q=Math.round(g*t)-u-m;this.applySmoothing(c,!1);0!=n&&0!=h?(c.drawImage(b,0,0,k,e,0,0,r,u),c.drawImage(b,k,0,n,e,r,0,p,u),c.drawImage(b,k+n,0,d,e,r+p,0,x,u),c.drawImage(b,0,e,k,h,0,u,r,q),c.drawImage(b,k,e,n,h,r,u,p,q),c.drawImage(b,k+n,e,d,h,r+p,u,x,q),c.drawImage(b,0,e+h,k,l,0,u+q,r,m),c.drawImage(b,k,e+h,n,l,r,u+q,p,m),c.drawImage(b,k+n,e+h,d,l,r+p,u+q,x,m)):0==n&&0!=h?(g=r+p+x,c.drawImage(b,0,0,f,e,0,0,g,u),c.drawImage(b,0,e,f,h,0,u,g,q),c.drawImage(b,0,e+h,f,l,0,u+q,g,m)):
0==h&&0!=n&&(f=u+q+m,c.drawImage(b,0,0,k,g,0,0,r,f),c.drawImage(b,k,0,n,g,r,0,p,f),c.drawImage(b,k+n,0,d,g,r+p,0,x,f))}else this.setTransform(k,c),null!=this.__domRenderer&&(m=1/this.pixelRatio,c.scale(m,m)),c.drawImage(b,0,0,f,g);this.__popMaskObject(a)}}}}}}}else a=a.__cacheBitmap;a.__renderable&&(c=this.__getAlpha(a.__worldAlpha),0<c&&null!=a.__bitmapData&&a.__bitmapData.__isValid&&a.__bitmapData.readable&&(b=this.context,this.__setBlendMode(a.__worldBlendMode),this.__pushMaskObject(a,!1),Ba.convertToCanvas(a.__bitmapData.image),
b.globalAlpha=c,c=a.__scrollRect,this.setTransform(a.__renderTransform,b),this.__allowSmoothing&&a.smoothing||(b.imageSmoothingEnabled=!1),null==c?b.drawImage(a.__bitmapData.image.get_src(),0,0,a.__bitmapData.image.width,a.__bitmapData.image.height):b.drawImage(a.__bitmapData.image.get_src(),c.x,c.y,c.width,c.height),this.__allowSmoothing&&a.smoothing||(b.imageSmoothingEnabled=!0),this.__popMaskObject(a,!1)))},__renderBitmapData:function(a){a.readable&&(a.image.type==If.DATA&&Ba.convertToCanvas(a.image),
this.context.globalAlpha=1,this.setTransform(a.__renderTransform,this.context),this.context.drawImage(a.image.get_src(),0,0,a.image.width,a.image.height))},__renderDisplayObject:function(a){if(null!=a&&null!=a.__type){switch(a.__type._hx_index){case 0:this.__renderBitmap(a);break;case 2:this.__renderDisplayObjectContainer(a);break;case 1:case 4:this.__renderShape(a);break;case 5:this.__renderSimpleButton(a);break;case 6:this.__renderTextField(a);break;case 7:this.__renderTilemap(a);break;case 8:this.__renderVideo(a)}if(null!=
a.__customRenderEvent){var b=a.__customRenderEvent;b.allowSmoothing=this.__allowSmoothing;b.objectMatrix.copyFrom(a.__renderTransform);b.objectColorTransform.__copyFrom(a.__worldColorTransform);b.renderer=this;b.type="renderCanvas";this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);a.dispatchEvent(b);this.__popMaskObject(a)}}},__renderDisplayObjectContainer:function(a){if(null==this.__domRenderer){for(var b=a.__removedChildren.iterator();b.hasNext();){var c=b.next();null==c.stage&&c.__cleanup()}a.__removedChildren.set_length(0)}if(!(!a.__renderable||
0>=a.__worldAlpha||null!=a.get_mask()&&(0>=a.get_mask().get_width()||0>=a.get_mask().get_height()))){this.__updateCacheBitmap(a,!1);if(null!=a.__cacheBitmap&&!a.__isCacheBitmapRender){if(b=a.__cacheBitmap,b.__renderable){var d=this.__getAlpha(b.__worldAlpha);0<d&&null!=b.__bitmapData&&b.__bitmapData.__isValid&&b.__bitmapData.readable&&(c=this.context,this.__setBlendMode(b.__worldBlendMode),this.__pushMaskObject(b,!1),Ba.convertToCanvas(b.__bitmapData.image),c.globalAlpha=d,d=b.__scrollRect,this.setTransform(b.__renderTransform,
c),this.__allowSmoothing&&b.smoothing||(c.imageSmoothingEnabled=!1),null==d?c.drawImage(b.__bitmapData.image.get_src(),0,0,b.__bitmapData.image.width,b.__bitmapData.image.height):c.drawImage(b.__bitmapData.image.get_src(),d.x,d.y,d.width,d.height),this.__allowSmoothing&&b.smoothing||(c.imageSmoothingEnabled=!0),this.__popMaskObject(b,!1))}}else if(!(null==a.opaqueBackground&&null==a.__graphics||!a.__renderable||0>=this.__getAlpha(a.__worldAlpha))&&(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&
0<a.get_width()&&0<a.get_height()&&(this.__setBlendMode(a.__worldBlendMode),this.__pushMaskObject(a),b=this.context,this.setTransform(a.__renderTransform,b),c=a.opaqueBackground,b.fillStyle="rgb("+(c>>>16&255)+","+(c>>>8&255)+","+(c&255)+")",b.fillRect(0,0,a.get_width(),a.get_height()),this.__popMaskObject(a)),null!=a.__graphics&&a.__renderable)){var e=this.__getAlpha(a.__worldAlpha);if(!(0>=e)){var f=a.__graphics;if(null!=f){D.render(f,this);d=f.__width;var g=f.__height;b=f.__canvas;if(null!=b&&
f.__visible&&1<=d&&1<=g){var k=f.__worldTransform;c=this.context;var l=a.__scrollRect,m=a.__worldScale9Grid;if(null==l||0<l.width&&0<l.height){this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);c.globalAlpha=e;if(null!=m&&0==k.b&&0==k.c){c.setTransform(1,0,0,1,k.tx,k.ty);var p=f.__bounds,n=f.__renderTransform.a,h=f.__renderTransform.d,q=k.a,t=k.d;k=Math.max(1,Math.round(m.x*n));f=Math.round(m.y*h);e=Math.max(1,Math.round((p.get_right()-m.get_right())*n));l=Math.round((p.get_bottom()-
m.get_bottom())*h);n=Math.round(m.width*n);h=Math.round(m.height*h);var r=Math.round(m.x*q),u=Math.round(m.y*t),x=Math.round((p.get_right()-m.get_right())*q);m=Math.round((p.get_bottom()-m.get_bottom())*t);p=Math.round(d*q)-r-x;q=Math.round(g*t)-u-m;this.applySmoothing(c,!1);0!=n&&0!=h?(c.drawImage(b,0,0,k,f,0,0,r,u),c.drawImage(b,k,0,n,f,r,0,p,u),c.drawImage(b,k+n,0,e,f,r+p,0,x,u),c.drawImage(b,0,f,k,h,0,u,r,q),c.drawImage(b,k,f,n,h,r,u,p,q),c.drawImage(b,k+n,f,e,h,r+p,u,x,q),c.drawImage(b,0,f+h,
k,l,0,u+q,r,m),c.drawImage(b,k,f+h,n,l,r,u+q,p,m),c.drawImage(b,k+n,f+h,e,l,r+p,u+q,x,m)):0==n&&0!=h?(g=r+p+x,c.drawImage(b,0,0,d,f,0,0,g,u),c.drawImage(b,0,f,d,h,0,u,g,q),c.drawImage(b,0,f+h,d,l,0,u+q,g,m)):0==h&&0!=n&&(d=u+q+m,c.drawImage(b,0,0,k,g,0,0,r,d),c.drawImage(b,k,0,n,g,r,0,p,d),c.drawImage(b,k+n,0,e,g,r+p,0,x,d))}else this.setTransform(k,c),null!=this.__domRenderer&&(m=1/this.pixelRatio,c.scale(m,m)),c.drawImage(b,0,0,d,g);this.__popMaskObject(a)}}}}}if(null==a.__cacheBitmap||a.__isCacheBitmapRender){this.__pushMaskObject(a);
if(null!=this.__stage){b=0;for(c=a.__children;b<c.length;)d=c[b],++b,this.__renderDisplayObject(d),d.__renderDirty=!1;a.__renderDirty=!1}else for(b=0,c=a.__children;b<c.length;)d=c[b],++b,this.__renderDisplayObject(d);this.__popMaskObject(a)}}},__renderMask:function(a){if(null!=a)switch(a.__type._hx_index){case 0:this.context.rect(0,0,a.get_width(),a.get_height());break;case 2:if(null==this.__domRenderer){for(var b=a.__removedChildren.iterator();b.hasNext();){var c=b.next();null==c.stage&&c.__cleanup()}a.__removedChildren.set_length(0)}null!=
a.__graphics&&D.renderMask(a.__graphics,this);b=0;for(a=a.__children;b<a.length;)c=a[b],++b,this.__renderMask(c);break;case 3:break;case 5:this.__renderMask(a.__currentState);break;default:null!=a.__graphics&&D.renderMask(a.__graphics,this)}},__renderShape:function(a){if(null==a.get_mask()||0<a.get_mask().get_width()&&0<a.get_mask().get_height())if(this.__updateCacheBitmap(a,!1),null!=a.__cacheBitmap&&!a.__isCacheBitmapRender){if(a=a.__cacheBitmap,a.__renderable){var b=this.__getAlpha(a.__worldAlpha);
if(0<b&&null!=a.__bitmapData&&a.__bitmapData.__isValid&&a.__bitmapData.readable){var c=this.context;this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a,!1);Ba.convertToCanvas(a.__bitmapData.image);c.globalAlpha=b;b=a.__scrollRect;this.setTransform(a.__renderTransform,c);this.__allowSmoothing&&a.smoothing||(c.imageSmoothingEnabled=!1);null==b?c.drawImage(a.__bitmapData.image.get_src(),0,0,a.__bitmapData.image.width,a.__bitmapData.image.height):c.drawImage(a.__bitmapData.image.get_src(),
b.x,b.y,b.width,b.height);this.__allowSmoothing&&a.smoothing||(c.imageSmoothingEnabled=!0);this.__popMaskObject(a,!1)}}}else if(!(null==a.opaqueBackground&&null==a.__graphics||!a.__renderable||0>=this.__getAlpha(a.__worldAlpha))&&(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()&&(this.__setBlendMode(a.__worldBlendMode),this.__pushMaskObject(a),c=this.context,this.setTransform(a.__renderTransform,c),b=a.opaqueBackground,c.fillStyle="rgb("+(b>>>16&255)+","+(b>>>
8&255)+","+(b&255)+")",c.fillRect(0,0,a.get_width(),a.get_height()),this.__popMaskObject(a)),null!=a.__graphics&&a.__renderable)){var d=this.__getAlpha(a.__worldAlpha);if(!(0>=d)){var e=a.__graphics;if(null!=e){D.render(e,this);var f=e.__width,g=e.__height;c=e.__canvas;if(null!=c&&e.__visible&&1<=f&&1<=g){var k=e.__worldTransform;b=this.context;var l=a.__scrollRect,m=a.__worldScale9Grid;if(null==l||0<l.width&&0<l.height){this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);b.globalAlpha=
d;if(null!=m&&0==k.b&&0==k.c){b.setTransform(1,0,0,1,k.tx,k.ty);var p=e.__bounds,n=e.__renderTransform.a,h=e.__renderTransform.d,q=k.a,t=k.d;k=Math.max(1,Math.round(m.x*n));e=Math.round(m.y*h);d=Math.max(1,Math.round((p.get_right()-m.get_right())*n));l=Math.round((p.get_bottom()-m.get_bottom())*h);n=Math.round(m.width*n);h=Math.round(m.height*h);var r=Math.round(m.x*q),u=Math.round(m.y*t),x=Math.round((p.get_right()-m.get_right())*q);m=Math.round((p.get_bottom()-m.get_bottom())*t);p=Math.round(f*
q)-r-x;q=Math.round(g*t)-u-m;this.applySmoothing(b,!1);0!=n&&0!=h?(b.drawImage(c,0,0,k,e,0,0,r,u),b.drawImage(c,k,0,n,e,r,0,p,u),b.drawImage(c,k+n,0,d,e,r+p,0,x,u),b.drawImage(c,0,e,k,h,0,u,r,q),b.drawImage(c,k,e,n,h,r,u,p,q),b.drawImage(c,k+n,e,d,h,r+p,u,x,q),b.drawImage(c,0,e+h,k,l,0,u+q,r,m),b.drawImage(c,k,e+h,n,l,r,u+q,p,m),b.drawImage(c,k+n,e+h,d,l,r+p,u+q,x,m)):0==n&&0!=h?(g=r+p+x,b.drawImage(c,0,0,f,e,0,0,g,u),b.drawImage(c,0,e,f,h,0,u,g,q),b.drawImage(c,0,e+h,f,l,0,u+q,g,m)):0==h&&0!=n&&
(f=u+q+m,b.drawImage(c,0,0,k,g,0,0,r,f),b.drawImage(c,k,0,n,g,r,0,p,f),b.drawImage(c,k+n,0,d,g,r+p,0,x,f))}else this.setTransform(k,b),null!=this.__domRenderer&&(m=1/this.pixelRatio,b.scale(m,m)),b.drawImage(c,0,0,f,g);this.__popMaskObject(a)}}}}}},__renderSimpleButton:function(a){!a.__renderable||0>=a.__worldAlpha||null==a.__currentState||(this.__pushMaskObject(a),this.__renderDisplayObject(a.__currentState),this.__popMaskObject(a))},__renderTextField:function(a){null==this.__domRenderer||a.__renderedOnCanvasWhileOnDOM||
(a.__renderedOnCanvasWhileOnDOM=!0,1==a.get_type()&&a.replaceText(0,a.__text.length,a.__text),a.__isHTML&&a.__updateText(sb.parse(a.__text,a.__textFormat,a.__textEngine.textFormatRanges)),a.__dirty=!0,a.__layoutDirty=!0,a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty()));if(null==a.get_mask()||0<a.get_mask().get_width()&&0<a.get_mask().get_height())if(this.__updateCacheBitmap(a,!1),null==a.__cacheBitmap||a.__isCacheBitmapRender){var b=a.__textEngine,c=b.background||b.border?b.bounds:
b.textBounds,d=a.__graphics;a.__dirty&&(a.__updateLayout(),null==d.__bounds&&(d.__bounds=new ia),d.__bounds.copyFrom(c));d.__update(this.__worldTransform);if(a.__dirty||d.__softwareDirty){var e=d.__width,f=d.__height;if(!(null!=b.text&&""!=b.text||b.background||b.border||b.__hasFocus||1==b.type&&b.selectable)||(0>=b.width||0>=b.height)&&2!=b.autoSize)a.__graphics.__canvas=null,a.__graphics.__context=null,a.__graphics.__bitmap=null,a.__graphics.__softwareDirty=!1,a.__graphics.set___dirty(!1),a.__dirty=
!1;else{null==a.__graphics.__canvas&&(a.__graphics.__canvas=window.document.createElement("canvas"),a.__graphics.__context=a.__graphics.__canvas.getContext("2d"));aa.context=d.__context;var g=d.__renderTransform;if(null!=this.__domRenderer){var k=this.pixelRatio;d.__canvas.width=e*k|0;d.__canvas.height=f*k|0;d.__canvas.style.width=e+"px";d.__canvas.style.height=f+"px";e=Ha.__pool.get();e.copyFrom(g);e.scale(k,k);this.setTransform(e,aa.context);Ha.__pool.release(e)}else d.__canvas.width=e,d.__canvas.height=
f,aa.context.setTransform(g.a,g.b,g.c,g.d,g.tx,g.ty);null==aa.clearRect&&(aa.clearRect="undefined"!==typeof navigator&&"undefined"!==typeof navigator.isCocoonJS);aa.clearRect&&aa.context.clearRect(0,0,d.__canvas.width,d.__canvas.height);if(null!=b.text&&""!=b.text||b.__hasFocus){g=b.text;d.__context.imageSmoothingEnabled=!this.__allowSmoothing||0==b.antiAliasType&&400==b.sharpness?!1:!0;if(b.border||b.background)aa.context.rect(.5,.5,c.width-1,c.height-1),b.background&&(k=ba.hex(b.backgroundColor&
16777215,6),aa.context.fillStyle="#"+k,aa.context.fill()),b.border&&(aa.context.lineWidth=1,k=ba.hex(b.borderColor&16777215,6),aa.context.strokeStyle="#"+k,aa.context.stroke());aa.context.textBaseline="alphabetic";aa.context.textAlign="start";k=-a.get_scrollH();f=e=0;for(var l=a.get_scrollV()-1;f<l;){var m=f++;e-=b.lineHeights.get(m)}var p;for(f=b.layoutGroups.iterator();f.hasNext();)if(l=f.next(),!(l.lineIndex<a.get_scrollV()-1)){if(l.lineIndex>b.get_bottomScrollV()-1)break;m="#"+ba.hex(l.format.color&
16777215,6);aa.context.font=Zb.getFont(l.format);aa.context.fillStyle=m;aa.context.fillText(g.substring(l.startIndex,l.endIndex),l.offsetX+k-c.x,l.offsetY+l.ascent+e-c.y);if(-1<a.__caretIndex&&b.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&l.startIndex<=a.__caretIndex&&l.endIndex>=a.__caretIndex){for(var n=p=0,h=a.__caretIndex-l.startIndex;n<h;){var q=n++;if(l.positions.length<=q)break;p+=l.positions[q]}n=0;h=a.get_scrollV();for(q=l.lineIndex+1;h<q;){var t=h++;n+=b.lineHeights.get(t-
1)}aa.context.beginPath();h=ba.hex(l.format.color&16777215,6);aa.context.strokeStyle="#"+h;aa.context.moveTo(l.offsetX+p-a.get_scrollH()-c.x,n+2-c.y);aa.context.lineWidth=1;aa.context.lineTo(l.offsetX+p-a.get_scrollH()-c.x,n+Zb.getFormatHeight(a.get_defaultTextFormat())-1-c.y);aa.context.stroke();aa.context.closePath()}}else if(l.startIndex<=a.__caretIndex&&l.endIndex>=a.__caretIndex||l.startIndex<=a.__selectionIndex&&l.endIndex>=a.__selectionIndex||l.startIndex>a.__caretIndex&&l.endIndex<a.__selectionIndex||
l.startIndex>a.__selectionIndex&&l.endIndex<a.__caretIndex)p=Math.min(a.__selectionIndex,a.__caretIndex)|0,n=Math.max(a.__selectionIndex,a.__caretIndex)|0,l.startIndex>p&&(p=l.startIndex),l.endIndex<n&&(n=l.endIndex),q=a.getCharBoundaries(p),n>=l.endIndex?(h=a.getCharBoundaries(l.endIndex-1),h.x+=h.width+2):h=a.getCharBoundaries(n),null!=q&&null!=h&&(aa.context.fillStyle="#000000",aa.context.fillRect(q.x+k,q.y+e,h.x-q.x,l.height),aa.context.fillStyle="#FFFFFF",aa.context.fillText(g.substring(p,n),
k+q.x,l.offsetY+l.ascent+e));l.format.underline&&(aa.context.beginPath(),aa.context.strokeStyle=m,aa.context.lineWidth=1,m=l.offsetX+k-c.x,p=Math.floor(l.offsetY+e+l.ascent-c.y)+.5,aa.context.moveTo(m,p),aa.context.lineTo(m+l.width,p),aa.context.stroke(),aa.context.closePath())}}else{if(b.border||b.background)b.border?aa.context.rect(.5,.5,c.width-1,c.height-1):aa.context.rect(0,0,c.width,c.height),b.background&&(c=ba.hex(b.backgroundColor&16777215,6),aa.context.fillStyle="#"+c,aa.context.fill()),
b.border&&(aa.context.lineWidth=1,aa.context.lineCap="square",c=ba.hex(b.borderColor&16777215,6),aa.context.strokeStyle="#"+c,aa.context.stroke());if(-1<a.__caretIndex&&b.selectable&&a.__showCursor){c=-a.get_scrollH();k=g=0;for(e=a.get_scrollV()-1;k<e;)f=k++,g+=b.lineHeights.get(f);aa.context.beginPath();b=ba.hex(a.get_defaultTextFormat().color&16777215,6);aa.context.strokeStyle="#"+b;aa.context.moveTo(c+2.5,g+2.5);aa.context.lineWidth=1;aa.context.lineTo(c+2.5,g+Zb.getFormatHeight(a.get_defaultTextFormat())-
1);aa.context.stroke();aa.context.closePath()}}d.__bitmap=na.fromCanvas(a.__graphics.__canvas);d.__visible=!0;a.__dirty=!1;d.__softwareDirty=!1;d.set___dirty(!1)}}d=!1;0==a.__textEngine.antiAliasType&&1==a.__textEngine.gridFitType&&(d=this.context.imageSmoothingEnabled)&&(this.context.imageSmoothingEnabled=!1);if(!(null==a.opaqueBackground&&null==a.__graphics||!a.__renderable||0>=this.__getAlpha(a.__worldAlpha))&&(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()&&
(this.__setBlendMode(a.__worldBlendMode),this.__pushMaskObject(a),b=this.context,this.setTransform(a.__renderTransform,b),c=a.opaqueBackground,b.fillStyle="rgb("+(c>>>16&255)+","+(c>>>8&255)+","+(c&255)+")",b.fillRect(0,0,a.get_width(),a.get_height()),this.__popMaskObject(a)),null!=a.__graphics&&a.__renderable&&(m=this.__getAlpha(a.__worldAlpha),!(0>=m)&&(l=a.__graphics,null!=l&&(D.render(l,this),g=l.__width,k=l.__height,b=l.__canvas,null!=b&&l.__visible&&1<=g&&1<=k&&(f=l.__worldTransform,c=this.context,
p=a.__scrollRect,e=a.__worldScale9Grid,null==p||0<p.width&&0<p.height)))))){this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);c.globalAlpha=m;if(null!=e&&0==f.b&&0==f.c){c.setTransform(1,0,0,1,f.tx,f.ty);h=l.__bounds;n=l.__renderTransform.a;var r=l.__renderTransform.d;q=f.a;t=f.d;f=Math.max(1,Math.round(e.x*n));l=Math.round(e.y*r);m=Math.max(1,Math.round((h.get_right()-e.get_right())*n));p=Math.round((h.get_bottom()-e.get_bottom())*r);n=Math.round(e.width*n);r=Math.round(e.height*r);
var u=Math.round(e.x*q),x=Math.round(e.y*t),v=Math.round((h.get_right()-e.get_right())*q);e=Math.round((h.get_bottom()-e.get_bottom())*t);h=Math.round(g*q)-u-v;q=Math.round(k*t)-x-e;this.applySmoothing(c,!1);0!=n&&0!=r?(c.drawImage(b,0,0,f,l,0,0,u,x),c.drawImage(b,f,0,n,l,u,0,h,x),c.drawImage(b,f+n,0,m,l,u+h,0,v,x),c.drawImage(b,0,l,f,r,0,x,u,q),c.drawImage(b,f,l,n,r,u,x,h,q),c.drawImage(b,f+n,l,m,r,u+h,x,v,q),c.drawImage(b,0,l+r,f,p,0,x+q,u,e),c.drawImage(b,f,l+r,n,p,u,x+q,h,e),c.drawImage(b,f+n,
l+r,m,p,u+h,x+q,v,e)):0==n&&0!=r?(k=u+h+v,c.drawImage(b,0,0,g,l,0,0,k,x),c.drawImage(b,0,l,g,r,0,x,k,q),c.drawImage(b,0,l+r,g,p,0,x+q,k,e)):0==r&&0!=n&&(g=x+q+e,c.drawImage(b,0,0,f,k,0,0,u,g),c.drawImage(b,f,0,n,k,u,0,h,g),c.drawImage(b,f+n,0,m,k,u+h,0,v,g))}else this.setTransform(f,c),null!=this.__domRenderer&&(e=1/this.pixelRatio,c.scale(e,e)),c.drawImage(b,0,0,g,k);this.__popMaskObject(a)}d&&(this.context.imageSmoothingEnabled=!0)}else a=a.__cacheBitmap,a.__renderable&&(b=this.__getAlpha(a.__worldAlpha),
0<b&&null!=a.__bitmapData&&a.__bitmapData.__isValid&&a.__bitmapData.readable&&(d=this.context,this.__setBlendMode(a.__worldBlendMode),this.__pushMaskObject(a,!1),Ba.convertToCanvas(a.__bitmapData.image),d.globalAlpha=b,b=a.__scrollRect,this.setTransform(a.__renderTransform,d),this.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=!1),null==b?d.drawImage(a.__bitmapData.image.get_src(),0,0,a.__bitmapData.image.width,a.__bitmapData.image.height):d.drawImage(a.__bitmapData.image.get_src(),b.x,b.y,
b.width,b.height),this.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=!0),this.__popMaskObject(a,!1)))},__renderTilemap:function(a){this.__updateCacheBitmap(a,!1);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){if(!(null==a.opaqueBackground&&null==a.__graphics||!a.__renderable||0>=this.__getAlpha(a.__worldAlpha))){if(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);var b=this.context;
this.setTransform(a.__renderTransform,b);var c=a.opaqueBackground;b.fillStyle="rgb("+(c>>>16&255)+","+(c>>>8&255)+","+(c&255)+")";b.fillRect(0,0,a.get_width(),a.get_height());this.__popMaskObject(a)}if(null!=a.__graphics&&a.__renderable){var d=this.__getAlpha(a.__worldAlpha);if(!(0>=d)){var e=a.__graphics;if(null!=e){D.render(e,this);var f=e.__width,g=e.__height;b=e.__canvas;if(null!=b&&e.__visible&&1<=f&&1<=g){var k=e.__worldTransform;c=this.context;var l=a.__scrollRect,m=a.__worldScale9Grid;if(null==
l||0<l.width&&0<l.height){this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);c.globalAlpha=d;if(null!=m&&0==k.b&&0==k.c){c.setTransform(1,0,0,1,k.tx,k.ty);var p=e.__bounds,n=e.__renderTransform.a,h=e.__renderTransform.d,q=k.a,t=k.d;k=Math.max(1,Math.round(m.x*n));e=Math.round(m.y*h);d=Math.max(1,Math.round((p.get_right()-m.get_right())*n));l=Math.round((p.get_bottom()-m.get_bottom())*h);n=Math.round(m.width*n);h=Math.round(m.height*h);var r=Math.round(m.x*q),u=Math.round(m.y*t),x=Math.round((p.get_right()-
m.get_right())*q);m=Math.round((p.get_bottom()-m.get_bottom())*t);p=Math.round(f*q)-r-x;q=Math.round(g*t)-u-m;this.applySmoothing(c,!1);0!=n&&0!=h?(c.drawImage(b,0,0,k,e,0,0,r,u),c.drawImage(b,k,0,n,e,r,0,p,u),c.drawImage(b,k+n,0,d,e,r+p,0,x,u),c.drawImage(b,0,e,k,h,0,u,r,q),c.drawImage(b,k,e,n,h,r,u,p,q),c.drawImage(b,k+n,e,d,h,r+p,u,x,q),c.drawImage(b,0,e+h,k,l,0,u+q,r,m),c.drawImage(b,k,e+h,n,l,r,u+q,p,m),c.drawImage(b,k+n,e+h,d,l,r+p,u+q,x,m)):0==n&&0!=h?(g=r+p+x,c.drawImage(b,0,0,f,e,0,0,g,u),
c.drawImage(b,0,e,f,h,0,u,g,q),c.drawImage(b,0,e+h,f,l,0,u+q,g,m)):0==h&&0!=n&&(f=u+q+m,c.drawImage(b,0,0,k,g,0,0,r,f),c.drawImage(b,k,0,n,g,r,0,p,f),c.drawImage(b,k+n,0,d,g,r+p,0,x,f))}else this.setTransform(k,c),null!=this.__domRenderer&&(m=1/this.pixelRatio,c.scale(m,m)),c.drawImage(b,0,0,f,g);this.__popMaskObject(a)}}}}}}a.__renderable&&0!=a.__group.__tiles.length&&(b=this.__getAlpha(a.__worldAlpha),0>=b||(c=this.context,this.__setBlendMode(a.__worldBlendMode),this.__pushMaskObject(a),f=ia.__pool.get(),
f.setTo(0,0,a.__width,a.__height),this.__pushMaskRect(f,a.__renderTransform),this.__allowSmoothing&&a.smoothing||(c.imageSmoothingEnabled=!1),pi.renderTileContainer(a.__group,this,a.__renderTransform,a.__tileset,this.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,b,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,f),this.__allowSmoothing&&a.smoothing||(c.imageSmoothingEnabled=!0),this.__popMaskRect(),this.__popMaskObject(a),ia.__pool.release(f)))}else a=a.__cacheBitmap,a.__renderable&&(c=this.__getAlpha(a.__worldAlpha),
0<c&&null!=a.__bitmapData&&a.__bitmapData.__isValid&&a.__bitmapData.readable&&(b=this.context,this.__setBlendMode(a.__worldBlendMode),this.__pushMaskObject(a,!1),Ba.convertToCanvas(a.__bitmapData.image),b.globalAlpha=c,c=a.__scrollRect,this.setTransform(a.__renderTransform,b),this.__allowSmoothing&&a.smoothing||(b.imageSmoothingEnabled=!1),null==c?b.drawImage(a.__bitmapData.image.get_src(),0,0,a.__bitmapData.image.width,a.__bitmapData.image.height):b.drawImage(a.__bitmapData.image.get_src(),c.x,c.y,
c.width,c.height),this.__allowSmoothing&&a.smoothing||(b.imageSmoothingEnabled=!0),this.__popMaskObject(a,!1)))},__renderVideo:function(a){kr.render(a,this)},__setBlendMode:function(a){null!=this.__overrideBlendMode&&(a=this.__overrideBlendMode);this.__blendMode!=a&&(this.__blendMode=a,this.__setBlendModeContext(this.context,a))},__setBlendModeContext:function(a,b){switch(b){case 0:a.globalCompositeOperation="lighter";break;case 2:a.globalCompositeOperation="darken";break;case 3:a.globalCompositeOperation=
"difference";break;case 5:a.globalCompositeOperation="hard-light";break;case 8:a.globalCompositeOperation="lighten";break;case 9:a.globalCompositeOperation="multiply";break;case 11:a.globalCompositeOperation="overlay";break;case 12:a.globalCompositeOperation="screen";break;default:a.globalCompositeOperation="source-over"}},__updateCacheBitmap:function(a,b){if(a.__isCacheBitmapRender)return!1;var c=!1;if(a.get_cacheAsBitmap()||!a.__worldColorTransform.__isDefault(!0)||null!=this.__worldColorTransform&&
!this.__worldColorTransform.__isDefault(!0)){null==a.__cacheBitmapMatrix&&(a.__cacheBitmapMatrix=new Ha);var d=null!=a.__filters,e=null!=a.__cacheAsBitmapMatrix?a.__cacheAsBitmapMatrix:a.__renderTransform;c=null;var f=Sb.__pool.get();f.__copyFrom(a.__worldColorTransform);null!=this.__worldColorTransform&&f.__combine(this.__worldColorTransform);var g=null==a.__cacheBitmap||a.__renderDirty&&(b||null!=a.__children&&0<a.__children.length)||a.opaqueBackground!=a.__cacheBitmapBackground||null!=a.__graphics&&
a.__graphics.__softwareDirty||null!=a.__cacheBitmapColorTransform&&!a.__cacheBitmapColorTransform.__equals(f,!0);g||e.a==a.__cacheBitmapMatrix.a&&e.b==a.__cacheBitmapMatrix.b&&e.c==a.__cacheBitmapMatrix.c&&e.d==a.__cacheBitmapMatrix.d||(g=!0);if(d&&!g){b=0;for(var k=a.__filters;b<k.length;){var l=k[b];++b;if(l.__renderDirty){g=!0;break}}}!g&&null!=a.__cacheBitmapData&&null!=a.__cacheBitmapData.image&&a.__cacheBitmapData.image.version<a.__cacheBitmapData.__textureVersion&&(g=!0);b=g||!a.__cacheBitmap.__worldTransform.equals(a.__worldTransform);
a.__cacheBitmapMatrix.copyFrom(e);a.__cacheBitmapMatrix.tx=0;var m=l=k=a.__cacheBitmapMatrix.ty=0,p=0,n=0,h=0;b&&(c=ia.__pool.get(),a.__getFilterBounds(c,a.__cacheBitmapMatrix),m=Math.ceil(c.width),p=Math.ceil(c.height),n=0<c.x?Math.ceil(c.x):Math.floor(c.x),h=0<c.y?Math.ceil(c.y):Math.floor(c.y),null!=a.__cacheBitmapData?m>a.__cacheBitmapData.width||p>a.__cacheBitmapData.height?(k=Math.ceil(Math.max(1.25*m,a.__cacheBitmapData.width)),l=Math.ceil(Math.max(1.25*p,a.__cacheBitmapData.height)),g=!0):
(k=a.__cacheBitmapData.width,l=a.__cacheBitmapData.height):(k=m,l=p));if(g)if(a.__cacheBitmapBackground=a.opaqueBackground,.5<=m&&.5<=p){var q=null!=a.opaqueBackground&&(k!=m||l!=p),t=null!=a.opaqueBackground?-16777216|a.opaqueBackground:0,r=q?0:t;null==a.__cacheBitmapData||k>a.__cacheBitmapData.width||l>a.__cacheBitmapData.height?(a.__cacheBitmapData=new na(k,l,!0,r),null==a.__cacheBitmap&&(a.__cacheBitmap=new Zc),a.__cacheBitmap.__bitmapData=a.__cacheBitmapData,a.__cacheBitmapRendererSW=null):a.__cacheBitmapData.fillRect(a.__cacheBitmapData.rect,
r);q&&(c.setTo(0,0,m,p),a.__cacheBitmapData.fillRect(c,t))}else return Sb.__pool.release(f),null!=this.__domRenderer&&null!=a.__cacheBitmap&&this.__domRenderer.__clearBitmap(a.__cacheBitmap),a.__cacheBitmap=null,a.__cacheBitmapData=null,a.__cacheBitmapData2=null,a.__cacheBitmapData3=null,a.__cacheBitmapRendererSW=null,!0;else a.__cacheBitmapData=a.__cacheBitmap.get_bitmapData(),a.__cacheBitmapData2=null,a.__cacheBitmapData3=null;b&&(a.__cacheBitmap.__worldTransform.copyFrom(a.__worldTransform),e==
a.__renderTransform?(a.__cacheBitmap.__renderTransform.identity(),a.__cacheBitmap.__renderTransform.tx=a.__renderTransform.tx+n,a.__cacheBitmap.__renderTransform.ty=a.__renderTransform.ty+h):(a.__cacheBitmap.__renderTransform.copyFrom(a.__cacheBitmapMatrix),a.__cacheBitmap.__renderTransform.invert(),a.__cacheBitmap.__renderTransform.concat(a.__renderTransform),a.__cacheBitmap.__renderTransform.tx+=n,a.__cacheBitmap.__renderTransform.ty+=h));a.__cacheBitmap.smoothing=this.__allowSmoothing;a.__cacheBitmap.__renderable=
a.__renderable;a.__cacheBitmap.__worldAlpha=a.__worldAlpha;a.__cacheBitmap.__worldBlendMode=a.__worldBlendMode;a.__cacheBitmap.__worldShader=a.__worldShader;a.__cacheBitmap.set_mask(a.__mask);if(g){if(null==a.__cacheBitmapRendererSW||"canvas"!=a.__cacheBitmapRendererSW.__type)null==a.__cacheBitmapData.image&&(a.__cacheBitmapData=new na(k,l,!0,null!=a.opaqueBackground?-16777216|a.opaqueBackground:0),a.__cacheBitmap.__bitmapData=a.__cacheBitmapData),Ba.convertToCanvas(a.__cacheBitmapData.image),a.__cacheBitmapRendererSW=
new ih(a.__cacheBitmapData.image.buffer.__srcContext),a.__cacheBitmapRendererSW.__worldTransform=new Ha,a.__cacheBitmapRendererSW.__worldColorTransform=new Sb;null==a.__cacheBitmapColorTransform&&(a.__cacheBitmapColorTransform=new Sb);a.__cacheBitmapRendererSW.__stage=a.stage;a.__cacheBitmapRendererSW.__allowSmoothing=this.__allowSmoothing;L.__cast(a.__cacheBitmapRendererSW,ih).__setBlendMode(10);a.__cacheBitmapRendererSW.__worldAlpha=1/a.__worldAlpha;a.__cacheBitmapRendererSW.__worldTransform.copyFrom(a.__renderTransform);
a.__cacheBitmapRendererSW.__worldTransform.invert();a.__cacheBitmapRendererSW.__worldTransform.concat(a.__cacheBitmapMatrix);a.__cacheBitmapRendererSW.__worldTransform.tx-=n;a.__cacheBitmapRendererSW.__worldTransform.ty-=h;a.__cacheBitmapRendererSW.__worldColorTransform.__copyFrom(f);a.__cacheBitmapRendererSW.__worldColorTransform.__invert();a.__isCacheBitmapRender=!0;a.__cacheBitmapRendererSW.__drawBitmapData(a.__cacheBitmapData,a,null);if(d){p=d=!1;e=0;for(g=a.__filters;e<g.length;)m=g[e],++e,m.__needSecondBitmapData&&
(d=!0),m.__preserveObject&&(p=!0);e=a.__cacheBitmapData;m=null;d?(null==a.__cacheBitmapData2||null==a.__cacheBitmapData2.image||k>a.__cacheBitmapData2.width||l>a.__cacheBitmapData2.height?a.__cacheBitmapData2=new na(k,l,!0,0):a.__cacheBitmapData2.fillRect(a.__cacheBitmapData2.rect,0),g=a.__cacheBitmapData2):g=e;p&&(null==a.__cacheBitmapData3||null==a.__cacheBitmapData3.image||k>a.__cacheBitmapData3.width||l>a.__cacheBitmapData3.height?a.__cacheBitmapData3=new na(k,l,!0,0):a.__cacheBitmapData3.fillRect(a.__cacheBitmapData3.rect,
0),m=a.__cacheBitmapData3);null==a.__tempPoint&&(a.__tempPoint=new pa);k=a.__tempPoint;l=0;for(p=a.__filters;l<p.length;)h=p[l],++l,h.__preserveObject&&m.copyPixels(e,e.rect,k),n=h.__applyFilter(g,e,e.rect,k),h.__preserveObject&&n.draw(m,null,null!=a.__objectTransform?a.__objectTransform.get_colorTransform():null),h.__renderDirty=!1,d&&n==g&&(n=e,e=g,g=n);a.__cacheBitmapData!=e&&(n=a.__cacheBitmapData,a.__cacheBitmapData=e,a.__cacheBitmapData2=n,a.__cacheBitmap.__bitmapData=a.__cacheBitmapData,a.__cacheBitmapRendererSW=
null);a.__cacheBitmap.__imageVersion=a.__cacheBitmapData.__textureVersion}a.__cacheBitmapColorTransform.__copyFrom(f);a.__cacheBitmapColorTransform.__isDefault(!0)||(a.__cacheBitmapColorTransform.alphaMultiplier=1,a.__cacheBitmapData.colorTransform(a.__cacheBitmapData.rect,a.__cacheBitmapColorTransform));a.__isCacheBitmapRender=!1}b&&ia.__pool.release(c);c=b;Sb.__pool.release(f)}else null!=a.__cacheBitmap&&(null!=this.__domRenderer&&null!=a.__cacheBitmap&&this.__domRenderer.__clearBitmap(a.__cacheBitmap),
a.__cacheBitmap=null,a.__cacheBitmapData=null,a.__cacheBitmapData2=null,a.__cacheBitmapData3=null,a.__cacheBitmapColorTransform=null,a.__cacheBitmapRendererSW=null,c=!0);return c},__class__:ih});var Ht=function(){};h["openfl._internal.renderer.canvas.CanvasShape"]=Ht;Ht.__name__="openfl._internal.renderer.canvas.CanvasShape";Ht.render=function(a,b){if(a.__renderable){var c=b.__getAlpha(a.__worldAlpha);if(!(0>=c)){var d=a.__graphics;if(null!=d){D.render(d,b);var e=d.__width,f=d.__height,g=d.__canvas;
if(null!=g&&d.__visible&&1<=e&&1<=f){var k=d.__worldTransform,l=b.context,m=a.__scrollRect,p=a.__worldScale9Grid;if(null==m||0<m.width&&0<m.height){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);l.globalAlpha=c;if(null!=p&&0==k.b&&0==k.c){l.setTransform(1,0,0,1,k.tx,k.ty);var n=d.__bounds,h=d.__renderTransform.a,q=d.__renderTransform.d,t=k.a,r=k.d;k=Math.max(1,Math.round(p.x*h));d=Math.round(p.y*q);c=Math.max(1,Math.round((n.get_right()-p.get_right())*h));m=Math.round((n.get_bottom()-
p.get_bottom())*q);h=Math.round(p.width*h);q=Math.round(p.height*q);var u=Math.round(p.x*t),x=Math.round(p.y*r),v=Math.round((n.get_right()-p.get_right())*t);p=Math.round((n.get_bottom()-p.get_bottom())*r);n=Math.round(e*t)-u-v;t=Math.round(f*r)-x-p;b.applySmoothing(l,!1);0!=h&&0!=q?(l.drawImage(g,0,0,k,d,0,0,u,x),l.drawImage(g,k,0,h,d,u,0,n,x),l.drawImage(g,k+h,0,c,d,u+n,0,v,x),l.drawImage(g,0,d,k,q,0,x,u,t),l.drawImage(g,k,d,h,q,u,x,n,t),l.drawImage(g,k+h,d,c,q,u+n,x,v,t),l.drawImage(g,0,d+q,k,
m,0,x+t,u,p),l.drawImage(g,k,d+q,h,m,u,x+t,n,p),l.drawImage(g,k+h,d+q,c,m,u+n,x+t,v,p)):0==h&&0!=q?(f=u+n+v,l.drawImage(g,0,0,e,d,0,0,f,x),l.drawImage(g,0,d,e,q,0,x,f,t),l.drawImage(g,0,d+q,e,m,0,x+t,f,p)):0==q&&0!=h&&(e=x+t+p,l.drawImage(g,0,0,k,f,0,0,u,e),l.drawImage(g,k,0,h,f,u,0,n,e),l.drawImage(g,k+h,0,c,f,u+n,0,v,e))}else b.setTransform(k,l),null!=b.__domRenderer&&(p=1/b.pixelRatio,l.scale(p,p)),l.drawImage(g,0,0,e,f);b.__popMaskObject(a)}}}}}};var aa=function(){};h["openfl._internal.renderer.canvas.CanvasTextField"]=
aa;aa.__name__="openfl._internal.renderer.canvas.CanvasTextField";aa.render=function(a,b,c){var d=a.__textEngine,e=d.background||d.border?d.bounds:d.textBounds;c=a.__graphics;a.__dirty&&(a.__updateLayout(),null==c.__bounds&&(c.__bounds=new ia),c.__bounds.copyFrom(e));c.__update(b.__worldTransform);if(a.__dirty||c.__softwareDirty){var f=c.__width,g=c.__height;if(!(null!=d.text&&""!=d.text||d.background||d.border||d.__hasFocus||1==d.type&&d.selectable)||(0>=d.width||0>=d.height)&&2!=d.autoSize)a.__graphics.__canvas=
null,a.__graphics.__context=null,a.__graphics.__bitmap=null,a.__graphics.__softwareDirty=!1,a.__graphics.set___dirty(!1),a.__dirty=!1;else{null==a.__graphics.__canvas&&(a.__graphics.__canvas=window.document.createElement("canvas"),a.__graphics.__context=a.__graphics.__canvas.getContext("2d"));aa.context=c.__context;var k=c.__renderTransform;if(null!=b.__domRenderer){var l=b.pixelRatio;c.__canvas.width=f*l|0;c.__canvas.height=g*l|0;c.__canvas.style.width=f+"px";c.__canvas.style.height=g+"px";f=Ha.__pool.get();
f.copyFrom(k);f.scale(l,l);b.setTransform(f,aa.context);Ha.__pool.release(f)}else c.__canvas.width=f,c.__canvas.height=g,aa.context.setTransform(k.a,k.b,k.c,k.d,k.tx,k.ty);null==aa.clearRect&&(aa.clearRect="undefined"!==typeof navigator&&"undefined"!==typeof navigator.isCocoonJS);aa.clearRect&&aa.context.clearRect(0,0,c.__canvas.width,c.__canvas.height);if(null!=d.text&&""!=d.text||d.__hasFocus){k=d.text;c.__context.imageSmoothingEnabled=!b.__allowSmoothing||0==d.antiAliasType&&400==d.sharpness?!1:
!0;if(d.border||d.background)aa.context.rect(.5,.5,e.width-1,e.height-1),d.background&&(b=ba.hex(d.backgroundColor&16777215,6),aa.context.fillStyle="#"+b,aa.context.fill()),d.border&&(aa.context.lineWidth=1,b=ba.hex(d.borderColor&16777215,6),aa.context.strokeStyle="#"+b,aa.context.stroke());aa.context.textBaseline="alphabetic";aa.context.textAlign="start";b=-a.get_scrollH();f=l=0;for(g=a.get_scrollV()-1;f<g;){var m=f++;l-=d.lineHeights.get(m)}var p;for(f=d.layoutGroups.iterator();f.hasNext();)if(g=
f.next(),!(g.lineIndex<a.get_scrollV()-1)){if(g.lineIndex>d.get_bottomScrollV()-1)break;m="#"+ba.hex(g.format.color&16777215,6);aa.context.font=Zb.getFont(g.format);aa.context.fillStyle=m;aa.context.fillText(k.substring(g.startIndex,g.endIndex),g.offsetX+b-e.x,g.offsetY+g.ascent+l-e.y);if(-1<a.__caretIndex&&d.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&g.startIndex<=a.__caretIndex&&g.endIndex>=a.__caretIndex){for(var n=p=0,h=a.__caretIndex-g.startIndex;n<h;){var q=n++;if(g.positions.length<=
q)break;p+=g.positions[q]}n=0;h=a.get_scrollV();for(q=g.lineIndex+1;h<q;){var t=h++;n+=d.lineHeights.get(t-1)}aa.context.beginPath();h=ba.hex(g.format.color&16777215,6);aa.context.strokeStyle="#"+h;aa.context.moveTo(g.offsetX+p-a.get_scrollH()-e.x,n+2-e.y);aa.context.lineWidth=1;aa.context.lineTo(g.offsetX+p-a.get_scrollH()-e.x,n+Zb.getFormatHeight(a.get_defaultTextFormat())-1-e.y);aa.context.stroke();aa.context.closePath()}}else if(g.startIndex<=a.__caretIndex&&g.endIndex>=a.__caretIndex||g.startIndex<=
a.__selectionIndex&&g.endIndex>=a.__selectionIndex||g.startIndex>a.__caretIndex&&g.endIndex<a.__selectionIndex||g.startIndex>a.__selectionIndex&&g.endIndex<a.__caretIndex)p=Math.min(a.__selectionIndex,a.__caretIndex)|0,n=Math.max(a.__selectionIndex,a.__caretIndex)|0,g.startIndex>p&&(p=g.startIndex),g.endIndex<n&&(n=g.endIndex),q=a.getCharBoundaries(p),n>=g.endIndex?(h=a.getCharBoundaries(g.endIndex-1),h.x+=h.width+2):h=a.getCharBoundaries(n),null!=q&&null!=h&&(aa.context.fillStyle="#000000",aa.context.fillRect(q.x+
b,q.y+l,h.x-q.x,g.height),aa.context.fillStyle="#FFFFFF",aa.context.fillText(k.substring(p,n),b+q.x,g.offsetY+g.ascent+l));g.format.underline&&(aa.context.beginPath(),aa.context.strokeStyle=m,aa.context.lineWidth=1,m=g.offsetX+b-e.x,p=Math.floor(g.offsetY+l+g.ascent-e.y)+.5,aa.context.moveTo(m,p),aa.context.lineTo(m+g.width,p),aa.context.stroke(),aa.context.closePath())}}else{if(d.border||d.background)d.border?aa.context.rect(.5,.5,e.width-1,e.height-1):aa.context.rect(0,0,e.width,e.height),d.background&&
(e=ba.hex(d.backgroundColor&16777215,6),aa.context.fillStyle="#"+e,aa.context.fill()),d.border&&(aa.context.lineWidth=1,aa.context.lineCap="square",e=ba.hex(d.borderColor&16777215,6),aa.context.strokeStyle="#"+e,aa.context.stroke());if(-1<a.__caretIndex&&d.selectable&&a.__showCursor){e=-a.get_scrollH();b=k=0;for(l=a.get_scrollV()-1;b<l;)f=b++,k+=d.lineHeights.get(f);aa.context.beginPath();d=ba.hex(a.get_defaultTextFormat().color&16777215,6);aa.context.strokeStyle="#"+d;aa.context.moveTo(e+2.5,k+2.5);
aa.context.lineWidth=1;aa.context.lineTo(e+2.5,k+Zb.getFormatHeight(a.get_defaultTextFormat())-1);aa.context.stroke();aa.context.closePath()}}c.__bitmap=na.fromCanvas(a.__graphics.__canvas);c.__visible=!0;a.__dirty=!1;c.__softwareDirty=!1;c.set___dirty(!1)}}};var pi=function(){};h["openfl._internal.renderer.canvas.CanvasTilemap"]=pi;pi.__name__="openfl._internal.renderer.canvas.CanvasTilemap";pi.render=function(a,b){if(a.__renderable&&0!=a.__group.__tiles.length){var c=b.__getAlpha(a.__worldAlpha);
if(!(0>=c)){var d=b.context;b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var e=ia.__pool.get();e.setTo(0,0,a.__width,a.__height);b.__pushMaskRect(e,a.__renderTransform);b.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=!1);pi.renderTileContainer(a.__group,b,a.__renderTransform,a.__tileset,b.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,c,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,e);b.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=!0);b.__popMaskRect();b.__popMaskObject(a);
ia.__pool.release(e)}}};pi.renderTileContainer=function(a,b,c,d,e,f,g,k,l,m,p,n){var h=b.context,q=b.__roundPixels,t=Ha.__pool.get(),r=a.__tiles,u,x=null,v=0;for(a=a.__length;v<a;){var z=v++;var w=r[z];t.setTo(1,0,0,1,-w.get_originX(),-w.get_originY());t.concat(w.get_matrix());t.concat(c);q&&(t.tx=Math.round(t.tx),t.ty=Math.round(t.ty));var C=null!=w.get_tileset()?w.get_tileset():d;z=w.get_alpha()*g;if((u=w.get_visible())&&!(0>=z))if(f||(z=1),k&&(x=null!=w.__blendMode?w.__blendMode:l),0<w.__length)pi.renderTileContainer(w,
b,t,C,e,f,z,k,x,m,p,n);else if(null!=C){u=w.get_id();if(-1==u){if(w=w.__rect,null==w||0>=w.width||0>=w.height)continue}else{w=C.__data[u];if(null==w)continue;n.setTo(w.x,w.y,w.width,w.height);w=n}C=C.__bitmapData;null!=C&&(C!=m&&(null==C.image.buffer.__srcImage&&Ba.convertToCanvas(C.image),p=C.image.get_src(),m=C),h.globalAlpha=z,k&&b.__setBlendMode(x),b.setTransform(t,h),h.drawImage(p,w.x,w.y,w.width,w.height,0,0,w.width,w.height))}}Ha.__pool.release(t)};var kr=function(){};h["openfl._internal.renderer.canvas.CanvasVideo"]=
kr;kr.__name__="openfl._internal.renderer.canvas.CanvasVideo";kr.render=function(a,b){if(a.__renderable&&null!=a.__stream){var c=b.__getAlpha(a.__worldAlpha);if(!(0>=c)){var d=b.context;if(null!=a.__stream.__video){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);d.globalAlpha=c;c=a.__scrollRect;var e=a.smoothing;b.setTransform(a.__worldTransform,d);e||(d.imageSmoothingEnabled=!1);null==c?d.drawImage(a.__stream.__video,0,0,a.get_width(),a.get_height()):d.drawImage(a.__stream.__video,c.x,
c.y,c.width,c.height,c.x,c.y,c.width,c.height);e||(d.imageSmoothingEnabled=!0);b.__popMaskObject(a)}}}};var ef=function(a){this.byteCode=a;this.precisionHint=1;this.__glSourceDirty=!0;this.__numPasses=1;this.__data=lr._new(a)};h["openfl.display.Shader"]=ef;ef.__name__="openfl.display.Shader";ef.prototype={byteCode:null,glProgram:null,precisionHint:null,program:null,__alpha:null,__alphaTexture:null,__alphaTextureMatrix:null,__bitmap:null,__colorMultiplier:null,__colorOffset:null,__context:null,__data:null,
__glFragmentSource:null,__glSourceDirty:null,__glVertexSource:null,__hasColorTransform:null,__inputBitmapData:null,__isGenerated:null,__matrix:null,__numPasses:null,__paramBool:null,__paramFloat:null,__paramInt:null,__position:null,__textureCoord:null,__texture:null,__textureSize:null,__clearUseArray:function(){for(var a=0,b=this.__paramBool;a<b.length;){var c=b[a];++a;c.__useArray=!1}a=0;for(b=this.__paramFloat;a<b.length;)c=b[a],++a,c.__useArray=!1;a=0;for(b=this.__paramInt;a<b.length;)c=b[a],++a,
c.__useArray=!1},__createGLShader:function(a,b){var c=this.__context.gl,d=c.createShader(b);c.shaderSource(d,a);c.compileShader(d);0==c.getShaderParameter(d,c.COMPILE_STATUS)&&(b=b==c.VERTEX_SHADER?"Error compiling vertex shader":"Error compiling fragment shader",b+="\n"+c.getShaderInfoLog(d),Ta.error(b+("\n"+a),{fileName:"openfl/display/Shader.hx",lineNumber:330,className:"openfl.display.Shader",methodName:"__createGLShader"}));return d},__createGLProgram:function(a,b){var c=this.__context.gl;a=
this.__createGLShader(a,c.VERTEX_SHADER);var d=this.__createGLShader(b,c.FRAGMENT_SHADER);b=c.createProgram();for(var e=0,f=this.__paramFloat;e<f.length;){var g=f[e];++e;if(-1<g.name.indexOf("Position")&&ba.startsWith(g.name,"openfl_")){c.bindAttribLocation(b,0,g.name);break}}c.attachShader(b,a);c.attachShader(b,d);c.linkProgram(b);0==c.getProgramParameter(b,c.LINK_STATUS)&&(c="Unable to initialize the shader program\n"+c.getProgramInfoLog(b),Ta.error(c,{fileName:"openfl/display/Shader.hx",lineNumber:363,
className:"openfl.display.Shader",methodName:"__createGLProgram"}));return b},__disable:function(){null!=this.program&&this.__disableGL()},__disableGL:function(){for(var a=this.__context.gl,b=0,c=0,d=this.__inputBitmapData;c<d.length;){var e=d[c];++c;e.__disableGL(this.__context,b);++b}b=0;for(c=this.__paramBool;b<c.length;)d=c[b],++b,d.__disableGL(this.__context);b=0;for(c=this.__paramFloat;b<c.length;)d=c[b],++b,d.__disableGL(this.__context);b=0;for(c=this.__paramInt;b<c.length;)d=c[b],++b,d.__disableGL(this.__context);
this.__context.__bindGLArrayBuffer(null);"opengl"==this.__context.__context.type&&a.disable(a.TEXTURE_2D)},__enable:function(){this.__init();null!=this.program&&this.__enableGL()},__enableGL:function(){for(var a=0,b=this.__context.gl,c=0,d=this.__inputBitmapData;c<d.length;){var e=d[c];++c;b.uniform1i(e.index,a);++a}"opengl"==this.__context.__context.type&&0<a&&b.enable(b.TEXTURE_2D)},__init:function(){null==this.__data&&(this.__data=lr._new(null));null==this.__glFragmentSource||null==this.__glVertexSource||
null!=this.program&&!this.__glSourceDirty||this.__initGL()},__initGL:function(){if(this.__glSourceDirty||null==this.__paramBool)this.__glSourceDirty=!1,this.program=null,this.__inputBitmapData=[],this.__paramBool=[],this.__paramFloat=[],this.__paramInt=[],this.__processGLData(this.get_glVertexSource(),"attribute"),this.__processGLData(this.get_glVertexSource(),"uniform"),this.__processGLData(this.get_glFragmentSource(),"uniform");if(null!=this.__context&&null==this.program){var a=this.__context.gl,
b="#ifdef GL_ES\n\t\t\t\t"+(1==this.precisionHint?"#ifdef GL_FRAGMENT_PRECISION_HIGH\n\t\t\t\tprecision highp float;\n\t\t\t\t#else\n\t\t\t\tprecision mediump float;\n\t\t\t\t#endif":"precision lowp float;")+"\n\t\t\t\t#endif\n\t\t\t\t",c=b+this.get_glVertexSource(),d=b+this.get_glFragmentSource();b=c+d;var e=this.__context.__programs;(null!=q[b]?e.existsReserved(b):e.h.hasOwnProperty(b))?(c=this.__context.__programs,this.program=null!=q[b]?c.getReserved(b):c.h[b]):(this.program=this.__context.createProgram(1),
this.program.__glProgram=this.__createGLProgram(c,d),c=this.program,d=this.__context.__programs,null!=q[b]?d.setReserved(b,c):d.h[b]=c);if(null!=this.program){this.glProgram=this.program.__glProgram;b=0;for(c=this.__inputBitmapData;b<c.length;)d=c[b],++b,d.index=d.__isUniform?a.getUniformLocation(this.glProgram,d.name):a.getAttribLocation(this.glProgram,d.name);b=0;for(c=this.__paramBool;b<c.length;)d=c[b],++b,d.index=d.__isUniform?a.getUniformLocation(this.glProgram,d.name):a.getAttribLocation(this.glProgram,
d.name);b=0;for(c=this.__paramFloat;b<c.length;)d=c[b],++b,d.index=d.__isUniform?a.getUniformLocation(this.glProgram,d.name):a.getAttribLocation(this.glProgram,d.name);b=0;for(c=this.__paramInt;b<c.length;)d=c[b],++b,d.index=d.__isUniform?a.getUniformLocation(this.glProgram,d.name):a.getAttribLocation(this.glProgram,d.name)}}},__processGLData:function(a,b){var c=0,d;for(d="uniform"==b?new Ca("uniform ([A-Za-z0-9]+) ([A-Za-z0-9_]+)",""):new Ca("attribute ([A-Za-z0-9]+) ([A-Za-z0-9_]+)","");d.matchSub(a,
c);){var e=d.matched(1);var f=d.matched(2);if(!ba.startsWith(f,"gl_")){c="uniform"==b;if(ba.startsWith(e,"sampler")){e=new Oo;e.name=f;e.__isUniform=c;this.__inputBitmapData.push(e);switch(f){case "bitmap":this.__bitmap=e;break;case "openfl_AlphaTexture":this.__alphaTexture=e;break;case "openfl_Texture":this.__texture=e}this.__data[f]=e;this.__isGenerated&&(this[f]=e)}else if(!Object.prototype.hasOwnProperty.call(this.__data,f)||null==X.field(this.__data,f)){switch(e){case "bool":var g=0;break;case "bvec2":g=
1;break;case "bvec3":g=2;break;case "bvec4":g=3;break;case "dvec2":case "vec2":g=5;break;case "dvec3":case "vec3":g=6;break;case "double":case "float":g=4;break;case "ivec3":case "uvec3":g=10;break;case "ivec4":case "uvec4":g=11;break;case "mat2":case "mat2x2":g=12;break;case "mat2x3":g=13;break;case "mat2x4":g=14;break;case "mat3x2":g=15;break;case "mat3":case "mat3x3":g=16;break;case "mat3x4":g=17;break;case "mat4":case "mat4x4":g=20;break;case "mat4x2":g=18;break;case "mat4x3":g=19;break;case "int":case "uint":g=
8;break;case "ivec2":case "uvec2":g=9;break;case "dvec4":case "vec4":g=7;break;default:g=null}switch(g){case 1:case 5:case 9:e=2;break;case 3:case 7:case 11:case 12:e=4;break;case 2:case 6:case 10:e=3;break;case 16:e=9;break;case 20:e=16;break;default:e=1}switch(g){case 12:var k=2;break;case 16:k=3;break;case 20:k=4;break;default:k=1}switch(g){case 0:case 1:case 2:case 3:var l=new Yj;l.set_name(f);l.type=g;l.__arrayLength=k;l.__isBool=!0;l.__isUniform=c;l.__length=e;this.__paramBool.push(l);"openfl_HasColorTransform"==
f&&(this.__hasColorTransform=l);this.__data[f]=l;this.__isGenerated&&(this[f]=l);break;case 8:case 9:case 10:case 11:l=new Yj;l.set_name(f);l.type=g;l.__arrayLength=k;l.__isInt=!0;l.__isUniform=c;l.__length=e;this.__paramInt.push(l);this.__data[f]=l;this.__isGenerated&&(this[f]=l);break;default:l=new Yj;l.set_name(f);l.type=g;l.__arrayLength=k;0<k&&(g=k*k,g=null!=g?new Float32Array(g):null,l.__uniformMatrix=g);l.__isFloat=!0;l.__isUniform=c;l.__length=e;this.__paramFloat.push(l);if(ba.startsWith(f,
"openfl_"))switch(f){case "openfl_Alpha":this.__alpha=l;break;case "openfl_AlphaTextureMatrix":this.__alphaTextureMatrix=l;break;case "openfl_ColorMultiplier":this.__colorMultiplier=l;break;case "openfl_ColorOffset":this.__colorOffset=l;break;case "openfl_Matrix":this.__matrix=l;break;case "openfl_Position":this.__position=l;break;case "openfl_TextureCoord":this.__textureCoord=l;break;case "openfl_TextureSize":this.__textureSize=l}this.__data[f]=l;this.__isGenerated&&(this[f]=l)}}f=d.matchedPos();
c=f.pos+f.len}}},__update:function(){null!=this.program&&this.__updateGL()},__updateFromBuffer:function(a,b){null!=this.program&&this.__updateGLFromBuffer(a,b)},__updateGL:function(){for(var a=0,b=0,c=this.__inputBitmapData;b<c.length;){var d=c[b];++b;d.__updateGL(this.__context,a);++a}a=0;for(b=this.__paramBool;a<b.length;)c=b[a],++a,c.__updateGL(this.__context);a=0;for(b=this.__paramFloat;a<b.length;)c=b[a],++a,c.__updateGL(this.__context);a=0;for(b=this.__paramInt;a<b.length;)c=b[a],++a,c.__updateGL(this.__context)},
__updateGLFromBuffer:function(a,b){for(var c=0,d,e,f,g,k,l=0,m=a.inputCount;l<m;)k=l++,d=a.inputRefs[k],e=a.inputs[k],f=a.inputFilter[k],g=a.inputMipFilter[k],k=a.inputWrap[k],null!=e&&(d.__updateGL(this.__context,c,e,f,g,k),++c);c=this.__context.gl;0<a.paramDataLength?(null==a.paramDataBuffer&&(a.paramDataBuffer=c.createBuffer()),this.__context.__bindGLArrayBuffer(a.paramDataBuffer),Ab.bufferData(c,c.ARRAY_BUFFER,a.paramData,c.DYNAMIC_DRAW)):this.__context.__bindGLArrayBuffer(null);e=d=c=0;f=a.paramBoolCount;
g=a.paramFloatCount;l=a.paramData;for(var p,n=k=null,h=null,q=0,t=a.paramCount;q<t;){var r=q++;m=!1;if(r<f){p=a.paramRefs_Bool[c];for(var u=0,x=a.overrideBoolCount;u<x;){var v=u++;if(p.name==a.overrideBoolNames[v]){k=a.overrideBoolValues[v];m=!0;break}}m?p.__updateGL(this.__context,k):p.__updateGLFromBuffer(this.__context,l,a.paramPositions[r],a.paramLengths[r],b);++c}else if(r<f+g){p=a.paramRefs_Float[d];u=0;for(x=a.overrideFloatCount;u<x;)if(v=u++,p.name==a.overrideFloatNames[v]){n=a.overrideFloatValues[v];
m=!0;break}m?p.__updateGL(this.__context,n):p.__updateGLFromBuffer(this.__context,l,a.paramPositions[r],a.paramLengths[r],b);++d}else{p=a.paramRefs_Int[e];u=0;for(x=a.overrideIntCount;u<x;)if(v=u++,p.name==a.overrideIntNames[v]){h=a.overrideIntValues[v];m=!0;break}m?p.__updateGL(this.__context,h):p.__updateGLFromBuffer(this.__context,l,a.paramPositions[r],a.paramLengths[r],b);++e}}},get_data:function(){(this.__glSourceDirty||null==this.__data)&&this.__init();return this.__data},set_data:function(a){return this.__data=
a},get_glFragmentSource:function(){return this.__glFragmentSource},set_glFragmentSource:function(a){a!=this.__glFragmentSource&&(this.__glSourceDirty=!0);return this.__glFragmentSource=a},get_glVertexSource:function(){return this.__glVertexSource},set_glVertexSource:function(a){a!=this.__glVertexSource&&(this.__glSourceDirty=!0);return this.__glVertexSource=a},__class__:ef,__properties__:{set_glVertexSource:"set_glVertexSource",get_glVertexSource:"get_glVertexSource",set_glFragmentSource:"set_glFragmentSource",
get_glFragmentSource:"get_glFragmentSource",set_data:"set_data",get_data:"get_data"}};var Po=function(){null==this.__glFragmentSource&&(this.__glFragmentSource="varying vec2 openfl_AlphaTextureCoordv;\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform sampler2D openfl_AlphaTexture;\n\t\tuniform sampler2D openfl_Texture;\n\n\t\tvoid main(void)\n\t\t{\n\t\t\tvec4 mask = texture2D (openfl_AlphaTexture, openfl_AlphaTextureCoordv);\n\n\t\t\tif (mask.a == 0.0)\n\t\t\t{\n\t\t\t\tgl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvec4 color = texture2D (openfl_Texture, openfl_TextureCoordv);\n\t\t\t\tgl_FragColor = color * mask.a;\n\t\t\t}\n\t\t}");
null==this.__glVertexSource&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tvarying vec2 openfl_AlphaTextureCoordv;\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform mat4 openfl_AlphaTextureMatrix;\n\t\tuniform mat4 openfl_Matrix;\n\n\t\tvoid main(void)\n\t\t{\n\t\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\t\t\topenfl_AlphaTextureCoordv = vec2(vec4(openfl_TextureCoord, 0.0, 0.0) * openfl_AlphaTextureMatrix);\n\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t}");
ef.call(this);this.__isGenerated=!0;this.__initGL()};h["openfl._internal.renderer.context3D.Context3DAlphaMaskShader"]=Po;Po.__name__="openfl._internal.renderer.context3D.Context3DAlphaMaskShader";Po.__super__=ef;Po.prototype=w(ef.prototype,{openfl_Position:null,openfl_TextureCoord:null,openfl_AlphaTextureMatrix:null,openfl_Matrix:null,openfl_AlphaTexture:null,openfl_Texture:null,__class__:Po});var jh=function(){};h["openfl._internal.renderer.context3D.Context3DBitmap"]=jh;jh.__name__="openfl._internal.renderer.context3D.Context3DBitmap";
jh.render=function(a,b){if(a.__renderable&&!(0>=a.__worldAlpha)&&null!=a.__bitmapData&&a.__bitmapData.__isValid){var c=b.context3D,d=null!=a.get_mask()&&a.get_mask().get_cacheAsBitmap();d&&a.get_mask().__type!=Ph.BITMAP&&(d=!1);b.__setBlendMode(a.__worldBlendMode);d||b.__pushMaskObject(a);var e=b.__initDisplayShader(d?b.__alphaMaskShader:a.__worldShader);b.setShader(e);b.applyBitmapData(a.__bitmapData,b.__allowSmoothing&&(a.smoothing||b.__upscaled));b.applyMatrix(b.__getMatrix(a.__renderTransform,
a.pixelSnapping));b.applyAlpha(a.__worldAlpha);b.applyColorTransform(a.__worldColorTransform);if(d){var f=a.get_mask();b.__currentShader.__alphaTexture.input=f.__bitmapData;null==b.__currentShader.__alphaTextureMatrix.value&&(b.__currentShader.__alphaTextureMatrix.value=[]);var g=b.__currentShader.__alphaTextureMatrix.value,k=Ha.__pool.get();k.copyFrom(a.__renderTransform);k.invert();k.concat(f.__renderTransform);g[0]=a.__bitmapData.width/f.__bitmapData.width*k.a;g[1]=k.b;g[4]=k.c;g[5]=a.__bitmapData.height/
f.__bitmapData.height*k.d;g[12]=k.tx;g[13]=k.ty;g[15]=0;Ha.__pool.release(k)}b.updateShader();f=a.__bitmapData.getVertexBuffer(c);null!=e.__position&&c.setVertexBufferAt(e.__position.index,f,0,3);null!=e.__textureCoord&&c.setVertexBufferAt(e.__textureCoord.index,f,3,2);e=a.__bitmapData.getIndexBuffer(c);c.drawTriangles(e);b.__clearShader();d||b.__popMaskObject(a)}};jh.renderMask=function(a,b){if(null!=a.__bitmapData&&a.__bitmapData.__isValid){var c=b.context3D,d=b.__maskShader;b.setShader(d);b.applyBitmapData(Yi.opaqueBitmapData,
!0);b.applyMatrix(b.__getMatrix(a.__renderTransform,a.pixelSnapping));b.updateShader();var e=a.__bitmapData.getVertexBuffer(c);null!=d.__position&&c.setVertexBufferAt(d.__position.index,e,0,3);null!=d.__textureCoord&&c.setVertexBufferAt(d.__textureCoord.index,e,3,2);a=a.__bitmapData.getIndexBuffer(c);c.drawTriangles(a);b.__clearShader()}};var qi=function(a,b,c,d){this.context3D=a;this.elementType=b;this.dataPerVertex=d;this.vertexCount=this.indexCount=0;this.resize(c)};h["openfl._internal.renderer.context3D.Context3DBuffer"]=
qi;qi.__name__="openfl._internal.renderer.context3D.Context3DBuffer";qi.prototype={dataPerVertex:null,elementCount:null,elementType:null,indexBufferData:null,indexBuffers:null,indexCount:null,vertexBuffer:null,vertexBufferData:null,vertexCount:null,context3D:null,drawElements:function(a,b){null==b&&(b=-1);if(0!=this.indexCount&&0!=this.vertexCount&&0==this.elementType._hx_index)if(-1==b&&(b=2*this.elementCount),10922>a&&10922>b-a)this.context3D.drawTriangles(this.indexBuffers[0],a,2*b);else for(var c=
a+b;a<c;){var d=Math.floor(a/10922);b=Math.min(c-a,10922)|0;if(0>=b)break;this.context3D.drawTriangles(this.indexBuffers[d],3*(a-10922*d),2*b);a+=b}},flushVertexBufferData:function(){this.vertexBufferData.length>this.vertexCount&&(this.vertexCount=this.vertexBufferData.length,this.vertexBuffer=this.context3D.createVertexBuffer(this.vertexCount,this.dataPerVertex,0));this.vertexBuffer.uploadFromTypedArray(this.vertexBufferData)},resize:function(a,b){null==b&&(b=-1);this.elementCount=a;-1==b&&(b=this.dataPerVertex);
b!=this.dataPerVertex&&(this.vertexBuffer=null,this.vertexCount=0,this.dataPerVertex=b);var c=0;switch(this.elementType._hx_index){case 0:c=4*a;break;case 1:c=3*a;break;case 2:c=3*a}a=c*b;null==this.vertexBufferData?this.vertexBufferData=null!=a?new Float32Array(a):null:a>this.vertexBufferData.length&&(b=this.vertexBufferData,this.vertexBufferData=null!=a?new Float32Array(a):null,this.vertexBufferData.set(b))},__class__:qi};var mu=C["openfl._internal.renderer.context3D.Context3DElementType"]={__ename__:"openfl._internal.renderer.context3D.Context3DElementType",
__constructs__:["QUADS","TRIANGLES","TRIANGLE_INDICES"],QUADS:{_hx_index:0,__enum__:"openfl._internal.renderer.context3D.Context3DElementType",toString:u},TRIANGLES:{_hx_index:1,__enum__:"openfl._internal.renderer.context3D.Context3DElementType",toString:u},TRIANGLE_INDICES:{_hx_index:2,__enum__:"openfl._internal.renderer.context3D.Context3DElementType",toString:u}},mr=function(){};h["openfl._internal.renderer.context3D.Context3DDisplayObject"]=mr;mr.__name__="openfl._internal.renderer.context3D.Context3DDisplayObject";
mr.render=function(a,b){if(!(null==a.opaqueBackground&&null==a.__graphics||!a.__renderable||0>=a.__worldAlpha)){if(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var c=b.context3D,d=ia.__pool.get();d.setTo(0,0,a.get_width(),a.get_height());b.__pushMaskRect(d,a.__renderTransform);var e=a.opaqueBackground;c.clear((e>>>16&255)/255,(e>>>8&255)/255,(e&255)/255,1,0,0,1);b.__popMaskRect();b.__popMaskObject(a);
ia.__pool.release(d)}null!=a.__graphics&&Kf.render(a,b)}};mr.renderMask=function(a,b){if(null!=a.opaqueBackground||null!=a.__graphics)null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&a.get_height(),null!=a.__graphics&&Kf.renderMask(a,b)};var na=function(a,b,c,d){null==d&&(d=-1);null==c&&(c=!0);this.transparent=c;a=null==a?0:a;b=null==b?0:b;a=0>a?0:a;b=0>b?0:b;this.width=a;this.height=b;this.rect=new ia(0,0,a,b);this.__textureWidth=a;this.__textureHeight=b;0<a&&0<b&&(c?0==(d&-16777216)&&
(d=0):d=-16777216|d&16777215,this.image=new Ob(null,0,0,a,b,d<<8|d>>>24&255),this.image.set_transparent(c),this.readable=this.__isValid=!0);this.__renderTransform=new Ha;this.__worldAlpha=1;this.__worldTransform=new Ha;this.__worldColorTransform=new Sb;this.__renderable=!0};h["openfl.display.BitmapData"]=na;na.__name__="openfl.display.BitmapData";na.__interfaces__=[Vd];na.fromBase64=function(a,b){return null};na.fromBytes=function(a,b){return null};na.fromCanvas=function(a,b){null==b&&(b=!0);if(null==
a)return null;var c=new na(0,0,b,0);c.__fromImage(Ob.fromCanvas(a));c.image.set_transparent(b);return c};na.fromFile=function(a){return null};na.fromImage=function(a,b){null==b&&(b=!0);if(null==a||null==a.buffer)return null;var c=new na(0,0,b,0);c.__fromImage(a);c.image.set_transparent(b);return null!=c.image?c:null};na.fromTexture=function(a){if(null==a)return null;var b=new na(a.__width,a.__height,!0,0);b.readable=!1;b.__texture=a;b.__textureContext=a.__textureContext;b.image=null;return b};na.loadFromBase64=
function(a,b){return Ob.loadFromBase64(a,b).then(function(a){return xb.withValue(na.fromImage(a))})};na.loadFromBytes=function(a,b){return Ob.loadFromBytes(za.toBytes(a)).then(function(a){a=na.fromImage(a);null!=b&&a.__applyAlpha(b);return xb.withValue(a)})};na.loadFromFile=function(a){return Ob.loadFromFile(a).then(function(a){return xb.withValue(na.fromImage(a))})};na.prototype={height:null,image:null,readable:null,rect:null,transparent:null,width:null,__blendMode:null,__framebuffer:null,__framebufferContext:null,
__indexBuffer:null,__indexBufferContext:null,__indexBufferData:null,__indexBufferGrid:null,__isMask:null,__isValid:null,__mask:null,__renderable:null,__renderTransform:null,__scrollRect:null,__stencilBuffer:null,__surface:null,__symbol:null,__texture:null,__textureContext:null,__textureHeight:null,__textureVersion:null,__textureWidth:null,__transform:null,__type:null,__uvRect:null,__vertexBuffer:null,__vertexBufferContext:null,__vertexBufferData:null,__vertexBufferGrid:null,__vertexBufferHeight:null,
__vertexBufferScaleX:null,__vertexBufferScaleY:null,__vertexBufferWidth:null,__worldAlpha:null,__worldColorTransform:null,__worldTransform:null,applyFilter:function(a,b,c,d){if(this.readable&&null!=a&&a.readable){a=d.__needSecondBitmapData;var e=d.__preserveObject,f=null;var g=a?new na(this.width,this.height,!0,0):this;e&&(f=new na(this.width,this.height,!0,0));d.__preserveObject&&f.copyPixels(this,this.rect,c);b=d.__applyFilter(g,this,b,c);d.__preserveObject&&b.draw(f,null,null);a&&b==g&&(g.image.version=
this.image.version,this.image=g.image);this.image.dirty=!0;this.image.version++}},clone:function(){if(this.__isValid)if(this.readable||null!=this.image)var a=na.fromImage(this.image.clone(),this.transparent);else a=new na(0,0,this.transparent,0),a.width=this.width,a.height=this.height,a.__textureWidth=this.__textureWidth,a.__textureHeight=this.__textureHeight,a.rect.copyFrom(this.rect),a.__framebuffer=this.__framebuffer,a.__framebufferContext=this.__framebufferContext,a.__texture=this.__texture,a.__textureContext=
this.__textureContext,a.__isValid=!0;else a=new na(this.width,this.height,this.transparent,0);a.__worldTransform.copyFrom(this.__worldTransform);a.__renderTransform.copyFrom(this.__renderTransform);return a},colorTransform:function(a,b){this.readable&&this.image.colorTransform(a.__toLimeRectangle(),b.__toLimeColorMatrix())},compare:function(a){if(a==this)return 0;if(null==a)return-1;if(0==this.readable||0==a.readable)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}b=null;e=0;for(f=this.height;e<f;){g=e++;for(var k=0,l=this.width;k<l;){var m=k++;c=!1;var p=this.getPixel32(m,g);var n=a.getPixel32(m,g);d=0;if(p!=n){var h=(p>>>16&255)-(n>>>16&255);var q=(p>>>8&255)-(n>>>8&255);var t=(p&255)-(n&255);0>h&&(h*=-1);0>q&&(q*=-1);0>t&&(t*=-1);0==h&&0==q&&0==t?(p=(p>>>
24&255)-(n>>>24&255),0!=p&&(d=(d>>>24&255)<<24|16711680|(d>>>8&255)<<8|d&255,d=(d>>>24&255)<<24|(d>>>16&255)<<16|65280|d&255,d=(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|255,d=(p&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|d&255,c=!0)):(d=(d>>>24&255)<<24|(h&255)<<16|(d>>>8&255)<<8|d&255,d=(d>>>24&255)<<24|(d>>>16&255)<<16|(q&255)<<8|d&255,d=(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|t&255,d=-16777216|(d>>>16&255)<<16|(d>>>8&255)<<8|d&255,c=!0)}c&&(null==b&&(b=new na(this.width,this.height,
this.transparent||a.transparent,0)),b.setPixel32(m,g,d))}}return null==b?0:b},copyChannel:function(a,b,c,d,e){if(this.readable){switch(d){case 1:d=Af.RED;break;case 2:d=Af.GREEN;break;case 4:d=Af.BLUE;break;case 8:d=Af.ALPHA;break;default:return}switch(e){case 1:e=Af.RED;break;case 2:e=Af.GREEN;break;case 4:e=Af.BLUE;break;case 8:e=Af.ALPHA;break;default:return}this.image.copyChannel(a.image,b.__toLimeRectangle(),c.__toLimeVector2(),d,e)}},copyPixels:function(a,b,c,d,e,f){null==f&&(f=!1);if(this.readable&&
null!=a)if(null==d||!d.transparent||d==a&&(null==e||0==e.x&&0==e.y))null!=e&&(na.__tempVector.x=e.x,na.__tempVector.y=e.y),this.image.copyPixels(a.image,b.__toLimeRectangle(),c.__toLimeVector2(),null!=d?d.image:null,null!=e?na.__tempVector:null,f);else{var g=pa.__pool.get(),k=ia.__pool.get();k.copyFrom(a.rect);k.__contract(b.x,b.y,b.width,b.height);b=na.__pool.get(k.width|0,k.height|0);Ba.convertToCanvas(b.image);Ba.convertToCanvas(a.image);Ba.convertToCanvas(d.image);null!=e&&(k.x+=e.x,k.y+=e.y);
b.image.buffer.__srcContext.globalCompositeOperation="source-over";b.image.buffer.__srcContext.drawImage(d.image.buffer.get_src(),k.x+a.image.offsetX|0,k.y+a.image.offsetY|0,k.width|0,k.height|0,g.x+this.image.offsetX|0,g.y+this.image.offsetY|0,k.width|0,k.height|0);null!=e&&(k.x-=e.x,k.y-=e.y);b.image.buffer.__srcContext.globalCompositeOperation="source-in";b.image.buffer.__srcContext.drawImage(a.image.buffer.get_src(),k.x+a.image.offsetX|0,k.y+a.image.offsetY|0,k.width|0,k.height|0,g.x+this.image.offsetX|
0,g.y+this.image.offsetY|0,k.width|0,k.height|0);this.image.copyPixels(b.image,b.rect.__toLimeRectangle(),c.__toLimeVector2(),null,null,f);na.__pool.release(b);ia.__pool.release(k);pa.__pool.release(g)}},dispose:function(){this.image=null;this.height=this.width=0;this.rect=null;this.readable=this.__isValid=!1;this.__textureContext=this.__texture=this.__framebufferContext=this.__framebuffer=this.__vertexBuffer=this.__surface=null},disposeImage:function(){this.readable=!1},draw:function(a,b,c,d,e,f){null==
f&&(f=!1);if(null!=a){a.__update(!1,!0);var g=Ha.__pool.get();g.copyFrom(a.__renderTransform);g.invert();null!=b&&g.concat(b);b=new Sb;b.__copyFrom(a.__worldColorTransform);b.__invert();if(this.readable||null==this.__texture||null==na.__hardwareRenderer){if(null!=c){var k=ia.__pool.get(),l=Ha.__pool.get();a.__getBounds(k,l);var m=Math.ceil(k.width),p=Math.ceil(k.height);l.tx=-k.x;l.ty=-k.y;m=new na(m,p,!0,0);m.draw(a,l);m.colorTransform(m.rect,c);m.__renderTransform.identity();m.__renderTransform.tx=
k.x;m.__renderTransform.ty=k.y;m.__renderTransform.concat(a.__renderTransform);m.__worldAlpha=a.__worldAlpha;m.__worldColorTransform.__copyFrom(a.__worldColorTransform);a=m;ia.__pool.release(k);Ha.__pool.release(l)}null==na.__softwareRenderer&&(na.__softwareRenderer=new ih(null));Ba.convertToCanvas(this.image);c=na.__softwareRenderer;c.context=this.image.buffer.__srcContext;c.__allowSmoothing=f;c.__overrideBlendMode=d;c.__worldTransform=g;c.__worldAlpha=1/a.__worldAlpha;c.__worldColorTransform=b;
c.__drawBitmapData(this,a,e)}else null==this.__textureContext&&(this.__textureContext=bf.current.__window.context),null!=c&&b.__combine(c),na.__hardwareRenderer.__allowSmoothing=f,na.__hardwareRenderer.__overrideBlendMode=d,na.__hardwareRenderer.__worldTransform=g,na.__hardwareRenderer.__worldAlpha=1/a.__worldAlpha,na.__hardwareRenderer.__worldColorTransform=b,na.__hardwareRenderer.__resize(this.width,this.height),na.__hardwareRenderer.__drawBitmapData(this,a,e);Ha.__pool.release(g)}},drawWithQuality:function(a,
b,c,d,e,f,g){null==f&&(f=!1);this.draw(a,b,c,d,e,2!=g&&f)},encode:function(a,b,c){if(!this.readable||null==a)return null;null==c&&(c=new vc(0));var d=this.image;if(!a.equals(this.rect)){var e=Ha.__pool.get();e.tx=Math.round(-a.x);e.ty=Math.round(-a.y);a=new na(Math.ceil(a.width),Math.ceil(a.height),!0,0);a.draw(this,e);d=a.image;Ha.__pool.release(e)}return b instanceof nr?(c.writeBytes(za.fromBytes(d.encode(lu.PNG)),0,0),c):b instanceof Qo?(c.writeBytes(za.fromBytes(d.encode(lu.JPEG,L.__cast(b,Qo).quality)),
0,0),c):null},fillRect:function(a,b){null!=a&&(this.transparent&&0==(b&-16777216)&&(b=0),this.readable||null==this.__texture||null==na.__hardwareRenderer?this.readable&&this.image.fillRect(a.__toLimeRectangle(),b,1):na.__hardwareRenderer.__fillRect(this,a,b))},floodFill:function(a,b,c){this.readable&&this.image.floodFill(a,b,c,1)},generateFilterRect:function(a,b){return a.clone()},getIndexBuffer:function(a,b){if(null==this.__indexBuffer||this.__indexBufferContext!=a.__context||null!=b&&null==this.__indexBufferGrid||
null!=this.__indexBufferGrid&&!this.__indexBufferGrid.equals(b)){this.__indexBufferContext=a.__context;this.__indexBuffer=null;if(null!=b){null==this.__indexBufferGrid&&(this.__indexBufferGrid=new ia);this.__indexBufferGrid.copyFrom(b);var c=b.width;b=b.height;0!=c&&0!=b?(this.__indexBufferData=new Uint16Array(54),this.__indexBufferData[0]=0,this.__indexBufferData[1]=1,this.__indexBufferData[2]=2,this.__indexBufferData[3]=2,this.__indexBufferData[4]=1,this.__indexBufferData[5]=3,this.__indexBufferData[6]=
4,this.__indexBufferData[7]=5,this.__indexBufferData[8]=6,this.__indexBufferData[9]=6,this.__indexBufferData[10]=5,this.__indexBufferData[11]=7,this.__indexBufferData[12]=8,this.__indexBufferData[13]=9,this.__indexBufferData[14]=10,this.__indexBufferData[15]=10,this.__indexBufferData[16]=9,this.__indexBufferData[17]=11,this.__indexBufferData[18]=12,this.__indexBufferData[19]=13,this.__indexBufferData[20]=14,this.__indexBufferData[21]=14,this.__indexBufferData[22]=13,this.__indexBufferData[23]=15,
this.__indexBufferData[24]=16,this.__indexBufferData[25]=18,this.__indexBufferData[26]=17,this.__indexBufferData[27]=17,this.__indexBufferData[28]=18,this.__indexBufferData[29]=19,this.__indexBufferData[30]=20,this.__indexBufferData[31]=21,this.__indexBufferData[32]=22,this.__indexBufferData[33]=22,this.__indexBufferData[34]=21,this.__indexBufferData[35]=23,this.__indexBufferData[36]=24,this.__indexBufferData[37]=25,this.__indexBufferData[38]=26,this.__indexBufferData[39]=26,this.__indexBufferData[40]=
25,this.__indexBufferData[41]=27,this.__indexBufferData[42]=28,this.__indexBufferData[43]=29,this.__indexBufferData[44]=30,this.__indexBufferData[45]=30,this.__indexBufferData[46]=29,this.__indexBufferData[47]=31,this.__indexBufferData[48]=32,this.__indexBufferData[49]=33,this.__indexBufferData[50]=34,this.__indexBufferData[51]=34,this.__indexBufferData[52]=33,this.__indexBufferData[53]=35,this.__indexBuffer=a.createIndexBuffer(54)):0==c&&0!=b?(this.__indexBufferData=new Uint16Array(18),this.__indexBufferData[0]=
0,this.__indexBufferData[1]=1,this.__indexBufferData[2]=2,this.__indexBufferData[3]=2,this.__indexBufferData[4]=1,this.__indexBufferData[5]=3,this.__indexBufferData[6]=4,this.__indexBufferData[7]=5,this.__indexBufferData[8]=0,this.__indexBufferData[9]=0,this.__indexBufferData[10]=5,this.__indexBufferData[11]=1,this.__indexBufferData[12]=6,this.__indexBufferData[13]=7,this.__indexBufferData[14]=4,this.__indexBufferData[15]=4,this.__indexBufferData[16]=7,this.__indexBufferData[17]=5,this.__indexBuffer=
a.createIndexBuffer(18)):0!=c&&0==b&&(this.__indexBufferData=new Uint16Array(18),this.__indexBufferData[0]=0,this.__indexBufferData[1]=1,this.__indexBufferData[2]=2,this.__indexBufferData[3]=2,this.__indexBufferData[4]=1,this.__indexBufferData[5]=3,this.__indexBufferData[6]=4,this.__indexBufferData[7]=0,this.__indexBufferData[8]=5,this.__indexBufferData[9]=5,this.__indexBufferData[10]=0,this.__indexBufferData[11]=2,this.__indexBufferData[12]=6,this.__indexBufferData[13]=4,this.__indexBufferData[14]=
7,this.__indexBufferData[15]=7,this.__indexBufferData[16]=4,this.__indexBufferData[17]=5,this.__indexBuffer=a.createIndexBuffer(18))}else this.__indexBufferGrid=null;null==this.__indexBuffer&&(this.__indexBufferData=new Uint16Array(6),this.__indexBufferData[0]=0,this.__indexBufferData[1]=1,this.__indexBufferData[2]=2,this.__indexBufferData[3]=2,this.__indexBufferData[4]=1,this.__indexBufferData[5]=3,this.__indexBuffer=a.createIndexBuffer(6));this.__indexBuffer.uploadFromTypedArray(this.__indexBufferData)}return this.__indexBuffer},
getVertexBuffer:function(a,b,c){if(null==this.__vertexBuffer||this.__vertexBufferContext!=a.__context||null!=b&&null==this.__vertexBufferGrid||null!=this.__vertexBufferGrid&&!this.__vertexBufferGrid.equals(b)||null!=c&&(this.__vertexBufferWidth!=c.get_width()||this.__vertexBufferHeight!=c.get_height()||this.__vertexBufferScaleX!=c.get_scaleX()||this.__vertexBufferScaleY!=c.get_scaleY())){this.__uvRect=new ia(0,0,this.width,this.height);this.__vertexBufferContext=a.__context;this.__vertexBuffer=null;
if(null!=b&&null!=c){null==this.__vertexBufferGrid&&(this.__vertexBufferGrid=new ia);this.__vertexBufferGrid.copyFrom(b);this.__vertexBufferWidth=c.get_width();this.__vertexBufferHeight=c.get_height();this.__vertexBufferScaleX=c.get_scaleX();this.__vertexBufferScaleY=c.get_scaleY();var d=b.width,e=b.height;if(0!=d&&0!=e){this.__vertexBufferData=new Float32Array(504);var f=b.x,g=b.y,k=this.__vertexBufferWidth-d-f,l=this.__vertexBufferHeight-e-g;e=f/this.__vertexBufferWidth;d=g/this.__vertexBufferHeight;
var m=b.width/this.__vertexBufferWidth;b=b.height/this.__vertexBufferHeight;var p=.5/this.__vertexBufferWidth,n=.5/this.__vertexBufferHeight;f/=c.get_scaleX();g/=c.get_scaleY();k/=c.get_scaleX();c=l/c.get_scaleY();k=this.width-f-k;c=this.height-g-c;this.__setVertex(0,0,0,0,0);this.__setVertices([3,6,13,16],f,g,1*e,1*d);this.__setVertices([2,12],0,g,0,1*d);this.__setVertices([1,4],f,0,1*e,0);this.__setVertices([7,10,18,20],f+k,g,1*(e+m),1*d);this.__setVertices([5,8],f+k,0,1*(e+m),0);this.__setVertices([11,
21],this.width,g,1,1*d);this.__setVertex(9,this.width,0,1,0);this.__setVertices([15,17,25,28],f,g+c,1*e,1*(d+b));this.__setVertices([14,24],0,g+c,0,1*(d+b));this.__setVertices([19,22,29,32],f+k,g+c,1*(e+m),1*(d+b));this.__setVertices([23,33],this.width,g+c,1,1*(d+b));this.__setVertices([27,30],f,this.height,1*e,1);this.__setVertex(26,0,this.height,0,1);this.__setVertices([31,34],f+k,this.height,1*(e+m),1);this.__setVertex(35,this.width,this.height,1,1);this.__setUOffsets([1,3,5,7,13,15,18,19,25,27,
29,31],-p);this.__setUOffsets([4,6,8,10,16,17,20,22,28,30,32,34],p);this.__setVOffsets([2,3,6,7,10,11,14,15,17,19,22,23],-n);this.__setVOffsets([12,13,16,18,20,21,24,25,28,29,32,33],n);this.__vertexBuffer=a.createVertexBuffer(16,14)}else 0==d&&0!=e?(this.__vertexBufferData=new Float32Array(112),m=b.y,b=this.height-e-m,d=m/this.height,e/=this.height,m/=c.get_scaleY(),b/=c.get_scaleY(),b=c.get_height()/c.get_scaleY()-m-b,c=c.get_width()/c.get_scaleX(),this.__vertexBufferData[0]=c,this.__vertexBufferData[1]=
m,this.__vertexBufferData[3]=1,this.__vertexBufferData[4]=1*d,this.__vertexBufferData[15]=m,this.__vertexBufferData[18]=1*d,this.__vertexBufferData[28]=c,this.__vertexBufferData[31]=1,this.__vertexBufferData[56]=c,this.__vertexBufferData[57]=m+b,this.__vertexBufferData[59]=1,this.__vertexBufferData[60]=1*(d+e),this.__vertexBufferData[71]=m+b,this.__vertexBufferData[74]=1*(d+e),this.__vertexBufferData[84]=c,this.__vertexBufferData[85]=this.height,this.__vertexBufferData[87]=1,this.__vertexBufferData[88]=
1,this.__vertexBufferData[99]=this.height,this.__vertexBufferData[102]=1,this.__vertexBuffer=a.createVertexBuffer(8,14)):0==e&&0!=d&&(this.__vertexBufferData=new Float32Array(112),m=b.x,b=this.width-d-m,e=m/this.width,d/=this.width,m/=c.get_scaleX(),b/=c.get_scaleX(),b=c.get_width()/c.get_scaleX()-m-b,c=c.get_height()/c.get_scaleY(),this.__vertexBufferData[0]=m,this.__vertexBufferData[1]=c,this.__vertexBufferData[3]=1*e,this.__vertexBufferData[4]=1,this.__vertexBufferData[15]=c,this.__vertexBufferData[18]=
1,this.__vertexBufferData[28]=m,this.__vertexBufferData[31]=1*e,this.__vertexBufferData[56]=m+b,this.__vertexBufferData[57]=c,this.__vertexBufferData[59]=1*(e+d),this.__vertexBufferData[60]=1,this.__vertexBufferData[70]=m+b,this.__vertexBufferData[73]=1*(e+d),this.__vertexBufferData[84]=this.width,this.__vertexBufferData[85]=c,this.__vertexBufferData[87]=1,this.__vertexBufferData[88]=1,this.__vertexBufferData[98]=this.width,this.__vertexBufferData[101]=1,this.__vertexBuffer=a.createVertexBuffer(8,
14))}else this.__vertexBufferGrid=null;null==this.__vertexBuffer&&(this.__vertexBufferData=new Float32Array(56),this.__vertexBufferData[0]=this.width,this.__vertexBufferData[1]=this.height,this.__vertexBufferData[3]=1,this.__vertexBufferData[4]=1,this.__vertexBufferData[15]=this.height,this.__vertexBufferData[18]=1,this.__vertexBufferData[28]=this.width,this.__vertexBufferData[31]=1,this.__vertexBuffer=a.createVertexBuffer(3,14));this.__vertexBuffer.uploadFromTypedArray(this.__vertexBufferData)}return this.__vertexBuffer},
getColorBoundsRect:function(a,b,c){null==c&&(c=!0);if(!this.readable)return new ia(0,0,this.width,this.height);a=this.image.getColorBoundsRect(a,b,c,1);return new ia(a.x,a.y,a.width,a.height)},getPixel:function(a,b){return this.readable?this.image.getPixel(a,b,1):0},getPixel32:function(a,b){return this.readable?this.image.getPixel32(a,b,1):0},getPixels:function(a){if(!this.readable)return null;null==a&&(a=this.rect);a=za.fromBytes(this.image.getPixels(a.__toLimeRectangle(),1));a.__endian=0;return a},
getSurface:function(){if(!this.readable)return null;null==this.__surface&&(this.__surface=bh.fromImage(this.image));return this.__surface},getTexture:function(a){if(!this.__isValid)return null;if(null==this.__texture||this.__textureContext!=a.__context)this.__textureContext=a.__context,this.__texture=a.createRectangleTexture(this.width,this.height,1,!1),this.__textureVersion=-1;Ba.sync(this.image,!1);null!=this.image&&this.image.version>this.__textureVersion&&(null!=this.__surface&&Vq.flush(this.__surface),
a=this.image,pc.__supportsBGRA||0==a.get_format()||(a=a.clone(),a.set_format(0)),this.__texture.__uploadFromImage(a),this.__textureVersion=this.image.version,this.__textureWidth=a.buffer.width,this.__textureHeight=a.buffer.height);this.readable||null==this.image||(this.image=this.__surface=null);return this.__texture},getVector:function(a){a=this.getPixels(a);for(var b=Da.toFloat(za.get_length(a))/Da.toFloat(4)|0,c=Ua.toIntVector(null,b,!0),d=0;d<b;){var e=d++;c.set(e,a.readUnsignedInt())}return c},
histogram:function(a){a=null!=a?a:new ia(0,0,this.width,this.height);a=this.getPixels(a);for(var b=[],c=[],d=0;256>d;)d++,c.push(0);b.push(c);c=[];for(d=0;256>d;)d++,c.push(0);b.push(c);c=[];for(d=0;256>d;)d++,c.push(0);b.push(c);c=[];for(d=0;256>d;)d++,c.push(0);b.push(c);c=0;for(d=za.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.readable)return!1;c instanceof Zc&&(c=L.__cast(c,Zc).__bitmapData);if(c instanceof pa){if(d=
c,e=d.x-a.x|0,a=d.y-a.y|0,this.rect.contains(e,a)&&(this.getPixel32(e,a)>>24&255)>b)return!0}else if(c instanceof na){var f;if(null==d)var g=f=0;else f=Math.round(d.x-a.x),g=Math.round(d.y-a.y);a=ia.__pool.get();a.setTo(f,g,c.width,c.height);if(this.rect.intersects(a)){0>f?(a.x=0,a.width=Math.min(c.width+f,this.width)):a.width=Math.min(c.width,this.width-f);0>g?(a.y=0,a.height=Math.min(c.height+g,this.height)):a.height=Math.min(c.height,this.height-g);d=this.getPixels(a);a.x=0>f?-f:0;a.y=0>g?-g:0;
c=c.getPixels(a);for(var k=0,l=a.width*a.height|0;k<l;)if(k++,f=d.readUnsignedInt(),g=c.readUnsignedInt(),Da.gt(f>>>24&255,b)&&Da.gt(g>>>24&255,e))return ia.__pool.release(a),!0}ia.__pool.release(a)}else if(c instanceof ia){e=ia.__pool.get();e.copyFrom(c);e.offset(-a.x,-a.y);e.__contract(0,0,this.width,this.height);if(0<e.width&&0<e.height)for(a=this.getPixels(e),c=0,f=Da.toFloat(za.get_length(a))/Da.toFloat(4)|0;c<f;)if(c++,d=a.readUnsignedInt(),Da.gt(d>>>24&255,b))return ia.__pool.release(e),!0;
ia.__pool.release(e)}return!1},lock:function(){},merge:function(a,b,c,d,e,f,g){this.readable&&null!=a&&a.readable&&null!=b&&null!=c&&this.image.merge(a.image,b.__toLimeRectangle(),c.__toLimeVector2(),d,e,f,g)},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.readable){var f=function(){a=1103515245*a+12345;return(Math.abs(a/65536)|0)%32768};f();c-=b;var g=1==(d&1),k=1==(d&2)>>1,l=1==(d&4)>>2;d=1==(d&8)>>3;for(var m=0,p=this.height;m<p;)for(var n=m++,
h=0,q=this.width;h<q;){var t=h++,r=0,u=0,x=0,v=255;e?(r=x=u=b+f()%c,v=255):(g&&(r=b+f()%c),k&&(x=b+f()%c),l&&(u=b+f()%c),d&&(v=b+f()%c));v=(v<<8)+r;v=(v<<8)+x;v=(v<<8)+u;this.setPixel32(t,n,v)}}},paletteMap:function(a,b,c,d,e,f,g){var k=b.width|0,l=b.height|0;a=a.getPixels(b);b=0;for(var m=l*k;b<m;){var p=b++;var n=a.readUnsignedInt();var h=null==g?n&-16777216:g[n>>24&255];var q=null==d?n&16711680:d[n>>16&255];var t=null==e?n&65280:e[n>>8&255];n=null==f?n&255:f[n&255];q=h+q+t+n;a.position=4*p;a.writeUnsignedInt(q)}a.position=
0;d=ia.__pool.get();d.setTo(c.x,c.y,k,l);this.setPixels(d,a);ia.__pool.release(d)},perlinNoise:function(a,b,c,d,e,f,g,k,l){null==k&&(k=!1);null==g&&(g=7);this.readable&&(new Zi(d,c,g,k,.5,e,.15)).fill(this,a,b,0)},scroll:function(a,b){this.readable&&this.image.scroll(a,b)},setPixel:function(a,b,c){this.readable&&this.image.setPixel(a,b,c,1)},setPixel32:function(a,b,c){this.readable&&this.image.setPixel32(a,b,c,1)},setPixels:function(a,b){if(this.readable&&null!=a){var c=a.width*a.height*4;if(Da.toFloat(b.length-
b.position)<c)throw new E(new hd("End of file was encountered.",2030));this.image.setPixels(a.__toLimeRectangle(),za.toBytePointer(b),1,$i.toLimeEndian(b.__endian))}},setVector:function(a,b){var c=new vc(0);za.set_length(c,4*b.get_length());for(b=b.iterator();b.hasNext();){var d=b.next();c.writeUnsignedInt(d)}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){},__applyAlpha:function(a){Ba.convertToCanvas(this.image);Ba.createImageData(this.image);for(var b=this.image.buffer.data,c=0,d=za.get_length(a);c<d;){var e=c++;b[4*e+3]=a.readUnsignedByte()}this.image.version++},__fromBase64:function(a,b){a=Ob.fromBase64(a,b);this.__fromImage(a)},__fromBytes:function(a,b){a=Ob.fromBytes(za.toBytes(a));this.__fromImage(a);null!=b&&this.__applyAlpha(b)},
__fromFile:function(a){a=Ob.fromFile(a);this.__fromImage(a)},__fromImage:function(a){null!=a&&null!=a.buffer&&(this.image=a,this.width=a.width,this.height=a.height,this.rect=new ia(0,0,a.width,a.height),this.__textureWidth=this.width,this.__textureHeight=this.height,this.__isValid=this.readable=!0)},__fromSymbol:function(a,b){var c=this;this.__symbol=b;Ob.loadFromFile(b.path).onComplete(function(a){if(null!=b.alpha)Ob.loadFromFile(b.alpha).onComplete(function(b){if(null!=a&&null!=b){var d=b.get_rect();
a.copyChannel(b,d,new Gd,Af.RED,Af.ALPHA);a.buffer.premultiplied=!0;a.set_premultiplied(!1)}c.__fromImage(a)});else c.__fromImage(a)})},__getBounds:function(a,b){var c=ia.__pool.get();this.rect.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);ia.__pool.release(c)},__loadFromBase64:function(a,b){var c=this;return Ob.loadFromBase64(a,b).then(function(a){c.__fromImage(a);return xb.withValue(c)})},__loadFromBytes:function(a,b){var c=this;return Ob.loadFromBytes(za.toBytes(a)).then(function(a){c.__fromImage(a);
null!=b&&c.__applyAlpha(b);return xb.withValue(c)})},__loadFromFile:function(a){var b=this;return Ob.loadFromFile(a).then(function(a){b.__fromImage(a);return xb.withValue(b)})},__resize:function(a,b){this.width=a;this.height=b;this.rect.width=a;this.rect.height=b;this.__textureWidth=a;this.__textureHeight=b},__setUVRect:function(a,b,c,d,e){if(null!=this.getVertexBuffer(a)&&(d!=this.__uvRect.width||e!=this.__uvRect.height||b!=this.__uvRect.x||c!=this.__uvRect.y)){null==this.__uvRect&&(this.__uvRect=
new ia);this.__uvRect.setTo(b,c,d,e);a=0<this.__textureWidth?b/this.__textureWidth:0;c=0<this.__textureHeight?c/this.__textureHeight:0;b=0<this.__textureWidth?d/this.__textureWidth:0;var f=0<this.__textureHeight?e/this.__textureHeight:0;this.__vertexBufferData[0]=d;this.__vertexBufferData[1]=e;this.__vertexBufferData[3]=a+b;this.__vertexBufferData[4]=c+f;this.__vertexBufferData[15]=e;this.__vertexBufferData[17]=a;this.__vertexBufferData[18]=c+f;this.__vertexBufferData[28]=d;this.__vertexBufferData[31]=
a+b;this.__vertexBufferData[32]=c;this.__vertexBufferData[45]=a;this.__vertexBufferData[46]=c;this.__vertexBuffer.uploadFromTypedArray(this.__vertexBufferData)}},__setVertex:function(a,b,c,d,e){a*=14;this.__vertexBufferData[a]=b;this.__vertexBufferData[a+1]=c;this.__vertexBufferData[a+3]=d;this.__vertexBufferData[a+4]=e},__setVertices:function(a,b,c,d,e){for(var f=0;f<a.length;){var g=a[f];++f;this.__setVertex(g,b,c,d,e)}},__setUOffsets:function(a,b){for(var c=0;c<a.length;){var d=a[c];++c;this.__vertexBufferData[14*
d+3]+=b}},__setVOffsets:function(a,b){for(var c=0;c<a.length;){var d=a[c];++c;this.__vertexBufferData[14*d+4]+=b}},__sync:function(){Ba.sync(this.image,!1)},__update:function(a,b){this.__updateTransforms()},__updateTransforms:function(a){null==a?this.__worldTransform.identity():this.__worldTransform.copyFrom(a);this.__renderTransform.copyFrom(this.__worldTransform)},__class__:na};var Vc=function(){};h["openfl._internal.renderer.context3D.Context3DGraphics"]=Vc;Vc.__name__="openfl._internal.renderer.context3D.Context3DGraphics";
Vc.buildBuffer=function(a,b){var c=0,d=0,e=0,f=new xg(a.__commands);b=b.context3D;for(var g=ia.__pool.get(),k=Ha.__pool.get(),l=null,m=0,p=a.__commands.types;m<p.length;){var n=p[m];++m;switch(n._hx_index){case 0:switch(f.prev._hx_index){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=
4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1}f.prev=ka.BEGIN_BITMAP_FILL;l=f;l=l.buffer.o[l.oPos];break;case 1:l=null;switch(f.prev._hx_index){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=
1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1}f.prev=n;break;case 3:switch(f.prev._hx_index){case 0:f.oPos+=
2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=
2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1}f.prev=ka.BEGIN_SHADER_FILL;l=f;n=l.buffer.o[l.oPos];l=null;if(null!=n)for(var h=0,q=n.inputCount;h<q;){var t=h++;if("bitmap"==n.inputRefs[t].name){l=n.inputs[t];break}}break;case 8:if(null!=l){switch(f.prev._hx_index){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;
case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1}f.prev=ka.DRAW_QUADS;q=f;n=q.buffer.o[q.oPos];h=q.buffer.o[q.oPos+1];q=q.buffer.o[q.oPos+2];t=null!=h;var r=!1,u=!1,x=t?h.get_length():Math.floor(n.get_length()/4);
if(0==x)return;null!=q&&(q.get_length()>=6*x?u=r=!0:q.get_length()>=4*x?r=!0:q.get_length()>=2*x&&(u=!0));null==a.__quadBuffer?a.__quadBuffer=new qi(b,mu.QUADS,x,4):a.__quadBuffer.resize(c+x,4);for(var v,w,C,J,Q,F,B,D,E,A,H,G,I,K,y=a.__quadBuffer.vertexBufferData,L=l.width,M=l.height,N=0,P=x;N<P;)J=N++,v=16*(c+J),w=t?4*h.get(J):4*J,0>w||(g.setTo(n.get(w),n.get(w+1),n.get(w+2),n.get(w+3)),w=g.width,C=g.height,0>=w||0>=C||(r&&u?(J*=6,k.setTo(q.get(J),q.get(J+1),q.get(J+2),q.get(J+3),q.get(J+4),q.get(J+
5))):r?(J*=4,k.setTo(q.get(J),q.get(J+1),q.get(J+2),q.get(J+3),g.x,g.y)):u?(J*=2,k.tx=q.get(J),k.ty=q.get(J+1)):(k.tx=g.x,k.ty=g.y),J=g.x/L,Q=g.y/M,F=g.get_right()/L,B=g.get_bottom()/M,D=0*k.a+0*k.c+k.tx,E=0*k.b+0*k.d+k.ty,A=w*k.a+0*k.c+k.tx,H=w*k.b+0*k.d+k.ty,G=0*k.a+C*k.c+k.tx,I=0*k.b+C*k.d+k.ty,K=w*k.a+C*k.c+k.tx,w=w*k.b+C*k.d+k.ty,y[v]=D,y[v+1]=E,y[v+2]=J,y[v+3]=Q,y[v+4]=A,y[v+4+1]=H,y[v+4+2]=F,y[v+4+3]=Q,y[v+8]=G,y[v+8+1]=I,y[v+8+2]=J,y[v+8+3]=B,y[v+12]=K,y[v+12+1]=w,y[v+12+2]=F,y[v+12+3]=B));
c+=x}break;case 12:switch(f.prev._hx_index){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;
f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1}f.prev=ka.DRAW_TRIANGLES;q=f;n=q.buffer.o[q.oPos];h=q.buffer.o[q.oPos+1];q=q.buffer.o[q.oPos+2];t=null!=h;x=Math.floor(n.get_length()/2);r=t?h.get_length():x;v=(x=(u=null!=q)&&q.get_length()>=3*x)?4:2;y=x?3:2;L=v+2;M=x?e:d;Vc.resizeVertexBuffer(a,x,M+r*L);N=x?a.__vertexBufferDataUVT:a.__vertexBufferData;C=0;for(J=r;C<J;)Q=C++,P=M+Q*L,w=t?2*h.get(Q):2*Q,Q=t?h.get(Q)*y:Q*y,x?(F=q.get(Q+
2),N[P]=n.get(w)/F,N[P+1]=n.get(w+1)/F,N[P+2]=0,N[P+3]=1/F):(N[P]=n.get(w),N[P+1]=n.get(w+1)),N[P+v]=u?q.get(Q):0,N[P+v+1]=u?q.get(Q+1):0;x?e+=r*L:d+=r*L;break;case 13:l=null;break;default:switch(f.prev._hx_index){case 0:f.oPos+=2;f.bPos+=2;break;case 1:f.iPos+=1;f.fPos+=1;break;case 2:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 3:f.oPos+=1;break;case 4:f.fPos+=6;break;case 5:f.fPos+=4;break;case 6:f.fPos+=3;break;case 7:f.fPos+=4;break;case 8:f.oPos+=3;break;case 9:f.fPos+=4;break;case 10:f.fPos+=
5;f.oPos+=1;break;case 12:f.oPos+=4;break;case 14:f.oPos+=2;f.bPos+=2;break;case 15:f.oPos+=4;f.iiPos+=2;f.ffPos+=1;f.fPos+=1;break;case 16:f.oPos+=4;f.iPos+=1;f.fPos+=2;f.bPos+=1;break;case 17:f.fPos+=2;break;case 18:f.fPos+=2;break;case 19:f.oPos+=1;break;case 20:f.oPos+=1}f.prev=n}}0<c&&a.__quadBuffer.flushVertexBufferData();if(0<d){c=a.__vertexBuffer;if(null==c||d>a.__vertexBufferCount)c=b.createVertexBuffer(d,4,0),a.__vertexBuffer=c,a.__vertexBufferCount=d;c.uploadFromTypedArray(a.__vertexBufferData)}if(0<
e){d=a.__vertexBufferUVT;if(null==d||e>a.__vertexBufferCountUVT)d=b.createVertexBuffer(e,6,0),a.__vertexBufferUVT=d,a.__vertexBufferCountUVT=e;d.uploadFromTypedArray(a.__vertexBufferDataUVT)}ia.__pool.release(g);Ha.__pool.release(k)};Vc.isCompatible=function(a){if(null!=a.__owner.__worldScale9Grid)return!1;var b=new xg(a.__commands),c=!1,d=!1,e=!1,f=0;for(a=a.__commands.types;f<a.length;){var g=a[f];++f;switch(g._hx_index){case 0:d=!0;e=c=!1;switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;
case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=
1;break;case 20:b.oPos+=1}b.prev=g;break;case 1:d=!1;c=!0;e=!1;switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;
b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=g;break;case 3:c=d=!1;e=!0;switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;
case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=g;break;case 8:if(d||e){switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=
6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=g}else return b.destroy(),!1;break;case 9:if(c){switch(b.prev._hx_index){case 0:b.oPos+=
2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=
2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=g}else return b.destroy(),!1;break;case 12:if(d||e){switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;
break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=g}else return b.destroy(),!1;break;case 13:e=c=d=!1;switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;
case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=g;break;case 18:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=
2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=g;break;case 19:switch(b.prev._hx_index){case 0:b.oPos+=
2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=
2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=g;break;default:return b.destroy(),!1}}b.destroy();return!0};Vc.render=function(a,b){if(a.__visible&&0!=a.__commands.get_length())if(null!=a.__bitmap&&!a.__dirty||!Vc.isCompatible(a)){var c=b.__softwareRenderer.__worldTransform;b.__softwareRenderer.__worldTransform=b.__worldTransform;D.render(a,b.__softwareRenderer);b.__softwareRenderer.__worldTransform=c}else{a.__bitmap=null;a.__update(b.__worldTransform);c=a.__width;var d=a.__height;if(null!=
a.__bounds&&1<=c&&1<=d){(a.__hardwareDirty||null==a.__quadBuffer&&null==a.__vertexBuffer&&null==a.__vertexBufferUVT)&&Vc.buildBuffer(a,b);c=new xg(a.__commands);d=b.context3D;for(var e=Ha.__pool.get(),f=null,g=null,k=!1,l=!1,m=null,p=0,n=0,h=0,q=0,t=0,r=a.__commands.types;t<r.length;){var u=r[t];++t;switch(u._hx_index){case 0:switch(c.prev._hx_index){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=
6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1}c.prev=ka.BEGIN_BITMAP_FILL;l=c;g=l.buffer.o[l.oPos];k=l.buffer.b[l.bPos];l=l.buffer.b[l.bPos+
1];m=f=null;break;case 1:switch(c.prev._hx_index){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=
1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1}c.prev=ka.BEGIN_FILL;g=c;m=(g.buffer.i[g.iPos]|0)&16777215|(255*g.buffer.f[g.fPos]|0)<<24;g=f=null;break;case 3:switch(c.prev._hx_index){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=
3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1}c.prev=ka.BEGIN_SHADER_FILL;n=c;f=n.buffer.o[n.oPos];n=0;g=null==f||null==f.shader||null==f.shader.__bitmap?null:f.shader.__bitmap.input;m=null;break;case 8:if(null!=g){switch(c.prev._hx_index){case 0:c.oPos+=
2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=
2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1}c.prev=ka.DRAW_QUADS;var x=c;u=x.buffer.o[x.oPos];x=x.buffer.o[x.oPos+1];u=null!=x?x.get_length():Math.floor(u.get_length()/4);var v=b.__getMatrix(a.__owner.__renderTransform,1);null==f||Vc.maskRender?(x=Vc.maskRender?b.__maskShader:b.__initGraphicsShader(null),b.setShader(x),b.applyMatrix(v),b.applyBitmapData(g,l,k),b.applyAlpha(a.__owner.__worldAlpha),b.applyColorTransform(a.__owner.__worldColorTransform),b.updateShader()):(x=b.__initShaderBuffer(f),
b.__setShaderBuffer(f),b.applyMatrix(v),b.applyBitmapData(g,!1,k),b.applyAlpha(a.__owner.__worldAlpha),b.applyColorTransform(a.__owner.__worldColorTransform));for(v=p+u;p<v;){u=Math.min(v-p,d.__quadIndexBufferElements)|0;if(0>=u)break;null==f||Vc.maskRender||b.__updateShaderBuffer(n);null!=x.__position&&d.setVertexBufferAt(x.__position.index,a.__quadBuffer.vertexBuffer,16*p,2);null!=x.__textureCoord&&d.setVertexBufferAt(x.__textureCoord.index,a.__quadBuffer.vertexBuffer,16*p+2,2);d.drawTriangles(d.__quadIndexBuffer,
0,2*u);n+=4*u;p+=u}b.__clearShader()}break;case 9:if(null!=m){switch(c.prev._hx_index){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;
c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1}c.prev=ka.DRAW_RECT;var w=c;u=w.buffer.f[w.fPos];x=w.buffer.f[w.fPos+1];v=w.buffer.f[w.fPos+2];var C=w.buffer.f[w.fPos+3];w=m;Vc.tempColorTransform.redOffset=w>>>16&255;Vc.tempColorTransform.greenOffset=w>>>8&255;Vc.tempColorTransform.blueOffset=w&255;Vc.tempColorTransform.__combine(a.__owner.__worldColorTransform);e.identity();e.scale(v,C);
e.tx=u;e.ty=x;e.concat(a.__owner.__renderTransform);u=Vc.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(u);b.applyMatrix(b.__getMatrix(e,1));b.applyBitmapData(Vc.blankBitmapData,!0,k);b.applyAlpha((w>>>24&255)/255*a.__owner.__worldAlpha);b.applyColorTransform(Vc.tempColorTransform);b.updateShader();x=Vc.blankBitmapData.getVertexBuffer(d);null!=u.__position&&d.setVertexBufferAt(u.__position.index,x,0,3);null!=u.__textureCoord&&d.setVertexBufferAt(u.__textureCoord.index,x,3,2);u=
Vc.blankBitmapData.getIndexBuffer(d);d.drawTriangles(u);n+=4;b.__clearShader()}break;case 12:switch(c.prev._hx_index){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=
4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1}c.prev=ka.DRAW_TRIANGLES;C=c;x=C.buffer.o[C.oPos+1];v=C.buffer.o[C.oPos+2];u=C.buffer.o[C.oPos+3];w=null!=x;C=Math.floor(C.buffer.o[C.oPos].get_length()/2);x=w?x.get_length():C;w=(v=null!=v&&v.get_length()>=3*C)?4:2;C=w+2;var J=v?a.__vertexBufferUVT:a.__vertexBuffer,Q=v?q:h,F=b.__getMatrix(a.__owner.__renderTransform,
1);if(null==f||Vc.maskRender){var B=Vc.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(B);b.applyMatrix(F);b.applyBitmapData(g,l,k);b.applyAlpha(a.__owner.__worldAlpha);b.applyColorTransform(a.__owner.__worldColorTransform);b.updateShader()}else B=b.__initShaderBuffer(f),b.__setShaderBuffer(f),b.applyMatrix(F),b.applyBitmapData(g,!1,k),b.applyAlpha(1),b.applyColorTransform(null),b.__updateShaderBuffer(n);null!=B.__position&&d.setVertexBufferAt(B.__position.index,J,Q,v?4:2);null!=
B.__textureCoord&&d.setVertexBufferAt(B.__textureCoord.index,J,Q+w,2);switch(u){case 0:d.setCulling(0);break;case 1:d.setCulling(3);break;case 2:d.setCulling(1)}d.__drawTriangles(0,x);n+=x;v?q+=C*x:h+=C*x;switch(u){case 1:case 2:d.setCulling(0)}b.__clearShader();break;case 13:f=m=g=null;switch(c.prev._hx_index){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;
case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1}c.prev=u;break;case 18:switch(c.prev._hx_index){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=
4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1}c.prev=ka.MOVE_TO;
break;case 19:switch(c.prev._hx_index){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=
2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1}c.prev=ka.OVERRIDE_BLEND_MODE;u=c;b.__setBlendMode(u.buffer.o[u.oPos]);break;default:switch(c.prev._hx_index){case 0:c.oPos+=2;c.bPos+=2;break;case 1:c.iPos+=1;c.fPos+=1;break;case 2:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 3:c.oPos+=1;break;case 4:c.fPos+=6;break;case 5:c.fPos+=4;break;case 6:c.fPos+=3;break;case 7:c.fPos+=4;break;case 8:c.oPos+=3;break;case 9:c.fPos+=4;break;case 10:c.fPos+=
5;c.oPos+=1;break;case 12:c.oPos+=4;break;case 14:c.oPos+=2;c.bPos+=2;break;case 15:c.oPos+=4;c.iiPos+=2;c.ffPos+=1;c.fPos+=1;break;case 16:c.oPos+=4;c.iPos+=1;c.fPos+=2;c.bPos+=1;break;case 17:c.fPos+=2;break;case 18:c.fPos+=2;break;case 19:c.oPos+=1;break;case 20:c.oPos+=1}c.prev=u}}Ha.__pool.release(e)}a.__hardwareDirty=!1;a.set___dirty(!1)}};Vc.renderMask=function(a,b){Vc.maskRender=!0;Vc.render(a,b);Vc.maskRender=!1};Vc.resizeIndexBuffer=function(a,b,c){if(!b){var d=b?null:a.__triangleIndexBufferData,
e=null;null==d?e=null!=c?new Uint16Array(c):null:c>d.length&&(e=null!=c?new Uint16Array(c):null,e.set(d));null==e||b||(a.__triangleIndexBufferData=e)}};Vc.resizeVertexBuffer=function(a,b,c){var d=b?a.__vertexBufferDataUVT:a.__vertexBufferData,e=null;null==d?e=null!=c?new Float32Array(c):null:c>d.length&&(e=null!=c?new Float32Array(c):null,e.set(d));null!=e&&(b?a.__vertexBufferDataUVT=e:a.__vertexBufferData=e)};var Yi=function(){null==this.__glFragmentSource&&(this.__glFragmentSource="varying vec2 openfl_TextureCoordv;\n\t\t\n\t\tuniform sampler2D openfl_Texture;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\tvec4 color = texture2D (openfl_Texture, openfl_TextureCoordv);\n\t\t\t\n\t\t\tif (color.a == 0.0) {\n\t\t\t\t\n\t\t\t\tdiscard;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tgl_FragColor = color;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}");
null==this.__glVertexSource&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tvarying vec2 openfl_TextureCoordv;\n\t\t\n\t\tuniform mat4 openfl_Matrix;\n\t\t\n\t\tvoid main(void) {\n\t\t\t\n\t\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\t\t\t\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\t\n\t\t}");ef.call(this);this.__isGenerated=!0;this.__initGL()};h["openfl._internal.renderer.context3D.Context3DMaskShader"]=Yi;Yi.__name__=
"openfl._internal.renderer.context3D.Context3DMaskShader";Yi.__super__=ef;Yi.prototype=w(ef.prototype,{openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_Texture:null,__class__:Yi});var Zj=function(a,b){jf.call(this)};h["openfl.display.OpenGLRenderer"]=Zj;Zj.__name__="openfl.display.OpenGLRenderer";Zj.__super__=jf;Zj.prototype=w(jf.prototype,{gl:null,applyAlpha:function(a){},applyBitmapData:function(a,b,c){},applyColorTransform:function(a){},applyHasColorTransform:function(a){},
applyMatrix:function(a){},getMatrix:function(a){return null},setShader:function(a){},setViewport:function(){},updateShader:function(){},useAlphaArray:function(){},useColorTransformArray:function(){},__class__:Zj});var zb=function(a,b){var c=this;jf.call(this);this.__init(a,b);null==nf.maxTextureWidth&&(nf.maxTextureWidth=nf.maxTextureHeight=this.__gl.getParameter(this.__gl.MAX_TEXTURE_SIZE));this.__matrix=oa._new();this.__values=[];this.__softwareRenderer=new ih(null);this.__type="opengl";this.__setBlendMode(10);
this.context3D.__setGLBlend(!0);this.__clipRects=[];this.__maskObjects=[];this.__numClipRects=0;this.__projection=oa._new();this.__projectionFlipped=oa._new();this.__stencilReference=0;this.__tempRect=new ia;this.__defaultDisplayShader=new Ro;this.__defaultGraphicsShader=new So;this.__defaultShader=this.__defaultDisplayShader;this.__initShader(this.__defaultShader);this.__scrollRectMasks=new Ma(function(){return new Ue});this.__alphaMaskShader=new Po;this.__maskShader=new Yi;null==zb.__childRendererPool&&
(zb.__childRendererPool=new Ma(function(){var a=new zb(c.context3D,null);a.__worldTransform=new Ha;a.__worldColorTransform=new Sb;return a}))};h["openfl._internal.renderer.context3D.Context3DRenderer"]=zb;zb.__name__="openfl._internal.renderer.context3D.Context3DRenderer";zb.__super__=Zj;zb.prototype=w(Zj.prototype,{context3D:null,__alphaMaskShader:null,__clipRects:null,__context:null,__currentDisplayShader:null,__currentGraphicsShader:null,__currentRenderTarget:null,__currentShader:null,__currentShaderBuffer:null,
__defaultDisplayShader:null,__defaultGraphicsShader:null,__defaultRenderTarget:null,__defaultShader:null,__displayHeight:null,__displayWidth:null,__flipped:null,__gl:null,__height:null,__maskShader:null,__matrix:null,__maskObjects:null,__numClipRects:null,__offsetX:null,__offsetY:null,__projection:null,__projectionFlipped:null,__scrollRectMasks:null,__softwareRenderer:null,__stencilReference:null,__tempColorTransform:null,__tempRect:null,__updatedStencil:null,__upscaled:null,__values:null,__width:null,
applyAlpha:function(a){zb.__alphaValue[0]=a;null!=this.__currentShaderBuffer?this.__currentShaderBuffer.addFloatOverride("openfl_Alpha",zb.__alphaValue):null!=this.__currentShader&&null!=this.__currentShader.__alpha&&(this.__currentShader.__alpha.value=zb.__alphaValue)},applyBitmapData:function(a,b,c){null==c&&(c=!1);null!=this.__currentShaderBuffer?null!=a&&(zb.__textureSizeValue[0]=a.__textureWidth,zb.__textureSizeValue[1]=a.__textureHeight,this.__currentShaderBuffer.addFloatOverride("openfl_TextureSize",
zb.__textureSizeValue)):null!=this.__currentShader&&(null!=this.__currentShader.__bitmap&&(this.__currentShader.__bitmap.input=a,this.__currentShader.__bitmap.filter=b&&this.__allowSmoothing?4:5,this.__currentShader.__bitmap.mipFilter=2,this.__currentShader.__bitmap.wrap=c?2:0),null!=this.__currentShader.__texture&&(this.__currentShader.__texture.input=a,this.__currentShader.__texture.filter=b&&this.__allowSmoothing?4:5,this.__currentShader.__texture.mipFilter=2,this.__currentShader.__texture.wrap=
c?2:0),null!=this.__currentShader.__textureSize&&(null!=a?(zb.__textureSizeValue[0]=a.__textureWidth,zb.__textureSizeValue[1]=a.__textureHeight,this.__currentShader.__textureSize.value=zb.__textureSizeValue):this.__currentShader.__textureSize.value=null))},applyColorTransform:function(a){var b=null!=a&&!a.__isDefault(!0);this.applyHasColorTransform(b);b?(a.__setArrays(zb.__colorMultipliersValue,zb.__colorOffsetsValue),null!=this.__currentShaderBuffer?(this.__currentShaderBuffer.addFloatOverride("openfl_ColorMultiplier",
zb.__colorMultipliersValue),this.__currentShaderBuffer.addFloatOverride("openfl_ColorOffset",zb.__colorOffsetsValue)):null!=this.__currentShader&&(null!=this.__currentShader.__colorMultiplier&&(this.__currentShader.__colorMultiplier.value=zb.__colorMultipliersValue),null!=this.__currentShader.__colorOffset&&(this.__currentShader.__colorOffset.value=zb.__colorOffsetsValue))):null!=this.__currentShaderBuffer?(this.__currentShaderBuffer.addFloatOverride("openfl_ColorMultiplier",zb.__emptyColorValue),
this.__currentShaderBuffer.addFloatOverride("openfl_ColorOffset",zb.__emptyColorValue)):null!=this.__currentShader&&(null!=this.__currentShader.__colorMultiplier&&(this.__currentShader.__colorMultiplier.value=zb.__emptyColorValue),null!=this.__currentShader.__colorOffset&&(this.__currentShader.__colorOffset.value=zb.__emptyColorValue))},applyHasColorTransform:function(a){zb.__hasColorTransformValue[0]=a;null!=this.__currentShaderBuffer?this.__currentShaderBuffer.addBoolOverride("openfl_HasColorTransform",
zb.__hasColorTransformValue):null!=this.__currentShader&&null!=this.__currentShader.__hasColorTransform&&(this.__currentShader.__hasColorTransform.value=zb.__hasColorTransformValue)},applyMatrix:function(a){null!=this.__currentShaderBuffer?this.__currentShaderBuffer.addFloatOverride("openfl_Matrix",a):null!=this.__currentShader&&null!=this.__currentShader.__matrix&&(this.__currentShader.__matrix.value=a)},getMatrix:function(a){null!=this.__gl?(a=this.__getMatrix(a,1),oa.set(this.__matrix,0,a[0]),
oa.set(this.__matrix,1,a[1]),oa.set(this.__matrix,2,a[2]),oa.set(this.__matrix,3,a[3]),oa.set(this.__matrix,4,a[4]),oa.set(this.__matrix,5,a[5]),oa.set(this.__matrix,6,a[6]),oa.set(this.__matrix,7,a[7]),oa.set(this.__matrix,8,a[8]),oa.set(this.__matrix,9,a[9]),oa.set(this.__matrix,10,a[10]),oa.set(this.__matrix,11,a[11]),oa.set(this.__matrix,12,a[12]),oa.set(this.__matrix,13,a[13]),oa.set(this.__matrix,14,a[14]),oa.set(this.__matrix,15,a[15])):(oa.identity(this.__matrix),oa.set(this.__matrix,0,a.a),
oa.set(this.__matrix,1,a.b),oa.set(this.__matrix,4,a.c),oa.set(this.__matrix,5,a.d),oa.set(this.__matrix,12,a.tx),oa.set(this.__matrix,13,a.ty));return this.__matrix},setShader:function(a){this.__currentShaderBuffer=null;this.__currentShader!=a&&(null==a?(this.__currentShader=null,this.context3D.setProgram(null)):(this.__currentShader=a,this.__initShader(a),this.context3D.setProgram(a.program),this.context3D.__flushGLProgram(),this.__currentShader.__enable(),this.context3D.__state.shader=a))},setViewport:function(){this.__gl.viewport(this.__offsetX,
this.__offsetY,this.__displayWidth,this.__displayHeight)},updateShader:function(){null!=this.__currentShader&&(null!=this.__currentShader.__position&&(this.__currentShader.__position.__useArray=!0),null!=this.__currentShader.__textureCoord&&(this.__currentShader.__textureCoord.__useArray=!0),this.context3D.setProgram(this.__currentShader.program),this.context3D.__flushGLProgram(),this.context3D.__flushGLTextures(),this.__currentShader.__update())},useAlphaArray:function(){null!=this.__currentShader&&
null!=this.__currentShader.__alpha&&(this.__currentShader.__alpha.__useArray=!0)},useColorTransformArray:function(){null!=this.__currentShader&&(null!=this.__currentShader.__colorMultiplier&&(this.__currentShader.__colorMultiplier.__useArray=!0),null!=this.__currentShader.__colorOffset&&(this.__currentShader.__colorOffset.__useArray=!0))},__cleanup:function(){0<this.__stencilReference&&(this.__stencilReference=0,this.context3D.setStencilActions(),this.context3D.setStencilReferenceValue(0,0,0));0<
this.__numClipRects&&(this.__numClipRects=0,this.__scissorRect())},__clear:function(){null==this.__stage||this.__stage.__transparent?this.context3D.clear(0,0,0,0,0,0,1):this.context3D.clear(this.__stage.__colorSplit[0],this.__stage.__colorSplit[1],this.__stage.__colorSplit[2],1,0,0,1);this.__cleared=!0},__clearShader:function(){null!=this.__currentShader&&(null==this.__currentShaderBuffer?null!=this.__currentShader.__bitmap&&(this.__currentShader.__bitmap.input=null):this.__currentShaderBuffer.clearOverride(),
null!=this.__currentShader.__texture&&(this.__currentShader.__texture.input=null),null!=this.__currentShader.__textureSize&&(this.__currentShader.__textureSize.value=null),null!=this.__currentShader.__hasColorTransform&&(this.__currentShader.__hasColorTransform.value=null),null!=this.__currentShader.__position&&(this.__currentShader.__position.value=null),null!=this.__currentShader.__matrix&&(this.__currentShader.__matrix.value=null),this.__currentShader.__clearUseArray())},__copyShader:function(a){this.__currentShader=
a.__currentShader;this.__currentShaderBuffer=a.__currentShaderBuffer;this.__currentDisplayShader=a.__currentDisplayShader;this.__currentGraphicsShader=a.__currentGraphicsShader},__drawBitmapData:function(a,b,c){null!=c&&this.__pushMaskRect(c,b.__renderTransform);var d=this.context3D,e=d.__state.renderToTexture,f=d.__state.renderToTextureDepthStencil,g=d.__state.renderToTextureAntiAlias,k=d.__state.renderToTextureSurfaceSelector;d.setRenderToTexture(a.getTexture(d),!0);this.__render(b);null!=e?d.setRenderToTexture(e,
f,g,k):d.setRenderToBackBuffer();null!=c&&this.__popMaskRect()},__fillRect:function(a,b,c){if(null!=a.__texture){var d=a.__texture.__context,e=!a.rect.equals(b),f=d.__state.renderToTexture,g=d.__state.renderToTextureDepthStencil,k=d.__state.renderToTextureAntiAlias,l=d.__state.renderToTextureSurfaceSelector;d.setRenderToTexture(a.__texture);e&&d.setScissorRectangle(b);d.clear((c>>>16&255)/255,(c>>>8&255)/255,(c&255)/255,a.transparent?(c>>>24&255)/255:1,0,0,1);e&&d.setScissorRectangle(null);null!=
f?d.setRenderToTexture(f,g,k,l):d.setRenderToBackBuffer()}},__getAlpha:function(a){return a*this.__worldAlpha},__getColorTransform:function(a){return null!=this.__worldColorTransform?(this.__tempColorTransform.__copyFrom(this.__worldColorTransform),this.__tempColorTransform.__combine(a),this.__tempColorTransform):a},__getMatrix:function(a,b){var c=Ha.__pool.get();c.copyFrom(a);c.concat(this.__worldTransform);if(0==b||1==b&&0==c.b&&0==c.c&&1.001>c.a&&.999<c.a&&1.001>c.d&&.999<c.d)c.tx=Math.round(c.tx),
c.ty=Math.round(c.ty);oa.identity(this.__matrix);oa.set(this.__matrix,0,c.a);oa.set(this.__matrix,1,c.b);oa.set(this.__matrix,4,c.c);oa.set(this.__matrix,5,c.d);oa.set(this.__matrix,12,c.tx);oa.set(this.__matrix,13,c.ty);oa.append(this.__matrix,this.__flipped?this.__projectionFlipped:this.__projection);this.__values[0]=oa.get(this.__matrix,0);this.__values[1]=oa.get(this.__matrix,1);this.__values[2]=oa.get(this.__matrix,2);this.__values[3]=oa.get(this.__matrix,3);this.__values[4]=oa.get(this.__matrix,
4);this.__values[5]=oa.get(this.__matrix,5);this.__values[6]=oa.get(this.__matrix,6);this.__values[7]=oa.get(this.__matrix,7);this.__values[8]=oa.get(this.__matrix,8);this.__values[9]=oa.get(this.__matrix,9);this.__values[10]=oa.get(this.__matrix,10);this.__values[11]=oa.get(this.__matrix,11);this.__values[12]=oa.get(this.__matrix,12);this.__values[13]=oa.get(this.__matrix,13);this.__values[14]=oa.get(this.__matrix,14);this.__values[15]=oa.get(this.__matrix,15);Ha.__pool.release(c);return this.__values},
__init:function(a,b){this.context3D=a;this.__context=a.__context;this.gl=this.__gl=a.__context.webgl;this.__defaultRenderTarget=b;this.__flipped=null==this.__defaultRenderTarget},__initShader:function(a){return null!=a?(null==a.__context&&(a.__context=this.context3D,a.__init()),a):this.__defaultShader},__initDisplayShader:function(a){return null!=a?(null==a.__context&&(a.__context=this.context3D,a.__init()),a):this.__defaultDisplayShader},__initGraphicsShader:function(a){return null!=a?(null==a.__context&&
(a.__context=this.context3D,a.__init()),a):this.__defaultGraphicsShader},__initShaderBuffer:function(a){return null!=a?this.__initGraphicsShader(a.shader):this.__defaultGraphicsShader},__popMask:function(){if(0!=this.__stencilReference){var a=this.__maskObjects.pop();1<this.__stencilReference?(this.context3D.setStencilActions(2,1,0,0,5),this.context3D.setStencilReferenceValue(this.__stencilReference,255,255),this.context3D.setColorMask(!1,!1,!1,!1),this.__renderMask(a),this.__stencilReference--,this.context3D.setStencilActions(2,
1,5,5,5),this.context3D.setStencilReferenceValue(this.__stencilReference,255,0),this.context3D.setColorMask(!0,!0,!0,!0)):(this.__stencilReference=0,this.context3D.setStencilActions(),this.context3D.setStencilReferenceValue(0,0,0))}},__popMaskObject:function(a,b){null==b&&(b=!0);null!=a.__mask&&this.__popMask();b&&null!=a.__scrollRect&&(0!=a.__renderTransform.b||0!=a.__renderTransform.c?(this.__scrollRectMasks.release(this.__maskObjects[this.__maskObjects.length-1]),this.__popMask()):this.__popMaskRect())},
__popMaskRect:function(){0<this.__numClipRects&&(this.__numClipRects--,0<this.__numClipRects?this.__scissorRect(this.__clipRects[this.__numClipRects-1]):this.__scissorRect())},__powerOfTwo:function(a){for(var b=1;b<a;)b<<=1;return b},__pushMask:function(a){0==this.__stencilReference&&(this.context3D.clear(0,0,0,0,0,0,4),this.__updatedStencil=!0);this.context3D.setStencilActions(2,1,2,5,5);this.context3D.setStencilReferenceValue(this.__stencilReference,255,255);this.context3D.setColorMask(!1,!1,!1,
!1);this.__renderMask(a);this.__maskObjects.push(a);this.__stencilReference++;this.context3D.setStencilActions(2,1,5,5,5);this.context3D.setStencilReferenceValue(this.__stencilReference,255,0);this.context3D.setColorMask(!0,!0,!0,!0)},__pushMaskObject:function(a,b){null==b&&(b=!0);b&&null!=a.__scrollRect&&(0!=a.__renderTransform.b||0!=a.__renderTransform.c?(b=this.__scrollRectMasks.get(),b.get_graphics().clear(),b.get_graphics().beginFill(65280),b.get_graphics().drawRect(a.__scrollRect.x,a.__scrollRect.y,
a.__scrollRect.width,a.__scrollRect.height),b.__renderTransform.copyFrom(a.__renderTransform),this.__pushMask(b)):this.__pushMaskRect(a.__scrollRect,a.__renderTransform));null!=a.__mask&&this.__pushMask(a.__mask)},__pushMaskRect:function(a,b){this.__numClipRects==this.__clipRects.length&&(this.__clipRects[this.__numClipRects]=new ia);var c=Ha.__pool.get();c.copyFrom(b);c.concat(this.__worldTransform);b=this.__clipRects[this.__numClipRects];a.__transform(b,c);0<this.__numClipRects&&(a=this.__clipRects[this.__numClipRects-
1],b.__contract(a.x,a.y,a.width,a.height));0>b.height&&(b.height=0);0>b.width&&(b.width=0);Ha.__pool.release(c);this.__scissorRect(b);this.__numClipRects++},__render:function(a){this.context3D.setColorMask(!0,!0,!0,!0);this.context3D.setCulling(3);this.context3D.setDepthTest(!1,0);this.context3D.setStencilActions();this.context3D.setStencilReferenceValue(0,0,0);this.context3D.setScissorRectangle(null);this.__blendMode=null;this.__setBlendMode(10);if(null==this.__defaultRenderTarget){if(zb.__scissorRectangle.setTo(this.__offsetX,
this.__offsetY,this.__displayWidth,this.__displayHeight),this.context3D.setScissorRectangle(zb.__scissorRectangle),this.__upscaled=1!=this.__worldTransform.a||1!=this.__worldTransform.d,null!=a&&null!=a.__type&&this.__renderDisplayObject(a),0<this.__offsetX||0<this.__offsetY)0<this.__offsetX&&(zb.__scissorRectangle.setTo(0,0,this.__offsetX,this.__height),this.context3D.setScissorRectangle(zb.__scissorRectangle),this.context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT),
zb.__scissorRectangle.setTo(this.__offsetX+this.__displayWidth,0,this.__width,this.__height),this.context3D.setScissorRectangle(zb.__scissorRectangle),this.context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT)),0<this.__offsetY&&(zb.__scissorRectangle.setTo(0,0,this.__width,this.__offsetY),this.context3D.setScissorRectangle(zb.__scissorRectangle),this.context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT),zb.__scissorRectangle.setTo(0,
this.__offsetY+this.__displayHeight,this.__width,this.__height),this.context3D.setScissorRectangle(zb.__scissorRectangle),this.context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT)),this.context3D.setScissorRectangle(null)}else{zb.__scissorRectangle.setTo(this.__offsetX,this.__offsetY,this.__displayWidth,this.__displayHeight);this.context3D.setScissorRectangle(zb.__scissorRectangle);var b=a.__mask,c=a.__scrollRect;a.__mask=null;a.__scrollRect=null;null!=a&&
(null!=a.__type?this.__renderDisplayObject(a):this.__renderBitmapData(a));a.__mask=b;a.__scrollRect=c}this.context3D.present()},__renderBitmap:function(a){this.__updateCacheBitmap(a,!1);null!=a.__bitmapData&&null!=a.__bitmapData.image&&(a.__imageVersion=a.__bitmapData.image.version);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){if(!(null==a.opaqueBackground&&null==a.__graphics||!a.__renderable||0>=a.__worldAlpha)){if(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){this.__setBlendMode(a.__worldBlendMode);
this.__pushMaskObject(a);var b=this.context3D,c=ia.__pool.get();c.setTo(0,0,a.get_width(),a.get_height());this.__pushMaskRect(c,a.__renderTransform);var d=a.opaqueBackground;b.clear((d>>>16&255)/255,(d>>>8&255)/255,(d&255)/255,1,0,0,1);this.__popMaskRect();this.__popMaskObject(a);ia.__pool.release(c)}null!=a.__graphics&&Kf.render(a,this)}jh.render(a,this)}else jh.render(a.__cacheBitmap,this)},__renderBitmapData:function(a){this.__setBlendMode(10);var b=this.__defaultDisplayShader;this.setShader(b);
this.applyBitmapData(a,this.__upscaled);this.applyMatrix(this.__getMatrix(a.__worldTransform,1));this.applyAlpha(a.__worldAlpha);this.applyColorTransform(a.__worldColorTransform);this.updateShader();var c=a.getVertexBuffer(this.context3D);null!=b.__position&&this.context3D.setVertexBufferAt(b.__position.index,c,0,3);null!=b.__textureCoord&&this.context3D.setVertexBufferAt(b.__textureCoord.index,c,3,2);a=a.getIndexBuffer(this.context3D);this.context3D.drawTriangles(a);this.__clearShader()},__renderDisplayObject:function(a){if(null!=
a&&null!=a.__type){switch(a.__type._hx_index){case 0:this.__renderBitmap(a);break;case 2:this.__renderDisplayObjectContainer(a);break;case 1:case 4:this.__renderShape(a);break;case 5:this.__renderSimpleButton(a);break;case 6:this.__renderTextField(a);break;case 7:this.__renderTilemap(a);break;case 8:this.__renderVideo(a)}if(null!=a.__customRenderEvent){var b=a.__customRenderEvent;b.allowSmoothing=this.__allowSmoothing;b.objectMatrix.copyFrom(a.__renderTransform);b.objectColorTransform.__copyFrom(a.__worldColorTransform);
b.renderer=this;this.__cleared||this.__clear();this.setShader(a.__worldShader);this.context3D.__flushGL();b.type="renderOpenGL";this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);a.dispatchEvent(b);this.__popMaskObject(a);this.setViewport()}}},__renderDisplayObjectContainer:function(a){for(var b=a.__removedChildren.iterator();b.hasNext();){var c=b.next();null==c.stage&&c.__cleanup()}a.__removedChildren.set_length(0);if(a.__renderable&&!(0>=a.__worldAlpha)){this.__updateCacheBitmap(a,
!1);if(null!=a.__cacheBitmap&&!a.__isCacheBitmapRender)jh.render(a.__cacheBitmap,this);else if(!(null==a.opaqueBackground&&null==a.__graphics||!a.__renderable||0>=a.__worldAlpha)){if(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);b=this.context3D;c=ia.__pool.get();c.setTo(0,0,a.get_width(),a.get_height());this.__pushMaskRect(c,a.__renderTransform);var d=a.opaqueBackground;b.clear((d>>>16&255)/
255,(d>>>8&255)/255,(d&255)/255,1,0,0,1);this.__popMaskRect();this.__popMaskObject(a);ia.__pool.release(c)}null!=a.__graphics&&Kf.render(a,this)}if(null==a.__cacheBitmap||a.__isCacheBitmapRender){if(0<a.__children.length)if(this.__pushMaskObject(a),null!=this.__stage){b=0;for(c=a.__children;b<c.length;)d=c[b],++b,this.__renderDisplayObject(d),d.__renderDirty=!1;a.__renderDirty=!1}else for(b=0,c=a.__children;b<c.length;)d=c[b],++b,this.__renderDisplayObject(d);0<a.__children.length&&this.__popMaskObject(a)}}},
__renderFilterPass:function(a,b,c,d){null==d&&(d=!0);if(null!=a&&null!=b&&null!=this.__defaultRenderTarget){var e=this.context3D.__state.renderToTexture,f=this.context3D.__state.renderToTextureDepthStencil,g=this.context3D.__state.renderToTextureAntiAlias,k=this.context3D.__state.renderToTextureSurfaceSelector;this.context3D.setRenderToTexture(this.__defaultRenderTarget.getTexture(this.context3D),!1);d&&this.context3D.clear(0,0,0,0,0,0,1);b=this.__initShader(b);this.setShader(b);this.applyAlpha(1);
this.applyBitmapData(a,c);this.applyColorTransform(null);this.applyMatrix(this.__getMatrix(a.__renderTransform,1));this.updateShader();c=a.getVertexBuffer(this.context3D);null!=b.__position&&this.context3D.setVertexBufferAt(b.__position.index,c,0,3);null!=b.__textureCoord&&this.context3D.setVertexBufferAt(b.__textureCoord.index,c,3,2);a=a.getIndexBuffer(this.context3D);this.context3D.drawTriangles(a);null!=e?this.context3D.setRenderToTexture(e,f,g,k):this.context3D.setRenderToBackBuffer();this.__clearShader()}},
__renderMask:function(a){if(null!=a)switch(a.__type._hx_index){case 0:jh.renderMask(a,this);break;case 2:for(var b=a.__removedChildren.iterator();b.hasNext();){var c=b.next();null==c.stage&&c.__cleanup()}a.__removedChildren.set_length(0);null!=a.__graphics&&Kf.renderMask(a,this);b=0;for(a=a.__children;b<a.length;)c=a[b],++b,this.__renderMask(c);break;case 3:break;case 5:this.__renderMask(a.__currentState);break;case 6:xl.renderMask(a,this);Kf.renderMask(a,this);break;case 7:if(null!=a.opaqueBackground||
null!=a.__graphics)null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&a.get_height(),null!=a.__graphics&&Kf.renderMask(a,this);la.renderMask(a,this);break;case 8:Ih.renderMask(a,this);break;default:null!=a.__graphics&&Kf.renderMask(a,this)}},__renderShape:function(a){this.__updateCacheBitmap(a,!1);if(null!=a.__cacheBitmap&&!a.__isCacheBitmapRender)jh.render(a.__cacheBitmap,this);else if(!(null==a.opaqueBackground&&null==a.__graphics||!a.__renderable||0>=a.__worldAlpha)){if(null!=
a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);var b=this.context3D,c=ia.__pool.get();c.setTo(0,0,a.get_width(),a.get_height());this.__pushMaskRect(c,a.__renderTransform);var d=a.opaqueBackground;b.clear((d>>>16&255)/255,(d>>>8&255)/255,(d&255)/255,1,0,0,1);this.__popMaskRect();this.__popMaskObject(a);ia.__pool.release(c)}null!=a.__graphics&&Kf.render(a,this)}},__renderSimpleButton:function(a){!a.__renderable||
0>=a.__worldAlpha||null==a.__currentState||(this.__pushMaskObject(a),this.__renderDisplayObject(a.__currentState),this.__popMaskObject(a))},__renderTextField:function(a){this.__updateCacheBitmap(a,a.__dirty);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){if(xl.render(a,this),!(null==a.opaqueBackground&&null==a.__graphics||!a.__renderable||0>=a.__worldAlpha)){if(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);
var b=this.context3D,c=ia.__pool.get();c.setTo(0,0,a.get_width(),a.get_height());this.__pushMaskRect(c,a.__renderTransform);var d=a.opaqueBackground;b.clear((d>>>16&255)/255,(d>>>8&255)/255,(d&255)/255,1,0,0,1);this.__popMaskRect();this.__popMaskObject(a);ia.__pool.release(c)}null!=a.__graphics&&Kf.render(a,this)}}else jh.render(a.__cacheBitmap,this)},__renderTilemap:function(a){this.__updateCacheBitmap(a,!1);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){if(!(null==a.opaqueBackground&&null==
a.__graphics||!a.__renderable||0>=a.__worldAlpha)){if(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);var b=this.context3D,c=ia.__pool.get();c.setTo(0,0,a.get_width(),a.get_height());this.__pushMaskRect(c,a.__renderTransform);var d=a.opaqueBackground;b.clear((d>>>16&255)/255,(d>>>8&255)/255,(d&255)/255,1,0,0,1);this.__popMaskRect();this.__popMaskObject(a);ia.__pool.release(c)}null!=a.__graphics&&
Kf.render(a,this)}la.render(a,this)}else jh.render(a.__cacheBitmap,this)},__renderVideo:function(a){Ih.render(a,this)},__resize:function(a,b){this.__width=a;this.__height=b;b=null==this.__defaultRenderTarget?this.__stage.stageWidth:this.__defaultRenderTarget.width;a=null==this.__defaultRenderTarget?this.__stage.stageHeight:this.__defaultRenderTarget.height;if(null==this.__defaultRenderTarget){var c=this.__worldTransform;c=Math.round(0*c.a+0*c.c+c.tx)}else c=0;this.__offsetX=c;null==this.__defaultRenderTarget?
(c=this.__worldTransform,c=Math.round(0*c.b+0*c.d+c.ty)):c=0;this.__offsetY=c;null==this.__defaultRenderTarget&&(c=this.__worldTransform,b=Math.round(b*c.a+0*c.c+c.tx-this.__offsetX));this.__displayWidth=b;null==this.__defaultRenderTarget&&(b=this.__worldTransform,a=Math.round(0*b.b+a*b.d+b.ty-this.__offsetY));this.__displayHeight=a;oa.createOrtho(this.__projection,0,this.__displayWidth+2*this.__offsetX,0,this.__displayHeight+2*this.__offsetY,-1E3,1E3);oa.createOrtho(this.__projectionFlipped,0,this.__displayWidth+
2*this.__offsetX,this.__displayHeight+2*this.__offsetY,0,-1E3,1E3)},__resumeClipAndMask:function(a){0<this.__stencilReference?(this.context3D.setStencilActions(2,1,5,5,5),this.context3D.setStencilReferenceValue(this.__stencilReference,255,0)):(this.context3D.setStencilActions(),this.context3D.setStencilReferenceValue(0,0,0));0<this.__numClipRects?this.__scissorRect(this.__clipRects[this.__numClipRects-1]):this.__scissorRect()},__scissorRect:function(a){if(null!=a){var b=Math.floor(a.x),c=Math.floor(a.y),
d=0<a.width?Math.ceil(a.get_right())-b:0;a=0<a.height?Math.ceil(a.get_bottom())-c:0;0>d&&(d=0);0>a&&(a=0);zb.__scissorRectangle.setTo(b,c,d,a);this.context3D.setScissorRectangle(zb.__scissorRectangle)}else this.context3D.setScissorRectangle(null)},__setBlendMode:function(a){null!=this.__overrideBlendMode&&(a=this.__overrideBlendMode);if(this.__blendMode!=a)switch(this.__blendMode=a,a){case 0:this.context3D.setBlendFactors(2,2);break;case 9:this.context3D.setBlendFactors(1,5);break;case 12:this.context3D.setBlendFactors(2,
6);break;case 14:this.context3D.setBlendFactors(2,2);this.context3D.__setGLBlendEquation(this.__gl.FUNC_REVERSE_SUBTRACT);break;default:this.context3D.setBlendFactors(2,5)}},__setRenderTarget:function(a){this.__defaultRenderTarget=a;this.__flipped=null==a;null!=a&&this.__resize(a.width,a.height)},__setShaderBuffer:function(a){this.setShader(a.shader);this.__currentShaderBuffer=a},__shouldCacheHardware:function(a,b){if(1==b)return!0;switch(a.__type._hx_index){case 2:if(null!=a.__filters)return!0;if(0==
b||null!=a.__graphics&&!Vc.isCompatible(a.__graphics))b=!1;if(null!=a.__children){var c=0;for(a=a.__children;c<a.length;){var d=a[c];++c;b=this.__shouldCacheHardware(d,b);if(1==b)return!0}}return b;case 6:return 1==b?!0:!1;case 7:return!0;default:return 1==b||null!=a.__filters?!0:0==b||null!=a.__graphics&&!Vc.isCompatible(a.__graphics)?!1:null}},__suspendClipAndMask:function(){0<this.__stencilReference&&(this.context3D.setStencilActions(),this.context3D.setStencilReferenceValue(0,0,0));0<this.__numClipRects&&
this.__scissorRect()},__updateCacheBitmap:function(a,b){if(a.__isCacheBitmapRender)return!1;var c=!1;if(a.get_cacheAsBitmap()){null==a.__cacheBitmapMatrix&&(a.__cacheBitmapMatrix=new Ha);var d=null!=a.__filters,e=null!=a.__cacheAsBitmapMatrix?a.__cacheAsBitmapMatrix:a.__renderTransform,f=Sb.__pool.get();f.__copyFrom(a.__worldColorTransform);null!=this.__worldColorTransform&&f.__combine(this.__worldColorTransform);var g=null==a.__cacheBitmap||a.__renderDirty&&(b||null!=a.__children&&0<a.__children.length)||
a.opaqueBackground!=a.__cacheBitmapBackground||null!=a.__graphics&&a.__graphics.__hardwareDirty;b=null;g||e.a==a.__cacheBitmapMatrix.a&&e.b==a.__cacheBitmapMatrix.b&&e.c==a.__cacheBitmapMatrix.c&&e.d==a.__cacheBitmapMatrix.d||(g=!0);if(d&&!g){c=0;for(var k=a.__filters;c<k.length;){var l=k[c];++c;if(l.__renderDirty){g=!0;break}}}c=g||!a.__cacheBitmap.__worldTransform.equals(a.__worldTransform);a.__cacheBitmapMatrix.copyFrom(e);a.__cacheBitmapMatrix.tx=0;var m=a.__cacheBitmapMatrix.ty=0,p=0,n=l=k=0,
h=0;if(c)if(b=ia.__pool.get(),a.__getFilterBounds(b,a.__cacheBitmapMatrix),k=Math.ceil(b.width),l=Math.ceil(b.height),n=0<b.x?Math.ceil(b.x):Math.floor(b.x),h=0<b.y?Math.ceil(b.y):Math.floor(b.y),null!=a.__cacheBitmapDataTexture)if(k>a.__cacheBitmapDataTexture.width||l>a.__cacheBitmapDataTexture.height){for(g=1;g<k;)g<<=1;m=g;for(g=1;g<l;)g<<=1;p=g;g=!0}else m=a.__cacheBitmapDataTexture.width,p=a.__cacheBitmapDataTexture.height;else{for(m=1;m<k;)m<<=1;for(var q=1;q<l;)q<<=1;p=q}if(g)if(c=!0,a.__cacheBitmapBackground=
a.opaqueBackground,.5<=k&&.5<=l){q=null!=a.opaqueBackground&&(m!=k||p!=l);var t=null!=a.opaqueBackground?-16777216|a.opaqueBackground:0;if(null==a.__cacheBitmapDataTexture||m>a.__cacheBitmapDataTexture.width||p>a.__cacheBitmapDataTexture.height)m=this.context3D.createRectangleTexture(m,p,1,!0),a.__cacheBitmapDataTexture=na.fromTexture(m);a.__cacheBitmapDataTexture.fillRect(b,0);q&&(b.setTo(0,0,k,l),a.__cacheBitmapDataTexture.fillRect(b,t))}else return Sb.__pool.release(f),a.__cacheBitmap=null,a.__cacheBitmapData=
null,a.__cacheBitmapDataTexture=null,!0;null==a.__cacheBitmap&&(a.__cacheBitmap=new Zc);a.__cacheBitmap.set_bitmapData(a.__cacheBitmapDataTexture);c&&(a.__cacheBitmap.__worldTransform.copyFrom(a.__worldTransform),e==a.__renderTransform?(a.__cacheBitmap.__renderTransform.identity(),a.__cacheBitmap.__renderTransform.tx=a.__renderTransform.tx+n,a.__cacheBitmap.__renderTransform.ty=a.__renderTransform.ty+h):(a.__cacheBitmap.__renderTransform.copyFrom(a.__cacheBitmapMatrix),a.__cacheBitmap.__renderTransform.invert(),
a.__cacheBitmap.__renderTransform.concat(a.__renderTransform),a.__cacheBitmap.__renderTransform.tx+=n,a.__cacheBitmap.__renderTransform.ty+=h));a.__cacheBitmap.smoothing=this.__allowSmoothing;a.__cacheBitmap.__renderable=a.__renderable;a.__cacheBitmap.__worldAlpha=a.__worldAlpha;a.__cacheBitmap.__worldBlendMode=a.__worldBlendMode;a.__cacheBitmap.__worldShader=a.__worldShader;a.__cacheBitmap.set_mask(a.__mask);if(g){e=zb.__childRendererPool.get();e.__init(this.context3D,a.__cacheBitmapDataTexture);
e.__stage=a.stage;e.__allowSmoothing=this.__allowSmoothing;e.__setBlendMode(10);e.__worldAlpha=1/a.__worldAlpha;e.__worldTransform.copyFrom(a.__renderTransform);e.__worldTransform.invert();e.__worldTransform.concat(a.__cacheBitmapMatrix);e.__worldTransform.tx-=n;e.__worldTransform.ty-=h;e.__worldColorTransform.__copyFrom(f);e.__worldColorTransform.__invert();a.__isCacheBitmapRender=!0;g=this.context3D.__state.renderToTexture;n=this.context3D.__state.renderToTextureDepthStencil;h=this.context3D.__state.renderToTextureAntiAlias;
m=this.context3D.__state.renderToTextureSurfaceSelector;q=this.__blendMode;this.__suspendClipAndMask();e.__copyShader(this);a.__cacheBitmapDataTexture.__setUVRect(this.context3D,0,0,k,l);e.__setRenderTarget(a.__cacheBitmapDataTexture);e.__drawBitmapData(a.__cacheBitmapDataTexture,a,null);if(d){var r=!1;d=0;for(t=a.__filters;d<t.length;)p=t[d],++d,p.__preserveObject&&(r=!0);d=na.__hardwareRenderer;na.__hardwareRenderer=e;t=this.context3D.__bitmapDataPool.get(k,l);p=this.context3D.__bitmapDataPool.get(k,
l);r=r?this.context3D.__bitmapDataPool.get(k,l):null;t.__setUVRect(this.context3D,0,0,k,l);p.__setUVRect(this.context3D,0,0,k,l);null!=r&&r.__setUVRect(this.context3D,0,0,k,l);e.__setBlendMode(10);e.__worldAlpha=1;e.__worldTransform.identity();e.__worldColorTransform.__identity();k=!0;l=0;for(var u=a.__filters;l<u.length;){var x=u[l];++l;x.__preserveObject&&(e.__setRenderTarget(r),e.__renderFilterPass(k?a.__cacheBitmapDataTexture:t,e.__defaultDisplayShader,x.__smooth));for(var v=0,w=x.__numShaderPasses;v<
w;){var C=v++;C=x.__initShader(e,C,x.__preserveObject?r:null);e.__setBlendMode(x.__shaderBlendMode);e.__setRenderTarget(p);e.__renderFilterPass(k?a.__cacheBitmapDataTexture:t,C,x.__smooth);k=!1;C=t;t=p;p=C}x.__renderDirty=!1}null!=t&&(a.__cacheBitmapDataTexture.fillRect(a.__cacheBitmapDataTexture.rect,0),e.__setRenderTarget(a.__cacheBitmapDataTexture),e.__renderFilterPass(t,e.__defaultDisplayShader,!0));this.context3D.__bitmapDataPool.release(t);this.context3D.__bitmapDataPool.release(p);null!=r&&
this.context3D.__bitmapDataPool.release(r);na.__hardwareRenderer=d}this.__blendMode=10;this.__setBlendMode(q);this.__copyShader(e);null!=g?this.context3D.setRenderToTexture(g,n,h,m):this.context3D.setRenderToBackBuffer();this.__resumeClipAndMask(e);this.setViewport();a.__isCacheBitmapRender=!1;zb.__childRendererPool.release(e)}c&&ia.__pool.release(b);Sb.__pool.release(f)}else null!=a.__cacheBitmap&&(a.__cacheBitmap=null,a.__cacheBitmapDataTexture=null,c=!0);return c},__updateShaderBuffer:function(a){null!=
this.__currentShader&&null!=this.__currentShaderBuffer&&this.__currentShader.__updateFromBuffer(this.__currentShaderBuffer,a)},__class__:zb});var Kf=function(){};h["openfl._internal.renderer.context3D.Context3DShape"]=Kf;Kf.__name__="openfl._internal.renderer.context3D.Context3DShape";Kf.render=function(a,b){if(a.__renderable&&!(0>=a.__worldAlpha)){var c=a.__graphics;if(null!=c){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);Vc.render(c,b);if(null!=c.__bitmap&&c.__visible){var d=b.context3D,
e=a.__worldScale9Grid,f=b.__initDisplayShader(a.__worldShader);b.setShader(f);b.applyBitmapData(c.__bitmap,!0);b.applyMatrix(b.__getMatrix(c.__worldTransform,1));b.applyAlpha(a.__worldAlpha);b.applyColorTransform(a.__worldColorTransform);b.updateShader();var g=c.__bitmap.getVertexBuffer(d,e,a);null!=f.__position&&d.setVertexBufferAt(f.__position.index,g,0,3);null!=f.__textureCoord&&d.setVertexBufferAt(f.__textureCoord.index,g,3,2);c=c.__bitmap.getIndexBuffer(d,e);d.drawTriangles(c);b.__clearShader()}b.__popMaskObject(a)}}};
Kf.renderMask=function(a,b){var c=a.__graphics;if(null!=c&&(Vc.renderMask(c,b),null!=c.__bitmap)){a=b.context3D;var d=b.__maskShader;b.setShader(d);b.applyBitmapData(c.__bitmap,!0);b.applyMatrix(b.__getMatrix(c.__worldTransform,1));b.updateShader();var e=c.__bitmap.getVertexBuffer(a);null!=d.__position&&a.setVertexBufferAt(d.__position.index,e,0,3);null!=d.__textureCoord&&a.setVertexBufferAt(d.__textureCoord.index,e,3,2);c=c.__bitmap.getIndexBuffer(a);a.drawTriangles(c);b.__clearShader()}};var yl=
function(){this.backBufferEnableDepthAndStencil=!1;this.blendDestinationAlphaFactor=9;this.blendSourceAlphaFactor=2;this.blendDestinationRGBFactor=9;this.blendSourceRGBFactor=2;this.colorMaskAlpha=this.colorMaskBlue=this.colorMaskGreen=this.colorMaskRed=!0;this.culling=3;this.depthCompareMode=4;this.depthMask=!0;this.samplerStates=[];this.scissorRectangle=new ia;this.stencilCompareMode=0;this.stencilPass=this.stencilFail=this.stencilDepthFail=5;this.stencilReadMask=255;this.stencilReferenceValue=
0;this.stencilTriangleFace=2;this.stencilWriteMask=255;this.textures=[];this.__frontFaceGLCCW=!0;this.__glBlendEquation=32774};h["openfl._internal.renderer.context3D.Context3DState"]=yl;yl.__name__="openfl._internal.renderer.context3D.Context3DState";yl.prototype={backBufferEnableDepthAndStencil:null,blendDestinationAlphaFactor:null,blendSourceAlphaFactor:null,blendDestinationRGBFactor:null,blendSourceRGBFactor:null,colorMaskRed:null,colorMaskGreen:null,colorMaskBlue:null,colorMaskAlpha:null,culling:null,
depthCompareMode:null,depthMask:null,program:null,renderToTexture:null,renderToTextureAntiAlias:null,renderToTextureDepthStencil:null,renderToTextureSurfaceSelector:null,samplerStates:null,scissorEnabled:null,scissorRectangle:null,stencilCompareMode:null,stencilDepthFail:null,stencilFail:null,stencilPass:null,stencilReadMask:null,stencilReferenceValue:null,stencilTriangleFace:null,stencilWriteMask:null,textures:null,shader:null,__currentGLArrayBuffer:null,__currentGLElementArrayBuffer:null,__currentGLFramebuffer:null,
__currentGLTexture2D:null,__currentGLTextureCubeMap:null,__enableGLBlend:null,__enableGLCullFace:null,__enableGLDepthTest:null,__enableGLScissorTest:null,__enableGLStencilTest:null,__frontFaceGLCCW:null,__glBlendEquation:null,__primaryGLFramebuffer:null,__rttDepthGLRenderbuffer:null,__rttGLFramebuffer:null,__rttGLRenderbuffer:null,__rttStencilGLRenderbuffer:null,__class__:yl};var xl=function(){};h["openfl._internal.renderer.context3D.Context3DTextField"]=xl;xl.__name__="openfl._internal.renderer.context3D.Context3DTextField";
xl.render=function(a,b){var c=b.__softwareRenderer,d=a.__textEngine,e=d.background||d.border?d.bounds:d.textBounds;b=a.__graphics;a.__dirty&&(a.__updateLayout(),null==b.__bounds&&(b.__bounds=new ia),b.__bounds.copyFrom(e));b.__update(c.__worldTransform);if(a.__dirty||b.__softwareDirty){var f=b.__width,g=b.__height;if(!(null!=d.text&&""!=d.text||d.background||d.border||d.__hasFocus||1==d.type&&d.selectable)||(0>=d.width||0>=d.height)&&2!=d.autoSize)a.__graphics.__canvas=null,a.__graphics.__context=
null,a.__graphics.__bitmap=null,a.__graphics.__softwareDirty=!1,a.__graphics.set___dirty(!1),a.__dirty=!1;else{null==a.__graphics.__canvas&&(a.__graphics.__canvas=window.document.createElement("canvas"),a.__graphics.__context=a.__graphics.__canvas.getContext("2d"));aa.context=b.__context;var k=b.__renderTransform;if(null!=c.__domRenderer){var l=c.pixelRatio;b.__canvas.width=f*l|0;b.__canvas.height=g*l|0;b.__canvas.style.width=f+"px";b.__canvas.style.height=g+"px";f=Ha.__pool.get();f.copyFrom(k);f.scale(l,
l);c.setTransform(f,aa.context);Ha.__pool.release(f)}else b.__canvas.width=f,b.__canvas.height=g,aa.context.setTransform(k.a,k.b,k.c,k.d,k.tx,k.ty);null==aa.clearRect&&(aa.clearRect="undefined"!==typeof navigator&&"undefined"!==typeof navigator.isCocoonJS);aa.clearRect&&aa.context.clearRect(0,0,b.__canvas.width,b.__canvas.height);if(null!=d.text&&""!=d.text||d.__hasFocus){k=d.text;b.__context.imageSmoothingEnabled=!c.__allowSmoothing||0==d.antiAliasType&&400==d.sharpness?!1:!0;if(d.border||d.background)aa.context.rect(.5,
.5,e.width-1,e.height-1),d.background&&(c=ba.hex(d.backgroundColor&16777215,6),aa.context.fillStyle="#"+c,aa.context.fill()),d.border&&(aa.context.lineWidth=1,c=ba.hex(d.borderColor&16777215,6),aa.context.strokeStyle="#"+c,aa.context.stroke());aa.context.textBaseline="alphabetic";aa.context.textAlign="start";c=-a.get_scrollH();f=l=0;for(g=a.get_scrollV()-1;f<g;){var m=f++;l-=d.lineHeights.get(m)}var p;for(f=d.layoutGroups.iterator();f.hasNext();)if(g=f.next(),!(g.lineIndex<a.get_scrollV()-1)){if(g.lineIndex>
d.get_bottomScrollV()-1)break;m="#"+ba.hex(g.format.color&16777215,6);aa.context.font=Zb.getFont(g.format);aa.context.fillStyle=m;aa.context.fillText(k.substring(g.startIndex,g.endIndex),g.offsetX+c-e.x,g.offsetY+g.ascent+l-e.y);if(-1<a.__caretIndex&&d.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&g.startIndex<=a.__caretIndex&&g.endIndex>=a.__caretIndex){for(var n=p=0,h=a.__caretIndex-g.startIndex;n<h;){var q=n++;if(g.positions.length<=q)break;p+=g.positions[q]}n=0;h=a.get_scrollV();
for(q=g.lineIndex+1;h<q;){var t=h++;n+=d.lineHeights.get(t-1)}aa.context.beginPath();h=ba.hex(g.format.color&16777215,6);aa.context.strokeStyle="#"+h;aa.context.moveTo(g.offsetX+p-a.get_scrollH()-e.x,n+2-e.y);aa.context.lineWidth=1;aa.context.lineTo(g.offsetX+p-a.get_scrollH()-e.x,n+Zb.getFormatHeight(a.get_defaultTextFormat())-1-e.y);aa.context.stroke();aa.context.closePath()}}else if(g.startIndex<=a.__caretIndex&&g.endIndex>=a.__caretIndex||g.startIndex<=a.__selectionIndex&&g.endIndex>=a.__selectionIndex||
g.startIndex>a.__caretIndex&&g.endIndex<a.__selectionIndex||g.startIndex>a.__selectionIndex&&g.endIndex<a.__caretIndex)p=Math.min(a.__selectionIndex,a.__caretIndex)|0,n=Math.max(a.__selectionIndex,a.__caretIndex)|0,g.startIndex>p&&(p=g.startIndex),g.endIndex<n&&(n=g.endIndex),q=a.getCharBoundaries(p),n>=g.endIndex?(h=a.getCharBoundaries(g.endIndex-1),h.x+=h.width+2):h=a.getCharBoundaries(n),null!=q&&null!=h&&(aa.context.fillStyle="#000000",aa.context.fillRect(q.x+c,q.y+l,h.x-q.x,g.height),aa.context.fillStyle=
"#FFFFFF",aa.context.fillText(k.substring(p,n),c+q.x,g.offsetY+g.ascent+l));g.format.underline&&(aa.context.beginPath(),aa.context.strokeStyle=m,aa.context.lineWidth=1,m=g.offsetX+c-e.x,p=Math.floor(g.offsetY+l+g.ascent-e.y)+.5,aa.context.moveTo(m,p),aa.context.lineTo(m+g.width,p),aa.context.stroke(),aa.context.closePath())}}else{if(d.border||d.background)d.border?aa.context.rect(.5,.5,e.width-1,e.height-1):aa.context.rect(0,0,e.width,e.height),d.background&&(e=ba.hex(d.backgroundColor&16777215,6),
aa.context.fillStyle="#"+e,aa.context.fill()),d.border&&(aa.context.lineWidth=1,aa.context.lineCap="square",e=ba.hex(d.borderColor&16777215,6),aa.context.strokeStyle="#"+e,aa.context.stroke());if(-1<a.__caretIndex&&d.selectable&&a.__showCursor){e=-a.get_scrollH();c=k=0;for(l=a.get_scrollV()-1;c<l;)f=c++,k+=d.lineHeights.get(f);aa.context.beginPath();d=ba.hex(a.get_defaultTextFormat().color&16777215,6);aa.context.strokeStyle="#"+d;aa.context.moveTo(e+2.5,k+2.5);aa.context.lineWidth=1;aa.context.lineTo(e+
2.5,k+Zb.getFormatHeight(a.get_defaultTextFormat())-1);aa.context.stroke();aa.context.closePath()}}b.__bitmap=na.fromCanvas(a.__graphics.__canvas);b.__visible=!0;a.__dirty=!1;b.__softwareDirty=!1;b.set___dirty(!1)}}a.__graphics.__hardwareDirty=!1};xl.renderMask=function(a,b){var c=b.__softwareRenderer,d=a.__textEngine,e=d.background||d.border?d.bounds:d.textBounds;b=a.__graphics;a.__dirty&&(a.__updateLayout(),null==b.__bounds&&(b.__bounds=new ia),b.__bounds.copyFrom(e));b.__update(c.__worldTransform);
if(a.__dirty||b.__softwareDirty){var f=b.__width,g=b.__height;if(!(null!=d.text&&""!=d.text||d.background||d.border||d.__hasFocus||1==d.type&&d.selectable)||(0>=d.width||0>=d.height)&&2!=d.autoSize)a.__graphics.__canvas=null,a.__graphics.__context=null,a.__graphics.__bitmap=null,a.__graphics.__softwareDirty=!1,a.__graphics.set___dirty(!1),a.__dirty=!1;else{null==a.__graphics.__canvas&&(a.__graphics.__canvas=window.document.createElement("canvas"),a.__graphics.__context=a.__graphics.__canvas.getContext("2d"));
aa.context=b.__context;var k=b.__renderTransform;if(null!=c.__domRenderer){var l=c.pixelRatio;b.__canvas.width=f*l|0;b.__canvas.height=g*l|0;b.__canvas.style.width=f+"px";b.__canvas.style.height=g+"px";f=Ha.__pool.get();f.copyFrom(k);f.scale(l,l);c.setTransform(f,aa.context);Ha.__pool.release(f)}else b.__canvas.width=f,b.__canvas.height=g,aa.context.setTransform(k.a,k.b,k.c,k.d,k.tx,k.ty);null==aa.clearRect&&(aa.clearRect="undefined"!==typeof navigator&&"undefined"!==typeof navigator.isCocoonJS);
aa.clearRect&&aa.context.clearRect(0,0,b.__canvas.width,b.__canvas.height);if(null!=d.text&&""!=d.text||d.__hasFocus){k=d.text;b.__context.imageSmoothingEnabled=!c.__allowSmoothing||0==d.antiAliasType&&400==d.sharpness?!1:!0;if(d.border||d.background)aa.context.rect(.5,.5,e.width-1,e.height-1),d.background&&(c=ba.hex(d.backgroundColor&16777215,6),aa.context.fillStyle="#"+c,aa.context.fill()),d.border&&(aa.context.lineWidth=1,c=ba.hex(d.borderColor&16777215,6),aa.context.strokeStyle="#"+c,aa.context.stroke());
aa.context.textBaseline="alphabetic";aa.context.textAlign="start";c=-a.get_scrollH();f=l=0;for(g=a.get_scrollV()-1;f<g;){var m=f++;l-=d.lineHeights.get(m)}var p;for(f=d.layoutGroups.iterator();f.hasNext();)if(g=f.next(),!(g.lineIndex<a.get_scrollV()-1)){if(g.lineIndex>d.get_bottomScrollV()-1)break;m="#"+ba.hex(g.format.color&16777215,6);aa.context.font=Zb.getFont(g.format);aa.context.fillStyle=m;aa.context.fillText(k.substring(g.startIndex,g.endIndex),g.offsetX+c-e.x,g.offsetY+g.ascent+l-e.y);if(-1<
a.__caretIndex&&d.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&g.startIndex<=a.__caretIndex&&g.endIndex>=a.__caretIndex){for(var n=p=0,h=a.__caretIndex-g.startIndex;n<h;){var q=n++;if(g.positions.length<=q)break;p+=g.positions[q]}n=0;h=a.get_scrollV();for(q=g.lineIndex+1;h<q;){var t=h++;n+=d.lineHeights.get(t-1)}aa.context.beginPath();h=ba.hex(g.format.color&16777215,6);aa.context.strokeStyle="#"+h;aa.context.moveTo(g.offsetX+p-a.get_scrollH()-e.x,n+2-e.y);aa.context.lineWidth=
1;aa.context.lineTo(g.offsetX+p-a.get_scrollH()-e.x,n+Zb.getFormatHeight(a.get_defaultTextFormat())-1-e.y);aa.context.stroke();aa.context.closePath()}}else if(g.startIndex<=a.__caretIndex&&g.endIndex>=a.__caretIndex||g.startIndex<=a.__selectionIndex&&g.endIndex>=a.__selectionIndex||g.startIndex>a.__caretIndex&&g.endIndex<a.__selectionIndex||g.startIndex>a.__selectionIndex&&g.endIndex<a.__caretIndex)p=Math.min(a.__selectionIndex,a.__caretIndex)|0,n=Math.max(a.__selectionIndex,a.__caretIndex)|0,g.startIndex>
p&&(p=g.startIndex),g.endIndex<n&&(n=g.endIndex),q=a.getCharBoundaries(p),n>=g.endIndex?(h=a.getCharBoundaries(g.endIndex-1),h.x+=h.width+2):h=a.getCharBoundaries(n),null!=q&&null!=h&&(aa.context.fillStyle="#000000",aa.context.fillRect(q.x+c,q.y+l,h.x-q.x,g.height),aa.context.fillStyle="#FFFFFF",aa.context.fillText(k.substring(p,n),c+q.x,g.offsetY+g.ascent+l));g.format.underline&&(aa.context.beginPath(),aa.context.strokeStyle=m,aa.context.lineWidth=1,m=g.offsetX+c-e.x,p=Math.floor(g.offsetY+l+g.ascent-
e.y)+.5,aa.context.moveTo(m,p),aa.context.lineTo(m+g.width,p),aa.context.stroke(),aa.context.closePath())}}else{if(d.border||d.background)d.border?aa.context.rect(.5,.5,e.width-1,e.height-1):aa.context.rect(0,0,e.width,e.height),d.background&&(e=ba.hex(d.backgroundColor&16777215,6),aa.context.fillStyle="#"+e,aa.context.fill()),d.border&&(aa.context.lineWidth=1,aa.context.lineCap="square",e=ba.hex(d.borderColor&16777215,6),aa.context.strokeStyle="#"+e,aa.context.stroke());if(-1<a.__caretIndex&&d.selectable&&
a.__showCursor){e=-a.get_scrollH();c=k=0;for(l=a.get_scrollV()-1;c<l;)f=c++,k+=d.lineHeights.get(f);aa.context.beginPath();d=ba.hex(a.get_defaultTextFormat().color&16777215,6);aa.context.strokeStyle="#"+d;aa.context.moveTo(e+2.5,k+2.5);aa.context.lineWidth=1;aa.context.lineTo(e+2.5,k+Zb.getFormatHeight(a.get_defaultTextFormat())-1);aa.context.stroke();aa.context.closePath()}}b.__bitmap=na.fromCanvas(a.__graphics.__canvas);b.__visible=!0;a.__dirty=!1;b.__softwareDirty=!1;b.set___dirty(!1)}}a.__graphics.__hardwareDirty=
!1};var la=function(){};h["openfl._internal.renderer.context3D.Context3DTilemap"]=la;la.__name__="openfl._internal.renderer.context3D.Context3DTilemap";la.buildBuffer=function(a,b){if(a.__renderable&&0!=a.__group.__tiles.length&&!(0>=a.__worldAlpha)){la.numTiles=0;la.vertexBufferData=null!=a.__buffer?a.__buffer.vertexBufferData:null;la.vertexDataPosition=0;var c=ia.__pool.get(),d=Ha.__pool.get(),e=Ha.__pool.get();la.dataPerVertex=4;a.tileAlphaEnabled&&la.dataPerVertex++;a.tileColorTransformEnabled&&
(la.dataPerVertex+=8);la.buildBufferTileContainer(a,a.__group,b,e,a.__tileset,a.tileAlphaEnabled,a.__worldAlpha,a.tileColorTransformEnabled,a.__worldColorTransform,null,c,d);a.__buffer.flushVertexBufferData();ia.__pool.release(c);Ha.__pool.release(d);Ha.__pool.release(e)}};la.buildBufferTileContainer=function(a,b,c,d,e,f,g,k,l,m,p,n){var h=Ha.__pool.get(),q=c.__roundPixels,t=b.__tiles;la.resizeBuffer(a,la.numTiles+b.__length);for(var r,u,x,v=null,w,z,C,J,Q,F,B,D,E,A,H,G=f?5:4,I=0;I<t.length;)if(J=
t[I],++I,h.setTo(1,0,0,1,-J.get_originX(),-J.get_originY()),h.concat(J.get_matrix()),h.concat(d),q&&(h.tx=Math.round(h.tx),h.ty=Math.round(h.ty)),r=null!=J.get_tileset()?J.get_tileset():e,u=J.get_alpha()*g,x=J.get_visible(),J.__dirty=!1,x&&!(0>=u))if(k&&(null!=J.get_colorTransform()?null==l?v=J.get_colorTransform():(null==la.cacheColorTransform&&(la.cacheColorTransform=new Sb),v=la.cacheColorTransform,v.redMultiplier=l.redMultiplier*J.get_colorTransform().redMultiplier,v.greenMultiplier=l.greenMultiplier*
J.get_colorTransform().greenMultiplier,v.blueMultiplier=l.blueMultiplier*J.get_colorTransform().blueMultiplier,v.alphaMultiplier=l.alphaMultiplier*J.get_colorTransform().alphaMultiplier,v.redOffset=l.redOffset+J.get_colorTransform().redOffset,v.greenOffset=l.greenOffset+J.get_colorTransform().greenOffset,v.blueOffset=l.blueOffset+J.get_colorTransform().blueOffset,v.alphaOffset=l.alphaOffset+J.get_colorTransform().alphaOffset):v=l),f||(u=1),0<J.__length)la.buildBufferTileContainer(a,J,c,h,r,f,u,k,
v,m,p,n);else if(null!=r&&(x=J.get_id(),w=r.__bitmapData,null!=w)){if(-1==x){z=J.__rect;if(null==z||0>=z.width||0>=z.height)continue;r=z.x/w.width;J=z.y/w.height;x=z.get_right()/w.width;Q=z.get_bottom()/w.height}else{w=r.__data[x];if(null==w)continue;p.setTo(w.x,w.y,w.width,w.height);z=p;r=w.__uvX;J=w.__uvY;x=w.__uvWidth;Q=w.__uvHeight}w=z.width;C=z.height;z=0*h.a+0*h.c+h.tx;F=0*h.b+0*h.d+h.ty;B=w*h.a+0*h.c+h.tx;D=w*h.b+0*h.d+h.ty;E=0*h.a+C*h.c+h.tx;A=0*h.b+C*h.d+h.ty;H=w*h.a+C*h.c+h.tx;C=w*h.b+C*
h.d+h.ty;w=la.vertexDataPosition;la.vertexBufferData[w]=z;la.vertexBufferData[w+1]=F;la.vertexBufferData[w+2]=r;la.vertexBufferData[w+3]=J;la.vertexBufferData[w+la.dataPerVertex]=B;la.vertexBufferData[w+la.dataPerVertex+1]=D;la.vertexBufferData[w+la.dataPerVertex+2]=x;la.vertexBufferData[w+la.dataPerVertex+3]=J;la.vertexBufferData[w+2*la.dataPerVertex]=E;la.vertexBufferData[w+2*la.dataPerVertex+1]=A;la.vertexBufferData[w+2*la.dataPerVertex+2]=r;la.vertexBufferData[w+2*la.dataPerVertex+3]=Q;la.vertexBufferData[w+
3*la.dataPerVertex]=H;la.vertexBufferData[w+3*la.dataPerVertex+1]=C;la.vertexBufferData[w+3*la.dataPerVertex+2]=x;la.vertexBufferData[w+3*la.dataPerVertex+3]=Q;f&&(la.vertexBufferData[w+0*la.dataPerVertex+4]=u,la.vertexBufferData[w+la.dataPerVertex+4]=u,la.vertexBufferData[w+2*la.dataPerVertex+4]=u,la.vertexBufferData[w+3*la.dataPerVertex+4]=u);if(k)if(null!=v)for(u=0;4>u;)r=u++,la.vertexBufferData[w+la.dataPerVertex*r+G]=v.redMultiplier,la.vertexBufferData[w+la.dataPerVertex*r+G+1]=v.greenMultiplier,
la.vertexBufferData[w+la.dataPerVertex*r+G+2]=v.blueMultiplier,la.vertexBufferData[w+la.dataPerVertex*r+G+3]=v.alphaMultiplier,la.vertexBufferData[w+la.dataPerVertex*r+G+4]=v.redOffset,la.vertexBufferData[w+la.dataPerVertex*r+G+5]=v.greenOffset,la.vertexBufferData[w+la.dataPerVertex*r+G+6]=v.blueOffset,la.vertexBufferData[w+la.dataPerVertex*r+G+7]=v.alphaOffset;else for(u=0;4>u;)r=u++,la.vertexBufferData[w+la.dataPerVertex*r+G]=1,la.vertexBufferData[w+la.dataPerVertex*r+G+1]=1,la.vertexBufferData[w+
la.dataPerVertex*r+G+2]=1,la.vertexBufferData[w+la.dataPerVertex*r+G+3]=1,la.vertexBufferData[w+la.dataPerVertex*r+G+4]=0,la.vertexBufferData[w+la.dataPerVertex*r+G+5]=0,la.vertexBufferData[w+la.dataPerVertex*r+G+6]=0,la.vertexBufferData[w+la.dataPerVertex*r+G+7]=0;la.vertexDataPosition+=4*la.dataPerVertex}b.__dirty=!1;Ha.__pool.release(h)};la.flush=function(a,b,c){null==la.currentShader&&(la.currentShader=b.__defaultDisplayShader);if(la.bufferPosition>la.lastFlushedPosition&&null!=la.currentBitmapData&&
null!=la.currentShader){var d=b.__initDisplayShader(la.currentShader);b.setShader(d);b.applyBitmapData(la.currentBitmapData,a.smoothing);b.applyMatrix(b.__getMatrix(a.__renderTransform,1));a.tileAlphaEnabled?b.useAlphaArray():b.applyAlpha(a.__worldAlpha);a.tileBlendModeEnabled&&b.__setBlendMode(c);a.tileColorTransformEnabled?(b.applyHasColorTransform(!0),b.useColorTransformArray()):b.applyColorTransform(a.__worldColorTransform);b.updateShader();c=a.__buffer.vertexBuffer;for(var e=la.lastFlushedPosition*
la.dataPerVertex*4,f;la.lastFlushedPosition<la.bufferPosition;){f=Math.min(la.bufferPosition-la.lastFlushedPosition,la.context.__quadIndexBufferElements)|0;if(0>=f)break;null!=d.__position&&la.context.setVertexBufferAt(d.__position.index,c,e,2);null!=d.__textureCoord&&la.context.setVertexBufferAt(d.__textureCoord.index,c,e+2,2);a.tileAlphaEnabled&&null!=d.__alpha&&la.context.setVertexBufferAt(d.__alpha.index,c,e+4,1);if(a.tileColorTransformEnabled){var g=a.tileAlphaEnabled?5:4;null!=d.__colorMultiplier&&
la.context.setVertexBufferAt(d.__colorMultiplier.index,c,e+g,4);null!=d.__colorOffset&&la.context.setVertexBufferAt(d.__colorOffset.index,c,e+g+4,4)}la.context.drawTriangles(la.context.__quadIndexBuffer,0,2*f);la.lastFlushedPosition+=f}b.__clearShader()}la.lastUsedBitmapData=la.currentBitmapData;la.lastUsedShader=la.currentShader};la.render=function(a,b){if(a.__renderable&&!(0>=a.__worldAlpha)&&(la.context=b.context3D,la.buildBuffer(a,b),0!=la.numTiles)){la.bufferPosition=0;la.lastFlushedPosition=
0;la.lastUsedBitmapData=null;la.lastUsedShader=null;la.currentBitmapData=null;la.currentShader=null;la.currentBlendMode=a.__worldBlendMode;a.tileBlendModeEnabled||b.__setBlendMode(la.currentBlendMode);b.__pushMaskObject(a);var c=ia.__pool.get();c.setTo(0,0,a.__width,a.__height);b.__pushMaskRect(c,a.__renderTransform);la.renderTileContainer(a,b,a.__group,a.__worldShader,a.__tileset,a.__worldAlpha,a.tileBlendModeEnabled,la.currentBlendMode,null);la.flush(a,b,la.currentBlendMode);b.__popMaskRect();b.__popMaskObject(a);
ia.__pool.release(c)}};la.renderTileContainer=function(a,b,c,d,e,f,g,k,l){c=c.__tiles;for(var m,p,n,h=null,q,t=0;t<c.length;){var r=c[t];++t;m=null!=r.get_tileset()?r.get_tileset():e;p=r.get_alpha()*f;if((n=r.get_visible())&&!(0>=p))if(n=null!=r.get_shader()?r.get_shader():d,g&&(h=null!=r.__blendMode?r.__blendMode:k),0<r.__length)la.renderTileContainer(a,b,r,n,m,p,g,h,l);else if(null!=m&&(q=r.get_id(),p=m.__bitmapData,null!=p)){if(-1==q){if(m=r.__rect,null==m||0>=m.width||0>=m.height)continue}else if(m=
m.__data[q],null==m)continue;(n!=la.currentShader||p!=la.currentBitmapData&&null!=la.currentBitmapData||la.currentBlendMode!=h)&&la.flush(a,b,la.currentBlendMode);la.currentBitmapData=p;la.currentShader=n;la.currentBlendMode=h;la.bufferPosition++}}};la.renderMask=function(a,b){};la.resizeBuffer=function(a,b){la.numTiles=b;null==a.__buffer?a.__buffer=new qi(la.context,mu.QUADS,la.numTiles,la.dataPerVertex):a.__buffer.resize(la.numTiles,la.dataPerVertex);la.vertexBufferData=a.__buffer.vertexBufferData};
var Ih=function(){};h["openfl._internal.renderer.context3D.Context3DVideo"]=Ih;Ih.__name__="openfl._internal.renderer.context3D.Context3DVideo";Ih.render=function(a,b){if(a.__renderable&&!(0>=a.__worldAlpha)&&null!=a.__stream&&null!=a.__stream.__video){var c=b.context3D,d=c.gl;if(null!=a.__getTexture(c)){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var e=b.__initDisplayShader(a.__worldShader);b.setShader(e);b.applyBitmapData(null,!0,!1);b.applyMatrix(b.__getMatrix(a.__renderTransform,
1));b.applyAlpha(a.__worldAlpha);b.applyColorTransform(a.__worldColorTransform);null!=e.__textureSize&&(Ih.__textureSizeValue[0]=null!=a.__stream?a.__stream.__video.videoWidth:0,Ih.__textureSizeValue[1]=null!=a.__stream?a.__stream.__video.videoHeight:0,e.__textureSize.value=Ih.__textureSizeValue);b.updateShader();c.setTextureAt(0,a.__getTexture(c));c.__flushGLTextures();d.uniform1i(e.__texture.index,0);a.smoothing?(d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,
d.TEXTURE_MIN_FILTER,d.LINEAR)):(d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.NEAREST),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.NEAREST));d=a.__getVertexBuffer(c);null!=e.__position&&c.setVertexBufferAt(e.__position.index,d,0,3);null!=e.__textureCoord&&c.setVertexBufferAt(e.__textureCoord.index,d,3,2);e=a.__getIndexBuffer(c);c.drawTriangles(e);b.__clearShader();b.__popMaskObject(a)}}};Ih.renderMask=function(a,b){if(null!=a.__stream&&null!=a.__stream.__video){var c=b.context3D,d=
b.__maskShader;b.setShader(d);b.applyBitmapData(Yi.opaqueBitmapData,!0);b.applyMatrix(b.__getMatrix(a.__renderTransform,1));b.updateShader();var e=a.__getVertexBuffer(c);null!=d.__position&&c.setVertexBufferAt(d.__position.index,e,0,3);null!=d.__textureCoord&&c.setVertexBufferAt(d.__textureCoord.index,e,3,2);a=a.__getIndexBuffer(c);c.drawTriangles(a);b.__clearShader()}};var ce=function(){};h["openfl._internal.renderer.dom.DOMBitmap"]=ce;ce.__name__="openfl._internal.renderer.dom.DOMBitmap";ce.clear=
function(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)};ce.render=function(a,b){null!=a.stage&&a.__worldVisible&&a.__renderable&&null!=a.__bitmapData&&a.__bitmapData.__isValid&&a.__bitmapData.readable?(b.__pushMaskObject(a),null!=a.__bitmapData.image.buffer.__srcImage?ce.renderImage(a,b):ce.renderCanvas(a,b),b.__popMaskObject(a)):ce.clear(a,b)};ce.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.__imageVersion=-1,b.__allowSmoothing&&a.smoothing||(a.__context.imageSmoothingEnabled=!1),b.__initializeElement(a,a.__canvas));a.__imageVersion!=a.__bitmapData.image.version&&(Ba.convertToCanvas(a.__bitmapData.image),a.__canvas.width=a.__bitmapData.width+1,a.__canvas.width=a.__bitmapData.width,a.__canvas.height=a.__bitmapData.height,
a.__context.drawImage(a.__bitmapData.image.buffer.__srcCanvas,0,0),a.__imageVersion=a.__bitmapData.image.version);b.__updateClip(a);b.__applyStyle(a,!0,!0,!0)};ce.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.crossOrigin="Anonymous",a.__image.src=a.__bitmapData.image.buffer.__srcImage.src,b.__initializeElement(a,a.__image));b.__updateClip(a);b.__applyStyle(a,!0,!0,!0)};var Jh=
function(){};h["openfl._internal.renderer.dom.DOMDisplayObject"]=Jh;Jh.__name__="openfl._internal.renderer.dom.DOMDisplayObject";Jh.clear=function(a,b){null!=a.__cacheBitmap&&ce.clear(a.__cacheBitmap,b);Se.clear(a,b)};Jh.render=function(a,b){null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&a.get_height();var c=a.__graphics;if(null!=a.stage&&a.__worldVisible&&a.__renderable&&null!=c){D.render(c,b.__canvasRenderer);if(c.__softwareDirty||a.__worldAlphaChanged||a.__canvas!=c.__canvas)null!=
c.__canvas?a.__canvas!=c.__canvas&&(null!=a.__canvas&&b.element.removeChild(a.__canvas),a.__canvas=c.__canvas,a.__context=c.__context,b.__initializeElement(a,a.__canvas)):Se.clear(a,b);if(null!=a.__canvas){b.__pushMaskObject(a);var d=a.__renderTransform;a.__renderTransform=c.__worldTransform;c.__transformDirty&&(c.__transformDirty=!1,a.__renderTransformChanged=!0);b.__updateClip(a);b.__applyStyle(a,!0,!0,!0);a.__renderTransform=d;b.__popMaskObject(a)}}else Se.clear(a,b)};var aj=function(a){this.pixelRatio=
1;jf.call(this);this.element=a};h["openfl.display.DOMRenderer"]=aj;aj.__name__="openfl.display.DOMRenderer";aj.__super__=jf;aj.prototype=w(jf.prototype,{element:null,pixelRatio:null,applyStyle:function(a,b){},clearStyle:function(a){},__clearBitmap:function(a){},__class__:aj});var zl=function(a){aj.call(this,a);sa.__supportDOM=!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.__vendorPrefix=a;this.__transformProperty="webkit"==a?"-webkit-transform":"transform";this.__transformOriginProperty="webkit"==a?"-webkit-transform-origin":"transform-origin";this.__clipRects=[];this.__colorTransform=new Sb;this.__z=this.__numClipRects=0;this.__type="dom";this.__canvasRenderer=new ih(null);this.__canvasRenderer.__domRenderer=this};h["openfl._internal.renderer.dom.DOMRenderer"]=zl;zl.__name__="openfl._internal.renderer.dom.DOMRenderer";
zl.__super__=aj;zl.prototype=w(aj.prototype,{__canvasRenderer:null,__clipRects:null,__colorTransform:null,__currentClipRect:null,__numClipRects:null,__transformOriginProperty:null,__transformProperty:null,__vendorPrefix:null,__z:null,applyStyle:function(a,b){null!=a&&null!=b&&(null!=a.__style&&b.parentElement==this.element||this.__initializeElement(a,b),a.__style=b.style,this.__updateClip(a),this.__applyStyle(a,!0,!0,!0))},clearStyle:function(a){null!=a&&a.parentElement==this.element&&this.element.removeChild(a)},
__applyStyle:function(a,b,c,d){var e=a.__style;if(b&&a.__renderTransformChanged){b=a.__renderTransform;var f=this.__roundPixels;null==f&&(f=!1);e.setProperty(this.__transformProperty,f?"matrix3d("+b.a+", "+b.b+", 0, 0, "+b.c+", "+b.d+", 0, 0, 0, 0, 1, 0, "+(b.tx|0)+", "+(b.ty|0)+", 0, 1)":"matrix3d("+b.a+", "+b.b+", 0, 0, "+b.c+", "+b.d+", 0, 0, 0, 0, 1, 0, "+b.tx+", "+b.ty+", 0, 1)",null)}a.__worldZ!=++this.__z&&(a.__worldZ=this.__z,e.setProperty("z-index",null==a.__worldZ?"null":""+a.__worldZ,null));
c&&a.__worldAlphaChanged&&(1>a.__worldAlpha?e.setProperty("opacity",null==a.__worldAlpha?"null":""+a.__worldAlpha,null):e.removeProperty("opacity"));d&&a.__worldClipChanged&&(null==a.__worldClip?e.removeProperty("clip"):(a=a.__worldClip,e.setProperty("clip","rect("+a.y+"px, "+a.get_right()+"px, "+a.get_bottom()+"px, "+a.x+"px)",null)))},__clearBitmap:function(a){Jh.clear(a,this);ce.clear(a,this)},__clearDisplayObject:function(a){if(null!=a&&null!=a.__type)switch(a.__type._hx_index){case 0:this.__clearBitmap(a);
break;case 2:this.__clearDisplayObjectContainer(a);break;case 3:this.__clearDOMElement(a);break;case 1:case 4:this.__clearShape(a);break;case 5:this.__clearSimpleButton(a);break;case 6:this.__clearTextField(a);break;case 7:this.__clearTilemap(a);break;case 8:this.__clearVideo(a)}},__clearDisplayObjectContainer:function(a){for(var b=a.__removedChildren.iterator();b.hasNext();){var c=b.next();null==c.stage&&this.__clearDisplayObject(c)}for(b=a.__removedChildren.iterator();b.hasNext();)c=b.next(),null==
c.stage&&c.__cleanup();a.__removedChildren.set_length(0);this.__clearShape(a);b=0;for(a=a.__children;b<a.length;)c=a[b],++b,this.__clearDisplayObject(c)},__clearDOMElement:function(a){Jh.clear(a,this)},__clearShape:function(a){Jh.clear(a,this)},__clearSimpleButton:function(a){for(var b=a.__previousStates.iterator();b.hasNext();){var c=b.next();this.__clearDisplayObject(c)}null!=a.__currentState&&this.__clearDisplayObject(a.__currentState)},__clearTextField:function(a){Jh.clear(a,this);xc.clear(a,
this)},__clearTilemap:function(a){Jh.clear(a,this);ak.clear(a,this)},__clearVideo:function(a){Jh.clear(a,this);bk.clear(a,this)},__getAlpha:function(a){return a*this.__worldAlpha},__getColorTransform:function(a){return null!=this.__worldColorTransform?(this.__colorTransform.__copyFrom(this.__worldColorTransform),this.__colorTransform.__combine(a),this.__colorTransform):a},__initializeElement:function(a,b){var c=a.__style=b.style;c.setProperty("position","absolute",null);c.setProperty("top","0",null);
c.setProperty("left","0",null);c.setProperty(this.__transformOriginProperty,"0 0 0",null);this.element.appendChild(b);a.__worldAlphaChanged=!0;a.__renderTransformChanged=!0;a.__worldVisibleChanged=!0;a.__worldClipChanged=!0;a.__worldClip=null;a.__worldZ=-1},__popMask:function(){this.__popMaskRect()},__popMaskObject:function(a,b){null==b&&(b=!0);null!=a.__mask&&this.__popMask();b&&null!=a.__scrollRect&&this.__popMaskRect()},__popMaskRect:function(){0<this.__numClipRects&&(this.__numClipRects--,this.__currentClipRect=
0<this.__numClipRects?this.__clipRects[this.__numClipRects-1]:null)},__pushMask:function(a){this.__pushMaskRect(a.getBounds(a),a.__renderTransform)},__pushMaskObject:function(a,b){null==b&&(b=!0);b&&null!=a.__scrollRect&&this.__pushMaskRect(a.__scrollRect,a.__renderTransform);null!=a.__mask&&this.__pushMask(a.__mask)},__pushMaskRect:function(a,b){this.__numClipRects==this.__clipRects.length&&(this.__clipRects[this.__numClipRects]=new ia);var c=this.__clipRects[this.__numClipRects];a.__transform(c,
b);0<this.__numClipRects&&(a=this.__clipRects[this.__numClipRects-1],c.__contract(a.x,a.y,a.width,a.height));0>c.height&&(c.height=0);0>c.width&&(c.width=0);this.__currentClipRect=c;this.__numClipRects++},__render:function(a){this.element.style.background=this.__stage.__transparent?"none":this.__stage.__colorString;this.__z=1;null!=a&&null!=a.__type&&this.__renderDisplayObject(a)},__renderBitmap:function(a){this.__canvasRenderer.__updateCacheBitmap(a,!1);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){null!=
a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&a.get_height();var b=a.__graphics;if(null!=a.stage&&a.__worldVisible&&a.__renderable&&null!=b){D.render(b,this.__canvasRenderer);if(b.__softwareDirty||a.__worldAlphaChanged||a.__canvas!=b.__canvas)null!=b.__canvas?a.__canvas!=b.__canvas&&(null!=a.__canvas&&this.element.removeChild(a.__canvas),a.__canvas=b.__canvas,a.__context=b.__context,this.__initializeElement(a,a.__canvas)):Se.clear(a,this);if(null!=a.__canvas){this.__pushMaskObject(a);
var c=a.__renderTransform;a.__renderTransform=b.__worldTransform;b.__transformDirty&&(b.__transformDirty=!1,a.__renderTransformChanged=!0);this.__updateClip(a);this.__applyStyle(a,!0,!0,!0);a.__renderTransform=c;this.__popMaskObject(a)}}else Se.clear(a,this)}else this.__clearBitmap(a),a.__cacheBitmap.stage=a.stage,a=a.__cacheBitmap;null!=a.stage&&a.__worldVisible&&a.__renderable&&null!=a.__bitmapData&&a.__bitmapData.__isValid&&a.__bitmapData.readable?(this.__pushMaskObject(a),null!=a.__bitmapData.image.buffer.__srcImage?
ce.renderImage(a,this):ce.renderCanvas(a,this),this.__popMaskObject(a)):ce.clear(a,this)},__renderDisplayObject:function(a){if(null!=a&&null!=a.__type){switch(a.__type._hx_index){case 0:this.__renderBitmap(a);break;case 2:this.__renderDisplayObjectContainer(a);break;case 3:this.__renderDOMElement(a);break;case 1:case 4:this.__renderShape(a);break;case 5:this.__renderSimpleButton(a);break;case 6:this.__renderTextField(a);break;case 7:this.__renderTilemap(a);break;case 8:this.__renderVideo(a)}if(null!=
a.__customRenderEvent){var b=a.__customRenderEvent;b.allowSmoothing=this.__allowSmoothing;b.objectMatrix.copyFrom(a.__renderTransform);b.objectColorTransform.__copyFrom(a.__worldColorTransform);b.renderer=this;b.type=null!=a.stage&&a.__worldVisible?"renderDOM":"clearDOM";this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);a.dispatchEvent(b);this.__popMaskObject(a)}}},__renderDisplayObjectContainer:function(a){for(var b=a.__removedChildren.iterator();b.hasNext();){var c=b.next();null==
c.stage&&this.__clearDisplayObject(c)}for(b=a.__removedChildren.iterator();b.hasNext();)c=b.next(),null==c.stage&&c.__cleanup();a.__removedChildren.set_length(0);this.__canvasRenderer.__updateCacheBitmap(a,!1);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&a.get_height();b=a.__graphics;if(null!=a.stage&&a.__worldVisible&&a.__renderable&&null!=b){D.render(b,this.__canvasRenderer);if(b.__softwareDirty||a.__worldAlphaChanged||a.__canvas!=
b.__canvas)null!=b.__canvas?a.__canvas!=b.__canvas&&(null!=a.__canvas&&this.element.removeChild(a.__canvas),a.__canvas=b.__canvas,a.__context=b.__context,this.__initializeElement(a,a.__canvas)):Se.clear(a,this);null!=a.__canvas&&(this.__pushMaskObject(a),c=a.__renderTransform,a.__renderTransform=b.__worldTransform,b.__transformDirty&&(b.__transformDirty=!1,a.__renderTransformChanged=!0),this.__updateClip(a),this.__applyStyle(a,!0,!0,!0),a.__renderTransform=c,this.__popMaskObject(a))}else Se.clear(a,
this);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){this.__pushMaskObject(a);if(null!=this.__stage){b=0;for(c=a.__children;b<c.length;){var d=c[b];++b;this.__renderDisplayObject(d);d.__renderDirty=!1}a.__renderDirty=!1}else for(b=0,c=a.__children;b<c.length;)d=c[b],++b,this.__renderDisplayObject(d);this.__popMaskObject(a)}}else this.__clearDisplayObjectContainer(a),a.__cacheBitmap.stage=a.stage,a=a.__cacheBitmap,null!=a.stage&&a.__worldVisible&&a.__renderable&&null!=a.__bitmapData&&a.__bitmapData.__isValid&&
a.__bitmapData.readable?(this.__pushMaskObject(a),null!=a.__bitmapData.image.buffer.__srcImage?ce.renderImage(a,this):ce.renderCanvas(a,this),this.__popMaskObject(a)):ce.clear(a,this)},__renderDOMElement:function(a){null!=a.stage&&a.__worldVisible&&a.__renderable?(a.__active||(this.__initializeElement(a,a.__element),a.__active=!0),this.__updateClip(a),this.__applyStyle(a,!0,!0,!0)):a.__active&&(this.element.removeChild(a.__element),a.__active=!1);null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&
0<a.get_width()&&a.get_height();var b=a.__graphics;if(null!=a.stage&&a.__worldVisible&&a.__renderable&&null!=b){D.render(b,this.__canvasRenderer);if(b.__softwareDirty||a.__worldAlphaChanged||a.__canvas!=b.__canvas)null!=b.__canvas?a.__canvas!=b.__canvas&&(null!=a.__canvas&&this.element.removeChild(a.__canvas),a.__canvas=b.__canvas,a.__context=b.__context,this.__initializeElement(a,a.__canvas)):Se.clear(a,this);if(null!=a.__canvas){this.__pushMaskObject(a);var c=a.__renderTransform;a.__renderTransform=
b.__worldTransform;b.__transformDirty&&(b.__transformDirty=!1,a.__renderTransformChanged=!0);this.__updateClip(a);this.__applyStyle(a,!0,!0,!0);a.__renderTransform=c;this.__popMaskObject(a)}}else Se.clear(a,this)},__renderShape:function(a){this.__canvasRenderer.__updateCacheBitmap(a,!1);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&a.get_height();var b=a.__graphics;if(null!=a.stage&&a.__worldVisible&&a.__renderable&&null!=b){D.render(b,
this.__canvasRenderer);if(b.__softwareDirty||a.__worldAlphaChanged||a.__canvas!=b.__canvas)null!=b.__canvas?a.__canvas!=b.__canvas&&(null!=a.__canvas&&this.element.removeChild(a.__canvas),a.__canvas=b.__canvas,a.__context=b.__context,this.__initializeElement(a,a.__canvas)):Se.clear(a,this);if(null!=a.__canvas){this.__pushMaskObject(a);var c=a.__renderTransform;a.__renderTransform=b.__worldTransform;b.__transformDirty&&(b.__transformDirty=!1,a.__renderTransformChanged=!0);this.__updateClip(a);this.__applyStyle(a,
!0,!0,!0);a.__renderTransform=c;this.__popMaskObject(a)}}else Se.clear(a,this)}else this.__clearShape(a),a.__cacheBitmap.stage=a.stage,a=a.__cacheBitmap,null!=a.stage&&a.__worldVisible&&a.__renderable&&null!=a.__bitmapData&&a.__bitmapData.__isValid&&a.__bitmapData.readable?(this.__pushMaskObject(a),null!=a.__bitmapData.image.buffer.__srcImage?ce.renderImage(a,this):ce.renderCanvas(a,this),this.__popMaskObject(a)):ce.clear(a,this)},__renderSimpleButton:function(a){this.__pushMaskObject(a);for(var b=
a.__previousStates.iterator();b.hasNext();){var c=b.next();this.__clearDisplayObject(c)}a.__previousStates.set_length(0);null!=a.__currentState&&(a.__currentState.stage!=a.stage&&a.__currentState.__setStageReference(a.stage),this.__renderDisplayObject(a.__currentState));this.__popMaskObject(a)},__renderTextField:function(a){a.__domRender=!0;this.__canvasRenderer.__updateCacheBitmap(a,a.__forceCachedBitmapUpdate);a.__forceCachedBitmapUpdate=!1;a.__domRender=!1;if(null==a.__cacheBitmap||a.__isCacheBitmapRender){a.__renderedOnCanvasWhileOnDOM&&
(a.__renderedOnCanvasWhileOnDOM=!1,a.__isHTML&&null!=a.__rawHtmlText&&(a.__updateText(a.__rawHtmlText),a.__dirty=!0,a.__layoutDirty=!0,a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty())));var b=a.__textEngine;if(null!=a.stage&&a.__worldVisible&&a.__renderable){if(a.__dirty||a.__renderTransformChanged||null==a.__div)if(""!=b.text||b.background||b.border||1==b.type){null==a.__div&&(a.__div=window.document.createElement("div"),this.__initializeElement(a,a.__div),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));b.wordWrap?a.__style.setProperty("word-wrap","break-word",null):a.__style.setProperty("white-space","nowrap",null);a.__style.setProperty("overflow","hidden",null);b.selectable?(a.__style.setProperty("cursor","text",null),a.__style.setProperty("-webkit-user-select","text",null),a.__style.setProperty("-moz-user-select","text",null),
a.__style.setProperty("-ms-user-select","text",null),a.__style.setProperty("-o-user-select","text",null)):a.__style.setProperty("cursor","inherit",null);a.__div.contentEditable=1==b.type;var c=a.__style;b.background?c.setProperty("background-color","#"+ba.hex(b.backgroundColor&16777215,6),null):c.removeProperty("background-color");var d=b.width,e=b.height,f=1,g=a.__textFormat.size,k=g,l=a.__renderTransform;if(1!=l.a||1!=l.d)l.a==l.d?(f=l.a,l.a=l.d=1):l.a>l.d?(f=l.a,l.d/=l.a,l.a=1):(f=l.d,l.a/=l.d,
l.d=1),k*=f,d=Math.ceil(d*f),e=Math.ceil(e*f);a.__textFormat.size=k;l=b.text;var m=0;if(a.__isHTML){for(var p=l;xc.__regexFont.match(p);){p=xc.__regexFont.matched(0);var n="";xc.__regexFace.match(p)&&(n+="font-family:'"+xc.__getAttributeMatch(xc.__regexFace)+"';");xc.__regexColor.match(p)&&(n+="color:#"+xc.__getAttributeMatch(xc.__regexColor)+";");if(xc.__regexSize.match(p)){m=xc.__getAttributeMatch(xc.__regexSize);var h=B.cca(m,0);m=parseFloat(m)*f;n+="font-size:"+(43==h||45==h?k+m:m)+"px;"}l=ba.replace(l,
p,"<span style='"+n+"'>");p=xc.__regexFont.matchedRight()}l=l.replace(xc.__regexCloseFont.r,"</span>")}else l=ba.htmlEscape(l);l=ba.replace(l,"<p ","<p style='margin-top:0; margin-bottom:0;' ");f=a.__textFormat.leading;a.__textFormat.leading+=m|0;k=l.replace(/\r\n/g,"<br>");a.__div.innerHTML=k;k=a.__div.innerHTML.replace(/\n/g,"<br>");a.__div.innerHTML=k;k=a.__div.innerHTML.replace(/\r/g,"<br>");a.__div.innerHTML=k;c.setProperty("font",Zb.getFont(a.__textFormat),null);a.__textFormat.size=g;a.__textFormat.leading=
f;c.setProperty("top","3px",null);b.border?(c.setProperty("border","solid 1px #"+ba.hex(b.borderColor&16777215,6),null),a.__renderTransform.translate(-1,-1),a.__renderTransformChanged=!0,a.__transformDirty=!0):""!=c.border&&(c.removeProperty("border"),a.__renderTransformChanged=!0);c.setProperty("color","#"+ba.hex(a.__textFormat.color&16777215,6),null);c.setProperty("width",d+"px",null);c.setProperty("height",e+"px",null);switch(a.__textFormat.align){case 0:c.setProperty("text-align","center",null);
break;case 4:c.setProperty("text-align","right",null);break;default:c.setProperty("text-align","left",null)}a.__dirty=!1}else null!=a.__div&&(this.element.removeChild(a.__div),a.__div=null);null!=a.__div&&(b=this.__roundPixels,this.__roundPixels=!0,this.__updateClip(a),this.__applyStyle(a,!0,!0,!0),this.__roundPixels=b)}else xc.clear(a,this)}else this.__clearTextField(a),a.__cacheBitmap.stage=a.stage,b=a.__cacheBitmap,null!=b.stage&&b.__worldVisible&&b.__renderable&&null!=b.__bitmapData&&b.__bitmapData.__isValid&&
b.__bitmapData.readable?(this.__pushMaskObject(b),null!=b.__bitmapData.image.buffer.__srcImage?ce.renderImage(b,this):ce.renderCanvas(b,this),this.__popMaskObject(b)):ce.clear(b,this)},__renderTilemap:function(a){this.__canvasRenderer.__updateCacheBitmap(a,!1);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&a.get_height();var b=a.__graphics;if(null!=a.stage&&a.__worldVisible&&a.__renderable&&null!=b){D.render(b,this.__canvasRenderer);
if(b.__softwareDirty||a.__worldAlphaChanged||a.__canvas!=b.__canvas)null!=b.__canvas?a.__canvas!=b.__canvas&&(null!=a.__canvas&&this.element.removeChild(a.__canvas),a.__canvas=b.__canvas,a.__context=b.__context,this.__initializeElement(a,a.__canvas)):Se.clear(a,this);if(null!=a.__canvas){this.__pushMaskObject(a);var c=a.__renderTransform;a.__renderTransform=b.__worldTransform;b.__transformDirty&&(b.__transformDirty=!1,a.__renderTransformChanged=!0);this.__updateClip(a);this.__applyStyle(a,!0,!0,!0);
a.__renderTransform=c;this.__popMaskObject(a)}}else Se.clear(a,this);if(null!=a.stage&&a.__worldVisible&&a.__renderable&&0<a.__group.__tiles.length){null==a.__canvas&&(a.__canvas=window.document.createElement("canvas"),a.__context=a.__canvas.getContext("2d"),this.__initializeElement(a,a.__canvas));a.__canvas.width=a.__width;a.__canvas.height=a.__height;this.__canvasRenderer.context=a.__context;b=this.__canvasRenderer;if(a.__renderable&&0!=a.__group.__tiles.length&&(c=b.__getAlpha(a.__worldAlpha),
!(0>=c))){var d=b.context;b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var e=ia.__pool.get();e.setTo(0,0,a.__width,a.__height);b.__pushMaskRect(e,a.__renderTransform);b.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=!1);pi.renderTileContainer(a.__group,b,a.__renderTransform,a.__tileset,b.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,c,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,e);b.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=!0);b.__popMaskRect();b.__popMaskObject(a);
ia.__pool.release(e)}this.__canvasRenderer.context=null;this.__updateClip(a);this.__applyStyle(a,!0,!1,!0)}else ak.clear(a,this)}else this.__clearTilemap(a),a.__cacheBitmap.stage=a.stage,a=a.__cacheBitmap,null!=a.stage&&a.__worldVisible&&a.__renderable&&null!=a.__bitmapData&&a.__bitmapData.__isValid&&a.__bitmapData.readable?(this.__pushMaskObject(a),null!=a.__bitmapData.image.buffer.__srcImage?ce.renderImage(a,this):ce.renderCanvas(a,this),this.__popMaskObject(a)):ce.clear(a,this)},__renderVideo:function(a){bk.render(a,
this)},__setBlendMode:function(a){null!=this.__overrideBlendMode&&(a=this.__overrideBlendMode);this.__blendMode!=a&&(this.__blendMode=a)},__updateCacheBitmap:function(a,b){var c=a.__cacheBitmap;(b=this.__canvasRenderer.__updateCacheBitmap(a,b))&&null!=c&&null==a.__cacheBitmap&&this.__clearBitmap(c);return b},__updateClip:function(a){if(null==this.__currentClipRect)a.__worldClipChanged=null!=a.__worldClip,a.__worldClip=null;else{null==a.__worldClip&&(a.__worldClip=new ia);var b=ia.__pool.get(),c=Ha.__pool.get();
c.copyFrom(a.__renderTransform);c.invert();this.__currentClipRect.__transform(b,c);b.equals(a.__worldClip)?a.__worldClipChanged=!1:(a.__worldClip.copyFrom(b),a.__worldClipChanged=!0);ia.__pool.release(b);Ha.__pool.release(c)}},__class__:zl});var Se=function(){};h["openfl._internal.renderer.dom.DOMShape"]=Se;Se.__name__="openfl._internal.renderer.dom.DOMShape";Se.clear=function(a,b){null!=a.__canvas&&(b.element.removeChild(a.__canvas),a.__canvas=null,a.__style=null)};Se.render=function(a,b){var c=
a.__graphics;if(null!=a.stage&&a.__worldVisible&&a.__renderable&&null!=c){D.render(c,b.__canvasRenderer);if(c.__softwareDirty||a.__worldAlphaChanged||a.__canvas!=c.__canvas)null!=c.__canvas?a.__canvas!=c.__canvas&&(null!=a.__canvas&&b.element.removeChild(a.__canvas),a.__canvas=c.__canvas,a.__context=c.__context,b.__initializeElement(a,a.__canvas)):Se.clear(a,b);if(null!=a.__canvas){b.__pushMaskObject(a);var d=a.__renderTransform;a.__renderTransform=c.__worldTransform;c.__transformDirty&&(c.__transformDirty=
!1,a.__renderTransformChanged=!0);b.__updateClip(a);b.__applyStyle(a,!0,!0,!0);a.__renderTransform=d;b.__popMaskObject(a)}}else Se.clear(a,b)};var xc=function(){};h["openfl._internal.renderer.dom.DOMTextField"]=xc;xc.__name__="openfl._internal.renderer.dom.DOMTextField";xc.clear=function(a,b){null!=a.__div&&(b.element.removeChild(a.__div),a.__div=null,a.__style=null)};xc.measureText=function(a){var b=a.__textEngine,c=a.__div;null==c&&(c=window.document.createElement("div"),c.innerHTML=b.text.replace(/\n/g,
"<br>"),c.style.setProperty("font",Zb.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=K.string(b.width-4)+"px");b.__measuredHeight=c.clientHeight;null==a.__div&&window.document.body.removeChild(c)};xc.render=function(a,b){var c=a.__textEngine;if(null!=a.stage&&a.__worldVisible&&a.__renderable){if(a.__dirty||a.__renderTransformChanged||
null==a.__div)if(""!=c.text||c.background||c.border||1==c.type){null==a.__div&&(a.__div=window.document.createElement("div"),b.__initializeElement(a,a.__div),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.wordWrap?a.__style.setProperty("word-wrap","break-word",null):a.__style.setProperty("white-space","nowrap",null);a.__style.setProperty("overflow",
"hidden",null);c.selectable?(a.__style.setProperty("cursor","text",null),a.__style.setProperty("-webkit-user-select","text",null),a.__style.setProperty("-moz-user-select","text",null),a.__style.setProperty("-ms-user-select","text",null),a.__style.setProperty("-o-user-select","text",null)):a.__style.setProperty("cursor","inherit",null);a.__div.contentEditable=1==c.type;var d=a.__style;c.background?d.setProperty("background-color","#"+ba.hex(c.backgroundColor&16777215,6),null):d.removeProperty("background-color");
var e=c.width,f=c.height,g=1,k=a.__textFormat.size,l=k,m=a.__renderTransform;if(1!=m.a||1!=m.d)m.a==m.d?(g=m.a,m.a=m.d=1):m.a>m.d?(g=m.a,m.d/=m.a,m.a=1):(g=m.d,m.a/=m.d,m.d=1),l*=g,e=Math.ceil(e*g),f=Math.ceil(f*g);a.__textFormat.size=l;m=c.text;var p=0;if(a.__isHTML){for(var n=m;xc.__regexFont.match(n);){n=xc.__regexFont.matched(0);var h="";xc.__regexFace.match(n)&&(h+="font-family:'"+xc.__getAttributeMatch(xc.__regexFace)+"';");xc.__regexColor.match(n)&&(h+="color:#"+xc.__getAttributeMatch(xc.__regexColor)+
";");if(xc.__regexSize.match(n)){p=xc.__getAttributeMatch(xc.__regexSize);var q=B.cca(p,0);p=parseFloat(p)*g;h+="font-size:"+(43==q||45==q?l+p:p)+"px;"}m=ba.replace(m,n,"<span style='"+h+"'>");n=xc.__regexFont.matchedRight()}m=m.replace(xc.__regexCloseFont.r,"</span>")}else m=ba.htmlEscape(m);m=ba.replace(m,"<p ","<p style='margin-top:0; margin-bottom:0;' ");g=a.__textFormat.leading;a.__textFormat.leading+=p|0;l=m.replace(/\r\n/g,"<br>");a.__div.innerHTML=l;l=a.__div.innerHTML.replace(/\n/g,"<br>");
a.__div.innerHTML=l;l=a.__div.innerHTML.replace(/\r/g,"<br>");a.__div.innerHTML=l;d.setProperty("font",Zb.getFont(a.__textFormat),null);a.__textFormat.size=k;a.__textFormat.leading=g;d.setProperty("top","3px",null);c.border?(d.setProperty("border","solid 1px #"+ba.hex(c.borderColor&16777215,6),null),a.__renderTransform.translate(-1,-1),a.__renderTransformChanged=!0,a.__transformDirty=!0):""!=d.border&&(d.removeProperty("border"),a.__renderTransformChanged=!0);d.setProperty("color","#"+ba.hex(a.__textFormat.color&
16777215,6),null);d.setProperty("width",e+"px",null);d.setProperty("height",f+"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&&(c=b.__roundPixels,b.__roundPixels=!0,b.__updateClip(a),b.__applyStyle(a,!0,!0,!0),b.__roundPixels=c)}else xc.clear(a,b)};xc.__getAttributeMatch=
function(a){return null!=a.matched(2)?a.matched(2):a.matched(3)};var ak=function(){};h["openfl._internal.renderer.dom.DOMTilemap"]=ak;ak.__name__="openfl._internal.renderer.dom.DOMTilemap";ak.clear=function(a,b){null!=a.__canvas&&(b.element.removeChild(a.__canvas),a.__canvas=null,a.__style=null)};ak.render=function(a,b){if(null!=a.stage&&a.__worldVisible&&a.__renderable&&0<a.__group.__tiles.length){null==a.__canvas&&(a.__canvas=window.document.createElement("canvas"),a.__context=a.__canvas.getContext("2d"),
b.__initializeElement(a,a.__canvas));a.__canvas.width=a.__width;a.__canvas.height=a.__height;b.__canvasRenderer.context=a.__context;var c=b.__canvasRenderer;if(a.__renderable&&0!=a.__group.__tiles.length){var d=c.__getAlpha(a.__worldAlpha);if(!(0>=d)){var e=c.context;c.__setBlendMode(a.__worldBlendMode);c.__pushMaskObject(a);var f=ia.__pool.get();f.setTo(0,0,a.__width,a.__height);c.__pushMaskRect(f,a.__renderTransform);c.__allowSmoothing&&a.smoothing||(e.imageSmoothingEnabled=!1);pi.renderTileContainer(a.__group,
c,a.__renderTransform,a.__tileset,c.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,d,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,f);c.__allowSmoothing&&a.smoothing||(e.imageSmoothingEnabled=!0);c.__popMaskRect();c.__popMaskObject(a);ia.__pool.release(f)}}b.__canvasRenderer.context=null;b.__updateClip(a);b.__applyStyle(a,!0,!1,!0)}else ak.clear(a,b)};var bk=function(){};h["openfl._internal.renderer.dom.DOMVideo"]=bk;bk.__name__="openfl._internal.renderer.dom.DOMVideo";bk.clear=function(a,
b){a.__active&&(b.element.removeChild(a.__stream.__video),a.__active=!1)};bk.render=function(a,b){null!=a.stage&&null!=a.__stream&&a.__worldVisible&&a.__renderable?(a.__active||(b.__initializeElement(a,a.__stream.__video),a.__active=!0,a.__dirty=!0),a.__dirty&&(a.__stream.__video.width=a.__width|0,a.__stream.__video.height=a.__height|0,a.__dirty=!1),b.__updateClip(a),b.__applyStyle(a,!0,!0,!0)):bk.clear(a,b)};var ri=function(){};h["openfl._internal.renderer.flash.FlashRenderer"]=ri;ri.__name__="openfl._internal.renderer.flash.FlashRenderer";
ri.register=function(a){null==ri.instances&&(ri.instances=Ke.toObjectMap(null,!0),$a.get_current().stage.addEventListener("enterFrame",ri.render,!1,-2147483648));ri.instances.set(a,!0)};ri.render=function(a){for(a=ri.instances.keys();a.hasNext();)a.next().__renderFlash()};var or=function(){};h["openfl._internal.renderer.flash.IDisplayObject"]=or;or.__name__="openfl._internal.renderer.flash.IDisplayObject";or.__isInterface__=!0;or.prototype={__renderFlash:null,__class__:or};var bj=function(){};h["openfl._internal.renderer.flash.FlashTilemap"]=
bj;bj.__name__="openfl._internal.renderer.flash.FlashTilemap";bj.render=function(a){};bj.renderTileContainer=function(a,b,c,d,e,f,g,k,l,m,p,n){};var wf=function(){};h["openfl._internal.symbols.SWFSymbol"]=wf;wf.__name__="openfl._internal.symbols.SWFSymbol";wf.prototype={className:null,id:null,__createObject:function(a){return null},__class__:wf};var eh=function(){};h["openfl._internal.symbols.BitmapSymbol"]=eh;eh.__name__="openfl._internal.symbols.BitmapSymbol";eh.__super__=wf;eh.prototype=w(wf.prototype,
{alpha:null,path:null,smooth:null,__createObject:function(a){return new Zc(na.fromImage(a.library.getImage(this.path)),1,0!=this.smooth)},__class__:eh});var pr=function(){};h["openfl._internal.symbols.ButtonSymbol"]=pr;pr.__name__="openfl._internal.symbols.ButtonSymbol";pr.__super__=wf;pr.prototype=w(wf.prototype,{downState:null,hitState:null,overState:null,upState:null,__createObject:function(a){var b=null;uf.__initSWF=a;uf.__initSymbol=this;null!=this.className&&(a=h[this.className],null!=a&&(b=
rb.createInstance(a,[])));null==b&&(b=new uf);return b},__class__:pr});var qr=function(){};h["openfl._internal.symbols.DynamicTextSymbol"]=qr;qr.__name__="openfl._internal.symbols.DynamicTextSymbol";qr.__super__=wf;qr.prototype=w(wf.prototype,{align:null,border:null,color:null,fontHeight:null,fontID:null,fontName:null,height:null,html:null,indent:null,input:null,leading:null,leftMargin:null,multiline:null,password:null,rightMargin:null,selectable:null,text:null,width:null,wordWrap:null,x:null,y:null,
__createObject:function(a){var b=new ge;b.__symbol=this;b.set_width(this.width);b.set_height(this.height);b.__offsetX=this.x;b.__offsetY=this.y;b.set_multiline(this.multiline);b.set_wordWrap(this.wordWrap);b.set_displayAsPassword(this.password);this.border&&(b.set_border(!0),b.set_background(!0));b.set_selectable(this.selectable);this.input&&b.set_type(1);var c=new Eg;null!=this.color&&(c.color=this.color&16777215);c.size=Math.round(this.fontHeight/20);a=a.symbols.h[this.fontID];null!=a&&(c.__ascent=
a.ascent/20/1024,c.__descent=a.descent/20/1024);c.font=this.fontName;a=!1;var d=c.font;if(null==d)a=!0;else switch(d){case "":case "_sans":case "_serif":case "_typewriter":a=!0;break;default:d=0;for(var e=tc.enumerateFonts();d<e.length;){var f=e[d];++d;if(f.name==c.font){a=!0;break}}}if(!a)for(d=/[^a-zA-Z]+/g,e=0,f=tc.enumerateFonts();e<f.length;){var g=f[e];++e;if(B.substr(g.name.replace(d,""),0,this.fontName.length)==this.fontName){c.font=g.name;a=!0;break}}a?b.set_embedFonts(!0):(a=c.font,d=ge.__missingFontWarning,
(null!=q[a]?d.existsReserved(a):d.h.hasOwnProperty(a))||(a=c.font,d=ge.__missingFontWarning,null!=q[a]?d.setReserved(a,!0):d.h[a]=!0,Ta.warn('Could not find required font "'+c.font+'", it has not been embedded',{fileName:"openfl/_internal/symbols/DynamicTextSymbol.hx",lineNumber:145,className:"openfl._internal.symbols.DynamicTextSymbol",methodName:"__createObject"})));null!=this.align&&("center"==this.align?c.align=0:"right"==this.align?c.align=4:"justify"==this.align&&(c.align=2),c.leftMargin=this.leftMargin/
20|0,c.rightMargin=this.rightMargin/20|0,c.indent=this.indent/20|0,c.leading=this.leading/20|0);b.set_defaultTextFormat(c);null!=this.text&&(this.html?b.set_htmlText(this.text):b.set_text(this.text));return b},__class__:qr});var rr=function(){};h["openfl._internal.symbols.FontSymbol"]=rr;rr.__name__="openfl._internal.symbols.FontSymbol";rr.__super__=wf;rr.prototype=w(wf.prototype,{advances:null,ascent:null,bold:null,codes:null,descent:null,glyphs:null,italic:null,leading:null,name:null,__class__:rr});
var sr=function(){};h["openfl._internal.symbols.ShapeSymbol"]=sr;sr.__name__="openfl._internal.symbols.ShapeSymbol";sr.__super__=wf;sr.prototype=w(wf.prototype,{commands:null,rendered:null,__createObject:function(a){var b=new Ue,c=b.get_graphics();if(null!=this.rendered)return c.copyFrom(this.rendered.get_graphics()),b;for(var d=0,e=this.commands;d<e.length;){var f=e[d];++d;switch(f._hx_index){case 0:var g=f.smooth,k=f.repeat,l=f.matrix;f=a.library.getImage(a.symbols.h[f.bitmap].path);null!=f&&c.beginBitmapFill(na.fromImage(f),
l,k,g);break;case 1:c.beginFill(f.color,f.alpha);break;case 2:c.beginGradientFill(f.fillType,f.colors,f.alphas,f.ratios,f.matrix,f.spreadMethod,f.interpolationMethod,f.focalPointRatio);break;case 3:c.curveTo(f.controlX,f.controlY,f.anchorX,f.anchorY);break;case 4:c.endFill();break;case 5:g=f.miterLimit;k=f.joints;l=f.caps;var m=f.scaleMode,p=f.pixelHinting,n=f.alpha,h=f.color;f=f.thickness;null!=f?c.lineStyle(f,h,n,p,m,l,k,g):c.lineStyle();break;case 6:c.lineTo(f.x,f.y);break;case 7:c.moveTo(f.x,
f.y)}}this.commands=null;this.rendered=new Ue;this.rendered.get_graphics().copyFrom(b.get_graphics());return b},__class__:sr});var ul=function(){this.frames=[]};h["openfl._internal.symbols.SpriteSymbol"]=ul;ul.__name__="openfl._internal.symbols.SpriteSymbol";ul.__super__=wf;ul.prototype=w(wf.prototype,{baseClassName:null,frames:null,scale9Grid:null,__createObject:function(a){ye.__initSWF=a;ye.__initSymbol=this;a=null;null!=this.className&&(a=h[this.className]);null==a&&null!=this.baseClassName&&(a=
h[this.baseClassName]);a=null!=a?rb.createInstance(a,[]):new ye;a.set_scale9Grid(this.scale9Grid);return a},__class__:ul});var tr=function(){};h["openfl._internal.symbols.StaticTextSymbol"]=tr;tr.__name__="openfl._internal.symbols.StaticTextSymbol";tr.__super__=wf;tr.prototype=w(wf.prototype,{matrix:null,records:null,rendered:null,__createObject:function(a){var b=new Ui,c=b.__graphics;if(null!=this.rendered)return b.text=this.rendered.text,c.copyFrom(this.rendered.__graphics),b;var d="";if(null!=
this.records)for(var e=null,f=16777215,g=this.matrix.tx,k=this.matrix.ty,l,m,p=0,n=this.records;p<n.length;){var h=n[p];++p;null!=h.fontID&&(e=a.symbols.h[h.fontID]);null!=h.offsetX&&(g=this.matrix.tx+.05*h.offsetX);null!=h.offsetY&&(k=this.matrix.ty+.05*h.offsetY);null!=h.color&&(f=h.color);if(null!=e){l=h.fontHeight/1024*.05;for(var q=0,t=h.glyphs.length;q<t;){var r=q++;m=h.glyphs[r];d+=String.fromCodePoint(e.codes[m]);var u=0;for(m=e.glyphs[m];u<m.length;){var x=m[u];++u;switch(x._hx_index){case 1:c.beginFill(f&
16777215,(f>>24&255)/255);break;case 3:c.curveTo(x.controlX*l+g,x.controlY*l+k,x.anchorX*l+g,x.anchorY*l+k);break;case 4:c.endFill();break;case 5:var v=x.miterLimit,w=x.joints,C=x.caps,J=x.scaleMode,Q=x.pixelHinting,F=x.alpha,B=x.color;x=x.thickness;null!=x?c.lineStyle(x,B,F,Q,J,C,w,v):c.lineStyle();break;case 6:c.lineTo(x.x*l+g,x.y*l+k);break;case 7:c.moveTo(x.x*l+g,x.y*l+k)}}g+=.05*h.advances[r]}}}b.text=d;this.records=null;this.rendered=new Ui;this.rendered.text=d;this.rendered.__graphics.copyFrom(b.__graphics);
return b},__class__:tr});var It=function(){};h["openfl._internal.symbols.StaticTextRecord"]=It;It.__name__="openfl._internal.symbols.StaticTextRecord";It.prototype={advances:null,color:null,fontHeight:null,fontID:null,glyphs:null,offsetX:null,offsetY:null,__class__:It};var Jt=function(){};h["openfl._internal.symbols.timeline.Frame"]=Jt;Jt.__name__="openfl._internal.symbols.timeline.Frame";Jt.prototype={label:null,objects:null,script:null,scriptSource:null,__class__:Jt};var Kt=function(){};h["openfl._internal.symbols.timeline.FrameObject"]=
Kt;Kt.__name__="openfl._internal.symbols.timeline.FrameObject";Kt.prototype={blendMode:null,cacheAsBitmap:null,clipDepth:null,colorTransform:null,depth:null,filters:null,id:null,matrix:null,name:null,symbol:null,type:null,visible:null,__class__:Kt};var vu=C["openfl._internal.symbols.timeline.FrameObjectType"]={__ename__:"openfl._internal.symbols.timeline.FrameObjectType",__constructs__:["CREATE","UPDATE","DESTROY"],CREATE:{_hx_index:0,__enum__:"openfl._internal.symbols.timeline.FrameObjectType",toString:u},
UPDATE:{_hx_index:1,__enum__:"openfl._internal.symbols.timeline.FrameObjectType",toString:u},DESTROY:{_hx_index:2,__enum__:"openfl._internal.symbols.timeline.FrameObjectType",toString:u}},ur=function(a,b,c){this.glyph=a;this.advance=b;this.offset=null!=c?c:new Gd};h["openfl._internal.text.GlyphPosition"]=ur;ur.__name__="openfl._internal.text.GlyphPosition";ur.prototype={advance:null,glyph:null,offset:null,__class__:ur};var Zb=function(a){this.textField=a;this.height=this.width=100;this.set_text("");
this.bounds=new ia(0,0,0,0);this.textBounds=new ia(0,0,0,0);this.type=0;this.autoSize=2;this.embedFonts=!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.numLines=1;this.scrollH=this.sharpness=0;this.set_scrollV(1);this.wordWrap=!1;this.lineAscents=Ua.toFloatVector(null);this.lineBreaks=Ua.toIntVector(null);this.lineDescents=Ua.toFloatVector(null);this.lineLeadings=Ua.toFloatVector(null);
this.lineHeights=Ua.toFloatVector(null);this.lineWidths=Ua.toFloatVector(null);this.layoutGroups=Ua.toObjectVector(null);this.textFormatRanges=Ua.toObjectVector(null);null==Zb.__context&&(Zb.__context=window.document.createElement("canvas").getContext("2d"))};h["openfl._internal.text.TextEngine"]=Zb;Zb.__name__="openfl._internal.text.TextEngine";Zb.findFont=function(a){var b=tc.__fontByName;return null!=q[a]?b.getReserved(a):b.h[a]};Zb.findFontVariant=function(a){var b=a.font,c=a.bold,d=a.italic;
null==b&&(b="_serif");a=ba.replace(ba.replace(b," Normal","")," Regular","");if(c&&d){var e=tc.__fontByName;var f=a+" Bold Italic";e=null!=q[f]?e.existsReserved(f):e.h.hasOwnProperty(f)}else e=!1;if(e)return Zb.findFont(a+" Bold Italic");c?(c=tc.__fontByName,e=a+" Bold",c=null!=q[e]?c.existsReserved(e):c.h.hasOwnProperty(e)):c=!1;if(c)return Zb.findFont(a+" Bold");d?(d=tc.__fontByName,c=a+" Italic",d=null!=q[c]?d.existsReserved(c):d.h.hasOwnProperty(c)):d=!1;return d?Zb.findFont(a+" Italic"):Zb.findFont(b)};
Zb.getFormatHeight=function(a){Zb.__context.font=Zb.getFont(a);var b=Zb.getFontInstance(a);if(null!=a.__ascent){var c=a.size*a.__ascent;b=a.size*a.__descent}else null!=b&&0!=b.unitsPerEM?(c=b.ascender/b.unitsPerEM*a.size,b=Math.abs(b.descender/b.unitsPerEM*a.size)):(c=a.size,b=.185*a.size);return c+b+a.leading};Zb.getFont=function(a){var b=a.font,c=a.bold,d=a.italic;null==b&&(b="_serif");var e=ba.replace(ba.replace(b," Normal","")," Regular","");if(c&&d){var f=tc.__fontByName;var g=e+" Bold Italic";
f=null!=q[g]?f.existsReserved(g):f.h.hasOwnProperty(g)}else f=!1;f?(b=e+" Bold Italic",d=c=!1):(c?(f=tc.__fontByName,g=e+" Bold",f=null!=q[g]?f.existsReserved(g):f.h.hasOwnProperty(g)):f=!1,f?(b=e+" Bold",c=!1):(d?(f=tc.__fontByName,g=e+" Italic",f=null!=q[g]?f.existsReserved(g):f.h.hasOwnProperty(g)):f=!1,f?(b=e+" Italic",d=!1):(c&&(-1<b.indexOf(" Bold ")||ba.endsWith(b," Bold"))&&(c=!1),d&&(-1<b.indexOf(" Italic ")||ba.endsWith(b," Italic"))&&(d=!1))));c=(d?"italic ":"normal ")+"normal "+(c?"bold ":
"normal ");c+=a.size+"px";c+="/"+(a.leading+a.size+3)+"px ";switch(b){case "_sans":a="sans-serif";break;case "_serif":a="serif";break;case "_typewriter":a="monospace";break;default:a="'"+b.replace(/^[\s'"]+(.*)[\s'"]+$/,"$1")+"'"}return c+=""+a};Zb.getFontInstance=function(a){return Zb.findFontVariant(a)};Zb.prototype={antiAliasType:null,autoSize:null,background:null,backgroundColor:null,border:null,borderColor:null,bottomScrollV:null,bounds:null,caretIndex:null,embedFonts:null,gridFitType:null,height:null,
layoutGroups:null,lineAscents:null,lineBreaks:null,lineDescents:null,lineLeadings:null,lineHeights:null,lineWidths:null,maxChars:null,maxScrollH:null,maxScrollV:null,multiline:null,numLines:null,restrict:null,scrollH:null,scrollV:null,selectable:null,sharpness:null,text:null,textBounds:null,textHeight:null,textFormatRanges:null,textWidth:null,type:null,width:null,wordWrap:null,textField:null,__cursorTimer:null,__hasFocus:null,__isKeyDown:null,__measuredHeight:null,__measuredWidth:null,__restrictRegexp:null,
__selectionStart:null,__showCursor:null,__textFormat:null,__textLayout:null,__texture:null,__useIntAdvances:null,__cairoFont:null,__font:null,createRestrictRegexp:function(a){var b="",c=[];0<(new Ca("\\^(.-.|.)","gu")).map(a,function(a){b+=a.matched(1);return""}).length&&c.push("[^"+a+"]");0<b.length&&c.push("["+b+"]");return new Ca("("+c.join("|")+")","g")},getBounds:function(){var a=this.border?1:0;this.bounds.width=this.width+a;this.bounds.height=this.height+a;for(var b=a=this.width,c=this.layoutGroups.iterator();c.hasNext();){var d=
c.next();d.offsetX<a&&(a=d.offsetX);d.offsetY<b&&(b=d.offsetY)}a>=this.width&&(a=2);b>=this.height&&(b=2);this.textBounds.setTo(Math.max(a-2,0),Math.max(b-2,0),Math.min(this.textWidth+4,this.bounds.width+4),Math.min(1.185*this.textHeight+4,this.bounds.height+4))},getLine:function(a){return 0>a||a>this.lineBreaks.get_length()+1?null:0==this.lineBreaks.get_length()?this.text:this.text.substring(0<a?this.lineBreaks.get(a-1):0,this.lineBreaks.get(a))},getLineBreakIndex:function(a){null==a&&(a=0);var b=
this.text.indexOf("\n",a);a=this.text.indexOf("\r",a);return-1==b?a:-1==a?b:b<a?b:a},getLineMeasurements:function(){this.lineAscents.set_length(0);this.lineDescents.set_length(0);this.lineLeadings.set_length(0);this.lineHeights.set_length(0);this.lineWidths.set_length(0);var a=0,b=0,c=null,d=0,e=0,f;this.textHeight=this.textWidth=0;this.numLines=1;this.maxScrollH=0;for(var g=this.layoutGroups.iterator();g.hasNext();){for(f=g.next();f.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++;a=Math.max(a,f.ascent);b=Math.max(b,f.descent);c=null==c?f.leading:Math.max(c,f.leading)|0;d=Math.max(d,f.height);e=f.offsetX-2+f.width;e>this.textWidth&&(this.textWidth=e);f=f.offsetY-2+f.ascent+f.descent;f>this.textHeight&&(this.textHeight=f)}0==this.textHeight&&null!=this.textField&&1==this.textField.get_type()&&(a=this.textField.__textFormat,b=Zb.getFontInstance(a),null!=a.__ascent?
(g=a.size*a.__ascent,f=a.size*a.__descent):null!=b&&0!=b.unitsPerEM?(g=b.ascender/b.unitsPerEM*a.size,f=Math.abs(b.descender/b.unitsPerEM*a.size)):(g=a.size,f=.185*a.size),c=a.leading,a=g,b=f,this.textHeight=g+f);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&&0<c&&(this.textHeight+=c);0<this.layoutGroups.get_length()&&(e=this.layoutGroups.get(this.layoutGroups.get_length()-1),null!=e&&e.startIndex==
e.endIndex&&(this.textHeight-=d));if(2!=this.autoSize)switch(this.autoSize){case 0:case 1:case 3:this.wordWrap||(this.width=this.textWidth+4),this.height=this.textHeight+4,this.bottomScrollV=this.numLines}this.maxScrollH=this.textWidth>this.width-4?this.textWidth-this.width+4|0:0;this.scrollH>this.maxScrollH&&(this.scrollH=this.maxScrollH)},getLayoutGroups:function(){var a=this;this.layoutGroups.set_length(0);if(null!=this.text&&""!=this.text){var b=-1,c=null,d=null,e=ge.__defaultTextFormat.clone(),
f=0,g=0,k=0,l=0,m=3,p=0,n=0,h=0,q=0,t=!0,r=null,u=null,x=0,v=0,w=0,C=-2,J=-1,Q=this.text.indexOf(" "),F=this.getLineBreakIndex(),D=0,E=0,A=0,G=0,H=function(b,c,d){var e=[];if(null==a.__useIntAdvances){var f=new Ca("Trident/7.0","");a.__useIntAdvances=f.match(window.navigator.userAgent)}if(a.__useIntAdvances){f=0;for(var g,k=c;k<d;)g=k++,g=Zb.__context.measureText(b.substring(c,g+1)).width,e.push(g-f),f=g}else for(;c<d;)f=c++,f<b.length-1?(k=Zb.__context.measureText(b.charAt(f+1)).width,f=Zb.__context.measureText(B.substr(b,
f,2)).width-k):f=Zb.__context.measureText(b.charAt(f)).width,e.push(f);return e},I=function(a){for(var b=0,c=0;c<a.length;){var d=a[c];++c;b+=d}return b},y=function(){return 2+h+p+(t?n:0)},K=function(){return a.width-2-q-y()},L=function(b,d){null==r||r.startIndex!=r.endIndex?(r=new To(c.format,b,d),a.layoutGroups.push(r)):(r.format=c.format,r.startIndex=b,r.endIndex=d)},M=function(){null!=e.__ascent?(g=e.size*e.__ascent,l=e.size*e.__descent):null!=d&&0!=d.unitsPerEM?(g=d.ascender/d.unitsPerEM*e.size,
l=Math.abs(d.descender/d.unitsPerEM*e.size)):(g=e.size,l=.185*e.size);f=e.leading;v=Math.ceil(g+l+f);v>w&&(w=v);g>k&&(k=g)},N=function(){t=!0;m=null!=e.align?e.align:3;p=null!=e.blockIndent?e.blockIndent:0;n=null!=e.indent?e.indent:0;h=null!=e.leftMargin?e.leftMargin:0;q=null!=e.rightMargin?e.rightMargin:0},P=function(){var f=a.textFormatRanges.get_length()-1;return b<f?(b+=1,c=a.textFormatRanges.get(b),e.__merge(c.format),Zb.__context.font=Zb.getFont(e),d=Zb.getFontInstance(e),!0):!1},S=function(d,
e){if(d>=e)u=[],x=0;else if(e<=c.end)u=H(a.text,d,e),x=I(u);else{var f=d;d=c.end;var g=0;u=[];for(x=0;;)if(f!=d&&(f=H(a.text,f,d),u=u.concat(f)),d!=e){if(!P()){Ta.warn("You found a bug in OpenFL's text code! Please save a copy of your project and contact Joshua Granick (@singmajesty) so we can fix this.",{fileName:"openfl/_internal/text/TextEngine.hx",lineNumber:1067,className:"openfl._internal.text.TextEngine",methodName:"getLayoutGroups"});break}f=d;d=e<c.end?e:c.end;++g}else{x=I(u);break}b-=g+
1;P()}},T=function(b){if(b<=c.end){u=H(a.text,A,b);x=I(u);L(A,b);r.positions=u;var d=y();r.offsetX=D+d;r.ascent=g;r.descent=l;r.leading=f;r.lineIndex=G;r.offsetY=E+2;r.width=x;r.height=v;D+=x;b==c.end&&(r=null,P(),M())}else for(;;){d=b<c.end?b:c.end;if(A!=d){u=H(a.text,A,d);x=I(u);L(A,d);r.positions=u;var e=y();r.offsetX=D+e;r.ascent=g;r.descent=l;r.leading=f;r.lineIndex=G;r.offsetY=E+2;r.width=x;r.height=v;D+=x;A=d}d==c.end&&(r=null);if(d==b)break;if(!P()){Ta.warn("You found a bug in OpenFL's text code! Please save a copy of your project and contact Joshua Granick (@singmajesty) so we can fix this.",
{fileName:"openfl/_internal/text/TextEngine.hx",lineNumber:1155,className:"openfl._internal.text.TextEngine",methodName:"getLayoutGroups"});break}M()}A=b},Pa=function(){M();for(var b=a.layoutGroups.get_length();-1<--b;){var c=a.layoutGroups.get(b);if(c.lineIndex<G)break;c.lineIndex>G||(c.ascent=k,c.height=w)}E+=w;w=k=0;G+=1;D=0;t=!1},da=function(b){if(4<=a.width&&a.wordWrap){var c=u,d,e,f;for(d=I(c);0<c.length&&D+d>K();){for(f=d=e=0;D+f<K();){var g=c[d];0==g?(++d,++e):(f+=g,++d)}if(d==e)d=e+1;else for(;1<
d&&D+f>K();)--d,0<d-e?(S(A,A+d-e),f=x):(d=1,e=0,S(A,A+1),f=0);c=A+d-e;T(c);Pa();S(c,b);c=u;d=x}}T(b)};P();N();M();for(var U,W=this.text.length+1;A<W;)if(-1<F&&(-1==Q||F<Q)){A<=F?(S(A,F),da(F),r=null):null!=r&&r.startIndex!=r.endIndex&&(r.endIndex==Q&&(r.width-=r.positions[r.positions.length-1]),r=null);Pa();if(c.end==F||c.end==F+1)P(),M();A=F+1;J=F;F=this.getLineBreakIndex(A);N()}else if(-1<Q)for(null!=r&&r.startIndex!=r.endIndex&&(r=null),U=!1;A<this.text.length;){var Aa=-1;-1==Q?Aa=F:(Aa=Q+1,-1<
F&&F<Aa&&(Aa=F));-1==Aa&&(Aa=this.text.length);S(A,Aa);if(2==m){if(0<u.length&&A==C){A+=1;var X=u.shift();x-=X;D+=X}0<u.length&&Aa==Q+1&&(--Aa,X=u.pop(),x-=X)}this.wordWrap&&D+x>K()&&(U=!0,0<u.length&&Aa==Q+1&&D+x-u[u.length-1]<=K()&&(U=!1));if(U){2!=m&&(null!=r||0<this.layoutGroups.get_length())&&(U=r,null==U&&(U=this.layoutGroups.get(this.layoutGroups.get_length()-1)),U.width-=U.positions[U.positions.length-1],U.endIndex--);U=this.layoutGroups.get_length()-1;for(X=0;;){r=this.layoutGroups.get(U);
if(0<U&&r.startIndex>C)++X;else break;--U}A==C+1&&Pa();D=0;if(0<X){U=this.layoutGroups.get(this.layoutGroups.get_length()-X).offsetX;X=this.layoutGroups.get_length()-X;for(var Z=this.layoutGroups.get_length();X<Z;){var Y=X++;r=this.layoutGroups.get(Y);r.offsetX-=U;r.offsetY=E+2;r.lineIndex=G;D+=r.width}}da(Aa);U=!1}else null!=r&&A==Q?(2!=m&&(r.endIndex=Q,r.positions=r.positions.concat(u),r.width+=x),D+=x,A=Aa):null==r||2==m?da(Aa):(X=Aa<c.end?Aa:c.end,X<Aa&&(u=H(this.text,A,X),x=I(u)),r.endIndex=
X,r.positions=r.positions.concat(u),r.width+=x,D+=x,X==c.end&&(r=null,P(),M(),A=X,X!=Aa&&T(Aa)),F==Aa&&++Aa,A=Aa,Aa==this.text.length&&Pa());Aa=this.text.indexOf(" ",A);F==C&&(r.endIndex=F,0>F-r.startIndex-r.positions.length&&r.positions.push(0),A=F+1);C=Q;Q=Aa;if(-1<F&&F<=A&&(Q>F||-1==Q)||A>this.text.length)break}else A<this.text.length&&(S(A,this.text.length),da(this.text.length),Pa()),A+=1;J==A-2&&-1<J&&(L(A,A),r.positions=[],r.ascent=g,r.descent=l,r.leading=f,r.lineIndex=G,r.offsetX=y(),r.offsetY=
E+2,r.width=0,r.height=v)}},restrictText:function(a){if(null==a)return a;null!=this.__restrictRegexp&&(a=this.__restrictRegexp.split(a).join(""));return a},setTextAlignment:function(){for(var a=-1,b=0,c=this.width-4,d,e,f=!1,g=0,k=this.layoutGroups.get_length();g<k;){var l=g++;d=this.layoutGroups.get(l);if(d.lineIndex!=a)switch(a=d.lineIndex,d.format.align){case 0:b=this.lineWidths.get(a)<c?Math.round((c-this.lineWidths.get(a))/2):0;break;case 2:if(this.lineWidths.get(a)<c){e=1;b=l+1;for(var m=this.layoutGroups.get_length();b<
m;){var p=b++;if(this.layoutGroups.get(p).lineIndex==a)0!=p&&32!=B.cca(this.text,this.layoutGroups.get(p).startIndex-1)||++e;else break}if(1<e&&(d=this.layoutGroups.get(l+e-1),b=B.cca(this.text,d.endIndex),d.endIndex<this.text.length&&10!=b&&13!=b))for(b=(c-this.lineWidths.get(a))/(e-1),f=!0,m=1;this.layoutGroups.get(l+m).offsetX+=b*m,++m<e;);}b=0;break;case 4:b=this.lineWidths.get(a)<c?Math.round(c-this.lineWidths.get(a)):0;break;default:b=0}0<b&&(d.offsetX+=b)}f&&this.getLineMeasurements()},trimText:function(a){if(null==
a)return a;0<this.maxChars&&a.length>this.maxChars&&(a=B.substr(a,0,this.maxChars));return a},update:function(){null==this.text||0==this.textFormatRanges.get_length()?(this.lineAscents.set_length(0),this.lineBreaks.set_length(0),this.lineDescents.set_length(0),this.lineLeadings.set_length(0),this.lineHeights.set_length(0),this.lineWidths.set_length(0),this.layoutGroups.set_length(0),this.textHeight=this.textWidth=0,this.numLines=1,this.maxScrollH=0,this.bottomScrollV=this.maxScrollV=1):(this.getLayoutGroups(),
this.getLineMeasurements(),this.setTextAlignment());this.getBounds()},get_bottomScrollV:function(){if(1==this.numLines||null==this.lineHeights)return 1;for(var a=0,b=this.lineHeights.get_length(),c=b-1,d=this.lineHeights.get_length();c<d;){var e=c++;if(a+this.lineHeights.get(e)<=this.height-4)a+=this.lineHeights.get(e);else{b=e;break}}return 1>b?1:b},get_maxScrollV:function(){if(1==this.numLines||null==this.lineHeights)return 1;var a=this.numLines-1,b=0;10==B.cca(this.text,this.text.length-1)&&--a;
for(var c=a;0<=a;)if(b+this.lineHeights.get(a)<=this.height-4)b+=this.lineHeights.get(a),--a;else break;a=a==c?this.numLines:a+2;return 1>a?1:a},set_restrict:function(a){if(this.restrict==a)return this.restrict;this.restrict=a;this.__restrictRegexp=null==this.restrict||0==this.restrict.length?null:this.createRestrictRegexp(a);return this.restrict},get_scrollV:function(){if(1==this.numLines||null==this.lineHeights)return 1;var a=this.get_maxScrollV();return this.scrollV>a?a:this.scrollV},set_scrollV:function(a){1>
a&&(a=1);return this.scrollV=a},set_text:function(a){return this.text=a},__class__:Zb,__properties__:{set_text:"set_text",set_scrollV:"set_scrollV",get_scrollV:"get_scrollV",set_restrict:"set_restrict",get_maxScrollV:"get_maxScrollV",get_bottomScrollV:"get_bottomScrollV"}};var Gh=function(a,b,c){this.format=a;this.start=b;this.end=c};h["openfl._internal.text.TextFormatRange"]=Gh;Gh.__name__="openfl._internal.text.TextFormatRange";Gh.prototype={end:null,format:null,start:null,__class__:Gh};var de=
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.letterSpacing=0;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;this.__create(this.__direction,this.__script,this.__language)};h["openfl._internal.text.TextLayout"]=de;de.__name__="openfl._internal.text.TextLayout";de.prototype={autoHint:null,font:null,glyphs:null,letterSpacing:null,positions:null,
size:null,text:null,__buffer:null,__direction:null,__dirty:null,__handle:null,__language:null,__script:null,__font:null,__hbBuffer:null,__hbFont:null,__create:function(a,b,c){4==c.length&&(this.__hbBuffer=Gc._new(),ll._new(c))},__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__:de,__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 Wf={};h["openfl._internal.text._TextLayout.TextDirection_Impl_"]=
Wf;Wf.__name__="openfl._internal.text._TextLayout.TextDirection_Impl_";Wf.__properties__={get_vertical:"get_vertical",get_horizontal:"get_horizontal",get_forward:"get_forward",get_backward:"get_backward"};Wf.reverse=function(a){};Wf.toString=function(a){switch(a){case 4:return"leftToRight";case 5:return"rightToLeft";case 6:return"topToBottom";case 7:return"bottomToTop";default:return""}};Wf.toHBDirection=function(a){switch(a){case 4:return 4;case 5:return 5;case 6:return 6;case 7:return 7;default:return 0}};
Wf.get_backward=function(a){return 5==(a&-3)};Wf.get_forward=function(a){return 4==(a&-3)};Wf.get_horizontal=function(a){return 4==(a&-2)};Wf.get_vertical=function(a){return 6==(a&-2)};var ya={};h["openfl._internal.text._TextLayout.TextScript_Impl_"]=ya;ya.__name__="openfl._internal.text._TextLayout.TextScript_Impl_";ya.__properties__={get_rightToLeft:"get_rightToLeft"};ya.toHBScript=function(a){return 1517910393};ya.get_rightToLeft=function(a){switch(a){case "Arab":case "Armi":case "Avst":case "Cprt":case "Hebr":case "Khar":case "Lydi":case "Mand":case "Nkoo":case "Orkh":case "Phli":case "Phlp":case "Phnx":case "Samr":case "Sarb":case "Syrc":case "Thaa":return!0;
default:return!1}};var To=function(a,b,c){this.format=a;this.startIndex=b;this.endIndex=c};h["openfl._internal.text.TextLayoutGroup"]=To;To.__name__="openfl._internal.text.TextLayoutGroup";To.prototype={ascent:null,descent:null,endIndex:null,format:null,height:null,leading:null,lineIndex:null,offsetX:null,offsetY:null,positions:null,startIndex:null,width:null,getAdvance:function(a){return this.positions[a]},__class__:To};var ck=function(a,b,c,d,e,f,g){null==g&&(g=.05);null==f&&(f=!1);this.stitch=
f;this.stitch_threshold=g;this.octaves=b;this.channels=c;this.grayscale=d;this.calculateOctaves(e)};h["openfl._internal.utils.AbstractNoise"]=ck;ck.__name__="openfl._internal.utils.AbstractNoise";ck.prototype={octaves:null,stitch:null,stitch_threshold:null,channels:null,grayscale:null,octaves_frequencies:null,octaves_persistences:null,persistence_max:null,fill:function(a,b,c,d){},stitching:function(a,b,c,d,e,f,g,k){var l=b>>16&255,m=b>>8&255;b&=255;if(g-e<c){var p=a.getPixel32(g-c,d),n=p>>8&255,h=
p&255;e=(g-c)/e;l=this.mixI(p>>16&255,l,e);m=this.mixI(n,m,e);b=this.mixI(h,b,e)}k-f<d&&(a=a.getPixel32(c,k-d),c=a>>8&255,e=a&255,d=(k-d)/f,l=this.mixI(a>>16&255,l,d),m=this.mixI(c,m,d),b=this.mixI(e,b,d));return-16777216|l<<16|m<<8|b},color:function(a,b,c){var d=0,e=0,f=0;null!=a&&(d=this.noiseToColor(a));null!=b&&(e=this.noiseToColor(b));null!=c&&(f=this.noiseToColor(c));return-16777216|d<<16|e<<8|f},noiseToColor:function(a){return 128*(a*this.persistence_max+1)|0},fade:function(a){return a*a*a*
(a*(6*a-15)+10)},mixI:function(a,b,c){return(1-c)*a+c*b|0},mix:function(a,b,c){return(1-c)*a+c*b},fastfloor:function(a){return 0<a?a|0:a-1|0},dot2d:function(a,b,c){return a[0]*b+a[1]*c},dot:function(a,b,c,d){return a[0]*b+a[1]*c+a[2]*d},calculateOctaves:function(a){this.octaves_frequencies=[];this.octaves_persistences=[];for(var b=this.persistence_max=0,c=this.octaves;b<c;){var d=b++;var e=Math.pow(2,d);d=Math.pow(a,d);this.persistence_max+=d;this.octaves_frequencies.push(e);this.octaves_persistences.push(d)}this.persistence_max=
1/this.persistence_max},__class__:ck};var Zi=function(a,b,c,d,e,f,g){null==g&&(g=.05);null==f&&(f=!1);ck.call(this,a,b,c,d,e,f,g);this.p_perm=[];for(b=0;512>b;)c=b++,this.p_perm[c]=Zi.P[c&255];this.base_factor=.03125;this.setSeed(a)};h["openfl._internal.utils.PerlinNoise"]=Zi;Zi.__name__="openfl._internal.utils.PerlinNoise";Zi.__super__=ck;Zi.prototype=w(ck.prototype,{p_perm:null,x_offset:null,y_offset:null,z_offset:null,base_factor:null,fill:function(a,b,c,d){var e=a.width,f=a.height,g=this.octaves,
k=this.octaves_frequencies,l=this.octaves_persistences,m=1==(1&this.channels),p=2==(2&this.channels),n=4==(4&this.channels),h=0;m&&++h;p&&++h;n&&++h;var q=this.grayscale,t=this.stitch_threshold*e|0,r=this.stitch_threshold*f|0,u=b*this.base_factor+this.x_offset;c=c*this.base_factor+this.y_offset;d=d*this.base_factor+this.z_offset;for(var x=0;x<f;){var v=x++;b=u;for(var w=0,C=e;w<C;){for(var J=w++,Q=0,F=0,B=0,D=0,A=g;D<A;){var E=D++,G=k[E];E=l[E];Q+=this.noise(b*G,c*G,d*G)*E;q||(1<h&&(F+=this.noise((b+
1)*G,(c+1)*G,d*G)*E),2<h&&(B+=this.noise((b+2)*G,(c+2)*G,d*G)*E))}D=0;q?D=this.color(Q,Q,Q):m&&p&&n?D=this.color(Q,F,B):m&&p?D=this.color(Q,F,null):m&&n?D=this.color(Q,null,F):p&&n?D=this.color(null,Q,F):m?D=this.color(Q,null,null):p?D=this.color(null,Q,null):n&&(D=this.color(null,null,Q));this.stitch&&(D=this.stitching(a,D,J,v,t,r,e,f));a.setPixel32(J,v,D);b+=this.base_factor}c+=this.base_factor}},noise:function(a,b,c){var d=a-a%1,e=b-b%1,f=c-c%1;a-=d;b-=e;c-=f;var g=(d|0)&255,k=(e|0)&255,l=(f|0)&
255;f=this.fade(a);e=this.fade(b);d=this.fade(c);var m=this.p_perm[g]+k,p=this.p_perm[m]+l;m=this.p_perm[m+1]+l;k=this.p_perm[g+1]+k;g=this.p_perm[k]+l;var n=this.p_perm[k+1]+l,h=a-1,q=b-1,t=c-1,r=this.p_perm[n+1]&15;l=(0==(r&1)?8>r?h:q:8>r?-h:-q)+(0==(r&2)?4>r?q:12==r?h:t:4>r?-q:14==r?-h:-t);r=this.p_perm[m+1]&15;k=(0==(r&1)?8>r?a:q:8>r?-a:-q)+(0==(r&2)?4>r?q:12==r?a:t:4>r?-q:14==r?-a:-t);r=this.p_perm[g+1]&15;var u=(0==(r&1)?8>r?h:b:8>r?-h:-b)+(0==(r&2)?4>r?b:12==r?h:t:4>r?-b:14==r?-h:-t);r=this.p_perm[p+
1]&15;t=(0==(r&1)?8>r?a:b:8>r?-a:-b)+(0==(r&2)?4>r?b:12==r?a:t:4>r?-b:14==r?-a:-t);r=this.p_perm[n]&15;n=(0==(r&1)?8>r?h:q:8>r?-h:-q)+(0==(r&2)?4>r?q:12==r?h:c:4>r?-q:14==r?-h:-c);r=this.p_perm[m]&15;m=(0==(r&1)?8>r?a:q:8>r?-a:-q)+(0==(r&2)?4>r?q:12==r?a:c:4>r?-q:14==r?-a:-c);r=this.p_perm[g]&15;g=(0==(r&1)?8>r?h:b:8>r?-h:-b)+(0==(r&2)?4>r?b:12==r?h:c:4>r?-b:14==r?-h:-c);r=this.p_perm[p]&15;a=(0==(r&1)?8>r?a:b:8>r?-a:-b)+(0==(r&2)?4>r?b:12==r?a:c:4>r?-b:14==r?-a:-c);t+=f*(u-t);a+=f*(g-a);a+=e*(m+
f*(n-m)-a);return a+d*(t+e*(k+f*(l-k)-t)-a)},setSeed:function(a){this.x_offset=a=16807*a%2147483647|0;this.y_offset=a=16807*a%2147483647|0;this.z_offset=16807*a%2147483647|0},__class__:Zi});var cj=function(){this.rollOutStack=[]};h["openfl._internal.utils.TouchData"]=cj;cj.__name__="openfl._internal.utils.TouchData";cj.prototype={rollOutStack:null,touch:null,touchDownTarget:null,touchOverTarget:null,reset:function(){this.touchOverTarget=this.touchDownTarget=this.touch=null;this.rollOutStack.splice(0,
this.rollOutStack.length)},__class__:cj};var Ak=function(){bf.call(this);null==Xc.application&&(Xc.application=this);null==Xc.current&&(Xc.current=new ye);Xc.current.__loaderInfo=Ig.create(null);Xc.current.__loaderInfo.content=Xc.current};h["openfl.display.Application"]=Ak;Ak.__name__="openfl.display.Application";Ak.__super__=bf;Ak.prototype=w(bf.prototype,{createWindow:function(a){var b=new Al(this,a);this.__windows.push(b);this.__windowByID.h[b.id]=b;var c=v(this,this.__onWindowClose);b.onClose.add(function(){c(b)},
!1,-1E4);null==this.__window&&(this.__window=b,b.onActivate.add(v(this,this.onWindowActivate)),b.onRenderContextLost.add(v(this,this.onRenderContextLost)),b.onRenderContextRestored.add(v(this,this.onRenderContextRestored)),b.onDeactivate.add(v(this,this.onWindowDeactivate)),b.onDropFile.add(v(this,this.onWindowDropFile)),b.onEnter.add(v(this,this.onWindowEnter)),b.onExpose.add(v(this,this.onWindowExpose)),b.onFocusIn.add(v(this,this.onWindowFocusIn)),b.onFocusOut.add(v(this,this.onWindowFocusOut)),
b.onFullscreen.add(v(this,this.onWindowFullscreen)),b.onKeyDown.add(v(this,this.onKeyDown)),b.onKeyUp.add(v(this,this.onKeyUp)),b.onLeave.add(v(this,this.onWindowLeave)),b.onMinimize.add(v(this,this.onWindowMinimize)),b.onMouseDown.add(v(this,this.onMouseDown)),b.onMouseMove.add(v(this,this.onMouseMove)),b.onMouseMoveRelative.add(v(this,this.onMouseMoveRelative)),b.onMouseUp.add(v(this,this.onMouseUp)),b.onMouseWheel.add(v(this,this.onMouseWheel)),b.onMove.add(v(this,this.onWindowMove)),b.onRender.add(v(this,
this.render)),b.onResize.add(v(this,this.onWindowResize)),b.onRestore.add(v(this,this.onWindowRestore)),b.onTextEdit.add(v(this,this.onTextEdit)),b.onTextInput.add(v(this,this.onTextInput)),this.onWindowCreate());this.onCreateWindow.dispatch(b);return b},__class__:Ak});var kf={};h["openfl.display._BlendMode.BlendMode_Impl_"]=kf;kf.__name__="openfl.display._BlendMode.BlendMode_Impl_";kf.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}};kf.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 oi={};h["openfl.display._CapsStyle.CapsStyle_Impl_"]=oi;oi.__name__="openfl.display._CapsStyle.CapsStyle_Impl_";oi.fromInt=function(a){return a};oi.fromString=function(a){switch(a){case "none":return 0;case "round":return 1;case "square":return 2;default:return null}};oi.toInt=function(a){return a};oi.toString=function(a){switch(a){case 0:return"none";
case 1:return"round";case 2:return"square";default:return null}};var Uo=function(a){sa.call(this);this.__element=a;this.__type=Ph.DOM_ELEMENT};h["openfl.display.DOMElement"]=Uo;Uo.__name__="openfl.display.DOMElement";Uo.__super__=sa;Uo.prototype=w(sa.prototype,{__active:null,__element:null,__class__:Uo});var Ro=function(a){null==this.__glFragmentSource&&(this.__glFragmentSource="varying float openfl_Alphav;\n\t\tvarying vec4 openfl_ColorMultiplierv;\n\t\tvarying vec4 openfl_ColorOffsetv;\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\tvec4 color = texture2D (openfl_Texture, openfl_TextureCoordv);\n\n\t\tif (color.a == 0.0) {\n\n\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\n\t\t} else if (openfl_HasColorTransform) {\n\n\t\t\tcolor = vec4 (color.rgb / color.a, color.a);\n\n\t\t\tmat4 colorMultiplier = mat4 (0);\n\t\t\tcolorMultiplier[0][0] = openfl_ColorMultiplierv.x;\n\t\t\tcolorMultiplier[1][1] = openfl_ColorMultiplierv.y;\n\t\t\tcolorMultiplier[2][2] = openfl_ColorMultiplierv.z;\n\t\t\tcolorMultiplier[3][3] = 1.0; // openfl_ColorMultiplierv.w;\n\n\t\t\tcolor = clamp (openfl_ColorOffsetv + (color * colorMultiplier), 0.0, 1.0);\n\n\t\t\tif (color.a > 0.0) {\n\n\t\t\t\tgl_FragColor = vec4 (color.rgb * color.a * openfl_Alphav, color.a * openfl_Alphav);\n\n\t\t\t} else {\n\n\t\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tgl_FragColor = color * openfl_Alphav;\n\n\t\t}\n\n\t\t}");
null==this.__glVertexSource&&(this.__glVertexSource="attribute float openfl_Alpha;\n\t\tattribute vec4 openfl_ColorMultiplier;\n\t\tattribute vec4 openfl_ColorOffset;\n\t\tattribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\n\t\tvarying float openfl_Alphav;\n\t\tvarying vec4 openfl_ColorMultiplierv;\n\t\tvarying vec4 openfl_ColorOffsetv;\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\topenfl_Alphav = openfl_Alpha;\n\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\n\t\tif (openfl_HasColorTransform) {\n\n\t\t\topenfl_ColorMultiplierv = openfl_ColorMultiplier;\n\t\t\topenfl_ColorOffsetv = openfl_ColorOffset / 255.0;\n\n\t\t}\n\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\t\t}");
ef.call(this,a);this.__isGenerated=!0;this.__initGL()};h["openfl.display.DisplayObjectShader"]=Ro;Ro.__name__="openfl.display.DisplayObjectShader";Ro.__super__=ef;Ro.prototype=w(ef.prototype,{openfl_Alpha:null,openfl_ColorMultiplier:null,openfl_ColorOffset:null,openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_HasColorTransform:null,openfl_TextureSize:null,openfl_Texture:null,__class__:Ro});var sl=function(a,b){A.call(this);this.__name=a;this.__frame=b};h["openfl.display.FrameLabel"]=
sl;sl.__name__="openfl.display.FrameLabel";sl.__super__=A;sl.prototype=w(A.prototype,{__frame:null,__name:null,get_frame:function(){return this.__frame},get_name:function(){return this.__name},__class__:sl,__properties__:{get_name:"get_name",get_frame:"get_frame"}});var dk={};h["openfl.display._GradientType.GradientType_Impl_"]=dk;dk.__name__="openfl.display._GradientType.GradientType_Impl_";dk.fromInt=function(a){return a};dk.fromString=function(a){switch(a){case "linear":return 0;case "radial":return 1;
default:return null}};dk.toInt=function(a){return a};dk.toString=function(a){switch(a){case 0:return"linear";case 1:return"radial";default:return null}};var nf=function(a){this.__dirty=!0;this.__owner=a;this.__commands=new df;this.__positionY=this.__positionX=this.__strokePadding=0;this.__renderTransform=new Ha;this.__usedShaderBuffers=new Sa;this.__worldTransform=new Ha;this.__height=this.__width=0;this.__shaderBufferPool=new Ma(function(){return new No});this.moveTo(0,0)};h["openfl.display.Graphics"]=
nf;nf.__name__="openfl.display.Graphics";nf.prototype={__bounds:null,__commands:null,__dirty:null,__hardwareDirty:null,__height:null,__managed:null,__positionX:null,__positionY:null,__quadBuffer:null,__renderTransform:null,__shaderBufferPool:null,__softwareDirty:null,__strokePadding:null,__transformDirty:null,__triangleIndexBuffer:null,__triangleIndexBufferCount:null,__triangleIndexBufferData:null,__usedShaderBuffers:null,__vertexBuffer:null,__vertexBufferCount:null,__vertexBufferCountUVT:null,__vertexBufferData:null,
__vertexBufferDataUVT:null,__vertexBufferUVT:null,__visible:null,__owner:null,__width:null,__worldTransform:null,__canvas:null,__context:null,__bitmap:null,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);if(null!=b&&0!=b.length){if(null==c){c=[];for(var l=0,m=b.length;l<m;)l++,c.push(1)}if(null==d)for(d=[],l=0,m=b.length;l<m;){var p=l++;d.push(Math.ceil(p/b.length*255))}if(!(c.length<b.length||d.length<b.length))for(this.__commands.beginGradientFill(a,b,c,d,e,f,g,k),a=0;a<c.length;)if(b=c[a],++a,0<b){this.__visible=!0;break}}},beginShaderFill:function(a,b){null!=a&&(b=this.__shaderBufferPool.get(),this.__usedShaderBuffers.add(b),b.update(a),this.__commands.beginShaderFill(b))},clear:function(){for(var a=
this.__usedShaderBuffers.h;null!=a;){var b=a.item;a=a.next;this.__shaderBufferPool.release(b)}this.__usedShaderBuffers.clear();this.__commands.clear();this.__strokePadding=0;null!=this.__bounds&&(this.set___dirty(!0),this.__transformDirty=!0,this.__bounds=null);this.__visible=!1;this.__positionY=this.__positionX=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=e,k=e;if(!(a<e&&a>this.__positionX||a>e&&a<this.__positionX)||!(c<e&&c>this.__positionX||c>e&&c<this.__positionX)){var l=2*this.__positionX-4*a+2*c,m=
a-this.__positionX,p=-this.__positionX+3*a+e-3*c,n=(-l+Math.sqrt(l*l-4*m*p))/(2*p);l=(-l-Math.sqrt(l*l-4*m*p))/(2*p);0<n&&1>n&&(g=this.__calculateBezierCubicPoint(n,this.__positionX,a,c,e));0<l&&1>l&&(k=this.__calculateBezierCubicPoint(l,this.__positionX,a,c,e))}l=n=f;if(!(b<f&&b>this.__positionX||b>f&&b<this.__positionX)||!(d<f&&d>this.__positionX||d>f&&d<this.__positionX)){p=2*this.__positionX-4*b+2*d;var h=b-this.__positionX,q=-this.__positionX+3*b+f-3*d;m=(-p+Math.sqrt(p*p-4*h*q))/(2*q);p=(-p-
Math.sqrt(p*p-4*h*q))/(2*q);0<m&&1>m&&(n=this.__calculateBezierCubicPoint(m,this.__positionX,b,d,f));0<p&&1>p&&(l=this.__calculateBezierCubicPoint(p,this.__positionX,b,d,f))}this.__inflateBounds(g-this.__strokePadding,n-this.__strokePadding);this.__inflateBounds(g+this.__strokePadding,n+this.__strokePadding);this.__inflateBounds(k-this.__strokePadding,l-this.__strokePadding);this.__inflateBounds(k+this.__strokePadding,l+this.__strokePadding);this.__positionX=e;this.__positionY=f;this.__inflateBounds(this.__positionX-
this.__strokePadding,this.__positionY-this.__strokePadding);this.__inflateBounds(this.__positionX+this.__strokePadding,this.__positionY+this.__strokePadding);this.__commands.cubicCurveTo(a,b,c,d,e,f);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=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);var 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.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.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.set___dirty(!0))},drawGraphicsData:function(a){for(a=a.iterator();a.hasNext();){var b=
a.next();switch(b.__graphicsDataType){case 0:if(null!=b.fill){var c=b.thickness;isNaN(c)&&(c=null);switch(b.fill.__graphicsFillType){case 0:var d=b.fill;this.lineStyle(c,d.color,d.alpha,b.pixelHinting,b.scaleMode,b.caps,b.joints,b.miterLimit);break;case 1:d=b.fill;this.lineStyle(c,0,1,b.pixelHinting,b.scaleMode,b.caps,b.joints,b.miterLimit);this.lineGradientStyle(d.type,d.colors,d.alphas,d.ratios,d.matrix,d.spreadMethod,d.interpolationMethod,d.focalPointRatio);break;case 2:d=b.fill,this.lineStyle(c,
0,1,b.pixelHinting,b.scaleMode,b.caps,b.joints,b.miterLimit),this.lineBitmapStyle(d.bitmapData,d.matrix,d.repeat,d.smooth)}}else this.lineStyle();break;case 1:d=b;this.beginFill(d.color,d.alpha);break;case 2:d=b;this.beginGradientFill(d.type,d.colors,d.alphas,d.ratios,d.matrix,d.spreadMethod,d.interpolationMethod,d.focalPointRatio);break;case 3:this.drawPath(b.commands,b.data,b.winding);break;case 4:d=b;this.beginBitmapFill(d.bitmapData,d.matrix,d.repeat,d.smooth);break;case 5:this.endFill();break;
case 6:this.drawQuads(b.rects,b.indices,b.transforms);break;case 7:this.drawTriangles(b.vertices,b.indices,b.uvtData,b.culling);break;case 8:this.beginShaderFill(b.shader,b.matrix)}}},drawPath:function(a,b,c){null==c&&(c=0);var d=0;1==c&&this.__commands.windingNonZero();a=a.iterator();a:for(;a.hasNext();)switch(a.next()){case 1:this.moveTo(b.get(d),b.get(d+1));d+=2;break;case 2:this.lineTo(b.get(d),b.get(d+1));d+=2;break;case 3:this.curveTo(b.get(d),b.get(d+1),b.get(d+2),b.get(d+3));d+=4;break;case 4:this.moveTo(b.get(d+
2),b.get(d+3));break a;case 5:this.lineTo(b.get(d+2),b.get(d+3));break a;case 6:this.cubicCurveTo(b.get(d),b.get(d+1),b.get(d+2),b.get(d+3),b.get(d+4),b.get(d+5)),d+=6}},drawQuads:function(a,b,c){if(null!=a){var d=null!=b,e=!1,f=!1,g=d?b.get_length():Math.floor(a.get_length()/4);if(0!=g){null!=c&&(c.get_length()>=6*g?f=e=!0:c.get_length()>=4*g?e=!0:c.get_length()>=2*g&&(f=!0));for(var k=ia.__pool.get(),l=Ha.__pool.get(),m=Infinity,p=Infinity,n=-Infinity,h=-Infinity,q,r=0;r<g;){var t=r++;q=d?4*b.get(t):
4*t;0>q||(k.setTo(0,0,a.get(q+2),a.get(q+3)),0>=k.width||0>=k.height||(e&&f?(q=6*t,l.setTo(c.get(q),c.get(q+1),c.get(q+2),c.get(q+3),c.get(q+4),c.get(q+5))):e?(q=4*t,l.setTo(c.get(q),c.get(q+1),c.get(q+2),c.get(q+3),k.x,k.y)):f?(q=2*t,l.tx=c.get(q),l.ty=c.get(q+1)):(l.tx=k.x,l.ty=k.y),k.__transform(k,l),m>k.x&&(m=k.x),p>k.y&&(p=k.y),n<k.get_right()&&(n=k.get_right()),h<k.get_bottom()&&(h=k.get_bottom())))}this.__inflateBounds(m,p);this.__inflateBounds(n,h);this.__commands.drawQuads(a,b,c);this.set___dirty(!0);
this.__visible=!0;ia.__pool.release(k);Ha.__pool.release(l)}}},drawRect:function(a,b,c,d){if(0!=c||0!=d){var e=0>c?-1:1,f=0>d?-1:1;this.__inflateBounds(a-this.__strokePadding*e,b-this.__strokePadding*f);this.__inflateBounds(a+c+this.__strokePadding*e,b+d+this.__strokePadding*f);this.__commands.drawRect(a,b,c,d);this.set___dirty(!0)}},drawRoundRect:function(a,b,c,d,e,f){if(0!=c||0!=d){var g=0>c?-1:1,k=0>d?-1:1;this.__inflateBounds(a-this.__strokePadding*g,b-this.__strokePadding*k);this.__inflateBounds(a+
c+this.__strokePadding*g,b+d+this.__strokePadding*k);this.__commands.drawRoundRect(a,b,c,d,e,f);this.set___dirty(!0)}},drawRoundRectComplex:function(a,b,c,d,e,f,g,k){if(!(0>=c||0>=d)){this.__inflateBounds(a-this.__strokePadding,b-this.__strokePadding);this.__inflateBounds(a+c+this.__strokePadding,b+d+this.__strokePadding);var l=a+c,m=b+d;c=c<d?2*c:2*d;e=e<c?e:c;f=f<c?f:c;g=g<c?g:c;k=k<c?k:c;c=1-Math.sin(Math.PI/180*45);d=1-Math.tan(Math.PI/180*22.5);var p=k*c,n=k*d;this.moveTo(l,m-k);this.curveTo(l,
m-n,l-p,m-p);this.curveTo(l-n,m,l-k,m);p=g*c;n=g*d;this.lineTo(a+g,m);this.curveTo(a+n,m,a+p,m-p);this.curveTo(a,m-n,a,m-g);p=e*c;n=e*d;this.lineTo(a,b+e);this.curveTo(a,b+n,a+p,b+p);this.curveTo(a+n,b,a+e,b);p=f*c;n=f*d;this.lineTo(l-f,b);this.curveTo(l-n,b,l-p,b+p);this.curveTo(l,b+n,l,b+f);this.lineTo(l,m-k);this.set___dirty(!0)}},drawTriangles:function(a,b,c,d){null==d&&(d=1);if(null!=a&&0!=a.get_length()){var e=a.get_length()/2|0;if(null==b){if(0!=e%3)throw new E(new zi("Not enough vertices to close a triangle."));
b=Ua.toIntVector(null);for(var f=0;f<e;){var g=f++;b.push(g)}}null==d&&(d=1);for(var k,l=g=Infinity,m=-Infinity,p=-Infinity,n=0;n<e;)k=n++,f=a.get(2*k),k=a.get(2*k+1),g>f&&(g=f),l>k&&(l=k),m<f&&(m=f),p<k&&(p=k);this.__inflateBounds(g,l);this.__inflateBounds(m,p);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){isFinite(a)&&isFinite(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.set___dirty(!0))},moveTo:function(a,
b){this.__positionX=a;this.__positionY=b;this.__commands.moveTo(a,b)},overrideBlendMode:function(a){null==a&&(a=10);this.__commands.overrideBlendMode(a)},readGraphicsData:function(a){null==a&&(a=!0);var b=Ua.toObjectVector(null);this.__owner.__readGraphicsData(b,a);return 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},__cleanup:function(){null!=this.__bounds&&
null!=this.__canvas&&(this.set___dirty(!0),this.__transformDirty=!0);this.__context=this.__canvas=this.__bitmap=null},__getBounds:function(a,b){if(null!=this.__bounds){var c=ia.__pool.get();this.__bounds.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);ia.__pool.release(c)}},__hitTest:function(a,b,c,d){if(null==this.__bounds)return!1;var e=d.a*d.d-d.b*d.c;e=0==e?-d.tx:1/e*(d.c*(d.ty-b)+d.d*(a-d.tx));var f=d.a*d.d-d.b*d.c;a=0==f?-d.ty:1/f*(d.a*(b-d.ty)+d.b*(d.tx-a));return e>this.__bounds.x&&
a>this.__bounds.y&&this.__bounds.contains(e,a)?c?D.hitTest(this,e,a):!0:!1},__inflateBounds:function(a,b){null==this.__bounds?(this.__bounds=new ia(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))},__readGraphicsData:function(a){for(var b=new xg(this.__commands),c=null,d,e=this.__commands.types,f=0,g=this.__commands.get_length();f<g;){d=f++;d=e[d];switch(d._hx_index){case 4:case 5:case 6:case 7:case 9:case 10:case 17:case 18:null==c&&(c=new ek);break;default:null!=c&&(a.push(c),c=null)}switch(d._hx_index){case 0:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=
1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.BEGIN_BITMAP_FILL;d=b;a.push(new Vo(d.buffer.o[d.oPos],
d.buffer.o[d.oPos+1],d.buffer.b[d.bPos],d.buffer.b[d.bPos+1]));break;case 1:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=
2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.BEGIN_FILL;d=b;a.push(new Bl(d.buffer.i[d.iPos],1));break;case 2:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=
4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.BEGIN_GRADIENT_FILL;d=b;a.push(new Wo(d.buffer.o[d.oPos],d.buffer.ii[d.iiPos],d.buffer.ff[d.ffPos],d.buffer.ii[d.iiPos+1],d.buffer.o[d.oPos+1],d.buffer.o[d.oPos+
2],d.buffer.o[d.oPos+3],d.buffer.f[d.fPos]));break;case 3:break;case 4:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=
1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.CUBIC_CURVE_TO;d=b;c.cubicCurveTo(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3],d.buffer.f[d.fPos+4],d.buffer.f[d.fPos+5]);break;case 5:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=
1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.CURVE_TO;d=b;c.curveTo(d.buffer.f[d.fPos],d.buffer.f[d.fPos+
1],d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3]);break;case 6:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=
1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.DRAW_CIRCLE;d=b;c.__drawCircle(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+2]);break;case 7:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;
case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.DRAW_ELLIPSE;d=b;c.__drawEllipse(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3]);break;case 9:switch(b.prev._hx_index){case 0:b.oPos+=
2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=
2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.DRAW_RECT;d=b;c.__drawRect(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3]);break;case 10:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=
5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.DRAW_ROUND_RECT;d=b;c.__drawRoundRect(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1],d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3],d.buffer.f[d.fPos+4],null!=d.buffer.o[d.oPos]?d.buffer.o[d.oPos]:d.buffer.f[d.fPos+4]);break;case 13:switch(b.prev._hx_index){case 0:b.oPos+=
2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=
2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.END_FILL;a.push(new Xo);break;case 14:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=
4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.LINE_BITMAP_STYLE;c=null;break;case 15:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=
3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.LINE_GRADIENT_STYLE;break;case 16:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=
1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.LINE_STYLE;var k=b;d=new Yo(k.buffer.o[k.oPos],
k.buffer.b[k.bPos],k.buffer.o[k.oPos+1],k.buffer.o[k.oPos+2],k.buffer.o[k.oPos+3],k.buffer.f[k.fPos+1]);d.fill=new Bl(k.buffer.i[k.iPos],k.buffer.f[k.fPos]);a.push(d);break;case 17:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=
5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.LINE_TO;d=b;c.lineTo(d.buffer.f[d.fPos],d.buffer.f[d.fPos+1]);break;case 18:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;
break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=ka.MOVE_TO;d=b;c.moveTo(d.buffer.f[d.fPos],
d.buffer.f[d.fPos+1]);break;default:switch(b.prev._hx_index){case 0:b.oPos+=2;b.bPos+=2;break;case 1:b.iPos+=1;b.fPos+=1;break;case 2:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 3:b.oPos+=1;break;case 4:b.fPos+=6;break;case 5:b.fPos+=4;break;case 6:b.fPos+=3;break;case 7:b.fPos+=4;break;case 8:b.oPos+=3;break;case 9:b.fPos+=4;break;case 10:b.fPos+=5;b.oPos+=1;break;case 12:b.oPos+=4;break;case 14:b.oPos+=2;b.bPos+=2;break;case 15:b.oPos+=4;b.iiPos+=2;b.ffPos+=1;b.fPos+=1;break;case 16:b.oPos+=
4;b.iPos+=1;b.fPos+=2;b.bPos+=1;break;case 17:b.fPos+=2;break;case 18:b.fPos+=2;break;case 19:b.oPos+=1;break;case 20:b.oPos+=1}b.prev=d}}null!=c&&a.push(c)},__update:function(a){if(!(null==this.__bounds||0>=this.__bounds.width||0>=this.__bounds.height)){var b=this.__owner.__renderTransform;if(null!=b){var c=0==b.b?Math.abs(b.a):Math.sqrt(b.a*b.a+b.b*b.b);var d=0==b.c?Math.abs(b.d):Math.sqrt(b.c*b.c+b.d*b.d);null!=a&&(c=0==a.b?c*a.a:c*Math.sqrt(a.a*a.a+a.b*a.b),d=0==a.c?d*a.d:d*Math.sqrt(a.c*a.c+
a.d*a.d));a=this.__bounds.width*c;d*=this.__bounds.height;if(1>a||1>d)(1<=this.__width||1<=this.__height)&&this.set___dirty(!0),this.__height=this.__width=0;else{null!=nf.maxTextureWidth&&a>nf.maxTextureWidth&&(a=nf.maxTextureWidth);null!=nf.maxTextureWidth&&d>nf.maxTextureHeight&&(d=nf.maxTextureHeight);this.__renderTransform.a=a/this.__bounds.width;this.__renderTransform.d=d/this.__bounds.height;c=1/this.__renderTransform.a;var e=1/this.__renderTransform.d;this.__worldTransform.a=c*b.a;this.__worldTransform.b=
c*b.b;this.__worldTransform.c=e*b.c;this.__worldTransform.d=e*b.d;e=this.__bounds.x;var f=this.__bounds.y;c=e*b.a+f*b.c+b.tx;b=e*b.b+f*b.d+b.ty;this.__worldTransform.tx=Math.floor(c);this.__worldTransform.ty=Math.floor(b);e=this.__worldTransform;f=e.a*e.d-e.b*e.c;this.__renderTransform.tx=0==f?-e.tx:1/f*(e.c*(e.ty-b)+e.d*(c-e.tx));e=this.__worldTransform;f=e.a*e.d-e.b*e.c;this.__renderTransform.ty=0==f?-e.ty:1/f*(e.a*(b-e.ty)+e.b*(e.tx-c));a=Math.ceil(a+1);d=Math.ceil(d+1);a==this.__width&&d==this.__height||
this.set___dirty(!0);this.__width=a;this.__height=d}}}},set___dirty:function(a){if(a&&null!=this.__owner){var b=this.__owner;b.__renderDirty||(b.__renderDirty=!0,b.__setParentRenderDirty())}a&&(this.__hardwareDirty=this.__softwareDirty=!0);return this.__dirty=a},__class__:nf,__properties__:{set___dirty:"set___dirty"}};var si=function(){};h["openfl.display.IGraphicsFill"]=si;si.__name__="openfl.display.IGraphicsFill";si.__isInterface__=!0;si.prototype={__graphicsFillType:null,__class__:si};var yg=
function(){};h["openfl.display.IGraphicsData"]=yg;yg.__name__="openfl.display.IGraphicsData";yg.__isInterface__=!0;yg.prototype={__graphicsDataType:null,__class__:yg};var Vo=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=4;this.__graphicsFillType=2};h["openfl.display.GraphicsBitmapFill"]=Vo;Vo.__name__="openfl.display.GraphicsBitmapFill";Vo.__interfaces__=[si,yg];Vo.prototype={bitmapData:null,matrix:null,repeat:null,
smooth:null,__graphicsDataType:null,__graphicsFillType:null,__class__:Vo};var Xo=function(){this.__graphicsDataType=5;this.__graphicsFillType=3};h["openfl.display.GraphicsEndFill"]=Xo;Xo.__name__="openfl.display.GraphicsEndFill";Xo.__interfaces__=[si,yg];Xo.prototype={__graphicsDataType:null,__graphicsFillType:null,__class__:Xo};var Wo=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=2;this.__graphicsFillType=1};h["openfl.display.GraphicsGradientFill"]=Wo;Wo.__name__="openfl.display.GraphicsGradientFill";Wo.__interfaces__=[si,yg];Wo.prototype={alphas:null,colors:null,focalPointRatio:null,interpolationMethod:null,matrix:null,ratios:null,spreadMethod:null,type:null,__graphicsDataType:null,__graphicsFillType:null,__class__:Wo};var Zo=function(){};h["openfl.display.IGraphicsPath"]=Zo;Zo.__name__="openfl.display.IGraphicsPath";
Zo.__isInterface__=!0;var ek=function(a,b,c){null==c&&(c=0);this.commands=a;this.data=b;this.winding=c;this.__graphicsDataType=3};h["openfl.display.GraphicsPath"]=ek;ek.__name__="openfl.display.GraphicsPath";ek.__interfaces__=[Zo,yg];ek.prototype={commands:null,data:null,winding:null,__graphicsDataType:null,cubicCurveTo:function(a,b,c,d,e,f){null==this.commands&&(this.commands=Ua.toIntVector(null));null==this.data&&(this.data=Ua.toFloatVector(null));this.commands.push(6);this.data.push(a);this.data.push(b);
this.data.push(c);this.data.push(d);this.data.push(e);this.data.push(f)},curveTo:function(a,b,c,d){null==this.commands&&(this.commands=Ua.toIntVector(null));null==this.data&&(this.data=Ua.toFloatVector(null));this.commands.push(3);this.data.push(a);this.data.push(b);this.data.push(c);this.data.push(d)},lineTo:function(a,b){null==this.commands&&(this.commands=Ua.toIntVector(null));null==this.data&&(this.data=Ua.toFloatVector(null));this.commands.push(2);this.data.push(a);this.data.push(b)},moveTo:function(a,
b){null==this.commands&&(this.commands=Ua.toIntVector(null));null==this.data&&(this.data=Ua.toFloatVector(null));this.commands.push(1);this.data.push(a);this.data.push(b)},wideLineTo:function(a,b){null==this.commands&&(this.commands=Ua.toIntVector(null));null==this.data&&(this.data=Ua.toFloatVector(null));this.commands.push(2);this.data.push(a);this.data.push(b)},wideMoveTo:function(a,b){null==this.commands&&(this.commands=Ua.toIntVector(null));null==this.data&&(this.data=Ua.toFloatVector(null));
this.commands.push(1);this.data.push(a);this.data.push(b)},__drawCircle:function(a,b,c){this.__drawRoundRect(a-c,b-c,2*c,2*c,2*c,2*c)},__drawEllipse:function(a,b,c,d){this.__drawRoundRect(a,b,c,d,c,d)},__drawRect:function(a,b,c,d){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.lineTo(a,b)},__drawRoundRect:function(a,b,c,d,e,f){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+.7071067811865476*e,k=-e+.41421356237309503*e,l=-f+.7071067811865476*f,m=-f+
.41421356237309503*f;this.moveTo(c,d-f);this.curveTo(c,d+m,c+g,d+l);this.curveTo(c+k,d,c-e,d);this.lineTo(a+e,d);this.curveTo(a-k,d,a-g,d+l);this.curveTo(a,d+m,a,d-f);this.lineTo(a,b+f);this.curveTo(a,b-m,a-g,b-l);this.curveTo(a-k,b,a+e,b);this.lineTo(c-e,b);this.curveTo(c+k,b,c+g,b-l);this.curveTo(c,b-m,c,b+f);this.lineTo(c,d-f)},__class__:ek};var $o={};h["openfl.display._GraphicsPathWinding.GraphicsPathWinding_Impl_"]=$o;$o.__name__="openfl.display._GraphicsPathWinding.GraphicsPathWinding_Impl_";
$o.fromString=function(a){switch(a){case "evenOdd":return 0;case "nonZero":return 1;default:return null}};$o.toString=function(a){switch(a){case 0:return"evenOdd";case 1:return"nonZero";default:return null}};var vr=function(a,b,c){this.rects=a;this.indices=b;this.transforms=c;this.__graphicsDataType=6};h["openfl.display.GraphicsQuadPath"]=vr;vr.__name__="openfl.display.GraphicsQuadPath";vr.__interfaces__=[Zo,yg];vr.prototype={indices:null,rects:null,transforms:null,__graphicsDataType:null,__class__:vr};
var So=function(a){null==this.__glFragmentSource&&(this.__glFragmentSource="varying float openfl_Alphav;\n\t\tvarying vec4 openfl_ColorMultiplierv;\n\t\tvarying vec4 openfl_ColorOffsetv;\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform vec2 openfl_TextureSize;\n\t\tuniform sampler2D bitmap;\n\n\t\tvoid main(void) {\n\n\t\t\tvec4 color = texture2D (bitmap, openfl_TextureCoordv);\n\n\t\tif (color.a == 0.0) {\n\n\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\n\t\t} else if (openfl_HasColorTransform) {\n\n\t\t\tcolor = vec4 (color.rgb / color.a, color.a);\n\n\t\t\tmat4 colorMultiplier = mat4 (0);\n\t\t\tcolorMultiplier[0][0] = openfl_ColorMultiplierv.x;\n\t\t\tcolorMultiplier[1][1] = openfl_ColorMultiplierv.y;\n\t\t\tcolorMultiplier[2][2] = openfl_ColorMultiplierv.z;\n\t\t\tcolorMultiplier[3][3] = 1.0; // openfl_ColorMultiplierv.w;\n\n\t\t\tcolor = clamp (openfl_ColorOffsetv + (color * colorMultiplier), 0.0, 1.0);\n\n\t\t\tif (color.a > 0.0) {\n\n\t\t\t\tgl_FragColor = vec4 (color.rgb * color.a * openfl_Alphav, color.a * openfl_Alphav);\n\n\t\t\t} else {\n\n\t\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tgl_FragColor = color * openfl_Alphav;\n\n\t\t}\n\n\t\t}");
null==this.__glVertexSource&&(this.__glVertexSource="attribute float openfl_Alpha;\n\t\tattribute vec4 openfl_ColorMultiplier;\n\t\tattribute vec4 openfl_ColorOffset;\n\t\tattribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\n\t\tvarying float openfl_Alphav;\n\t\tvarying vec4 openfl_ColorMultiplierv;\n\t\tvarying vec4 openfl_ColorOffsetv;\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform bool openfl_HasColorTransform;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\topenfl_Alphav = openfl_Alpha;\n\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\n\t\tif (openfl_HasColorTransform) {\n\n\t\t\topenfl_ColorMultiplierv = openfl_ColorMultiplier;\n\t\t\topenfl_ColorOffsetv = openfl_ColorOffset / 255.0;\n\n\t\t}\n\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\t\t}");
ef.call(this,a);this.__isGenerated=!0;this.__initGL()};h["openfl.display.GraphicsShader"]=So;So.__name__="openfl.display.GraphicsShader";So.__super__=ef;So.prototype=w(ef.prototype,{openfl_Alpha:null,openfl_ColorMultiplier:null,openfl_ColorOffset:null,openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_HasColorTransform:null,openfl_TextureSize:null,bitmap:null,__class__:So});var wr=function(a,b){this.shader=a;this.matrix=b;this.__graphicsDataType=8;this.__graphicsFillType=4};h["openfl.display.GraphicsShaderFill"]=
wr;wr.__name__="openfl.display.GraphicsShaderFill";wr.__interfaces__=[si,yg];wr.prototype={matrix:null,shader:null,__graphicsDataType:null,__graphicsFillType:null,__class__:wr};var Bl=function(a,b){null==b&&(b=1);null==a&&(a=0);this.alpha=b;this.color=a;this.__graphicsDataType=1;this.__graphicsFillType=0};h["openfl.display.GraphicsSolidFill"]=Bl;Bl.__name__="openfl.display.GraphicsSolidFill";Bl.__interfaces__=[si,yg];Bl.prototype={alpha:null,color:null,__graphicsDataType:null,__graphicsFillType:null,
__class__:Bl};var Lt=function(){};h["openfl.display.IGraphicsStroke"]=Lt;Lt.__name__="openfl.display.IGraphicsStroke";Lt.__isInterface__=!0;var Yo=function(a,b,c,d,e,f,g){null==f&&(f=3);null==e&&(e=2);null==d&&(d=0);null==c&&(c=2);null==b&&(b=!1);null==a&&(a=NaN);this.caps=d;this.fill=g;this.joints=e;this.miterLimit=f;this.pixelHinting=b;this.scaleMode=c;this.thickness=a;this.__graphicsDataType=0};h["openfl.display.GraphicsStroke"]=Yo;Yo.__name__="openfl.display.GraphicsStroke";Yo.__interfaces__=
[Lt,yg];Yo.prototype={caps:null,fill:null,joints:null,miterLimit:null,pixelHinting:null,scaleMode:null,thickness:null,__graphicsDataType:null,__class__:Yo};var xr=function(a,b,c,d){null==d&&(d=1);this.vertices=a;this.indices=b;this.uvtData=c;this.culling=d;this.__graphicsDataType=7};h["openfl.display.GraphicsTrianglePath"]=xr;xr.__name__="openfl.display.GraphicsTrianglePath";xr.__interfaces__=[Zo,yg];xr.prototype={culling:null,indices:null,uvtData:null,vertices:null,__graphicsDataType:null,__class__:xr};
var yj=function(){};h["openfl.display.ITileContainer"]=yj;yj.__name__="openfl.display.ITileContainer";yj.__isInterface__=!0;yj.prototype={get_numTiles:null,addTile:null,addTileAt:null,addTiles:null,contains:null,getTileAt:null,getTileIndex:null,removeTile:null,removeTileAt:null,removeTiles:null,setTileIndex:null,sortTiles:null,swapTiles:null,swapTilesAt:null,__class__:yj,__properties__:{get_numTiles:"get_numTiles"}};var fk={};h["openfl.display._InterpolationMethod.InterpolationMethod_Impl_"]=fk;fk.__name__=
"openfl.display._InterpolationMethod.InterpolationMethod_Impl_";fk.fromInt=function(a){return a};fk.fromString=function(a){switch(a){case "linearRGB":return 0;case "rgb":return 1;default:return null}};fk.toInt=function(a){return a};fk.toString=function(a){switch(a){case 0:return"linearRGB";case 1:return"rgb";default:return null}};var Qo=function(a){null==a&&(a=80);this.quality=a};h["openfl.display.JPEGEncoderOptions"]=Qo;Qo.__name__="openfl.display.JPEGEncoderOptions";Qo.prototype={quality:null,__class__:Qo};
var ni={};h["openfl.display._JointStyle.JointStyle_Impl_"]=ni;ni.__name__="openfl.display._JointStyle.JointStyle_Impl_";ni.fromInt=function(a){return a};ni.fromString=function(a){switch(a){case "bevel":return 0;case "miter":return 1;case "round":return 2;default:return null}};ni.toInt=function(a){return a};ni.toString=function(a){switch(a){case 0:return"bevel";case 1:return"miter";case 2:return"round";default:return null}};var ti={};h["openfl.display._LineScaleMode.LineScaleMode_Impl_"]=ti;ti.__name__=
"openfl.display._LineScaleMode.LineScaleMode_Impl_";ti.fromInt=function(a){return a};ti.fromString=function(a){switch(a){case "horizontal":return 0;case "none":return 1;case "normal":return 2;case "vertical":return 3;default:return null}};ti.toInt=function(a){return a};ti.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 Uk=function(){db.call(this);this.contentLoaderInfo=Ig.create(this);this.uncaughtErrorEvents=
this.contentLoaderInfo.uncaughtErrorEvents;this.__unloaded=!0};h["openfl.display.Loader"]=Uk;Uk.__name__="openfl.display.Loader";Uk.__super__=db;Uk.prototype=w(db.prototype,{content:null,contentLoaderInfo:null,uncaughtErrorEvents:null,__library:null,__path:null,__unloaded:null,addChild:function(a){throw new E(new hd("Error #2069: The Loader class does not implement this method.",2069));},addChildAt:function(a,b){throw new E(new hd("Error #2069: The Loader class does not implement this method.",2069));
},close:function(){Xc.notImplemented({fileName:"openfl/display/Loader.hx",lineNumber:226,className:"openfl.display.Loader",methodName:"close"})},load:function(a,b){this.unload();this.contentLoaderInfo.loaderURL=$a.get_current().get_loaderInfo().url;this.contentLoaderInfo.url=a.url;this.__unloaded=!1;if(null==a.contentType||""==a.contentType){b="";this.__path=a.url;var c=this.__path.indexOf("?");-1<c&&(this.__path=this.__path.substring(0,c));for(;ba.endsWith(this.__path,"/");)this.__path=this.__path.substring(0,
this.__path.length-1);ba.endsWith(this.__path,".bundle")&&(this.__path+="/library.json",a.url=-1<c?this.__path+a.url.substring(c):this.__path);c=this.__path.lastIndexOf(".");-1<c&&(b=this.__path.substring(c+1));switch(b){case "gif":b="image/gif";break;case "jpeg":case "jpg":b="image/jpeg";break;case "js":b="application/javascript";break;case "json":b="application/json";break;case "png":b="image/png";break;case "swf":b="application/x-shockwave-flash";break;default:b="application/x-www-form-urlencoded"}this.contentLoaderInfo.contentType=
b}else this.contentLoaderInfo.contentType=a.contentType;if(-1<this.contentLoaderInfo.contentType.indexOf("image/")&&"GET"==a.method&&(null==a.requestHeaders||0==a.requestHeaders.length)&&null==a.userAgent)na.loadFromFile(a.url).onComplete(v(this,this.BitmapData_onLoad)).onError(v(this,this.BitmapData_onError)).onProgress(v(this,this.BitmapData_onProgress));else{b=new Zg;b.dataFormat=0;if(-1<this.contentLoaderInfo.contentType.indexOf("/json")||-1<this.contentLoaderInfo.contentType.indexOf("/javascript")||
-1<this.contentLoaderInfo.contentType.indexOf("/ecmascript"))b.dataFormat=1;b.addEventListener("complete",v(this,this.loader_onComplete));b.addEventListener("ioError",v(this,this.loader_onError));b.addEventListener("progress",v(this,this.loader_onProgress));b.load(a)}},loadBytes:function(a,b){na.loadFromBytes(a).onComplete(v(this,this.BitmapData_onLoad)).onError(v(this,this.BitmapData_onError))},removeChild:function(a){throw new E(new hd("Error #2069: The Loader class does not implement this method.",
2069));},removeChildAt:function(a){throw new E(new hd("Error #2069: The Loader class does not implement this method.",2069));},setChildIndex:function(a,b){throw new E(new hd("Error #2069: The Loader class does not implement this method.",2069));},unload:function(){this.__unloaded||(null!=this.content&&this.content.parent==this&&db.prototype.removeChild.call(this,this.content),null!=this.__library&&(Ea.unloadLibrary(this.contentLoaderInfo.url),this.__library=null),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,this.__unloaded=!0,this.contentLoaderInfo.dispatchEvent(new da("unload")))},unloadAndStop:function(a){null!=this.content&&this.content.__stopAllMovieClips();a=0;for(var b=this.get_numChildren();a<b;){var c=a++;this.getChildAt(c).__stopAllMovieClips()}this.unload()},__dispatchError:function(a){var b=
new Xf("ioError");b.text=a;this.contentLoaderInfo.dispatchEvent(b)},__setContent:function(a,b,c){this.content=a;this.contentLoaderInfo.content=a;this.contentLoaderInfo.width=b;this.contentLoaderInfo.height=c;null!=a&&db.prototype.addChildAt.call(this,a,0)},BitmapData_onError:function(a){this.__dispatchError(K.string(a))},BitmapData_onLoad:function(a){null==a?this.__dispatchError("Unknown error"):(this.__setContent(new Zc(a),a.width,a.height),this.contentLoaderInfo.dispatchEvent(new da("complete")))},
BitmapData_onProgress:function(a,b){var c=new zg("progress");c.bytesLoaded=a;c.bytesTotal=b;this.contentLoaderInfo.dispatchEvent(c)},loader_onComplete:function(a){var b=this;a=a.target;if(null!=this.contentLoaderInfo.contentType&&-1<this.contentLoaderInfo.contentType.indexOf("/json")){var c=rd.parse(a.data,hi.directory(this.__path));if(null==c)this.__dispatchError("Cannot parse asset manifest");else{var d=bc.fromManifest(c);if(null==d)this.__dispatchError("Cannot open library");else if(d instanceof
kc)d.load().onComplete(function(a){b.__library=d;Ea.registerLibrary(b.contentLoaderInfo.url,b.__library);null==c.name||Ea.hasLibrary(c.name)||Ea.registerLibrary(c.name,b.__library);a=b.__library.getMovieClip("");var e=a.get_width()|0,g=a.get_height()|0;b.__setContent(a,e,g);b.contentLoaderInfo.dispatchEvent(new da("complete"))}).onError(function(a){b.__dispatchError(a)})}}else null!=this.contentLoaderInfo.contentType&&(-1<this.contentLoaderInfo.contentType.indexOf("/javascript")||-1<this.contentLoaderInfo.contentType.indexOf("/ecmascript"))?
(this.__setContent(new qa,0,0),eval("(function () {"+K.string(a.data)+"})()"),this.contentLoaderInfo.dispatchEvent(new da("complete"))):(this.contentLoaderInfo.bytes=a.data,na.loadFromBytes(a.data).onComplete(v(this,this.BitmapData_onLoad)).onError(v(this,this.BitmapData_onError)))},loader_onError:function(a){a.target=this.contentLoaderInfo;this.contentLoaderInfo.dispatchEvent(a)},loader_onProgress:function(a){a.target=this.contentLoaderInfo;this.contentLoaderInfo.dispatchEvent(a)},__class__:Uk});
var Ig=function(){A.call(this);this.applicationDomain=gk.currentDomain;this.bytesTotal=this.bytesLoaded=0;this.childAllowsParent=!0;this.parameters={}};h["openfl.display.LoaderInfo"]=Ig;Ig.__name__="openfl.display.LoaderInfo";Ig.create=function(a){var b=new Ig;b.uncaughtErrorEvents=new ap;null!=a?b.loader=a:b.url=Ig.__rootURL;return b};Ig.__super__=A;Ig.prototype=w(A.prototype,{applicationDomain:null,bytes:null,bytesLoaded:null,bytesTotal:null,childAllowsParent:null,content:null,contentType:null,
frameRate:null,height:null,loader:null,loaderURL:null,parameters:null,parentAllowsChild:null,sameDomain:null,sharedEvents:null,uncaughtErrorEvents:null,url:null,width:null,__completed:null,__complete:function(){this.__completed||(this.bytesLoaded<this.bytesTotal&&(this.bytesLoaded=this.bytesTotal),this.__update(this.bytesLoaded,this.bytesTotal),this.__completed=!0,this.dispatchEvent(new da("complete")))},__update:function(a,b){this.bytesLoaded=a;this.bytesTotal=b;this.dispatchEvent(new zg("progress",
!1,!1,a,b))},__class__:Ig});var ye=function(){qa.call(this);this.__currentFrame=1;this.__currentLabels=[];this.__instanceFields=[];this.__totalFrames=0;this.__enabled=!0;if(null!=ye.__constructor){var a=ye.__constructor;ye.__constructor=null;a(this)}else null!=ye.__initSymbol&&(this.__swf=ye.__initSWF,this.__symbol=ye.__initSymbol,ye.__initSWF=null,ye.__initSymbol=null,this.__fromSymbol(this.__swf,this.__symbol))};h["openfl.display.MovieClip"]=ye;ye.__name__="openfl.display.MovieClip";ye.__super__=
qa;ye.prototype=w(qa.prototype,{__activeInstances:null,__activeInstancesByFrameObjectID:null,__currentFrame:null,__currentFrameLabel:null,__currentLabel:null,__currentLabels:null,__enabled:null,__frameScripts:null,__frameTime:null,__hasDown:null,__hasOver:null,__hasUp:null,__instanceFields:null,__lastFrameScriptEval:null,__lastFrameUpdate:null,__mouseIsDown:null,__playing:null,__swf:null,__symbol:null,__timeElapsed:null,__timeline:null,__totalFrames:null,addFrameScript:function(a,b){0>a||(null!=this.__timeline?
this.__timeline.addFrameScript(a,b):(a+=1,null!=b?(null==this.__frameScripts&&(this.__frameScripts=new Wa),this.__frameScripts.h[a]=b):null!=this.__frameScripts&&this.__frameScripts.remove(a)))},gotoAndPlay:function(a,b){null!=this.__timeline?this.__timeline.gotoAndPlay(a,b):(this.play(),this.__goto(this.__resolveFrameReference(a)))},gotoAndStop:function(a,b){null!=this.__timeline?this.__timeline.gotoAndStop(a,b):(this.stop(),this.__goto(this.__resolveFrameReference(a)))},nextFrame:function(){null!=
this.__timeline?this.__timeline.nextFrame():(this.stop(),this.__goto(this.__currentFrame+1))},play:function(){null!=this.__timeline?this.__timeline.play():null==this.__symbol||this.__playing||2>this.__totalFrames||(this.__playing=!0,this.__frameTime=1E3/this.__swf.frameRate|0,this.__timeElapsed=0)},prevFrame:function(){null!=this.__timeline?this.__timeline.prevFrame():(this.stop(),this.__goto(this.__currentFrame-1))},stop:function(){null!=this.__timeline?this.__timeline.stop():this.__playing=!1},
__enterFrame:function(a){null!=this.__timeline?this.__timeline.enterFrame(a):(this.__updateFrameScript(a),this.__updateSymbol(this.__currentFrame),qa.prototype.__enterFrame.call(this,a))},__updateFrameScript:function(a){if(null!=this.__symbol&&this.__playing){var b=this.__getNextFrame(a);if(this.__lastFrameScriptEval==b)qa.prototype.__enterFrame.call(this,a);else if(null!=this.__frameScripts){if(b<this.__currentFrame){if(!this.__evaluateFrameScripts(this.__totalFrames)){qa.prototype.__enterFrame.call(this,
a);return}this.__currentFrame=1}this.__evaluateFrameScripts(b)||qa.prototype.__enterFrame.call(this,a)}else this.__currentFrame=b}},__updateSymbol:function(a){if(null!=this.__symbol&&this.__currentFrame!=this.__lastFrameUpdate){this.__updateFrameLabel();for(var b=new Wa,c,d=0;d<a;)if(c=d++,c=this.__symbol.frames[c],null!=c.objects)for(var e=0,f=c.objects;e<f.length;){var g=f[e];++e;switch(g.type._hx_index){case 0:c=this.__activeInstancesByFrameObjectID.h[g.id];null!=c&&(b.h[g.id]=c,this.__updateDisplayObject(c.displayObject,
g,!0));break;case 1:c=b.h[g.id];null!=c&&null!=c.displayObject&&this.__updateDisplayObject(c.displayObject,g);break;case 2:b.remove(g.id)}}a=[];d=[];for(c=b.iterator();c.hasNext();)b=c.next(),-1==a.indexOf(b)&&(a.push(b),0<b.clipDepth&&d.push(b));a.sort(v(this,this.__sortDepths));e=0;for(f=a.length;e<f;){g=e++;var k=this.__children[g];c=a[g];b=c.depth;var l=c.displayObject;k!=l?(c=l,this.addChildAt(l,g)):c=this.__children[g];g=!1;for(k=0;k<d.length;)if(l=d[k],++k,b>l.depth&&b<=l.clipDepth){c.set_mask(l.displayObject);
g=!0;break}0<d.length&&!g&&null!=c.get_mask()&&c.set_mask(null)}d=a.length;for(c=this.__children.length;d<c;){a=this.__children[d];b=0;for(e=this.__activeInstances;b<e.length;)f=e[b],++b,f.displayObject==a&&(a instanceof ye&&a.gotoAndPlay(1),this.removeChild(a),--d,--c);++d}this.__lastFrameUpdate=this.__currentFrame;this.__updateInstanceFields()}},__evaluateFrameScripts:function(a){var b=this.__currentFrame;for(a+=1;b<a;){var c=b++;if(c!=this.__lastFrameScriptEval&&(this.__currentFrame=this.__lastFrameScriptEval=
c,this.__frameScripts.h.hasOwnProperty(c)&&(this.__updateSymbol(c),(0,this.__frameScripts.h[c])(),this.__currentFrame!=c)||!this.__playing))return!1}return!0},__fromSymbol:function(a,b){if(null==this.__activeInstances){this.__swf=a;this.__symbol=b;this.__activeInstances=[];this.__activeInstancesByFrameObjectID=new Wa;this.__currentFrame=1;this.__lastFrameUpdate=this.__lastFrameScriptEval=-1;this.__totalFrames=this.__symbol.frames.length;for(var c=null,d=0,e=this.__symbol.frames.length;d<e;){var f=
d++;a=f+1;b=this.__symbol.frames[f];null!=b.label&&this.__currentLabels.push(new sl(b.label,f+1));if(null!=b.script)null==this.__frameScripts&&(this.__frameScripts=new Wa),this.__frameScripts.h[a]=b.script;else if(null!=b.scriptSource){null==this.__frameScripts&&(this.__frameScripts=new Wa);try{null==c&&(c=new ii,c.allowTypes=!0);var g=[c.parseString(b.scriptSource)],k=[new Wn],l=k[0].variables;null!=q["this"]?l.setReserved("this",this):l.h["this"]=this;var m=k[0].variables;f=da;null!=q["flash.events_Event"]?
m.setReserved("flash.events_Event",f):m.h["flash.events_Event"]=f;var p=function(a,b){return function(){a[0].execute(b[0])}}(k,g);this.__frameScripts.h[a]=p}catch(n){ra.lastException=n,null!=this.__symbol.className?Ta.warn('Unable to evaluate frame script source for symbol "'+this.__symbol.className+'" frame '+a+"\n"+b.scriptSource,{fileName:"openfl/display/MovieClip.hx",lineNumber:744,className:"openfl.display.MovieClip",methodName:"__fromSymbol"}):Ta.warn("Unable to evaluate frame script source:\n"+
b.scriptSource,{fileName:"openfl/display/MovieClip.hx",lineNumber:749,className:"openfl.display.MovieClip",methodName:"__fromSymbol"})}}}k=0;for(l=this.__totalFrames;k<l;)if(m=k++,g=m+1,p=this.__symbol.frames[m],null!=p.objects)for(m=0,b=p.objects;m<b.length;)if(c=b[m],++m,c.type==vu.CREATE&&!this.__activeInstancesByFrameObjectID.h.hasOwnProperty(c.id)){p=null;a=!1;d=0;for(e=this.__activeInstances;d<e.length;)if(f=e[d],++d,null!=f.displayObject&&f.characterID==c.symbol&&f.depth==c.depth){p=f;a=!0;
break}null==p&&(d=this.__swf.symbols.h[c.symbol],null!=d&&(d=d.__createObject(this.__swf),null!=d&&(d.parent=this,d.stage=this.stage,null!=this.stage&&d.dispatchEvent(new da("addedToStage",!1,!1)),p=new yr(g,c.id,c.symbol,c.depth,d,c.clipDepth))));null!=p&&(this.__activeInstancesByFrameObjectID.h[c.id]=p,a||(this.__activeInstances.push(p),this.__updateDisplayObject(p.displayObject,c)))}1<this.__totalFrames&&this.play();this.__enterFrame(0);this.__instanceFields=rb.getInstanceFields(L.getClass(this));
this.__updateInstanceFields()}},__getNextFrame:function(a){this.__timeElapsed+=a;a=this.__currentFrame+Math.floor(this.__timeElapsed/this.__frameTime);1>a&&(a=1);a>this.__totalFrames&&(a=Math.floor((a-1)%this.__totalFrames)+1);this.__timeElapsed%=this.__frameTime;return a},__goto:function(a){if(null!=this.__timeline||null!=this.__symbol)1>a?a=1:a>this.__totalFrames&&(a=this.__totalFrames),this.__currentFrame=a,this.__enterFrame(0)},__resolveFrameReference:function(a){if("number"==typeof a&&(a|0)===
a)return a;if("string"==typeof a){for(var b=0,c=this.__currentLabels;b<c.length;){var d=c[b];++b;if(d.get_name()==a)return d.get_frame()}throw new E(new zi("Error #2109: Frame label "+a+" not found in scene."));}throw new E("Invalid type for frame "+a.__name__);},__sortDepths:function(a,b){return a.depth-b.depth},__stopAllMovieClips:function(){qa.prototype.__stopAllMovieClips.call(this);this.stop()},__tabTest:function(a){this.__enabled&&qa.prototype.__tabTest.call(this,a)},__updateDisplayObject:function(a,
b,c){null==c&&(c=!1);if(null!=a){null!=b.name&&a.set_name(b.name);null!=b.matrix&&a.get_transform().set_matrix(b.matrix);null!=b.colorTransform?a.get_transform().set_colorTransform(b.colorTransform):c&&!a.get_transform().get_colorTransform().__isDefault(!0)&&a.get_transform().set_colorTransform(new Sb);a.set_transform(a.get_transform());if(null!=b.filters){c=[];for(var d=0,e=b.filters;d<e.length;){var f=e[d];++d;switch(f._hx_index){case 0:c.push(new wg(f.blurX,f.blurY,f.quality));break;case 1:c.push(new Sf(f.matrix));
break;case 2:c.push(new ki(f.distance,f.angle,f.color,f.alpha,f.blurX,f.blurY,f.strength,f.quality,f.inner,f.knockout,f.hideObject));break;case 3:c.push(new se(f.color,f.alpha,f.blurX,f.blurY,f.strength,f.quality,f.inner,f.knockout))}}a.set_filters(c)}else a.set_filters(null);null!=b.visible&&a.set_visible(b.visible);null!=b.blendMode&&a.set_blendMode(b.blendMode);null!=b.cacheAsBitmap&&a.set_cacheAsBitmap(b.cacheAsBitmap)}},__updateFrameLabel:function(){this.__currentFrameLabel=this.__symbol.frames[this.__currentFrame-
1].label;if(null!=this.__currentFrameLabel)this.__currentLabel=this.__currentFrameLabel;else{this.__currentLabel=null;for(var a=0,b=this.__currentLabels;a<b.length;){var c=b[a];++a;if(c.get_frame()<this.__currentFrame)this.__currentLabel=c.get_name();else break}}},__updateInstanceFields:function(){for(var a=0,b=this.__instanceFields;a<b.length;){var c=b[a];++a;for(var d=0,e=this.__children;d<e.length;){var f=e[d];++d;if(f.get_name()==c){this[c]=f;break}}}},__onMouseDown:function(a){this.__enabled&&
this.__hasDown&&this.gotoAndStop("_down");this.__mouseIsDown=!0;this.stage.addEventListener("mouseUp",v(this,this.__onMouseUp),!0)},__onMouseUp:function(a){this.__mouseIsDown=!1;null!=this.stage&&this.stage.removeEventListener("mouseUp",v(this,this.__onMouseUp));a.target==this&&this.__enabled&&this.__hasOver?this.gotoAndStop("_over"):this.__enabled&&this.__hasUp&&this.gotoAndStop("_up")},__onRollOut:function(a){this.__enabled&&(this.__mouseIsDown&&this.__hasOver?this.gotoAndStop("_over"):this.__hasUp&&
this.gotoAndStop("_up"))},__onRollOver:function(a){this.__enabled&&this.__hasOver&&this.gotoAndStop("_over")},set_buttonMode:function(a){if(this.__buttonMode!=a){if(a){this.__hasUp=this.__hasOver=this.__hasDown=!1;for(var b=0,c=this.__currentLabels;b<c.length;){var d=c[b];++b;switch(d.get_name()){case "_down":this.__hasDown=!0;break;case "_over":this.__hasOver=!0;break;case "_up":this.__hasUp=!0}}if(this.__hasDown||this.__hasOver||this.__hasUp)this.addEventListener("rollOver",v(this,this.__onRollOver)),
this.addEventListener("rollOut",v(this,this.__onRollOut)),this.addEventListener("mouseDown",v(this,this.__onMouseDown))}else this.removeEventListener("rollOver",v(this,this.__onRollOver)),this.removeEventListener("rollOut",v(this,this.__onRollOut)),this.removeEventListener("mouseDown",v(this,this.__onMouseDown));this.__buttonMode=a}return a},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_enabled:function(){return this.__enabled},set_enabled:function(a){return this.__enabled=a},get_framesLoaded:function(){return this.__totalFrames},get_isPlaying:function(){return this.__playing},get_totalFrames:function(){return this.__totalFrames},__class__:ye,__properties__:w(qa.prototype.__properties__,{get_totalFrames:"get_totalFrames",get_isPlaying:"get_isPlaying",get_framesLoaded:"get_framesLoaded",set_enabled:"set_enabled",get_enabled:"get_enabled",
get_currentLabels:"get_currentLabels",get_currentLabel:"get_currentLabel",get_currentFrameLabel:"get_currentFrameLabel",get_currentFrame:"get_currentFrame"})});var yr=function(a,b,c,d,e,f){this.initFrame=a;this.initFrameObjectID=b;this.characterID=c;this.depth=d;this.displayObject=e;this.clipDepth=f};h["openfl.display._MovieClip.FrameSymbolInstance"]=yr;yr.__name__="openfl.display._MovieClip.FrameSymbolInstance";yr.prototype={characterID:null,clipDepth:null,depth:null,displayObject:null,initFrame:null,
initFrameObjectID:null,__class__:yr};var nr=function(a){null==a&&(a=!1);this.fastCompression=a};h["openfl.display.PNGEncoderOptions"]=nr;nr.__name__="openfl.display.PNGEncoderOptions";nr.prototype={fastCompression:null,__class__:nr};var Cl={};h["openfl.display._PixelSnapping.PixelSnapping_Impl_"]=Cl;Cl.__name__="openfl.display._PixelSnapping.PixelSnapping_Impl_";Cl.fromString=function(a){switch(a){case "always":return 0;case "auto":return 1;case "never":return 2;default:return null}};Cl.toString=
function(a){switch(a){case 0:return"always";case 1:return"auto";case 2:return"never";default:return null}};var zr=function(a){this.onComplete=new me;this.display=a;null!=a&&(a.addEventListener("unload",v(this,this.display_onUnload)),$a.get_current().addChild(a))};h["openfl.display.Preloader"]=zr;zr.__name__="openfl.display.Preloader";zr.prototype={onComplete:null,complete:null,display:null,ready:null,start:function(){this.ready=!0;$a.get_current().get_loaderInfo().__complete();if(null!=this.display){var a=
new da("complete",!0,!0);this.display.dispatchEvent(a);a.isDefaultPrevented()||this.display.dispatchEvent(new da("unload"))}else this.complete||(this.complete=!0,this.onComplete.dispatch())},update:function(a,b){$a.get_current().get_loaderInfo().__update(a,b);null!=this.display&&this.display.dispatchEvent(new zg("progress",!0,!0,a,b))},display_onUnload:function(a){null!=this.display&&(this.display.removeEventListener("unload",v(this,this.display_onUnload)),this.display.parent==$a.get_current()&&$a.get_current().removeChild(this.display),
$a.get_current().stage.set_focus(null),this.display=null);this.ready&&!this.complete&&(this.complete=!0,this.onComplete.dispatch())},__class__:zr};var bp=function(){qa.call(this);var a=this.getBackgroundColor(),b=0;70>.299*(a>>16&255)+.587*(a>>8&255)+.114*(a&255)&&(b=16777215);a=this.getHeight()/2-3.5;var c=this.getWidth()-60;this.outline=new qa;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.outline.set_alpha(0);
this.addChild(this.outline);this.progress=new qa;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.progress.set_alpha(0);this.addChild(this.progress);this.startAnimation=$a.getTimer()+100;this.endAnimation=this.startAnimation+1E3;this.addEventListener("addedToStage",v(this,this.this_onAddedToStage))};h["openfl.display.DefaultPreloader"]=bp;bp.__name__="openfl.display.DefaultPreloader";
bp.__super__=qa;bp.prototype=w(qa.prototype,{endAnimation:null,outline:null,progress:null,startAnimation:null,getBackgroundColor:function(){var a=$a.get_current().stage.window.context.attributes;return Object.prototype.hasOwnProperty.call(a,"background")&&null!=a.background?a.background:0},getHeight:function(){var a=$a.get_current().stage.window.__height;return 0<a?a:$a.get_current().stage.stageHeight},getWidth:function(){var a=$a.get_current().stage.window.__width;return 0<a?a:$a.get_current().stage.stageWidth},
onInit:function(){this.addEventListener("enterFrame",v(this,this.this_onEnterFrame))},onLoaded:function(){this.removeEventListener("enterFrame",v(this,this.this_onEnterFrame));this.dispatchEvent(new da("unload"))},onUpdate:function(a,b){var c=0;0<b&&(c=a/b,1<c&&(c=1));this.progress.set_scaleX(c)},this_onAddedToStage:function(a){this.removeEventListener("addedToStage",v(this,this.this_onAddedToStage));this.onInit();this.onUpdate(this.get_loaderInfo().bytesLoaded,this.get_loaderInfo().bytesTotal);this.addEventListener("progress",
v(this,this.this_onProgress));this.addEventListener("complete",v(this,this.this_onComplete))},this_onComplete:function(a){a.preventDefault();this.removeEventListener("progress",v(this,this.this_onProgress));this.removeEventListener("complete",v(this,this.this_onComplete));this.onLoaded()},this_onEnterFrame:function(a){a=($a.getTimer()-this.startAnimation)/(this.endAnimation-this.startAnimation);0>a&&(a=0);1<a&&(a=1);this.outline.set_alpha(a);this.progress.set_alpha(a)},this_onProgress:function(a){this.onUpdate(a.bytesLoaded|
0,a.bytesTotal|0)},__class__:bp});var lr={};h["openfl.display._ShaderData.ShaderData_Impl_"]=lr;lr.__name__="openfl.display._ShaderData.ShaderData_Impl_";lr._new=function(a){return{}};var Oo=function(){this.channels=0;this.filter=5;this.index=this.height=0;this.mipFilter=2;this.wrap=this.width=0};h["openfl.display.ShaderInput"]=Oo;Oo.__name__="openfl.display.ShaderInput";Oo.prototype={channels:null,filter:null,height:null,index:null,input:null,mipFilter:null,name:null,width:null,wrap:null,__isUniform:null,
__disableGL:function(a,b){a.setTextureAt(b,null)},__updateGL:function(a,b,c,d,e,f){c=null!=c?c:this.input;d=null!=d?d:this.filter;e=null!=e?e:this.mipFilter;f=null!=f?f:this.wrap;null!=c?(a.setTextureAt(b,c.getTexture(a)),a.setSamplerStateAt(b,f,d,e)):a.setTextureAt(b,null)},__class__:Oo};var Yj=function(){this.index=0};h["openfl.display.ShaderParameter"]=Yj;Yj.__name__="openfl.display.ShaderParameter";Yj.prototype={index:null,name:null,type:null,value:null,__arrayLength:null,__internal:null,__isBool:null,
__isFloat:null,__isInt:null,__isUniform:null,__length:null,__uniformMatrix:null,__useArray:null,__disableGL:function(a){a=a.gl;if(!this.__isUniform)for(var b=0,c=this.__arrayLength;b<c;){var d=b++;a.disableVertexAttribArray(this.index+d)}},__updateGL:function(a,b){a=a.gl;b=null!=b?b:this.value;var c=this.__isBool?b:null,d=this.__isFloat?b:null,e=this.__isInt?b:null;if(this.__isUniform)if(null!=b&&b.length>=this.__length)switch(this.type){case 0:a.uniform1i(this.index,c[0]?1:0);break;case 1:a.uniform2i(this.index,
c[0]?1:0,c[1]?1:0);break;case 2:a.uniform3i(this.index,c[0]?1:0,c[1]?1:0,c[2]?1:0);break;case 3:a.uniform4i(this.index,c[0]?1:0,c[1]?1:0,c[2]?1:0,c[3]?1:0);break;case 4:a.uniform1f(this.index,d[0]);break;case 5:a.uniform2f(this.index,d[0],d[1]);break;case 6:a.uniform3f(this.index,d[0],d[1],d[2]);break;case 7:a.uniform4f(this.index,d[0],d[1],d[2],d[3]);break;case 8:a.uniform1i(this.index,e[0]);break;case 9:a.uniform2i(this.index,e[0],e[1]);break;case 10:a.uniform3i(this.index,e[0],e[1],e[2]);break;
case 11:a.uniform4i(this.index,e[0],e[1],e[2],e[3]);break;case 12:this.__uniformMatrix[0]=d[0];this.__uniformMatrix[1]=d[1];this.__uniformMatrix[2]=d[2];this.__uniformMatrix[3]=d[3];Ab.uniformMatrix2fv(a,this.index,!1,this.__uniformMatrix);break;case 16:this.__uniformMatrix[0]=d[0];this.__uniformMatrix[1]=d[1];this.__uniformMatrix[2]=d[2];this.__uniformMatrix[3]=d[3];this.__uniformMatrix[4]=d[4];this.__uniformMatrix[5]=d[5];this.__uniformMatrix[6]=d[6];this.__uniformMatrix[7]=d[7];this.__uniformMatrix[8]=
d[8];Ab.uniformMatrix3fv(a,this.index,!1,this.__uniformMatrix);break;case 20:this.__uniformMatrix[0]=d[0],this.__uniformMatrix[1]=d[1],this.__uniformMatrix[2]=d[2],this.__uniformMatrix[3]=d[3],this.__uniformMatrix[4]=d[4],this.__uniformMatrix[5]=d[5],this.__uniformMatrix[6]=d[6],this.__uniformMatrix[7]=d[7],this.__uniformMatrix[8]=d[8],this.__uniformMatrix[9]=d[9],this.__uniformMatrix[10]=d[10],this.__uniformMatrix[11]=d[11],this.__uniformMatrix[12]=d[12],this.__uniformMatrix[13]=d[13],this.__uniformMatrix[14]=
d[14],this.__uniformMatrix[15]=d[15],Ab.uniformMatrix4fv(a,this.index,!1,this.__uniformMatrix)}else switch(this.type){case 1:case 9:a.uniform2i(this.index,0,0);break;case 3:case 11:a.uniform4i(this.index,0,0,0,0);break;case 4:a.uniform1f(this.index,0);break;case 5:a.uniform2f(this.index,0,0);break;case 6:a.uniform3f(this.index,0,0,0);break;case 7:a.uniform4f(this.index,0,0,0,0);break;case 0:case 8:a.uniform1i(this.index,0);break;case 2:case 10:a.uniform3i(this.index,0,0,0);break;case 12:this.__uniformMatrix[0]=
0;this.__uniformMatrix[1]=0;this.__uniformMatrix[2]=0;this.__uniformMatrix[3]=0;Ab.uniformMatrix2fv(a,this.index,!1,this.__uniformMatrix);break;case 16:this.__uniformMatrix[0]=0;this.__uniformMatrix[1]=0;this.__uniformMatrix[2]=0;this.__uniformMatrix[3]=0;this.__uniformMatrix[4]=0;this.__uniformMatrix[5]=0;this.__uniformMatrix[6]=0;this.__uniformMatrix[7]=0;this.__uniformMatrix[8]=0;Ab.uniformMatrix3fv(a,this.index,!1,this.__uniformMatrix);break;case 20:this.__uniformMatrix[0]=0,this.__uniformMatrix[1]=
0,this.__uniformMatrix[2]=0,this.__uniformMatrix[3]=0,this.__uniformMatrix[4]=0,this.__uniformMatrix[5]=0,this.__uniformMatrix[6]=0,this.__uniformMatrix[7]=0,this.__uniformMatrix[8]=0,this.__uniformMatrix[9]=0,this.__uniformMatrix[10]=0,this.__uniformMatrix[11]=0,this.__uniformMatrix[12]=0,this.__uniformMatrix[13]=0,this.__uniformMatrix[14]=0,this.__uniformMatrix[15]=0,Ab.uniformMatrix4fv(a,this.index,!1,this.__uniformMatrix)}else if(this.__useArray||null!=b&&b.length!=this.__length)for(b=0,c=this.__arrayLength;b<
c;)d=b++,a.enableVertexAttribArray(this.index+d);else{for(var f=0,g=this.__arrayLength;f<g;){var k=f++;a.disableVertexAttribArray(this.index+k)}if(null!=b)switch(this.type){case 0:a.vertexAttrib1f(this.index,c[0]?1:0);break;case 1:a.vertexAttrib2f(this.index,c[0]?1:0,c[1]?1:0);break;case 2:a.vertexAttrib3f(this.index,c[0]?1:0,c[1]?1:0,c[2]?1:0);break;case 3:a.vertexAttrib4f(this.index,c[0]?1:0,c[1]?1:0,c[2]?1:0,c[3]?1:0);break;case 4:a.vertexAttrib1f(this.index,d[0]);break;case 5:a.vertexAttrib2f(this.index,
d[0],d[1]);break;case 6:a.vertexAttrib3f(this.index,d[0],d[1],d[2]);break;case 7:a.vertexAttrib4f(this.index,d[0],d[1],d[2],d[3]);break;case 8:a.vertexAttrib1f(this.index,e[0]);break;case 9:a.vertexAttrib2f(this.index,e[0],e[1]);break;case 10:a.vertexAttrib3f(this.index,e[0],e[1],e[2]);break;case 11:a.vertexAttrib4f(this.index,e[0],e[1],e[2],e[3]);break;case 12:a.vertexAttrib2f(this.index+0,d[0],d[1]);a.vertexAttrib2f(this.index+1,d[2],d[3]);break;case 16:a.vertexAttrib3f(this.index+0,d[0],d[1],d[2]);
a.vertexAttrib3f(this.index+1,d[3],d[4],d[5]);a.vertexAttrib3f(this.index+2,d[6],d[7],d[8]);break;case 20:a.vertexAttrib4f(this.index+0,d[0],d[1],d[2],d[3]),a.vertexAttrib4f(this.index+1,d[4],d[5],d[6],d[7]),a.vertexAttrib4f(this.index+2,d[8],d[9],d[10],d[11]),a.vertexAttrib4f(this.index+3,d[12],d[13],d[14],d[15])}else switch(this.type){case 1:case 5:case 9:a.vertexAttrib2f(this.index,0,0);break;case 3:case 7:case 11:a.vertexAttrib4f(this.index,0,0,0,0);break;case 0:case 4:case 8:a.vertexAttrib1f(this.index,
0);break;case 2:case 6:case 10:a.vertexAttrib3f(this.index,0,0,0);break;case 12:a.vertexAttrib2f(this.index+0,0,0);a.vertexAttrib2f(this.index+1,0,0);break;case 16:a.vertexAttrib3f(this.index+0,0,0,0);a.vertexAttrib3f(this.index+1,0,0,0);a.vertexAttrib3f(this.index+2,0,0,0);break;case 20:a.vertexAttrib4f(this.index+0,0,0,0,0),a.vertexAttrib4f(this.index+1,0,0,0,0),a.vertexAttrib4f(this.index+2,0,0,0,0),a.vertexAttrib4f(this.index+3,0,0,0,0)}}},__updateGLFromBuffer:function(a,b,c,d,e){a=a.gl;if(this.__isUniform){if(d>=
this.__length)switch(this.type){case 1:case 9:a.uniform2i(this.index,b[c]|0,b[c+1]|0);break;case 3:case 11:a.uniform4i(this.index,b[c]|0,b[c+1]|0,b[c+2]|0,b[c+3]|0);break;case 4:a.uniform1f(this.index,b[c]);break;case 5:a.uniform2f(this.index,b[c],b[c+1]);break;case 6:a.uniform3f(this.index,b[c],b[c+1],b[c+2]);break;case 7:a.uniform4f(this.index,b[c],b[c+1],b[c+2],b[c+3]);break;case 0:case 8:a.uniform1i(this.index,b[c]|0);break;case 2:case 10:a.uniform3i(this.index,b[c]|0,b[c+1]|0,b[c+2]|0);break;
case 12:this.__uniformMatrix[0]=b[c];this.__uniformMatrix[1]=b[c+1];this.__uniformMatrix[2]=b[c+2];this.__uniformMatrix[3]=b[c+3];Ab.uniformMatrix2fv(a,this.index,!1,this.__uniformMatrix);break;case 16:this.__uniformMatrix[0]=b[c];this.__uniformMatrix[1]=b[c+1];this.__uniformMatrix[2]=b[c+2];this.__uniformMatrix[3]=b[c+3];this.__uniformMatrix[4]=b[c+4];this.__uniformMatrix[5]=b[c+5];this.__uniformMatrix[6]=b[c+6];this.__uniformMatrix[7]=b[c+7];this.__uniformMatrix[8]=b[c+8];Ab.uniformMatrix3fv(a,
this.index,!1,this.__uniformMatrix);break;case 20:this.__uniformMatrix[0]=b[c],this.__uniformMatrix[1]=b[c+1],this.__uniformMatrix[2]=b[c+2],this.__uniformMatrix[3]=b[c+3],this.__uniformMatrix[4]=b[c+4],this.__uniformMatrix[5]=b[c+5],this.__uniformMatrix[6]=b[c+6],this.__uniformMatrix[7]=b[c+7],this.__uniformMatrix[8]=b[c+8],this.__uniformMatrix[9]=b[c+9],this.__uniformMatrix[10]=b[c+10],this.__uniformMatrix[11]=b[c+11],this.__uniformMatrix[12]=b[c+12],this.__uniformMatrix[13]=b[c+13],this.__uniformMatrix[14]=
b[c+14],this.__uniformMatrix[15]=b[c+15],Ab.uniformMatrix4fv(a,this.index,!1,this.__uniformMatrix)}}else if(this.__internal||0!=d&&d!=this.__length){b=a.FLOAT;this.__isBool?b=a.INT:this.__isInt&&(b=a.INT);for(var f=0,g=this.__arrayLength;f<g;){var k=f++;a.enableVertexAttribArray(this.index+k)}if(0<d)for(d=0,f=this.__arrayLength;d<f;)g=d++,a.vertexAttribPointer(this.index+g,this.__length,b,!1,4*this.__length,4*(c+e*this.__length+g*this.__arrayLength))}else{e=0;for(f=this.__arrayLength;e<f;)g=e++,a.disableVertexAttribArray(this.index+
g);if(0<d)switch(this.type){case 1:case 5:case 9:a.vertexAttrib2f(this.index,b[c],b[c+1]);break;case 3:case 7:case 11:a.vertexAttrib4f(this.index,b[c],b[c+1],b[c+2],b[c+3]);break;case 0:case 4:case 8:a.vertexAttrib1f(this.index,b[c]);break;case 2:case 6:case 10:a.vertexAttrib3f(this.index,b[c],b[c+1],b[c+2]);break;case 12:a.vertexAttrib2f(this.index+0,b[c],b[c+1]);a.vertexAttrib2f(this.index+1,b[c+2],b[c+2+1]);break;case 16:a.vertexAttrib3f(this.index+0,b[c],b[c+1],b[c+2]);a.vertexAttrib3f(this.index+
1,b[c+3],b[c+3+1],b[c+3+2]);a.vertexAttrib3f(this.index+2,b[c+6],b[c+6+1],b[c+6+2]);break;case 20:a.vertexAttrib4f(this.index+0,b[c],b[c+1],b[c+2],b[c+3]),a.vertexAttrib4f(this.index+1,b[c+4],b[c+4+1],b[c+4+2],b[c+4+3]),a.vertexAttrib4f(this.index+2,b[c+8],b[c+8+1],b[c+8+2],b[c+8+3]),a.vertexAttrib4f(this.index+3,b[c+12],b[c+12+1],b[c+12+2],b[c+12+3])}else switch(this.type){case 1:case 5:case 9:a.vertexAttrib2f(this.index,0,0);break;case 3:case 7:case 11:a.vertexAttrib4f(this.index,0,0,0,0);break;
case 0:case 4:case 8:a.vertexAttrib1f(this.index,0);break;case 2:case 6:case 10:a.vertexAttrib3f(this.index,0,0,0);break;case 12:a.vertexAttrib2f(this.index+0,0,0);a.vertexAttrib2f(this.index+1,0,0);break;case 16:a.vertexAttrib3f(this.index+0,0,0,0);a.vertexAttrib3f(this.index+1,0,0,0);a.vertexAttrib3f(this.index+2,0,0,0);break;case 20:a.vertexAttrib4f(this.index+0,0,0,0,0),a.vertexAttrib4f(this.index+1,0,0,0,0),a.vertexAttrib4f(this.index+2,0,0,0,0),a.vertexAttrib4f(this.index+3,0,0,0,0)}}},set_name:function(a){this.__internal=
ba.startsWith(a,"openfl_");return this.name=a},__class__:Yj,__properties__:{set_name:"set_name"}};var ee={};h["openfl.display._ShaderParameterType.ShaderParameterType_Impl_"]=ee;ee.__name__="openfl.display._ShaderParameterType.ShaderParameterType_Impl_";ee.fromString=function(a){switch(a){case "bool":return 0;case "bool2":return 1;case "bool3":return 1;case "bool4":return 1;case "float":return 4;case "float2":return 5;case "float3":return 6;case "float4":return 7;case "int":return 8;case "int2":return 9;
case "int3":return 10;case "int4":return 11;case "matrix2x2":return 12;case "matrix2x3":return 13;case "matrix2x4":return 14;case "matrix3x2":return 15;case "matrix3x3":return 16;case "matrix3x4":return 17;case "matrix4x2":return 18;case "matrix4x3":return 19;case "matrix4x4":return 20;default:return null}};ee.toString=function(a){switch(a){case 0:return"bool";case 1:return"bool2";case 2:return"bool3";case 3:return"bool4";case 4:return"float";case 5:return"float2";case 6:return"float3";case 7:return"float4";
case 8:return"int";case 9:return"int2";case 10:return"int3";case 11:return"int4";case 12:return"matrix2x2";case 13:return"matrix2x3";case 14:return"matrix2x4";case 15:return"matrix3x2";case 16:return"matrix3x3";case 17:return"matrix3x4";case 18:return"matrix4x2";case 19:return"matrix4x3";case 20:return"matrix4x4";default:return null}};var cp={};h["openfl.display._ShaderPrecision.ShaderPrecision_Impl_"]=cp;cp.__name__="openfl.display._ShaderPrecision.ShaderPrecision_Impl_";cp.fromString=function(a){switch(a){case "fast":return 0;
case "full":return 1;default:return null}};cp.toString=function(a){switch(a){case 0:return"fast";case 1:return"full";default:return null}};var Ue=function(){sa.call(this);this.__type=Ph.SHAPE};h["openfl.display.Shape"]=Ue;Ue.__name__="openfl.display.Shape";Ue.__super__=sa;Ue.prototype=w(sa.prototype,{get_graphics:function(){null==this.__graphics&&(this.__graphics=new nf(this));return this.__graphics},__class__:Ue,__properties__:w(sa.prototype.__properties__,{get_graphics:"get_graphics"})});var uf=
function(a,b,c,d){Za.call(this);this.__type=Ph.SIMPLE_BUTTON;this.enabled=!0;this.trackAsMenu=!1;this.useHandCursor=!0;this.__upState=null!=a?a:new sa;this.__overState=b;this.__downState=c;this.set_hitTestState(null!=d?d:new sa);this.addEventListener("mouseDown",v(this,this.__this_onMouseDown));this.addEventListener("mouseOut",v(this,this.__this_onMouseOut));this.addEventListener("mouseOver",v(this,this.__this_onMouseOver));this.addEventListener("mouseUp",v(this,this.__this_onMouseUp));this.__tabEnabled=
!0;this.set___currentState(this.__upState);null!=uf.__constructor?(a=uf.__constructor,uf.__constructor=null,a(this)):null!=uf.__initSymbol&&(a=uf.__initSWF,this.__symbol=uf.__initSymbol,uf.__initSWF=null,uf.__initSymbol=null,this.__fromSymbol(a,this.__symbol))};h["openfl.display.SimpleButton"]=uf;uf.__name__="openfl.display.SimpleButton";uf.__super__=Za;uf.prototype=w(Za.prototype,{enabled:null,trackAsMenu:null,useHandCursor:null,__currentState:null,__downState:null,__hitTestState:null,__ignoreEvent:null,
__overState:null,__previousStates:null,__soundTransform:null,__symbol:null,__upState:null,__fromSymbol:function(a,b){this.__symbol=b;null!=b.downState&&this.set_downState(b.downState.__createObject(a));null!=b.hitState&&this.set_hitTestState(b.hitState.__createObject(a));null!=b.overState&&this.set_overState(b.overState.__createObject(a));null!=b.upState&&this.set_upState(b.upState.__createObject(a))},__getBounds:function(a,b){Za.prototype.__getBounds.call(this,a,b);var c=Ha.__pool.get(),d=this.__currentState.__transform;
c.a=d.a*b.a+d.b*b.c;c.b=d.a*b.b+d.b*b.d;c.c=d.c*b.a+d.d*b.c;c.d=d.c*b.b+d.d*b.d;c.tx=d.tx*b.a+d.ty*b.c+b.tx;c.ty=d.tx*b.b+d.ty*b.d+b.ty;this.__currentState.__getBounds(a,c);Ha.__pool.release(c)},__getRenderBounds:function(a,b){if(null!=this.__scrollRect)Za.prototype.__getRenderBounds.call(this,a,b);else{Za.prototype.__getBounds.call(this,a,b);var c=Ha.__pool.get(),d=this.__currentState.__transform;c.a=d.a*b.a+d.b*b.c;c.b=d.a*b.b+d.b*b.d;c.c=d.c*b.a+d.d*b.c;c.d=d.c*b.b+d.d*b.d;c.tx=d.tx*b.a+d.ty*b.c+
b.tx;c.ty=d.tx*b.b+d.ty*b.d+b.ty;this.__currentState.__getRenderBounds(a,c);Ha.__pool.release(c)}},__getCursor:function(){return this.useHandCursor&&!this.__ignoreEvent&&this.enabled?"button":null},__hitTest:function(a,b,c,d,e,f){var g=!1;if(null!=this.get_hitTestState())this.get_hitTestState().__hitTest(a,b,c,d,e,f)&&(null!=d&&(0==d.length?d[0]=f:d[d.length-1]=f),g=!e||this.mouseEnabled);else if(null!=this.__currentState){if(!f.get_visible()||this.__isMask||e&&!this.mouseEnabled||null!=this.get_mask()&&
!this.get_mask().__hitTestMask(a,b))return!1;this.__currentState.__hitTest(a,b,c,d,e,f)&&(g=e)}if(null!=d)for(;1<d.length&&d[d.length-1]==d[d.length-2];)d.pop();return g},__hitTestMask:function(a,b){var c=!1;this.__currentState.__hitTestMask(a,b)&&(c=!0);return c},__setStageReference:function(a){Za.prototype.__setStageReference.call(this,a);null!=this.__currentState&&this.__currentState.__setStageReference(a);null!=this.get_hitTestState()&&this.get_hitTestState()!=this.__currentState&&this.get_hitTestState().__setStageReference(a)},
__setTransformDirty:function(){Za.prototype.__setTransformDirty.call(this);null!=this.__currentState&&this.__currentState.__setTransformDirty();null!=this.get_hitTestState()&&this.get_hitTestState()!=this.__currentState&&this.get_hitTestState().__setTransformDirty()},__update:function(a,b){Za.prototype.__update.call(this,a,b);b&&(null!=this.__currentState&&this.__currentState.__update(a,!0),null!=this.get_hitTestState()&&this.get_hitTestState()!=this.__currentState&&this.get_hitTestState().__update(a,
!0))},__updateTransforms:function(a){Za.prototype.__updateTransforms.call(this,a);null!=this.__currentState&&this.__currentState.__updateTransforms();null!=this.get_hitTestState()&&this.get_hitTestState()!=this.__currentState&&this.get_hitTestState().__updateTransforms()},get_downState:function(){return this.__downState},set_downState:function(a){null!=this.__downState&&this.__currentState==this.__downState&&this.set___currentState(this.__downState);return this.__downState=a},get_hitTestState:function(){return this.__hitTestState},
set_hitTestState:function(a){null!=this.__hitTestState&&this.__hitTestState!=a&&this.__hitTestState!=this.get_downState()&&this.__hitTestState!=this.get_upState()&&this.__hitTestState!=this.get_overState()&&(this.__hitTestState.__renderParent=null);null!=a&&(a.__renderParent=this,a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty()));return this.__hitTestState=a},get_overState:function(){return this.__overState},set_overState:function(a){null!=this.__overState&&this.__currentState==this.__overState&&
this.set___currentState(a);return this.__overState=a},get_soundTransform:function(){null==this.__soundTransform&&(this.__soundTransform=new Tf);return new Tf(this.__soundTransform.volume,this.__soundTransform.pan)},set_soundTransform:function(a){this.__soundTransform=new Tf(a.volume,a.pan);return a},get_upState:function(){return this.__upState},set_upState:function(a){null!=this.__upState&&this.__currentState==this.__upState&&this.set___currentState(a);return this.__upState=a},set___currentState:function(a){null!=
this.__currentState&&this.__currentState!=this.get_hitTestState()&&(this.__currentState.__renderParent=null);null!=a&&null!=a.parent&&a.parent.removeChild(a);sa.__supportDOM&&null==this.__previousStates&&(this.__previousStates=Ua.toObjectVector(null));if(a!=this.__currentState){if(sa.__supportDOM){null!=this.__currentState&&(this.__currentState.__setStageReference(null),this.__previousStates.push(this.__currentState));var b=this.__previousStates.indexOf(a,0);-1<b&&this.__previousStates.splice(b,1)}null!=
a&&(a.__renderParent=this,a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty()));this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())}return this.__currentState=a},__this_onMouseDown:function(a){this.enabled&&this.set___currentState(this.get_downState())},__this_onMouseOut:function(a){this.__ignoreEvent=!1;this.get_upState()!=this.__currentState&&this.set___currentState(this.get_upState())},__this_onMouseOver:function(a){a.buttonDown&&(this.__ignoreEvent=!0);this.get_overState()!=
this.__currentState&&null!=this.get_overState()&&!this.__ignoreEvent&&this.enabled&&this.set___currentState(this.get_overState())},__this_onMouseUp:function(a){this.__ignoreEvent=!1;this.enabled&&null!=this.get_overState()?this.set___currentState(this.get_overState()):this.set___currentState(this.get_upState())},__class__:uf,__properties__:w(Za.prototype.__properties__,{set___currentState:"set___currentState",set_upState:"set_upState",get_upState:"get_upState",set_soundTransform:"set_soundTransform",
get_soundTransform:"get_soundTransform",set_overState:"set_overState",get_overState:"get_overState",set_hitTestState:"set_hitTestState",get_hitTestState:"get_hitTestState",set_downState:"set_downState",get_downState:"get_downState"})});var dj={};h["openfl.display._SpreadMethod.SpreadMethod_Impl_"]=dj;dj.__name__="openfl.display._SpreadMethod.SpreadMethod_Impl_";dj.fromInt=function(a){return a};dj.fromString=function(a){switch(a){case "pad":return 0;case "reflect":return 1;case "repeat":return 2;default:return null}};
dj.toInt=function(a){return a};dj.toString=function(a){switch(a){case 0:return"pad";case 1:return"reflect";case 2:return"repeat";default:return null}};var hk=function(a,b){db.call(this);this.set_name(null);this.__color=-1;this.__colorSplit=[255,255,255];this.__colorString="#FFFFFF";this.__contentsScaleFactor=1;this.__deltaTime=this.__currentTabOrderIndex=0;this.__displayState=2;this.__logicalHeight=this.__logicalWidth=this.__lastClickTime=this.__mouseY=this.__mouseX=0;this.__displayMatrix=new Ha;
this.__displayRect=new ia;this.__renderDirty=!0;this.stage3Ds=Ua.toObjectVector(null);this.stage3Ds.push(new ej(this));this.stage3Ds.push(new ej(this));this.stage3Ds.push(new ej(this));this.stage3Ds.push(new ej(this));this.stage=this;this.align=6;this.allowsFullScreenInteractive=this.allowsFullScreen=!0;this.__quality=1;this.__scaleMode=2;this.showDefaultContextMenu=!0;this.softKeyboardRect=new ia;this.stageFocusRect=!0;this.__macKeyboard=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent)||
/Mac/.test(navigator.platform);this.__clearBeforeRender=!0;this.__forceRender=!1;this.__stack=[];this.__rollOutStack=[];this.__mouseOutStack=[];this.__touchData=new Wa;this.application=a.application;this.window=a;this.set_color(b);this.__contentsScaleFactor=a.__scale;this.__wasFullscreen=a.__fullscreen;this.__resize();null==$a.get_current().stage&&this.stage.addChild($a.get_current())};h["openfl.display.Stage"]=hk;hk.__name__="openfl.display.Stage";hk.__interfaces__=[fl];hk.__super__=db;hk.prototype=
w(db.prototype,{align:null,allowsFullScreen:null,allowsFullScreenInteractive:null,application:null,context3D:null,showDefaultContextMenu:null,softKeyboardRect:null,stage3Ds:null,stageFocusRect:null,stageHeight:null,stageWidth:null,window:null,__cacheFocus:null,__clearBeforeRender:null,__color:null,__colorSplit:null,__colorString:null,__contentsScaleFactor:null,__currentTabOrderIndex:null,__deltaTime:null,__dirty:null,__displayMatrix:null,__displayRect:null,__displayState:null,__dragBounds:null,__dragObject:null,
__dragOffsetX:null,__dragOffsetY:null,__focus:null,__forceRender:null,__fullscreen:null,__fullScreenSourceRect:null,__invalidated:null,__lastClickTime:null,__logicalWidth:null,__logicalHeight:null,__macKeyboard:null,__mouseDownLeft:null,__mouseDownMiddle:null,__mouseDownRight:null,__mouseOutStack:null,__mouseOverTarget:null,__mouseX:null,__mouseY:null,__pendingMouseEvent:null,__pendingMouseX:null,__pendingMouseY:null,__quality:null,__renderer:null,__rendering:null,__rollOutStack:null,__scaleMode:null,
__stack:null,__touchData:null,__transparent:null,__wasDirty:null,__wasFullscreen:null,__primaryTouch:null,invalidate:function(){this.__renderDirty=this.__invalidated=!0},localToGlobal:function(a){return a.clone()},__broadcastEvent:function(a){var b=a.type,c=sa.__broadcastEvents;if(null!=q[b]?c.existsReserved(b):c.h.hasOwnProperty(b))for(b=a.type,c=sa.__broadcastEvents,b=null!=q[b]?c.getReserved(b):c.h[b],c=0;c<b.length;){var d=b[c];++c;if(d.stage==this||null==d.stage)try{d.__dispatch(a)}catch(e){ra.lastException=
e,this.__handleError(e instanceof E?e.val:e)}}},__createRenderer:function(){var a=1;1<this.window.__scale&&(a=this.window.devicePixelRatio||1);var b=this.window.__width*this.window.__scale|0,c=this.window.__height*this.window.__scale|0;switch(this.window.context.type){case "canvas":var d=new ih(this.window.context.canvas2D);d.pixelRatio=a;this.__renderer=d;break;case "dom":d=new zl(this.window.context.dom);d.pixelRatio=a;this.__renderer=d;break;case "opengl":case "opengles":case "webgl":this.context3D=
new Hc(this),this.context3D.configureBackBuffer(b,c,0,!0,!0,!0),this.context3D.present(),null==na.__hardwareRenderer&&(na.__hardwareRenderer=new zb(this.context3D)),this.__renderer=new zb(this.context3D)}null!=this.__renderer&&(a=this.get_quality(),this.__renderer.__allowSmoothing=2!=a,this.__renderer.__worldTransform=this.__displayMatrix,this.__renderer.__stage=this,this.__renderer.__resize(b,c))},__dispatchEvent:function(a){try{return db.prototype.__dispatchEvent.call(this,a)}catch(b){return ra.lastException=
b,this.__handleError(b instanceof E?b.val:b),!1}},__dispatchPendingMouseEvent:function(){this.__pendingMouseEvent&&(this.__onMouse("mouseMove",this.__pendingMouseX,this.__pendingMouseY,0),this.__pendingMouseEvent=!1)},__dispatchStack:function(a,b){try{var c=b.length;if(0==c){a.eventPhase=2;var d=a.target;d.__dispatch(a)}else{a.eventPhase=1;a.target=b[b.length-1];for(var e=0,f=c-1;e<f;){var g=e++;b[g].__dispatch(a);if(a.__isCanceled)return}a.eventPhase=2;d=a.target;d.__dispatch(a);if(!a.__isCanceled&&
a.bubbles)for(a.eventPhase=3,d=c-2;0<=d;){b[d].__dispatch(a);if(a.__isCanceled)break;--d}}}catch(k){ra.lastException=k,this.__handleError(k instanceof E?k.val:k)}},__dispatchTarget:function(a,b){try{return a.__dispatchEvent(b)}catch(c){return ra.lastException=c,this.__handleError(c instanceof E?c.val:c),!1}},__drag:function(a){var b=this.__dragObject.parent;if(null!=b){b=b.__getWorldTransform();var c=b.a*b.d-b.b*b.c;if(0==c)a.x=-b.tx,a.y=-b.ty;else{var d=1/c*(b.c*(b.ty-a.y)+b.d*(a.x-b.tx));a.y=1/
c*(b.a*(a.y-b.ty)+b.b*(b.tx-a.x));a.x=d}}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)},__getInteractive:function(a){null!=a&&a.push(this);return!0},__globalToLocal:function(a,b){a!=b&&b.copyFrom(a);
return b},__handleError:function(a){var b=new ui("uncaughtError",!0,!0,a);try{$a.get_current().__loaderInfo.uncaughtErrorEvents.dispatchEvent(b)}catch(e){ra.lastException=e}if(!b.__preventDefault){try{var c=ra.lastException;if(null!=c&&Object.prototype.hasOwnProperty.call(c,"stack")&&null!=c.stack&&""!=c.stack)console.log(c.stack),a.stack=c.stack;else{var d=ra.toString(ra.callStack());console.log(d)}}catch(e){ra.lastException=e}throw a;}},__onKey:function(a,b,c){this.__dispatchPendingMouseEvent();
Tb.__altKey=wb.get_altKey(c);Tb.__commandKey=wb.get_metaKey(c);Tb.__ctrlKey=wb.get_ctrlKey(c);Tb.__shiftKey=wb.get_shiftKey(c);var d=[];null==this.__focus?this.__getInteractive(d):this.__focus.__getInteractive(d);if(0<d.length){switch(b){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:var e=
3;break;case 1073742048:case 1073742049:case 1073742050:case 1073742051:e=1;break;case 1073742052:case 1073742053:case 1073742054:case 1073742055:e=2;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=13;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}var f=Fa.__getCharCode(b,wb.get_shiftKey(c));e=new Kh(a,!0,!0,f,b,e,this.__macKeyboard?wb.get_ctrlKey(c)||wb.get_metaKey(c):wb.get_ctrlKey(c),wb.get_altKey(c),wb.get_shiftKey(c),wb.get_ctrlKey(c),wb.get_metaKey(c));d.reverse();this.__dispatchStack(e,d);if(e.__preventDefault)"keyDown"==a?this.window.onKeyDown.cancel():this.window.onKeyUp.cancel();else if("keyDown"==a&&9==b){d=[];this.__tabTest(d);e=-1;a=null;b=wb.get_shiftKey(c)?-1:1;if(1<d.length)if(Me.sort(d,function(a,b){return a.get_tabIndex()-
b.get_tabIndex()}),-1==d[d.length-1].get_tabIndex())e=null!=this.get_focus()?0:this.__currentTabOrderIndex;else{for(e=0;e<d.length;){if(-1<d[e].get_tabIndex()){0<e&&d.splice(0,e);break}++e}null!=this.get_focus()?(e=d.indexOf(this.get_focus()),e=0>e?0:e+b):e=this.__currentTabOrderIndex}else 1==d.length&&(a=d[0],this.get_focus()==a&&(a=null));1==d.length||0==d.length&&null!=this.get_focus()?e=0:1<d.length&&(0>e&&(e+=d.length),e%=d.length,a=d[e],a==this.get_focus()&&(e+=b,0>e&&(e+=d.length),e%=d.length,
a=d[e]));b=null;null!=this.get_focus()&&(b=new Lf("keyFocusChange",!0,!0,a,wb.get_shiftKey(c),0),d=[],this.get_focus().__getInteractive(d),d.reverse(),this.__dispatchStack(b,d));null!=b&&b.isDefaultPrevented()||(this.__currentTabOrderIndex=e,null!=a&&this.set_focus(a))}}},__onLimeCreateWindow:function(a){if(this.window==a){var b=v(this,this.__onLimeWindowActivate);a.onActivate.add(function(){b(a)});var c=v(this,this.__onLimeWindowClose);a.onClose.add(function(){c(a)},!1,-9E3);var d=v(this,this.__onLimeWindowDeactivate);
a.onDeactivate.add(function(){d(a)});var e=v(this,this.__onLimeWindowDropFile);a.onDropFile.add(function(b){e(a,b)});var f=v(this,this.__onLimeWindowEnter);a.onEnter.add(function(){f(a)});var g=v(this,this.__onLimeWindowExpose);a.onExpose.add(function(){g(a)});var k=v(this,this.__onLimeWindowFocusIn);a.onFocusIn.add(function(){k(a)});var l=v(this,this.__onLimeWindowFocusOut);a.onFocusOut.add(function(){l(a)});var m=v(this,this.__onLimeWindowFullscreen);a.onFullscreen.add(function(){m(a)});var p=v(this,
this.__onLimeKeyDown);a.onKeyDown.add(function(b,c){p(a,b,c)});var n=v(this,this.__onLimeKeyUp);a.onKeyUp.add(function(b,c){n(a,b,c)});var h=v(this,this.__onLimeWindowLeave);a.onLeave.add(function(){h(a)});var q=v(this,this.__onLimeWindowMinimize);a.onMinimize.add(function(){q(a)});var r=v(this,this.__onLimeMouseDown);a.onMouseDown.add(function(b,c,d){r(a,b,c,d)});var t=v(this,this.__onLimeMouseMove);a.onMouseMove.add(function(b,c){t(a,b,c)});var u=v(this,this.__onLimeMouseMoveRelative);a.onMouseMoveRelative.add(function(b,
c){u(a,b,c)});var x=v(this,this.__onLimeMouseUp);a.onMouseUp.add(function(b,c,d){x(a,b,c,d)});var w=v(this,this.__onLimeMouseWheel);a.onMouseWheel.add(function(b,c,d){w(a,b,c,d)});var C=v(this,this.__onLimeWindowMove);a.onMove.add(function(b,c){C(a,b,c)});a.onRender.add(v(this,this.__onLimeRender));a.onRenderContextLost.add(v(this,this.__onLimeRenderContextLost));a.onRenderContextRestored.add(v(this,this.__onLimeRenderContextRestored));var J=v(this,this.__onLimeWindowResize);a.onResize.add(function(b,
c){J(a,b,c)});var Q=v(this,this.__onLimeWindowRestore);a.onRestore.add(function(){Q(a)});var F=v(this,this.__onLimeTextEdit);a.onTextEdit.add(function(b,c,d){F(a,b,c,d)});var B=v(this,this.__onLimeTextInput);a.onTextInput.add(function(b){B(a,b)});this.__onLimeWindowCreate(a)}},__onLimeGamepadAxisMove:function(a,b,c){try{fc.__onGamepadAxisMove(a,b,c)}catch(d){ra.lastException=d,this.__handleError(d instanceof E?d.val:d)}},__onLimeGamepadButtonDown:function(a,b){try{fc.__onGamepadButtonDown(a,b)}catch(c){ra.lastException=
c,this.__handleError(c instanceof E?c.val:c)}},__onLimeGamepadButtonUp:function(a,b){try{fc.__onGamepadButtonUp(a,b)}catch(c){ra.lastException=c,this.__handleError(c instanceof E?c.val:c)}},__onLimeGamepadConnect:function(a){try{fc.__onGamepadConnect(a)}catch(f){ra.lastException=f,this.__handleError(f instanceof E?f.val:f)}var b=v(this,this.__onLimeGamepadAxisMove);a.onAxisMove.add(function(c,d){b(a,c,d)});var c=v(this,this.__onLimeGamepadButtonDown);a.onButtonDown.add(function(b){c(a,b)});var d=
v(this,this.__onLimeGamepadButtonUp);a.onButtonUp.add(function(b){d(a,b)});var e=v(this,this.__onLimeGamepadDisconnect);a.onDisconnect.add(function(){e(a)})},__onLimeGamepadDisconnect:function(a){try{fc.__onGamepadDisconnect(a)}catch(b){ra.lastException=b,this.__handleError(b instanceof E?b.val:b)}},__onLimeKeyDown:function(a,b,c){null!=this.window&&this.window==a&&this.__onKey("keyDown",b,c)},__onLimeKeyUp:function(a,b,c){null!=this.window&&this.window==a&&this.__onKey("keyUp",b,c)},__onLimeModuleExit:function(a){null!=
this.window&&(a=new da("deactivate"),this.__broadcastEvent(a))},__onLimeMouseDown:function(a,b,c,d){if(null!=this.window&&this.window==a){this.__dispatchPendingMouseEvent();switch(d){case 1:var e="middleMouseDown";break;case 2:e="rightMouseDown";break;default:e="mouseDown"}this.__onMouse(e,b*a.__scale|0,c*a.__scale|0,d);this.showDefaultContextMenu||2!=d||a.onMouseDown.cancel()}},__onLimeMouseMove:function(a,b,c){null!=this.window&&this.window==a&&(this.__pendingMouseEvent=!0,this.__pendingMouseX=
b*a.__scale|0,this.__pendingMouseY=c*a.__scale|0)},__onLimeMouseMoveRelative:function(a,b,c){},__onLimeMouseUp:function(a,b,c,d){if(null!=this.window&&this.window==a){this.__dispatchPendingMouseEvent();switch(d){case 1:var e="middleMouseUp";break;case 2:e="rightMouseUp";break;default:e="mouseUp"}this.__onMouse(e,b*a.__scale|0,c*a.__scale|0,d);this.showDefaultContextMenu||2!=d||a.onMouseUp.cancel()}},__onLimeMouseWheel:function(a,b,c,d){null!=this.window&&this.window==a&&(this.__dispatchPendingMouseEvent(),
d==Cq.PIXELS?this.__onMouseWheel(b*a.__scale|0,c*a.__scale|0,d):this.__onMouseWheel(b|0,c|0,d))},__onLimeRender:function(a){if(!this.__rendering){this.__rendering=!0;this.__broadcastEvent(new da("enterFrame"));this.__broadcastEvent(new da("frameConstructed"));this.__broadcastEvent(new da("exitFrame"));this.__renderable=!0;this.__enterFrame(this.__deltaTime);this.__deltaTime=0;a=null!=this.__renderer&&(this.__renderDirty||this.__forceRender);if(this.__invalidated&&a){this.__invalidated=!1;var b=new da("render");
this.__broadcastEvent(b)}this.__update(!1,!0);if(null!=this.__renderer){if(null!=this.context3D){for(b=this.stage3Ds.iterator();b.hasNext();){var c=b.next();this.context3D.__renderStage3D(c)}this.context3D.__present&&(a=!0)}a?(null==this.context3D&&this.__renderer.__clear(),this.__renderer.__render(this)):null==this.context3D&&this.window.onRender.cancel();null!=this.context3D&&(this.context3D.__present?(this.__renderer.__cleared||this.__renderer.__clear(),this.context3D.__present=!1,this.context3D.__cleared=
!1):this.window.onRender.cancel(),this.context3D.__bitmapDataPool.cleanup());this.__renderer.__cleared=!1;na.__pool.cleanup()}this.__rendering=!1}},__onLimeRenderContextLost:function(){this.context3D=this.__renderer=null;for(var a=this.stage3Ds.iterator();a.hasNext();)a.next().__lostContext()},__onLimeRenderContextRestored:function(a){this.__createRenderer();for(a=this.stage3Ds.iterator();a.hasNext();)a.next().__restoreContext()},__onLimeTextEdit:function(a,b,c,d){},__onLimeTextInput:function(a,b){if(null!=
this.window&&this.window==a){var c=[];null==this.__focus?this.__getInteractive(c):this.__focus.__getInteractive(c);b=new Ef("textInput",!0,!0,b);0<c.length?(c.reverse(),this.__dispatchStack(b,c)):this.__dispatchEvent(b);b.isDefaultPrevented()&&a.onTextInput.cancel()}},__onLimeTouchCancel:function(a){this.__primaryTouch==a&&(this.__primaryTouch=null);this.__onTouch("touchEnd",a)},__onLimeTouchMove:function(a){this.__onTouch("touchMove",a)},__onLimeTouchEnd:function(a){this.__primaryTouch==a&&(this.__primaryTouch=
null);this.__onTouch("touchEnd",a)},__onLimeTouchStart:function(a){null==this.__primaryTouch&&(this.__primaryTouch=a);this.__onTouch("touchBegin",a)},__onLimeUpdate:function(a){this.__deltaTime=a;this.__dispatchPendingMouseEvent()},__onLimeWindowActivate:function(a){},__onLimeWindowClose:function(a){this.window==a&&(this.window=null);this.__primaryTouch=null;a=new da("deactivate");this.__broadcastEvent(a)},__onLimeWindowCreate:function(a){null!=this.window&&this.window==a&&null!=a.context&&this.__createRenderer()},
__onLimeWindowDeactivate:function(a){},__onLimeWindowDropFile:function(a,b){},__onLimeWindowEnter:function(a){},__onLimeWindowExpose:function(a){null!=this.window&&this.window==a&&(this.__renderDirty=!0)},__onLimeWindowFocusIn:function(a){null!=this.window&&this.window==a&&(this.__renderDirty=!0,a=new da("activate"),this.__broadcastEvent(a),this.set_focus(this.__cacheFocus))},__onLimeWindowFocusOut:function(a){null!=this.window&&this.window==a&&(this.__primaryTouch=null,a=new da("deactivate"),this.__broadcastEvent(a),
a=this.get_focus(),this.set_focus(null),this.__cacheFocus=a)},__onLimeWindowFullscreen:function(a){null!=this.window&&this.window==a&&(this.__resize(),this.__wasFullscreen||(this.__wasFullscreen=!0,2==this.__displayState&&(this.__displayState=1),this.__dispatchEvent(new hg("fullScreen",!1,!1,!0,!0))))},__onLimeWindowLeave:function(a){null==this.window||this.window!=a||Tb.__buttonDown||(this.__dispatchPendingMouseEvent(),a=new da("mouseLeave"),this.__dispatchEvent(a))},__onLimeWindowMinimize:function(a){},
__onLimeWindowMove:function(a,b,c){},__onLimeWindowResize:function(a,b,c){null!=this.window&&this.window==a&&(this.__resize(),this.__wasFullscreen&&!a.__fullscreen&&(this.__wasFullscreen=!1,this.__displayState=2,this.__dispatchEvent(new hg("fullScreen",!1,!1,!1,!0))))},__onLimeWindowRestore:function(a){null!=this.window&&this.window==a&&this.__wasFullscreen&&!a.__fullscreen&&(this.__wasFullscreen=!1,this.__displayState=2,this.__dispatchEvent(new hg("fullScreen",!1,!1,!1,!0)))},__onMouse:function(a,
b,c,d){if(!(2<d)){var e=pa.__pool.get();e.setTo(b,c);b=this.__displayMatrix;c=b.a*b.d-b.b*b.c;if(0==c)e.x=-b.tx,e.y=-b.ty;else{var f=1/c*(b.c*(b.ty-e.y)+b.d*(e.x-b.tx));e.y=1/c*(b.a*(e.y-b.ty)+b.b*(b.tx-e.x));e.x=f}this.__mouseX=e.x;this.__mouseY=e.y;c=[];this.__hitTest(this.__mouseX,this.__mouseY,!0,c,!0,this)?f=c[c.length-1]:(f=this,c=[this]);null==f&&(f=this);var g=null;switch(a){case "middleMouseDown":this.__mouseDownMiddle=f;break;case "middleMouseUp":this.__mouseDownMiddle==f&&(g="middleClick");
this.__mouseDownMiddle=null;break;case "mouseDown":f.__allowMouseFocus()?null!=this.get_focus()?(b=new Lf("mouseFocusChange",!0,!0,f,!1,0),this.__dispatchStack(b,c),b.isDefaultPrevented()||this.set_focus(f)):this.set_focus(f):this.set_focus(null);this.__mouseDownLeft=f;Tb.__buttonDown=!0;break;case "mouseUp":null!=this.__mouseDownLeft&&(Tb.__buttonDown=!1,this.__mouseDownLeft==f?g="click":(b=Tb.__create("releaseOutside",1,this.__mouseX,this.__mouseY,new pa(this.__mouseX,this.__mouseY),this),this.__mouseDownLeft.dispatchEvent(b)),
this.__mouseDownLeft=null);break;case "rightMouseDown":this.__mouseDownRight=f;break;case "rightMouseUp":this.__mouseDownRight==f&&(g="rightClick"),this.__mouseDownRight=null}b=pa.__pool.get();var k=Tb.__create(a,d,this.__mouseX,this.__mouseY,f.__globalToLocal(e,b),f);this.__dispatchStack(k,c);null!=g&&(k=Tb.__create(g,d,this.__mouseX,this.__mouseY,f.__globalToLocal(e,b),f),this.__dispatchStack(k,c),"mouseUp"==a&&L.__cast(f,Za).doubleClickEnabled&&(a=$a.getTimer(),500>a-this.__lastClickTime?(k=Tb.__create("doubleClick",
d,this.__mouseX,this.__mouseY,f.__globalToLocal(e,b),f),this.__dispatchStack(k,c),this.__lastClickTime=0):this.__lastClickTime=a));if("auto"==ve.__cursor&&!ve.__hidden){g=null;if(null!=this.__mouseDownLeft)g=this.__mouseDownLeft.__getCursor();else for(a=0;a<c.length;)if(g=c[a],++a,g=g.__getCursor(),null!=g){this.window.set_cursor(lf.toLimeCursor(g));break}null==g&&this.window.set_cursor(Kd.ARROW)}f!=this.__mouseOverTarget&&null!=this.__mouseOverTarget&&(a=Tb.__create("mouseOut",d,this.__mouseX,this.__mouseY,
this.__mouseOverTarget.__globalToLocal(e,b),this.__mouseOverTarget),this.__dispatchStack(a,this.__mouseOutStack));for(k=0;k<this.__rollOutStack.length;)g=this.__rollOutStack[k],-1==c.indexOf(g)?(B.remove(this.__rollOutStack,g),a=Tb.__create("rollOut",d,this.__mouseX,this.__mouseY,this.__mouseOverTarget.__globalToLocal(e,b),this.__mouseOverTarget),a.bubbles=!1,this.__dispatchTarget(g,a)):++k;for(g=0;g<c.length;)k=c[g],++g,-1==this.__rollOutStack.indexOf(k)&&null!=this.__mouseOverTarget&&(k.hasEventListener("rollOver")&&
(a=Tb.__create("rollOver",d,this.__mouseX,this.__mouseY,this.__mouseOverTarget.__globalToLocal(e,b),k),a.bubbles=!1,this.__dispatchTarget(k,a)),(k.hasEventListener("rollOut")||k.hasEventListener("rollOver"))&&this.__rollOutStack.push(k));f!=this.__mouseOverTarget&&(null!=f&&(a=Tb.__create("mouseOver",d,this.__mouseX,this.__mouseY,f.__globalToLocal(e,b),f),this.__dispatchStack(a,c)),this.__mouseOverTarget=f,this.__mouseOutStack=c);null!=this.__dragObject&&(this.__drag(e),d=null,this.__mouseOverTarget==
this.__dragObject?(c=this.__dragObject.mouseEnabled,f=this.__dragObject.mouseChildren,this.__dragObject.mouseEnabled=!1,this.__dragObject.mouseChildren=!1,a=[],this.__hitTest(this.__mouseX,this.__mouseY,!0,a,!0,this)&&(d=a[a.length-1]),this.__dragObject.mouseEnabled=c,this.__dragObject.mouseChildren=f):this.__mouseOverTarget!=this&&(d=this.__mouseOverTarget),this.__dragObject.dropTarget=d);pa.__pool.release(e);pa.__pool.release(b)}},__onMouseWheel:function(a,b,c){var d=this.__mouseX,e=this.__mouseY;
a=[];this.__hitTest(this.__mouseX,this.__mouseY,!0,a,!0,this)?c=a[a.length-1]:(c=this,a=[this]);null==c&&(c=this);var f=pa.__pool.get();f.setTo(d,e);d=this.__displayMatrix;e=d.a*d.d-d.b*d.c;if(0==e)f.x=-d.tx,f.y=-d.ty;else{var g=1/e*(d.c*(d.ty-f.y)+d.d*(f.x-d.tx));f.y=1/e*(d.a*(f.y-d.ty)+d.b*(d.tx-f.x));f.x=g}b|=0;this.__dispatchStack(Tb.__create("mouseWheel",0,this.__mouseX,this.__mouseY,c.__globalToLocal(f,f),c,b),a);pa.__pool.release(f)},__onTouch:function(a,b){var c=pa.__pool.get();c.setTo(Math.round(b.x*
this.window.__width*this.window.__scale),Math.round(b.y*this.window.__height*this.window.__scale));var d=this.__displayMatrix,e=d.a*d.d-d.b*d.c;if(0==e)c.x=-d.tx,c.y=-d.ty;else{var f=1/e*(d.c*(d.ty-c.y)+d.d*(c.x-d.tx));c.y=1/e*(d.a*(c.y-d.ty)+d.b*(d.tx-c.x));c.x=f}d=c.x;e=c.y;f=[];if(this.__hitTest(d,e,!1,f,!0,this))var g=f[f.length-1];else g=this,f=[this];null==g&&(g=this);var k=b.id;if(this.__touchData.h.hasOwnProperty(k))var l=this.__touchData.h[k];else l=cj.__pool.get(),l.reset(),l.touch=b,this.__touchData.h[k]=
l;var m=null,p=!1;switch(a){case "touchBegin":l.touchDownTarget=g;break;case "touchEnd":l.touchDownTarget==g&&(m="touchTap"),l.touchDownTarget=null,p=!0}var n=pa.__pool.get(),h=this.__primaryTouch==b;a=sd.__create(a,null,d,e,g.__globalToLocal(c,n),g);a.touchPointID=k;a.isPrimaryTouchPoint=h;a.pressure=b.pressure;this.__dispatchStack(a,f);null!=m&&(a=sd.__create(m,null,d,e,g.__globalToLocal(c,n),g),a.touchPointID=k,a.isPrimaryTouchPoint=h,a.pressure=b.pressure,this.__dispatchStack(a,f));m=l.touchOverTarget;
g!=m&&null!=m&&(a=sd.__create("touchOut",null,d,e,m.__globalToLocal(c,n),m),a.touchPointID=k,a.isPrimaryTouchPoint=h,a.pressure=b.pressure,this.__dispatchTarget(m,a));for(var q=l.rollOutStack,r,t=0;t<q.length;)r=q[t],-1==f.indexOf(r)?(B.remove(q,r),a=sd.__create("touchRollOut",null,d,e,m.__globalToLocal(c,n),m),a.touchPointID=k,a.isPrimaryTouchPoint=h,a.bubbles=!1,a.pressure=b.pressure,this.__dispatchTarget(r,a)):++t;for(r=0;r<f.length;)t=f[r],++r,-1==q.indexOf(t)&&(t.hasEventListener("touchRollOver")&&
(a=sd.__create("touchRollOver",null,d,e,m.__globalToLocal(c,n),t),a.touchPointID=k,a.isPrimaryTouchPoint=h,a.bubbles=!1,a.pressure=b.pressure,this.__dispatchTarget(t,a)),t.hasEventListener("touchRollOut")&&q.push(t));g!=m&&(null!=g&&(a=sd.__create("touchOver",null,d,e,g.__globalToLocal(c,n),g),a.touchPointID=k,a.isPrimaryTouchPoint=h,a.bubbles=!0,a.pressure=b.pressure,this.__dispatchTarget(g,a)),l.touchOverTarget=g);pa.__pool.release(c);pa.__pool.release(n);p&&(this.__touchData.remove(k),l.reset(),
cj.__pool.release(l))},__registerLimeModule:function(a){a.onCreateWindow.add(v(this,this.__onLimeCreateWindow));a.onUpdate.add(v(this,this.__onLimeUpdate));a.onExit.add(v(this,this.__onLimeModuleExit),!1,0);for(a=le.devices.iterator();a.hasNext();){var b=a.next();this.__onLimeGamepadConnect(b)}le.onConnect.add(v(this,this.__onLimeGamepadConnect));Ad.onStart.add(v(this,this.__onLimeTouchStart));Ad.onMove.add(v(this,this.__onLimeTouchMove));Ad.onEnd.add(v(this,this.__onLimeTouchEnd));Ad.onCancel.add(v(this,
this.__onLimeTouchCancel))},__resize:function(){var a=this.stageWidth,b=this.stageHeight,c=this.window.__width*this.window.__scale|0,d=this.window.__height*this.window.__scale|0;this.__logicalWidth=c;this.__logicalHeight=d;this.__displayMatrix.identity();if(null!=this.get_fullScreenSourceRect()&&this.window.__fullscreen){this.stageWidth=this.get_fullScreenSourceRect().width|0;this.stageHeight=this.get_fullScreenSourceRect().height|0;var e=c/this.stageWidth,f=d/this.stageHeight;this.__displayMatrix.translate(-this.get_fullScreenSourceRect().x,
-this.get_fullScreenSourceRect().y);this.__displayMatrix.scale(e,f);this.__displayRect.setTo(this.get_fullScreenSourceRect().get_left(),this.get_fullScreenSourceRect().get_right(),this.get_fullScreenSourceRect().get_top(),this.get_fullScreenSourceRect().get_bottom())}else{if(0==this.__logicalWidth&&0==this.__logicalHeight)this.stageWidth=c,this.stageHeight=d;else{this.stageWidth=this.__logicalWidth;this.stageHeight=this.__logicalHeight;e=Math.min(c/this.stageWidth,d/this.stageHeight);f=Math.round((c-
this.stageWidth*e)/2);var g=Math.round((d-this.stageHeight*e)/2);this.__displayMatrix.scale(e,e);this.__displayMatrix.translate(f,g)}this.__displayRect.setTo(0,0,this.stageWidth,this.stageHeight)}null!=this.context3D&&this.context3D.configureBackBuffer(c,d,0,!0,!0,!0);for(e=this.stage3Ds.iterator();e.hasNext();)e.next().__resize(c,d);null!=this.__renderer&&this.__renderer.__resize(c,d);if(this.stageWidth!=a||this.stageHeight!=b)this.__renderDirty=!0,this.__setTransformDirty(),a=new da("resize"),this.__dispatchEvent(a)},
__setLogicalSize:function(a,b){this.__logicalWidth=a;this.__logicalHeight=b;this.__resize()},__startDrag:function(a,b,c){if(null==c)this.__dragBounds=null;else{this.__dragBounds=new ia;var d=c.get_right(),e=c.get_bottom();this.__dragBounds.x=d<c.x?d:c.x;this.__dragBounds.y=e<c.y?e:c.y;this.__dragBounds.width=Math.abs(c.width);this.__dragBounds.height=Math.abs(c.height)}this.__dragObject=a;null!=this.__dragObject&&(b?this.__dragOffsetY=this.__dragOffsetX=0:(a=pa.__pool.get(),a.setTo(this.get_mouseX(),
this.get_mouseY()),b=this.__dragObject.parent,null!=b&&(b=b.__getWorldTransform(),c=b.a*b.d-b.b*b.c,0==c?(a.x=-b.tx,a.y=-b.ty):(d=1/c*(b.c*(b.ty-a.y)+b.d*(a.x-b.tx)),a.y=1/c*(b.a*(a.y-b.ty)+b.b*(b.tx-a.x)),a.x=d)),this.__dragOffsetX=this.__dragObject.get_x()-a.x,this.__dragOffsetY=this.__dragObject.get_y()-a.y,pa.__pool.release(a)))},__stopDrag:function(a){this.__dragObject=this.__dragBounds=null},__unregisterLimeModule:function(a){a.onCreateWindow.remove(v(this,this.__onLimeCreateWindow));a.onUpdate.remove(v(this,
this.__onLimeUpdate));a.onExit.remove(v(this,this.__onLimeModuleExit));le.onConnect.remove(v(this,this.__onLimeGamepadConnect));Ad.onStart.remove(v(this,this.__onLimeTouchStart));Ad.onMove.remove(v(this,this.__onLimeTouchMove));Ad.onEnd.remove(v(this,this.__onLimeTouchEnd));Ad.onCancel.remove(v(this,this.__onLimeTouchCancel))},__update:function(a,b){a?this.__transformDirty&&(db.prototype.__update.call(this,!0,b),b&&(this.__transformDirty=!1)):this.__transformDirty||this.__renderDirty?(db.prototype.__update.call(this,
!1,b),b&&sa.__supportDOM&&(this.__wasDirty=!0)):!this.__renderDirty&&this.__wasDirty&&(db.prototype.__update.call(this,!1,b),b&&(this.__wasDirty=!1))},get_color:function(){return this.__color},set_color:function(a){null==a?(this.__transparent=!0,a=0):this.__transparent=!1;this.__color!=a&&(this.__colorSplit[0]=((a&16711680)>>>16)/255,this.__colorSplit[1]=((a&65280)>>>8)/255,this.__colorSplit[2]=(a&255)/255,this.__colorString="#"+ba.hex(a&16777215,6),this.__renderDirty=!0,this.__color=-16777216|a&
16777215);return a},get_contentsScaleFactor:function(){return this.__contentsScaleFactor},get_displayState:function(){return this.__displayState},set_displayState:function(a){null!=this.window&&(2==a?this.window.__fullscreen&&this.window.set_fullscreen(!1):this.window.__fullscreen||this.window.set_fullscreen(!0));return this.__displayState=a},get_focus:function(){return this.__focus},set_focus:function(a){if(a!=this.__focus){var b=this.__focus;this.__cacheFocus=this.__focus=a;if(null!=b){var c=new Lf("focusOut",
!0,!1,a,!1,0),d=[];b.__getInteractive(d);d.reverse();this.__dispatchStack(c,d)}null!=a&&(b=new Lf("focusIn",!0,!1,b,!1,0),c=[],a.__getInteractive(c),c.reverse(),this.__dispatchStack(b,c))}return a},get_frameRate:function(){return null!=this.window?this.window.__backend.getFrameRate():0},set_frameRate:function(a){return null!=this.window?this.window.__backend.setFrameRate(a):a},get_fullScreenHeight:function(){return Math.ceil(this.window.get_display().currentMode.height*this.window.__scale)},get_fullScreenSourceRect:function(){return null==
this.__fullScreenSourceRect?null:this.__fullScreenSourceRect.clone()},set_fullScreenSourceRect:function(a){null==a?null!=this.__fullScreenSourceRect&&(this.__fullScreenSourceRect=null,this.__resize()):a.equals(this.__fullScreenSourceRect)||(this.__fullScreenSourceRect=a.clone(),this.__resize());return a},get_fullScreenWidth:function(){return Math.ceil(this.window.get_display().currentMode.width*this.window.__scale)},set_height:function(a){return this.get_height()},get_mouseX:function(){return this.__mouseX},
get_mouseY:function(){return this.__mouseY},get_quality:function(){return this.__quality},set_quality:function(a){this.__quality=a;if(null!=this.__renderer){var b=this.get_quality();this.__renderer.__allowSmoothing=2!=b}return a},set_rotation:function(a){return 0},get_scaleMode:function(){return this.__scaleMode},set_scaleMode:function(a){return this.__scaleMode=a},set_scaleX:function(a){return 0},set_scaleY:function(a){return 0},get_tabEnabled:function(){return!1},set_tabEnabled:function(a){throw new E(new dd("Error: The Stage class does not implement this property or method."));
},get_tabIndex:function(){return-1},set_tabIndex:function(a){throw new E(new dd("Error: The Stage class does not implement this property or method."));},set_transform:function(a){return this.get_transform()},set_width:function(a){return this.get_width()},set_x:function(a){return 0},set_y:function(a){return 0},__class__:hk,__properties__:w(db.prototype.__properties__,{set_scaleMode:"set_scaleMode",get_scaleMode:"get_scaleMode",set_quality:"set_quality",get_quality:"get_quality",get_fullScreenWidth:"get_fullScreenWidth",
set_fullScreenSourceRect:"set_fullScreenSourceRect",get_fullScreenSourceRect:"get_fullScreenSourceRect",get_fullScreenHeight:"get_fullScreenHeight",set_frameRate:"set_frameRate",get_frameRate:"get_frameRate",set_focus:"set_focus",get_focus:"get_focus",set_displayState:"set_displayState",get_displayState:"get_displayState",get_contentsScaleFactor:"get_contentsScaleFactor",set_color:"set_color",get_color:"get_color"})});var ej=function(a){A.call(this);this.__stage=a;this.__height=0;this.__projectionTransform=
new ze;this.__renderTransform=new ze;this.__y=this.__x=this.__width=0;this.visible=!0;0<a.stageWidth&&0<a.stageHeight&&this.__resize(a.stageWidth,a.stageHeight)};h["openfl.display.Stage3D"]=ej;ej.__name__="openfl.display.Stage3D";ej.__super__=A;ej.prototype=w(A.prototype,{context3D:null,visible:null,__contextLost:null,__contextRequested:null,__height:null,__indexBuffer:null,__projectionTransform:null,__renderTransform:null,__stage:null,__vertexBuffer:null,__width:null,__x:null,__y:null,__canvas:null,
__renderContext:null,__style:null,__webgl:null,requestContext3D:function(a,b){this.__contextLost?this.__contextRequested=!0:null!=this.context3D?(this.__contextRequested=!0,pf.delay(v(this,this.__dispatchCreate),1)):this.__contextRequested||(this.__contextRequested=!0,pf.delay(v(this,this.__createContext),1))},requestContext3DMatchingProfiles:function(a){this.requestContext3D()},__createContext:function(){null!=this.__stage.context3D?(this.context3D=new Hc(this.__stage,this.__stage.context3D.__contextState,
this),this.__dispatchCreate()):this.__dispatchError()},__dispatchError:function(){this.__contextRequested=!1;this.dispatchEvent(new Te("error",!1,!1,"Context3D not available"))},__dispatchCreate:function(){this.__contextRequested&&(this.__contextRequested=!1,this.dispatchEvent(new da("context3DCreate")))},__lostContext:function(){this.__contextLost=!0;null!=this.context3D&&(this.context3D.__dispose(),this.__contextRequested=!0)},__resize:function(a,b){if(a!=this.__width||b!=this.__height)null!=this.__canvas&&
(this.__canvas.width=a,this.__canvas.height=b),this.__projectionTransform.copyRawDataFrom(Ua.toFloatVector(null,null,null,[2/(0<a?a:1),0,0,0,0,-2/(0<b?b:1),0,0,0,0,-.001,0,-1,1,0,1])),this.__renderTransform.identity(),this.__renderTransform.appendTranslation(this.__x,this.__y,0),this.__renderTransform.append(this.__projectionTransform),this.__width=a,this.__height=b},__restoreContext:function(){this.__contextLost=!1;this.__createContext()},get_x:function(){return this.__x},set_x:function(a){if(this.__x==
a)return a;this.__x=a;this.__renderTransform.identity();this.__renderTransform.appendTranslation(this.__x,this.__y,0);this.__renderTransform.append(this.__projectionTransform);return a},get_y:function(){return this.__y},set_y:function(a){if(this.__y==a)return a;this.__y=a;this.__renderTransform.identity();this.__renderTransform.appendTranslation(this.__x,this.__y,0);this.__renderTransform.append(this.__projectionTransform);return a},__class__:ej,__properties__:{set_y:"set_y",get_y:"get_y",set_x:"set_x",
get_x:"get_x"}});var kh={};h["openfl.display._StageAlign.StageAlign_Impl_"]=kh;kh.__name__="openfl.display._StageAlign.StageAlign_Impl_";kh.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}};kh.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 Dl={};h["openfl.display._StageDisplayState.StageDisplayState_Impl_"]=Dl;Dl.__name__="openfl.display._StageDisplayState.StageDisplayState_Impl_";Dl.fromString=function(a){switch(a){case "fullScreen":return 0;case "fullScreenInteractive":return 1;case "normal":return 2;default:return null}};Dl.toString=function(a){switch(a){case 0:return"fullScreen";case 1:return"fullScreenInteractive";case 2:return"normal";
default:return null}};var ik={};h["openfl.display._StageQuality.StageQuality_Impl_"]=ik;ik.__name__="openfl.display._StageQuality.StageQuality_Impl_";ik.fromString=function(a){switch(a){case "best":return 0;case "high":return 1;case "low":return 2;case "medium":return 3;default:return null}};ik.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 jk={};h["openfl.display._StageScaleMode.StageScaleMode_Impl_"]=jk;jk.__name__=
"openfl.display._StageScaleMode.StageScaleMode_Impl_";jk.fromString=function(a){switch(a){case "exactFit":return 0;case "noBorder":return 1;case "noScale":return 2;case "showAll":return 3;default:return null}};jk.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 Kg=function(a,b,c,d,e,f,g,k){null==k&&(k=0);null==g&&(g=0);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.__id=a;this.__matrix=new Ha;0!=b&&this.set_x(b);0!=c&&this.set_y(c);1!=d&&this.set_scaleX(d);1!=e&&this.set_scaleY(e);0!=f&&this.set_rotation(f);this.__dirty=!0;this.__length=0;this.__originX=g;this.__originY=k;this.__alpha=1;this.__blendMode=null;this.__visible=!0};h["openfl.display.Tile"]=Kg;Kg.__name__="openfl.display.Tile";Kg.prototype={data:null,parent:null,__alpha:null,__blendMode:null,__colorTransform:null,__dirty:null,__id:null,__length:null,__matrix:null,__originX:null,__originY:null,
__rect:null,__rotation:null,__rotationCosine:null,__rotationSine:null,__scaleX:null,__scaleY:null,__shader:null,__tileset:null,__visible:null,clone:function(){var a=new Kg(this.__id);a.__alpha=this.__alpha;a.__blendMode=this.__blendMode;a.__originX=this.__originX;a.__originY=this.__originY;null!=this.__rect&&(a.__rect=this.__rect.clone());a.set_matrix(this.__matrix.clone());a.__shader=this.__shader;a.set_tileset(this.__tileset);null!=this.__colorTransform&&(a.__colorTransform=this.__colorTransform.__clone());
return a},getBounds:function(a){var b=new ia;this.__findTileRect(b);var c=Ha.__pool.get();if(null!=a&&a!=this){c.copyFrom(this.__getWorldTransform());var d=Ha.__pool.get();d.copyFrom(a.__getWorldTransform());d.invert();c.concat(d);Ha.__pool.release(d)}else c.identity();this.__getBounds(b,c);Ha.__pool.release(c);return b},__getBounds:function(a,b){a.__transform(a,b)},hitTestTile: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},
invalidate:function(){this.__setRenderDirty()},__findTileRect:function(a){if(null==this.get_tileset())if(null!=this.parent){var b=this.parent.__findTileset();null==b?a.setTo(0,0,0,0):(b=b.getRect(this.get_id()),null==b?a.setTo(0,0,0,0):a.copyFrom(b))}else a.setTo(0,0,0,0);else a.copyFrom(this.get_tileset().getRect(this.get_id()));a.x=0;a.y=0},__findTileset:function(){return null!=this.get_tileset()?this.get_tileset():this.parent instanceof Lg?this.parent.get_tileset():null==this.parent?null:this.parent.__findTileset()},
__getWorldTransform:function(){var a=this.get_matrix().clone();null!=this.parent&&a.concat(this.parent.__getWorldTransform());return a},__setRenderDirty:function(){this.__dirty||(this.__dirty=!0,null!=this.parent&&this.parent.__setRenderDirty())},get_alpha:function(){return this.__alpha},set_alpha:function(a){a!=this.__alpha&&(this.__alpha=a,this.__setRenderDirty());return a},get_blendMode:function(){return this.__blendMode},set_blendMode:function(a){a!=this.__blendMode&&(this.__blendMode=a,this.__setRenderDirty());
return a},get_colorTransform:function(){return this.__colorTransform},set_colorTransform:function(a){a!=this.__colorTransform&&(this.__colorTransform=a,this.__setRenderDirty());return a},get_height:function(){var a=ia.__pool.get();this.__findTileRect(a);this.__getBounds(a,this.get_matrix());var b=a.height;ia.__pool.release(a);return b},set_height:function(a){var b=ia.__pool.get();this.__findTileRect(b);0!=b.height&&this.set_scaleY(a/b.height);ia.__pool.release(b);return a},get_id:function(){return this.__id},
set_id:function(a){a!=this.__id&&(this.__id=a,this.__setRenderDirty());return a},get_matrix:function(){return this.__matrix},set_matrix:function(a){a!=this.__matrix&&(this.__scaleY=this.__scaleX=this.__rotation=null,this.__matrix=a,this.__setRenderDirty());return a},get_originX:function(){return this.__originX},set_originX:function(a){a!=this.__originX&&(this.__originX=a,this.__setRenderDirty());return a},get_originY:function(){return this.__originY},set_originY:function(a){a!=this.__originY&&(this.__originY=
a,this.__setRenderDirty());return a},get_rect:function(){return this.__rect},set_rect:function(a){a!=this.__rect&&(this.__rect=a,this.__setRenderDirty());return a},get_rotation:function(){if(null==this.__rotation)if(0==this.__matrix.b&&0==this.__matrix.c)this.__rotationSine=this.__rotation=0,this.__rotationCosine=1;else{var a=Math.atan2(this.__matrix.d,this.__matrix.c)-Math.PI/2;this.__rotation=180/Math.PI*a;this.__rotationSine=Math.sin(a);this.__rotationCosine=Math.cos(a)}return this.__rotation},
set_rotation:function(a){if(a!=this.__rotation){this.__rotation=a;var b=Math.PI/180*a;this.__rotationSine=Math.sin(b);this.__rotationCosine=Math.cos(b);b=this.get_scaleX();var c=this.get_scaleY();this.__matrix.a=this.__rotationCosine*b;this.__matrix.b=this.__rotationSine*b;this.__matrix.c=-this.__rotationSine*c;this.__matrix.d=this.__rotationCosine*c;this.__setRenderDirty()}return a},get_scaleX:function(){null==this.__scaleX&&(0==this.get_matrix().b?this.__scaleX=this.__matrix.a:this.__scaleX=Math.sqrt(this.__matrix.a*
this.__matrix.a+this.__matrix.b*this.__matrix.b));return this.__scaleX},set_scaleX:function(a){if(a!=this.__scaleX){this.__scaleX=a;if(0==this.__matrix.b)this.__matrix.a=a;else{this.get_rotation();var b=this.__rotationSine*a;this.__matrix.a=this.__rotationCosine*a;this.__matrix.b=b}this.__setRenderDirty()}return a},get_scaleY:function(){null==this.__scaleY&&(this.__scaleY=0==this.__matrix.c?this.get_matrix().d:Math.sqrt(this.__matrix.c*this.__matrix.c+this.__matrix.d*this.__matrix.d));return this.__scaleY},
set_scaleY:function(a){if(a!=this.__scaleY){this.__scaleY=a;if(0==this.__matrix.c)this.__matrix.d=a;else{this.get_rotation();var b=this.__rotationCosine*a;this.__matrix.c=-this.__rotationSine*a;this.__matrix.d=b}this.__setRenderDirty()}return a},get_shader:function(){return this.__shader},set_shader:function(a){a!=this.__shader&&(this.__shader=a,this.__setRenderDirty());return a},get_tileset:function(){return this.__tileset},set_tileset:function(a){a!=this.__tileset&&(this.__tileset=a,this.__setRenderDirty());
return a},get_visible:function(){return this.__visible},set_visible:function(a){a!=this.__visible&&(this.__visible=a,this.__setRenderDirty());return a},get_width:function(){var a=ia.__pool.get();this.__findTileRect(a);this.__getBounds(a,this.get_matrix());var b=a.width;ia.__pool.release(a);return b},set_width:function(a){var b=ia.__pool.get();this.__findTileRect(b);0!=b.width&&this.set_scaleX(a/b.width);ia.__pool.release(b);return a},get_x:function(){return this.__matrix.tx},set_x:function(a){a!=
this.__matrix.tx&&(this.__matrix.tx=a,this.__setRenderDirty());return a},get_y:function(){return this.__matrix.ty},set_y:function(a){a!=this.__matrix.ty&&(this.__matrix.ty=a,this.__setRenderDirty());return a},__class__:Kg,__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_tileset:"set_tileset",get_tileset:"get_tileset",set_shader:"set_shader",get_shader:"get_shader",set_scaleY:"set_scaleY",
get_scaleY:"get_scaleY",set_scaleX:"set_scaleX",get_scaleX:"get_scaleX",set_rotation:"set_rotation",get_rotation:"get_rotation",set_rect:"set_rect",get_rect:"get_rect",set_originY:"set_originY",get_originY:"get_originY",set_originX:"set_originX",get_originX:"get_originX",set_matrix:"set_matrix",get_matrix:"get_matrix",set_id:"set_id",get_id:"get_id",set_height:"set_height",get_height:"get_height",set_colorTransform:"set_colorTransform",get_colorTransform:"get_colorTransform",set_blendMode:"set_blendMode",
get_blendMode:"get_blendMode",set_alpha:"set_alpha",get_alpha:"get_alpha"}};var kk=function(a,b,c,d,e,f,g){null==g&&(g=0);null==f&&(f=0);null==e&&(e=0);null==d&&(d=1);null==c&&(c=1);null==b&&(b=0);null==a&&(a=0);Kg.call(this,-1,a,b,c,d,e,f,g);this.__tiles=[];this.__length=0};h["openfl.display.TileContainer"]=kk;kk.__name__="openfl.display.TileContainer";kk.__interfaces__=[yj];kk.__super__=Kg;kk.prototype=w(Kg.prototype,{__tiles:null,addTile:function(a){if(null==a)return null;a.parent==this&&(B.remove(this.__tiles,
a),this.__length--);this.__tiles[this.get_numTiles()]=a;a.parent=this;this.__length++;this.__setRenderDirty();return a},addTileAt:function(a,b){if(null==a)return null;a.parent==this&&(B.remove(this.__tiles,a),this.__length--);this.__tiles.splice(b,0,a);a.parent=this;this.__length++;this.__setRenderDirty();return a},addTiles:function(a){for(var b=0;b<a.length;){var c=a[b];++b;this.addTile(c)}return a},clone:function(){for(var a=new kk,b=0,c=this.__tiles;b<c.length;){var d=c[b];++b;a.addTile(d.clone())}return a},
contains:function(a){return-1<this.__tiles.indexOf(a)},getBounds:function(a){for(var b=new ia,c,d=0,e=this.__tiles;d<e.length;)c=e[d],++d,c=c.getBounds(a),b.__expand(c.x,c.y,c.width,c.height);return b},getTileAt:function(a){return 0<=a&&a<this.get_numTiles()?this.__tiles[a]:null},getTileIndex:function(a){for(var b=0,c=this.__tiles.length;b<c;){var d=b++;if(this.__tiles[d]==a)return d}return-1},removeTile:function(a){null!=a&&a.parent==this&&(a.parent=null,B.remove(this.__tiles,a),this.__length--,
this.__setRenderDirty());return a},removeTileAt:function(a){return 0<=a&&a<this.get_numTiles()?this.removeTile(this.__tiles[a]):null},removeTiles:function(a,b){null==b&&(b=2147483647);null==a&&(a=0);0>a&&(a=0);b>this.__tiles.length-1&&(b=this.__tiles.length-1);a=this.__tiles.splice(a,b-a+1);for(b=0;b<a.length;){var c=a[b];++b;c.parent=null}this.__length=this.__tiles.length;this.__setRenderDirty()},setTileIndex:function(a,b){0<=b&&b<=this.get_numTiles()&&a.parent==this&&(B.remove(this.__tiles,a),this.__tiles.splice(b,
0,a),this.__setRenderDirty())},sortTiles:function(a){this.__tiles.sort(a);this.__setRenderDirty()},swapTiles:function(a,b){if(a.parent==this&&b.parent==this){var c=this.__tiles.indexOf(a),d=this.__tiles.indexOf(b);this.__tiles[c]=b;this.__tiles[d]=a;this.__setRenderDirty()}},swapTilesAt:function(a,b){var c=this.__tiles[a];this.__tiles[a]=this.__tiles[b];this.__tiles[b]=c;this.__setRenderDirty()},get_numTiles:function(){return this.__length},get_height:function(){for(var a=ia.__pool.get(),b,c=0,d=
this.__tiles;c<d.length;)b=d[c],++c,b=b.getBounds(this),a.__expand(b.x,b.y,b.width,b.height);this.__getBounds(a,this.get_matrix());c=a.height;ia.__pool.release(a);return c},set_height:function(a){for(var b=ia.__pool.get(),c,d=0,e=this.__tiles;d<e.length;)c=e[d],++d,c=c.getBounds(this),b.__expand(c.x,c.y,c.width,c.height);0!=b.height&&this.set_scaleY(a/b.height);ia.__pool.release(b);return a},get_width:function(){for(var a=ia.__pool.get(),b,c=0,d=this.__tiles;c<d.length;)b=d[c],++c,b=b.getBounds(this),
a.__expand(b.x,b.y,b.width,b.height);this.__getBounds(a,this.get_matrix());c=a.width;ia.__pool.release(a);return c},set_width:function(a){for(var b=ia.__pool.get(),c,d=0,e=this.__tiles;d<e.length;)c=e[d],++d,c=c.getBounds(this),b.__expand(c.x,c.y,c.width,c.height);0!=b.width&&this.set_scaleX(a/b.width);ia.__pool.release(b);return a},__class__:kk,__properties__:w(Kg.prototype.__properties__,{get_numTiles:"get_numTiles"})});var Lg=function(a,b,c,d){null==d&&(d=!0);sa.call(this);this.__tileset=c;this.smoothing=
d;this.tileColorTransformEnabled=this.tileBlendModeEnabled=this.tileAlphaEnabled=!0;this.__group=new kk;this.__group.set_tileset(c);this.__width=a;this.__height=b;this.__type=Ph.TILEMAP};h["openfl.display.Tilemap"]=Lg;Lg.__name__="openfl.display.Tilemap";Lg.__interfaces__=[yj];Lg.__super__=sa;Lg.prototype=w(sa.prototype,{tileAlphaEnabled:null,tileBlendModeEnabled:null,tileColorTransformEnabled:null,smoothing:null,__group:null,__tileset:null,__buffer:null,__bufferDirty:null,__height:null,__width:null,
addTile:function(a){return this.__group.addTile(a)},addTileAt:function(a,b){return this.__group.addTileAt(a,b)},addTiles:function(a){return this.__group.addTiles(a)},contains:function(a){return this.__group.contains(a)},getTileAt:function(a){return this.__group.getTileAt(a)},getTileIndex:function(a){return this.__group.getTileIndex(a)},getTiles:function(){return this.__group.clone()},removeTile:function(a){return this.__group.removeTile(a)},removeTileAt:function(a){return this.__group.removeTileAt(a)},
removeTiles:function(a,b){null==b&&(b=2147483647);null==a&&(a=0);this.__group.removeTiles(a,b)},setTileIndex:function(a,b){this.__group.setTileIndex(a,b)},setTiles:function(a){for(var b=0,c=this.__group.__tiles;b<c.length;){var d=c[b];++b;this.removeTile(d)}b=0;for(a=a.__tiles;b<a.length;)c=a[b],++b,this.addTile(c)},sortTiles:function(a){this.__group.sortTiles(a)},swapTiles:function(a,b){this.__group.swapTiles(a,b)},swapTilesAt:function(a,b){this.__group.swapTilesAt(a,b)},__enterFrame:function(a){this.__group.__dirty&&
!this.__renderDirty&&(this.__renderDirty=!0,this.__setParentRenderDirty())},__getBounds:function(a,b){var c=ia.__pool.get();c.setTo(0,0,this.__width,this.__height);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);ia.__pool.release(c)},__hitTest:function(a,b,c,d,e,f){if(!f.get_visible()||this.__isMask||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b))return!1;this.__getRenderTransform();c=this.__renderTransform;var g=c.a*c.d-c.b*c.c;c=0==g?-c.tx:1/g*(c.c*(c.ty-b)+c.d*(a-c.tx));g=this.__renderTransform;
var k=g.a*g.d-g.b*g.c;a=0==k?-g.ty:1/k*(g.a*(b-g.ty)+g.b*(g.tx-a));return 0<c&&0<a&&c<=this.__width&&a<=this.__height?(null==d||e||d.push(f),!0):!1},__renderFlash:function(){},get_height:function(){return this.__height*Math.abs(this.get_scaleY())},set_height:function(a){this.__height=a|0;return this.__height*Math.abs(this.get_scaleY())},get_numTiles:function(){return this.__group.__length},get_tileset:function(){return this.__tileset},set_tileset:function(a){a!=this.__tileset&&(this.__tileset=a,this.__group.set_tileset(a),
this.__group.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return a},get_width:function(){return this.__width*Math.abs(this.__scaleX)},set_width:function(a){this.__width=a|0;return this.__width*Math.abs(this.__scaleX)},__class__:Lg,__properties__:w(sa.prototype.__properties__,{set_tileset:"set_tileset",get_tileset:"get_tileset",get_numTiles:"get_numTiles"})});var Gi=function(a,b){this.__bitmapData=a;this.rectData=Ua.toFloatVector(null);this.__data=[];if(null!=
b)for(a=0;a<b.length;){var c=b[a];++a;this.addRect(c)}};h["openfl.display.Tileset"]=Gi;Gi.__name__="openfl.display.Tileset";Gi.prototype={rectData:null,__bitmapData:null,__data:null,addRect:function(a){if(null==a)return-1;this.rectData.push(a.x);this.rectData.push(a.y);this.rectData.push(a.width);this.rectData.push(a.height);a=new dp(a);a.__update(this.__bitmapData);this.__data.push(a);return this.__data.length-1},clone:function(){for(var a=new Gi(this.__bitmapData,null),b=ia.__pool.get(),c=0,d=this.__data;c<
d.length;){var e=d[c];++c;b.setTo(e.x,e.y,e.width,e.height);a.addRect(b)}ia.__pool.release(b);return a},hasRect:function(a){for(var b=0,c=this.__data;b<c.length;){var d=c[b];++b;if(a.x==d.x&&a.y==d.y&&a.width==d.width&&a.height==d.height)return!0}return!1},getRect:function(a){return a<this.__data.length&&0<=a?new ia(this.__data[a].x,this.__data[a].y,this.__data[a].width,this.__data[a].height):null},getRectID:function(a){for(var b,c=0,d=this.__data.length;c<d;){var e=c++;b=this.__data[e];if(a.x==b.x&&
a.y==b.y&&a.width==b.width&&a.height==b.height)return e}return null},get_bitmapData:function(){return this.__bitmapData},set_bitmapData:function(a){this.__bitmapData=a;for(var b=0,c=this.__data;b<c.length;){var d=c[b];++b;d.__update(this.__bitmapData)}return a},get_numRects:function(){return this.__data.length},__class__:Gi,__properties__:{get_numRects:"get_numRects",set_bitmapData:"set_bitmapData",get_bitmapData:"get_bitmapData"}};var dp=function(a){null!=a&&(this.x=a.x|0,this.y=a.y|0,this.width=
a.width|0,this.height=a.height|0)};h["openfl.display._Tileset.TileData"]=dp;dp.__name__="openfl.display._Tileset.TileData";dp.prototype={height:null,width:null,x:null,y:null,__bitmapData:null,__uvHeight:null,__uvWidth:null,__uvX:null,__uvY:null,__update:function(a){if(null!=a){var b=a.width;a=a.height;this.__uvX=this.x/b;this.__uvY=this.y/a;this.__uvWidth=(this.x+this.width)/b;this.__uvHeight=(this.y+this.height)/a}},__class__:dp};var El={};h["openfl.display._TriangleCulling.TriangleCulling_Impl_"]=
El;El.__name__="openfl.display._TriangleCulling.TriangleCulling_Impl_";El.fromString=function(a){switch(a){case "negative":return 0;case "none":return 1;case "positive":return 2;default:return null}};El.toString=function(a){switch(a){case 0:return"negative";case 1:return"none";case 2:return"positive";default:return null}};var Al=function(a,b){Ij.call(this,a,b);this.stage=new hk(this,Object.prototype.hasOwnProperty.call(b.context,"background")?b.context.background:16777215);if(Object.prototype.hasOwnProperty.call(b,
"parameters"))try{this.stage.get_loaderInfo().parameters=b.parameters}catch(c){ra.lastException=c}Object.prototype.hasOwnProperty.call(b,"resizable")&&!b.resizable&&this.stage.__setLogicalSize(b.width,b.height);a.addModule(this.stage)};h["openfl.display.Window"]=Al;Al.__name__="openfl.display.Window";Al.__super__=Ij;Al.prototype=w(Ij.prototype,{__class__:Al});var Hc=function(a,b,c){this.totalGPUMemory=0;this.profile=3;this.driverInfo="OpenGL (Direct blitting)";this.backBufferHeight=this.backBufferWidth=
0;A.call(this);this.__stage=a;this.__contextState=b;this.__stage3D=c;this.__context=a.window.context;this.gl=this.__context.webgl;null==this.__contextState&&(this.__contextState=new yl);this.__state=new yl;this.__vertexConstants=new Float32Array(512);this.__fragmentConstants=new Float32Array(512);a=[1,1,1,1];this.__positionScale=null!=a?new Float32Array(a):null;this.__programs=new ua;-1==Hc.__glMaxViewportDims&&(Hc.__glMaxViewportDims=this.gl.getParameter(this.gl.MAX_VIEWPORT_DIMS));this.maxBackBufferHeight=
this.maxBackBufferWidth=Hc.__glMaxViewportDims;if(-1==Hc.__glMaxTextureMaxAnisotropy){a=this.gl.getExtension("EXT_texture_filter_anisotropic");if(null==a||null==a.MAX_TEXTURE_MAX_ANISOTROPY_EXT)a=this.gl.getExtension("MOZ_EXT_texture_filter_anisotropic");if(null==a||null==a.MAX_TEXTURE_MAX_ANISOTROPY_EXT)a=this.gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic");null!=a?(Hc.__glTextureMaxAnisotropy=a.TEXTURE_MAX_ANISOTROPY_EXT,Hc.__glMaxTextureMaxAnisotropy=this.gl.getParameter(a.MAX_TEXTURE_MAX_ANISOTROPY_EXT)):
(Hc.__glTextureMaxAnisotropy=0,Hc.__glMaxTextureMaxAnisotropy=0)}-1==Hc.__glDepthStencil&&(Hc.__glDepthStencil=this.gl.DEPTH_STENCIL);if(null==Hc.__driverInfo){a=this.gl.getParameter(this.gl.VENDOR);b=this.gl.getParameter(this.gl.VERSION);c=this.gl.getParameter(this.gl.RENDERER);var d=this.gl.getParameter(this.gl.SHADING_LANGUAGE_VERSION);Hc.__driverInfo="OpenGL Vendor="+a+" Version="+b+" Renderer="+c+" GLSL="+d}this.driverInfo=Hc.__driverInfo;this.__quadIndexBufferElements=16383;a=this.__quadIndexBufferCount=
6*this.__quadIndexBufferElements;a=null!=a?new Uint16Array(a):null;d=c=b=0;for(var e=this.__quadIndexBufferElements;d<e;)d++,a[b]=c,a[b+1]=c+1,a[b+2]=c+2,a[b+3]=c+2,a[b+4]=c+1,a[b+5]=c+3,b+=6,c+=4;this.__quadIndexBuffer=this.createIndexBuffer(this.__quadIndexBufferCount);this.__quadIndexBuffer.uploadFromTypedArray(a);this.__bitmapDataPool=new Jo(30,this)};h["openfl.display3D.Context3D"]=Hc;Hc.__name__="openfl.display3D.Context3D";Hc.__super__=A;Hc.prototype=w(A.prototype,{backBufferHeight:null,backBufferWidth:null,
driverInfo:null,maxBackBufferHeight:null,maxBackBufferWidth:null,profile:null,totalGPUMemory:null,gl:null,__backBufferAntiAlias:null,__backBufferTexture:null,__backBufferWantsBestResolution:null,__backBufferWantsBestResolutionOnBrowserZoom:null,__bitmapDataPool:null,__cleared:null,__context:null,__contextState:null,__renderStage3DProgram:null,__enableErrorChecking:null,__fragmentConstants:null,__frontBufferTexture:null,__positionScale:null,__present:null,__programs:null,__quadIndexBuffer:null,__quadIndexBufferCount:null,
__quadIndexBufferElements:null,__stage:null,__stage3D:null,__state:null,__vertexConstants:null,clear:function(a,b,c,d,e,f,g){null==g&&(g=7);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.__flushGLFramebuffer();this.__flushGLViewport();var k=0;if(0!=(g&1)){null==this.__state.renderToTexture&&(this.__stage.context3D!=this||this.__stage.__renderer.__cleared||(this.__stage.__renderer.__cleared=!0),this.__cleared=!0);k|=this.gl.COLOR_BUFFER_BIT;if(1!=this.__contextState.colorMaskRed||
1!=this.__contextState.colorMaskGreen||1!=this.__contextState.colorMaskBlue||1!=this.__contextState.colorMaskAlpha)this.gl.colorMask(!0,!0,!0,!0),this.__contextState.colorMaskRed=!0,this.__contextState.colorMaskGreen=!0,this.__contextState.colorMaskBlue=!0,this.__contextState.colorMaskAlpha=!0;this.gl.clearColor(a,b,c,d)}0!=(g&2)&&(k|=this.gl.DEPTH_BUFFER_BIT,1!=this.__contextState.depthMask&&(this.gl.depthMask(!0),this.__contextState.depthMask=!0),this.gl.clearDepth(e));0!=(g&4)&&(k|=this.gl.STENCIL_BUFFER_BIT,
255!=this.__contextState.stencilWriteMask&&(this.gl.stencilMask(255),this.__contextState.stencilWriteMask=255),this.gl.clearStencil(f),this.__contextState.stencilWriteMask=255);0!=k&&(this.__setGLScissorTest(!1),this.gl.clear(k))},configureBackBuffer:function(a,b,c,d,e,f){null==f&&(f=!1);null==e&&(e=!1);null==d&&(d=!0);if(null==this.__stage3D)this.backBufferWidth=a,this.backBufferHeight=b,this.__backBufferAntiAlias=c,this.__state.backBufferEnableDepthAndStencil=d,this.__backBufferWantsBestResolution=
e,this.__backBufferWantsBestResolutionOnBrowserZoom=f;else{if(null==this.__backBufferTexture||this.backBufferWidth!=a||this.backBufferHeight!=b){null!=this.__backBufferTexture&&this.__backBufferTexture.dispose();null!=this.__frontBufferTexture&&this.__frontBufferTexture.dispose();this.__backBufferTexture=this.createRectangleTexture(a,b,1,!0);this.__frontBufferTexture=this.createRectangleTexture(a,b,1,!0);null==this.__stage3D.__vertexBuffer&&(this.__stage3D.__vertexBuffer=this.createVertexBuffer(4,
5));var g=Ua.toFloatVector(null,null,null,[a,b,0,1,1,0,b,0,0,1,a,0,0,1,0,0,0,0,0,0]);this.__stage3D.__vertexBuffer.uploadFromVector(g,0,20);null==this.__stage3D.__indexBuffer&&(this.__stage3D.__indexBuffer=this.createIndexBuffer(6),g=Ua.toIntVector(null,null,null,[0,1,2,2,1,3]),this.__stage3D.__indexBuffer.uploadFromVector(g,0,6))}this.backBufferWidth=a;this.backBufferHeight=b;this.__backBufferAntiAlias=c;this.__state.backBufferEnableDepthAndStencil=d;this.__backBufferWantsBestResolution=e;this.__backBufferWantsBestResolutionOnBrowserZoom=
f;this.__state.__primaryGLFramebuffer=this.__backBufferTexture.__getGLFramebuffer(d,c,0);this.__frontBufferTexture.__getGLFramebuffer(d,c,0)}},createCubeTexture:function(a,b,c,d){null==d&&(d=0);return new lk(this,a,b,c,d)},createIndexBuffer:function(a,b){null==b&&(b=1);return new Ar(this,a,b)},createProgram:function(a){null==a&&(a=0);return new Br(this,a)},createRectangleTexture:function(a,b,c,d){return new Fl(this,a,b,Lh.toString(c),d)},createTexture:function(a,b,c,d,e){null==e&&(e=0);return new fj(this,
a,b,c,d,e)},createVertexBuffer:function(a,b,c){null==c&&(c=1);return new Cr(this,a,b,mk.toString(c))},createVideoTexture:function(){return new ep(this)},dispose:function(a){this.gl=null;this.__dispose()},drawToBitmapData:function(a,b,c){if(null!=a)if(b=null!=b?b.__toLimeRectangle():new he(0,0,this.backBufferWidth,this.backBufferHeight),c=null!=c?c.__toLimeVector2():new Gd,this.__stage.context3D==this){if(null!=this.__stage.window){if(null!=this.__stage3D){var d=-this.__stage3D.get_x()|0,e=-this.__stage3D.get_y()|
0;c.x=d;c.y=e}d=this.__stage.window.readPixels();a.image.copyPixels(d,b,c)}}else null!=this.__backBufferTexture&&(d=this.__state.renderToTexture,this.setRenderToBackBuffer(),this.__flushGLFramebuffer(),this.__flushGLViewport(),e=this.backBufferWidth*this.backBufferHeight*4,e=null!=e?new Uint8Array(e):null,this.gl.readPixels(0,0,this.backBufferWidth,this.backBufferHeight,this.__backBufferTexture.__format,this.gl.UNSIGNED_BYTE,e),e=new Ob(new rg(e,this.backBufferWidth,this.backBufferHeight,32,2)),a.image.copyPixels(e,
b,c),null!=d&&this.setRenderToTexture(d,this.__state.renderToTextureDepthStencil,this.__state.renderToTextureAntiAlias,this.__state.renderToTextureSurfaceSelector))},drawTriangles:function(a,b,c){null==c&&(c=-1);null==b&&(b=0);null==this.__state.renderToTexture&&(this.__stage.context3D!=this||this.__stage.__renderer.__cleared?this.__cleared||this.clear(0,0,0,0,1,0,1):this.__stage.__renderer.__clear());this.__flushGL();null!=this.__state.program&&this.__state.program.__flush();c=-1==c?a.__numIndices:
3*c;this.__bindGLElementArrayBuffer(a.__id);this.gl.drawElements(this.gl.TRIANGLES,c,this.gl.UNSIGNED_SHORT,2*b)},present:function(){this.setRenderToBackBuffer();if(null!=this.__stage3D&&null!=this.__backBufferTexture){this.__cleared||this.clear(0,0,0,0,1,0,1);var a=this.__backBufferTexture;this.__backBufferTexture=this.__frontBufferTexture;this.__frontBufferTexture=a;this.__state.__primaryGLFramebuffer=this.__backBufferTexture.__getGLFramebuffer(this.__state.backBufferEnableDepthAndStencil,this.__backBufferAntiAlias,
0);this.__cleared=!1}this.__present=!0},setBlendFactors:function(a,b){this.setBlendFactorsSeparate(a,b,a,b)},setBlendFactorsSeparate:function(a,b,c,d){this.__state.blendSourceRGBFactor=a;this.__state.blendDestinationRGBFactor=b;this.__state.blendSourceAlphaFactor=c;this.__state.blendDestinationAlphaFactor=d;this.__setGLBlendEquation(this.gl.FUNC_ADD)},setColorMask:function(a,b,c,d){this.__state.colorMaskRed=a;this.__state.colorMaskGreen=b;this.__state.colorMaskBlue=c;this.__state.colorMaskAlpha=d},
setCulling:function(a){this.__state.culling=a},setDepthTest:function(a,b){this.__state.depthMask=a;this.__state.depthCompareMode=b},setProgram:function(a){this.__state.program=a;this.__state.shader=null;if(null!=a)for(var b=0,c=a.__samplerStates.length;b<c;){var d=b++;null==this.__state.samplerStates[d]?this.__state.samplerStates[d]=a.__samplerStates[d].clone():this.__state.samplerStates[d].copyFrom(a.__samplerStates[d])}},setProgramConstantsFromByteArray:function(a,b,c,d,e){if(0!=c&&null!=this.__state.program&&
(null==this.__state.program||1!=this.__state.program.__format)){-1==c&&(c=(za.get_length(d)>>>2)-e);var f=(a=1==a)?this.__vertexConstants:this.__fragmentConstants,g=za.toBytes(d),k=0;d=za.get_length(d);null==k&&(k=0);d=null==k?new Float32Array(g.b.bufferValue):null==d?new Float32Array(g.b.bufferValue,k):new Float32Array(g.b.bufferValue,k,d);g=4*b;e=Da.toFloat(e)/Da.toFloat(4)|0;k=0;for(var l=4*c;k<l;){var m=k++;f[g+m]=d[e+m]}null!=this.__state.program&&this.__state.program.__markDirty(a,b,c)}},setProgramConstantsFromMatrix:function(a,
b,c,d){null==d&&(d=!1);if(null!=this.__state.program&&1==this.__state.program.__format)this.__flushGLProgram(),a=new Float32Array(16),a[0]=c.rawData.get(0),a[1]=c.rawData.get(1),a[2]=c.rawData.get(2),a[3]=c.rawData.get(3),a[4]=c.rawData.get(4),a[5]=c.rawData.get(5),a[6]=c.rawData.get(6),a[7]=c.rawData.get(7),a[8]=c.rawData.get(8),a[9]=c.rawData.get(9),a[10]=c.rawData.get(10),a[11]=c.rawData.get(11),a[12]=c.rawData.get(12),a[13]=c.rawData.get(13),a[14]=c.rawData.get(14),a[15]=c.rawData.get(15),Ab.uniformMatrix4fv(this.gl,
b,d,a);else{var e=(a=1==a)?this.__vertexConstants:this.__fragmentConstants;c=c.rawData;var f=4*b;d?(e[f++]=c.get(0),e[f++]=c.get(4),e[f++]=c.get(8),e[f++]=c.get(12),e[f++]=c.get(1),e[f++]=c.get(5),e[f++]=c.get(9),e[f++]=c.get(13),e[f++]=c.get(2),e[f++]=c.get(6),e[f++]=c.get(10),e[f++]=c.get(14),e[f++]=c.get(3),e[f++]=c.get(7),e[f++]=c.get(11)):(e[f++]=c.get(0),e[f++]=c.get(1),e[f++]=c.get(2),e[f++]=c.get(3),e[f++]=c.get(4),e[f++]=c.get(5),e[f++]=c.get(6),e[f++]=c.get(7),e[f++]=c.get(8),e[f++]=c.get(9),
e[f++]=c.get(10),e[f++]=c.get(11),e[f++]=c.get(12),e[f++]=c.get(13),e[f++]=c.get(14));e[f++]=c.get(15);null!=this.__state.program&&this.__state.program.__markDirty(a,b,4)}},setProgramConstantsFromVector:function(a,b,c,d){null==d&&(d=-1);if(0!=d&&(null==this.__state.program||1!=this.__state.program.__format)){-1==d&&(d=c.get_length()>>2);for(var e=(a=1==a)?this.__vertexConstants:this.__fragmentConstants,f=0,g=4*b,k=0,l=d;k<l;)k++,e[g++]=c.get(f++),e[g++]=c.get(f++),e[g++]=c.get(f++),e[g++]=c.get(f++);
null!=this.__state.program&&this.__state.program.__markDirty(a,b,d)}},setRenderToBackBuffer:function(){this.__state.renderToTexture=null},setRenderToTexture:function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);null==b&&(b=!1);this.__state.renderToTexture=a;this.__state.renderToTextureDepthStencil=b;this.__state.renderToTextureAntiAlias=c;this.__state.renderToTextureSurfaceSelector=d},setSamplerStateAt:function(a,b,c,d){null==this.__state.samplerStates[a]&&(this.__state.samplerStates[a]=new zh);a=this.__state.samplerStates[a];
a.wrap=b;a.filter=c;a.mipfilter=d},setScissorRectangle:function(a){null!=a?(this.__state.scissorEnabled=!0,this.__state.scissorRectangle.copyFrom(a)):this.__state.scissorEnabled=!1},setStencilActions:function(a,b,c,d,e){null==e&&(e=5);null==d&&(d=5);null==c&&(c=5);null==b&&(b=0);null==a&&(a=2);this.__state.stencilTriangleFace=a;this.__state.stencilCompareMode=b;this.__state.stencilPass=c;this.__state.stencilDepthFail=d;this.__state.stencilFail=e},setStencilReferenceValue:function(a,b,c){null==c&&
(c=255);null==b&&(b=255);this.__state.stencilReferenceValue=a;this.__state.stencilReadMask=b;this.__state.stencilWriteMask=c},setTextureAt:function(a,b){this.__state.textures[a]=b},setVertexBufferAt:function(a,b,c,d){null==d&&(d=4);null==c&&(c=0);if(null==b)this.gl.disableVertexAttribArray(a),this.__bindGLArrayBuffer(null);else switch(this.__bindGLArrayBuffer(b.__id),this.gl.enableVertexAttribArray(a),c*=4,d){case 0:this.gl.vertexAttribPointer(a,4,this.gl.UNSIGNED_BYTE,!0,b.__stride,c);break;case 1:this.gl.vertexAttribPointer(a,
1,this.gl.FLOAT,!1,b.__stride,c);break;case 2:this.gl.vertexAttribPointer(a,2,this.gl.FLOAT,!1,b.__stride,c);break;case 3:this.gl.vertexAttribPointer(a,3,this.gl.FLOAT,!1,b.__stride,c);break;case 4:this.gl.vertexAttribPointer(a,4,this.gl.FLOAT,!1,b.__stride,c);break;default:throw new E(new dd);}},__bindGLArrayBuffer:function(a){this.__contextState.__currentGLArrayBuffer!=a&&(this.gl.bindBuffer(this.gl.ARRAY_BUFFER,a),this.__contextState.__currentGLArrayBuffer=a)},__bindGLElementArrayBuffer:function(a){this.__contextState.__currentGLElementArrayBuffer!=
a&&(this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,a),this.__contextState.__currentGLElementArrayBuffer=a)},__bindGLFramebuffer:function(a){this.__contextState.__currentGLFramebuffer!=a&&(this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,a),this.__contextState.__currentGLFramebuffer=a)},__bindGLTexture2D:function(a){this.gl.bindTexture(this.gl.TEXTURE_2D,a);this.__contextState.__currentGLTexture2D=a},__bindGLTextureCubeMap:function(a){this.gl.bindTexture(this.gl.TEXTURE_CUBE_MAP,a);this.__contextState.__currentGLTextureCubeMap=
a},__dispose:function(){this.driverInfo+=" (Disposed)";null!=this.__stage3D&&(this.__stage3D.__indexBuffer=null,this.__stage3D.__vertexBuffer=null,this.__stage3D=this.__stage3D.context3D=null);this.__positionScale=this.__frontBufferTexture=this.__fragmentConstants=this.__renderStage3DProgram=this.__context=this.__backBufferTexture=null;this.__present=!1;this.__vertexConstants=this.__stage=this.__quadIndexBuffer=null},__drawTriangles:function(a,b){null==a&&(a=0);null==this.__state.renderToTexture&&
(this.__stage.context3D!=this||this.__stage.__renderer.__cleared?this.__cleared||this.clear(0,0,0,0,1,0,1):this.__stage.__renderer.__clear());this.__flushGL();null!=this.__state.program&&this.__state.program.__flush();this.gl.drawArrays(this.gl.TRIANGLES,a,b)},__flushGL:function(){this.__flushGLProgram();this.__flushGLFramebuffer();this.__flushGLViewport();this.__flushGLBlend();if(this.__contextState.colorMaskRed!=this.__state.colorMaskRed||this.__contextState.colorMaskGreen!=this.__state.colorMaskGreen||
this.__contextState.colorMaskBlue!=this.__state.colorMaskBlue||this.__contextState.colorMaskAlpha!=this.__state.colorMaskAlpha)this.gl.colorMask(this.__state.colorMaskRed,this.__state.colorMaskGreen,this.__state.colorMaskBlue,this.__state.colorMaskAlpha),this.__contextState.colorMaskRed=this.__state.colorMaskRed,this.__contextState.colorMaskGreen=this.__state.colorMaskGreen,this.__contextState.colorMaskBlue=this.__state.colorMaskBlue,this.__contextState.colorMaskAlpha=this.__state.colorMaskAlpha;
this.__flushGLCulling();this.__flushGLDepth();this.__flushGLScissor();this.__flushGLStencil();this.__flushGLTextures()},__flushGLBlend:function(){if(this.__contextState.blendDestinationRGBFactor!=this.__state.blendDestinationRGBFactor||this.__contextState.blendSourceRGBFactor!=this.__state.blendSourceRGBFactor||this.__contextState.blendDestinationAlphaFactor!=this.__state.blendDestinationAlphaFactor||this.__contextState.blendSourceAlphaFactor!=this.__state.blendSourceAlphaFactor)this.__setGLBlend(!0),
this.__state.blendDestinationRGBFactor==this.__state.blendDestinationAlphaFactor&&this.__state.blendSourceRGBFactor==this.__state.blendSourceAlphaFactor?this.gl.blendFunc(this.__getGLBlend(this.__state.blendSourceRGBFactor),this.__getGLBlend(this.__state.blendDestinationRGBFactor)):this.gl.blendFuncSeparate(this.__getGLBlend(this.__state.blendSourceRGBFactor),this.__getGLBlend(this.__state.blendDestinationRGBFactor),this.__getGLBlend(this.__state.blendSourceAlphaFactor),this.__getGLBlend(this.__state.blendDestinationAlphaFactor)),
this.__contextState.blendDestinationRGBFactor=this.__state.blendDestinationRGBFactor,this.__contextState.blendSourceRGBFactor=this.__state.blendSourceRGBFactor,this.__contextState.blendDestinationAlphaFactor=this.__state.blendDestinationAlphaFactor,this.__contextState.blendSourceAlphaFactor=this.__state.blendSourceAlphaFactor},__flushGLColor:function(){if(this.__contextState.colorMaskRed!=this.__state.colorMaskRed||this.__contextState.colorMaskGreen!=this.__state.colorMaskGreen||this.__contextState.colorMaskBlue!=
this.__state.colorMaskBlue||this.__contextState.colorMaskAlpha!=this.__state.colorMaskAlpha)this.gl.colorMask(this.__state.colorMaskRed,this.__state.colorMaskGreen,this.__state.colorMaskBlue,this.__state.colorMaskAlpha),this.__contextState.colorMaskRed=this.__state.colorMaskRed,this.__contextState.colorMaskGreen=this.__state.colorMaskGreen,this.__contextState.colorMaskBlue=this.__state.colorMaskBlue,this.__contextState.colorMaskAlpha=this.__state.colorMaskAlpha},__flushGLCulling:function(){if(this.__contextState.culling!=
this.__state.culling){if(3==this.__state.culling)this.__setGLCullFace(!1);else switch(this.__setGLCullFace(!0),this.__state.culling){case 0:this.gl.cullFace(this.gl.BACK);break;case 1:this.gl.cullFace(this.gl.FRONT);break;case 2:this.gl.cullFace(this.gl.FRONT_AND_BACK);break;case 3:break;default:throw new E(new dd);}this.__contextState.culling=this.__state.culling}},__flushGLDepth:function(){var a=this.__state.depthMask&&(null!=this.__state.renderToTexture?this.__state.renderToTextureDepthStencil:
this.__state.backBufferEnableDepthAndStencil);this.__contextState.depthMask!=a&&(this.gl.depthMask(a),this.__contextState.depthMask=a);if(this.__contextState.depthCompareMode!=this.__state.depthCompareMode){switch(this.__state.depthCompareMode){case 0:this.gl.depthFunc(this.gl.ALWAYS);break;case 1:this.gl.depthFunc(this.gl.EQUAL);break;case 2:this.gl.depthFunc(this.gl.GREATER);break;case 3:this.gl.depthFunc(this.gl.GEQUAL);break;case 4:this.gl.depthFunc(this.gl.LESS);break;case 5:this.gl.depthFunc(this.gl.LEQUAL);
break;case 6:this.gl.depthFunc(this.gl.NEVER);break;case 7:this.gl.depthFunc(this.gl.NOTEQUAL);break;default:throw new E(new dd);}this.__contextState.depthCompareMode=this.__state.depthCompareMode}},__flushGLFramebuffer:function(){if(null!=this.__state.renderToTexture){if(this.__contextState.renderToTexture!=this.__state.renderToTexture||this.__contextState.renderToTextureSurfaceSelector!=this.__state.renderToTextureSurfaceSelector){var a=this.__state.renderToTexture.__getGLFramebuffer(this.__state.renderToTextureDepthStencil,
this.__state.renderToTextureAntiAlias,this.__state.renderToTextureSurfaceSelector);this.__bindGLFramebuffer(a);this.__contextState.renderToTexture=this.__state.renderToTexture;this.__contextState.renderToTextureAntiAlias=this.__state.renderToTextureAntiAlias;this.__contextState.renderToTextureDepthStencil=this.__state.renderToTextureDepthStencil;this.__contextState.renderToTextureSurfaceSelector=this.__state.renderToTextureSurfaceSelector}this.__setGLDepthTest(this.__state.renderToTextureDepthStencil);
this.__setGLStencilTest(this.__state.renderToTextureDepthStencil);this.__setGLFrontFace(!0)}else{if(null==this.__stage&&0==this.backBufferWidth&&0==this.backBufferHeight)throw new E(new hd("Context3D backbuffer has not been configured"));if(null!=this.__contextState.renderToTexture||this.__contextState.__currentGLFramebuffer!=this.__state.__primaryGLFramebuffer||this.__contextState.backBufferEnableDepthAndStencil!=this.__state.backBufferEnableDepthAndStencil)this.__bindGLFramebuffer(this.__state.__primaryGLFramebuffer),
this.__contextState.renderToTexture=null,this.__contextState.backBufferEnableDepthAndStencil=this.__state.backBufferEnableDepthAndStencil;this.__setGLDepthTest(this.__state.backBufferEnableDepthAndStencil);this.__setGLStencilTest(this.__state.backBufferEnableDepthAndStencil);this.__setGLFrontFace(this.__stage.context3D!=this)}},__flushGLProgram:function(){var a=this.__state.shader,b=this.__state.program;this.__contextState.shader!=a&&(null!=this.__contextState.shader&&this.__contextState.shader.__disable(),
null!=a&&a.__enable(),this.__contextState.shader=a);this.__contextState.program!=b&&(null!=this.__contextState.program&&this.__contextState.program.__disable(),null!=b&&b.__enable(),this.__contextState.program=b);null!=b&&0==b.__format&&(this.__positionScale[1]=this.__stage.context3D==this&&null==this.__state.renderToTexture?1:-1,b.__setPositionScale(this.__positionScale))},__flushGLScissor:function(){if(this.__state.scissorEnabled){this.__setGLScissorTest(!0);this.__contextState.scissorEnabled=!0;
var a=this.__state.scissorRectangle.x|0,b=this.__state.scissorRectangle.y|0,c=this.__state.scissorRectangle.width|0,d=this.__state.scissorRectangle.height|0;null==this.__state.renderToTexture&&null==this.__stage3D&&(b=(this.__stage.window.__height*this.__stage.window.__scale|0)-(this.__state.scissorRectangle.height|0)-b);if(this.__contextState.scissorRectangle.x!=a||this.__contextState.scissorRectangle.y!=b||this.__contextState.scissorRectangle.width!=c||this.__contextState.scissorRectangle.height!=
d)this.gl.scissor(a,b,c,d),this.__contextState.scissorRectangle.setTo(a,b,c,d)}else this.__contextState.scissorEnabled!=this.__state.scissorEnabled&&(this.__setGLScissorTest(!1),this.__contextState.scissorEnabled=!1)},__flushGLStencil:function(){if(this.__contextState.stencilTriangleFace!=this.__state.stencilTriangleFace||this.__contextState.stencilPass!=this.__state.stencilPass||this.__contextState.stencilDepthFail!=this.__state.stencilDepthFail||this.__contextState.stencilFail!=this.__state.stencilFail)this.gl.stencilOpSeparate(this.__getGLTriangleFace(this.__state.stencilTriangleFace),
this.__getGLStencilAction(this.__state.stencilFail),this.__getGLStencilAction(this.__state.stencilDepthFail),this.__getGLStencilAction(this.__state.stencilPass)),this.__contextState.stencilTriangleFace=this.__state.stencilTriangleFace,this.__contextState.stencilPass=this.__state.stencilPass,this.__contextState.stencilDepthFail=this.__state.stencilDepthFail,this.__contextState.stencilFail=this.__state.stencilFail;this.__contextState.stencilWriteMask!=this.__state.stencilWriteMask&&(this.gl.stencilMask(this.__state.stencilWriteMask),
this.__contextState.stencilWriteMask=this.__state.stencilWriteMask);if(this.__contextState.stencilCompareMode!=this.__state.stencilCompareMode||this.__contextState.stencilReferenceValue!=this.__state.stencilReferenceValue||this.__contextState.stencilReadMask!=this.__state.stencilReadMask)this.gl.stencilFunc(this.__getGLCompareMode(this.__state.stencilCompareMode),this.__state.stencilReferenceValue,this.__state.stencilReadMask),this.__contextState.stencilCompareMode=this.__state.stencilCompareMode,
this.__contextState.stencilReferenceValue=this.__state.stencilReferenceValue,this.__contextState.stencilReadMask=this.__state.stencilReadMask},__flushGLTextures:function(){for(var a=0,b,c,d=0,e=this.__state.textures.length;d<e;){var f=d++;b=this.__state.textures[f];c=this.__state.samplerStates[f];null==c&&(this.__state.samplerStates[f]=new zh,c=this.__state.samplerStates[f]);this.gl.activeTexture(this.gl.TEXTURE0+a);null!=b?(b.__textureTarget==this.gl.TEXTURE_2D?this.__bindGLTexture2D(b.__getTexture()):
this.__bindGLTextureCubeMap(b.__getTexture()),this.__contextState.textures[f]=b,b.__setSamplerState(c)):this.__bindGLTexture2D(null);null!=this.__state.program&&0==this.__state.program.__format&&c.textureAlpha&&(this.gl.activeTexture(this.gl.TEXTURE0+a+4),null!=b&&null!=b.__alphaTexture?(b.__alphaTexture.__textureTarget==this.gl.TEXTURE_2D?this.__bindGLTexture2D(b.__alphaTexture.__getTexture()):this.__bindGLTextureCubeMap(b.__alphaTexture.__getTexture()),b.__alphaTexture.__setSamplerState(c),this.gl.uniform1i(this.__state.program.__agalAlphaSamplerEnabled[a].location,
1)):(this.__bindGLTexture2D(null),this.gl.uniform1i(this.__state.program.__agalAlphaSamplerEnabled[a].location,0)));++a}},__flushGLViewport:function(){if(null==this.__state.renderToTexture)if(this.__stage.context3D==this){var a=null==this.__stage3D?0:this.__stage3D.get_x()|0,b=this.__stage.window.__height*this.__stage.window.__scale-this.backBufferHeight-(null==this.__stage3D?0:this.__stage3D.get_y())|0;this.gl.viewport(a,b,this.backBufferWidth,this.backBufferHeight)}else this.gl.viewport(0,0,this.backBufferWidth,
this.backBufferHeight);else b=a=0,this.__state.renderToTexture instanceof fj?(b=this.__state.renderToTexture,a=b.__width,b=b.__height):this.__state.renderToTexture instanceof Fl?(b=this.__state.renderToTexture,a=b.__width,b=b.__height):this.__state.renderToTexture instanceof lk&&(b=this.__state.renderToTexture,b=a=b.__size),this.gl.viewport(0,0,a,b)},__getGLBlend:function(a){switch(a){case 0:return this.gl.DST_ALPHA;case 1:return this.gl.DST_COLOR;case 2:return this.gl.ONE;case 3:return this.gl.ONE_MINUS_DST_ALPHA;
case 4:return this.gl.ONE_MINUS_DST_COLOR;case 5:return this.gl.ONE_MINUS_SRC_ALPHA;case 6:return this.gl.ONE_MINUS_SRC_COLOR;case 7:return this.gl.SRC_ALPHA;case 8:return this.gl.SRC_COLOR;case 9:return this.gl.ZERO;default:throw new E(new dd);}},__getGLCompareMode:function(a){switch(a){case 0:return this.gl.ALWAYS;case 1:return this.gl.EQUAL;case 2:return this.gl.GREATER;case 3:return this.gl.GEQUAL;case 4:return this.gl.LESS;case 5:return this.gl.LEQUAL;case 6:return this.gl.NEVER;case 7:return this.gl.NOTEQUAL;
default:return this.gl.EQUAL}},__getGLStencilAction:function(a){switch(a){case 0:return this.gl.DECR;case 1:return this.gl.DECR_WRAP;case 2:return this.gl.INCR;case 3:return this.gl.INCR_WRAP;case 4:return this.gl.INVERT;case 5:return this.gl.KEEP;case 6:return this.gl.REPLACE;case 7:return this.gl.ZERO;default:return this.gl.KEEP}},__getGLTriangleFace:function(a){switch(a){case 0:return this.gl.BACK;case 1:return this.gl.FRONT;case 2:return this.gl.FRONT_AND_BACK;case 3:return this.gl.NONE;default:return this.gl.FRONT_AND_BACK}},
__renderStage3D:function(a){var b=a.context3D;if(null!=b&&b!=this&&null!=b.__frontBufferTexture&&a.visible&&0<this.backBufferHeight&&0<this.backBufferWidth){if(null==this.__renderStage3DProgram){var c=new Z;c.assemble(nk.toString(1),"m44 op, va0, vc0\nmov v0, va1");var d=new Z;d.assemble(nk.toString(0),"tex ft1, v0, fs0 <2d,nearest,nomip>\nmov oc, ft1");this.__renderStage3DProgram=this.createProgram();this.__renderStage3DProgram.upload(c.agalcode,d.agalcode)}this.setProgram(this.__renderStage3DProgram);
this.setBlendFactors(2,9);this.setColorMask(!0,!0,!0,!0);this.setCulling(3);this.setDepthTest(!1,0);this.setStencilActions();this.setStencilReferenceValue(0,0,0);this.setScissorRectangle(null);this.setTextureAt(0,b.__frontBufferTexture);this.setVertexBufferAt(0,a.__vertexBuffer,0,3);this.setVertexBufferAt(1,a.__vertexBuffer,3,2);this.setProgramConstantsFromMatrix(1,0,a.__renderTransform,!0);this.drawTriangles(a.__indexBuffer);this.__present=!0}},__setGLBlend:function(a){this.__contextState.__enableGLBlend!=
a&&(a?this.gl.enable(this.gl.BLEND):this.gl.disable(this.gl.BLEND),this.__contextState.__enableGLBlend=a)},__setGLBlendEquation:function(a){this.__contextState.__glBlendEquation!=a&&(this.gl.blendEquation(a),this.__contextState.__glBlendEquation=a)},__setGLCullFace:function(a){this.__contextState.__enableGLCullFace!=a&&(a?this.gl.enable(this.gl.CULL_FACE):this.gl.disable(this.gl.CULL_FACE),this.__contextState.__enableGLCullFace=a)},__setGLDepthTest:function(a){this.__contextState.__enableGLDepthTest!=
a&&(a?this.gl.enable(this.gl.DEPTH_TEST):this.gl.disable(this.gl.DEPTH_TEST),this.__contextState.__enableGLDepthTest=a)},__setGLFrontFace:function(a){this.__contextState.__frontFaceGLCCW!=a&&(this.gl.frontFace(a?this.gl.CCW:this.gl.CW),this.__contextState.__frontFaceGLCCW=a)},__setGLScissorTest:function(a){this.__contextState.__enableGLScissorTest!=a&&(a?this.gl.enable(this.gl.SCISSOR_TEST):this.gl.disable(this.gl.SCISSOR_TEST),this.__contextState.__enableGLScissorTest=a)},__setGLStencilTest:function(a){this.__contextState.__enableGLStencilTest!=
a&&(a?this.gl.enable(this.gl.STENCIL_TEST):this.gl.disable(this.gl.STENCIL_TEST),this.__contextState.__enableGLStencilTest=a)},get_enableErrorChecking:function(){return this.__enableErrorChecking},set_enableErrorChecking:function(a){return this.__enableErrorChecking=a},__class__:Hc,__properties__:{set_enableErrorChecking:"set_enableErrorChecking",get_enableErrorChecking:"get_enableErrorChecking"}});var Ag={};h["openfl.display3D._Context3DBlendFactor.Context3DBlendFactor_Impl_"]=Ag;Ag.__name__="openfl.display3D._Context3DBlendFactor.Context3DBlendFactor_Impl_";
Ag.fromString=function(a){switch(a){case "destinationAlpha":return 0;case "destinationColor":return 1;case "one":return 2;case "oneMinusDestinationAlpha":return 3;case "oneMinusDestinationColor":return 4;case "oneMinusSourceAlpha":return 5;case "oneMinusSourceColor":return 6;case "sourceAlpha":return 7;case "sourceColor":return 8;case "zero":return 9;default:return null}};Ag.toString=function(a){switch(a){case 0:return"destinationAlpha";case 1:return"destinationColor";case 2:return"one";case 3:return"oneMinusDestinationAlpha";
case 4:return"oneMinusDestinationColor";case 5:return"oneMinusSourceAlpha";case 6:return"oneMinusSourceColor";case 7:return"sourceAlpha";case 8:return"sourceColor";case 9:return"zero";default:return null}};var mk={};h["openfl.display3D._Context3DBufferUsage.Context3DBufferUsage_Impl_"]=mk;mk.__name__="openfl.display3D._Context3DBufferUsage.Context3DBufferUsage_Impl_";mk.fromString=function(a){switch(a){case "dynamicDraw":return 0;case "staticDraw":return 1;default:return null}};mk.toString=function(a){switch(a){case 0:return"dynamicDraw";
case 1:return"staticDraw";default:return null}};var lh={};h["openfl.display3D._Context3DCompareMode.Context3DCompareMode_Impl_"]=lh;lh.__name__="openfl.display3D._Context3DCompareMode.Context3DCompareMode_Impl_";lh.fromString=function(a){switch(a){case "always":return 0;case "equal":return 1;case "greater":return 2;case "greaterEqual":return 3;case "less":return 4;case "lessEqual":return 5;case "never":return 6;case "notEqual":return 7;default:return null}};lh.toString=function(a){switch(a){case 0:return"always";
case 1:return"equal";case 2:return"greater";case 3:return"greaterEqual";case 4:return"less";case 5:return"lessEqual";case 6:return"never";case 7:return"notEqual";default:return null}};var Gl={};h["openfl.display3D._Context3DMipFilter.Context3DMipFilter_Impl_"]=Gl;Gl.__name__="openfl.display3D._Context3DMipFilter.Context3DMipFilter_Impl_";Gl.fromString=function(a){switch(a){case "miplinear":return 0;case "mipnearest":return 1;case "mipnone":return 2;default:return null}};Gl.toString=function(a){switch(a){case 0:return"miplinear";
case 1:return"mipnearest";case 2:return"mipnone";default:return null}};var vi={};h["openfl.display3D._Context3DProfile.Context3DProfile_Impl_"]=vi;vi.__name__="openfl.display3D._Context3DProfile.Context3DProfile_Impl_";vi.fromString=function(a){switch(a){case "baseline":return 0;case "baselineConstrained":return 1;case "baselineExtended":return 2;case "standard":return 3;case "standardConstrained":return 4;case "standardExtended":return 5;default:return null}};vi.toString=function(a){switch(a){case 0:return"baseline";
case 1:return"baselineConstrained";case 2:return"baselineExtended";case 3:return"standard";case 4:return"standardConstrained";case 5:return"standardExtended";default:return null}};var fp={};h["openfl.display3D._Context3DProgramFormat.Context3DProgramFormat_Impl_"]=fp;fp.__name__="openfl.display3D._Context3DProgramFormat.Context3DProgramFormat_Impl_";fp.fromString=function(a){switch(a){case "agal":return 0;case "glsl":return 1;default:return null}};fp.toString=function(a){switch(a){case 0:return"agal";
case 1:return"glsl";default:return null}};var nk={};h["openfl.display3D._Context3DProgramType.Context3DProgramType_Impl_"]=nk;nk.__name__="openfl.display3D._Context3DProgramType.Context3DProgramType_Impl_";nk.fromString=function(a){switch(a){case "fragment":return 0;case "vertex":return 1;default:return null}};nk.toString=function(a){switch(a){case 0:return"fragment";case 1:return"vertex";default:return null}};var gp={};h["openfl.display3D._Context3DRenderMode.Context3DRenderMode_Impl_"]=gp;gp.__name__=
"openfl.display3D._Context3DRenderMode.Context3DRenderMode_Impl_";gp.fromString=function(a){switch(a){case "auto":return 0;case "software":return 1;default:return null}};gp.toString=function(a){switch(a){case 0:return"auto";case 1:return"software";default:return null}};var mh={};h["openfl.display3D._Context3DStencilAction.Context3DStencilAction_Impl_"]=mh;mh.__name__="openfl.display3D._Context3DStencilAction.Context3DStencilAction_Impl_";mh.fromString=function(a){switch(a){case "decrementSaturate":return 0;
case "decrementWrap":return 1;case "incrementSaturate":return 2;case "incrementWrap":return 3;case "invert":return 4;case "keep":return 5;case "set":return 6;case "zero":return 7;default:return null}};mh.toString=function(a){switch(a){case 0:return"decrementSaturate";case 1:return"decrementWrap";case 2:return"incrementSaturate";case 3:return"incrementWrap";case 4:return"invert";case 5:return"keep";case 6:return"set";case 7:return"zero";default:return null}};var wi={};h["openfl.display3D._Context3DTextureFilter.Context3DTextureFilter_Impl_"]=
wi;wi.__name__="openfl.display3D._Context3DTextureFilter.Context3DTextureFilter_Impl_";wi.fromString=function(a){switch(a){case "anisotropic16x":return 0;case "anisotropic2x":return 1;case "anisotropic4x":return 2;case "anisotropic8x":return 3;case "linear":return 4;case "nearest":return 5;default:return null}};wi.toString=function(a){switch(a){case 0:return"anisotropic16x";case 1:return"anisotropic2x";case 2:return"anisotropic4x";case 3:return"anisotropic8x";case 4:return"linear";case 5:return"nearest";
default:return null}};var Lh={};h["openfl.display3D._Context3DTextureFormat.Context3DTextureFormat_Impl_"]=Lh;Lh.__name__="openfl.display3D._Context3DTextureFormat.Context3DTextureFormat_Impl_";Lh.fromString=function(a){switch(a){case "bgrPacked565":return 0;case "bgra":return 1;case "bgraPacked4444":return 2;case "compressed":return 3;case "compressedAlpha":return 4;case "rgbaHalfFloat":return 5;default:return null}};Lh.toString=function(a){switch(a){case 0:return"bgrPacked565";case 1:return"bgra";
case 2:return"bgraPacked4444";case 3:return"compressed";case 4:return"compressedAlpha";case 5:return"rgbaHalfFloat";default:return null}};var ok={};h["openfl.display3D._Context3DTriangleFace.Context3DTriangleFace_Impl_"]=ok;ok.__name__="openfl.display3D._Context3DTriangleFace.Context3DTriangleFace_Impl_";ok.fromString=function(a){switch(a){case "back":return 0;case "front":return 1;case "frontAndBack":return 2;case "none":return 3;default:return null}};ok.toString=function(a){switch(a){case 0:return"back";
case 1:return"front";case 2:return"frontAndBack";case 3:return"none";default:return null}};var gj={};h["openfl.display3D._Context3DVertexBufferFormat.Context3DVertexBufferFormat_Impl_"]=gj;gj.__name__="openfl.display3D._Context3DVertexBufferFormat.Context3DVertexBufferFormat_Impl_";gj.fromString=function(a){switch(a){case "bytes4":return 0;case "float1":return 1;case "float2":return 2;case "float3":return 3;case "float4":return 4;default:return null}};gj.toString=function(a){switch(a){case 0:return"bytes4";
case 1:return"float1";case 2:return"float2";case 3:return"float3";case 4:return"float4";default:return null}};var pk={};h["openfl.display3D._Context3DWrapMode.Context3DWrapMode_Impl_"]=pk;pk.__name__="openfl.display3D._Context3DWrapMode.Context3DWrapMode_Impl_";pk.fromString=function(a){switch(a){case "clamp":return 0;case "clamp_u_repeat_v":return 1;case "repeat":return 2;case "repeat_u_clamp_v":return 3;default:return null}};pk.toString=function(a){switch(a){case 0:return"clamp";case 1:return"clamp_u_repeat_v";
case 2:return"repeat";case 3:return"repeat_u_clamp_v";default:return null}};var Ar=function(a,b,c){this.__context=a;this.__numIndices=b;a=this.__context.gl;this.__id=a.createBuffer();this.__usage=0==c?a.DYNAMIC_DRAW:a.STATIC_DRAW};h["openfl.display3D.IndexBuffer3D"]=Ar;Ar.__name__="openfl.display3D.IndexBuffer3D";Ar.prototype={__context:null,__id:null,__memoryUsage:null,__numIndices:null,__tempUInt16Array:null,__usage:null,dispose:function(){this.__context.gl.deleteBuffer(this.__id)},uploadFromByteArray:function(a,
b,c,d){b+=2*c;a=za.toArrayBuffer(a);null==b&&(b=0);d=null!=a?null==d?new Uint16Array(a,b):new Uint16Array(a,b,d):null;this.uploadFromTypedArray(d)},uploadFromTypedArray:function(a,b){null!=a&&(b=this.__context.gl,this.__context.__bindGLElementArrayBuffer(this.__id),Ab.bufferData(b,b.ELEMENT_ARRAY_BUFFER,a,this.__usage))},uploadFromVector:function(a,b,c){if(null!=a){var d=b+c,e=this.__tempUInt16Array;if(null==this.__tempUInt16Array||this.__tempUInt16Array.length<c)this.__tempUInt16Array=null!=c?new Uint16Array(c):
null,null!=e&&this.__tempUInt16Array.set(e);for(c=b;c<d;)e=c++,this.__tempUInt16Array[e-b]=a.get(e);this.uploadFromTypedArray(this.__tempUInt16Array)}},__class__:Ar};var Br=function(a,b){this.__context=a;this.__format=b;0==this.__format?(this.__agalSamplerUsageMask=0,this.__agalUniforms=new Sa,this.__agalSamplerUniforms=new Sa,this.__agalAlphaSamplerUniforms=new Sa,this.__agalAlphaSamplerEnabled=[]):(this.__glslAttribNames=[],this.__glslAttribTypes=[],this.__glslSamplerNames=[],this.__glslUniformLocations=
[],this.__glslUniformNames=[],this.__glslUniformTypes=[]);this.__samplerStates=[]};h["openfl.display3D.Program3D"]=Br;Br.__name__="openfl.display3D.Program3D";Br.prototype={__agalAlphaSamplerEnabled:null,__agalAlphaSamplerUniforms:null,__agalFragmentUniformMap:null,__agalPositionScale:null,__agalSamplerUniforms:null,__agalSamplerUsageMask:null,__agalUniforms:null,__agalVertexUniformMap:null,__context:null,__format:null,__glFragmentShader:null,__glFragmentSource:null,__glProgram:null,__glslAttribNames:null,
__glslAttribTypes:null,__glslSamplerNames:null,__glslUniformLocations:null,__glslUniformNames:null,__glslUniformTypes:null,__glVertexShader:null,__glVertexSource:null,__samplerStates:null,dispose:function(){this.__deleteShaders()},getAttributeIndex:function(a){if(0==this.__format)return ba.startsWith(a,"va")?K.parseInt(a.substring(2)):-1;for(var b=0,c=this.__glslAttribNames.length;b<c;){var d=b++;if(this.__glslAttribNames[d]==a)return d}return-1},getConstantIndex:function(a){if(0==this.__format)return ba.startsWith(a,
"vc")?K.parseInt(a.substring(2)):ba.startsWith(a,"fc")?K.parseInt(a.substring(2)):-1;for(var b=0,c=this.__glslUniformNames.length;b<c;){var d=b++;if(this.__glslUniformNames[d]==a)return this.__glslUniformLocations[d]}return-1},upload:function(a,b){if(0==this.__format){var c=[];a=cf.convertToGLSL(a,null);b=cf.convertToGLSL(b,c);5==Ta.level&&(Ta.info(a,{fileName:"openfl/display3D/Program3D.hx",lineNumber:399,className:"openfl.display3D.Program3D",methodName:"upload"}),Ta.info(b,{fileName:"openfl/display3D/Program3D.hx",
lineNumber:400,className:"openfl.display3D.Program3D",methodName:"upload"}));this.__deleteShaders();this.__uploadFromGLSL(a,b);this.__buildAGALUniformList();b=0;for(a=c.length;b<a;){var d=b++;this.__samplerStates[d]=c[d]}}},uploadSources:function(a,b){if(1==this.__format){var c="#ifdef GL_ES\n\t\t\t#ifdef GL_FRAGMENT_PRECISION_HIGH\n\t\t\tprecision highp float;\n\t\t\t#else\n\t\t\tprecision mediump float;\n\t\t\t#endif\n\t\t\t#endif\n\t\t\t"+a,d="#ifdef GL_ES\n\t\t\t#ifdef GL_FRAGMENT_PRECISION_HIGH\n\t\t\tprecision highp float;\n\t\t\t#else\n\t\t\tprecision mediump float;\n\t\t\t#endif\n\t\t\t#endif\n\t\t\t"+
b;if(c!=this.__glVertexSource||d!=this.__glFragmentSource){this.__processGLSLData(a,"attribute");this.__processGLSLData(a,"uniform");this.__processGLSLData(b,"uniform");this.__deleteShaders();this.__uploadFromGLSL(c,d);var e=this.__glslSamplerNames;c=this.__glslAttribNames;d=this.__glslAttribTypes;a=this.__glslUniformNames;this.__glslSamplerNames=[];this.__glslAttribNames=[];this.__glslAttribTypes=[];this.__glslUniformLocations=[];b=this.__context.gl;for(var f,g=0;g<e.length;){var k=e[g];++g;f=b.getUniformLocation(this.__glProgram,
k);this.__glslSamplerNames[f]=k}e=0;for(g=c.length;e<g;)k=e++,f=b.getAttribLocation(this.__glProgram,c[k]),this.__glslAttribNames[f]=c[k],this.__glslAttribTypes[f]=d[k];d=0;for(f=a.length;d<f;)e=d++,c=b.getUniformLocation(this.__glProgram,a[e]),this.__glslUniformLocations[e]=c}}},__buildAGALUniformList:function(){if(1!=this.__format){var a=this.__context.gl;this.__agalUniforms.clear();this.__agalSamplerUniforms.clear();this.__agalAlphaSamplerUniforms.clear();this.__agalAlphaSamplerEnabled=[];this.__agalSamplerUsageMask=
0;var b=a.getProgramParameter(this.__glProgram,a.ACTIVE_UNIFORMS);for(var c=new Sa,d=new Sa,e=0;e<b;){var f=e++,g=a.getActiveUniform(this.__glProgram,f),k=g.name,l=g.size,m=g.type;g=new hp(this.__context);g.name=k;g.size=l;g.type=m;g.location=a.getUniformLocation(this.__glProgram,g.name);k=g.name.indexOf("[");0<=k&&(g.name=g.name.substring(0,k));switch(g.type){case 35674:g.regCount=2;break;case 35675:g.regCount=3;break;case 35676:g.regCount=4;break;default:g.regCount=1}g.regCount*=g.size;this.__agalUniforms.add(g);
if("vcPositionScale"==g.name)this.__agalPositionScale=g;else if(ba.startsWith(g.name,"vc"))g.regIndex=K.parseInt(g.name.substring(2)),g.regData=this.__context.__vertexConstants,c.add(g);else if(ba.startsWith(g.name,"fc"))g.regIndex=K.parseInt(g.name.substring(2)),g.regData=this.__context.__fragmentConstants,d.add(g);else if(ba.startsWith(g.name,"sampler")&&-1==g.name.indexOf("alpha"))for(g.regIndex=K.parseInt(g.name.substring(7)),this.__agalSamplerUniforms.add(g),k=0,l=g.regCount;k<l;)m=k++,this.__agalSamplerUsageMask|=
1<<g.regIndex+m;else ba.startsWith(g.name,"sampler")&&ba.endsWith(g.name,"_alpha")?(k=g.name.indexOf("_")-7,g.regIndex=K.parseInt(g.name.substring(7,7+k))+4,this.__agalAlphaSamplerUniforms.add(g)):ba.startsWith(g.name,"sampler")&&ba.endsWith(g.name,"_alphaEnabled")&&(g.regIndex=K.parseInt(g.name.substring(7)),this.__agalAlphaSamplerEnabled[g.regIndex]=g);5==Ta.level&&Ta.verbose(""+f+" name:"+g.name+" type:"+g.type+" size:"+g.size+" location:"+K.string(g.location),{fileName:"openfl/display3D/Program3D.hx",
lineNumber:577,className:"openfl.display3D.Program3D",methodName:"__buildAGALUniformList"})}this.__agalVertexUniformMap=new Hl(Lc.array(c));this.__agalFragmentUniformMap=new Hl(Lc.array(d))}},__deleteShaders:function(){var a=this.__context.gl;null!=this.__glProgram&&(this.__glProgram=null);null!=this.__glVertexShader&&(a.deleteShader(this.__glVertexShader),this.__glVertexShader=null);null!=this.__glFragmentShader&&(a.deleteShader(this.__glFragmentShader),this.__glFragmentShader=null)},__disable:function(){},
__enable:function(){var a=this.__context.gl;a.useProgram(this.__glProgram);if(0==this.__format){this.__agalVertexUniformMap.markAllDirty();this.__agalFragmentUniformMap.markAllDirty();for(var b=this.__agalSamplerUniforms.h;null!=b;){var c=b.item;b=b.next;if(1==c.regCount)a.uniform1i(c.location,c.regIndex);else throw new E(new dd("!!! TODO: uniform location on webgl"));}for(b=this.__agalAlphaSamplerUniforms.h;null!=b;)if(c=b.item,b=b.next,1==c.regCount)a.uniform1i(c.location,c.regIndex);else throw new E(new dd("!!! TODO: uniform location on webgl"));
}},__flush:function(){0==this.__format&&(this.__agalVertexUniformMap.flush(),this.__agalFragmentUniformMap.flush())},__getSamplerState:function(a){return this.__samplerStates[a]},__markDirty:function(a,b,c){1!=this.__format&&(a?this.__agalVertexUniformMap.markDirty(b,c):this.__agalFragmentUniformMap.markDirty(b,c))},__processGLSLData:function(a,b){var c=0,d;for(d="uniform"==b?new Ca("uniform ([A-Za-z0-9]+) ([A-Za-z0-9_]+)",""):new Ca("attribute ([A-Za-z0-9]+) ([A-Za-z0-9_]+)","");d.matchSub(a,c);){var e=
d.matched(1);var f=d.matched(2);if(!ba.startsWith(f,"gl_")){if(ba.startsWith(e,"sampler"))this.__glslSamplerNames.push(f);else{switch(e){case "bool":c=0;break;case "bvec2":c=1;break;case "bvec3":c=2;break;case "bvec4":c=3;break;case "dvec2":case "vec2":c=5;break;case "dvec3":case "vec3":c=6;break;case "double":case "float":c=4;break;case "ivec3":case "uvec3":c=10;break;case "ivec4":case "uvec4":c=11;break;case "mat2":case "mat2x2":c=12;break;case "mat2x3":c=13;break;case "mat2x4":c=14;break;case "mat3x2":c=
15;break;case "mat3":case "mat3x3":c=16;break;case "mat3x4":c=17;break;case "mat4":case "mat4x4":c=20;break;case "mat4x2":c=18;break;case "mat4x3":c=19;break;case "int":case "uint":c=8;break;case "ivec2":case "uvec2":c=9;break;case "dvec4":case "vec4":c=7;break;default:c=null}"uniform"==b?(this.__glslUniformNames.push(f),this.__glslUniformTypes.push(c)):(this.__glslAttribNames.push(f),this.__glslAttribTypes.push(c))}f=d.matchedPos();c=f.pos+f.len}}},__setPositionScale:function(a){1!=this.__format&&
null!=this.__agalPositionScale&&this.__context.gl.uniform4fv(this.__agalPositionScale.location,a)},__setSamplerState:function(a,b){this.__samplerStates[a]=b},__uploadFromGLSL:function(a,b){var c=this.__context.gl;this.__glVertexSource=a;this.__glFragmentSource=b;this.__glVertexShader=c.createShader(c.VERTEX_SHADER);c.shaderSource(this.__glVertexShader,a);c.compileShader(this.__glVertexShader);if(0==c.getShaderParameter(this.__glVertexShader,c.COMPILE_STATUS)){var d="Error compiling vertex shader\n"+
c.getShaderInfoLog(this.__glVertexShader);Ta.error(d+("\n"+a),{fileName:"openfl/display3D/Program3D.hx",lineNumber:869,className:"openfl.display3D.Program3D",methodName:"__uploadFromGLSL"})}this.__glFragmentShader=c.createShader(c.FRAGMENT_SHADER);c.shaderSource(this.__glFragmentShader,b);c.compileShader(this.__glFragmentShader);0==c.getShaderParameter(this.__glFragmentShader,c.COMPILE_STATUS)&&(d="Error compiling fragment shader\n"+c.getShaderInfoLog(this.__glFragmentShader),Ta.error(d+("\n"+b),
{fileName:"openfl/display3D/Program3D.hx",lineNumber:881,className:"openfl.display3D.Program3D",methodName:"__uploadFromGLSL"}));this.__glProgram=c.createProgram();if(0==this.__format)for(b=0;16>b;){d=b++;var e="va"+d;-1!=a.indexOf(" "+e)&&c.bindAttribLocation(this.__glProgram,d,e)}else for(a=0,b=this.__glslAttribNames;a<b.length;)if(d=b[a],++a,-1<d.indexOf("Position")&&ba.startsWith(d,"openfl_")){c.bindAttribLocation(this.__glProgram,0,d);break}c.attachShader(this.__glProgram,this.__glVertexShader);
c.attachShader(this.__glProgram,this.__glFragmentShader);c.linkProgram(this.__glProgram);0==c.getProgramParameter(this.__glProgram,c.LINK_STATUS)&&(c="Unable to initialize the shader program\n"+c.getProgramInfoLog(this.__glProgram),Ta.error(c,{fileName:"openfl/display3D/Program3D.hx",lineNumber:922,className:"openfl.display3D.Program3D",methodName:"__uploadFromGLSL"}))},__class__:Br};var hp=function(a){this.context=a;this.isDirty=!0;this.regDataPointer=new vg(null,0)};h["openfl.display3D.Uniform"]=
hp;hp.__name__="openfl.display3D.Uniform";hp.prototype={name:null,location:null,type:null,size:null,regData:null,regIndex:null,regCount:null,isDirty:null,context:null,regDataPointer:null,flush:function(){var a=this.context.gl,b=4*this.regIndex;switch(this.type){case 35664:Td.uniform2fv(a,this.location,this.regData.subarray(b,b+2*this.regCount));break;case 35665:var c=this.location;b=this.regData.subarray(b,b+3*this.regCount);a.uniform3fv(c,b);break;case 35666:c=this.location;b=this.regData.subarray(b,
b+4*this.regCount);a.uniform4fv(c,b);break;case 35674:Ab.uniformMatrix2fv(a,this.location,!1,this.regData.subarray(b,b+4*this.size));break;case 35675:Ab.uniformMatrix3fv(a,this.location,!1,this.regData.subarray(b,b+9*this.size));break;case 35676:Ab.uniformMatrix4fv(a,this.location,!1,this.regData.subarray(b,b+16*this.size));break;default:c=this.location,b=this.regData.subarray(b,b+4*this.regCount),a.uniform4fv(c,b)}},__getUniformRegisters:function(a,b){return this.regData.subarray(a,a+b)},__class__:hp};
var Hl=function(a){this.__uniforms=a;this.__uniforms.sort(function(a,b){return X.compare(a.regIndex,b.regIndex)});for(var b=a=0,c=this.__uniforms;b<c.length;){var d=c[b];++b;d.regIndex+d.regCount>a&&(a=d.regIndex+d.regCount)}this.__registerLookup=Ua.toObjectVector(null,a);a=0;for(b=this.__uniforms;a<b.length;){c=b[a];++a;d=0;for(var e=c.regCount;d<e;){var f=d++;this.__registerLookup.set(c.regIndex+f,c)}}this.__anyDirty=this.__allDirty=!0};h["openfl.display3D.UniformMap"]=Hl;Hl.__name__="openfl.display3D.UniformMap";
Hl.prototype={__allDirty:null,__anyDirty:null,__registerLookup:null,__uniforms:null,flush:function(){if(this.__anyDirty){for(var a=0,b=this.__uniforms;a<b.length;){var c=b[a];++a;if(this.__allDirty||c.isDirty)c.flush(),c.isDirty=!1}this.__anyDirty=this.__allDirty=!1}},markAllDirty:function(){this.__anyDirty=this.__allDirty=!0},markDirty:function(a,b){if(!this.__allDirty)for(b=a+b,b>this.__registerLookup.get_length()&&(b=this.__registerLookup.get_length());a<b;){var c=this.__registerLookup.get(a);
null!=c?(this.__anyDirty=c.isDirty=!0,a=c.regIndex+c.regCount):++a}},__class__:Hl};var Cr=function(a,b,c,d){this.__context=a;this.__numVertices=b;this.__vertexSize=c;a=this.__context.gl;this.__id=a.createBuffer();this.__stride=4*this.__vertexSize;this.__usage=0==mk.fromString(d)?a.DYNAMIC_DRAW:a.STATIC_DRAW};h["openfl.display3D.VertexBuffer3D"]=Cr;Cr.__name__="openfl.display3D.VertexBuffer3D";Cr.prototype={__context:null,__data:null,__id:null,__memoryUsage:null,__numVertices:null,__stride:null,__tempFloat32Array:null,
__usage:null,__vertexSize:null,dispose:function(){this.__context.gl.deleteBuffer(this.__id)},uploadFromByteArray:function(a,b,c,d){b+=c*this.__stride;d*=this.__vertexSize;a=za.toArrayBuffer(a);null==b&&(b=0);a=null!=a?null==d?new Float32Array(a,b):new Float32Array(a,b,d):null;this.uploadFromTypedArray(a)},uploadFromTypedArray:function(a,b){null!=a&&(b=this.__context.gl,this.__context.__bindGLArrayBuffer(this.__id),Ab.bufferData(b,b.ARRAY_BUFFER,a,this.__usage))},uploadFromVector:function(a,b,c){if(null!=
a){b*=this.__vertexSize;var d=c*this.__vertexSize;c=b+d;var e=this.__tempFloat32Array;if(null==this.__tempFloat32Array||this.__tempFloat32Array.length<d)this.__tempFloat32Array=null!=d?new Float32Array(d):null,null!=e&&this.__tempFloat32Array.set(e);for(d=b;d<c;)e=d++,this.__tempFloat32Array[e-b]=a.get(e);this.uploadFromTypedArray(this.__tempFloat32Array)}},__class__:Cr};var pc=function(a){A.call(this);this.__context=a;var b=this.__context.gl;this.__textureID=b.createTexture();this.__textureContext=
this.__context.__context;if(null==pc.__supportsBGRA){pc.__textureInternalFormat=b.RGBA;pc.__supportsBGRA=!1;pc.__textureFormat=b.RGBA;pc.__compressedFormats=new Wa;pc.__compressedFormatsAlpha=new Wa;a=b.getExtension("WEBGL_compressed_texture_s3tc");var c=b.getExtension("WEBGL_compressed_texture_etc1");b=b.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");null!=a&&(pc.__compressedFormats.h[0]=a.COMPRESSED_RGBA_S3TC_DXT1_EXT,pc.__compressedFormatsAlpha.h[0]=a.COMPRESSED_RGBA_S3TC_DXT5_EXT);null!=
c&&(pc.__compressedFormats.h[2]=c.COMPRESSED_RGB_ETC1_WEBGL,pc.__compressedFormatsAlpha.h[2]=c.COMPRESSED_RGB_ETC1_WEBGL);null!=b&&(pc.__compressedFormats.h[1]=b.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,pc.__compressedFormatsAlpha.h[1]=b.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG)}this.__internalFormat=pc.__textureInternalFormat;this.__format=pc.__textureFormat};h["openfl.display3D.textures.TextureBase"]=pc;pc.__name__="openfl.display3D.textures.TextureBase";pc.__super__=A;pc.prototype=w(A.prototype,{__alphaTexture:null,
__context:null,__format:null,__glDepthRenderbuffer:null,__glFramebuffer:null,__glStencilRenderbuffer:null,__height:null,__internalFormat:null,__optimizeForRenderToTexture:null,__samplerState:null,__streamingLevels:null,__textureContext:null,__textureID:null,__textureTarget:null,__width:null,dispose:function(){var a=this.__context.gl;null!=this.__alphaTexture&&this.__alphaTexture.dispose();a.deleteTexture(this.__textureID);null!=this.__glFramebuffer&&a.deleteFramebuffer(this.__glFramebuffer);null!=
this.__glDepthRenderbuffer&&a.deleteRenderbuffer(this.__glDepthRenderbuffer);null!=this.__glStencilRenderbuffer&&a.deleteRenderbuffer(this.__glStencilRenderbuffer)},__getGLFramebuffer:function(a,b,c){b=this.__context.gl;null==this.__glFramebuffer&&(this.__glFramebuffer=b.createFramebuffer(),this.__context.__bindGLFramebuffer(this.__glFramebuffer),b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,this.__textureID,0),this.__context.__enableErrorChecking&&(c=b.checkFramebufferStatus(b.FRAMEBUFFER),
c!=b.FRAMEBUFFER_COMPLETE&&Ta.warn("Error: Context3D.setRenderToTexture status:"+c+" width:"+this.__width+" height:"+this.__height,{fileName:"openfl/display3D/textures/TextureBase.hx",lineNumber:193,className:"openfl.display3D.textures.TextureBase",methodName:"__getGLFramebuffer"})));a&&null==this.__glDepthRenderbuffer&&(this.__context.__bindGLFramebuffer(this.__glFramebuffer),0!=Hc.__glDepthStencil?(this.__glStencilRenderbuffer=this.__glDepthRenderbuffer=b.createRenderbuffer(),b.bindRenderbuffer(b.RENDERBUFFER,
this.__glDepthRenderbuffer),b.renderbufferStorage(b.RENDERBUFFER,Hc.__glDepthStencil,this.__width,this.__height),b.framebufferRenderbuffer(b.FRAMEBUFFER,b.DEPTH_STENCIL_ATTACHMENT,b.RENDERBUFFER,this.__glDepthRenderbuffer)):(this.__glDepthRenderbuffer=b.createRenderbuffer(),this.__glStencilRenderbuffer=b.createRenderbuffer(),b.bindRenderbuffer(b.RENDERBUFFER,this.__glDepthRenderbuffer),b.renderbufferStorage(b.RENDERBUFFER,b.DEPTH_COMPONENT16,this.__width,this.__height),b.bindRenderbuffer(b.RENDERBUFFER,
this.__glStencilRenderbuffer),b.renderbufferStorage(b.RENDERBUFFER,b.STENCIL_INDEX8,this.__width,this.__height),b.framebufferRenderbuffer(b.FRAMEBUFFER,b.DEPTH_ATTACHMENT,b.RENDERBUFFER,this.__glDepthRenderbuffer),b.framebufferRenderbuffer(b.FRAMEBUFFER,b.STENCIL_ATTACHMENT,b.RENDERBUFFER,this.__glStencilRenderbuffer)),this.__context.__enableErrorChecking&&(a=b.checkFramebufferStatus(b.FRAMEBUFFER),a!=b.FRAMEBUFFER_COMPLETE&&Ta.warn("Error: Context3D.setRenderToTexture status:"+a+" width:"+this.__width+
" height:"+this.__height,{fileName:"openfl/display3D/textures/TextureBase.hx",lineNumber:231,className:"openfl.display3D.textures.TextureBase",methodName:"__getGLFramebuffer"})),b.bindRenderbuffer(b.RENDERBUFFER,null));return this.__glFramebuffer},__getImage:function(a){var b=a.image;if(!a.__isValid||null==b)return null;Ba.sync(b,!1);a=this.__context.gl;b.type==If.DATA||b.get_premultiplied()?!b.get_premultiplied()&&b.get_transparent()&&(a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),b=b.clone(),
b.set_premultiplied(!0)):a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1);0!=b.get_format()&&(b=b.clone(),b.set_format(0),b.buffer.premultiplied=!0);return b},__getTexture:function(){return this.__textureID},__setSamplerState:function(a){if(!a.equals(this.__samplerState)){var b=this.__context.gl;this.__textureTarget==this.__context.gl.TEXTURE_CUBE_MAP?this.__context.__bindGLTextureCubeMap(this.__textureID):this.__context.__bindGLTexture2D(this.__textureID);var c;switch(a.wrap){case 0:var d=c=b.CLAMP_TO_EDGE;
break;case 1:c=b.CLAMP_TO_EDGE;d=b.REPEAT;break;case 2:d=c=b.REPEAT;break;case 3:c=b.REPEAT;d=b.CLAMP_TO_EDGE;break;default:throw new E(new hd("wrap bad enum"));}var e=5==a.filter?b.NEAREST:b.LINEAR;switch(a.mipfilter){case 0:var f=5==a.filter?b.NEAREST_MIPMAP_LINEAR:b.LINEAR_MIPMAP_LINEAR;break;case 1:f=5==a.filter?b.NEAREST_MIPMAP_NEAREST:b.LINEAR_MIPMAP_NEAREST;break;case 2:f=5==a.filter?b.NEAREST:b.LINEAR;break;default:throw new E(new hd("mipfiter bad enum"));}b.texParameteri(this.__textureTarget,
b.TEXTURE_MIN_FILTER,f);b.texParameteri(this.__textureTarget,b.TEXTURE_MAG_FILTER,e);b.texParameteri(this.__textureTarget,b.TEXTURE_WRAP_S,c);b.texParameteri(this.__textureTarget,b.TEXTURE_WRAP_T,d);null==this.__samplerState&&(this.__samplerState=a.clone());this.__samplerState.copyFrom(a);return!0}return!1},__uploadFromImage:function(a){var b=this.__context.gl,c;if(this.__textureTarget==b.TEXTURE_2D){if(1==a.buffer.bitsPerPixel)var d=c=b.ALPHA;else c=pc.__textureInternalFormat,d=pc.__textureFormat;
this.__context.__bindGLTexture2D(this.__textureID);a.type==If.DATA||a.get_premultiplied()?!a.get_premultiplied()&&a.get_transparent()&&b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1):b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1);a.type==If.DATA?Ab.texImage2D(b,b.TEXTURE_2D,0,c,a.buffer.width,a.buffer.height,0,d,b.UNSIGNED_BYTE,a.get_data()):Ab.texImage2D(b,b.TEXTURE_2D,0,c,d,b.UNSIGNED_BYTE,a.get_src());this.__context.__bindGLTexture2D(null)}},__class__:pc});var lk=function(a,b,c,d,e){pc.call(this,
a);this.__width=this.__height=this.__size=b;this.__optimizeForRenderToTexture=d;this.__streamingLevels=e;this.__textureTarget=this.__context.gl.TEXTURE_CUBE_MAP;this.__uploadedSides=0};h["openfl.display3D.textures.CubeTexture"]=lk;lk.__name__="openfl.display3D.textures.CubeTexture";lk.__super__=pc;lk.prototype=w(pc.prototype,{__framebufferSurface:null,__size:null,__uploadedSides:null,uploadCompressedTextureFromByteArray:function(a,b,c){null==c&&(c=!1);var d=this;c?pf.delay(function(){d.__uploadCompressedTextureFromByteArray(a,
b);var c=new da("textureReady");d.dispatchEvent(c)},1):this.__uploadCompressedTextureFromByteArray(a,b)},uploadFromBitmapData:function(a,b,c,d){null==c&&(c=0);if(null!=a&&0!=this.__size>>c&&(a=this.__getImage(a),null!=a))if(0==c&&null!=a.buffer&&null==a.buffer.data&&null!=a.buffer.get_src()){if(d=this.__context.gl,0!=this.__size>>c){var e=this.__sideToTarget(b);this.__context.__bindGLTextureCubeMap(this.__textureID);Ab.texImage2D(d,e,c,this.__internalFormat,this.__format,d.UNSIGNED_BYTE,a.buffer.get_src());
this.__context.__bindGLTextureCubeMap(null);this.__uploadedSides|=1<<b}}else this.uploadFromTypedArray(a.get_data(),b,c)},uploadFromByteArray:function(a,b,c,d){null==d&&(d=0);0==b?this.uploadFromTypedArray(a.b,c,d):(a=za.toArrayBuffer(a),null==b&&(b=0),b=null!=a?new Uint8Array(a,b):null,this.uploadFromTypedArray(b,c,d))},uploadFromTypedArray:function(a,b,c){null==c&&(c=0);if(null!=a){var d=this.__context.gl,e=this.__size>>c;if(0!=e){var f=this.__sideToTarget(b);this.__context.__bindGLTextureCubeMap(this.__textureID);
Ab.texImage2D(d,f,c,this.__internalFormat,e,e,0,this.__format,d.UNSIGNED_BYTE,a);this.__context.__bindGLTextureCubeMap(null);this.__uploadedSides|=1<<b}}},__getGLFramebuffer:function(a,b,c){var d=this.__context.gl;null==this.__glFramebuffer&&(this.__glFramebuffer=d.createFramebuffer(),this.__framebufferSurface=-1);if(this.__framebufferSurface!=c&&(this.__framebufferSurface=c,this.__context.__bindGLFramebuffer(this.__glFramebuffer),d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_CUBE_MAP_POSITIVE_X+
c,this.__textureID,0),this.__context.__enableErrorChecking)){var e=d.checkFramebufferStatus(d.FRAMEBUFFER);e!=d.FRAMEBUFFER_COMPLETE&&Ta.error("Error: Context3D.setRenderToTexture status:"+e+" width:"+this.__width+" height:"+this.__height,{fileName:"openfl/display3D/textures/CubeTexture.hx",lineNumber:278,className:"openfl.display3D.textures.CubeTexture",methodName:"__getGLFramebuffer"})}return pc.prototype.__getGLFramebuffer.call(this,a,b,c)},__setSamplerState:function(a){if(pc.prototype.__setSamplerState.call(this,
a)){var b=this.__context.gl;2==a.mipfilter||this.__samplerState.mipmapGenerated||(b.generateMipmap(b.TEXTURE_CUBE_MAP),this.__samplerState.mipmapGenerated=!0);if(0!=Hc.__glMaxTextureMaxAnisotropy){switch(a.filter){case 0:a=16;break;case 1:a=2;break;case 2:a=4;break;case 3:a=8;break;default:a=1}a>Hc.__glMaxTextureMaxAnisotropy&&(a=Hc.__glMaxTextureMaxAnisotropy);b.texParameterf(b.TEXTURE_CUBE_MAP,Hc.__glTextureMaxAnisotropy,a)}return!0}return!1},__sideToTarget:function(a){var b=this.__context.gl;switch(a){case 0:return b.TEXTURE_CUBE_MAP_POSITIVE_X;
case 1:return b.TEXTURE_CUBE_MAP_NEGATIVE_X;case 2:return b.TEXTURE_CUBE_MAP_POSITIVE_Y;case 3:return b.TEXTURE_CUBE_MAP_NEGATIVE_Y;case 4:return b.TEXTURE_CUBE_MAP_POSITIVE_Z;case 5:return b.TEXTURE_CUBE_MAP_NEGATIVE_Z;default:throw new E(new dd);}},__uploadCompressedTextureFromByteArray:function(a,b){var c=this;a=new tl(a,b);var d=a.readHeader(this.__size,this.__size,!0),e=this.__context.gl;this.__context.__bindGLTextureCubeMap(this.__textureID);var f=!1;a.readTextures(function(a,b,l,m,p,n,h){var g=
d?pc.__compressedFormatsAlpha.h[l]:pc.__compressedFormats.h[l];if(0!=g)if(f=!0,a=c.__sideToTarget(a),c.__format=g,c.__internalFormat=g,d&&2==l){n=n/2|0;l=h.b.buffer;var k=0;null==k&&(k=0);l=null!=l?null==n?new Uint8Array(l,k):new Uint8Array(l,k,n):null;Ab.compressedTexImage2D(e,a,b,c.__internalFormat,m,p,0,l);l=new lk(c.__context,c.__size,3,c.__optimizeForRenderToTexture,c.__streamingLevels);l.__format=g;l.__internalFormat=g;c.__context.__bindGLTextureCubeMap(l.__textureID);h=h.b.buffer;g=n;null==
g&&(g=0);h=null!=h?null==n?new Uint8Array(h,g):new Uint8Array(h,g,n):null;Ab.compressedTexImage2D(e,a,b,l.__internalFormat,m,p,0,h);c.__alphaTexture=l}else h=h.b.buffer,g=0,null==g&&(g=0),h=null!=h?null==n?new Uint8Array(h,g):new Uint8Array(h,g,n):null,Ab.compressedTexImage2D(e,a,b,c.__internalFormat,m,p,0,h)});f||(a=this.__size*this.__size*4,a=null!=a?new Uint8Array(a):null,b=this.__sideToTarget(0),Ab.texImage2D(e,b,0,this.__internalFormat,this.__size,this.__size,0,this.__format,e.UNSIGNED_BYTE,
a),a=this.__size*this.__size*4,a=null!=a?new Uint8Array(a):null,b=this.__sideToTarget(1),Ab.texImage2D(e,b,0,this.__internalFormat,this.__size,this.__size,0,this.__format,e.UNSIGNED_BYTE,a),a=this.__size*this.__size*4,a=null!=a?new Uint8Array(a):null,b=this.__sideToTarget(2),Ab.texImage2D(e,b,0,this.__internalFormat,this.__size,this.__size,0,this.__format,e.UNSIGNED_BYTE,a),a=this.__size*this.__size*4,a=null!=a?new Uint8Array(a):null,b=this.__sideToTarget(3),Ab.texImage2D(e,b,0,this.__internalFormat,
this.__size,this.__size,0,this.__format,e.UNSIGNED_BYTE,a),a=this.__size*this.__size*4,a=null!=a?new Uint8Array(a):null,b=this.__sideToTarget(4),Ab.texImage2D(e,b,0,this.__internalFormat,this.__size,this.__size,0,this.__format,e.UNSIGNED_BYTE,a),a=this.__size*this.__size*4,a=null!=a?new Uint8Array(a):null,b=this.__sideToTarget(5),Ab.texImage2D(e,b,0,this.__internalFormat,this.__size,this.__size,0,this.__format,e.UNSIGNED_BYTE,a));this.__context.__bindGLTextureCubeMap(null)},__class__:lk});var Fl=
function(a,b,c,d,e){pc.call(this,a);this.__width=b;this.__height=c;this.__optimizeForRenderToTexture=e;this.__textureTarget=this.__context.gl.TEXTURE_2D;this.uploadFromTypedArray(null);e&&this.__getGLFramebuffer(!0,0,0)};h["openfl.display3D.textures.RectangleTexture"]=Fl;Fl.__name__="openfl.display3D.textures.RectangleTexture";Fl.__super__=pc;Fl.prototype=w(pc.prototype,{uploadFromBitmapData:function(a){if(null!=a&&(a=this.__getImage(a),null!=a))if(null!=a.buffer&&null==a.buffer.data&&null!=a.buffer.get_src()){var b=
this.__context.gl;this.__context.__bindGLTexture2D(this.__textureID);Ab.texImage2D(b,this.__textureTarget,0,this.__internalFormat,this.__format,b.UNSIGNED_BYTE,a.buffer.get_src());this.__context.__bindGLTexture2D(null)}else this.uploadFromTypedArray(a.get_data())},uploadFromByteArray:function(a,b){0==b?this.uploadFromTypedArray(a.b):(a=za.toArrayBuffer(a),null==b&&(b=0),b=null!=a?new Uint8Array(a,b):null,this.uploadFromTypedArray(b))},uploadFromTypedArray:function(a){var b=this.__context.gl;this.__context.__bindGLTexture2D(this.__textureID);
Ab.texImage2D(b,this.__textureTarget,0,this.__internalFormat,this.__width,this.__height,0,this.__format,b.UNSIGNED_BYTE,a);this.__context.__bindGLTexture2D(null)},__setSamplerState:function(a){if(pc.prototype.__setSamplerState.call(this,a)){var b=this.__context.gl;if(0!=Hc.__glMaxTextureMaxAnisotropy){switch(a.filter){case 0:a=16;break;case 1:a=2;break;case 2:a=4;break;case 3:a=8;break;default:a=1}a>Hc.__glMaxTextureMaxAnisotropy&&(a=Hc.__glMaxTextureMaxAnisotropy);b.texParameterf(b.TEXTURE_2D,Hc.__glTextureMaxAnisotropy,
a)}return!0}return!1},__class__:Fl});var fj=function(a,b,c,d,e,f){pc.call(this,a);this.__width=b;this.__height=c;this.__optimizeForRenderToTexture=e;this.__streamingLevels=f;a=this.__context.gl;this.__textureTarget=a.TEXTURE_2D;this.__context.__bindGLTexture2D(this.__textureID);Ab.texImage2D(a,this.__textureTarget,0,this.__internalFormat,this.__width,this.__height,0,this.__format,a.UNSIGNED_BYTE,null);this.__context.__bindGLTexture2D(null);e&&this.__getGLFramebuffer(!0,0,0)};h["openfl.display3D.textures.Texture"]=
fj;fj.__name__="openfl.display3D.textures.Texture";fj.__super__=pc;fj.prototype=w(pc.prototype,{uploadCompressedTextureFromByteArray:function(a,b,c){null==c&&(c=!1);var d=this;c?pf.delay(function(){d.__uploadCompressedTextureFromByteArray(a,b);var c=new da("textureReady");d.dispatchEvent(c)},1):this.__uploadCompressedTextureFromByteArray(a,b)},uploadFromBitmapData:function(a,b,c){null==b&&(b=0);if(null!=a){c=this.__width>>b;var d=this.__height>>b;if(0!=c||0!=d){0==c&&(c=1);0==d&&(d=1);if(a.width!=
c||a.height!=d)c=new na(c,d,!0,0),c.draw(a),a=c;a=this.__getImage(a);if(null!=a)if(0==b&&null!=a.buffer&&null==a.buffer.data&&null!=a.buffer.get_src()){if(c=this.__context.gl,d=this.__height>>b,0!=this.__width>>b||0!=d)this.__context.__bindGLTexture2D(this.__textureID),Ab.texImage2D(c,this.__textureTarget,b,this.__internalFormat,this.__format,c.UNSIGNED_BYTE,a.buffer.get_src()),this.__context.__bindGLTexture2D(null)}else this.uploadFromTypedArray(a.get_data(),b)}}},uploadFromByteArray:function(a,
b,c){null==c&&(c=0);0==b?this.uploadFromTypedArray(a.b,c):(a=za.toArrayBuffer(a),null==b&&(b=0),b=null!=a?new Uint8Array(a,b):null,this.uploadFromTypedArray(b,c))},uploadFromTypedArray:function(a,b){null==b&&(b=0);if(null!=a){var c=this.__context.gl,d=this.__width>>b,e=this.__height>>b;if(0!=d||0!=e)0==d&&(d=1),0==e&&(e=1),this.__context.__bindGLTexture2D(this.__textureID),Ab.texImage2D(c,this.__textureTarget,b,this.__internalFormat,d,e,0,this.__format,c.UNSIGNED_BYTE,a),this.__context.__bindGLTexture2D(null)}},
__setSamplerState:function(a){if(pc.prototype.__setSamplerState.call(this,a)){var b=this.__context.gl;2==a.mipfilter||this.__samplerState.mipmapGenerated||(b.generateMipmap(b.TEXTURE_2D),this.__samplerState.mipmapGenerated=!0);if(0!=Hc.__glMaxTextureMaxAnisotropy){switch(a.filter){case 0:a=16;break;case 1:a=2;break;case 2:a=4;break;case 3:a=8;break;default:a=1}a>Hc.__glMaxTextureMaxAnisotropy&&(a=Hc.__glMaxTextureMaxAnisotropy);b.texParameterf(b.TEXTURE_2D,Hc.__glTextureMaxAnisotropy,a)}return!0}return!1},
__uploadCompressedTextureFromByteArray:function(a,b){var c=this;a=new tl(a,b);var d=a.readHeader(this.__width,this.__height,!1),e=this.__context.gl;this.__context.__bindGLTexture2D(this.__textureID);var f=!1;a.readTextures(function(a,b,l,m,p,n,h){a=d?pc.__compressedFormatsAlpha.h[l]:pc.__compressedFormats.h[l];if(0!=a)if(f=!0,c.__format=a,c.__internalFormat=a,d&&2==l){n=n/2|0;l=h.b.buffer;var g=0;null==g&&(g=0);l=null!=l?null==n?new Uint8Array(l,g):new Uint8Array(l,g,n):null;Ab.compressedTexImage2D(e,
c.__textureTarget,b,c.__internalFormat,m,p,0,l);l=new fj(c.__context,c.__width,c.__height,3,c.__optimizeForRenderToTexture,c.__streamingLevels);l.__format=a;l.__internalFormat=a;c.__context.__bindGLTexture2D(l.__textureID);h=h.b.buffer;a=n;null==a&&(a=0);h=null!=h?null==n?new Uint8Array(h,a):new Uint8Array(h,a,n):null;Ab.compressedTexImage2D(e,l.__textureTarget,b,l.__internalFormat,m,p,0,h);c.__alphaTexture=l}else h=h.b.buffer,a=0,null==a&&(a=0),h=null!=h?null==n?new Uint8Array(h,a):new Uint8Array(h,
a,n):null,Ab.compressedTexImage2D(e,c.__textureTarget,b,c.__internalFormat,m,p,0,h)});f||(a=this.__width*this.__height*4,a=null!=a?new Uint8Array(a):null,Ab.texImage2D(e,this.__textureTarget,0,this.__internalFormat,this.__width,this.__height,0,this.__format,e.UNSIGNED_BYTE,a));this.__context.__bindGLTexture2D(null)},__class__:fj});var ep=function(a){pc.call(this,a);this.__textureTarget=this.__context.gl.TEXTURE_2D};h["openfl.display3D.textures.VideoTexture"]=ep;ep.__name__="openfl.display3D.textures.VideoTexture";
ep.__super__=pc;ep.prototype=w(pc.prototype,{videoHeight:null,videoWidth:null,__netStream:null,attachNetStream:function(a){var b=this;null!=this.__netStream&&this.__netStream.__video.removeEventListener("canplay",v(this,this.__onCanPlay),!1);this.__netStream=a;4==this.__netStream.__video.readyState?pf.delay(function(){b.__textureReady()},0):this.__netStream.__video.addEventListener("canplay",v(this,this.__onCanPlay),!1)},__onCanPlay:function(a){this.__textureReady()},__getTexture:function(){if((!this.__netStream.__video.paused||
this.__netStream.get___seeking())&&0<this.__netStream.__video.readyState){this.__netStream.set___seeking(!1);var a=this.__context.gl;this.__context.__bindGLTexture2D(this.__textureID);Ab.texImage2D(a,a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,this.__netStream.__video)}return this.__textureID},__textureReady:function(){this.videoWidth=this.__netStream.__video.videoWidth;this.videoHeight=this.__netStream.__video.videoHeight;var a=new da("textureReady");this.dispatchEvent(a)},__class__:ep});var hd=
function(a,b){null==b&&(b=0);null==a&&(a="");this.message=a;this.errorID=b;this.name="Error"};h["openfl.errors.Error"]=hd;hd.__name__="openfl.errors.Error";hd.prototype={errorID:null,message:null,name:null,getStackTrace:function(){return ra.toString(ra.exceptionStack())},toString:function(){return null!=this.message?this.message:"Error"},__class__:hd};var zi=function(a){null==a&&(a="");hd.call(this,a);this.name="ArgumentError"};h["openfl.errors.ArgumentError"]=zi;zi.__name__="openfl.errors.ArgumentError";
zi.__super__=hd;zi.prototype=w(hd.prototype,{__class__:zi});var qk=function(a){null==a&&(a="");hd.call(this,a);this.name="IOError"};h["openfl.errors.IOError"]=qk;qk.__name__="openfl.errors.IOError";qk.__super__=hd;qk.prototype=w(hd.prototype,{__class__:qk});var Mh=function(a,b){qk.call(this,"End of file was encountered");this.name="EOFError";this.errorID=2030};h["openfl.errors.EOFError"]=Mh;Mh.__name__="openfl.errors.EOFError";Mh.__super__=qk;Mh.prototype=w(qk.prototype,{__class__:Mh});var dd=function(a){null==
a&&(a="");hd.call(this,a,0);this.name="IllegalOperationError"};h["openfl.errors.IllegalOperationError"]=dd;dd.__name__="openfl.errors.IllegalOperationError";dd.__super__=hd;dd.prototype=w(hd.prototype,{__class__:dd});var jj=function(a){null==a&&(a="");hd.call(this,a,0);this.name="RangeError"};h["openfl.errors.RangeError"]=jj;jj.__name__="openfl.errors.RangeError";jj.__super__=hd;jj.prototype=w(hd.prototype,{__class__:jj});var Dr=function(a){null==a&&(a="");hd.call(this,a,0);this.name="SecurityError"};
h["openfl.errors.SecurityError"]=Dr;Dr.__name__="openfl.errors.SecurityError";Dr.__super__=hd;Dr.prototype=w(hd.prototype,{__class__:Dr});var Dk=function(a){null==a&&(a="");hd.call(this,a,0);this.name="TypeError"};h["openfl.errors.TypeError"]=Dk;Dk.__name__="openfl.errors.TypeError";Dk.__super__=hd;Dk.prototype=w(hd.prototype,{__class__:Dk});var Pg=function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!1);null==b&&(b=!1);da.call(this,a,b,c);this.activating=d};h["openfl.events.ActivityEvent"]=Pg;Pg.__name__=
"openfl.events.ActivityEvent";Pg.__super__=da;Pg.prototype=w(da.prototype,{activating:null,clone:function(){var a=new Pg(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"])},__init:function(){da.prototype.__init.call(this);this.activating=!1},__class__:Pg});var Ef=function(a,b,c,d){null==d&&
(d="");null==c&&(c=!1);null==b&&(b=!1);da.call(this,a,b,c);this.text=d};h["openfl.events.TextEvent"]=Ef;Ef.__name__="openfl.events.TextEvent";Ef.__super__=da;Ef.prototype=w(da.prototype,{text:null,clone:function(){var a=new Ef(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"])},__init:function(){da.prototype.__init.call(this);
this.text=""},__class__:Ef});var Te=function(a,b,c,d,e){null==e&&(e=0);null==d&&(d="");null==c&&(c=!1);null==b&&(b=!1);Ef.call(this,a,b,c,d);this.errorID=e};h["openfl.events.ErrorEvent"]=Te;Te.__name__="openfl.events.ErrorEvent";Te.__super__=Ef;Te.prototype=w(Ef.prototype,{errorID:null,clone:function(){var a=new Te(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"])},__init:function(){Ef.prototype.__init.call(this);this.errorID=0},__class__:Te});var Ck=function(a){this.active=!1;this.reset(a)};h["openfl.events._EventDispatcher.DispatchIterator"]=Ck;Ck.__name__="openfl.events._EventDispatcher.DispatchIterator";Ck.prototype={active:null,index:null,isCopy:null,list:null,copy:function(){this.isCopy||(this.list=this.list.slice(),this.isCopy=!0)},hasNext:function(){return this.index<this.list.length},next:function(){return this.list[this.index++]},
remove:function(a,b){if(this.active)if(this.isCopy){b=this.index;for(var c=this.list.length;b<c;){var d=b++;if(this.list[d]==a){this.list.splice(d,1);break}}}else b<this.index&&this.index--},reset:function(a){this.list=a;this.isCopy=!1;this.index=0},start:function(){this.active=!0},stop:function(){this.active=!1},__class__:Ck};var Bk=function(a,b,c){this.callback=a;this.useCapture=b;this.priority=c};h["openfl.events._EventDispatcher.Listener"]=Bk;Bk.__name__="openfl.events._EventDispatcher.Listener";
Bk.prototype={callback:null,priority:null,useCapture:null,match:function(a,b){return X.compareMethods(this.callback,a)?this.useCapture==b:!1},__class__:Bk};var Mt={};h["openfl.events._EventType.EventType_Impl_"]=Mt;Mt.__name__="openfl.events._EventType.EventType_Impl_";Mt.equals=function(a,b){return a==b};Mt.notEquals=function(a,b){return a!=b};var Lf=function(a,b,c,d,e,f){null==f&&(f=0);null==e&&(e=!1);null==c&&(c=!1);null==b&&(b=!1);da.call(this,a,b,c);this.keyCode=f;this.shiftKey=e;this.relatedObject=
d};h["openfl.events.FocusEvent"]=Lf;Lf.__name__="openfl.events.FocusEvent";Lf.__super__=da;Lf.prototype=w(da.prototype,{keyCode:null,relatedObject:null,shiftKey:null,clone:function(){var a=new Lf(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(" "))},
__init:function(){da.prototype.__init.call(this);this.keyCode=0;this.shiftKey=!1;this.relatedObject=null},__class__:Lf});var hg=function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=!1);null==c&&(c=!1);null==b&&(b=!1);Pg.call(this,a,b,c);this.fullScreen=d;this.interactive=e};h["openfl.events.FullScreenEvent"]=hg;hg.__name__="openfl.events.FullScreenEvent";hg.__super__=Pg;hg.prototype=w(Pg.prototype,{fullScreen:null,interactive:null,clone:function(){var a=new hg(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"])},__init:function(){Pg.prototype.__init.call(this);this.interactive=this.fullScreen=!1},__class__:hg});var Bg=function(a,b,c,d){null==c&&(c=!1);null==b&&(b=!0);da.call(this,a,b,c);this.device=d};h["openfl.events.GameInputEvent"]=Bg;Bg.__name__="openfl.events.GameInputEvent";
Bg.__super__=da;Bg.prototype=w(da.prototype,{device:null,clone:function(){var a=new Bg(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"])},__init:function(){da.prototype.__init.call(this);this.device=null},__class__:Bg});var Nh=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;da.call(this,a,b,c)};h["openfl.events.HTTPStatusEvent"]=Nh;Nh.__name__="openfl.events.HTTPStatusEvent";Nh.__super__=da;Nh.prototype=w(da.prototype,{redirected:null,responseHeaders:null,responseURL:null,status:null,clone:function(){var a=new Nh(this.type,this.bubbles,this.cancelable,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"])},__init:function(){da.prototype.__init.call(this);this.status=0;this.redirected=!1},__class__:Nh});var Xf=function(a,b,c,d,e){null==e&&(e=0);null==d&&(d="");null==c&&(c=!1);null==b&&(b=!0);Te.call(this,a,b,c,d,e)};h["openfl.events.IOErrorEvent"]=Xf;Xf.__name__="openfl.events.IOErrorEvent";Xf.__super__=Te;Xf.prototype=w(Te.prototype,{clone:function(){var a=new Xf(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__:Xf});var Kh=function(a,b,c,d,e,f,g,k,l,m,p){null==p&&(p=!1);null==m&&(m=!1);null==l&&(l=!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);da.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=
l;this.controlKey=m;this.commandKey=p};h["openfl.events.KeyboardEvent"]=Kh;Kh.__name__="openfl.events.KeyboardEvent";Kh.__super__=da;Kh.prototype=w(da.prototype,{altKey:null,charCode:null,commandKey:null,controlKey:null,ctrlKey:null,keyCode:null,keyLocation:null,shiftKey:null,clone:function(){var a=new Kh(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(" "))},__init:function(){da.prototype.__init.call(this);this.keyLocation=this.keyCode=this.charCode=0;this.commandKey=this.controlKey=this.shiftKey=this.altKey=this.ctrlKey=!1},__class__:Kh});var Tb=function(a,b,c,d,e,f,g,k,l,m,p,n,h){null==h&&(h=0);null==n&&(n=!1);null==p&&(p=0);null==m&&(m=!1);null==l&&(l=!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);da.call(this,a,b,c);this.shiftKey=l;this.altKey=k;this.ctrlKey=g;this.bubbles=b;this.relatedObject=f;this.delta=p;this.localX=d;this.localY=e;this.buttonDown=m;this.commandKey=n;this.clickCount=h;this.isRelatedObjectInaccessible=!1;this.stageY=this.stageX=NaN};h["openfl.events.MouseEvent"]=Tb;Tb.__name__="openfl.events.MouseEvent";Tb.__create=function(a,b,c,d,e,f,g){null==g&&(g=0);a=new Tb(a,!0,!1,e.x,e.y,
null,Tb.__ctrlKey,Tb.__altKey,Tb.__shiftKey,Tb.__buttonDown,g,Tb.__commandKey);a.stageX=c;a.stageY=d;a.target=f;return a};Tb.__super__=da;Tb.prototype=w(da.prototype,{altKey:null,buttonDown:null,commandKey:null,clickCount:null,ctrlKey:null,delta:null,isRelatedObjectInaccessible:null,localX:null,localY:null,relatedObject:null,shiftKey:null,stageX:null,stageY:null,clone:function(){var a=new Tb(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(){},__init:function(){da.prototype.__init.call(this);this.bubbles=this.ctrlKey=this.altKey=this.shiftKey=!1;this.relatedObject=null;this.localY=
this.localX=this.delta=0;this.commandKey=this.buttonDown=!1;this.clickCount=0;this.isRelatedObjectInaccessible=!1;this.stageY=this.stageX=NaN},__class__:Tb});var Mf=function(a,b,c,d){null==c&&(c=!1);null==b&&(b=!1);this.info=d;da.call(this,a,b,c)};h["openfl.events.NetStatusEvent"]=Mf;Mf.__name__="openfl.events.NetStatusEvent";Mf.__super__=da;Mf.prototype=w(da.prototype,{info:null,clone:function(){var a=new Mf(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"])},__init:function(){da.prototype.__init.call(this);this.info=null},__class__:Mf});var zg=function(a,b,c,d,e){null==e&&(e=0);null==d&&(d=0);null==c&&(c=!1);null==b&&(b=!1);da.call(this,a,b,c);this.bytesLoaded=d;this.bytesTotal=e};h["openfl.events.ProgressEvent"]=zg;zg.__name__="openfl.events.ProgressEvent";zg.__super__=da;zg.prototype=w(da.prototype,{bytesLoaded:null,
bytesTotal:null,clone:function(){var a=new zg(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"])},__init:function(){da.prototype.__init.call(this);this.bytesTotal=this.bytesLoaded=0},__class__:zg});var gg=function(a,b,c,d,e,f){null==f&&(f=!0);null==c&&(c=!1);
null==b&&(b=!1);da.call(this,a,b,c);this.objectMatrix=d;this.objectColorTransform=e;this.allowSmoothing=f};h["openfl.events.RenderEvent"]=gg;gg.__name__="openfl.events.RenderEvent";gg.__super__=da;gg.prototype=w(da.prototype,{allowSmoothing:null,objectColorTransform:null,objectMatrix:null,renderer:null,clone:function(){var a=new gg(this.type,this.bubbles,this.cancelable,this.objectMatrix.clone(),this.objectColorTransform.__clone(),this.allowSmoothing);a.target=this.target;a.currentTarget=this.currentTarget;
a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("RenderEvent",["type","bubbles","cancelable"])},__init:function(){da.prototype.__init.call(this);this.objectColorTransform=this.objectMatrix=null;this.allowSmoothing=!1;this.renderer=null},__class__:gg});var xi=function(a,b,c,d,e){null==e&&(e=0);null==d&&(d="");null==c&&(c=!1);null==b&&(b=!1);Te.call(this,a,b,c,d,e)};h["openfl.events.SecurityErrorEvent"]=xi;xi.__name__="openfl.events.SecurityErrorEvent";xi.__super__=
Te;xi.prototype=w(Te.prototype,{clone:function(){var a=new xi(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__:xi});var sd=function(a,b,c,d,e,f,g,k,l,m,p,n,h,q,r,t,u,x,v,w){null==t&&(t=!1);null==r&&(r=!1);null==q&&(q=!1);null==h&&(h=!1);null==n&&(n=!1);null==m&&
(m=0);null==l&&(l=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);da.call(this,a,b,c);this.touchPointID=d;this.isPrimaryTouchPoint=e;this.localX=f;this.localY=g;this.sizeX=k;this.sizeY=l;this.pressure=m;this.relatedObject=p;this.ctrlKey=n;this.altKey=h;this.shiftKey=q;this.commandKey=r;this.controlKey=t;this.stageY=this.stageX=NaN};h["openfl.events.TouchEvent"]=sd;sd.__name__="openfl.events.TouchEvent";sd.__create=function(a,b,c,d,e,f){a=
new sd(a,!0,!1,0,!0,e.x,e.y,1,1,1);a.stageX=c;a.stageY=d;a.target=f;return a};sd.__super__=da;sd.prototype=w(da.prototype,{altKey:null,commandKey:null,controlKey:null,ctrlKey:null,delta:null,isPrimaryTouchPoint:null,localX:null,localY:null,pressure:null,relatedObject:null,shiftKey:null,sizeX:null,sizeY:null,stageX:null,stageY:null,touchPointID:null,clone:function(){var a=new sd(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(){},__init:function(){da.prototype.__init.call(this);
this.touchPointID=0;this.isPrimaryTouchPoint=!1;this.pressure=this.sizeY=this.sizeX=this.localY=this.localX=0;this.relatedObject=null;this.controlKey=this.commandKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.stageY=this.stageX=NaN},__class__:sd});var ui=function(a,b,c,d){null==c&&(c=!0);null==b&&(b=!0);Te.call(this,a,b,c);this.error=d};h["openfl.events.UncaughtErrorEvent"]=ui;ui.__name__="openfl.events.UncaughtErrorEvent";ui.__super__=Te;ui.prototype=w(Te.prototype,{error:null,clone:function(){var a=
new ui(this.type,this.bubbles,this.cancelable,this.error);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("UncaughtErrorEvent",["type","bubbles","cancelable","error"])},__init:function(){Te.prototype.__init.call(this);this.error=null},__class__:ui});var ap=function(){A.call(this)};h["openfl.events.UncaughtErrorEvents"]=ap;ap.__name__="openfl.events.UncaughtErrorEvents";ap.__super__=A;ap.prototype=w(A.prototype,
{__class__:ap});var Ae=function(){this.__leftExtension=this.__bottomExtension=0;this.__needSecondBitmapData=!0;this.__numShaderPasses=0;this.__preserveObject=!1;this.__rightExtension=0;this.__shaderBlendMode=10;this.__topExtension=0;this.__smooth=!0};h["openfl.filters.BitmapFilter"]=Ae;Ae.__name__="openfl.filters.BitmapFilter";Ae.prototype={__bottomExtension:null,__leftExtension:null,__needSecondBitmapData:null,__numShaderPasses:null,__preserveObject:null,__renderDirty:null,__rightExtension:null,
__shaderBlendMode:null,__smooth:null,__topExtension:null,clone:function(){return new Ae},__applyFilter:function(a,b,c,d){return b},__initShader:function(a,b,c){return null},__class__:Ae};var Ic=function(a){null==this.__glFragmentSource&&(this.__glFragmentSource="varying vec2 openfl_TextureCoordv;\n\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\tgl_FragColor = texture2D (openfl_Texture, openfl_TextureCoordv);\n\n\t\t}");null==this.__glVertexSource&&
(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\t\t}");ef.call(this,a);this.__isGenerated=!0;this.__initGL()};h["openfl.filters.BitmapFilterShader"]=Ic;Ic.__name__="openfl.filters.BitmapFilterShader";Ic.__super__=
ef;Ic.prototype=w(ef.prototype,{openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_TextureSize:null,openfl_Texture:null,__class__:Ic});var ip=function(){null==this.__glFragmentSource&&(this.__glFragmentSource="uniform sampler2D openfl_Texture;\n\n\t\tvarying vec2 vBlurCoords[7];\n\n\t\tvoid main(void) {\n\n\t\t\tvec4 sum = vec4(0.0);\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[0]) * 0.00443;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[1]) * 0.05399;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[2]) * 0.24197;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[3]) * 0.39894;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[4]) * 0.24197;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[5]) * 0.05399;\n\t\t\tsum += texture2D(openfl_Texture, vBlurCoords[6]) * 0.00443;\n\n\t\t\tgl_FragColor = sum;\n\n\t\t}");
null==this.__glVertexSource&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\n\t\tuniform mat4 openfl_Matrix;\n\n\t\tuniform vec2 uRadius;\n\t\tvarying vec2 vBlurCoords[7];\n\t\tuniform vec2 uTextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\t\t\tvec2 r = uRadius / uTextureSize;\n\t\t\tvBlurCoords[0] = openfl_TextureCoord - r;\n\t\t\tvBlurCoords[1] = openfl_TextureCoord - r * 0.75;\n\t\t\tvBlurCoords[2] = openfl_TextureCoord - r * 0.5;\n\t\t\tvBlurCoords[3] = openfl_TextureCoord;\n\t\t\tvBlurCoords[4] = openfl_TextureCoord + r * 0.5;\n\t\t\tvBlurCoords[5] = openfl_TextureCoord + r * 0.75;\n\t\t\tvBlurCoords[6] = openfl_TextureCoord + r;\n\n\t\t}");
Ic.call(this);this.uRadius.value=[0,0];this.__isGenerated=!0;this.__initGL()};h["openfl.filters._BlurFilter.BlurShader"]=ip;ip.__name__="openfl.filters._BlurFilter.BlurShader";ip.__super__=Ic;ip.prototype=w(Ic.prototype,{__update:function(){this.uTextureSize.value=[this.__texture.input.width,this.__texture.input.height];Ic.prototype.__update.call(this)},uRadius:null,uTextureSize:null,__class__:ip});var wg=function(a,b,c){null==c&&(c=1);null==b&&(b=4);null==a&&(a=4);Ae.call(this);this.set_blurX(a);
this.set_blurY(b);this.set_quality(c);this.__needSecondBitmapData=!0;this.__preserveObject=!1;this.__renderDirty=!0};h["openfl.filters.BlurFilter"]=wg;wg.__name__="openfl.filters.BlurFilter";wg.__super__=Ae;wg.prototype=w(Ae.prototype,{__blurX:null,__blurY:null,__horizontalPasses:null,__quality:null,__verticalPasses:null,clone:function(){return new wg(this.__blurX,this.__blurY,this.__quality)},__applyFilter:function(a,b,c,d){(new Date).getTime();c=Qa.gaussianBlur(a.image,b.image,c.__toLimeRectangle(),
d.__toLimeVector2(),this.__blurX,this.__blurY,this.__quality);(new Date).getTime();return c==a.image?a:b},__initShader:function(a,b,c){b<this.__horizontalPasses?(a=Math.pow(.5,b>>1),wg.__blurShader.uRadius.value[0]=this.get_blurX()*a,wg.__blurShader.uRadius.value[1]=0):(a=Math.pow(.5,b-this.__horizontalPasses>>1),wg.__blurShader.uRadius.value[0]=0,wg.__blurShader.uRadius.value[1]=this.get_blurY()*a);return wg.__blurShader},get_blurX:function(){return this.__blurX},set_blurX:function(a){a!=this.__blurX&&
(this.__blurX=a,this.__renderDirty=!0,this.__rightExtension=this.__leftExtension=0<a?Math.ceil(a):0);return a},get_blurY:function(){return this.__blurY},set_blurY:function(a){a!=this.__blurY&&(this.__blurY=a,this.__renderDirty=!0,this.__bottomExtension=this.__topExtension=0<a?Math.ceil(a):0);return a},get_quality:function(){return this.__quality},set_quality:function(a){this.__horizontalPasses=0>=this.__blurX?0:Math.round(a/4*this.__blurX)+1;this.__verticalPasses=0>=this.__blurY?0:Math.round(a/4*
this.__blurY)+1;this.__numShaderPasses=this.__horizontalPasses+this.__verticalPasses;a!=this.__quality&&(this.__renderDirty=!0);return this.__quality=a},__class__:wg,__properties__:{set_quality:"set_quality",get_quality:"get_quality",set_blurY:"set_blurY",get_blurY:"get_blurY",set_blurX:"set_blurX",get_blurX:"get_blurX"}});var Il=function(){null==this.__glFragmentSource&&(this.__glFragmentSource="varying vec2 openfl_TextureCoordv;\n\t\tuniform sampler2D openfl_Texture;\n\n\t\tuniform mat4 uMultipliers;\n\t\tuniform vec4 uOffsets;\n\n\t\tvoid main(void) {\n\n\t\t\tvec4 color = texture2D (openfl_Texture, openfl_TextureCoordv);\n\n\t\t\tif (color.a == 0.0) {\n\n\t\t\t\tgl_FragColor = vec4 (0.0, 0.0, 0.0, 0.0);\n\n\t\t\t} else {\n\n\t\t\t\tcolor = vec4 (color.rgb / color.a, color.a);\n\t\t\t\tcolor = uOffsets + color * uMultipliers;\n\n\t\t\t\tgl_FragColor = vec4 (color.rgb * color.a, color.a);\n\n\t\t\t}\n\n\t\t}");
null==this.__glVertexSource&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\n\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\n\n\t\tvoid main(void) {\n\n\t\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\n\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\n\t\t}");Ic.call(this);this.uMultipliers.value=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];this.uOffsets.value=[0,0,0,0];this.__isGenerated=
!0;this.__initGL()};h["openfl.filters._ColorMatrixFilter.ColorMatrixShader"]=Il;Il.__name__="openfl.filters._ColorMatrixFilter.ColorMatrixShader";Il.__super__=Ic;Il.prototype=w(Ic.prototype,{init:function(a){var b=this.uMultipliers.value,c=this.uOffsets.value;b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[5];b[5]=a[6];b[6]=a[7];b[7]=a[8];b[8]=a[10];b[9]=a[11];b[10]=a[12];b[11]=a[13];b[12]=a[15];b[13]=a[16];b[14]=a[17];b[15]=a[18];c[0]=a[4]/255;c[1]=a[9]/255;c[2]=a[14]/255;c[3]=a[19]/255},uMultipliers:null,
uOffsets:null,__class__:Il});var Sf=function(a){Ae.call(this);this.set_matrix(a);this.__numShaderPasses=1;this.__needSecondBitmapData=!1};h["openfl.filters.ColorMatrixFilter"]=Sf;Sf.__name__="openfl.filters.ColorMatrixFilter";Sf.__super__=Ae;Sf.prototype=w(Ae.prototype,{__matrix:null,clone:function(){return new Sf(this.__matrix)},__applyFilter:function(a,b,c,d){var e=b.image,f=a.image;Ba.convertToData(e);Ba.convertToData(f);var g=e.get_data(),k=f.get_data(),l=d.x-c.x|0;d=d.y-c.y|0;b=4*b.width;var m=
4*a.width,p=e.buffer.format,n=f.buffer.format;e=e.buffer.premultiplied;f=f.buffer.premultiplied;for(var h,q=0,r,t,u=c.y|0,x=c.height|0;u<x;)for(var v=u++,w=c.x|0,C=c.width|0;w<C;){t=w++;r=v*b+4*t;t=(v+l)*m+4*(t+d);var J=p,Q=e;null==Q&&(Q=!1);null==J&&(J=0);switch(J){case 0:h=(g[r]&255)<<24|(g[r+1]&255)<<16|(g[r+2]&255)<<8|g[r+3]&255;break;case 1:h=(g[r+1]&255)<<24|(g[r+2]&255)<<16|(g[r+3]&255)<<8|g[r]&255;break;case 2:h=(g[r+2]&255)<<24|(g[r+1]&255)<<16|(g[r]&255)<<8|g[r+3]&255}Q&&0!=(h&255)&&255!=
(h&255)&&(I.unmult=255/(h&255),h=(I.__clamp[Math.round((h>>>24&255)*I.unmult)]&255)<<24|(I.__clamp[Math.round((h>>>16&255)*I.unmult)]&255)<<16|(I.__clamp[Math.round((h>>>8&255)*I.unmult)]&255)<<8|h&255);0==(h&255)?q=0:(q=((Math.max(0,Math.min(this.__matrix[0]*(h>>>24&255)+this.__matrix[1]*(h>>>16&255)+this.__matrix[2]*(h>>>8&255)+this.__matrix[3]*(h&255)+this.__matrix[4],255))|0)&255)<<24|(q>>>16&255)<<16|(q>>>8&255)<<8|q&255,q=(q>>>24&255)<<24|((Math.max(0,Math.min(this.__matrix[5]*(h>>>24&255)+
this.__matrix[6]*(h>>>16&255)+this.__matrix[7]*(h>>>8&255)+this.__matrix[8]*(h&255)+this.__matrix[9],255))|0)&255)<<16|(q>>>8&255)<<8|q&255,q=(q>>>24&255)<<24|(q>>>16&255)<<16|((Math.max(0,Math.min(this.__matrix[10]*(h>>>24&255)+this.__matrix[11]*(h>>>16&255)+this.__matrix[12]*(h>>>8&255)+this.__matrix[13]*(h&255)+this.__matrix[14],255))|0)&255)<<8|q&255,q=(q>>>24&255)<<24|(q>>>16&255)<<16|(q>>>8&255)<<8|(Math.max(0,Math.min(this.__matrix[15]*(h>>>24&255)+this.__matrix[16]*(h>>>16&255)+this.__matrix[17]*
(h>>>8&255)+this.__matrix[18]*(h&255)+this.__matrix[19],255))|0)&255);r=n;J=f;null==J&&(J=!1);null==r&&(r=0);J&&(0==(q&255)?0!=q&&(q=0):255!=(q&255)&&(I.a16=I.__alpha16[q&255],q=((q>>>24&255)*I.a16>>16&255)<<24|((q>>>16&255)*I.a16>>16&255)<<16|((q>>>8&255)*I.a16>>16&255)<<8|q&255));switch(r){case 0:k[t]=q>>>24&255;k[t+1]=q>>>16&255;k[t+2]=q>>>8&255;k[t+3]=q&255;break;case 1:k[t]=q&255;k[t+1]=q>>>24&255;k[t+2]=q>>>16&255;k[t+3]=q>>>8&255;break;case 2:k[t]=q>>>8&255,k[t+1]=q>>>16&255,k[t+2]=q>>>24&
255,k[t+3]=q&255}}a.image.dirty=!0;return a},__initShader:function(a,b,c){Sf.__colorMatrixShader.init(this.get_matrix());return Sf.__colorMatrixShader},get_matrix:function(){return this.__matrix},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__:Sf,__properties__:{set_matrix:"set_matrix",get_matrix:"get_matrix"}});var jp=function(){null==this.__glFragmentSource&&(this.__glFragmentSource="varying vec2 vBlurCoords[9];\n\n\t\tuniform sampler2D openfl_Texture;\n\n\t\tuniform float uBias;\n\t\tuniform mat3 uConvoMatrix;\n\t\tuniform float uDivisor;\n\t\tuniform bool uPreserveAlpha;\n\n\t\tvoid main(void) {\n\n\t\t\tvec4 tc = texture2D (openfl_Texture, vBlurCoords[4]);\n\t\t\tvec4 c = vec4 (0.0);\n\n\t\t\tc += texture2D (openfl_Texture, vBlurCoords[0]) * uConvoMatrix[0][0];\n\t\t\tc += texture2D (openfl_Texture, vBlurCoords[1]) * uConvoMatrix[0][1];\n\t\t\tc += texture2D (openfl_Texture, vBlurCoords[2]) * uConvoMatrix[0][2];\n\n\t\t\tc += texture2D (openfl_Texture, vBlurCoords[3]) * uConvoMatrix[1][0];\n\t\t\tc += tc * uConvoMatrix[1][1];\n\t\t\tc += texture2D (openfl_Texture, vBlurCoords[5]) * uConvoMatrix[1][2];\n\n\t\t\tc += texture2D (openfl_Texture, vBlurCoords[6]) * uConvoMatrix[2][0];\n\t\t\tc += texture2D (openfl_Texture, vBlurCoords[7]) * uConvoMatrix[2][1];\n\t\t\tc += texture2D (openfl_Texture, vBlurCoords[8]) * uConvoMatrix[2][2];\n\n\t\t\tif (uDivisor > 0.0) {\n\n\t\t\t\tc /= vec4 (uDivisor, uDivisor, uDivisor, uDivisor);\n\n\t\t\t}\n\n\t\t\tc += vec4 (uBias, uBias, uBias, uBias);\n\n\t\t\tif (uPreserveAlpha) {\n\n\t\t\t\tc.a = tc.a;\n\n\t\t\t}\n\n\t\t\tgl_FragColor = c;\n\n\t\t}");
null==this.__glVertexSource&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\n\t\tvarying vec2 vBlurCoords[9];\n\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tvoid main(void) {\n\n\t\t\tvec2 r = vec2 (1.0, 1.0) / openfl_TextureSize;\n\t\t\tvec2 t = openfl_TextureCoord;\n\n\t\t\tvBlurCoords[0] = t + r * vec2 (-1.0, -1.0);\n\t\t\tvBlurCoords[1] = t + r * vec2 (0.0, -1.0);\n\t\t\tvBlurCoords[2] = t + r * vec2 (1.0, -1.0);\n\n\t\t\tvBlurCoords[3] = t + r * vec2 (-1.0, 0.0);\n\t\t\tvBlurCoords[4] = t;\n\t\t\tvBlurCoords[5] = t + r * vec2 (1.0, 0.0);\n\n\t\t\tvBlurCoords[6] = t + r * vec2 (-1.0, 1.0);\n\t\t\tvBlurCoords[7] = t + r * vec2 (0.0, 1.0);\n\t\t\tvBlurCoords[8] = t + r * vec2 (1.0, 1.0);\n\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\t\t}");
Ic.call(this);this.uDivisor.value=[1];this.uBias.value=[0];this.uPreserveAlpha.value=[!0];this.__isGenerated=!0;this.__initGL()};h["openfl.filters._ConvolutionFilter.ConvolutionShader"]=jp;jp.__name__="openfl.filters._ConvolutionFilter.ConvolutionShader";jp.__super__=Ic;jp.prototype=w(Ic.prototype,{uBias:null,uConvoMatrix:null,uDivisor:null,uPreserveAlpha:null,__class__:jp});var nh=function(a,b,c,d,e,f,g,k,l){null==l&&(l=0);null==k&&(k=0);null==g&&(g=!0);null==f&&(f=!0);null==e&&(e=0);null==d&&(d=
1);null==b&&(b=0);null==a&&(a=0);Ae.call(this);this.matrixX=a;this.matrixY=b;this.__matrix=c;this.divisor=d;this.bias=e;this.preserveAlpha=f;this.clamp=g;this.color=k;this.alpha=l;this.__numShaderPasses=1};h["openfl.filters.ConvolutionFilter"]=nh;nh.__name__="openfl.filters.ConvolutionFilter";nh.__super__=Ae;nh.prototype=w(Ae.prototype,{alpha:null,bias:null,clamp:null,color:null,divisor:null,matrixX:null,matrixY:null,preserveAlpha:null,__matrix:null,clone:function(){return new nh(this.matrixX,this.matrixY,
this.__matrix,this.divisor,this.bias,this.preserveAlpha,this.clamp,this.color,this.alpha)},__initShader:function(a,b,c){nh.__convolutionShader.uConvoMatrix.value=this.get_matrix();nh.__convolutionShader.uDivisor.value[0]=this.divisor;nh.__convolutionShader.uBias.value[0]=this.bias;nh.__convolutionShader.uPreserveAlpha.value[0]=this.preserveAlpha;return nh.__convolutionShader},get_matrix:function(){return this.__matrix},set_matrix:function(a){null==a&&(a=[0,0,0,0,1,0,0,0,0]);if(9!=a.length)throw new E("Only a 3x3 matrix is supported");
return this.__matrix=a},__class__:nh,__properties__:{set_matrix:"set_matrix",get_matrix:"get_matrix"}});var kp=function(){null==this.__glFragmentSource&&(this.__glFragmentSource="\n\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform sampler2D mapTexture;\n\n\t\tuniform mat4 openfl_Matrix;\n\n\t\tuniform vec4 uOffsets;\n\t\tuniform mat4 uDisplacements;\n\n\t\tvarying vec2 openfl_TextureCoordV;\n\t\tvarying vec2 mapTextureCoords;\n\n\t\tvoid main(void) {\n\n\t\t\tvec4 map_color = texture2D(mapTexture, mapTextureCoords);\n\t\t\tvec4 map_color_mod = map_color - uOffsets;\n\n\t\t\tmap_color_mod = map_color_mod * vec4(map_color.w, map_color.w, 1.0, 1.0);\n\n\t\t\tvec4 displacements_multiplied = map_color_mod * uDisplacements;\n\t\t\tvec4 result = vec4(openfl_TextureCoordV.x, openfl_TextureCoordV.y, 0.0, 1.0) + displacements_multiplied;\n\n\t\t\tgl_FragColor = texture2D(openfl_Texture, vec2(result));\n\n\t\t}\n\n\t");
null==this.__glVertexSource&&(this.__glVertexSource="\n\n\t\tuniform mat4 openfl_Matrix;\n\n\t\tuniform vec2 mapTextureCoordsOffset;\n\n\t\tattribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\n\t\tvarying vec2 openfl_TextureCoordV;\n\n\t\tvarying vec2 mapTextureCoords;\n\n\t\tvoid main(void) {\n\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\t\t\topenfl_TextureCoordV = openfl_TextureCoord;\n\t\t\tmapTextureCoords = openfl_TextureCoord - mapTextureCoordsOffset;\n\n\t\t}\n\n\t");
Ic.call(this);this.__isGenerated=!0;this.__initGL()};h["openfl.filters._DisplacementMapFilter.DisplacementMapShader"]=kp;kp.__name__="openfl.filters._DisplacementMapFilter.DisplacementMapShader";kp.__super__=Ic;kp.prototype=w(Ic.prototype,{mapTextureCoordsOffset:null,mapTexture:null,uOffsets:null,uDisplacements:null,__class__:kp});var uc=function(a,b,c,d,e,f,g,k,l){null==l&&(l=0);null==k&&(k=0);null==g&&(g="wrap");null==f&&(f=0);null==e&&(e=0);null==d&&(d=0);null==c&&(c=0);Ae.call(this);this.__mapBitmap=
a;this.__mapPoint=null!=b?b:new pa;this.__componentX=c;this.__componentY=d;this.__scaleX=e;this.__scaleY=f;this.__mode=g;this.__color=k;this.__alpha=l;this.__needSecondBitmapData=!0;this.__preserveObject=!1;this.__renderDirty=!0;this.__numShaderPasses=1};h["openfl.filters.DisplacementMapFilter"]=uc;uc.__name__="openfl.filters.DisplacementMapFilter";uc.__super__=Ae;uc.prototype=w(Ae.prototype,{__alpha:null,__color:null,__componentX:null,__componentY:null,__mapBitmap:null,__mapPoint:null,__mode:null,
__scaleX:null,__scaleY:null,clone:function(){return new uc(this.__mapBitmap,this.__mapPoint.clone(),this.__componentX,this.__componentY,this.__scaleX,this.__scaleY,this.__mode,this.__color,this.__alpha)},__applyFilter:function(a,b,c,d){this.__updateMapMatrix();Ba.convertToData(a.image);Ba.convertToData(b.image);Ba.convertToData(this.__mapBitmap.image);Qa.displaceMap(a.image,b.image,this.__mapBitmap.image,new Gd(this.__mapPoint.x/this.__mapBitmap.width,this.__mapPoint.y/this.__mapBitmap.height),new Ac(uc.__matrixData[0],
uc.__matrixData[4],uc.__matrixData[8],uc.__matrixData[12]),new Ac(uc.__matrixData[1],uc.__matrixData[5],uc.__matrixData[9],uc.__matrixData[13]),this.__smooth);return a},__initShader:function(a,b,c){this.__updateMapMatrix();uc.__displacementMapShader.uOffsets.value=uc.__offset;uc.__displacementMapShader.uDisplacements.value=uc.__matrixData;a=this.get_mapPoint().x/this.__mapBitmap.width;b=this.get_mapPoint().y/this.__mapBitmap.height;uc.__displacementMapShader.mapTextureCoordsOffset.value=[a,b];uc.__displacementMapShader.mapTexture.input=
this.__mapBitmap;return uc.__displacementMapShader},__updateMapMatrix:function(){var a=this.__mapBitmap.width,b=this.__mapBitmap.height;uc.__matrixData[0]=0;uc.__matrixData[1]=0;uc.__matrixData[2]=0;uc.__matrixData[3]=0;uc.__matrixData[4]=0;uc.__matrixData[5]=0;uc.__matrixData[6]=0;uc.__matrixData[7]=0;uc.__matrixData[8]=0;uc.__matrixData[9]=0;uc.__matrixData[10]=0;uc.__matrixData[11]=0;uc.__matrixData[12]=0;uc.__matrixData[13]=0;uc.__matrixData[14]=0;uc.__matrixData[15]=0;var c=1==this.__componentX?
0:2==this.__componentX?1:4==this.__componentX?2:3;var d=1==this.__componentY?0:2==this.__componentY?1:4==this.__componentY?2:3;uc.__matrixData[4*c]=1*this.__scaleX/a;uc.__matrixData[4*d+1]=1*this.__scaleY/b},get_alpha:function(){return this.__alpha},set_alpha:function(a){a!=this.__alpha&&(this.__renderDirty=!0);return this.__alpha=a},get_componentX:function(){return this.__componentX},set_componentX:function(a){a!=this.__componentX&&(this.__renderDirty=!0);return this.__componentX=a},get_componentY:function(){return this.__componentY},
set_componentY:function(a){a!=this.__componentY&&(this.__renderDirty=!0);return this.__componentY=a},get_color:function(){return this.__color},set_color:function(a){a!=this.__color&&(this.__renderDirty=!0);return this.__color=a},get_scaleX:function(){return this.__scaleX},set_scaleX:function(a){a!=this.__scaleX&&(this.__renderDirty=!0);return this.__scaleX=a},get_scaleY:function(){return this.__scaleY},set_scaleY:function(a){a!=this.__scaleY&&(this.__renderDirty=!0);return this.__scaleY=a},get_mapBitmap:function(){return this.__mapBitmap},
set_mapBitmap:function(a){a!=this.__mapBitmap&&(this.__renderDirty=!0);return this.__mapBitmap=a},get_mapPoint:function(){return this.__mapPoint},set_mapPoint:function(a){a!=this.__mapPoint&&(this.__renderDirty=!0);return this.__mapPoint=a},get_mode:function(){return this.__mode},set_mode:function(a){a!=this.__mode&&(this.__renderDirty=!0);return this.__mode=a},__class__:uc,__properties__:{set_scaleY:"set_scaleY",get_scaleY:"get_scaleY",set_scaleX:"set_scaleX",get_scaleX:"get_scaleX",set_mode:"set_mode",
get_mode:"get_mode",set_mapPoint:"set_mapPoint",get_mapPoint:"get_mapPoint",set_mapBitmap:"set_mapBitmap",get_mapBitmap:"get_mapBitmap",set_componentY:"set_componentY",get_componentY:"get_componentY",set_componentX:"set_componentX",get_componentX:"get_componentX",set_color:"set_color",get_color:"get_color",set_alpha:"set_alpha",get_alpha:"get_alpha"}});var lp=function(){null==this.__glFragmentSource&&(this.__glFragmentSource="\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform sampler2D sourceBitmap;\n\t\tuniform float strength;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tvec4 glow = texture2D(openfl_Texture, textureCoords.zw) * strength;\n\n\t\t\tgl_FragColor = glow;\n\t\t}\n\t");
null==this.__glVertexSource&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\t\tuniform vec2 offset;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\ttextureCoords = vec4(openfl_TextureCoord, openfl_TextureCoord - offset / openfl_TextureSize);\n\t\t}\n\t");Ic.call(this);this.strength.value=[1];this.offset.value=
[0,0];this.__isGenerated=!0;this.__initGL()};h["openfl.filters._DropShadowFilter.HideShader"]=lp;lp.__name__="openfl.filters._DropShadowFilter.HideShader";lp.__super__=Ic;lp.prototype=w(Ic.prototype,{offset:null,sourceBitmap:null,strength:null,__class__:lp});var ki=function(a,b,c,d,e,f,g,k,l,m,p){null==p&&(p=!1);null==m&&(m=!1);null==l&&(l=!1);null==k&&(k=1);null==g&&(g=1);null==f&&(f=4);null==e&&(e=4);null==d&&(d=1);null==c&&(c=0);null==b&&(b=45);null==a&&(a=4);Ae.call(this);this.__offsetY=this.__offsetX=
0;this.__distance=a;this.__angle=b;this.__color=c;this.__alpha=d;this.__blurX=e;this.__blurY=f;this.__strength=g;this.__quality=k;this.__inner=l;this.__knockout=m;this.__hideObject=p;this.__updateSize();this.__renderDirty=this.__preserveObject=this.__needSecondBitmapData=!0};h["openfl.filters.DropShadowFilter"]=ki;ki.__name__="openfl.filters.DropShadowFilter";ki.__super__=Ae;ki.prototype=w(Ae.prototype,{__alpha:null,__angle:null,__blurX:null,__blurY:null,__color:null,__distance:null,__hideObject:null,
__horizontalPasses:null,__inner:null,__knockout:null,__offsetX:null,__offsetY:null,__quality:null,__strength:null,__verticalPasses:null,clone:function(){return new ki(this.__distance,this.__angle,this.__color,this.__alpha,this.__blurX,this.__blurY,this.__strength,this.__quality,this.__inner,this.__knockout,this.__hideObject)},__applyFilter:function(a,b,c,d){var e=this.__color>>16&255,f=this.__color>>8&255,g=this.__color&255;d=new pa(d.x+this.__offsetX,d.y+this.__offsetY);c=Qa.gaussianBlur(a.image,
b.image,c.__toLimeRectangle(),d.__toLimeVector2(),this.__blurX,this.__blurY,this.__quality,this.__strength);c.colorTransform(c.get_rect(),(new Sb(0,0,0,this.__alpha,e,f,g,0)).__toLimeColorMatrix());return c==a.image?a:b},__initShader:function(a,b,c){if(this.__inner&&0==b)return se.__invertAlphaShader;a=b-(this.__inner?1:0);if(a<this.__horizontalPasses+this.__verticalPasses)return c=se.__blurAlphaShader,a<this.__horizontalPasses?(a=Math.pow(.5,a>>1),c.uRadius.value[0]=this.get_blurX()*a,c.uRadius.value[1]=
0):(a=Math.pow(.5,a-this.__horizontalPasses>>1),c.uRadius.value[0]=0,c.uRadius.value[1]=this.get_blurY()*a),c.uColor.value[0]=(this.get_color()>>16&255)/255,c.uColor.value[1]=(this.get_color()>>8&255)/255,c.uColor.value[2]=(this.get_color()&255)/255,c.uColor.value[3]=this.get_alpha(),c;if(this.__inner){if(this.__knockout||this.__hideObject)return a=se.__innerCombineKnockoutShader,a.sourceBitmap.input=c,a.offset.value[0]=this.__offsetX,a.offset.value[1]=this.__offsetY,a.strength.value[0]=this.__strength,
a;a=se.__innerCombineShader;a.sourceBitmap.input=c;a.offset.value[0]=this.__offsetX;a.offset.value[1]=this.__offsetY;a.strength.value[0]=this.__strength;return a}if(this.__knockout)return a=se.__combineKnockoutShader,a.sourceBitmap.input=c,a.offset.value[0]=this.__offsetX,a.offset.value[1]=this.__offsetY,a.strength.value[0]=this.__strength,a;if(this.__hideObject)return a=ki.__hideShader,a.sourceBitmap.input=c,a.offset.value[0]=this.__offsetX,a.offset.value[1]=this.__offsetY,a.strength.value[0]=this.__strength,
a;a=se.__combineShader;a.sourceBitmap.input=c;a.offset.value[0]=this.__offsetX;a.offset.value[1]=this.__offsetY;a.strength.value[0]=this.__strength;return a},__updateSize:function(){this.__offsetX=this.__distance*Math.cos(this.__angle*Math.PI/180)|0;this.__offsetY=this.__distance*Math.sin(this.__angle*Math.PI/180)|0;this.__topExtension=Math.ceil((0>this.__offsetY?-this.__offsetY:0)+this.__blurY);this.__bottomExtension=Math.ceil((0<this.__offsetY?this.__offsetY:0)+this.__blurY);this.__leftExtension=
Math.ceil((0>this.__offsetX?-this.__offsetX:0)+this.__blurX);this.__rightExtension=Math.ceil((0<this.__offsetX?this.__offsetX:0)+this.__blurX);this.__calculateNumShaderPasses()},__calculateNumShaderPasses:function(){this.__horizontalPasses=Math.round(this.__quality/4*this.__blurX)+1;this.__verticalPasses=Math.round(this.__quality/4*this.__blurY)+1;this.__numShaderPasses=this.__horizontalPasses+this.__verticalPasses+(this.__inner?2:1)},get_alpha:function(){return this.__alpha},set_alpha:function(a){a!=
this.__alpha&&(this.__renderDirty=!0);return this.__alpha=a},get_angle:function(){return this.__angle},set_angle:function(a){a!=this.__angle&&(this.__angle=a,this.__renderDirty=!0,this.__updateSize());return a},get_blurX:function(){return this.__blurX},set_blurX:function(a){a!=this.__blurX&&(this.__blurX=a,this.__renderDirty=!0,this.__updateSize());return a},get_blurY:function(){return this.__blurY},set_blurY:function(a){a!=this.__blurY&&(this.__blurY=a,this.__renderDirty=!0,this.__updateSize());
return a},get_color:function(){return this.__color},set_color:function(a){a!=this.__color&&(this.__renderDirty=!0);return this.__color=a},get_distance:function(){return this.__distance},set_distance:function(a){a!=this.__distance&&(this.__distance=a,this.__renderDirty=!0,this.__updateSize());return a},get_hideObject:function(){return this.__hideObject},set_hideObject:function(a){a!=this.__hideObject&&(this.__renderDirty=!0);return this.__hideObject=a},get_inner:function(){return this.__inner},set_inner:function(a){a!=
this.__inner&&(this.__renderDirty=!0);return this.__inner=a},get_knockout:function(){return this.__knockout},set_knockout:function(a){a!=this.__knockout&&(this.__renderDirty=!0);return this.__knockout=a},get_quality:function(){return this.__quality},set_quality:function(a){a!=this.__quality&&(this.__renderDirty=!0);return this.__quality=a},get_strength:function(){return this.__strength},set_strength:function(a){a!=this.__strength&&(this.__renderDirty=!0);return this.__strength=a},__class__:ki,__properties__:{set_strength:"set_strength",
get_strength:"get_strength",set_quality:"set_quality",get_quality:"get_quality",set_knockout:"set_knockout",get_knockout:"get_knockout",set_inner:"set_inner",get_inner:"get_inner",set_hideObject:"set_hideObject",get_hideObject:"get_hideObject",set_distance:"set_distance",get_distance:"get_distance",set_color:"set_color",get_color:"get_color",set_blurY:"set_blurY",get_blurY:"get_blurY",set_blurX:"set_blurX",get_blurX:"get_blurX",set_angle:"set_angle",get_angle:"get_angle",set_alpha:"set_alpha",get_alpha:"get_alpha"}});
var mp=function(){null==this.__glFragmentSource&&(this.__glFragmentSource="\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform vec4 uColor;\n\t\tvarying vec2 vTexCoord;\n\t\tvarying vec2 vBlurCoords[6];\n\n\t\tvoid main(void)\n\t\t{\n            vec4 texel = texture2D(openfl_Texture, vTexCoord);\n\n            vec3 contributions = vec3(0.00443, 0.05399, 0.24197);\n            vec3 top = vec3(\n                texture2D(openfl_Texture, vBlurCoords[0]).a,\n                texture2D(openfl_Texture, vBlurCoords[1]).a,\n                texture2D(openfl_Texture, vBlurCoords[2]).a\n            );\n            vec3 bottom = vec3(\n                texture2D(openfl_Texture, vBlurCoords[3]).a,\n                texture2D(openfl_Texture, vBlurCoords[4]).a,\n                texture2D(openfl_Texture, vBlurCoords[5]).a\n            );\n\n            float a = texel.a * 0.39894;\n\t\t\ta += dot(top, contributions.xyz);\n            a += dot(bottom, contributions.zyx);\n\n\t\t\tgl_FragColor = uColor * a;\n\t\t}\n\t");
null==this.__glVertexSource&&(this.__glVertexSource="\n\t\tattribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\n\t\tuniform vec2 uRadius;\n\t\tvarying vec2 vTexCoord;\n\t\tvarying vec2 vBlurCoords[6];\n\n\t\tvoid main(void) {\n\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\tvTexCoord = openfl_TextureCoord;\n\n\t\t\tvec3 offset = vec3(0.33, 0.66, 1.0);\n\t\t\tvec2 r = uRadius / openfl_TextureSize;\n\t\t\tvBlurCoords[0] = openfl_TextureCoord - r * offset.z;\n\t\t\tvBlurCoords[1] = openfl_TextureCoord - r * offset.y;\n\t\t\tvBlurCoords[2] = openfl_TextureCoord - r * offset.x;\n\t\t\tvBlurCoords[3] = openfl_TextureCoord + r * offset.x;\n\t\t\tvBlurCoords[4] = openfl_TextureCoord + r * offset.y;\n\t\t\tvBlurCoords[5] = openfl_TextureCoord + r * offset.z;\n\t\t}\n\t");
Ic.call(this);this.uRadius.value=[0,0];this.uColor.value=[0,0,0,0];this.__isGenerated=!0;this.__initGL()};h["openfl.filters._GlowFilter.BlurAlphaShader"]=mp;mp.__name__="openfl.filters._GlowFilter.BlurAlphaShader";mp.__super__=Ic;mp.prototype=w(Ic.prototype,{uRadius:null,uColor:null,__class__:mp});var np=function(){null==this.__glFragmentSource&&(this.__glFragmentSource="\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform sampler2D sourceBitmap;\n\t\tuniform float strength;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tvec4 src = texture2D(sourceBitmap, textureCoords.xy);\n\t\t\tvec4 glow = texture2D(openfl_Texture, textureCoords.zw) * strength;\n\n\t\t\tgl_FragColor = glow * (1.0 - src.a);\n\t\t}\n\t");
null==this.__glVertexSource&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\t\tuniform vec2 offset;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\ttextureCoords = vec4(openfl_TextureCoord, openfl_TextureCoord - offset / openfl_TextureSize);\n\t\t}\n\t");Ic.call(this);this.strength.value=[1];this.offset.value=
[0,0];this.__isGenerated=!0;this.__initGL()};h["openfl.filters._GlowFilter.CombineKnockoutShader"]=np;np.__name__="openfl.filters._GlowFilter.CombineKnockoutShader";np.__super__=Ic;np.prototype=w(Ic.prototype,{offset:null,sourceBitmap:null,strength:null,__class__:np});var op=function(){null==this.__glFragmentSource&&(this.__glFragmentSource="\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform sampler2D sourceBitmap;\n\t\tuniform float strength;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tvec4 src = texture2D(sourceBitmap, textureCoords.xy);\n\t\t\tvec4 glow = texture2D(openfl_Texture, textureCoords.zw) * strength;\n\n\t\t\tgl_FragColor = src * src.a + glow * (1.0 - src.a);\n\t\t}\n\t");
null==this.__glVertexSource&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\t\tuniform vec2 offset;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\ttextureCoords = vec4(openfl_TextureCoord, openfl_TextureCoord - offset / openfl_TextureSize);\n\t\t}\n\t");Ic.call(this);this.strength.value=[1];this.offset.value=
[0,0];this.__isGenerated=!0;this.__initGL()};h["openfl.filters._GlowFilter.CombineShader"]=op;op.__name__="openfl.filters._GlowFilter.CombineShader";op.__super__=Ic;op.prototype=w(Ic.prototype,{offset:null,sourceBitmap:null,strength:null,__class__:op});var pp=function(){null==this.__glFragmentSource&&(this.__glFragmentSource="\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform sampler2D sourceBitmap;\n\t\tuniform float strength;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tvec4 src = texture2D(sourceBitmap, textureCoords.xy);\n\t\t\tvec4 glow = texture2D(openfl_Texture, textureCoords.zw) * strength;\n\n\t\t\tgl_FragColor = glow * src.a;\n\t\t}\n\t");
null==this.__glVertexSource&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\t\tuniform vec2 offset;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\ttextureCoords = vec4(openfl_TextureCoord, openfl_TextureCoord - offset / openfl_TextureSize);\n\t\t}\n\t");Ic.call(this);this.offset.value=[0,0];this.strength.value=
[1];this.__isGenerated=!0;this.__initGL()};h["openfl.filters._GlowFilter.InnerCombineKnockoutShader"]=pp;pp.__name__="openfl.filters._GlowFilter.InnerCombineKnockoutShader";pp.__super__=Ic;pp.prototype=w(Ic.prototype,{offset:null,sourceBitmap:null,strength:null,__class__:pp});var qp=function(){null==this.__glFragmentSource&&(this.__glFragmentSource="\n\t\tuniform sampler2D openfl_Texture;\n\t\tuniform sampler2D sourceBitmap;\n\t\tuniform float strength;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tvec4 src = texture2D(sourceBitmap, textureCoords.xy);\n\t\t\tvec4 glow = texture2D(openfl_Texture, textureCoords.zw) * strength;\n\n\t\t\tgl_FragColor = mix(src, glow, glow.a) * src.a;\n\t\t}\n\t");
null==this.__glVertexSource&&(this.__glVertexSource="attribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tuniform mat4 openfl_Matrix;\n\t\tuniform vec2 openfl_TextureSize;\n\t\tuniform vec2 offset;\n\t\tvarying vec4 textureCoords;\n\n\t\tvoid main(void) {\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\ttextureCoords = vec4(openfl_TextureCoord, openfl_TextureCoord - offset / openfl_TextureSize);\n\t\t}\n\t");Ic.call(this);this.strength.value=[1];this.offset.value=
[0,0];this.__isGenerated=!0;this.__initGL()};h["openfl.filters._GlowFilter.InnerCombineShader"]=qp;qp.__name__="openfl.filters._GlowFilter.InnerCombineShader";qp.__super__=Ic;qp.prototype=w(Ic.prototype,{offset:null,sourceBitmap:null,strength:null,__class__:qp});var rp=function(){null==this.__glFragmentSource&&(this.__glFragmentSource="\n\t\tuniform sampler2D openfl_Texture;\n\t\tvarying vec2 vTexCoord;\n\n\t\tvoid main(void) {\n\t\t\tvec4 texel = texture2D(openfl_Texture, vTexCoord);\n\t\t\tgl_FragColor = vec4(texel.rgb, 1.0 - texel.a);\n\t\t}\n\t");
null==this.__glVertexSource&&(this.__glVertexSource="\n\t\tattribute vec4 openfl_Position;\n\t\tattribute vec2 openfl_TextureCoord;\n\t\tuniform mat4 openfl_Matrix;\n\t\tvarying vec2 vTexCoord;\n\n\t\tvoid main(void) {\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\t\t\tvTexCoord = openfl_TextureCoord;\n\t\t}\n\t");Ic.call(this);this.__isGenerated=!0;this.__initGL()};h["openfl.filters._GlowFilter.InvertAlphaShader"]=rp;rp.__name__="openfl.filters._GlowFilter.InvertAlphaShader";rp.__super__=
Ic;rp.prototype=w(Ic.prototype,{__class__:rp});var se=function(a,b,c,d,e,f,g,k){null==k&&(k=!1);null==g&&(g=!1);null==f&&(f=1);null==e&&(e=2);null==d&&(d=6);null==c&&(c=6);null==b&&(b=1);null==a&&(a=16711680);Ae.call(this);this.__color=a;this.__alpha=b;this.__blurX=c;this.__blurY=d;this.__strength=e;this.__inner=g;this.__knockout=k;this.__quality=f;this.__updateSize();this.__renderDirty=this.__preserveObject=this.__needSecondBitmapData=!0};h["openfl.filters.GlowFilter"]=se;se.__name__="openfl.filters.GlowFilter";
se.__super__=Ae;se.prototype=w(Ae.prototype,{__alpha:null,__blurX:null,__blurY:null,__color:null,__horizontalPasses:null,__inner:null,__knockout:null,__quality:null,__strength:null,__verticalPasses:null,clone:function(){return new se(this.__color,this.__alpha,this.__blurX,this.__blurY,this.__strength,this.__quality,this.__inner,this.__knockout)},__applyFilter:function(a,b,c,d){var e=this.__color>>16&255,f=this.__color>>8&255,g=this.__color&255;if(this.__inner||this.__knockout)return b.image.colorTransform(b.image.get_rect(),
(new Sb(1,1,1,0,0,0,0,-255)).__toLimeColorMatrix()),b.image.dirty=!0,b.image.version++,a=b.clone();c=Qa.gaussianBlur(a.image,b.image,c.__toLimeRectangle(),d.__toLimeVector2(),this.__blurX,this.__blurY,this.__quality,this.__strength);c.colorTransform(c.get_rect(),(new Sb(0,0,0,this.__alpha,e,f,g,0)).__toLimeColorMatrix());return c==a.image?a:b},__initShader:function(a,b,c){if(this.__inner&&0==b)return se.__invertAlphaShader;a=b-(this.__inner?1:0);if(a<this.__horizontalPasses+this.__verticalPasses)return c=
se.__blurAlphaShader,a<this.__horizontalPasses?(a=Math.pow(.5,a>>1),c.uRadius.value[0]=this.get_blurX()*a,c.uRadius.value[1]=0):(a=Math.pow(.5,a-this.__horizontalPasses>>1),c.uRadius.value[0]=0,c.uRadius.value[1]=this.get_blurY()*a),c.uColor.value[0]=(this.get_color()>>16&255)/255,c.uColor.value[1]=(this.get_color()>>8&255)/255,c.uColor.value[2]=(this.get_color()&255)/255,c.uColor.value[3]=this.get_alpha(),c;if(this.__inner){if(this.__knockout)return a=se.__innerCombineKnockoutShader,a.sourceBitmap.input=
c,a.strength.value[0]=this.__strength,a;a=se.__innerCombineShader;a.sourceBitmap.input=c;a.strength.value[0]=this.__strength;return a}if(this.__knockout)return a=se.__combineKnockoutShader,a.sourceBitmap.input=c,a.strength.value[0]=this.__strength,a;a=se.__combineShader;a.sourceBitmap.input=c;a.strength.value[0]=this.__strength;return a},__updateSize:function(){this.__rightExtension=this.__leftExtension=0<this.__blurX?Math.ceil(1.5*this.__blurX):0;this.__bottomExtension=this.__topExtension=0<this.__blurY?
Math.ceil(1.5*this.__blurY):0;this.__calculateNumShaderPasses()},__calculateNumShaderPasses:function(){this.__horizontalPasses=0>=this.__blurX?0:Math.round(this.__quality/4*this.__blurX)+1;this.__verticalPasses=0>=this.__blurY?0:Math.round(this.__quality/4*this.__blurY)+1;this.__numShaderPasses=this.__horizontalPasses+this.__verticalPasses+(this.__inner?2:1)},get_alpha:function(){return this.__alpha},set_alpha:function(a){a!=this.__alpha&&(this.__renderDirty=!0);return this.__alpha=a},get_blurX:function(){return this.__blurX},
set_blurX:function(a){a!=this.__blurX&&(this.__blurX=a,this.__renderDirty=!0,this.__updateSize());return a},get_blurY:function(){return this.__blurY},set_blurY:function(a){a!=this.__blurY&&(this.__blurY=a,this.__renderDirty=!0,this.__updateSize());return a},get_color:function(){return this.__color},set_color:function(a){a!=this.__color&&(this.__renderDirty=!0);return this.__color=a},get_inner:function(){return this.__inner},set_inner:function(a){a!=this.__inner&&(this.__renderDirty=!0,this.__calculateNumShaderPasses());
return this.__inner=a},get_knockout:function(){return this.__knockout},set_knockout:function(a){a!=this.__knockout&&(this.__renderDirty=!0,this.__calculateNumShaderPasses());return this.__knockout=a},get_quality:function(){return this.__quality},set_quality:function(a){a!=this.__quality&&(this.__renderDirty=!0,this.__calculateNumShaderPasses());return this.__quality=a},get_strength:function(){return this.__strength},set_strength:function(a){a!=this.__strength&&(this.__renderDirty=!0);return this.__strength=
a},__class__:se,__properties__:{set_strength:"set_strength",get_strength:"get_strength",set_quality:"set_quality",get_quality:"get_quality",set_knockout:"set_knockout",get_knockout:"get_knockout",set_inner:"set_inner",get_inner:"get_inner",set_color:"set_color",get_color:"get_color",set_blurY:"set_blurY",get_blurY:"get_blurY",set_blurX:"set_blurX",get_blurX:"get_blurX",set_alpha:"set_alpha",get_alpha:"get_alpha"}});var ze=function(a){null!=a&&16==a.get_length()?this.rawData=a.concat(null):this.rawData=
Ua.toFloatVector(null,null,null,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};h["openfl.geom.Matrix3D"]=ze;ze.__name__="openfl.geom.Matrix3D";ze.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);return new ze(Ua.toFloatVector(null,null,null,[d*c,-e*c,0,0,e*c,d*c,0,0,0,0,1,0,a,b,0,1]))};ze.createABCD=function(a,b,c,d,e,f){return new ze(Ua.toFloatVector(null,null,null,[a,b,0,0,c,d,0,0,0,0,1,0,e,f,0,1]))};ze.createOrtho=function(a,b,c,d,e,f){var g=1/(b-a),
k=1/(d-c),l=1/(f-e);return new ze(Ua.toFloatVector(null,null,null,[2*g,0,0,0,0,2*k,0,0,0,0,-2*l,0,-(a+b)*g,-(c+d)*k,-(e+f)*l,1]))};ze.interpolate=function(a,b,c){for(var d=new ze,e=0;16>e;){var f=e++;d.rawData.set(f,a.rawData.get(f)+(b.rawData.get(f)-a.rawData.get(f))*c)}return d};ze.__getAxisRotation=function(a,b,c,d){var e=new ze;a=new Cd(a,b,c);d=Math.PI/180*-d;c=Math.cos(d);d=Math.sin(d);b=1-c;e.rawData.set(0,c+a.x*a.x*b);e.rawData.set(5,c+a.y*a.y*b);e.rawData.set(10,c+a.z*a.z*b);c=a.x*a.y*b;
var f=a.z*d;e.rawData.set(4,c+f);e.rawData.set(1,c-f);c=a.x*a.z*b;f=a.y*d;e.rawData.set(8,c-f);e.rawData.set(2,c+f);c=a.y*a.z*b;f=a.x*d;e.rawData.set(9,c+f);e.rawData.set(6,c-f);return e};ze.prototype={rawData:null,append:function(a){var b=this.rawData.get(0),c=this.rawData.get(4),d=this.rawData.get(8),e=this.rawData.get(12),f=this.rawData.get(1),g=this.rawData.get(5),k=this.rawData.get(9),l=this.rawData.get(13),m=this.rawData.get(2),p=this.rawData.get(6),n=this.rawData.get(10),h=this.rawData.get(14),
q=this.rawData.get(3),r=this.rawData.get(7),t=this.rawData.get(11),u=this.rawData.get(15),x=a.rawData.get(0),v=a.rawData.get(4),w=a.rawData.get(8),C=a.rawData.get(12),J=a.rawData.get(1),Q=a.rawData.get(5),F=a.rawData.get(9),B=a.rawData.get(13),D=a.rawData.get(2),A=a.rawData.get(6),E=a.rawData.get(10),G=a.rawData.get(14),H=a.rawData.get(3),I=a.rawData.get(7),y=a.rawData.get(11);a=a.rawData.get(15);this.rawData.set(0,b*x+f*v+m*w+q*C);this.rawData.set(1,b*J+f*Q+m*F+q*B);this.rawData.set(2,b*D+f*A+m*
E+q*G);this.rawData.set(3,b*H+f*I+m*y+q*a);this.rawData.set(4,c*x+g*v+p*w+r*C);this.rawData.set(5,c*J+g*Q+p*F+r*B);this.rawData.set(6,c*D+g*A+p*E+r*G);this.rawData.set(7,c*H+g*I+p*y+r*a);this.rawData.set(8,d*x+k*v+n*w+t*C);this.rawData.set(9,d*J+k*Q+n*F+t*B);this.rawData.set(10,d*D+k*A+n*E+t*G);this.rawData.set(11,d*H+k*I+n*y+t*a);this.rawData.set(12,e*x+l*v+h*w+u*C);this.rawData.set(13,e*J+l*Q+h*F+u*B);this.rawData.set(14,e*D+l*A+h*E+u*G);this.rawData.set(15,e*H+l*I+h*y+u*a)},appendRotation:function(a,
b,c){var d=0,e=d,f=e;null!=c&&(f=c.x,e=c.y,d=c.z);c=a*Math.PI/180;a=Math.cos(c);c=Math.sin(c);var g=b.x,k=b.y;b=b.z;var l=g*g,m=k*k,p=b*b,n=l+m+p;if(0!=n){var h=Math.sqrt(n);g/=h;k/=h;b/=h;l/=n;m/=n;p/=n}n=1-a;h=new ze;var q=h.rawData;q.set(0,l+(m+p)*a);q.set(1,g*k*n+b*c);q.set(2,g*b*n-k*c);q.set(4,g*k*n-b*c);q.set(5,m+(l+p)*a);q.set(6,k*b*n+g*c);q.set(8,g*b*n+k*c);q.set(9,k*b*n-g*c);q.set(10,p+(l+m)*a);q.set(12,(f*(m+p)-g*(e*k+d*b))*n+(e*b-d*k)*c);q.set(13,(e*(l+p)-k*(f*g+d*b))*n+(d*g-f*b)*c);q.set(14,
(d*(l+m)-b*(f*g+e*k))*n+(f*k-e*g)*c);this.append(h)},appendScale:function(a,b,c){this.append(new ze(Ua.toFloatVector(null,null,null,[a,0,0,0,0,b,0,0,0,0,c,0,0,0,0,1])))},appendTranslation:function(a,b,c){var d=this.rawData;d.set(12,d.get(12)+a);a=this.rawData;a.set(13,a.get(13)+b);b=this.rawData;b.set(14,b.get(14)+c)},clone:function(){return new ze(this.rawData.copy())},copyColumnFrom:function(a,b){switch(a){case 0:this.rawData.set(0,b.x);this.rawData.set(1,b.y);this.rawData.set(2,b.z);this.rawData.set(3,
b.w);break;case 1:this.rawData.set(4,b.x);this.rawData.set(5,b.y);this.rawData.set(6,b.z);this.rawData.set(7,b.w);break;case 2:this.rawData.set(8,b.x);this.rawData.set(9,b.y);this.rawData.set(10,b.z);this.rawData.set(11,b.w);break;case 3:this.rawData.set(12,b.x),this.rawData.set(13,b.y),this.rawData.set(14,b.z),this.rawData.set(15,b.w)}},copyColumnTo:function(a,b){switch(a){case 0:b.x=this.rawData.get(0);b.y=this.rawData.get(1);b.z=this.rawData.get(2);b.w=this.rawData.get(3);break;case 1:b.x=this.rawData.get(4);
b.y=this.rawData.get(5);b.z=this.rawData.get(6);b.w=this.rawData.get(7);break;case 2:b.x=this.rawData.get(8);b.y=this.rawData.get(9);b.z=this.rawData.get(10);b.w=this.rawData.get(11);break;case 3:b.x=this.rawData.get(12),b.y=this.rawData.get(13),b.z=this.rawData.get(14),b.w=this.rawData.get(15)}},copyFrom:function(a){this.rawData=a.rawData.copy()},copyRawDataFrom:function(a,b,c){null==c&&(c=!1);null==b&&(b=0);c&&this.transpose();for(var d=0,e=a.get_length()-b;d<e;){var f=d++;this.rawData.set(f,a.get(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.get_length();d<e;){var f=d++;a.set(f+b,this.rawData.get(f))}c&&this.transpose()},copyRowFrom:function(a,b){switch(a){case 0:this.rawData.set(0,b.x);this.rawData.set(4,b.y);this.rawData.set(8,b.z);this.rawData.set(12,b.w);break;case 1:this.rawData.set(1,b.x);this.rawData.set(5,b.y);this.rawData.set(9,b.z);this.rawData.set(13,b.w);break;case 2:this.rawData.set(2,b.x);
this.rawData.set(6,b.y);this.rawData.set(10,b.z);this.rawData.set(14,b.w);break;case 3:this.rawData.set(3,b.x),this.rawData.set(7,b.y),this.rawData.set(11,b.z),this.rawData.set(15,b.w)}},copyRowTo:function(a,b){switch(a){case 0:b.x=this.rawData.get(0);b.y=this.rawData.get(4);b.z=this.rawData.get(8);b.w=this.rawData.get(12);break;case 1:b.x=this.rawData.get(1);b.y=this.rawData.get(5);b.z=this.rawData.get(9);b.w=this.rawData.get(13);break;case 2:b.x=this.rawData.get(2);b.y=this.rawData.get(6);b.z=this.rawData.get(10);
b.w=this.rawData.get(14);break;case 3:b.x=this.rawData.get(3),b.y=this.rawData.get(7),b.z=this.rawData.get(11),b.w=this.rawData.get(15)}},copyToMatrix3D:function(a){a.rawData=this.rawData.copy()},decompose:function(a){null==a&&(a=1);var b=Ua.toObjectVector(null),c=this.clone().rawData.copy(),d=new Cd(c.get(12),c.get(13),c.get(14));c.set(12,0);c.set(13,0);c.set(14,0);var e=new Cd;e.x=Math.sqrt(c.get(0)*c.get(0)+c.get(1)*c.get(1)+c.get(2)*c.get(2));e.y=Math.sqrt(c.get(4)*c.get(4)+c.get(5)*c.get(5)+
c.get(6)*c.get(6));e.z=Math.sqrt(c.get(8)*c.get(8)+c.get(9)*c.get(9)+c.get(10)*c.get(10));0>c.get(0)*(c.get(5)*c.get(10)-c.get(6)*c.get(9))-c.get(1)*(c.get(4)*c.get(10)-c.get(6)*c.get(8))+c.get(2)*(c.get(4)*c.get(9)-c.get(5)*c.get(8))&&(e.z=-e.z);c.set(0,c.get(0)/e.x);c.set(1,c.get(1)/e.x);c.set(2,c.get(2)/e.x);c.set(4,c.get(4)/e.y);c.set(5,c.get(5)/e.y);c.set(6,c.get(6)/e.y);c.set(8,c.get(8)/e.z);c.set(9,c.get(9)/e.z);c.set(10,c.get(10)/e.z);var f=new Cd;switch(a){case 0:f.w=Math.acos((c.get(0)+
c.get(5)+c.get(10)-1)/2);a=Math.sqrt((c.get(6)-c.get(9))*(c.get(6)-c.get(9))+(c.get(8)-c.get(2))*(c.get(8)-c.get(2))+(c.get(1)-c.get(4))*(c.get(1)-c.get(4)));0!=a?(f.x=(c.get(6)-c.get(9))/a,f.y=(c.get(8)-c.get(2))/a,f.z=(c.get(1)-c.get(4))/a):f.x=f.y=f.z=0;break;case 1:f.y=Math.asin(-c.get(2));1!=c.get(2)&&-1!=c.get(2)?(f.x=Math.atan2(c.get(6),c.get(10)),f.z=Math.atan2(c.get(1),c.get(0))):(f.z=0,f.x=Math.atan2(c.get(4),c.get(5)));break;case 2:a=c.get(0)+c.get(5)+c.get(10),0<a?(f.w=Math.sqrt(1+a)/
2,f.x=(c.get(6)-c.get(9))/(4*f.w),f.y=(c.get(8)-c.get(2))/(4*f.w),f.z=(c.get(1)-c.get(4))/(4*f.w)):c.get(0)>c.get(5)&&c.get(0)>c.get(10)?(f.x=Math.sqrt(1+c.get(0)-c.get(5)-c.get(10))/2,f.w=(c.get(6)-c.get(9))/(4*f.x),f.y=(c.get(1)+c.get(4))/(4*f.x),f.z=(c.get(8)+c.get(2))/(4*f.x)):c.get(5)>c.get(10)?(f.y=Math.sqrt(1+c.get(5)-c.get(0)-c.get(10))/2,f.x=(c.get(1)+c.get(4))/(4*f.y),f.w=(c.get(8)-c.get(2))/(4*f.y),f.z=(c.get(6)+c.get(9))/(4*f.y)):(f.z=Math.sqrt(1+c.get(10)-c.get(0)-c.get(5))/2,f.x=(c.get(8)+
c.get(2))/(4*f.z),f.y=(c.get(6)+c.get(9))/(4*f.z),f.w=(c.get(1)-c.get(4))/(4*f.z))}b.push(d);b.push(f);b.push(e);return b},deltaTransformVector:function(a){var b=a.x,c=a.y;a=a.z;return new Cd(b*this.rawData.get(0)+c*this.rawData.get(4)+a*this.rawData.get(8),b*this.rawData.get(1)+c*this.rawData.get(5)+a*this.rawData.get(9),b*this.rawData.get(2)+c*this.rawData.get(6)+a*this.rawData.get(10),b*this.rawData.get(3)+c*this.rawData.get(7)+a*this.rawData.get(11))},identity:function(){this.rawData=Ua.toFloatVector(null,
null,null,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])},interpolateTo:function(a,b){for(var c=0;16>c;){var d=c++;this.rawData.set(d,this.rawData.get(d)+(a.rawData.get(d)-this.rawData.get(d))*b)}},invert:function(){var a=this.get_determinant(),b=1E-11<Math.abs(a);if(b){a=1/a;var c=this.rawData.get(0),d=this.rawData.get(4),e=this.rawData.get(8),f=this.rawData.get(12),g=this.rawData.get(1),k=this.rawData.get(5),l=this.rawData.get(9),m=this.rawData.get(13),p=this.rawData.get(2),n=this.rawData.get(6),h=this.rawData.get(10),
q=this.rawData.get(14),r=this.rawData.get(3),t=this.rawData.get(7),u=this.rawData.get(11),x=this.rawData.get(15);this.rawData.set(0,a*(k*(h*x-q*u)-l*(n*x-q*t)+m*(n*u-h*t)));this.rawData.set(1,-a*(g*(h*x-q*u)-l*(p*x-q*r)+m*(p*u-h*r)));this.rawData.set(2,a*(g*(n*x-q*t)-k*(p*x-q*r)+m*(p*t-n*r)));this.rawData.set(3,-a*(g*(n*u-h*t)-k*(p*u-h*r)+l*(p*t-n*r)));this.rawData.set(4,-a*(d*(h*x-q*u)-e*(n*x-q*t)+f*(n*u-h*t)));this.rawData.set(5,a*(c*(h*x-q*u)-e*(p*x-q*r)+f*(p*u-h*r)));this.rawData.set(6,-a*(c*
(n*x-q*t)-d*(p*x-q*r)+f*(p*t-n*r)));this.rawData.set(7,a*(c*(n*u-h*t)-d*(p*u-h*r)+e*(p*t-n*r)));this.rawData.set(8,a*(d*(l*x-m*u)-e*(k*x-m*t)+f*(k*u-l*t)));this.rawData.set(9,-a*(c*(l*x-m*u)-e*(g*x-m*r)+f*(g*u-l*r)));this.rawData.set(10,a*(c*(k*x-m*t)-d*(g*x-m*r)+f*(g*t-k*r)));this.rawData.set(11,-a*(c*(k*u-l*t)-d*(g*u-l*r)+e*(g*t-k*r)));this.rawData.set(12,-a*(d*(l*q-m*h)-e*(k*q-m*n)+f*(k*h-l*n)));this.rawData.set(13,a*(c*(l*q-m*h)-e*(g*q-m*p)+f*(g*h-l*p)));this.rawData.set(14,-a*(c*(k*q-m*n)-d*
(g*q-m*p)+f*(g*n-k*p)));this.rawData.set(15,a*(c*(k*h-l*n)-d*(g*h-l*p)+e*(g*n-k*p)))}return b},pointAt:function(a,b,c){null==b&&(b=new Cd(0,0,-1));null==c&&(c=new Cd(0,-1,0));b=b.subtract(a);c=c.clone();b.normalize();c.normalize();var d=b.clone();d.scaleBy(c.dotProduct(b));c=c.subtract(d);0<c.get_length()?c.normalize():c=0!=b.x?new Cd(-b.y,b.x,0):new Cd(1,0,0);d=c.crossProduct(b);d.normalize();this.rawData.set(0,d.x);this.rawData.set(4,d.y);this.rawData.set(8,d.z);this.rawData.set(12,0);this.rawData.set(1,
c.x);this.rawData.set(5,c.y);this.rawData.set(9,c.z);this.rawData.set(13,0);this.rawData.set(2,b.x);this.rawData.set(6,b.y);this.rawData.set(10,b.z);this.rawData.set(14,0);this.rawData.set(3,a.x);this.rawData.set(7,a.y);this.rawData.set(11,a.z);this.rawData.set(15,1)},prepend:function(a){var b=a.rawData.get(0),c=a.rawData.get(4),d=a.rawData.get(8),e=a.rawData.get(12),f=a.rawData.get(1),g=a.rawData.get(5),k=a.rawData.get(9),l=a.rawData.get(13),m=a.rawData.get(2),p=a.rawData.get(6),n=a.rawData.get(10),
h=a.rawData.get(14),q=a.rawData.get(3),r=a.rawData.get(7),t=a.rawData.get(11);a=a.rawData.get(15);var u=this.rawData.get(0),x=this.rawData.get(4),v=this.rawData.get(8),w=this.rawData.get(12),C=this.rawData.get(1),J=this.rawData.get(5),Q=this.rawData.get(9),F=this.rawData.get(13),B=this.rawData.get(2),D=this.rawData.get(6),A=this.rawData.get(10),E=this.rawData.get(14),G=this.rawData.get(3),H=this.rawData.get(7),I=this.rawData.get(11),y=this.rawData.get(15);this.rawData.set(0,b*u+f*x+m*v+q*w);this.rawData.set(1,
b*C+f*J+m*Q+q*F);this.rawData.set(2,b*B+f*D+m*A+q*E);this.rawData.set(3,b*G+f*H+m*I+q*y);this.rawData.set(4,c*u+g*x+p*v+r*w);this.rawData.set(5,c*C+g*J+p*Q+r*F);this.rawData.set(6,c*B+g*D+p*A+r*E);this.rawData.set(7,c*G+g*H+p*I+r*y);this.rawData.set(8,d*u+k*x+n*v+t*w);this.rawData.set(9,d*C+k*J+n*Q+t*F);this.rawData.set(10,d*B+k*D+n*A+t*E);this.rawData.set(11,d*G+k*H+n*I+t*y);this.rawData.set(12,e*u+l*x+h*v+a*w);this.rawData.set(13,e*C+l*J+h*Q+a*F);this.rawData.set(14,e*B+l*D+h*A+a*E);this.rawData.set(15,
e*G+l*H+h*I+a*y)},prependRotation:function(a,b,c){var d=0,e=d,f=e;null!=c&&(f=c.x,e=c.y,d=c.z);c=a*Math.PI/180;a=Math.cos(c);c=Math.sin(c);var g=b.x,k=b.y;b=b.z;var l=g*g,m=k*k,p=b*b,n=l+m+p;if(0!=n){var h=Math.sqrt(n);g/=h;k/=h;b/=h;l/=n;m/=n;p/=n}n=1-a;h=new ze;var q=h.rawData;q.set(0,l+(m+p)*a);q.set(1,g*k*n+b*c);q.set(2,g*b*n-k*c);q.set(4,g*k*n-b*c);q.set(5,m+(l+p)*a);q.set(6,k*b*n+g*c);q.set(8,g*b*n+k*c);q.set(9,k*b*n-g*c);q.set(10,p+(l+m)*a);q.set(12,(f*(m+p)-g*(e*k+d*b))*n+(e*b-d*k)*c);q.set(13,
(e*(l+p)-k*(f*g+d*b))*n+(d*g-f*b)*c);q.set(14,(d*(l+m)-b*(f*g+e*k))*n+(f*k-e*g)*c);this.prepend(h)},prependScale:function(a,b,c){this.prepend(new ze(Ua.toFloatVector(null,null,null,[a,0,0,0,0,b,0,0,0,0,c,0,0,0,0,1])))},prependTranslation:function(a,b,c){var d=new ze;d.set_position(new Cd(a,b,c));this.prepend(d)},recompose:function(a,b){null==b&&(b=1);if(3>a.get_length()||0==a.get(2).x||0==a.get(2).y||0==a.get(2).z)return!1;this.identity();var c=[];c[0]=c[1]=c[2]=a.get(2).x;c[4]=c[5]=c[6]=a.get(2).y;
c[8]=c[9]=c[10]=a.get(2).z;if(1==b){b=Math.cos(a.get(1).x);var d=Math.cos(a.get(1).y),e=Math.cos(a.get(1).z),f=Math.sin(a.get(1).x),g=Math.sin(a.get(1).y),k=Math.sin(a.get(1).z);this.rawData.set(0,d*e*c[0]);this.rawData.set(1,d*k*c[1]);this.rawData.set(2,-g*c[2]);this.rawData.set(3,0);this.rawData.set(4,(f*g*e-b*k)*c[4]);this.rawData.set(5,(f*g*k+b*e)*c[5]);this.rawData.set(6,f*d*c[6]);this.rawData.set(7,0);this.rawData.set(8,(b*g*e+f*k)*c[8]);this.rawData.set(9,(b*g*k-f*e)*c[9]);this.rawData.set(10,
b*d*c[10])}else d=a.get(1).x,e=a.get(1).y,f=a.get(1).z,g=a.get(1).w,0==b&&(d*=Math.sin(g/2),e*=Math.sin(g/2),f*=Math.sin(g/2),g=Math.cos(g/2)),this.rawData.set(0,(1-2*e*e-2*f*f)*c[0]),this.rawData.set(1,(2*d*e+2*g*f)*c[1]),this.rawData.set(2,(2*d*f-2*g*e)*c[2]),this.rawData.set(3,0),this.rawData.set(4,(2*d*e-2*g*f)*c[4]),this.rawData.set(5,(1-2*d*d-2*f*f)*c[5]),this.rawData.set(6,(2*e*f+2*g*d)*c[6]),this.rawData.set(7,0),this.rawData.set(8,(2*d*f+2*g*e)*c[8]),this.rawData.set(9,(2*e*f-2*g*d)*c[9]),
this.rawData.set(10,(1-2*d*d-2*e*e)*c[10]);this.rawData.set(11,0);this.rawData.set(12,a.get(0).x);this.rawData.set(13,a.get(0).y);this.rawData.set(14,a.get(0).z);this.rawData.set(15,1);0==a.get(2).x&&this.rawData.set(0,1E-15);0==a.get(2).y&&this.rawData.set(5,1E-15);0==a.get(2).z&&this.rawData.set(10,1E-15);return!(0==a.get(2).x||0==a.get(2).y||0==a.get(2).y)},transformVector:function(a){var b=a.x,c=a.y;a=a.z;return new Cd(b*this.rawData.get(0)+c*this.rawData.get(4)+a*this.rawData.get(8)+this.rawData.get(12),
b*this.rawData.get(1)+c*this.rawData.get(5)+a*this.rawData.get(9)+this.rawData.get(13),b*this.rawData.get(2)+c*this.rawData.get(6)+a*this.rawData.get(10)+this.rawData.get(14),b*this.rawData.get(3)+c*this.rawData.get(7)+a*this.rawData.get(11)+this.rawData.get(15))},transformVectors:function(a,b){for(var c=0,d,e,f;c+3<=a.get_length();)d=a.get(c),e=a.get(c+1),f=a.get(c+2),b.set(c,d*this.rawData.get(0)+e*this.rawData.get(4)+f*this.rawData.get(8)+this.rawData.get(12)),b.set(c+1,d*this.rawData.get(1)+e*
this.rawData.get(5)+f*this.rawData.get(9)+this.rawData.get(13)),b.set(c+2,d*this.rawData.get(2)+e*this.rawData.get(6)+f*this.rawData.get(10)+this.rawData.get(14)),c+=3},transpose:function(){var a=this.rawData.copy();this.rawData.set(1,a.get(4));this.rawData.set(2,a.get(8));this.rawData.set(3,a.get(12));this.rawData.set(4,a.get(1));this.rawData.set(6,a.get(9));this.rawData.set(7,a.get(13));this.rawData.set(8,a.get(2));this.rawData.set(9,a.get(6));this.rawData.set(11,a.get(14));this.rawData.set(12,
a.get(3));this.rawData.set(13,a.get(7));this.rawData.set(14,a.get(11))},get_determinant:function(){return(this.rawData.get(0)*this.rawData.get(5)-this.rawData.get(4)*this.rawData.get(1))*(this.rawData.get(10)*this.rawData.get(15)-this.rawData.get(14)*this.rawData.get(11))-(this.rawData.get(0)*this.rawData.get(9)-this.rawData.get(8)*this.rawData.get(1))*(this.rawData.get(6)*this.rawData.get(15)-this.rawData.get(14)*this.rawData.get(7))+(this.rawData.get(0)*this.rawData.get(13)-this.rawData.get(12)*
this.rawData.get(1))*(this.rawData.get(6)*this.rawData.get(11)-this.rawData.get(10)*this.rawData.get(7))+(this.rawData.get(4)*this.rawData.get(9)-this.rawData.get(8)*this.rawData.get(5))*(this.rawData.get(2)*this.rawData.get(15)-this.rawData.get(14)*this.rawData.get(3))-(this.rawData.get(4)*this.rawData.get(13)-this.rawData.get(12)*this.rawData.get(5))*(this.rawData.get(2)*this.rawData.get(11)-this.rawData.get(10)*this.rawData.get(3))+(this.rawData.get(8)*this.rawData.get(13)-this.rawData.get(12)*
this.rawData.get(9))*(this.rawData.get(2)*this.rawData.get(7)-this.rawData.get(6)*this.rawData.get(3))},get_position:function(){return new Cd(this.rawData.get(12),this.rawData.get(13),this.rawData.get(14))},set_position:function(a){this.rawData.set(12,a.x);this.rawData.set(13,a.y);this.rawData.set(14,a.z);return a},__class__:ze,__properties__:{set_position:"set_position",get_position:"get_position",get_determinant:"get_determinant"}};var Jl={};h["openfl.geom._Orientation3D.Orientation3D_Impl_"]=Jl;
Jl.__name__="openfl.geom._Orientation3D.Orientation3D_Impl_";Jl.fromString=function(a){switch(a){case "axisAngle":return 0;case "eulerAngles":return 1;case "quaternion":return 2;default:return null}};Jl.toString=function(a){switch(a){case 0:return"axisAngle";case 1:return"eulerAngles";case 2:return"quaternion";default:return null}};var bm=function(a){this.__colorTransform=new Sb;this.concatenatedColorTransform=new Sb;this.pixelBounds=new ia;this.__displayObject=a;this.__hasMatrix=!0};h["openfl.geom.Transform"]=
bm;bm.__name__="openfl.geom.Transform";bm.prototype={concatenatedColorTransform:null,pixelBounds:null,__colorTransform:null,__displayObject:null,__hasMatrix:null,__hasMatrix3D:null,get_colorTransform:function(){return this.__colorTransform},set_colorTransform:function(a){this.__colorTransform.__equals(a,!1)||(this.__colorTransform.__copyFrom(a),null!=a&&this.__displayObject.set_alpha(a.alphaMultiplier),a=this.__displayObject,a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty()));return this.__colorTransform},
get_concatenatedMatrix:function(){return this.__hasMatrix?this.__displayObject.__getWorldTransform().clone():null},get_matrix:function(){return this.__hasMatrix?this.__displayObject.__transform.clone():null},set_matrix:function(a){if(null==a)return this.__hasMatrix=!1,null;this.__hasMatrix=!0;this.__hasMatrix3D=!1;null!=this.__displayObject&&this.__setTransform(a.a,a.b,a.c,a.d,a.tx,a.ty);return a},get_matrix3D:function(){if(this.__hasMatrix3D){var a=this.__displayObject.__transform;return new ze(Ua.toFloatVector(null,
null,null,[a.a,a.b,0,0,a.c,a.d,0,0,0,0,1,0,a.tx,a.ty,0,1]))}return null},set_matrix3D:function(a){if(null==a)return this.__hasMatrix3D=!1,null;this.__hasMatrix=!1;this.__hasMatrix3D=!0;this.__setTransform(a.rawData.get(0),a.rawData.get(1),a.rawData.get(5),a.rawData.get(6),a.rawData.get(12),a.rawData.get(13));return a},__setTransform:function(a,b,c,d,e,f){if(null!=this.__displayObject){var g=0==b?a:Math.sqrt(a*a+b*b);var k=0==c?d:Math.sqrt(c*c+d*d);this.__displayObject.__scaleX=g;this.__displayObject.__scaleY=
k;g=180/Math.PI*Math.atan2(d,c)-90;g!=this.__displayObject.__rotation&&(this.__displayObject.__rotation=g,g*=Math.PI/180,this.__displayObject.__rotationSine=Math.sin(g),this.__displayObject.__rotationCosine=Math.cos(g));this.__displayObject.__transform.a=a;this.__displayObject.__transform.b=b;this.__displayObject.__transform.c=c;this.__displayObject.__transform.d=d;this.__displayObject.__transform.tx=e;this.__displayObject.__transform.ty=f;this.__displayObject.__setTransformDirty()}},__class__:bm,
__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 Cd=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};h["openfl.geom.Vector3D"]=Cd;Cd.__name__="openfl.geom.Vector3D";Cd.__properties__={get_Z_AXIS:"get_Z_AXIS",get_Y_AXIS:"get_Y_AXIS",
get_X_AXIS:"get_X_AXIS"};Cd.angleBetween=function(a,b){var c=a.get_length(),d=b.get_length();a=a.dotProduct(b);0!=c&&(a/=c);0!=d&&(a/=d);return Math.acos(a)};Cd.distance=function(a,b){var c=b.x-a.x,d=b.y-a.y;a=b.z-a.z;return Math.sqrt(c*c+d*d+a*a)};Cd.get_X_AXIS=function(){return new Cd(1,0,0)};Cd.get_Y_AXIS=function(){return new Cd(0,1,0)};Cd.get_Z_AXIS=function(){return new Cd(0,0,1)};Cd.prototype={w:null,x:null,y:null,z:null,add:function(a){return new Cd(this.x+a.x,this.y+a.y,this.z+a.z)},clone:function(){return new Cd(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 Cd(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:!0:!1},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:!0:!1},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 Cd(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__:Cd,__properties__:{get_lengthSquared:"get_lengthSquared",get_length:"get_length"}};var Er=function(){};h["openfl.media.ID3Info"]=Er;Er.__name__="openfl.media.ID3Info";Er.prototype={album:null,artist:null,comment:null,genre:null,songName:null,track:null,year:null,
__class__:Er};var Yf=function(a,b){A.call(this,this);this.bytesTotal=this.bytesLoaded=0;this.isBuffering=!1;this.url=null;null!=a&&this.load(a,b)};h["openfl.media.Sound"]=Yf;Yf.__name__="openfl.media.Sound";Yf.fromAudioBuffer=function(a){var b=new Yf;b.__buffer=a;return b};Yf.fromFile=function(a){return Yf.fromAudioBuffer(ad.fromFile(a))};Yf.loadFromFile=function(a){return ad.loadFromFile(a).then(function(a){return xb.withValue(Yf.fromAudioBuffer(a))})};Yf.loadFromFiles=function(a){return ad.loadFromFiles(a).then(function(a){return xb.withValue(Yf.fromAudioBuffer(a))})};
Yf.__super__=A;Yf.prototype=w(A.prototype,{bytesLoaded:null,bytesTotal:null,isBuffering:null,url:null,__buffer:null,close:function(){null!=this.__buffer&&(this.__buffer.dispose(),this.__buffer=null)},load:function(a,b){var c=this;this.url=a.url;a=ta.getLibrary("default");if(null!=a){b=this.url;var d=a.cachedAudioBuffers;b=null!=q[b]?d.existsReserved(b):d.h.hasOwnProperty(b)}else b=!1;if(b)b=this.url,a=a.cachedAudioBuffers,this.AudioBuffer_onURLLoad(null!=q[b]?a.getReserved(b):a.h[b]);else ad.loadFromFile(this.url).onComplete(v(this,
this.AudioBuffer_onURLLoad)).onError(function(a){c.AudioBuffer_onURLLoad(null)})},loadCompressedDataFromByteArray:function(a,b){if(null==a||0>=b)this.dispatchEvent(new Xf("ioError"));else{if(Da.gt(a.position,0)||Da.gt(za.get_length(a),b)){var c=b;null==c&&(c=0);c=new vc(c);var d=a.position;null==b&&(b=0);null==d&&(d=0);c.writeBytes(a,d,b);a=c}this.__buffer=ad.fromBytes(za.toBytes(a));null==this.__buffer?this.dispatchEvent(new Xf("ioError")):this.dispatchEvent(new da("complete"))}},loadPCMFromByteArray:function(a,
b,c,d,e){null==e&&(e=44100);null==d&&(d=!0);null==c&&(c="float");if(null==a)this.dispatchEvent(new Xf("ioError"));else{c="float"==c?32:16;d=d?2:1;b=c/8*d*b|0;if(Da.gt(a.position,0)||Da.gt(za.get_length(a),b)){var f=b;null==f&&(f=0);f=new vc(f);var g=a.position;null==b&&(b=0);null==g&&(g=0);f.writeBytes(a,g,b);a=f}b=new ad;b.bitsPerSample=c;b.channels=d;a=za.toArrayBuffer(a);a=null!=a?new Uint8Array(a,0):null;b.data=a;b.sampleRate=e|0;this.__buffer=b;this.dispatchEvent(new da("complete"))}},play:function(a,
b,c){null==b&&(b=0);null==a&&(a=0);if(null==this.__buffer||32<=te.__soundChannels.length)return null;c=null==c?new Tf:c.clone();var d=te.__soundTransform.pan+c.pan;1<d&&(d=1);-1>d&&(d=-1);var e=te.__soundTransform.volume*c.volume,f=new jl(this.__buffer);f.offset=a|0;1<b&&f.set_loops(b-1);f.set_gain(e);a=f.get_position();a.x=d;a.z=-1*Math.sqrt(1-Math.pow(d,2));f.set_position(a);return new sp(f,c)},get_id3:function(){return new Er},get_length:function(){return null!=this.__buffer?1E3*this.__buffer.get_src().duration()|
0:0},AudioBuffer_onURLLoad:function(a){null==a?this.dispatchEvent(new Xf("ioError")):(this.__buffer=a,this.dispatchEvent(new da("complete")))},__class__:Yf,__properties__:{get_length:"get_length",get_id3:"get_id3"}});var sp=function(a,b){A.call(this,this);this.rightPeak=this.leftPeak=1;this.__soundTransform=null!=b?b:new Tf;null!=a&&(this.__source=a,this.__source.onComplete.add(v(this,this.source_onComplete)),this.__isValid=!0,this.__source.play());te.__registerSoundChannel(this)};h["openfl.media.SoundChannel"]=
sp;sp.__name__="openfl.media.SoundChannel";sp.__super__=A;sp.prototype=w(A.prototype,{leftPeak:null,rightPeak:null,__isValid:null,__soundTransform:null,__source:null,stop:function(){te.__unregisterSoundChannel(this);this.__isValid&&(this.__source.stop(),this.__dispose())},__dispose:function(){this.__isValid&&(this.__source.onComplete.remove(v(this,this.source_onComplete)),this.__source.dispose(),this.__source=null,this.__isValid=!1)},__updateTransform:function(){this.set_soundTransform(this.get_soundTransform())},
get_position:function(){return this.__isValid?this.__source.get_currentTime()+this.__source.offset:0},set_position:function(a){if(!this.__isValid)return 0;this.__source.set_currentTime((a|0)-this.__source.offset);return a},get_soundTransform:function(){return this.__soundTransform.clone()},set_soundTransform:function(a){if(null!=a){this.__soundTransform.pan=a.pan;this.__soundTransform.volume=a.volume;var b=te.__soundTransform.pan+this.__soundTransform.pan;-1>b&&(b=-1);1<b&&(b=1);var c=te.__soundTransform.volume*
this.__soundTransform.volume;this.__isValid&&(this.__source.set_gain(c),c=this.__source.get_position(),c.x=b,c.z=-1*Math.sqrt(1-Math.pow(b,2)),this.__source.set_position(c))}return a},source_onComplete:function(){te.__unregisterSoundChannel(this);this.__dispose();this.dispatchEvent(new da("soundComplete"))},__class__:sp,__properties__:{set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform",set_position:"set_position",get_position:"get_position"}});var Nt=function(a,b){null==
b&&(b=!1);null==a&&(a=1E3);this.bufferTime=a;this.checkPolicyFile=b};h["openfl.media.SoundLoaderContext"]=Nt;Nt.__name__="openfl.media.SoundLoaderContext";Nt.prototype={bufferTime:null,checkPolicyFile:null,__class__:Nt};var te=function(){};h["openfl.media.SoundMixer"]=te;te.__name__="openfl.media.SoundMixer";te.__properties__={set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform"};te.areSoundsInaccessible=function(){return!1};te.stopAll=function(){for(var a=0,b=te.__soundChannels;a<
b.length;){var c=b[a];++a;c.stop()}};te.__registerSoundChannel=function(a){te.__soundChannels.push(a)};te.__unregisterSoundChannel=function(a){B.remove(te.__soundChannels,a)};te.get_soundTransform=function(){return te.__soundTransform};te.set_soundTransform=function(a){te.__soundTransform=a.clone();for(var b=0,c=te.__soundChannels;b<c.length;){var d=c[b];++b;d.__updateTransform()}return a};var tp=function(a,b){null==b&&(b=240);null==a&&(a=320);sa.call(this);this.__type=Ph.VIDEO;this.__width=a;this.__height=
b;this.__textureTime=-1;this.smoothing=!1;this.deblocking=0};h["openfl.media.Video"]=tp;tp.__name__="openfl.media.Video";tp.__super__=sa;tp.prototype=w(sa.prototype,{deblocking:null,smoothing:null,__active:null,__buffer:null,__bufferAlpha:null,__bufferColorTransform:null,__bufferContext:null,__bufferData:null,__dirty:null,__height:null,__indexBuffer:null,__indexBufferContext:null,__indexBufferData:null,__stream:null,__texture:null,__textureTime:null,__uvRect:null,__vertexBuffer:null,__vertexBufferContext:null,
__vertexBufferData:null,__width:null,attachNetStream:function(a){this.__stream=a;null==this.__stream||null==this.__stream.__video||this.__stream.__closed||this.__stream.__video.play()},clear:function(){},__enterFrame:function(a){this.__renderable&&null!=this.__stream&&!this.__renderDirty&&(this.__renderDirty=!0,this.__setParentRenderDirty())},__getBounds:function(a,b){var c=ia.__pool.get();c.setTo(0,0,this.__width,this.__height);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);ia.__pool.release(c)},
__getIndexBuffer:function(a){if(null==this.__indexBuffer||this.__indexBufferContext!=a.__context)this.__indexBufferData=new Uint16Array(6),this.__indexBufferData[0]=0,this.__indexBufferData[1]=1,this.__indexBufferData[2]=2,this.__indexBufferData[3]=2,this.__indexBufferData[4]=1,this.__indexBufferData[5]=3,this.__indexBufferContext=a.__context,this.__indexBuffer=a.createIndexBuffer(6),this.__indexBuffer.uploadFromTypedArray(this.__indexBufferData);return this.__indexBuffer},__getTexture:function(a){if(null==
this.__stream||null==this.__stream.__video)return null;var b=a.__context.webgl,c=b.RGBA,d=b.RGBA;this.__stream.__closed||this.__stream.__video.currentTime==this.__textureTime||(null==this.__texture&&(this.__texture=a.createRectangleTexture(this.__stream.__video.videoWidth,this.__stream.__video.videoHeight,1,!1)),a.__bindGLTexture2D(this.__texture.__textureID),Ab.texImage2D(b,b.TEXTURE_2D,0,c,d,b.UNSIGNED_BYTE,this.__stream.__video),this.__textureTime=this.__stream.__video.currentTime);return this.__texture},
__getVertexBuffer:function(a){if(null==this.__vertexBuffer||this.__vertexBufferContext!=a.__context)this.__vertexBufferData=new Float32Array(20),this.__vertexBufferData[0]=this.get_width(),this.__vertexBufferData[1]=this.get_height(),this.__vertexBufferData[3]=1,this.__vertexBufferData[4]=1,this.__vertexBufferData[6]=this.get_height(),this.__vertexBufferData[9]=1,this.__vertexBufferData[10]=this.get_width(),this.__vertexBufferData[13]=1,this.__vertexBufferContext=a.__context,this.__vertexBuffer=a.createVertexBuffer(3,
5),this.__vertexBuffer.uploadFromTypedArray(this.__vertexBufferData);return this.__vertexBuffer},__hitTest:function(a,b,c,d,e,f){if(!f.get_visible()||this.__isMask||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b))return!1;this.__getRenderTransform();c=this.__renderTransform;var g=c.a*c.d-c.b*c.c;c=0==g?-c.tx:1/g*(c.c*(c.ty-b)+c.d*(a-c.tx));g=this.__renderTransform;var k=g.a*g.d-g.b*g.c;a=0==k?-g.ty:1/k*(g.a*(b-g.ty)+g.b*(g.tx-a));return 0<c&&0<a&&c<=this.__width&&a<=this.__height?(null==
d||e||d.push(f),!0):!1},__hitTestMask:function(a,b){var c=pa.__pool.get();c.setTo(a,b);this.__globalToLocal(c,c);a=0<c.x&&0<c.y&&c.x<=this.__width&&c.y<=this.__height;pa.__pool.release(c);return a},get_height:function(){return this.__height*this.get_scaleY()},set_height:function(a){if(1!=this.get_scaleY()||a!=this.__height)this.__setTransformDirty(),this.__dirty=!0;this.set_scaleY(1);return this.__height=a},get_videoHeight:function(){return null!=this.__stream&&null!=this.__stream.__video?this.__stream.__video.videoHeight|
0:0},get_videoWidth:function(){return null!=this.__stream&&null!=this.__stream.__video?this.__stream.__video.videoWidth|0:0},get_width:function(){return this.__width*this.__scaleX},set_width:function(a){if(1!=this.__scaleX||this.__width!=a)this.__setTransformDirty(),this.__dirty=!0;this.set_scaleX(1);return this.__width=a},__class__:tp,__properties__:w(sa.prototype.__properties__,{get_videoWidth:"get_videoWidth",get_videoHeight:"get_videoHeight"})});var Kl=function(){A.call(this)};h["openfl.net.NetConnection"]=
Kl;Kl.__name__="openfl.net.NetConnection";Kl.__super__=A;Kl.prototype=w(A.prototype,{connect:function(a,b,c,d,e,f){if(null!=a)throw new E('Error: Can only connect in "HTTP streaming" mode');this.dispatchEvent(new Mf("netStatus",!1,!0,{code:"NetConnection.Connect.Success"}))},__class__:Kl});var up=function(a,b){A.call(this);this.__connection=a;this.__video=window.document.createElement("video");this.__video.setAttribute("playsinline","");this.__video.setAttribute("webkit-playsinline","");this.__video.setAttribute("crossorigin",
"anonymous");this.__video.addEventListener("error",v(this,this.video_onError),!1);this.__video.addEventListener("waiting",v(this,this.video_onWaiting),!1);this.__video.addEventListener("ended",v(this,this.video_onEnd),!1);this.__video.addEventListener("pause",v(this,this.video_onPause),!1);this.__video.addEventListener("seeking",v(this,this.video_onSeeking),!1);this.__video.addEventListener("playing",v(this,this.video_onPlaying),!1);this.__video.addEventListener("timeupdate",v(this,this.video_onTimeUpdate),
!1);this.__video.addEventListener("loadstart",v(this,this.video_onLoadStart),!1);this.__video.addEventListener("stalled",v(this,this.video_onStalled),!1);this.__video.addEventListener("durationchanged",v(this,this.video_onDurationChanged),!1);this.__video.addEventListener("canplay",v(this,this.video_onCanPlay),!1);this.__video.addEventListener("canplaythrough",v(this,this.video_onCanPlayThrough),!1);this.__video.addEventListener("loadedmetadata",v(this,this.video_onLoadMetaData),!1)};h["openfl.net.NetStream"]=
up;up.__name__="openfl.net.NetStream";up.__super__=A;up.prototype=w(A.prototype,{audioCodec:null,bufferLength:null,bufferTime:null,bytesLoaded:null,bytesTotal:null,checkPolicyFile:null,client:null,currentFPS:null,decodedFrames:null,liveDelay:null,objectEncoding:null,soundTransform:null,time:null,videoCode:null,__closed:null,__connection:null,__timer:null,__seeking:null,__video:null,close:function(){null!=this.__video&&(this.__closed=!0,this.__video.pause(),this.__video.src="",this.time=0)},dispose:function(){this.close();
this.__video=null},pause:function(){null!=this.__video&&this.__video.pause()},play:function(a,b,c,d,e,f){null!=this.__video&&(this.__video.src=a,this.__video.play())},requestVideoStatus:function(){var a=this;null!=this.__video&&(null==this.__timer&&(this.__timer=new pf(1)),this.__timer.run=function(){a.__video.paused?a.__playStatus("NetStream.Play.pause"):a.__playStatus("NetStream.Play.playing");a.__timer.stop()})},resume:function(){null!=this.__video&&this.__video.play()},seek:function(a){null!=
this.__video&&(0>a?a=0:a>this.__video.duration&&(a=this.__video.duration),this.set___seeking(!0),this.__connection.dispatchEvent(new Mf("netStatus",!1,!1,{code:"NetStream.SeekStart.Notify"})),this.__video.currentTime=a)},togglePause:function(){null!=this.__video&&(this.__video.paused?this.__video.play():this.__video.pause())},__playStatus:function(a){if(null!=this.__video&&null!=this.client)try{var b=this.client.onPlayStatus;b({code:a,duration:this.__video.duration,position:this.__video.currentTime,
speed:this.__video.playbackRate,start:this.__video.startTime})}catch(c){ra.lastException=c}},video_onCanPlay:function(a){this.__playStatus("NetStream.Play.canplay")},video_onCanPlayThrough:function(a){this.__playStatus("NetStream.Play.canplaythrough")},video_onDurationChanged:function(a){this.__playStatus("NetStream.Play.durationchanged")},video_onEnd:function(a){this.__connection.dispatchEvent(new Mf("netStatus",!1,!1,{code:"NetStream.Play.Stop"}));this.__connection.dispatchEvent(new Mf("netStatus",
!1,!1,{code:"NetStream.Play.Complete"}));this.__playStatus("NetStream.Play.Complete")},video_onError:function(a){this.__connection.dispatchEvent(new Mf("netStatus",!1,!1,{code:"NetStream.Play.Stop"}));this.__playStatus("NetStream.Play.error")},video_onLoadMetaData:function(a){if(null!=this.__video&&null!=this.client)try{var b=this.client.onMetaData;b({width:this.__video.videoWidth,height:this.__video.videoHeight,duration:this.__video.duration})}catch(c){ra.lastException=c}},video_onLoadStart:function(a){this.__playStatus("NetStream.Play.loadstart")},
video_onPause:function(a){this.__playStatus("NetStream.Play.pause")},video_onPlaying:function(a){this.__connection.dispatchEvent(new Mf("netStatus",!1,!1,{code:"NetStream.Play.Start"}));this.__playStatus("NetStream.Play.playing")},video_onSeeking:function(a){this.__playStatus("NetStream.Play.seeking");this.__connection.dispatchEvent(new Mf("netStatus",!1,!1,{code:"NetStream.Seek.Complete"}))},video_onStalled:function(a){this.__playStatus("NetStream.Play.stalled")},video_onTimeUpdate:function(a){null!=
this.__video&&(this.time=this.__video.currentTime,this.__playStatus("NetStream.Play.timeupdate"))},video_onWaiting:function(a){this.__playStatus("NetStream.Play.waiting")},get_speed:function(){return null!=this.__video?this.__video.playbackRate:1},set_speed:function(a){return null!=this.__video?this.__video.playbackRate=a:a},get___seeking:function(){return this.__seeking?!0:this.__video.seeking},set___seeking:function(a){return this.__seeking=a},__class__:up,__properties__:{set___seeking:"set___seeking",
get___seeking:"get___seeking",set_speed:"set_speed",get_speed:"get_speed"}});var Mc=function(){A.call(this);this.client=this;this.objectEncoding=Mc.defaultObjectEncoding};h["openfl.net.SharedObject"]=Mc;Mc.__name__="openfl.net.SharedObject";Mc.getLocal=function(a,b,c){c=" ~%&\\;:\"',<>?#".split("");var d=!0;if(null==a||""==a)d=!1;else for(var e=0;e<c.length;){var f=c[e];++e;if(-1<a.indexOf(f)){d=!1;break}}if(!d)throw new E(new hd("Error #2134: Cannot create SharedObject."));null==Mc.__sharedObjects&&
(Mc.__sharedObjects=new ua,null!=bf.current&&bf.current.onExit.add(Mc.application_onExit));c=b+"/"+a;d=Mc.__sharedObjects;if(null!=q[c]?!d.existsReserved(c):!d.h.hasOwnProperty(c)){d=null;try{var g=Xn.getLocalStorage();null==b&&(null!=g&&(d=g.getItem(window.location.href+":"+a),g.removeItem(window.location.href+":"+a)),b=window.location.pathname);null!=g&&null==d&&(d=g.getItem(b+":"+a))}catch(l){ra.lastException=l}g=new Mc;g.data={};g.__localPath=b;g.__name=a;if(null!=d&&""!=d)try{var k=new af(d);
k.setResolver({resolveEnum:rb.resolveEnum,resolveClass:Mc.__resolveClass});g.data=k.unserialize()}catch(l){ra.lastException=l}a=Mc.__sharedObjects;null!=q[c]?a.setReserved(c,g):a.h[c]=g}a=Mc.__sharedObjects;return null!=q[c]?a.getReserved(c):a.h[c]};Mc.getRemote=function(a,b,c,d){Xc.notImplemented({fileName:"openfl/net/SharedObject.hx",lineNumber:808,className:"openfl.net.SharedObject",methodName:"getRemote"});return null};Mc.__getPath=function(a,b){a=Ra.get_applicationStorageDirectory()+"/"+a+"/";
b=ba.replace(b,"//","/");b=ba.replace(b,"//","/");ba.startsWith(b,"/")&&(b=B.substr(b,1,null));ba.endsWith(b,"/")&&(b=b.substring(0,b.length-1));if(-1<b.indexOf("/")){var c=b.split("/");b="";for(var d=0,e=c.length-1;d<e;){var f=d++;b+="#"+c[f]+"/"}b+=c[c.length-1]}return a+b+".sol"};Mc.__mkdir=function(a){};Mc.__resolveClass=function(a){return null!=a?(ba.startsWith(a,"neash.")&&(a=ba.replace(a,"neash.","openfl.")),ba.startsWith(a,"native.")&&(a=ba.replace(a,"native.","openfl.")),ba.startsWith(a,
"flash.")&&(a=ba.replace(a,"flash.","openfl.")),ba.startsWith(a,"openfl._v2.")&&(a=ba.replace(a,"openfl._v2.","openfl.")),ba.startsWith(a,"openfl._legacy.")&&(a=ba.replace(a,"openfl._legacy.","openfl.")),h[a]):null};Mc.application_onExit=function(a){a=Mc.__sharedObjects;for(a=new Pe(a,a.arrayKeys());a.hasNext();)a.next().flush()};Mc.__super__=A;Mc.prototype=w(A.prototype,{client:null,data:null,fps:null,objectEncoding:null,__localPath:null,__name:null,clear:function(){this.data={};try{var a=Xn.getLocalStorage();
null!=a&&a.removeItem(this.__localPath+":"+this.__name)}catch(b){ra.lastException=b}},close:function(){},connect:function(a,b){Xc.notImplemented({fileName:"openfl/net/SharedObject.hx",lineNumber:392,className:"openfl.net.SharedObject",methodName:"connect"})},flush:function(a){if(0==X.fields(this.data).length)return 0;a=Id.run(this.data);try{var b=Xn.getLocalStorage();null!=b&&(b.removeItem(this.__localPath+":"+this.__name),b.setItem(this.__localPath+":"+this.__name,a))}catch(c){return ra.lastException=
c,1}return 0},send:function(a){Xc.notImplemented({fileName:"openfl/net/SharedObject.hx",lineNumber:824,className:"openfl.net.SharedObject",methodName:"send"})},setDirty:function(a){},setProperty:function(a,b){null!=this.data&&(this.data[a]=b)},get_size:function(){try{var a=Id.run(this.data);return hb.ofString(a).length}catch(b){return ra.lastException=b,0}},__class__:Mc,__properties__:{get_size:"get_size"}});var vp={};h["openfl.net._SharedObjectFlushStatus.SharedObjectFlushStatus_Impl_"]=vp;vp.__name__=
"openfl.net._SharedObjectFlushStatus.SharedObjectFlushStatus_Impl_";vp.fromString=function(a){switch(a){case "flushed":return 0;case "pending":return 1;default:return null}};vp.toString=function(a){switch(a){case 0:return"flushed";case 1:return"pending";default:return null}};var Zg=function(a){A.call(this);this.bytesTotal=this.bytesLoaded=0;this.dataFormat=1;null!=a&&this.load(a)};h["openfl.net.URLLoader"]=Zg;Zg.__name__="openfl.net.URLLoader";Zg.__super__=A;Zg.prototype=w(A.prototype,{bytesLoaded:null,
bytesTotal:null,data:null,dataFormat:null,__httpRequest:null,close:function(){null!=this.__httpRequest&&this.__httpRequest.cancel()},load:function(a){var b=this;if(0==this.dataFormat){var c=new oo;this.__prepareRequest(c,a);c.load().onProgress(v(this,this.httpRequest_onProgress)).onError(v(this,this.httpRequest_onError)).onComplete(function(a){b.__dispatchStatus();b.data=a;a=new da("complete");b.dispatchEvent(a)})}else c=new kl,this.__prepareRequest(c,a),c.load().onProgress(v(this,this.httpRequest_onProgress)).onError(v(this,
this.httpRequest_onError)).onComplete(function(a){b.__dispatchStatus();b.data=a;a=new da("complete");b.dispatchEvent(a)})},__dispatchStatus:function(){var a=new Nh("httpStatus",!1,!1,this.__httpRequest.responseStatus);a.responseURL=this.__httpRequest.uri;var b=[];if(this.__httpRequest.enableResponseHeaders&&null!=this.__httpRequest.responseHeaders)for(var c=0,d=this.__httpRequest.responseHeaders;c<d.length;){var e=d[c];++c;b.push(new Fr(e.name,e.value))}a.responseHeaders=b;this.dispatchEvent(a)},
__prepareRequest:function(a,b){this.__httpRequest=a;this.__httpRequest.uri=b.url;this.__httpRequest.method=b.method;if(null!=b.data)if(rb.typeof(b.data)==Dd.TObject){a=X.fields(b.data);for(var c=0;c<a.length;){var d=a[c];++c;var e=this.__httpRequest.formData,f=X.field(b.data,d);null!=q[d]?e.setReserved(d,f):e.h[d]=f}}else this.__httpRequest.data=b.data instanceof hb?b.data:hb.ofString(K.string(b.data));this.__httpRequest.contentType=b.contentType;if(null!=b.requestHeaders)for(a=0,c=b.requestHeaders;a<
c.length;)d=c[a],++a,this.__httpRequest.headers.push(new Yn(d.name,d.value));this.__httpRequest.followRedirects=b.followRedirects;this.__httpRequest.timeout=b.idleTimeout|0;this.__httpRequest.withCredentials=b.manageCookies;this.__httpRequest.userAgent=b.userAgent;this.__httpRequest.enableResponseHeaders=!0},httpRequest_onError:function(a){this.__dispatchStatus();var b=403==a?new xi("securityError"):new Xf("ioError");b.text=K.string(a);this.dispatchEvent(b)},httpRequest_onProgress:function(a,b){var c=
new zg("progress");c.bytesLoaded=a;c.bytesTotal=b;this.dispatchEvent(c)},__class__:Zg});var Ll={};h["openfl.net._URLLoaderDataFormat.URLLoaderDataFormat_Impl_"]=Ll;Ll.__name__="openfl.net._URLLoaderDataFormat.URLLoaderDataFormat_Impl_";Ll.fromString=function(a){switch(a){case "binary":return 0;case "text":return 1;case "variables":return 2;default:return null}};Ll.toString=function(a){switch(a){case 0:return"binary";case 1:return"text";case 2:return"variables";default:return null}};var Jg=function(a){null!=
a&&(this.url=a);this.contentType=null;this.followRedirects=yi.followRedirects;this.idleTimeout=0<yi.idleTimeout?yi.idleTimeout:3E4;this.manageCookies=yi.manageCookies;this.method="GET";this.requestHeaders=[];this.userAgent=yi.userAgent};h["openfl.net.URLRequest"]=Jg;Jg.__name__="openfl.net.URLRequest";Jg.prototype={contentType:null,data:null,followRedirects:null,idleTimeout:null,manageCookies:null,method:null,requestHeaders:null,url:null,userAgent:null,__class__:Jg};var yi=function(){};h["openfl.net.URLRequestDefaults"]=
yi;yi.__name__="openfl.net.URLRequestDefaults";var Fr=function(a,b){null==b&&(b="");null==a&&(a="");this.name=a;this.value=b};h["openfl.net.URLRequestHeader"]=Fr;Fr.__name__="openfl.net.URLRequestHeader";Fr.prototype={name:null,value:null,__class__:Fr};var Wk={};h["openfl.net._URLVariables.URLVariables_Impl_"]=Wk;Wk.__name__="openfl.net._URLVariables.URLVariables_Impl_";Wk._new=function(a){var b={};null!=a&&Wk.decode(b,a);return b};Wk.decode=function(a,b){for(var c=X.fields(a),d=0;d<c.length;){var e=
c[d];++d;X.deleteField(a,e)}b=b.split(";").join("&").split("&");for(c=0;c<b.length;)if(d=b[c],++c,e=d.indexOf("="),0<e){var f=B.substr(d,0,e);f=decodeURIComponent(f.split("+").join(" "));d=B.substr(d,e+1,null);a[f]=decodeURIComponent(d.split("+").join(" "))}else 0!=e&&(a[decodeURIComponent(d.split("+").join(" "))]="")};Wk.toString=function(a){for(var b=[],c=X.fields(a),d=0;d<c.length;){var e=c[d];++d;var f=X.field(a,e);if(-1<e.indexOf("[]")&&f instanceof Array){var g=[];for(f=O(f);f.hasNext();){var k=
f.next();g.push(encodeURIComponent(k))}g=g.join("&amp;"+e+"=");b.push(encodeURIComponent(e)+"="+g)}else b.push(encodeURIComponent(e)+"="+encodeURIComponent(f))}return b.join("&")};var gk=function(a){this.parentDomain=null!=a?a:gk.currentDomain};h["openfl.system.ApplicationDomain"]=gk;gk.__name__="openfl.system.ApplicationDomain";gk.prototype={parentDomain:null,getDefinition:function(a){return h[a]},hasDefinition:function(a){return null!=h[a]},__class__:gk};var qc=function(){};h["openfl.system.Capabilities"]=
qc;qc.__name__="openfl.system.Capabilities";qc.__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_manufacturer:"get_manufacturer",get_language:"get_language",get_cpuArchitecture:"get_cpuArchitecture"};qc.hasMultiChannelAudio=function(a){return!1};qc.get_cpuArchitecture=function(){return"x86"};qc.get_language=function(){var a=
Bd.get_language(Bd.get_currentLocale());if(null!=a)switch(a=a.toLowerCase(),a){case "cs":case "da":case "de":case "en":case "es":case "fi":case "fr":case "hu":case "it":case "ja":case "ko":case "nb":case "nl":case "pl":case "pt":case "ru":case "sv":case "tr":return a;case "zh":a=Bd.get_region(Bd.get_currentLocale());if(null!=a)switch(a.toUpperCase()){case "HANT":case "TW":return"zh-TW"}return"zh-CN";default:return"xu"}return"en"};qc.get_manufacturer=function(){var a=Ra.get_platformName();return"OpenFL"+
(null!=a?" "+a:"")};qc.get_os=function(){var a=Ra.get_platformLabel();return null!=a?a:""};qc.get_pixelAspectRatio=function(){return 1};qc.get_screenDPI=function(){var a=null!=Xc.application?Xc.application.__window:null,b=72;null!=a&&(b*=a.__scale);return b};qc.get_screenResolutionX=function(){var a=Xc.current.stage,b=0;if(null==a)return 0;if(null!=a.window){var c=a.window.get_display();null!=c&&(b=Math.ceil(c.currentMode.width*a.window.__scale))}return 0<b?b:a.stageWidth};qc.get_screenResolutionY=
function(){var a=Xc.current.stage,b=0;if(null==a)return 0;if(null!=a.window){var c=a.window.get_display();null!=c&&(b=Math.ceil(c.currentMode.height*a.window.__scale))}return 0<b?b:a.stageHeight};qc.get_version=function(){return"WEB"+(" "+ba.replace("8.9.5",".",",")+",0")};var Ot=function(a,b,c){null==a&&(a=!1);this.checkPolicyFile=a;this.securityDomain=c;this.applicationDomain=b;this.allowLoadBytesCodeExecution=this.allowCodeImport=!0};h["openfl.system.LoaderContext"]=Ot;Ot.__name__="openfl.system.LoaderContext";
Ot.prototype={allowCodeImport:null,allowLoadBytesCodeExecution:null,applicationDomain:null,checkPolicyFile:null,securityDomain:null,__class__:Ot};var Ml=function(){};h["openfl.system.SecurityDomain"]=Ml;Ml.__name__="openfl.system.SecurityDomain";Ml.prototype={__class__:Ml};var Fg=function(){};h["openfl.system.System"]=Fg;Fg.__name__="openfl.system.System";Fg.__properties__={get_vmVersion:"get_vmVersion",get_totalMemory:"get_totalMemory"};Fg.disposeXML=function(a){};Fg.exit=function(a){Ra.exit(a)};
Fg.gc=function(){};Fg.pause=function(){Xc.notImplemented({fileName:"openfl/system/System.hx",lineNumber:213,className:"openfl.system.System",methodName:"pause"})};Fg.resume=function(){Xc.notImplemented({fileName:"openfl/system/System.hx",lineNumber:229,className:"openfl.system.System",methodName:"resume"})};Fg.setClipboard=function(a){He.set_text(a)};Fg.get_totalMemory=function(){return window.performance&&window.performance.memory?window.performance.memory.usedJSHeapSize:0};Fg.get_vmVersion=function(){return"1.0.0"};
var Nl={};h["openfl.system._TouchscreenType.TouchscreenType_Impl_"]=Nl;Nl.__name__="openfl.system._TouchscreenType.TouchscreenType_Impl_";Nl.fromString=function(a){switch(a){case "finger":return 0;case "none":return 1;case "stylus":return 2;default:return null}};Nl.toString=function(a){switch(a){case 0:return"finger";case 1:return"none";case 2:return"stylus";default:return null}};var wp={};h["openfl.text._AntiAliasType.AntiAliasType_Impl_"]=wp;wp.__name__="openfl.text._AntiAliasType.AntiAliasType_Impl_";
wp.fromString=function(a){switch(a){case "advanced":return 0;case "normal":return 1;default:return null}};wp.toString=function(a){switch(a){case 0:return"advanced";case 1:return"normal";default:return null}};var tc=function(a){ne.call(this,a)};h["openfl.text.Font"]=tc;tc.__name__="openfl.text.Font";tc.enumerateFonts=function(a){return tc.__registeredFonts};tc.fromBytes=function(a){var b=new tc;b.__fromBytes(za.toBytes(a));return b};tc.fromFile=function(a){var b=new tc;b.__fromFile(a);return b};tc.loadFromBytes=
function(a){return ne.loadFromBytes(za.toBytes(a)).then(function(a){var b=new tc;b.__fromLimeFont(a);return xb.withValue(b)})};tc.loadFromFile=function(a){return ne.loadFromFile(a).then(function(a){var b=new tc;b.__fromLimeFont(a);return xb.withValue(b)})};tc.loadFromName=function(a){return ne.loadFromName(a).then(function(a){var b=new tc;b.__fromLimeFont(a);return xb.withValue(b)})};tc.registerFont=function(a){a=null==L.getClass(a)?L.__cast(rb.createInstance(a,[]),tc):L.__cast(a,tc);if(null!=a){tc.__registeredFonts.push(a);
var b=a.name,c=tc.__fontByName;null!=q[b]?c.setReserved(b,a):c.h[b]=a}};tc.__super__=ne;tc.prototype=w(ne.prototype,{fontStyle:null,fontType:null,__initialized:null,__fromLimeFont:function(a){this.__copyFrom(a)},__initialize:function(){return this.__initialized},get_fontName:function(){return this.name},set_fontName:function(a){return this.name=a},__class__:tc,__properties__:{set_fontName:"set_fontName",get_fontName:"get_fontName"}});var rk={};h["openfl.text._FontStyle.FontStyle_Impl_"]=rk;rk.__name__=
"openfl.text._FontStyle.FontStyle_Impl_";rk.fromString=function(a){switch(a){case "bold":return 0;case "boldItalic":return 1;case "italic":return 2;case "regular":return 3;default:return null}};rk.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 Ol={};h["openfl.text._FontType.FontType_Impl_"]=Ol;Ol.__name__="openfl.text._FontType.FontType_Impl_";Ol.fromString=function(a){switch(a){case "device":return 0;
case "embedded":return 1;case "embeddedCFF":return 2;default:return null}};Ol.toString=function(a){switch(a){case 0:return"device";case 1:return"embedded";case 2:return"embeddedCFF";default:return null}};var Pl={};h["openfl.text._GridFitType.GridFitType_Impl_"]=Pl;Pl.__name__="openfl.text._GridFitType.GridFitType_Impl_";Pl.fromString=function(a){switch(a){case "none":return 0;case "pixel":return 1;case "subpixel":return 2;default:return null}};Pl.toString=function(a){switch(a){case 0:return"none";
case 1:return"pixel";case 2:return"subpixel";default:return null}};var Ui=function(){sa.call(this);this.__graphics=new nf(this)};h["openfl.text.StaticText"]=Ui;Ui.__name__="openfl.text.StaticText";Ui.__super__=sa;Ui.prototype=w(sa.prototype,{text:null,__class__:Ui});var ge=function(){this.__renderedOnCanvasWhileOnDOM=this.__forceCachedBitmapUpdate=!1;Za.call(this);this.__type=Ph.TEXTFIELD;this.__caretIndex=-1;this.__displayAsPassword=!1;this.__graphics=new nf(this);this.__textEngine=new Zb(this);
this.__layoutDirty=!0;this.__offsetY=this.__offsetX=0;this.__mouseWheelEnabled=!0;this.__text="";null==ge.__defaultTextFormat&&(ge.__defaultTextFormat=new Eg("Times New Roman",12,0,!1,!1,!1,"","",3,0,0,0,0),ge.__defaultTextFormat.blockIndent=0,ge.__defaultTextFormat.bullet=!1,ge.__defaultTextFormat.letterSpacing=0,ge.__defaultTextFormat.kerning=!1);this.__textFormat=ge.__defaultTextFormat.clone();this.__textEngine.textFormatRanges.push(new Gh(this.__textFormat,0,0));this.addEventListener("mouseDown",
v(this,this.this_onMouseDown));this.addEventListener("focusIn",v(this,this.this_onFocusIn));this.addEventListener("focusOut",v(this,this.this_onFocusOut));this.addEventListener("keyDown",v(this,this.this_onKeyDown));this.addEventListener("mouseWheel",v(this,this.this_onMouseWheel))};h["openfl.text.TextField"]=ge;ge.__name__="openfl.text.TextField";ge.__super__=Za;ge.prototype=w(Za.prototype,{__bounds:null,__caretIndex:null,__cursorTimer:null,__dirty:null,__displayAsPassword:null,__domRender:null,
__inputEnabled:null,__isHTML:null,__layoutDirty:null,__mouseWheelEnabled:null,__offsetX:null,__offsetY:null,__selectionIndex:null,__showCursor:null,__symbol:null,__text:null,__htmlText:null,__textEngine:null,__textFormat:null,__div:null,__renderedOnCanvasWhileOnDOM:null,__rawHtmlText:null,__forceCachedBitmapUpdate:null,appendText:function(a){null!=a&&""!=a&&(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.__updateText(this.__text+a),
this.__textEngine.textFormatRanges.get(this.__textEngine.textFormatRanges.get_length()-1).end=this.__text.length,this.__updateScrollV(),this.__updateScrollH())},getCharBoundaries:function(a){if(0>a||a>this.__text.length-1)return null;var b=new ia;return this.__getCharBoundaries(a,b)?b: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.get(e)}for(d=
this.__textEngine.layoutGroups.iterator();d.hasNext();)if(c=d.next(),b>=c.offsetY&&b<=c.offsetY+c.height&&a>=c.offsetX&&a<=c.offsetX+c.width){d=b=0;for(e=c.positions.length;d<e;){var f=d++;b+=c.positions[f];if(a<=c.offsetX+b)return c.startIndex+f}return c.endIndex}return-1},getFirstCharInParagraph:function(a){if(0>a||a>this.get_text().length)return-1;for(var b=this.__textEngine.getLineBreakIndex(),c=0;-1<b;){if(b<a)c=b+1;else if(b>=a)break;b=this.__textEngine.getLineBreakIndex(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;a=0;for(var c=this.get_scrollV()-1;a<c;){var d=a++;b+=this.__textEngine.lineHeights.get(d)}for(a=this.__textEngine.layoutGroups.iterator();a.hasNext();)if(c=a.next(),b>=c.offsetY&&b<=c.offsetY+c.height)return c.lineIndex;return-1},getLineIndexOfChar:function(a){if(0>a||a>this.__text.length)return-1;this.__updateLayout();for(var b=this.__textEngine.layoutGroups.iterator();b.hasNext();){var c=b.next();if(c.startIndex<=
a&&c.endIndex>=a)return c.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=this.__textEngine.layoutGroups.iterator();d.hasNext();){var e=d.next();if(e.lineIndex==a)-1==b&&(b=e.startIndex);else if(e.lineIndex==a+1){c=e.startIndex;break}}-1==c&&(c=this.__text.length);return c-b},getLineMetrics:function(a){this.__updateLayout();var b=this.__textEngine.lineAscents.get(a),c=this.__textEngine.lineDescents.get(a),d=this.__textEngine.lineLeadings.get(a),
e=this.__textEngine.lineHeights.get(a);a=this.__textEngine.lineWidths.get(a);switch(this.__textFormat.align){case 0:var f=(this.__textEngine.width-a)/2;break;case 1:case 4:f=this.__textEngine.width-a-2;break;case 2:case 3:case 5:f=2}return new Gr(f,a,e,b,c,d)},getLineOffset:function(a){this.__updateLayout();if(0>a||a>this.__textEngine.numLines-1)return-1;for(var b=this.__textEngine.layoutGroups.iterator();b.hasNext();){var c=b.next();if(c.lineIndex==a)return c.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=this.__textEngine.layoutGroups.iterator();d.hasNext();){var e=d.next();if(e.lineIndex==a)-1==b&&(b=e.startIndex);else if(e.lineIndex==a+1){c=e.startIndex;break}}-1==c&&(c=this.__text.length);return this.__textEngine.text.substring(b,c)},getParagraphLength:function(a){if(0>a||a>this.get_text().length)return-1;var b=this.getFirstCharInParagraph(a);if(a>=this.get_text().length)return this.get_text().length-b+1;a=this.__textEngine.getLineBreakIndex(a)+
1;0==a&&(a=this.__text.length);return a-b},getTextFormat:function(a,b){null==b&&(b=-1);null==a&&(a=-1);var c=null;if(a>=this.get_text().length||-1>a||b>this.get_text().length||-1>b)throw new E(new jj("The supplied index is out of bounds"));-1==a&&(a=0);-1==b&&(b=this.get_text().length);if(a>=b)return new Eg;for(var d=this.__textEngine.textFormatRanges.iterator();d.hasNext();){var e=d.next();if(e.start<=a&&e.end>a||e.start<b&&e.end>=b)null==c?c=e.format.clone():(e.format.font!=c.font&&(c.font=null),
e.format.size!=c.size&&(c.size=null),e.format.color!=c.color&&(c.color=null),e.format.bold!=c.bold&&(c.bold=null),e.format.italic!=c.italic&&(c.italic=null),e.format.underline!=c.underline&&(c.underline=null),e.format.url!=c.url&&(c.url=null),e.format.target!=c.target&&(c.target=null),e.format.align!=c.align&&(c.align=null),e.format.leftMargin!=c.leftMargin&&(c.leftMargin=null),e.format.rightMargin!=c.rightMargin&&(c.rightMargin=null),e.format.indent!=c.indent&&(c.indent=null),e.format.leading!=c.leading&&
(c.leading=null),e.format.blockIndent!=c.blockIndent&&(c.blockIndent=null),e.format.bullet!=c.bullet&&(c.bullet=null),e.format.kerning!=c.kerning&&(c.kerning=null),e.format.letterSpacing!=c.letterSpacing&&(c.letterSpacing=null),e.format.tabStops!=c.tabStops&&(c.tabStops=null))}null==c&&(c=new Eg);return c},replaceSelectedText:function(a){this.__replaceSelectedText(a,!1)},replaceText:function(a,b,c){this.__replaceText(a,b,c,!1)},setSelection:function(a,b){this.__selectionIndex=a;this.__caretIndex=
b;this.__updateScrollV();this.__stopCursorTimer();this.__startCursorTimer()},setTextFormat:function(a,b,c){null==c&&(c=0);null==b&&(b=0);var d=this.get_text().length;0>b&&(b=0);0>c&&(c=0);0==c&&(c=0==b?d:b+1);if(!(c<b)){if(0==b&&c>=d)for(this.__textFormat.__merge(a),a=0,b=this.__textEngine.textFormatRanges.get_length();a<b;){c=a++;var e=this.__textEngine.textFormatRanges.get(c);e.format.__merge(this.__textFormat)}else{for(var f=this.__textEngine.textFormatRanges.get_length();0<f;){--f;e=this.__textEngine.textFormatRanges.get(f);
if(e.start==b&&e.end==c){e.format=this.__textFormat.clone();e.format.__merge(a);this.__layoutDirty=this.__dirty=!0;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return}e.start>=b&&e.end<=c&&(e=this.__textEngine.textFormatRanges.indexOf(e,0),-1<e&&this.__textEngine.textFormatRanges.splice(e,1))}var g=f=null;if(0<b)for(var k=0,l=this.__textEngine.textFormatRanges.get_length();k<l;)if(e=k++,e=this.__textEngine.textFormatRanges.get(e),e.end>=b){f=e;break}if(c<d)for(d=this.__textEngine.textFormatRanges.get_length();0<=
--d;)if(e=this.__textEngine.textFormatRanges.get(d),e.start<=c){g=e;break}g==f&&(g=new Gh(g.format.clone(),g.start,g.end),this.__textEngine.textFormatRanges.push(g));null!=f&&(f.end=b);null!=g&&(g.start=c);e=this.__textFormat.clone();e.__merge(a);this.__textEngine.textFormatRanges.push(new Gh(e,b,c));this.__textEngine.textFormatRanges.sort(function(a,b){return a.start<b.start||a.end<b.end?-1:a.start>b.start||a.end>b.end?1:0})}this.__layoutDirty=this.__dirty=!0;this.__renderDirty||(this.__renderDirty=
!0,this.__setParentRenderDirty())}},__allowMouseFocus:function(){return 1==this.__textEngine.type||this.get_tabEnabled()?!0:this.get_selectable()},__caretBeginningOfLine:function(){this.__selectionIndex==this.__caretIndex||this.__caretIndex<this.__selectionIndex?this.__caretIndex=this.getLineOffset(this.getLineIndexOfChar(this.__caretIndex)):this.__selectionIndex=this.getLineOffset(this.getLineIndexOfChar(this.__selectionIndex))},__caretEndOfLine:function(){var a=this.__selectionIndex==this.__caretIndex?
this.getLineIndexOfChar(this.__caretIndex):this.getLineIndexOfChar(Math.max(this.__caretIndex,this.__selectionIndex)|0);this.__caretIndex=a<this.__textEngine.numLines-1?this.getLineOffset(a+1)-1:this.__text.length},__caretNextCharacter:function(){this.__caretIndex<this.__text.length&&this.__caretIndex++},__caretNextLine:function(a,b){null==a&&(a=this.getLineIndexOfChar(this.__caretIndex));a<this.__textEngine.numLines-1?(null==b&&(b=this.__caretIndex),this.__caretIndex=this.__getCharIndexOnDifferentLine(b,
a+1)):this.__caretIndex=this.__text.length},__caretPreviousCharacter:function(){0<this.__caretIndex&&this.__caretIndex--},__caretPreviousLine:function(a,b){null==a&&(a=this.getLineIndexOfChar(this.__caretIndex));0<a?(null==b&&(b=this.__caretIndex),this.__caretIndex=this.__getCharIndexOnDifferentLine(b,a-1)):this.__caretIndex=0},__disableInput:function(){this.__inputEnabled&&null!=this.stage&&(this.stage.window.__backend.setTextInputEnabled(!1),this.stage.window.onTextInput.remove(v(this,this.window_onTextInput)),
this.stage.window.onKeyDown.remove(v(this,this.window_onKeyDown)),this.__inputEnabled=!1,this.__stopCursorTimer())},__dispatch:function(a){if(2==a.eventPhase&&"mouseUp"==a.type){var b=this.__getGroup(this.get_mouseX(),this.get_mouseY(),!0);null!=b&&(b=b.format.url,null!=b&&""!=b&&(ba.startsWith(b,"event:")?this.dispatchEvent(new Ef("link",!1,!1,B.substr(b,6,null))):$a.getURL(new Jg(b))))}return Za.prototype.__dispatch.call(this,a)},__enableInput:function(){null!=this.stage&&(this.stage.window.__backend.setTextInputEnabled(!0),
this.__inputEnabled||(this.stage.window.__backend.setTextInputEnabled(!0),this.stage.window.onTextInput.has(v(this,this.window_onTextInput))||(this.stage.window.onTextInput.add(v(this,this.window_onTextInput)),this.stage.window.onKeyDown.add(v(this,this.window_onKeyDown))),this.__inputEnabled=!0,this.__startCursorTimer()))},__fromSymbol:function(a,b){this.__symbol=b;this.set_width(b.width);this.set_height(b.height);this.__offsetX=b.x;this.__offsetY=b.y;this.set_multiline(b.multiline);this.set_wordWrap(b.wordWrap);
this.set_displayAsPassword(b.password);b.border&&(this.set_border(!0),this.set_background(!0));this.set_selectable(b.selectable);b.input&&this.set_type(1);var c=new Eg;null!=b.color&&(c.color=b.color&16777215);c.size=Math.round(b.fontHeight/20);a=a.symbols.h[b.fontID];null!=a&&(c.__ascent=a.ascent/20/1024,c.__descent=a.descent/20/1024);c.font=b.fontName;a=!1;var d=c.font;if(null==d)a=!0;else switch(d){case "":case "_sans":case "_serif":case "_typewriter":a=!0;break;default:d=0;for(var e=tc.enumerateFonts();d<
e.length;){var f=e[d];++d;if(f.name==c.font){a=!0;break}}}if(!a)for(d=/[^a-zA-Z]+/g,e=0,f=tc.enumerateFonts();e<f.length;){var g=f[e];++e;if(B.substr(g.name.replace(d,""),0,b.fontName.length)==b.fontName){c.font=g.name;a=!0;break}}a?this.set_embedFonts(!0):(a=c.font,d=ge.__missingFontWarning,(null!=q[a]?d.existsReserved(a):d.h.hasOwnProperty(a))||(a=c.font,d=ge.__missingFontWarning,null!=q[a]?d.setReserved(a,!0):d.h[a]=!0,Ta.warn('Could not find required font "'+c.font+'", it has not been embedded',
{fileName:"openfl/text/TextField.hx",lineNumber:1827,className:"openfl.text.TextField",methodName:"__fromSymbol"})));null!=b.align&&("center"==b.align?c.align=0:"right"==b.align?c.align=4:"justify"==b.align&&(c.align=2),c.leftMargin=b.leftMargin/20|0,c.rightMargin=b.rightMargin/20|0,c.indent=b.indent/20|0,c.leading=b.leading/20|0);this.set_defaultTextFormat(c);null!=b.text&&(b.html?this.set_htmlText(b.text):this.set_text(b.text))},__getAdvance:function(a){return a},__getBounds:function(a,b){this.__updateLayout();
var c=ia.__pool.get();c.copyFrom(this.__textEngine.bounds);b.tx+=this.__offsetX;b.ty+=this.__offsetY;c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);ia.__pool.release(c)},__getCharBoundaries:function(a,b){if(0>a||a>this.__text.length-1)return!1;this.__updateLayout();for(var c=this.__textEngine.layoutGroups.iterator();c.hasNext();){var d=c.next();if(a>=d.startIndex&&a<d.endIndex)try{for(var e=d.offsetX,f=0,g=a-d.startIndex;f<g;){var k=f++;e+=d.positions[k]}b.setTo(e,d.offsetY,d.positions[a-
d.startIndex],d.ascent+d.descent);return!0}catch(l){ra.lastException=l}}return!1},__getCharIndexOnDifferentLine:function(a,b){if(0>a||a>this.__text.length||0>b||b>this.__textEngine.numLines-1)return-1;for(var c=null,d=null,e=this.__textEngine.layoutGroups.iterator();e.hasNext();){var f=e.next();if(a>=f.startIndex&&a<=f.endIndex){c=f.offsetX;for(var g=0,k=a-f.startIndex;g<k;){var l=g++;c+=f.positions[l]}if(null!=d)return this.__getPosition(c,d)}if(f.lineIndex==b){d=f.offsetY+f.height/2;f=0;for(g=this.get_scrollV()-
1;f<g;)k=f++,d-=this.__textEngine.lineHeights.get(k);if(null!=c)return this.__getPosition(c,d)}}return-1},__getCursor:function(){var a=this.__getGroup(this.get_mouseX(),this.get_mouseY(),!0);return null!=a&&""!=a.format.url?"button":this.__textEngine.selectable?"ibeam":null},__getGroup:function(a,b,c){null==c&&(c=!1);this.__updateLayout();a+=this.get_scrollH();for(var d=0,e=this.get_scrollV()-1;d<e;){var f=d++;b+=this.__textEngine.lineHeights.get(f)}!c&&b>this.__textEngine.textHeight&&(b=this.__textEngine.textHeight);
d=!0;f=0;for(var g=this.__textEngine.layoutGroups.get_length();f<g;){var k=f++;e=this.__textEngine.layoutGroups.get(k);k=k<this.__textEngine.layoutGroups.get_length()-1?this.__textEngine.layoutGroups.get(k+1):null;d&&(b<e.offsetY&&(b=e.offsetY),a<e.offsetX&&(a=e.offsetX),d=!1);if(b>=e.offsetY&&b<=e.offsetY+e.height||!c&&null==k)if(a>=e.offsetX&&a<=e.offsetX+e.width||!c&&(null==k||k.lineIndex!=e.lineIndex))return e}return null},__getPosition:function(a,b){b=this.__getGroup(a,b);if(null==b)return this.__text.length;
for(var c=0,d=0,e=b.positions.length;d<e;){var f=d++;c+=b.positions[f];if(a<=b.offsetX+c){if(a<=b.offsetX+(c-b.positions[f])+b.positions[f]/2)return b.startIndex+f;if(b.startIndex+f<b.endIndex)return b.startIndex+f+1;break}}return b.endIndex},__getRenderBounds:function(a,b){if(null==this.__scrollRect){this.__updateLayout();var c=ia.__pool.get();c.copyFrom(this.__textEngine.bounds);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);ia.__pool.release(c)}else Za.prototype.__getRenderBounds.call(this,
a,b)},__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.__getRenderTransform();this.__updateLayout();c=this.__renderTransform;e=c.a*c.d-c.b*c.c;var g=this.__renderTransform,k=g.a*g.d-g.b*g.c;return this.__textEngine.bounds.contains(0==e?-c.tx:1/e*(c.c*(c.ty-b)+c.d*(a-c.tx)),0==k?-g.ty:1/k*(g.a*(b-g.ty)+g.b*(g.tx-a)))?(null!=d&&d.push(f),!0):!1},__hitTestMask:function(a,b){this.__getRenderTransform();
this.__updateLayout();var c=this.__renderTransform,d=c.a*c.d-c.b*c.c,e=this.__renderTransform,f=e.a*e.d-e.b*e.c;return this.__textEngine.bounds.contains(0==d?-c.tx:1/d*(c.c*(c.ty-b)+c.d*(a-c.tx)),0==f?-e.ty:1/f*(e.a*(b-e.ty)+e.b*(e.tx-a)))?!0:!1},__replaceSelectedText:function(a,b){null==b&&(b=!0);null==a&&(a="");if(""!=a||this.__selectionIndex!=this.__caretIndex){var c=this.__caretIndex<this.__selectionIndex?this.__caretIndex:this.__selectionIndex,d=this.__caretIndex>this.__selectionIndex?this.__caretIndex:
this.__selectionIndex;if(!(c==d&&0<this.__textEngine.maxChars&&this.__text.length==this.__textEngine.maxChars)){c>this.__text.length&&(c=this.__text.length);d>this.__text.length&&(d=this.__text.length);if(d<c){var e=d;d=c;c=e}0>c&&(c=0);this.__replaceText(c,d,a,b);a=c+L.__cast(a,String).length;a>this.__text.length&&(a=this.__text.length);this.setSelection(a,a);this.__updateScrollH()}}},__replaceText:function(a,b,c,d){if(!(b<a||0>a||b>this.__text.length||null==c)){d&&(c=this.__textEngine.restrictText(c),
0<this.__textEngine.maxChars&&(d=this.__textEngine.maxChars-this.__text.length+(b-a),0>=d?c="":d<c.length&&(c=B.substr(c,0,d))));this.__updateText(this.__text.substring(0,a)+c+this.__text.substring(b));b>this.__text.length&&(b=this.__text.length);d=c.length-(b-a);for(var e=0,f;e<this.__textEngine.textFormatRanges.get_length();)f=this.__textEngine.textFormatRanges.get(e),a==b?f.end>=a&&(f.start>b?(f.start+=d,f.end+=d):f.start<f.end&&f.end==a&&e<this.__textEngine.textFormatRanges.get_length()-1||(f.end+=
d)):f.end>=a&&(f.start>=b?(f.start+=d,f.end+=d):f.start>=a&&f.end<=b?1<this.__textEngine.textFormatRanges.get_length()?this.__textEngine.textFormatRanges.splice(e,1):(f.start=0,f.end=c.length):f.start<=a?f.end=f.end<b?a:f.end+d:(f.start=a,f.end+=d)),++e;this.__updateScrollV();this.__updateScrollH();this.__layoutDirty=this.__dirty=!0;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())}},__startCursorTimer:function(){this.__cursorTimer=pf.delay(v(this,this.__startCursorTimer),
600);this.__showCursor=!this.__showCursor;this.__dirty=!0;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())},__startTextInput:function(){0>this.__caretIndex&&(this.__selectionIndex=this.__caretIndex=this.__text.length);(sa.__supportDOM?this.__renderedOnCanvasWhileOnDOM:1)&&this.__enableInput()},__stopCursorTimer:function(){null!=this.__cursorTimer&&(this.__cursorTimer.stop(),this.__cursorTimer=null);this.__showCursor&&(this.__showCursor=!1,this.__dirty=!0,this.__renderDirty||
(this.__renderDirty=!0,this.__setParentRenderDirty()))},__stopTextInput:function(){(sa.__supportDOM?this.__renderedOnCanvasWhileOnDOM:1)&&this.__disableInput()},__updateLayout:function(){if(this.__layoutDirty){var a=this.__textEngine.width;this.__textEngine.update();if(2!=this.__textEngine.autoSize){if(this.__textEngine.width!=a)switch(this.__textEngine.autoSize){case 0:this.set_x(this.get_x()+(a-this.__textEngine.width)/2);break;case 3:this.set_x(this.get_x()+(a-this.__textEngine.width))}this.__textEngine.getBounds()}this.__layoutDirty=
!1}},__updateScrollH:function(){if(!this.get_multiline()&&1==this.get_type()){this.__layoutDirty=!0;this.__updateLayout();var a=this.__textEngine.textWidth-this.__textEngine.width+4;0<a?this.__caretIndex>=this.get_text().length?this.set_scrollH(Math.ceil(a)):(a=ia.__pool.get(),this.__getCharBoundaries(this.__caretIndex,a),a.x<this.get_scrollH()?this.set_scrollH(Math.floor(a.x-2)):a.x>this.get_scrollH()+this.__textEngine.width&&this.set_scrollH(Math.ceil(a.x-this.__textEngine.width-2)),ia.__pool.release(a)):
this.set_scrollH(0)}},__updateScrollV:function(){this.__layoutDirty=!0;this.__updateLayout();var a=this.getLineIndexOfChar(this.__caretIndex);-1==a&&0<this.__caretIndex&&(a=this.getLineIndexOfChar(this.__caretIndex-1)+1);if(a+1<this.get_scrollV())this.set_scrollV(a+1);else if(a+1>this.get_bottomScrollV()){for(var b=0;0<=a;)if(b+this.__textEngine.lineHeights.get(a)<=this.get_height()-4)b+=this.__textEngine.lineHeights.get(a),--a;else break;this.set_scrollV(a+2)}else this.set_scrollV(this.get_scrollV())},
__updateText:function(a){sa.__supportDOM&&this.__renderedOnCanvasWhileOnDOM&&(this.__forceCachedBitmapUpdate=this.__text!=a);this.__textEngine.set_text(a);this.__text=this.__textEngine.text;this.__text.length<this.__caretIndex&&(this.__selectionIndex=this.__caretIndex=this.__text.length);if(!this.__displayAsPassword||sa.__supportDOM&&!this.__renderedOnCanvasWhileOnDOM)this.__textEngine.set_text(this.__text);else{a="";for(var b=0,c=this.get_text().length;b<c;)b++,a+="*";this.__textEngine.set_text(a)}},
__updateTransforms:function(a){Za.prototype.__updateTransforms.call(this,a);a=this.__renderTransform;var b=this.__offsetX,c=this.__offsetY;a.tx=b*a.a+c*a.c+a.tx;a.ty=b*a.b+c*a.d+a.ty},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,this.__renderDirty||(this.__renderDirty=
!0,this.__setParentRenderDirty()));return this.__textEngine.autoSize=a},get_background:function(){return this.__textEngine.background},set_background:function(a){a!=this.__textEngine.background&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.background=a},get_backgroundColor:function(){return this.__textEngine.backgroundColor},set_backgroundColor:function(a){a!=this.__textEngine.backgroundColor&&(this.__dirty=!0,this.__renderDirty||
(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.backgroundColor=a},get_border:function(){return this.__textEngine.border},set_border:function(a){a!=this.__textEngine.border&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.border=a},get_borderColor:function(){return this.__textEngine.borderColor},set_borderColor:function(a){a!=this.__textEngine.borderColor&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=
!0,this.__setParentRenderDirty()));return this.__textEngine.borderColor=a},get_bottomScrollV:function(){this.__updateLayout();return this.__textEngine.get_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;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());return a},get_displayAsPassword:function(){return this.__displayAsPassword},
set_displayAsPassword:function(a){a!=this.__displayAsPassword&&(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.__displayAsPassword=a,this.__updateText(this.__text));return 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*Math.abs(this.get_scaleY())},set_height:function(a){a!=this.__textEngine.height&&(this.__setTransformDirty(),this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.__textEngine.height=a);return this.__textEngine.height*Math.abs(this.get_scaleY())},get_htmlText:function(){return this.__isHTML?this.__rawHtmlText:this.__text},set_htmlText:function(a){this.__isHTML&&
this.__text==a||(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));this.__isHTML=!0;this.__rawHtmlText=a;a=sb.parse(a,this.__textFormat,this.__textEngine.textFormatRanges);if(sa.__supportDOM){1<this.__textEngine.textFormatRanges.get_length()&&this.__textEngine.textFormatRanges.splice(1,this.__textEngine.textFormatRanges.get_length()-1);var b=this.__textEngine.textFormatRanges.get(0);b.format=this.__textFormat;b.start=0;this.__renderedOnCanvasWhileOnDOM?
(b.end=a.length,this.__updateText(a)):(b.end=this.__rawHtmlText.length,this.__updateText(this.__rawHtmlText))}else this.__updateText(a);this.__updateScrollV();return a},get_length:function(){return null!=this.__text?this.__text.length:0},get_maxChars:function(){return this.__textEngine.maxChars},set_maxChars:function(a){a!=this.__textEngine.maxChars&&(this.__textEngine.maxChars=a,this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return a},
get_maxScrollH:function(){this.__updateLayout();return this.__textEngine.maxScrollH},get_maxScrollV:function(){this.__updateLayout();return this.__textEngine.get_maxScrollV()},get_mouseWheelEnabled:function(){return this.__mouseWheelEnabled},set_mouseWheelEnabled:function(a){return this.__mouseWheelEnabled=a},get_multiline:function(){return this.__textEngine.multiline},set_multiline:function(a){a!=this.__textEngine.multiline&&(this.__layoutDirty=this.__dirty=!0,this.__updateText(this.__text),this.__updateScrollH(),
this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));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){this.__textEngine.restrict!=a&&(this.__textEngine.set_restrict(a),this.__updateText(this.__text));return a},get_scrollH:function(){return this.__textEngine.scrollH},set_scrollH:function(a){this.__updateLayout();a>this.__textEngine.maxScrollH&&
(a=this.__textEngine.maxScrollH);0>a&&(a=0);a!=this.__textEngine.scrollH&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.dispatchEvent(new da("scroll")));return this.__textEngine.scrollH=a},get_scrollV:function(){return this.__textEngine.get_scrollV()},set_scrollV:function(a){this.__updateLayout();a!=this.__textEngine.get_scrollV()&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.dispatchEvent(new da("scroll")));
return this.__textEngine.set_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 Math.min(this.__caretIndex,this.__selectionIndex)|0},get_selectionEndIndex:function(){return Math.max(this.__caretIndex,this.__selectionIndex)|
0},get_sharpness:function(){return this.__textEngine.sharpness},set_sharpness:function(a){a!=this.__textEngine.sharpness&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.sharpness=a},get_tabEnabled:function(){return null==this.__tabEnabled?1==this.__textEngine.type:this.__tabEnabled},get_text:function(){return this.__text},set_text:function(a){if(this.__isHTML||this.__text!=a)this.__layoutDirty=this.__dirty=!0,this.__renderDirty||
(this.__renderDirty=!0,this.__setParentRenderDirty());else return a;1<this.__textEngine.textFormatRanges.get_length()&&this.__textEngine.textFormatRanges.splice(1,this.__textEngine.textFormatRanges.get_length()-1);var b=this.__textEngine.textFormatRanges.get(0);b.format=this.__textFormat;b.start=0;b.end=a.length;this.__isHTML=!1;this.__updateText(a);this.__updateScrollV();return a},get_textColor:function(){return this.__textFormat.color},set_textColor:function(a){a!=this.__textFormat.color&&(this.__dirty=
!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));for(var b=this.__textEngine.textFormatRanges.iterator();b.hasNext();)b.next().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("addedToStage",
v(this,this.this_onAddedToStage)),this.this_onFocusIn(null),this.__textEngine.__useIntAdvances=!0):(this.removeEventListener("addedToStage",v(this,this.this_onAddedToStage)),this.__stopTextInput(),this.__textEngine.__useIntAdvances=null),this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.type=a},get_width:function(){this.__updateLayout();return this.__textEngine.width*Math.abs(this.__scaleX)},set_width:function(a){a!=
this.__textEngine.width&&(this.__setTransformDirty(),this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.__textEngine.width=a);return this.__textEngine.width*Math.abs(this.__scaleX)},get_wordWrap:function(){return this.__textEngine.wordWrap},set_wordWrap:function(a){a!=this.__textEngine.wordWrap&&(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return this.__textEngine.wordWrap=
a},get_x:function(){return this.__transform.tx+this.__offsetX},set_x:function(a){a!=this.__transform.tx+this.__offsetX&&this.__setTransformDirty();return this.__transform.tx=a-this.__offsetX},get_y:function(){return this.__transform.ty+this.__offsetY},set_y:function(a){a!=this.__transform.ty+this.__offsetY&&this.__setTransformDirty();return this.__transform.ty=a-this.__offsetY},stage_onMouseMove:function(a){null!=this.stage&&this.__textEngine.selectable&&0<=this.__selectionIndex&&(this.__updateLayout(),
a=this.__getPosition(this.get_mouseX()+this.get_scrollH(),this.get_mouseY()),a!=this.__caretIndex&&(this.__caretIndex=a,sa.__supportDOM?this.__renderedOnCanvasWhileOnDOM&&(this.__forceCachedBitmapUpdate=!0):(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()))))},stage_onMouseUp:function(a){if(null!=this.stage&&(this.stage.removeEventListener("mouseMove",v(this,this.stage_onMouseMove)),this.stage.removeEventListener("mouseUp",v(this,this.stage_onMouseUp)),this.stage.get_focus()==
this)){this.__getWorldTransform();this.__updateLayout();a=this.__getPosition(this.get_mouseX()+this.get_scrollH(),this.get_mouseY());var b=Math.max(this.__selectionIndex,a)|0;this.__selectionIndex=Math.min(this.__selectionIndex,a)|0;this.__caretIndex=b;this.__inputEnabled&&(this.this_onFocusIn(null),this.__stopCursorTimer(),this.__startCursorTimer(),sa.__supportDOM&&this.__renderedOnCanvasWhileOnDOM&&(this.__forceCachedBitmapUpdate=!0))}},this_onAddedToStage:function(a){this.this_onFocusIn(null)},
this_onFocusIn:function(a){1==this.get_type()&&null!=this.stage&&this.stage.get_focus()==this&&this.__startTextInput()},this_onFocusOut:function(a){this.__stopCursorTimer();null!=a.relatedObject&&a.relatedObject instanceof ge?(null!=this.stage&&(this.stage.window.onTextInput.remove(v(this,this.window_onTextInput)),this.stage.window.onKeyDown.remove(v(this,this.window_onKeyDown))),this.__inputEnabled=!1):this.__stopTextInput();this.__selectionIndex!=this.__caretIndex&&(this.__selectionIndex=this.__caretIndex,
this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()))},this_onKeyDown:function(a){this.get_selectable()&&1!=this.get_type()&&67==a.keyCode&&(a.commandKey||a.ctrlKey)&&this.__caretIndex!=this.__selectionIndex&&He.set_text(this.__text.substring(this.__caretIndex,this.__selectionIndex))},this_onMouseDown:function(a){if(this.get_selectable()||1==this.get_type())this.__updateLayout(),this.__selectionIndex=this.__caretIndex=this.__getPosition(this.get_mouseX()+this.get_scrollH(),
this.get_mouseY()),sa.__supportDOM||(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())),this.stage.addEventListener("mouseMove",v(this,this.stage_onMouseMove)),this.stage.addEventListener("mouseUp",v(this,this.stage_onMouseUp))},this_onMouseWheel:function(a){this.set_scrollV(this.get_scrollV()-a.delta)},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 da("change",!0)));break;case 97:this.get_selectable()&&(wb.get_metaKey(b)||wb.get_ctrlKey(b))&&(this.__caretIndex=this.__text.length,this.__selectionIndex=0);break;case 99:(wb.get_metaKey(b)||wb.get_ctrlKey(b))&&this.__caretIndex!=this.__selectionIndex&&He.set_text(this.__text.substring(this.__caretIndex,this.__selectionIndex));break;case 120:(wb.get_metaKey(b)||wb.get_ctrlKey(b))&&this.__caretIndex!=
this.__selectionIndex&&(He.set_text(this.__text.substring(this.__caretIndex,this.__selectionIndex)),this.replaceSelectedText(""),this.dispatchEvent(new da("change",!0)));break;case 127:this.__selectionIndex==this.__caretIndex&&this.__caretIndex<this.__text.length&&(this.__selectionIndex=this.__caretIndex+1);this.__selectionIndex!=this.__caretIndex&&(this.replaceSelectedText(""),this.__selectionIndex=this.__caretIndex,this.dispatchEvent(new da("change",!0)));break;case 1073741898:this.get_selectable()&&
(this.__caretBeginningOfLine(),this.__stopCursorTimer(),this.__startCursorTimer());break;case 1073741901:this.get_selectable()&&(this.__caretEndOfLine(),this.__stopCursorTimer(),this.__startCursorTimer());break;case 1073741903:this.get_selectable()&&(wb.get_metaKey(b)?(this.__caretEndOfLine(),wb.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex)):wb.get_shiftKey(b)?this.__caretNextCharacter():(this.__selectionIndex==this.__caretIndex?this.__caretNextCharacter():this.__caretIndex=Math.max(this.__caretIndex,
this.__selectionIndex)|0,this.__selectionIndex=this.__caretIndex),this.__updateScrollH(),this.__updateScrollV(),this.__stopCursorTimer(),this.__startCursorTimer());break;case 1073741904:this.get_selectable()&&(wb.get_metaKey(b)?(this.__caretBeginningOfLine(),wb.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex)):wb.get_shiftKey(b)?this.__caretPreviousCharacter():(this.__selectionIndex==this.__caretIndex?this.__caretPreviousCharacter():this.__caretIndex=Math.min(this.__caretIndex,this.__selectionIndex)|
0,this.__selectionIndex=this.__caretIndex),this.__updateScrollH(),this.__updateScrollV(),this.__stopCursorTimer(),this.__startCursorTimer());break;case 1073741905:this.get_selectable()&&this.__textEngine.multiline&&(wb.get_shiftKey(b)?this.__caretNextLine():(this.__selectionIndex==this.__caretIndex?this.__caretNextLine():(a=this.getLineIndexOfChar(Math.max(this.__caretIndex,this.__selectionIndex)|0),this.__caretNextLine(a,Math.min(this.__caretIndex,this.__selectionIndex)|0)),this.__selectionIndex=
this.__caretIndex),this.__updateScrollV(),this.__stopCursorTimer(),this.__startCursorTimer());break;case 1073741906:this.get_selectable()&&this.__textEngine.multiline&&(wb.get_shiftKey(b)?this.__caretPreviousLine():(this.__selectionIndex==this.__caretIndex?this.__caretPreviousLine():(a=this.getLineIndexOfChar(Math.min(this.__caretIndex,this.__selectionIndex)|0),this.__caretPreviousLine(a,Math.min(this.__caretIndex,this.__selectionIndex)|0)),this.__selectionIndex=this.__caretIndex),this.__updateScrollV(),
this.__stopCursorTimer(),this.__startCursorTimer());break;case 13:case 1073741912:this.__textEngine.multiline&&(a=new Ef("textInput",!0,!0,"\n"),this.dispatchEvent(a),a.isDefaultPrevented()||(this.__replaceSelectedText("\n",!0),this.dispatchEvent(new da("change",!0))))}},window_onTextInput:function(a){this.__replaceSelectedText(a,!0);this.dispatchEvent(new da("change",!0))},__class__:ge,__properties__:w(Za.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",set_mouseWheelEnabled:"set_mouseWheelEnabled",get_mouseWheelEnabled:"get_mouseWheelEnabled",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 sk={};h["openfl.text._TextFieldAutoSize.TextFieldAutoSize_Impl_"]=sk;sk.__name__="openfl.text._TextFieldAutoSize.TextFieldAutoSize_Impl_";sk.fromString=function(a){switch(a){case "center":return 0;case "left":return 1;case "none":return 2;case "right":return 3;default:return null}};sk.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 xp={};h["openfl.text._TextFieldType.TextFieldType_Impl_"]=xp;xp.__name__="openfl.text._TextFieldType.TextFieldType_Impl_";xp.fromString=function(a){switch(a){case "dynamic":return 0;case "input":return 1;default:return null}};xp.toString=function(a){switch(a){case 0:return"dynamic";case 1:return"input";default:return null}};var Eg=function(a,b,c,d,e,f,g,k,l,m,p,n,h){this.font=a;this.size=b;this.color=c;this.bold=
d;this.italic=e;this.underline=f;this.url=g;this.target=k;this.align=l;this.leftMargin=m;this.rightMargin=p;this.indent=n;this.leading=h};h["openfl.text.TextFormat"]=Eg;Eg.__name__="openfl.text.TextFormat";Eg.prototype={align:null,blockIndent:null,bold:null,bullet:null,color:null,font:null,indent:null,italic:null,kerning:null,leading:null,leftMargin:null,letterSpacing:null,rightMargin:null,size:null,tabStops:null,target:null,underline:null,url:null,__ascent:null,__descent:null,clone:function(){var a=
new Eg(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;a.__ascent=this.__ascent;a.__descent=this.__descent;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);null!=a.__ascent&&(this.__ascent=a.__ascent);null!=a.__descent&&(this.__descent=a.__descent)},__class__:Eg};var Hh={};h["openfl.text._TextFormatAlign.TextFormatAlign_Impl_"]=Hh;Hh.__name__="openfl.text._TextFormatAlign.TextFormatAlign_Impl_";Hh.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}};Hh.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 Gr=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};h["openfl.text.TextLineMetrics"]=Gr;Gr.__name__="openfl.text.TextLineMetrics";Gr.prototype={ascent:null,
descent:null,height:null,leading:null,width:null,x:null,__class__:Gr};var fc=function(){A.call(this);fc.__instances.push(this)};h["openfl.ui.GameInput"]=fc;fc.__name__="openfl.ui.GameInput";fc.getDeviceAt=function(a){return 0<=a&&a<fc.__deviceList.length?fc.__deviceList[a]:null};fc.__getDevice=function(a){if(null==a)return null;if(null==fc.__devices.h.__keys__[a.__id__]){var b=pd.__getDeviceData()[a.id].id,c=pd.__getDeviceData();b=new yp(b,c[a.id].id);fc.__deviceList.push(b);fc.__devices.set(a,b);
fc.numDevices=fc.__deviceList.length}return fc.__devices.h[a.__id__]};fc.__onGamepadAxisMove=function(a,b,c){a=fc.__getDevice(a);if(null!=a&&a.enabled){if(!a.__axis.h.hasOwnProperty(b)){switch(b){case 0:var 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 da("change"))}};
fc.__onGamepadButtonDown=function(a,b){a=fc.__getDevice(a);if(null!=a&&a.enabled){if(!a.__button.h.hasOwnProperty(b)){switch(b){case 0:var c="A";break;case 1:c="B";break;case 2:c="X";break;case 3:c="Y";break;case 4:c="BACK";break;case 5:c="GUIDE";break;case 6:c="START";break;case 7:c="LEFT_STICK";break;case 8:c="RIGHT_STICK";break;case 9:c="LEFT_SHOULDER";break;case 10:c="RIGHT_SHOULDER";break;case 11:c="DPAD_UP";break;case 12:c="DPAD_DOWN";break;case 13:c="DPAD_LEFT";break;case 14:c="DPAD_RIGHT";
break;default:c="UNKNOWN ("+b+")"}c=new Zf(a,"BUTTON_"+c,0,1);a.__button.h[b]=c;a.__controls.push(c)}b=a.__button.h[b];b.value=1;b.dispatchEvent(new da("change"))}};fc.__onGamepadButtonUp=function(a,b){a=fc.__getDevice(a);if(null!=a&&a.enabled){if(!a.__button.h.hasOwnProperty(b)){switch(b){case 0:var c="A";break;case 1:c="B";break;case 2:c="X";break;case 3:c="Y";break;case 4:c="BACK";break;case 5:c="GUIDE";break;case 6:c="START";break;case 7:c="LEFT_STICK";break;case 8:c="RIGHT_STICK";break;case 9:c=
"LEFT_SHOULDER";break;case 10:c="RIGHT_SHOULDER";break;case 11:c="DPAD_UP";break;case 12:c="DPAD_DOWN";break;case 13:c="DPAD_LEFT";break;case 14:c="DPAD_RIGHT";break;default:c="UNKNOWN ("+b+")"}c=new Zf(a,"BUTTON_"+c,0,1);a.__button.h[b]=c;a.__controls.push(c)}b=a.__button.h[b];b.value=0;b.dispatchEvent(new da("change"))}};fc.__onGamepadConnect=function(a){a=fc.__getDevice(a);if(null!=a)for(var b=0,c=fc.__instances;b<c.length;){var d=c[b];++b;d.dispatchEvent(new Bg("deviceAdded",!0,!1,a))}};fc.__onGamepadDisconnect=
function(a){var b=fc.__devices.h[a.__id__];if(null!=b){null!=fc.__devices.h.__keys__[a.__id__]&&(B.remove(fc.__deviceList,fc.__devices.h[a.__id__]),fc.__devices.remove(a));fc.numDevices=fc.__deviceList.length;a=0;for(var c=fc.__instances;a<c.length;){var d=c[a];++a;d.dispatchEvent(new Bg("deviceRemoved",!0,!1,b))}}};fc.__super__=A;fc.prototype=w(A.prototype,{addEventListener:function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=0);null==c&&(c=!1);A.prototype.addEventListener.call(this,a,b,c,d,e);if("deviceAdded"==
a)for(a=0,b=fc.__deviceList;a<b.length;)c=b[a],++a,this.dispatchEvent(new Bg("deviceAdded",!0,!1,c))},__class__:fc});var Zf=function(a,b,c,d,e){null==e&&(e=0);A.call(this);this.device=a;this.id=b;this.minValue=c;this.maxValue=d;this.value=e};h["openfl.ui.GameInputControl"]=Zf;Zf.__name__="openfl.ui.GameInputControl";Zf.__super__=A;Zf.prototype=w(A.prototype,{device:null,id:null,maxValue:null,minValue:null,value:null,__class__:Zf});var yp=function(a,b){this.__controls=[];this.__button=new Wa;this.__axis=
new Wa;this.id=a;this.name=b;a=new Zf(this,"AXIS_0",-1,1);this.__axis.h[0]=a;this.__controls.push(a);a=new Zf(this,"AXIS_1",-1,1);this.__axis.h[1]=a;this.__controls.push(a);a=new Zf(this,"AXIS_2",-1,1);this.__axis.h[2]=a;this.__controls.push(a);a=new Zf(this,"AXIS_3",-1,1);this.__axis.h[3]=a;this.__controls.push(a);a=new Zf(this,"AXIS_4",-1,1);this.__axis.h[4]=a;this.__controls.push(a);a=new Zf(this,"AXIS_5",-1,1);this.__axis.h[5]=a;this.__controls.push(a);for(b=0;15>b;){var c=b++;a=new Zf(this,"BUTTON_"+
c,0,1);this.__button.h[c]=a;this.__controls.push(a)}};h["openfl.ui.GameInputDevice"]=yp;yp.__name__="openfl.ui.GameInputDevice";yp.prototype={enabled:null,id:null,name:null,sampleInterval:null,__axis:null,__button:null,__controls:null,__gamepad:null,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__:yp,__properties__:{get_numControls:"get_numControls"}};var Fa=function(){};h["openfl.ui.Keyboard"]=Fa;Fa.__name__="openfl.ui.Keyboard";Fa.isAccessible=function(){return!1};Fa.__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 13;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}};Fa.__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 8:return 8;case 13:return 13;case 46:return 127;case 106:return 42;case 107:return 43;case 108:return 44;case 110:return 45;case 111:return 46}return 0};Fa.__getKeyLocation=function(a){switch(a){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;
case 1073742048:case 1073742049:case 1073742050:case 1073742051:return 1;case 1073742052:case 1073742053:case 1073742054:case 1073742055:return 2;default:return 0}};var ve=function(){};h["openfl.ui.Mouse"]=ve;ve.__name__="openfl.ui.Mouse";ve.__properties__={set_cursor:"set_cursor",get_cursor:"get_cursor"};ve.hide=function(){ve.__hidden=!0;for(var a=0,b=bf.current.__windows;a<b.length;){var c=b[a];++a;c.set_cursor(null)}};ve.show=function(){ve.__hidden=!1;var a=ve.__cursor;ve.__cursor=null;ve.set_cursor(a)};
ve.get_cursor=function(){return ve.__cursor};ve.set_cursor=function(a){null==a&&(a="auto");var b=null;switch(a){case "arrow":b=Kd.ARROW;break;case "button":b=Kd.POINTER;break;case "crosshair":b=Kd.CROSSHAIR;break;case "custom":b=Kd.CUSTOM;break;case "hand":b=Kd.MOVE;break;case "ibeam":b=Kd.TEXT;break;case "resize_nesw":b=Kd.RESIZE_NESW;break;case "resize_ns":b=Kd.RESIZE_NS;break;case "resize_nwse":b=Kd.RESIZE_NWSE;break;case "resize_we":b=Kd.RESIZE_WE;break;case "wait":b=Kd.WAIT;break;case "waitarrow":b=
Kd.WAIT_ARROW}if(null!=b&&!ve.__hidden)for(var c=0,d=bf.current.__windows;c<d.length;){var e=d[c];++c;e.set_cursor(b)}return ve.__cursor=a};var lf={};h["openfl.ui._MouseCursor.MouseCursor_Impl_"]=lf;lf.__name__="openfl.ui._MouseCursor.MouseCursor_Impl_";lf.fromLimeCursor=function(a){switch(a._hx_index){case 0:return"arrow";case 1:return"crosshair";case 2:return"auto";case 3:return"hand";case 4:return"button";case 5:return"resize_nesw";case 6:return"resize_ns";case 7:return"resize_nwse";case 8:return"resize_we";
case 9:return"ibeam";case 10:return"wait";case 11:return"waitarrow";case 12:return"custom"}};lf.toLimeCursor=function(a){switch(a){case "arrow":return Kd.ARROW;case "auto":return Kd.DEFAULT;case "button":return Kd.POINTER;case "crosshair":return Kd.CROSSHAIR;case "custom":return Kd.CUSTOM;case "hand":return Kd.MOVE;case "ibeam":return Kd.TEXT;case "resize_nesw":return Kd.RESIZE_NESW;case "resize_ns":return Kd.RESIZE_NS;case "resize_nwse":return Kd.RESIZE_NWSE;case "resize_we":return Kd.RESIZE_WE;
case "wait":return Kd.WAIT;case "waitarrow":return Kd.WAIT_ARROW;default:return Kd.DEFAULT}};var Oe=function(){};h["openfl.ui.Multitouch"]=Oe;Oe.__name__="openfl.ui.Multitouch";Oe.__properties__={get_supportsTouchEvents:"get_supportsTouchEvents"};Oe.get_supportsTouchEvents=function(){return"ontouchstart"in document.documentElement||window.DocumentTouch&&document instanceof DocumentTouch?!0:!1};var Ql={};h["openfl.ui._MultitouchInputMode.MultitouchInputMode_Impl_"]=Ql;Ql.__name__="openfl.ui._MultitouchInputMode.MultitouchInputMode_Impl_";
Ql.fromString=function(a){switch(a){case "gesture":return 0;case "none":return 1;case "touchPoint":return 2;default:return null}};Ql.toString=function(a){switch(a){case 0:return"gesture";case 1:return"none";case 2:return"touchPoint";default:return null}};var Z=function(a){null==a&&(a=!1);this.debugEnabled=a;Z.initialized||Z.init()};h["openfl.utils.AGALMiniAssembler"]=Z;Z.__name__="openfl.utils.AGALMiniAssembler";Z.init=function(){Z.initialized=!0;var a=Z.OPMAP,b=new gc("mov",2,0,0);null!=q.mov?a.setReserved("mov",
b):a.h.mov=b;var c=Z.OPMAP,d=new gc("add",3,1,0);null!=q.add?c.setReserved("add",d):c.h.add=d;var e=Z.OPMAP,f=new gc("sub",3,2,0);null!=q.sub?e.setReserved("sub",f):e.h.sub=f;var g=Z.OPMAP,k=new gc("mul",3,3,0);null!=q.mul?g.setReserved("mul",k):g.h.mul=k;var l=Z.OPMAP,m=new gc("div",3,4,0);null!=q.div?l.setReserved("div",m):l.h.div=m;var p=Z.OPMAP,n=new gc("rcp",2,5,0);null!=q.rcp?p.setReserved("rcp",n):p.h.rcp=n;var h=Z.OPMAP,r=new gc("min",3,6,0);null!=q.min?h.setReserved("min",r):h.h.min=r;var t=
Z.OPMAP,u=new gc("max",3,7,0);null!=q.max?t.setReserved("max",u):t.h.max=u;var x=Z.OPMAP,v=new gc("frc",2,8,0);null!=q.frc?x.setReserved("frc",v):x.h.frc=v;var w=Z.OPMAP,C=new gc("sqt",2,9,0);null!=q.sqt?w.setReserved("sqt",C):w.h.sqt=C;var J=Z.OPMAP,Q=new gc("rsq",2,10,0);null!=q.rsq?J.setReserved("rsq",Q):J.h.rsq=Q;var F=Z.OPMAP,B=new gc("pow",3,11,0);null!=q.pow?F.setReserved("pow",B):F.h.pow=B;var D=Z.OPMAP,A=new gc("log",2,12,0);null!=q.log?D.setReserved("log",A):D.h.log=A;var E=Z.OPMAP,G=new gc("exp",
2,13,0);null!=q.exp?E.setReserved("exp",G):E.h.exp=G;var H=Z.OPMAP,I=new gc("nrm",2,14,0);null!=q.nrm?H.setReserved("nrm",I):H.h.nrm=I;var y=Z.OPMAP,K=new gc("sin",2,15,0);null!=q.sin?y.setReserved("sin",K):y.h.sin=K;var L=Z.OPMAP,M=new gc("cos",2,16,0);null!=q.cos?L.setReserved("cos",M):L.h.cos=M;var N=Z.OPMAP,P=new gc("crs",3,17,0);null!=q.crs?N.setReserved("crs",P):N.h.crs=P;var S=Z.OPMAP,T=new gc("dp3",3,18,0);null!=q.dp3?S.setReserved("dp3",T):S.h.dp3=T;var U=Z.OPMAP,Pa=new gc("dp4",3,19,0);
null!=q.dp4?U.setReserved("dp4",Pa):U.h.dp4=Pa;var da=Z.OPMAP,Ca=new gc("abs",2,20,0);null!=q.abs?da.setReserved("abs",Ca):da.h.abs=Ca;var Aa=Z.OPMAP,X=new gc("neg",2,21,0);null!=q.neg?Aa.setReserved("neg",X):Aa.h.neg=X;var W=Z.OPMAP,Y=new gc("sat",2,22,0);null!=q.sat?W.setReserved("sat",Y):W.h.sat=Y;var aa=Z.OPMAP,O=new gc("m33",3,23,16);null!=q.m33?aa.setReserved("m33",O):aa.h.m33=O;var ba=Z.OPMAP,R=new gc("m44",3,24,16);null!=q.m44?ba.setReserved("m44",R):ba.h.m44=R;var ea=Z.OPMAP,V=new gc("m34",
3,25,16);null!=q.m34?ea.setReserved("m34",V):ea.h.m34=V;var cc=Z.OPMAP,ca=new gc("ddx",2,26,288);null!=q.ddx?cc.setReserved("ddx",ca):cc.h.ddx=ca;var fa=Z.OPMAP,ha=new gc("ddy",2,27,288);null!=q.ddy?fa.setReserved("ddy",ha):fa.h.ddy=ha;var ia=Z.OPMAP,De=new gc("ife",2,28,897);null!=q.ife?ia.setReserved("ife",De):ia.h.ife=De;var ma=Z.OPMAP,na=new gc("ine",2,29,897);null!=q.ine?ma.setReserved("ine",na):ma.h.ine=na;var la=Z.OPMAP,ja=new gc("ifg",2,30,897);null!=q.ifg?la.setReserved("ifg",ja):la.h.ifg=
ja;var oa=Z.OPMAP,ka=new gc("ifl",2,31,897);null!=q.ifl?oa.setReserved("ifl",ka):oa.h.ifl=ka;var pa=Z.OPMAP,qa=new gc("els",0,32,1921);null!=q.els?pa.setReserved("els",qa):pa.h.els=qa;var ra=Z.OPMAP,Ed=new gc("eif",0,33,1409);null!=q.eif?ra.setReserved("eif",Ed):ra.h.eif=Ed;var va=Z.OPMAP,Ja=new gc("kil",1,39,160);null!=q.kil?va.setReserved("kil",Ja):va.h.kil=Ja;var sa=Z.OPMAP,ua=new gc("tex",3,40,40);null!=q.tex?sa.setReserved("tex",ua):sa.h.tex=ua;var ta=Z.OPMAP,Ka=new gc("sge",3,41,0);null!=q.sge?
ta.setReserved("sge",Ka):ta.h.sge=Ka;var Wd=Z.OPMAP,wa=new gc("slt",3,42,0);null!=q.slt?Wd.setReserved("slt",wa):Wd.h.slt=wa;var Sa=Z.OPMAP,ya=new gc("sgn",2,43,0);null!=q.sgn?Sa.setReserved("sgn",ya):Sa.h.sgn=ya;var xa=Z.OPMAP,Lc=new gc("seq",3,44,0);null!=q.seq?xa.setReserved("seq",Lc):xa.h.seq=Lc;var za=Z.OPMAP,ed=new gc("sne",3,45,0);null!=q.sne?za.setReserved("sne",ed):za.h.sne=ed;var pe=Z.SAMPLEMAP,Ba=new qd("rgba",8,0);null!=q.rgba?pe.setReserved("rgba",Ba):pe.h.rgba=Ba;var Da=Z.SAMPLEMAP,
Ea=new qd("compressed",8,1);null!=q.compressed?Da.setReserved("compressed",Ea):Da.h.compressed=Ea;var Fa=Z.SAMPLEMAP,Ha=new qd("compressedalpha",8,2);null!=q.compressedalpha?Fa.setReserved("compressedalpha",Ha):Fa.h.compressedalpha=Ha;var Ia=Z.SAMPLEMAP,Ga=new qd("dxt1",8,1);null!=q.dxt1?Ia.setReserved("dxt1",Ga):Ia.h.dxt1=Ga;var La=Z.SAMPLEMAP,Na=new qd("dxt5",8,2);null!=q.dxt5?La.setReserved("dxt5",Na):La.h.dxt5=Na;var Wa=Z.SAMPLEMAP,Ra=new qd("video",8,3);null!=q.video?Wa.setReserved("video",Ra):
Wa.h.video=Ra;var Va=Z.SAMPLEMAP,Xa=new qd("2d",12,0);null!=q["2d"]?Va.setReserved("2d",Xa):Va.h["2d"]=Xa;var Ma=Z.SAMPLEMAP,Ta=new qd("3d",12,2);null!=q["3d"]?Ma.setReserved("3d",Ta):Ma.h["3d"]=Ta;var Ua=Z.SAMPLEMAP,Za=new qd("cube",12,1);null!=q.cube?Ua.setReserved("cube",Za):Ua.h.cube=Za;var Ya=Z.SAMPLEMAP,ab=new qd("mipnearest",24,1);null!=q.mipnearest?Ya.setReserved("mipnearest",ab):Ya.h.mipnearest=ab;var cb=Z.SAMPLEMAP,Qa=new qd("miplinear",24,2);null!=q.miplinear?cb.setReserved("miplinear",
Qa):cb.h.miplinear=Qa;var $a=Z.SAMPLEMAP,Oa=new qd("mipnone",24,0);null!=q.mipnone?$a.setReserved("mipnone",Oa):$a.h.mipnone=Oa;var bb=Z.SAMPLEMAP,rb=new qd("nomip",24,0);null!=q.nomip?bb.setReserved("nomip",rb):bb.h.nomip=rb;var eb=Z.SAMPLEMAP,fb=new qd("nearest",28,0);null!=q.nearest?eb.setReserved("nearest",fb):eb.h.nearest=fb;var gb=Z.SAMPLEMAP,db=new qd("linear",28,1);null!=q.linear?gb.setReserved("linear",db):gb.h.linear=db;var hb=Z.SAMPLEMAP,ib=new qd("anisotropic2x",28,2);null!=q.anisotropic2x?
hb.setReserved("anisotropic2x",ib):hb.h.anisotropic2x=ib;var jb=Z.SAMPLEMAP,We=new qd("anisotropic4x",28,3);null!=q.anisotropic4x?jb.setReserved("anisotropic4x",We):jb.h.anisotropic4x=We;var lb=Z.SAMPLEMAP,mb=new qd("anisotropic8x",28,4);null!=q.anisotropic8x?lb.setReserved("anisotropic8x",mb):lb.h.anisotropic8x=mb;var nb=Z.SAMPLEMAP,pb=new qd("anisotropic16x",28,5);null!=q.anisotropic16x?nb.setReserved("anisotropic16x",pb):nb.h.anisotropic16x=pb;var ob=Z.SAMPLEMAP,qb=new qd("centroid",16,1);null!=
q.centroid?ob.setReserved("centroid",qb):ob.h.centroid=qb;var kb=Z.SAMPLEMAP,sb=new qd("single",16,2);null!=q.single?kb.setReserved("single",sb):kb.h.single=sb;var Wc=Z.SAMPLEMAP,tb=new qd("ignoresampler",16,4);null!=q.ignoresampler?Wc.setReserved("ignoresampler",tb):Wc.h.ignoresampler=tb;var ub=Z.SAMPLEMAP,vb=new qd("repeat",20,1);null!=q.repeat?ub.setReserved("repeat",vb):ub.h.repeat=vb;var xb=Z.SAMPLEMAP,yb=new qd("wrap",20,1);null!=q.wrap?xb.setReserved("wrap",yb):xb.h.wrap=yb;var wb=Z.SAMPLEMAP,
Ab=new qd("clamp",20,0);null!=q.clamp?wb.setReserved("clamp",Ab):wb.h.clamp=Ab;var zb=Z.SAMPLEMAP,Bb=new qd("clamp_u_repeat_v",20,2);null!=q.clamp_u_repeat_v?zb.setReserved("clamp_u_repeat_v",Bb):zb.h.clamp_u_repeat_v=Bb;var Qb=Z.SAMPLEMAP,Cb=new qd("repeat_u_clamp_v",20,3);null!=q.repeat_u_clamp_v?Qb.setReserved("repeat_u_clamp_v",Cb):Qb.h.repeat_u_clamp_v=Cb};Z.prototype={agalcode:null,error:null,verbose:null,debugEnabled:null,assemble2:function(a,b,c,d){c=this.assemble("vertex",c,b);b=this.assemble("fragment",
d,b);a=a.createProgram();a.upload(c,b);return a},assemble:function(a,b,c,d){null==d&&(d=!1);null==c&&(c=1);var e=$a.getTimer();this.agalcode=new vc(0);this.error="";var f=!1;"fragment"==a?f=!0:"vertex"!=a&&(this.error='ERROR: mode needs to be "fragment" or "vertex" but is "'+a+'".');this.agalcode.__endian=1;this.agalcode.writeByte(160);this.agalcode.writeUnsignedInt(c);this.agalcode.writeByte(161);this.agalcode.writeByte(f?1:0);this.initregmap(c,d);a=ba.replace(b,"\r","\n").split("\n");b=0;d=a.length;
for(var g=new Ca("<.*>","g"),k=new Ca("([\\w\\.\\-\\+]+)","gi"),l=new Ca("^\\w{3}","ig"),m=new Ca("vc\\[([vofi][acostdip]?[d]?)(\\d*)?(\\.[xyzw](\\+\\d{1,3})?)?\\](\\.[xyzw]{1,4})?|([vofi][acostdip]?[d]?)(\\d*)?(\\.[xyzw]{1,4})?","gi"),p=new Ca("\\[.*\\]","ig"),n=new Ca("^\\b[A-Za-z]{1,3}","ig"),h=new Ca("\\d+",""),r=new Ca("(\\.[xyzw]{1,4})",""),t=new Ca("[A-Za-z]{1,3}","ig"),u=new Ca("(\\.[xyzw]{1,1})",""),x=new Ca("\\+\\d{1,3}","ig"),v=0;v<d&&""==this.error;){var w=ba.trim(a[v]),C=w.indexOf("//");
-1!=C&&(w=B.substr(w,0,C));var J=g.match(w)?g.matchedPos().pos:-1;C=null;-1!=J&&(C=this.match(B.substr(w,J,null),k),w=B.substr(w,0,J));J=null;if(l.match(w)){J=l.matched(0);var Q=Z.OPMAP;J=null!=q[J]?Q.getReserved(J):Q.h[J]}if(null==J)3<=w.length&&Ta.warn("warning: bad line "+v+": "+a[v],{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:262,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});else if(this.debugEnabled&&Ta.info(J,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:272,
className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"}),null==J)3<=w.length&&Ta.warn("warning: bad line "+v+": "+a[v],{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:279,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});else{w=B.substr(w,w.indexOf(J.name)+J.name.length,null);if(0!=(J.flags&256)&&2>c){this.error="error: opcode requires version 2.";break}if(0!=(J.flags&64)&&f){this.error="error: opcode is only allowed in vertex programs.";break}if(0!=(J.flags&32)&&
!f){this.error="error: opcode is only allowed in fragment programs.";break}this.verbose&&Ta.info("emit opcode="+K.string(J),{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:308,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});this.agalcode.writeUnsignedInt(J.emitCode);++b;if(4096<b){this.error="error: too many opcodes. maximum is 4096.";break}Q=this.match(w,m);if(Q.length!=J.numRegister){this.error="error: wrong number of operands. found "+Q.length+" but expected "+J.numRegister+
".";break}var F=!1;w=160;for(var D=0,A=Q.length;D<A;){var E=D++,G=!1,H=this.match(Q[E],p);0<H.length&&(Q[E]=ba.replace(Q[E],H[0],"0"),this.verbose&&Ta.info("IS REL",{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:344,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"}),G=!0);var I=this.match(Q[E],n);if(0==I.length){this.error="error: could not parse operand "+E+" ("+Q[E]+").";F=!0;break}var y=Z.REGMAP;I=I[0];I=null!=q[I]?y.getReserved(I):y.h[I];this.debugEnabled&&Ta.info(I,
{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:363,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});if(null==I){this.error="error: could not find register name for operand "+E+" ("+Q[E]+").";F=!0;break}if(f){if(0==(I.flags&32)){this.error="error: register operand "+E+" ("+Q[E]+") only allowed in vertex programs.";F=!0;break}if(G){this.error="error: register operand "+E+" ("+Q[E]+") relative adressing not allowed in fragment programs.";F=!0;break}}else if(0==(I.flags&64)){this.error=
"error: register operand "+E+" ("+Q[E]+") only allowed in fragment programs.";F=!0;break}Q[E]=B.substr(Q[E],Q[E].indexOf(I.name)+I.name.length,null);var L=G?this.match(H[0],h):this.match(Q[E],h);y=0;0<L.length&&(y=K.parseInt(L[0]));if(Da.gt(y,I.range)){C=I.range+1;this.error="error: register operand "+E+" ("+Q[E]+") index exceeds limit of "+K.string(null==C?null:Da.toFloat(C))+".";F=!0;break}var M=this.match(Q[E],r),N=0==E&&0==(J.flags&128),P=2==E&&0!=(J.flags&8),S=0,T=0,U=0;if(N&&G){this.error="error: relative can not be destination";
F=!0;break}if(0<M.length){for(var Pa=L=0,da=M[0].length,Aa=1;Aa<da;)Pa=B.cca(M[0],Aa)-120,Da.gt(Pa,2)&&(Pa=3),L=N?L|1<<Pa:L|Pa<<(Aa-1<<1),++Aa;if(!N)for(;4>=Aa;)L|=Pa<<(Aa-1<<1),++Aa}else L=N?15:228;if(G){M=this.match(H[0],t);S=Z.REGMAP;T=M[0];S=null!=q[T]?S.getReserved(T):S.h[T];if(null==S){this.error="error: bad index register";F=!0;break}S=S.emitCode;Pa=this.match(H[0],u);if(0==Pa.length){this.error="error: bad index register select";F=!0;break}T=B.cca(Pa[0],1)-120;Da.gt(T,2)&&(T=3);H=this.match(H[0],
x);0<H.length&&(U=K.parseInt(H[0]));if(0>U||255<U){this.error="error: index offset "+U+" out of bounds. [0..255]";F=!0;break}this.verbose&&Ta.info("RELATIVE: type="+S+"=="+M[0]+" sel="+K.string(null==T?null:Da.toFloat(T))+"=="+Pa[0]+" idx="+K.string(null==y?null:Da.toFloat(y))+" offset="+U,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:518,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}this.verbose&&Ta.info("  emit argcode="+K.string(I)+"["+K.string(null==y?null:Da.toFloat(y))+
"]["+L+"]",{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:525,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});if(N)this.agalcode.writeShort(y),this.agalcode.writeByte(L),this.agalcode.writeByte(I.emitCode),w-=32;else{if(P){this.verbose&&Ta.info("  emit sampler",{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:541,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});E=5;H=G=0;for(I=null==C?0:C.length;H<I;)L=H++,this.verbose&&Ta.info("    opt: "+C[L],
{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:552,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"}),N=Z.SAMPLEMAP,P=C[L],N=null!=q[P]?N.getReserved(P):N.h[P],null==N?(G=parseFloat(C[L]),this.verbose&&Ta.info("    bias: "+G,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:565,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})):(16!=N.flag&&(E&=~(15<<N.flag)),E|=N.mask<<N.flag);this.agalcode.writeShort(y);this.agalcode.writeByte(8*G|0);this.agalcode.writeByte(0);
this.agalcode.writeUnsignedInt(E);this.verbose&&Ta.info("    bits: "+(E-5),{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:586,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}else 0==E&&(this.agalcode.writeUnsignedInt(0),w-=32),this.agalcode.writeShort(y),this.agalcode.writeByte(U),this.agalcode.writeByte(L),this.agalcode.writeByte(I.emitCode),this.agalcode.writeByte(S),this.agalcode.writeShort(G?T|32768:0);w-=64}}for(C=0;C<w;)this.agalcode.writeByte(0),C+=8;if(F)break}++v}""!=
this.error&&(this.error+="\n  at line "+v+" "+a[v],za.set_length(this.agalcode,0),Ta.info(this.error,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:631,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"}));if(this.debugEnabled){c="generated bytecode:";f=0;for(a=za.get_length(this.agalcode);f<a;)b=f++,0==b%16&&(c+="\n"),0==b%4&&(c+=" "),b=ba.hex(this.agalcode.b[b],2),2>b.length&&(b="0"+b),c+=b;Ta.info(c,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:662,className:"openfl.utils.AGALMiniAssembler",
methodName:"assemble"})}this.verbose&&Ta.info("AGALMiniAssembler.assemble time: "+($a.getTimer()-e)/1E3+"s",{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:667,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});return this.agalcode},initregmap:function(a,b){var c=Z.REGMAP,d=new Nf("va","vertex attribute",0,b?1024:1==a||2==a?7:15,66);null!=q.va?c.setReserved("va",d):c.h.va=d;c=Z.REGMAP;d=new Nf("vc","vertex constant",1,b?1024:1==a?127:249,66);null!=q.vc?c.setReserved("vc",
d):c.h.vc=d;c=Z.REGMAP;d=new Nf("vt","vertex temporary",2,b?1024:1==a?7:25,67);null!=q.vt?c.setReserved("vt",d):c.h.vt=d;c=Z.REGMAP;d=new Nf("vo","vertex output",3,b?1024:0,65);null!=q.vo?c.setReserved("vo",d):c.h.vo=d;c=Z.REGMAP;d=new Nf("vi","varying",4,b?1024:1==a?7:9,99);null!=q.vi?c.setReserved("vi",d):c.h.vi=d;c=Z.REGMAP;d=new Nf("fc","fragment constant",1,b?1024:1==a?27:2==a?63:199,34);null!=q.fc?c.setReserved("fc",d):c.h.fc=d;c=Z.REGMAP;d=new Nf("ft","fragment temporary",2,b?1024:1==a?7:25,
35);null!=q.ft?c.setReserved("ft",d):c.h.ft=d;c=Z.REGMAP;d=new Nf("fs","texture sampler",5,b?1024:7,34);null!=q.fs?c.setReserved("fs",d):c.h.fs=d;c=Z.REGMAP;d=new Nf("fo","fragment output",3,b?1024:1==a?0:3,33);null!=q.fo?c.setReserved("fo",d):c.h.fo=d;c=Z.REGMAP;a=new Nf("fd","fragment depth output",6,b?1024:1==a?-1:0,33);null!=q.fd?c.setReserved("fd",a):c.h.fd=a;a=Z.REGMAP;b=new Nf("iid","instance id",7,b?1024:0,66);null!=q.iid?a.setReserved("iid",b):a.h.iid=b;a=b=Z.REGMAP;a=null!=q.vo?a.getReserved("vo"):
a.h.vo;null!=q.op?b.setReserved("op",a):b.h.op=a;a=b=Z.REGMAP;a=null!=q.vi?a.getReserved("vi"):a.h.vi;null!=q.i?b.setReserved("i",a):b.h.i=a;a=b=Z.REGMAP;a=null!=q.vi?a.getReserved("vi"):a.h.vi;null!=q.v?b.setReserved("v",a):b.h.v=a;a=b=Z.REGMAP;a=null!=q.fo?a.getReserved("fo"):a.h.fo;null!=q.oc?b.setReserved("oc",a):b.h.oc=a;a=b=Z.REGMAP;a=null!=q.fd?a.getReserved("fd"):a.h.fd;null!=q.od?b.setReserved("od",a):b.h.od=a;a=b=Z.REGMAP;a=null!=q.vi?a.getReserved("vi"):a.h.vi;null!=q.fi?b.setReserved("fi",
a):b.h.fi=a},match:function(a,b){for(var c=[],d=0;b.matchSub(a,d);)d=b.matched(0),c.push(d),d=b.matchedPos().pos+d.length;return c},__class__:Z};var gc=function(a,b,c,d){this.name=a;this.numRegister=b;this.emitCode=c;this.flags=d};h["openfl.utils._AGALMiniAssembler.OpCode"]=gc;gc.__name__="openfl.utils._AGALMiniAssembler.OpCode";gc.prototype={emitCode:null,flags:null,name:null,numRegister:null,toString:function(){return'[OpCode name="'+this.name+'", numRegister='+this.numRegister+", emitCode="+this.emitCode+
", flags="+this.flags+"]"},__class__:gc};var Nf=function(a,b,c,d,e){this.name=a;this.longName=b;this.emitCode=c;this.range=d;this.flags=e};h["openfl.utils._AGALMiniAssembler.Register"]=Nf;Nf.__name__="openfl.utils._AGALMiniAssembler.Register";Nf.prototype={emitCode:null,name:null,longName:null,flags:null,range:null,toString:function(){var a=this.emitCode;a='[Register name="'+this.name+'", longName="'+this.longName+'", emitCode='+K.string(null==a?null:Da.toFloat(a))+", range=";var b=this.range;a=a+
K.string(null==b?null:Da.toFloat(b))+", flags=";b=this.flags;return a+K.string(null==b?null:Da.toFloat(b))+"]"},__class__:Nf};var qd=function(a,b,c){this.name=a;this.flag=b;this.mask=c};h["openfl.utils._AGALMiniAssembler.Sampler"]=qd;qd.__name__="openfl.utils._AGALMiniAssembler.Sampler";qd.prototype={flag:null,mask:null,name:null,toString:function(){var a=this.flag;a='[Sampler name="'+this.name+'", flag="'+K.string(null==a?null:Da.toFloat(a))+'", mask=';var b=this.mask;return a+K.string(null==b?null:
Da.toFloat(b))+"]"},__class__:qd};var zp=function(){};h["openfl.utils.IAssetCache"]=zp;zp.__name__="openfl.utils.IAssetCache";zp.__isInterface__=!0;zp.prototype={get_enabled:null,set_enabled:null,clear:null,getBitmapData:null,getFont:null,getSound:null,hasBitmapData:null,hasFont:null,hasSound:null,removeBitmapData:null,removeFont:null,removeSound:null,setBitmapData:null,setFont:null,setSound:null,__class__:zp,__properties__:{set_enabled:"set_enabled",get_enabled:"get_enabled"}};var Ap=function(){this.__enabled=
!0;this.bitmapData=new ua;this.font=new ua;this.sound=new ua};h["openfl.utils.AssetCache"]=Ap;Ap.__name__="openfl.utils.AssetCache";Ap.__interfaces__=[zp];Ap.prototype={bitmapData:null,font:null,sound:null,__enabled:null,clear:function(a){if(null==a)this.bitmapData=new ua,this.font=new ua,this.sound=new ua;else{for(var b=this.bitmapData.keys();b.hasNext();){var c=b.next();ba.startsWith(c,a)&&this.removeBitmapData(c)}for(b=this.font.keys();b.hasNext();)c=b.next(),ba.startsWith(c,a)&&this.removeFont(c);
for(b=this.sound.keys();b.hasNext();)c=b.next(),ba.startsWith(c,a)&&this.removeSound(c)}},getBitmapData:function(a){var b=this.bitmapData;return null!=q[a]?b.getReserved(a):b.h[a]},getFont:function(a){var b=this.font;return null!=q[a]?b.getReserved(a):b.h[a]},getSound:function(a){var b=this.sound;return null!=q[a]?b.getReserved(a):b.h[a]},hasBitmapData:function(a){var b=this.bitmapData;return null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a)},hasFont:function(a){var b=this.font;return null!=q[a]?
b.existsReserved(a):b.h.hasOwnProperty(a)},hasSound:function(a){var b=this.sound;return null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a)},removeBitmapData:function(a){ta.cache.image.remove(a);return this.bitmapData.remove(a)},removeFont:function(a){ta.cache.font.remove(a);return this.font.remove(a)},removeSound:function(a){ta.cache.audio.remove(a);return this.sound.remove(a)},setBitmapData:function(a,b){var c=this.bitmapData;null!=q[a]?c.setReserved(a,b):c.h[a]=b},setFont:function(a,b){var c=
this.font;null!=q[a]?c.setReserved(a,b):c.h[a]=b},setSound:function(a,b){var c=this.sound;null!=q[a]?c.setReserved(a,b):c.h[a]=b},get_enabled:function(){return this.__enabled},set_enabled:function(a){return this.__enabled=a},__class__:Ap,__properties__:{set_enabled:"set_enabled",get_enabled:"get_enabled"}};var Ea=function(){};h["openfl.utils.Assets"]=Ea;Ea.__name__="openfl.utils.Assets";Ea.addEventListener=function(a,b,c,d,e){null==e&&(e=!1);null==d&&(d=0);null==c&&(c=!1);ta.onChange.has(Ea.LimeAssets_onChange)||
ta.onChange.add(Ea.LimeAssets_onChange);Ea.dispatcher.addEventListener(a,b,c,d,e)};Ea.dispatchEvent=function(a){return Ea.dispatcher.dispatchEvent(a)};Ea.exists=function(a,b){return ta.exists(a,b)};Ea.getBitmapData=function(a,b){null==b&&(b=!0);if(b&&Ea.cache.get_enabled()&&Ea.cache.hasBitmapData(a)){var c=Ea.cache.getBitmapData(a);if(Ea.isValidBitmapData(c))return c}c=ta.getImage(a,!1);return null!=c?(c=na.fromImage(c),b&&Ea.cache.get_enabled()&&Ea.cache.setBitmapData(a,c),c):null};Ea.getBytes=function(a){return za.fromBytes(ta.getBytes(a))};
Ea.getFont=function(a,b){null==b&&(b=!0);if(b&&Ea.cache.get_enabled()&&Ea.cache.hasFont(a))return Ea.cache.getFont(a);var c=ta.getFont(a,!1);if(null!=c){var d=new tc;d.__fromLimeFont(c);b&&Ea.cache.get_enabled()&&Ea.cache.setFont(a,d);return d}return new tc};Ea.getLibrary=function(a){return ta.getLibrary(a)};Ea.getMovieClip=function(a){var b=a.substring(0,a.indexOf(":")),c=B.substr(a,a.indexOf(":")+1,null),d=Ea.getLibrary(b);if(null!=d){if(d instanceof kc&&d.exists(c,"MOVIE_CLIP")){if(d.isLocal(c,
"MOVIE_CLIP"))return d.getMovieClip(c);Ta.error('MovieClip asset "'+a+'" exists, but only asynchronously',{fileName:"openfl/utils/Assets.hx",lineNumber:207,className:"openfl.utils.Assets",methodName:"getMovieClip"});return null}Ta.error('There is no MovieClip asset with an ID of "'+a+'"',{fileName:"openfl/utils/Assets.hx",lineNumber:213,className:"openfl.utils.Assets",methodName:"getMovieClip"})}else Ta.error('There is no asset library named "'+b+'"',{fileName:"openfl/utils/Assets.hx",lineNumber:217,
className:"openfl.utils.Assets",methodName:"getMovieClip"});return null};Ea.getMusic=function(a,b){null==b&&(b=!0);return Ea.getSound(a,b)};Ea.getPath=function(a){return ta.getPath(a)};Ea.getSound=function(a,b){null==b&&(b=!0);if(b&&Ea.cache.get_enabled()&&Ea.cache.hasSound(a)){var c=Ea.cache.getSound(a);if(Ea.isValidSound(c))return c}c=ta.getAudioBuffer(a,!1);return null!=c?(c=Yf.fromAudioBuffer(c),b&&Ea.cache.get_enabled()&&Ea.cache.setSound(a,c),c):null};Ea.getText=function(a){return ta.getText(a)};
Ea.hasEventListener=function(a){return Ea.dispatcher.hasEventListener(a)};Ea.hasLibrary=function(a){return ta.hasLibrary(a)};Ea.isLocal=function(a,b,c){null==c&&(c=!0);if(c&&Ea.cache.get_enabled()&&(("IMAGE"==b||null==b)&&Ea.cache.hasBitmapData(a)||("FONT"==b||null==b)&&Ea.cache.hasFont(a)||("SOUND"==b||"MUSIC"==b||null==b)&&Ea.cache.hasSound(a)))return!0;c=a.substring(0,a.indexOf(":"));a=B.substr(a,a.indexOf(":")+1,null);c=Ea.getLibrary(c);return null!=c?c.isLocal(a,b):!1};Ea.isValidBitmapData=function(a){return null!=
a&&null!=a.image};Ea.isValidSound=function(a){return!0};Ea.list=function(a){return ta.list(a)};Ea.loadBitmapData=function(a,b){null==b&&(b=!0);null==b&&(b=!0);var c=new Jd;if(b&&Ea.cache.get_enabled()&&Ea.cache.hasBitmapData(a)){var d=Ea.cache.getBitmapData(a);if(Ea.isValidBitmapData(d))return c.complete(d),c.future}ta.loadImage(a,!1).onComplete(function(d){null!=d?(d=na.fromImage(d),b&&Ea.cache.get_enabled()&&Ea.cache.setBitmapData(a,d),c.complete(d)):c.error('[Assets] Could not load Image "'+a+
'"')}).onError(v(c,c.error)).onProgress(v(c,c.progress));return c.future};Ea.loadBytes=function(a){var b=new Jd;a=ta.loadBytes(a);a.onComplete(function(a){b.complete(za.fromBytes(a))});a.onProgress(function(a,d){b.progress(a,d)});a.onError(function(a){b.error(a)});return b.future};Ea.loadFont=function(a,b){null==b&&(b=!0);null==b&&(b=!0);var c=new Jd;if(b&&Ea.cache.get_enabled()&&Ea.cache.hasFont(a)){var d=Ea.cache.getFont(a);c.complete(d);return c.future}ta.loadFont(a).onComplete(function(d){var e=
new tc;e.__fromLimeFont(d);b&&Ea.cache.get_enabled()&&Ea.cache.setFont(a,e);c.complete(e)}).onError(v(c,c.error)).onProgress(v(c,c.progress));return c.future};Ea.loadLibrary=function(a){return ta.loadLibrary(a).then(function(b){var c=null;null!=b&&(b instanceof kc?c=b:(c=new kc,c.__proxy=b,ta.registerLibrary(a,c)));return xb.withValue(c)})};Ea.loadMusic=function(a,b){null==b&&(b=!0);null==b&&(b=!0);return new xb(function(){return Ea.getMusic(a,b)})};Ea.loadMovieClip=function(a){var b=new Jd,c=a.substring(0,
a.indexOf(":")),d=B.substr(a,a.indexOf(":")+1,null),e=Ea.getLibrary(c);if(null!=e){if(e instanceof kc&&e.exists(d,"MOVIE_CLIP"))return b.completeWith(e.loadMovieClip(d)),b.future;b.error('[Assets] There is no MovieClip asset with an ID of "'+a+'"')}else b.error('[Assets] There is no asset library named "'+c+'"');return b.future};Ea.loadSound=function(a,b){null==b&&(b=!0);null==b&&(b=!0);var c=new Jd;ta.loadAudioBuffer(a,b).onComplete(function(d){null!=d?(d=Yf.fromAudioBuffer(d),b&&Ea.cache.get_enabled()&&
Ea.cache.setSound(a,d),c.complete(d)):c.error('[Assets] Could not load Sound "'+a+'"')}).onError(v(c,c.error)).onProgress(v(c,c.progress));return c.future};Ea.loadText=function(a){return ta.loadText(a)};Ea.registerLibrary=function(a,b){ta.registerLibrary(a,b)};Ea.removeEventListener=function(a,b,c){null==c&&(c=!1);Ea.dispatcher.removeEventListener(a,b,c)};Ea.resolveClass=function(a){return h[a]};Ea.resolveEnum=function(a){return C[a]};Ea.unloadLibrary=function(a){ta.unloadLibrary(a)};Ea.LimeAssets_onChange=
function(){Ea.dispatchEvent(new da("change"))};var za={};h["openfl.utils._ByteArray.ByteArray_Impl_"]=za;za.__name__="openfl.utils._ByteArray.ByteArray_Impl_";za.__properties__={set_position:"set_position",get_position:"get_position",set_length:"set_length",get_length:"get_length",get_bytesAvailable:"get_bytesAvailable",set_defaultObjectEncoding:"set_defaultObjectEncoding",get_defaultObjectEncoding:"get_defaultObjectEncoding",set_defaultEndian:"set_defaultEndian",get_defaultEndian:"get_defaultEndian"};
za._new=function(a){null==a&&(a=0);return new vc(a)};za.clear=function(a){a.clear()};za.compress=function(a,b){a.compress(b)};za.deflate=function(a){a.deflate()};za.fromArrayBuffer=function(a){return null==a?null:vc.fromBytes(hb.ofData(a))};za.fromBytes=function(a){return null==a?null:a instanceof vc?a:vc.fromBytes(a)};za.fromBytesData=function(a){return null==a?null:vc.fromBytes(hb.ofData(a))};za.fromFile=function(a){return za.fromBytes(Kc.fromFile(a))};za.fromLimeBytes=function(a){return za.fromBytes(a)};
za.get=function(a,b){return a.b[b]};za.inflate=function(a){a.inflate()};za.loadFromBytes=function(a){return Kc.loadFromBytes(a).then(function(a){a=za.fromBytes(a);return xb.withValue(a)})};za.loadFromFile=function(a){return Kc.loadFromFile(a).then(function(a){a=za.fromBytes(a);return xb.withValue(a)})};za.readBoolean=function(a){return a.readBoolean()};za.readByte=function(a){return a.readByte()};za.readBytes=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);a.readBytes(b,c,d)};za.readDouble=function(a){return a.readDouble()};
za.readFloat=function(a){return a.readFloat()};za.readInt=function(a){return a.readInt()};za.readMultiByte=function(a,b,c){return a.readMultiByte(b,c)};za.readObject=function(a){return a.readObject()};za.readShort=function(a){return a.readShort()};za.readUTF=function(a){return a.readUTF()};za.readUTFBytes=function(a,b){return a.readUTFBytes(b)};za.readUnsignedByte=function(a){return a.readUnsignedByte()};za.readUnsignedInt=function(a){return a.readUnsignedInt()};za.readUnsignedShort=function(a){return a.readUnsignedShort()};
za.set=function(a,b,c){a.__resize(b+1);a.b[b]=c&255;return c};za.toArrayBuffer=function(a){return a.b.bufferValue};za.toBytePointer=function(a){xe.set(za.__bytePointer,a,null,null,a.position);return za.__bytePointer};za.toBytes=function(a){return a};za.toBytesData=function(a){return a.b.bufferValue};za.toLimeBytes=function(a){return za.toBytes(za.fromBytes(za.toBytes(a)))};za.toString=function(a){return a.toString()};za.uncompress=function(a,b){a.uncompress(b)};za.writeBoolean=function(a,b){a.writeBoolean(b)};
za.writeByte=function(a,b){a.writeByte(b)};za.writeBytes=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);a.writeBytes(b,c,d)};za.writeDouble=function(a,b){a.writeDouble(b)};za.writeFloat=function(a,b){a.writeFloat(b)};za.writeInt=function(a,b){a.writeInt(b)};za.writeMultiByte=function(a,b,c){a.writeMultiByte(b,c)};za.writeObject=function(a,b){a.writeObject(b)};za.writeShort=function(a,b){a.writeShort(b)};za.writeUTF=function(a,b){a.writeUTF(b)};za.writeUTFBytes=function(a,b){a.writeUTFBytes(b)};za.writeUnsignedInt=
function(a,b){a.writeUnsignedInt(b)};za.get_bytesAvailable=function(a){return a.length-a.position};za.get_defaultEndian=function(){null==vc.__defaultEndian&&(Ra.get_endianness()==Oi.LITTLE_ENDIAN?vc.__defaultEndian=1:vc.__defaultEndian=0);return vc.__defaultEndian};za.set_defaultEndian=function(a){return vc.__defaultEndian=a};za.get_defaultObjectEncoding=function(){return vc.defaultObjectEncoding};za.set_defaultObjectEncoding=function(a){return vc.defaultObjectEncoding=a};za.get_endian=function(a){return a.__endian};
za.set_endian=function(a,b){return a.__endian=b};za.get_length=function(a){return null==a?0:a.length};za.set_length=function(a,b){0<b&&(a.__resize(b),b<a.position&&(a.position=b));return a.length=b};za.get_objectEncoding=function(a){return a.objectEncoding};za.set_objectEncoding=function(a,b){return a.objectEncoding=b};za.get_position=function(a){return a.position};za.set_position=function(a,b){return a.position=b};var Bp=function(){};h["openfl.utils.IDataOutput"]=Bp;Bp.__name__="openfl.utils.IDataOutput";
Bp.__isInterface__=!0;Bp.prototype={get_endian:null,set_endian:null,objectEncoding:null,writeBoolean:null,writeByte:null,writeBytes:null,writeDouble:null,writeFloat:null,writeInt:null,writeMultiByte:null,writeObject:null,writeShort:null,writeUnsignedInt:null,writeUTF:null,writeUTFBytes:null,__class__:Bp,__properties__:{set_endian:"set_endian",get_endian:"get_endian"}};var Cp=function(){};h["openfl.utils.IDataInput"]=Cp;Cp.__name__="openfl.utils.IDataInput";Cp.__isInterface__=!0;Cp.prototype={get_bytesAvailable:null,
get_endian:null,set_endian:null,objectEncoding:null,readBoolean:null,readByte:null,readBytes:null,readDouble:null,readFloat:null,readInt:null,readMultiByte:null,readObject:null,readShort:null,readUnsignedByte:null,readUnsignedInt:null,readUnsignedShort:null,readUTF:null,readUTFBytes:null,__class__:Cp,__properties__:{set_endian:"set_endian",get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}};var vc=function(a){null==a&&(a=0);var b=new hb(new ArrayBuffer(a));hb.call(this,b.b.buffer);this.__length=
a;null==vc.__defaultEndian&&(Ra.get_endianness()==Oi.LITTLE_ENDIAN?vc.__defaultEndian=1:vc.__defaultEndian=0);this.__endian=vc.__defaultEndian;this.objectEncoding=vc.defaultObjectEncoding;this.position=0};h["openfl.utils.ByteArrayData"]=vc;vc.__name__="openfl.utils.ByteArrayData";vc.__interfaces__=[Bp,Cp];vc.__properties__={set_defaultEndian:"set_defaultEndian",get_defaultEndian:"get_defaultEndian"};vc.fromBytes=function(a){var b=new vc;b.__fromBytes(a);return b};vc.get_defaultEndian=function(){null==
vc.__defaultEndian&&(Ra.get_endianness()==Oi.LITTLE_ENDIAN?vc.__defaultEndian=1:vc.__defaultEndian=0);return vc.__defaultEndian};vc.set_defaultEndian=function(a){return vc.__defaultEndian=a};vc.__super__=hb;vc.prototype=w(hb.prototype,{objectEncoding:null,position:null,__endian:null,__length:null,clear:function(){this.position=this.length=0},compress:function(a){null==a&&(a=2);if(this.__length>this.length){var b=this.length;this.length=this.__length;var c=new hb(new ArrayBuffer(b));c.blit(0,this,
0,b);this.b=c.b;this.__length=c.length;this.data=c.data;this.length=b}switch(a){case 0:a=Kc.compress(this,ml.DEFLATE);break;case 1:a=Kc.compress(this,ml.LZMA);break;default:a=Kc.compress(this,ml.ZLIB)}null!=a&&(this.b=a.b,this.__length=a.length,this.data=a.data,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.b[this.position++];throw new E(new Mh);},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 E(new Mh);a.length<b+c&&a.__resize(b+c);a.blit(b,this,this.position,c);this.position+=c},readDouble:function(){if(1==this.__endian){if(this.position+8>this.length)throw new E(new Mh);this.position+=8;return this.getDouble(this.position-8)}var a=this.readInt(),b=this.readInt();return zd.i64ToDouble(b,a)},readFloat:function(){if(1==
this.__endian){if(this.position+4>this.length)throw new E(new Mh);this.position+=4;return this.getFloat(this.position-4)}return zd.i32ToFloat(this.readInt())},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)},readObject:function(){switch(this.objectEncoding){case 10:var a=this.readUTF();return af.run(a);
case 12:return a=this.readUTF(),JSON.parse(a);default:return null}},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.b[this.position++];throw new E(new Mh);},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 E(new Mh);this.position+=a;return this.getString(this.position-a,a)},uncompress:function(a){null==a&&(a=2);if(this.__length>this.length){var b=this.length;this.length=this.__length;var c=new hb(new ArrayBuffer(b));c.blit(0,
this,0,b);this.b=c.b;this.__length=c.length;this.data=c.data;this.length=b}switch(a){case 0:a=Kc.decompress(this,ml.DEFLATE);break;case 1:a=Kc.decompress(this,ml.LZMA);break;default:a=Kc.decompress(this,ml.ZLIB)}null!=a&&(this.b=a.b,this.__length=a.length,this.data=a.data,this.length=this.__length);this.position=0},writeBoolean:function(a){this.writeByte(a?1:0)},writeByte:function(a){this.__resize(this.position+1);this.b[this.position++]=a&255},writeBytes:function(a,b,c){null==c&&(c=0);null==b&&(b=
0);0!=za.get_length(a)&&(0==c&&(c=za.get_length(a)-b),this.__resize(this.position+c),this.blit(this.position,a,b,c),this.position+=c)},writeDouble:function(a){a=zd.doubleToI64(a);1==this.__endian?(this.writeInt(a.low),this.writeInt(a.high)):(this.writeInt(a.high),this.writeInt(a.low))},writeFloat:function(a){1==this.__endian?(this.__resize(this.position+4),this.setFloat(this.position,a),this.position+=4):(a=zd.floatToI32(a),this.writeInt(a))},writeInt:function(a){this.__resize(this.position+4);1==
this.__endian?(this.b[this.position++]=a&255,this.b[this.position++]=a>>8&255,this.b[this.position++]=a>>16&255,this.b[this.position++]=a>>24&255):(this.b[this.position++]=a>>24&255,this.b[this.position++]=a>>16&255,this.b[this.position++]=a>>8&255,this.b[this.position++]=a&255)},writeMultiByte:function(a,b){this.writeUTFBytes(a)},writeObject:function(a){switch(this.objectEncoding){case 10:a=Id.run(a);this.writeUTF(a);break;case 12:a=JSON.stringify(a),this.writeUTF(a)}},writeShort:function(a){this.__resize(this.position+
2);1==this.__endian?(this.b[this.position++]=a&255,this.b[this.position++]=a>>8&255):(this.b[this.position++]=a>>8&255,this.b[this.position++]=a&255)},writeUnsignedInt:function(a){this.writeInt(a)},writeUTF:function(a){a=hb.ofString(a);this.writeShort(a.length);this.writeBytes(za.fromBytes(a))},writeUTFBytes:function(a){a=hb.ofString(a);this.writeBytes(za.fromBytes(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=
new hb(new ArrayBuffer(3*(a+1)>>1));if(0<this.__length){var c=this.length;this.length=this.__length;b.blit(0,this,0,this.__length);this.length=c}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__:vc,__properties__:{set_endian:"set_endian",
get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}});var Rl={};h["openfl.utils._CompressionAlgorithm.CompressionAlgorithm_Impl_"]=Rl;Rl.__name__="openfl.utils._CompressionAlgorithm.CompressionAlgorithm_Impl_";Rl.fromString=function(a){switch(a){case "deflate":return 0;case "lzma":return 1;case "zlib":return 2;default:return null}};Rl.toString=function(a){switch(a){case 0:return"deflate";case 1:return"lzma";case 2:return"zlib";default:return null}};var Ke={};h["openfl.utils._Dictionary.Dictionary_Impl_"]=
Ke;Ke.__name__="openfl.utils._Dictionary.Dictionary_Impl_";Ke.exists=function(a,b){return a.exists(b)};Ke.get=function(a,b){return a.get(b)};Ke.keyValueIterator=function(a){return a.keyValueIterator()};Ke.remove=function(a,b){return a.remove(b)};Ke.set=function(a,b,c){a.set(b,c);return c};Ke.iterator=function(a){return a.keys()};Ke.each=function(a){return a.iterator()};Ke.toStringMap=function(a,b){return new ua};Ke.toIntMap=function(a,b){return new Wa};Ke.toFloatMap=function(a,b){return new tk};Ke.toEnumValueMapMap=
function(a,b){return new Cj};Ke.toObjectMap=function(a,b){return new Aa};Ke.toUtilsObjectMap=function(a,b){return new uk};Ke.toClassMap=function(a,b){return new vk};Ke.fromStringMap=function(a){return a};Ke.fromIntMap=function(a){return a};Ke.fromFloatMap=function(a){return a};Ke.fromObjectMap=function(a){return a};Ke.fromUtilsObjectMap=function(a){return a};Ke.fromClassMap=function(a){return a};var vk=function(){this.types=new ua;this.values=new ua};h["openfl.utils._Dictionary.ClassMap"]=vk;vk.__name__=
"openfl.utils._Dictionary.ClassMap";vk.__interfaces__=[Qb];vk.prototype={types:null,values:null,clear:function(){var a=this.types;a.h={};a.rh=null;a=this.values;a.h={};a.rh=null},copy:function(){for(var a=new vk,b=this.keys();b.hasNext();){var c=b.next();a.set(c,this.get(c))}return a},exists:function(a){a=a.__name__;var b=this.types;return null!=q[a]?b.existsReserved(a):b.h.hasOwnProperty(a)},get:function(a){a=a.__name__;var b=this.values;return null!=q[a]?b.getReserved(a):b.h[a]},keyValueIterator:function(){return new sh(this)},
keys:function(){var a=this.types;return new Pe(a,a.arrayKeys())},iterator:function(){var a=this.values;return new Pe(a,a.arrayKeys())},remove:function(a){a=a.__name__;return this.types.remove(a)?!0:this.values.remove(a)},set:function(a,b){var c=a.__name__,d=this.types;null!=q[c]?d.setReserved(c,a):d.h[c]=a;a=this.values;null!=q[c]?a.setReserved(c,b):a.h[c]=b},toString:function(){return this.values.toString()},__class__:vk};var tk=function(){this.floatKeys=[];this.values=[]};h["openfl.utils._Dictionary.FloatMap"]=
tk;tk.__name__="openfl.utils._Dictionary.FloatMap";tk.__interfaces__=[Qb];tk.prototype={floatKeys:null,values:null,clear:function(){this.floatKeys=[];this.values=[]},copy:function(){for(var a=new tk,b=this.keys();b.hasNext();){var c=b.next();a.set(c,this.get(c))}return a},exists:function(a){return-1<this.indexOf(a)},get:function(a){a=this.indexOf(a);return-1<a?this.values[a]:null},keyValueIterator:function(){return new sh(this)},keys:function(){return B.iter(this.floatKeys.slice())},iterator:function(){return B.iter(this.values.slice())},
remove:function(a){a=this.indexOf(a);return-1<a?(this.floatKeys.splice(a,1),this.values.splice(a,1),!0):!1},set:function(a,b){this.insertSorted(a,b)},indexOf:function(a){var b=this.floatKeys.length,c=0,d=b-1;if(0==b)return-1;for(;c<d;){b=Math.floor((c+d)/2);if(this.floatKeys[b]==a)return b;this.floatKeys[b]>a?d=b-1:c=b+1}return this.floatKeys[c]==a?c:-1},insertSorted:function(a,b){var c=this.floatKeys.length,d=0,e=c-1;if(0==c)this.floatKeys.push(a),this.values.push(b);else{for(;d<e;){c=Math.floor((d+
e)/2);if(this.floatKeys[c]==a){this.values[c]=b;return}this.floatKeys[c]>a?e=c-1:d=c+1}this.floatKeys[d]>a?(this.floatKeys.splice(d,0,a),this.values.splice(d,0,b)):this.floatKeys[d]<a?(this.floatKeys.splice(d+1,0,a),this.values.splice(d+1,0,b)):this.values[d]=b}},toString:function(){return this.values.toString()},__class__:tk};var uk=function(){this.map=new Aa};h["openfl.utils._Dictionary.UtilsObjectMap"]=uk;uk.__name__="openfl.utils._Dictionary.UtilsObjectMap";uk.__interfaces__=[Qb];uk.prototype=
{map:null,clear:function(){this.map.h={__keys__:{}}},copy:function(){for(var a=new uk,b=this.keys();b.hasNext();){var c=b.next();a.set(c,this.get(c))}return a},exists:function(a){return null!=this.map.h.__keys__[a.__id__]},get:function(a){return this.map.h[a.__id__]},keyValueIterator:function(){return new sh(this)},keys:function(){return this.map.keys()},iterator:function(){return this.map.iterator()},remove:function(a){return this.map.remove(a)},set:function(a,b){this.map.set(a,b)},toString:function(){return this.map.toString()},
__class__:uk};var $i={};h["openfl.utils._Endian.Endian_Impl_"]=$i;$i.__name__="openfl.utils._Endian.Endian_Impl_";$i.fromLimeEndian=function(a){switch(a._hx_index){case 0:return 1;case 1:return 0}};$i.fromString=function(a){switch(a){case "bigEndian":return 0;case "littleEndian":return 1;default:return null}};$i.toLimeEndian=function(a){switch(a){case 0:return Oi.BIG_ENDIAN;case 1:return Oi.LITTLE_ENDIAN;default:return null}};$i.toString=function(a){switch(a){case 0:return"bigEndian";case 1:return"littleEndian";
default:return null}};var Qg={};h["openfl.utils._Object.Object_Impl_"]=Qg;Qg.__name__="openfl.utils._Object.Object_Impl_";Qg._new=function(){return{}};Qg.hasOwnProperty=function(a,b){return null!=a?Object.prototype.hasOwnProperty.call(a,b):!1};Qg.isPrototypeOf=function(a,b){for(a=L.getClass(a);null!=a;){if(a==b)return!0;a=a.__super__}return!1};Qg.iterator=function(a){a=X.fields(a);null==a&&(a=[]);return B.iter(a)};Qg.propertyIsEnumerable=function(a,b){return null!=a&&Object.prototype.hasOwnProperty.call(a,
b)?L.__implements(X.field(a,b),Sl):!1};Qg.toLocaleString=function(a){return K.string(a)};Qg.toString=function(a){return K.string(a)};Qg.valueOf=function(a){return a};Qg.__get=function(a,b){return X.field(a,b)};Qg.__set=function(a,b,c){return a[b]=c};var Dp=function(){};h["haxe.lang.Iterator"]=Dp;Dp.__name__="haxe.lang.Iterator";Dp.__isInterface__=!0;Dp.prototype={hasNext:null,next:null,__class__:Dp};var Sl=function(){};h["haxe.lang.Iterable"]=Sl;Sl.__name__="haxe.lang.Iterable";Sl.__isInterface__=
!0;Sl.prototype={iterator:null,__class__:Sl};var Rg=function(){};h["polygonal.ds.Cloneable"]=Rg;Rg.__name__="polygonal.ds.Cloneable";Rg.__isInterface__=!0;Rg.prototype={clone:null,__class__:Rg};var Ep=function(){};h["polygonal.ds.Hashable"]=Ep;Ep.__name__="polygonal.ds.Hashable";Ep.__isInterface__=!0;Ep.prototype={key:null,__class__:Ep};var wk=function(){};h["polygonal.ds.Collection"]=wk;wk.__name__="polygonal.ds.Collection";wk.__isInterface__=!0;wk.__interfaces__=[Ep];wk.prototype={get_size:null,
free:null,contains:null,remove:null,clear:null,iterator:null,isEmpty:null,toArray:null,clone:null,__class__:wk,__properties__:{get_size:"get_size"}};var Sg=function(){};h["polygonal.ds.HashKey"]=Sg;Sg.__name__="polygonal.ds.HashKey";Sg.next=function(){null==Sg._counter&&(Sg._counter=0);Ga._assert(Sg._counter<Sg._counter+1,"_counter < _counter + 1",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/HashKey.hx",lineNumber:44,className:"polygonal.ds.HashKey",methodName:"next"});
return Sg._counter++};var hj=function(){};h["polygonal.ds.Map"]=hj;hj.__name__="polygonal.ds.Map";hj.__isInterface__=!0;hj.__interfaces__=[wk];hj.prototype={has:null,hasKey:null,get:null,set:null,unset:null,remap:null,toValSet:null,toKeySet:null,keys:null,__class__:hj};var Fp=function(a,b){null==b&&(b=-1);this.mTmpKeyBuffer=[];this.mTmpIntBuffer=[];this.mIterator=null;this.mFree=this.mSize=0;this.reuseIterator=!1;this.key=Sg.next();Ga._assert(0<a,"slotCount > 0",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/HashTable.hx",
lineNumber:158,className:"polygonal.ds.HashTable",methodName:"new"});-1==b&&(b=a);this.mMinCapacity=this.capacity=2>b?2:b;this.mH=new Tg(a,this.capacity);this.mKeys=Array(this.capacity);this.mVals=Array(this.capacity);a=this.mNext=Array(this.capacity);b=0;for(var c=this.capacity-1;b<c;){var d=b++;a[d]=d+1}a[this.capacity-1]=-1};h["polygonal.ds.HashTable"]=Fp;Fp.__name__="polygonal.ds.HashTable";Fp.__interfaces__=[hj];Fp.prototype={key:null,capacity:null,get_loadFactor:function(){return this.mH.get_loadFactor()},
get_slotCount:function(){return this.mH.slotCount},reuseIterator:null,get_growthRate:function(){return this.mH.growthRate},set_growthRate:function(a){return this.mH.growthRate=a},mH:null,mKeys:null,mVals:null,mNext:null,mFree:null,mSize:null,mMinCapacity:null,mIterator:null,mTmpIntBuffer:null,mTmpKeyBuffer:null,getCollisionCount:function(){return this.mH.getCollisionCount()},getFront:function(a){var b=this.mH;a=a.key;var c=73856093*a&b.mMask,d=b.mHash[c];if(-1==d)b=-2147483648;else{var e=b.mData;
if(e[d]==a)b=e[d+1];else{var f=-2147483648,g=d,k=g;for(d=e[d+2];-1!=d;){if(e[d]==a){f=e[d+1];e[k+2]=e[d+2];e[d+2]=g;b.mHash[c]=d;break}k=d;d=e[k+2]}b=f}}return-2147483648==b?null:this.mVals[b]},setIfAbsent:function(a,b){Ga._assert(null!=a,"key != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/HashTable.hx",lineNumber:210,className:"polygonal.ds.HashTable",methodName:"setIfAbsent"});this.mSize==this.capacity&&this.grow();var c=this.mFree,d=this.mH,e=a.key;
Ga._assert(-2147483648!=c,"val 0x80000000 is reserved(val != KEY_ABSENT)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntIntHashTable.hx",lineNumber:291,className:"polygonal.ds.IntIntHashTable",methodName:"setIfAbsent"});var f=73856093*e&d.mMask,g=d.mData,k=d.mHash[f];if(-1==k)d.mSize==d.capacity&&(d.grow(),g=d.mData),k=3*d.mFree,d.mFree=d.mNext[d.mFree],d.mHash[f]=k,g[k]=e,g[k+1]=c,d.mSize++,d=!0;else if(g[k]==e)d=!1;else{for(f=g[k+2];-1!=f;){if(g[f]==e){k=
-1;break}k=f;f=g[k+2]}-1==k?d=!1:(d.mSize==d.capacity&&(d.grow(),g=d.mData),f=3*d.mFree,d.mFree=d.mNext[d.mFree],g[k+2]=f,g[f]=e,g[f+1]=c,d.mSize++,d=!0)}return d?(this.mVals[c]=b,this.mKeys[c]=a,this.mFree=this.mNext[c],this.mSize++,!0):!1},rehash:function(a){this.mH.rehash(a);return this},remap:function(a,b){Ga._assert(null!=a,"key != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/HashTable.hx",lineNumber:244,className:"polygonal.ds.HashTable",methodName:"remap"});
var c=this.mH;a=a.key;var d=c.mHash[73856093*a&c.mMask];if(-1==d)a=-2147483648;else if(c=c.mData,c[d]==a)a=c[d+1];else{var e=-2147483648;for(d=c[d+2];-1!=d;){if(c[d]==a){e=c[d+1];break}d=c[d+2]}a=e}return-2147483648!=a?(this.mVals[a]=b,!0):!1},toKeyArray:function(){if(0==this.mSize)return[];var a=this.mSize;Ga._assert(0<=a,"len >= 0",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:37,className:"polygonal.ds.tools.ArrayTools",methodName:"alloc"});
a=Array(a);for(var b=0,c=this.mKeys,d,e=0,f=this.capacity;e<f;)d=e++,d=c[d],null!=d&&(a[b++]=d);return a},pack:function(){this.mH.pack();if(this.mH.capacity==this.capacity)return this;this.capacity=this.mH.capacity;for(var a=this.mNext=Array(this.capacity),b=0,c=this.capacity-1;b<c;){var d=b++;a[d]=d+1}a[this.capacity-1]=-1;this.mFree=0;b=this.mKeys;a=Array(this.capacity);c=this.mVals;d=Array(this.capacity);for(var e=this.mFree,f=this.mH.iterator();f.hasNext();){var g=f.next();a[e]=b[g];d[e]=c[g];
e=this.mNext[e]}this.mFree=e;this.mKeys=a;this.mVals=d;b=0;for(c=this.mSize;b<c;)if(d=b++,g=this.mH,e=a[d].key,f=g.mHash[73856093*e&g.mMask],-1!=f)if(g=g.mData,g[f]==e)g[f+1]=d;else for(f=g[f+2];-1!=f;){if(g[f]==e){g[f+1]=d;break}f=g[f+2]}return this},iter:function(a){Ga._assert(null!=a,"f != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/HashTable.hx",lineNumber:322,className:"polygonal.ds.HashTable",methodName:"iter"});for(var b=this.mH.mData,c=this.mVals,
d=this.mKeys,e,f=0,g=this.mH.capacity;f<g;)e=f++,e=b[3*e+1],-2147483648!=e&&a(d[e],c[e]);return this},toString:function(){var a=""+K.string(gb.format("[ HashTable size="+this.mSize+" capacity="+this.capacity+" load=%.2f",[this.get_loadFactor()]));if(0==this.mSize)return a+" ]";a+="\n";for(var b=0,c=this.keys();c.hasNext();){var d=c.next();d=K.string(d).length;b=b>d?b:d}c=[];b="  %- "+b+"s -> %s\n";d=[];for(var e=this.keys();e.hasNext();){var f=e.next();d.push(f)}d.sort(function(a,b){return a.key-
b.key});e=1;f=d.length;for(var g=0,k=1;e<f;){if(d[g]==d[e])++k;else{g=d[g];c[0]=g;if(1<k)k=[],this.getAll(g,k),c[1]=k.join(",");else{Ga._assert(null!=g,"key != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/HashTable.hx",lineNumber:449,className:"polygonal.ds.HashTable",methodName:"get"});var l=this.mH;k=g.key;g=l.mHash[73856093*k&l.mMask];if(-1==g)k=-2147483648;else if(l=l.mData,l[g]==k)k=l[g+1];else{var m=-2147483648;for(g=l[g+2];-1!=g;){if(l[g]==k){m=
l[g+1];break}g=l[g+2]}k=m}c[1]=K.string(-2147483648==k?null:this.mVals[k])}a+=K.string(gb.format(b,c));g=e;k=1}++e}d=d[g];c[0]=d;if(1<k)e=[],this.getAll(d,e),c[1]=e.join(",");else{Ga._assert(null!=d,"key != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/HashTable.hx",lineNumber:449,className:"polygonal.ds.HashTable",methodName:"get"});f=this.mH;d=d.key;e=f.mHash[73856093*d&f.mMask];if(-1==e)d=-2147483648;else if(f=f.mData,f[e]==d)d=f[e+1];else{k=-2147483648;
for(e=f[e+2];-1!=e;){if(f[e]==d){k=f[e+1];break}e=f[e+2]}d=k}c[1]=K.string(-2147483648==d?null:this.mVals[d])}a+=K.string(gb.format(b,c));return a+"]"},grow:function(){var a=this.capacity;this.capacity=oh.compute(this.get_growthRate(),this.capacity);var b=Array(this.capacity);Db.blit(this.mNext,0,b,0,a);b=this.mNext=b;for(var c=a-1,d=this.capacity-1;c<d;){var e=c++;b[e]=e+1}b[this.capacity-1]=-1;this.mFree=a;b=Array(this.capacity);Db.blit(this.mVals,0,b,0,a);this.mVals=b;b=Array(this.capacity);Db.blit(this.mKeys,
0,b,0,a);this.mKeys=b},has:function(a){for(var b=this.mKeys,c=this.mVals,d=0,e=this.capacity;d<e;){var f=d++;if(null!=b[f]&&c[f]==a)return!0}return!1},hasKey:function(a){Ga._assert(null!=a,"key != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/HashTable.hx",lineNumber:439,className:"polygonal.ds.HashTable",methodName:"hasKey"});var b=this.mH;a=a.key;var c=b.mHash[73856093*a&b.mMask];if(-1==c)return!1;b=b.mData;if(b[c]==a)return!0;var d=!1;for(c=b[c+2];-1!=
c;){if(b[c]==a){d=!0;break}c=b[c+2]}return d},get:function(a){Ga._assert(null!=a,"key != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/HashTable.hx",lineNumber:449,className:"polygonal.ds.HashTable",methodName:"get"});var b=this.mH;a=a.key;var c=b.mHash[73856093*a&b.mMask];if(-1==c)a=-2147483648;else if(b=b.mData,b[c]==a)a=b[c+1];else{var d=-2147483648;for(c=b[c+2];-1!=c;){if(b[c]==a){d=b[c+1];break}c=b[c+2]}a=d}return-2147483648==a?null:this.mVals[a]},
getAll:function(a,b){var c=this.mH,d=a.key,e=c.mHash[73856093*d&c.mMask];if(-1==e)d=-2147483648;else if(c=c.mData,c[e]==d)d=c[e+1];else{var f=-2147483648;for(e=c[e+2];-1!=e;){if(c[e]==d){f=c[e+1];break}e=c[e+2]}d=f}if(-2147483648==d)return 0;d=this.mTmpIntBuffer;a=this.mH.getAll(a.key,d);e=this.mVals;for(c=0;c<a;)f=c++,b[f]=e[d[f]];return a},set:function(a,b){Ga._assert(null!=a,"key != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/HashTable.hx",lineNumber:483,
className:"polygonal.ds.HashTable",methodName:"set"});this.mSize==this.capacity&&this.grow();var c=this.mFree,d=this.mH,e=a.key;Ga._assert(-2147483648!=c,"val 0x80000000 is reserved(val != KEY_ABSENT)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntIntHashTable.hx",lineNumber:1046,className:"polygonal.ds.IntIntHashTable",methodName:"set"});d.mSize==d.capacity&&d.grow();var f=d.mData,g=d.mHash,k=3*d.mFree;d.mFree=d.mNext[d.mFree];f[k]=e;f[k+1]=c;var l=73856093*
e&d.mMask,m=g[l];if(-1==m)g[l]=k,d.mSize++,d=!0;else{g=f[m]!=e;for(l=f[m+2];-1!=l;)f[l]==e&&(g=!1),m=l,l=f[l+2];f[m+2]=k;d.mSize++;d=g}this.mVals[c]=b;this.mKeys[c]=a;this.mFree=this.mNext[c];this.mSize++;return d},unset:function(a){var b=this.mH,c=a.key,d=b.mHash[73856093*c&b.mMask];if(-1==d)c=-2147483648;else if(b=b.mData,b[d]==c)c=b[d+1];else{var e=-2147483648;for(d=b[d+2];-1!=d;){if(b[d]==c){e=b[d+1];break}d=b[d+2]}c=e}if(-2147483648==c)return!1;this.mKeys[c]=null;this.mNext[c]=this.mFree;this.mFree=
c;c=this.mH;b=a.key;e=73856093*b&c.mMask;var f=c.mHash;a=f[e];if(-1!=a)if(d=c.mData,b==d[a])f[e]=-1==d[a+2]?-1:d[a+2],b=a/3|0,c.mNext[b]=c.mFree,c.mFree=b,d[a+1]=-2147483648,d[a+2]=-1,c.mSize--;else{e=!1;f=a;for(a=d[a+2];-1!=a;){if(d[a]==b){e=!0;break}f=a;a=d[f+2]}e&&(d[f+2]=d[a+2],b=a/3|0,c.mNext[b]=c.mFree,c.mFree=b,d[a+1]=-2147483648,d[a+2]=-1,c.mSize--)}this.mSize--;return!0},toValSet:function(){for(var a=new ij,b=this.mKeys,c=this.mVals,d=0,e=this.capacity;d<e;){var f=d++;null!=b[f]&&a.set(c[f])}return a},
toKeySet:function(){for(var a=new ij,b=this.mKeys,c,d=0,e=this.capacity;d<e;)c=d++,c=b[c],null!=c&&a.set(c);return a},keys:function(){return new Gp(this)},get_size:function(){return this.mSize},free:function(){Db.nullify(this.mVals);this.mVals=null;Db.nullify(this.mKeys);this.mNext=this.mKeys=null;this.mH.free();this.mH=null;null!=this.mIterator&&(this.mIterator.free(),this.mIterator=null);this.mTmpKeyBuffer=this.mTmpIntBuffer=null},contains:function(a){return this.has(a)},remove:function(a){for(var b=
this.mTmpKeyBuffer,c=this.mKeys,d=this.mVals,e,f=0,g=0,k=this.capacity;g<k;){var l=g++;e=c[l];null!=e&&d[l]==a&&(b[f++]=e)}a=0;for(c=f;a<c;)d=a++,this.unset(b[d]),b[d]=null;return 0<f},clear:function(a){null==a&&(a=!1);this.mH.clear(a);Db.init(this.mKeys,null,0,this.capacity);Db.init(this.mVals,null,0,this.capacity);a=this.mNext;for(var b=0,c=this.capacity-1;b<c;){var d=b++;a[d]=d+1}a[this.capacity-1]=-1;this.mSize=this.mFree=0},iterator:function(){return this.reuseIterator?(null==this.mIterator?
this.mIterator=new Tl(this):this.mIterator.reset(),this.mIterator):new Tl(this)},isEmpty:function(){return 0==this.mSize},toArray:function(){if(0==this.mSize)return[];var a=this.mSize;Ga._assert(0<=a,"len >= 0",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:37,className:"polygonal.ds.tools.ArrayTools",methodName:"alloc"});a=Array(a);for(var b=0,c=this.mKeys,d=this.mVals,e=0,f=this.capacity;e<f;){var g=e++;null!=c[g]&&(a[b++]=d[g])}return a},
clone:function(a,b){null==a&&(a=!0);var c=new Fp(this.mH.slotCount,this.mSize);c.mH=this.mH.clone();c.mSize=this.mSize;c.mFree=this.mFree;var d=this.mVals,e=c.mVals,f=this.mKeys;Db.blit(f,0,c.mKeys,0,this.mSize);if(a)Db.blit(d,0,e,0,this.mSize);else if(null!=b){a=0;for(var g=this.mSize;a<g;){var k=a++;e[k]=null!=f[k]?b(d[k]):null}}else for(b=0,a=this.mSize;b<a;)g=b++,null!=f[g]?(Ga._assert(L.__implements(d[g],Rg),"element is not of type Cloneable(Std.is(srcVals.get(i), Cloneable))",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/HashTable.hx",
lineNumber:735,className:"polygonal.ds.HashTable",methodName:"clone"}),e[g]=L.__cast(d[g],Rg).clone()):e[g]=null;Db.blit(this.mNext,0,c.mNext,0,this.mSize);return c},__class__:Fp,__properties__:{get_size:"get_size",set_growthRate:"set_growthRate",get_growthRate:"get_growthRate",get_slotCount:"get_slotCount",get_loadFactor:"get_loadFactor"}};var ph=function(){};h["polygonal.ds.Itr"]=ph;ph.__name__="polygonal.ds.Itr";ph.__isInterface__=!0;ph.prototype={hasNext:null,next:null,remove:null,reset:null,
__class__:ph};var Gp=function(a){this.mObject=a;this.reset()};h["polygonal.ds.HashTableKeyIterator"]=Gp;Gp.__name__="polygonal.ds.HashTableKeyIterator";Gp.__interfaces__=[ph];Gp.prototype={mObject:null,mKeys:null,mI:null,mS:null,free:function(){this.mKeys=this.mObject=null},reset:function(){this.mKeys=this.mObject.mKeys;this.mS=this.mObject.mH.capacity;for(this.mI=0;this.mI<this.mS&&null==this.mKeys[this.mI];)this.mI++;return this},hasNext:function(){return this.mI<this.mS},next:function(){for(var a=
this.mKeys[this.mI];++this.mI<this.mS&&null==this.mKeys[this.mI];);return a},remove:function(){throw new E("unsupported operation");},__class__:Gp};var Tl=function(a){this.mObject=a;this.reset()};h["polygonal.ds.HashTableValIterator"]=Tl;Tl.__name__="polygonal.ds.HashTableValIterator";Tl.__interfaces__=[ph];Tl.prototype={mObject:null,mKeys:null,mVals:null,mI:null,mS:null,free:function(){this.mVals=this.mKeys=this.mObject=null},reset:function(){this.mVals=this.mObject.mVals;this.mKeys=this.mObject.mKeys;
this.mS=this.mObject.mH.capacity;for(this.mI=0;this.mI<this.mS&&null==this.mKeys[this.mI];)this.mI++;return this},hasNext:function(){return this.mI<this.mS},next:function(){for(var a=this.mVals[this.mI];++this.mI<this.mS&&null==this.mKeys[this.mI];);return a},remove:function(){throw new E("unsupported operation");},__class__:Tl};var xk=function(){};h["polygonal.ds.Set"]=xk;xk.__name__="polygonal.ds.Set";xk.__isInterface__=!0;xk.__interfaces__=[wk];xk.prototype={has:null,set:null,unset:null,__class__:xk};
var qh=function(a,b){null==b&&(b=-1);this.mFree=this.mSize=0;this.reuseIterator=!1;this.growthRate=-3;this.key=Sg.next();Ga._assert(0<a,"slotCount > 0",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntHashSet.hx",lineNumber:138,className:"polygonal.ds.IntHashSet",methodName:"new"});Ga._assert(0<a&&0==(a&a-1),"slotCount is not a power of 2(MathTools.isPow2(slotCount))",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntHashSet.hx",
lineNumber:139,className:"polygonal.ds.IntHashSet",methodName:"new"});-1==b&&(b=a);this.mMinCapacity=this.capacity=2>b?2:b;this.slotCount=a;this.mMask=a-1;this.mHash=Db.init(Array(a),-1);this.mData=Array(this.capacity<<1);this.mNext=Array(this.capacity);b=1;a=this.mData;for(var c=0,d=this.capacity;c<d;)c++,a[b-1]=-2147483648,a[b]=-1,b+=2;a=this.mNext;b=0;for(c=this.capacity-1;b<c;)d=b++,a[d]=d+1;a[this.capacity-1]=-1};h["polygonal.ds.IntHashSet"]=qh;qh.__name__="polygonal.ds.IntHashSet";qh.__interfaces__=
[xk];qh.prototype={key:null,capacity:null,growthRate:null,reuseIterator:null,get_loadFactor:function(){return this.mSize/this.slotCount},slotCount:null,mHash:null,mData:null,mNext:null,mMask:null,mFree:null,mSize:null,mMinCapacity:null,mIterator:null,getCollisionCount:function(){for(var a=0,b,c=this.mData,d=this.mHash,e=0,f=this.slotCount;e<f;)if(b=e++,b=d[b],-1!=b)for(b=c[b+1];-1!=b;)b=c[b+1],++a;return a},hasFront:function(a){Ga._assert(-2147483648!=a,"value 0x80000000 is reserved(val != VAL_ABSENT)",
{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntHashSet.hx",lineNumber:203,className:"polygonal.ds.IntHashSet",methodName:"hasFront"});var b=73856093*a&this.mMask,c=this.mHash[b];if(-1==c)return!1;var d=this.mData;if(d[c]==a)return!0;var e=!1,f=c,g=f;for(c=d[c+1];-1!=c;){if(d[c]==a){d[g+1]=d[c+1];d[c+1]=f;d[b]=c;e=!0;break}g=c;c=d[g+1]}return e},rehash:function(a){Ga._assert(0<a&&0==(a&a-1),"slotCount is not a power of 2(MathTools.isPow2(slotCount))",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntHashSet.hx",
lineNumber:270,className:"polygonal.ds.IntHashSet",methodName:"rehash"});if(this.slotCount==a)return this;for(var b=new qh(a,this.capacity),c=this.mData,d=0,e=this.capacity;d<e;){var f=d++;f=c[f<<1];if(-2147483648!=f){Ga._assert(-2147483648!=f,"value 0x80000000 is reserved(val != VAL_ABSENT)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntHashSet.hx",lineNumber:521,className:"polygonal.ds.IntHashSet",methodName:"set"});var g=73856093*f&b.mMask,k=b.mData,l=
b.mHash[g];if(-1==l)b.mSize==b.capacity&&(b.grow(),k=b.mData),l=b.mFree<<1,b.mFree=b.mNext[b.mFree],b.mHash[g]=l,k[l]=f,b.mSize++;else if(k[l]!=f){for(g=k[l+1];-1!=g;){if(k[g]==f){l=-1;break}l=g;g=k[g+1]}-1!=l&&(b.mSize==b.capacity&&(b.grow(),k=b.mData),g=b.mFree<<1,b.mFree=b.mNext[b.mFree],k[g]=f,k[l+1]=g,b.mSize++)}}}this.mHash=b.mHash;this.mData=b.mData;this.mNext=b.mNext;this.slotCount=a;this.mMask=b.mMask;this.mFree=b.mFree;return this},pack:function(){if(this.capacity==this.mMinCapacity)return this;
var a=this.mSize,b=this.mMinCapacity;this.capacity=a>b?a:b;a=this.mData;b=0;for(var c=this.mHash,d,e=Array(this.capacity<<1),f=0,g=this.slotCount;f<g;){var k=f++;d=c[k];if(-1!=d)for(c[k]=b,e[b++]=a[d],e[b++]=-1,d=a[d+1];-1!=d;)e[b-1]=b,e[b++]=a[d],e[b++]=-1,d=a[d+1]}this.mData=e;a=this.mNext=Array(this.capacity);b=0;for(c=this.capacity-1;b<c;)d=b++,a[d]=d+1;this.mFree=a[this.capacity-1]=-1;return this},iter:function(a){Ga._assert(null!=a,"f != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntHashSet.hx",
lineNumber:384,className:"polygonal.ds.IntHashSet",methodName:"iter"});for(var b=this.mData,c,d,e=0,f=this.capacity;e<f;)c=e++<<1,d=b[c],-2147483648!=d&&a(b[c]);return this},toString:function(){var a=""+K.string(gb.format("[ IntHashSet size="+this.mSize+" capacity="+this.capacity+" load=%.2f",[this.get_loadFactor()]));if(0==this.mSize)return a+" ]";a+="\n";for(var b=this.iterator();b.hasNext();){var c=b.next();a+=K.string("  "+c+"\n")}return a+"]"},hashCode:function(a){return 73856093*a&this.mMask},
grow:function(){var a=this.capacity;this.capacity=oh.compute(this.growthRate,this.capacity);var b=Array(this.capacity);Db.blit(this.mNext,0,b,0,a);this.mNext=b;b=Array(this.capacity<<1);Db.blit(this.mData,0,b,0,a<<1);this.mData=b;b=this.mNext;for(var c=a-1,d=this.capacity-1;c<d;){var e=c++;b[e]=e+1}b[this.capacity-1]=-1;this.mFree=a;c=a<<1;b=this.mData;d=0;for(a=this.capacity-a;d<a;)d++,b[c]=-2147483648,b[c+1]=-1,c+=2},has:function(a){Ga._assert(-2147483648!=a,"value 0x80000000 is reserved(val != VAL_ABSENT)",
{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntHashSet.hx",lineNumber:467,className:"polygonal.ds.IntHashSet",methodName:"has"});var b=this.mHash[73856093*a&this.mMask];if(-1==b)return!1;var c=this.mData;if(c[b]==a)return!0;var d=!1;for(b=c[b+1];-1!=b;){if(c[b]==a){d=!0;break}b=c[b+1]}return d},set:function(a){Ga._assert(-2147483648!=a,"value 0x80000000 is reserved(val != VAL_ABSENT)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntHashSet.hx",
lineNumber:521,className:"polygonal.ds.IntHashSet",methodName:"set"});var b=73856093*a&this.mMask,c=this.mData,d=this.mHash[b];if(-1==d)return this.mSize==this.capacity&&(this.grow(),c=this.mData),d=this.mFree<<1,this.mFree=this.mNext[this.mFree],this.mHash[b]=d,c[d]=a,this.mSize++,!0;if(c[d]==a)return!1;for(b=c[d+1];-1!=b;){if(c[b]==a){d=-1;break}d=b;b=c[b+1]}if(-1==d)return!1;this.mSize==this.capacity&&(this.grow(),c=this.mData);b=this.mFree<<1;this.mFree=this.mNext[this.mFree];c[b]=a;c[d+1]=b;
this.mSize++;return!0},unset:function(a){var b=73856093*a&this.mMask,c=this.mHash[b];if(-1==c)return!1;var d=this.mData;if(a==d[c])return this.mHash[b]=-1==d[c+1]?-1:d[c+1],a=c>>1,this.mNext[a]=this.mFree,this.mFree=a,d[c]=-2147483648,d[c+1]=-1,this.mSize--,!0;b=!1;var e=c;for(c=d[c+1];-1!=c;){if(d[c]==a){b=!0;break}e=c;c=d[e+1]}return b?(d[e+1]=d[c+1],a=c>>1,this.mNext[a]=this.mFree,this.mFree=a,d[c]=-2147483648,d[c+1]=-1,--this.mSize,!0):!1},get_size:function(){return this.mSize},free:function(){this.mNext=
this.mData=this.mHash=null;null!=this.mIterator&&(this.mIterator.free(),this.mIterator=null)},contains:function(a){Ga._assert(-2147483648!=a,"value 0x80000000 is reserved(val != VAL_ABSENT)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntHashSet.hx",lineNumber:467,className:"polygonal.ds.IntHashSet",methodName:"has"});var b=this.mHash[73856093*a&this.mMask];if(-1==b)return!1;var c=this.mData;if(c[b]==a)return!0;var d=!1;for(b=c[b+1];-1!=b;){if(c[b]==a){d=
!0;break}b=c[b+1]}return d},remove:function(a){var b=73856093*a&this.mMask,c=this.mHash[b];if(-1==c)return!1;var d=this.mData;if(a==d[c])return this.mHash[b]=-1==d[c+1]?-1:d[c+1],a=c>>1,this.mNext[a]=this.mFree,this.mFree=a,d[c]=-2147483648,d[c+1]=-1,this.mSize--,!0;b=!1;var e=c;for(c=d[c+1];-1!=c;){if(d[c]==a){b=!0;break}e=c;c=d[e+1]}return b?(d[e+1]=d[c+1],a=c>>1,this.mNext[a]=this.mFree,this.mFree=a,d[c]=-2147483648,d[c+1]=-1,--this.mSize,!0):!1},clear:function(a){a=this.mHash;for(var b=0,c=this.slotCount;b<
c;){var d=b++;a[d]=-1}b=1;a=this.mData;c=0;for(d=this.capacity;c<d;)c++,a[b-1]=-2147483648,a[b]=-1,b+=2;a=this.mNext;b=0;for(c=this.capacity-1;b<c;)d=b++,a[d]=d+1;a[this.capacity-1]=-1;this.mSize=this.mFree=0},iterator:function(){return this.reuseIterator?(null==this.mIterator?this.mIterator=new Ul(this):this.mIterator.reset(),this.mIterator):new Ul(this)},isEmpty:function(){return 0==this.mSize},toArray:function(){if(0==this.mSize)return[];var a=this.mSize;Ga._assert(0<=a,"len >= 0",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:37,className:"polygonal.ds.tools.ArrayTools",methodName:"alloc"});a=Array(a);for(var b=0,c,d=this.mData,e=0,f=this.capacity;e<f;)c=e++,c=d[c<<1],-2147483648!=c&&(a[b++]=c);return a},clone:function(a,b){a=new qh(this.slotCount,this.mSize);Db.blit(this.mHash,0,a.mHash,0,this.slotCount);Db.blit(this.mData,0,a.mData,0,this.mSize<<1);Db.blit(this.mNext,0,a.mNext,0,this.mSize);a.mMask=this.mMask;a.slotCount=this.slotCount;a.capacity=this.capacity;a.mFree=this.mFree;a.mSize=this.mSize;return a},
__class__:qh,__properties__:{get_size:"get_size",get_loadFactor:"get_loadFactor"}};var Ul=function(a){this.mObject=a;this.mData=a.mData;this.mI=0;this.mS=a.capacity;this.scan()};h["polygonal.ds.IntHashSetIterator"]=Ul;Ul.__name__="polygonal.ds.IntHashSetIterator";Ul.__interfaces__=[ph];Ul.prototype={mObject:null,mI:null,mS:null,mData:null,free:function(){this.mData=this.mObject=null},reset:function(){this.mData=this.mObject.mData;this.mI=0;this.mS=this.mObject.capacity;this.scan();return this},hasNext:function(){return this.mI<
this.mS},next:function(){var a=this.mData[this.mI++<<1];this.scan();return a},remove:function(){throw new E("unsupported operation");},scan:function(){for(;this.mI<this.mS&&-2147483648==this.mData[this.mI<<1];)this.mI++},__class__:Ul};var Ye=function(a,b){null==b&&(b=-1);this.mTmpKeyBuffer=[];this.mIterator=null;this.mFree=this.mSize=0;this.reuseIterator=!1;this.key=Sg.next();Ga._assert(0<a,"slotCount > 0",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntHashTable.hx",
lineNumber:158,className:"polygonal.ds.IntHashTable",methodName:"new"});-1==b&&(b=a);this.mMinCapacity=this.capacity=2>b?2:b;this.mH=new Tg(a,this.capacity);this.mVals=Array(this.capacity);this.mNext=Array(this.capacity);this.mKeys=Db.init(Array(this.capacity),-2147483648,0,this.capacity);a=this.mNext;b=0;for(var c=this.capacity-1;b<c;){var d=b++;a[d]=d+1}a[this.capacity-1]=-1};h["polygonal.ds.IntHashTable"]=Ye;Ye.__name__="polygonal.ds.IntHashTable";Ye.__interfaces__=[hj];Ye.prototype={key:null,
capacity:null,get_growthRate:function(){return this.mH.growthRate},set_growthRate:function(a){return this.mH.growthRate=a},reuseIterator:null,get_loadFactor:function(){return this.mH.get_loadFactor()},get_slotCount:function(){return this.mH.slotCount},mH:null,mVals:null,mNext:null,mKeys:null,mFree:null,mSize:null,mMinCapacity:null,mShrinkSize:null,mIterator:null,mTmpKeyBuffer:null,getCollisionCount:function(){return this.mH.getCollisionCount()},getFront:function(a){var b=this.mH,c=73856093*a&b.mMask,
d=b.mHash[c];if(-1==d)a=-2147483648;else{var e=b.mData;if(e[d]==a)a=e[d+1];else{var f=-2147483648,g=d,k=g;for(d=e[d+2];-1!=d;){if(e[d]==a){f=e[d+1];e[k+2]=e[d+2];e[d+2]=g;b.mHash[c]=d;break}k=d;d=e[k+2]}a=f}}return-2147483648==a?null:this.mVals[a]},setIfAbsent:function(a,b){Ga._assert(-2147483648!=a,"key 0x80000000 is reserved(key != IntIntHashTable.KEY_ABSENT)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntHashTable.hx",lineNumber:212,className:"polygonal.ds.IntHashTable",
methodName:"setIfAbsent"});this.mSize==this.capacity&&this.grow();var c=this.mFree,d=this.mH;Ga._assert(-2147483648!=c,"val 0x80000000 is reserved(val != KEY_ABSENT)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntIntHashTable.hx",lineNumber:291,className:"polygonal.ds.IntIntHashTable",methodName:"setIfAbsent"});var e=73856093*a&d.mMask,f=d.mData,g=d.mHash[e];if(-1==g)d.mSize==d.capacity&&(d.grow(),f=d.mData),g=3*d.mFree,d.mFree=d.mNext[d.mFree],d.mHash[e]=
g,f[g]=a,f[g+1]=c,d.mSize++,d=!0;else if(f[g]==a)d=!1;else{for(e=f[g+2];-1!=e;){if(f[e]==a){g=-1;break}g=e;e=f[g+2]}-1==g?d=!1:(d.mSize==d.capacity&&(d.grow(),f=d.mData),e=3*d.mFree,d.mFree=d.mNext[d.mFree],f[g+2]=e,f[e]=a,f[e+1]=c,d.mSize++,d=!0)}return d?(this.mVals[c]=b,this.mKeys[c]=a,this.mFree=this.mNext[c],this.mSize++,!0):!1},rehash:function(a){this.mH.rehash(a);return this},remap:function(a,b){var c=this.mH,d=c.mHash[73856093*a&c.mMask];if(-1==d)a=-2147483648;else if(c=c.mData,c[d]==a)a=
c[d+1];else{var e=-2147483648;for(d=c[d+2];-1!=d;){if(c[d]==a){e=c[d+1];break}d=c[d+2]}a=e}return-2147483648!=a?(this.mVals[a]=b,!0):!1},toKeyArray:function(){return this.mH.toKeyArray()},toString:function(){var a=""+K.string(gb.format("[ IntHashTable size="+this.mSize+" capacity="+this.capacity+" load=%.2f",[this.get_loadFactor()]));if(0==this.mSize)return a+" ]";a+="\n";for(var b=0,c=this.keys();c.hasNext();){var d=c.next();b=Math.max(b,d)}for(var e=1;0!=b;)++e,b=b/10|0;b=[];c="  %- "+e+"d -> %s\n";
d=[];for(e=this.keys();e.hasNext();){var f=e.next();d.push(f)}d.sort(function(a,b){return a-b});e=1;f=d.length;for(var g=0,k=1;e<f;){if(d[g]==d[e])++k;else{g=d[g];b[0]=g;if(1<k)k=[],this.getAll(g,k),b[1]=k.join(",");else{k=this.mVals;var l=this.mH,m=l.mHash[73856093*g&l.mMask];if(-1==m)g=-2147483648;else if(l=l.mData,l[m]==g)g=l[m+1];else{var p=-2147483648;for(m=l[m+2];-1!=m;){if(l[m]==g){p=l[m+1];break}m=l[m+2]}g=p}b[1]=K.string(k[g])}a+=K.string(gb.format(c,b));g=e;k=1}++e}d=d[g];b[0]=d;if(1<k)e=
[],this.getAll(d,e),b[1]=e.join(",");else{e=this.mVals;g=this.mH;f=g.mHash[73856093*d&g.mMask];if(-1==f)d=-2147483648;else if(g=g.mData,g[f]==d)d=g[f+1];else{k=-2147483648;for(f=g[f+2];-1!=f;){if(g[f]==d){k=g[f+1];break}f=g[f+2]}d=k}b[1]=K.string(e[d])}a+=K.string(gb.format(c,b));return a+"]"},has:function(a){for(var b=this.mKeys,c=this.mVals,d=0,e=this.capacity;d<e;){var f=d++;if(-2147483648!=b[f]&&c[f]==a)return!0}return!1},hasKey:function(a){var b=this.mH,c=b.mHash[73856093*a&b.mMask];if(-1==c)return!1;
b=b.mData;if(b[c]==a)return!0;var d=!1;for(c=b[c+2];-1!=c;){if(b[c]==a){d=!0;break}c=b[c+2]}return d},count:function(a){return this.mH.count(a)},get:function(a){var b=this.mH,c=b.mHash[73856093*a&b.mMask];if(-1==c)a=-2147483648;else if(b=b.mData,b[c]==a)a=b[c+1];else{var d=-2147483648;for(c=b[c+2];-1!=c;){if(b[c]==a){d=b[c+1];break}c=b[c+2]}a=d}return-2147483648==a?null:this.mVals[a]},getAll:function(a,b){var c=this.mH,d=c.mHash[73856093*a&c.mMask];if(-1==d)d=-2147483648;else if(c=c.mData,c[d]==a)d=
c[d+1];else{var e=-2147483648;for(d=c[d+2];-1!=d;){if(c[d]==a){e=c[d+1];break}d=c[d+2]}d=e}if(-2147483648==d)return 0;d=this.mTmpKeyBuffer;a=this.mH.getAll(a,d);c=this.mVals;for(e=0;e<a;){var f=e++;b[f]=c[d[f]]}return a},set:function(a,b){Ga._assert(-2147483648!=a,"key 0x80000000 is reserved(key != IntIntHashTable.KEY_ABSENT)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntHashTable.hx",lineNumber:397,className:"polygonal.ds.IntHashTable",methodName:"set"});
this.mSize==this.capacity&&this.grow();var c=this.mFree,d=this.mH;Ga._assert(-2147483648!=c,"val 0x80000000 is reserved(val != KEY_ABSENT)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntIntHashTable.hx",lineNumber:1046,className:"polygonal.ds.IntIntHashTable",methodName:"set"});d.mSize==d.capacity&&d.grow();var e=d.mData,f=d.mHash,g=3*d.mFree;d.mFree=d.mNext[d.mFree];e[g]=a;e[g+1]=c;var k=73856093*a&d.mMask,l=f[k];if(-1==l)f[k]=g,d.mSize++,d=!0;else{f=e[l]!=
a;for(k=e[l+2];-1!=k;)e[k]==a&&(f=!1),l=k,k=e[k+2];e[l+2]=g;d.mSize++;d=f}this.mVals[c]=b;this.mKeys[c]=a;this.mFree=this.mNext[c];this.mSize++;return d},unset:function(a){var b=this.mH,c=b.mHash[73856093*a&b.mMask];if(-1==c)c=-2147483648;else if(b=b.mData,b[c]==a)c=b[c+1];else{var d=-2147483648;for(c=b[c+2];-1!=c;){if(b[c]==a){d=b[c+1];break}c=b[c+2]}c=d}if(-2147483648==c)return!1;this.mVals[c]=null;this.mKeys[c]=-2147483648;this.mNext[c]=this.mFree;this.mFree=c;c=this.mH;var e=73856093*a&c.mMask,
f=c.mHash;b=f[e];if(-1!=b)if(d=c.mData,a==d[b])f[e]=-1==d[b+2]?-1:d[b+2],a=b/3|0,c.mNext[a]=c.mFree,c.mFree=a,d[b+1]=-2147483648,d[b+2]=-1,c.mSize--;else{e=!1;f=b;for(b=d[b+2];-1!=b;){if(d[b]==a){e=!0;break}f=b;b=d[f+2]}e&&(d[f+2]=d[b+2],a=b/3|0,c.mNext[a]=c.mFree,c.mFree=a,d[b+1]=-2147483648,d[b+2]=-1,c.mSize--)}this.mSize--;return!0},toValSet:function(){for(var a=new ij,b=this.mKeys,c=this.mVals,d=0,e=this.capacity;d<e;){var f=d++;-2147483648!=b[f]&&a.set(c[f])}return a},toKeySet:function(){return this.mH.toKeySet()},
keys:function(){return this.mH.keys()},pack:function(){this.mH.pack();if(this.mH.capacity==this.capacity)return this;this.capacity=this.mH.capacity;for(var a=this.mNext=Array(this.capacity),b=0,c=this.capacity-1;b<c;){var d=b++;a[d]=d+1}a[this.capacity-1]=-1;this.mFree=0;b=this.mKeys;a=Array(this.capacity);c=this.mVals;d=Array(this.capacity);for(var e=this.mFree,f=this.mH.iterator();f.hasNext();){var g=f.next();a[e]=b[g];d[e]=c[g];e=this.mNext[e]}this.mFree=e;this.mKeys=a;this.mVals=d;b=0;for(c=this.mSize;b<
c;)if(d=b++,g=this.mH,e=a[d],f=g.mHash[73856093*e&g.mMask],-1!=f)if(g=g.mData,g[f]==e)g[f+1]=d;else for(f=g[f+2];-1!=f;){if(g[f]==e){g[f+1]=d;break}f=g[f+2]}return this},iter:function(a){Ga._assert(null!=a,"f != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntHashTable.hx",lineNumber:518,className:"polygonal.ds.IntHashTable",methodName:"iter"});var b=this.mVals,c=this.mH;Ga._assert(!0,"f != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntIntHashTable.hx",
lineNumber:1360,className:"polygonal.ds.IntIntHashTable",methodName:"iter"});for(var d=c.mData,e,f=0,g=c.capacity;f<g;)c=3*f++,e=d[c+1],-2147483648!=e&&a(d[c],b[e]);return this},grow:function(){var a=this.capacity;this.capacity=oh.compute(this.get_growthRate(),this.capacity);var b=Array(this.capacity);Db.blit(this.mNext,0,b,0,a);this.mNext=b;b=Array(this.capacity);Db.blit(this.mKeys,0,b,0,a);b=this.mKeys=b;for(var c=a,d=this.capacity;c<d;){var e=c++;b[e]=-2147483648}b=this.mNext;c=a-1;for(d=this.capacity-
1;c<d;)e=c++,b[e]=e+1;b[this.capacity-1]=-1;this.mFree=a;b=Array(this.capacity);Db.blit(this.mVals,0,b,0,a);this.mVals=b},get_size:function(){return this.mSize},free:function(){Db.nullify(this.mVals);this.mNext=this.mKeys=this.mVals=null;this.mH.free();this.mH=null;null!=this.mIterator&&(this.mIterator.free(),this.mIterator=null);this.mTmpKeyBuffer=null},contains:function(a){return this.has(a)},remove:function(a){for(var b=this.mTmpKeyBuffer,c=0,d=this.mKeys,e=this.mVals,f,g=0,k=this.capacity;g<k;){var l=
g++;f=d[l];-2147483648!=f&&e[l]==a&&(b[c++]=f)}a=0;for(d=c;a<d;)e=a++,this.unset(b[e]);return 0<c},clear:function(a){null==a&&(a=!1);this.mH.clear(a);Db.init(this.mKeys,-2147483648,0,this.capacity);a=this.mNext;for(var b=0,c=this.capacity-1;b<c;){var d=b++;a[d]=d+1}a[this.capacity-1]=-1;this.mSize=this.mFree=0},iterator:function(){return this.reuseIterator?(null==this.mIterator?this.mIterator=new Vl(this):this.mIterator.reset(),this.mIterator):new Vl(this)},isEmpty:function(){return 0==this.mSize},
toArray:function(){if(0==this.mSize)return[];var a=this.mSize;Ga._assert(0<=a,"len >= 0",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:37,className:"polygonal.ds.tools.ArrayTools",methodName:"alloc"});a=Array(a);for(var b=0,c=this.mKeys,d=this.mVals,e=0,f=this.capacity;e<f;){var g=e++;-2147483648!=c[g]&&(a[b++]=d[g])}return a},clone:function(a,b){null==a&&(a=!0);var c=new Ye(this.mH.slotCount,this.mSize);c.mH=this.mH.clone(!1);
c.mSize=this.mSize;c.mFree=this.mFree;var d=this.mVals,e=c.mVals;if(a)Db.blit(d,0,e,0,this.mSize);else if(a=this.mKeys,null!=b)for(var f=0,g=this.mSize;f<g;){var k=f++;-2147483648!=a[k]&&(e[k]=b(d[k]))}else for(b=0,f=this.mSize;b<f;)g=b++,-2147483648!=a[g]&&(Ga._assert(L.__implements(d[g],Rg),"element is not of type Cloneable(Std.is(src.get(i), Cloneable))",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntHashTable.hx",lineNumber:727,className:"polygonal.ds.IntHashTable",
methodName:"clone"}),e[g]=L.__cast(d[g],Rg).clone());Db.blit(this.mKeys,0,c.mKeys,0,this.mSize);Db.blit(this.mNext,0,c.mNext,0,this.mSize);return c},__class__:Ye,__properties__:{get_size:"get_size",get_slotCount:"get_slotCount",get_loadFactor:"get_loadFactor",set_growthRate:"set_growthRate",get_growthRate:"get_growthRate"}};var Vl=function(a){this.mObject=a;this.reset()};h["polygonal.ds.IntHashTableIterator"]=Vl;Vl.__name__="polygonal.ds.IntHashTableIterator";Vl.__interfaces__=[ph];Vl.prototype={mObject:null,
mVals:null,mKeys:null,mI:null,mS:null,free:function(){this.mKeys=this.mVals=this.mObject=null},reset:function(){this.mVals=this.mObject.mVals;this.mKeys=this.mObject.mKeys;this.mS=this.mObject.mH.capacity;for(this.mI=0;this.mI<this.mS&&-2147483648==this.mKeys[this.mI];)this.mI++;return this},hasNext:function(){return this.mI<this.mS},next:function(){for(var a=this.mVals[this.mI];++this.mI<this.mS&&-2147483648==this.mKeys[this.mI];);return a},remove:function(){throw new E("unsupported operation");
},__class__:Vl};var Tg=function(a,b){null==b&&(b=-1);this.mTmpBufferSize=16;this.mFree=this.mSize=0;this.reuseIterator=!1;this.growthRate=-3;this.key=Sg.next();Ga._assert(0<a,"slotCount > 0",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntIntHashTable.hx",lineNumber:156,className:"polygonal.ds.IntIntHashTable",methodName:"new"});Ga._assert(0<a&&0==(a&a-1),"slotCount is not a power of 2(MathTools.isPow2(slotCount))",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntIntHashTable.hx",
lineNumber:157,className:"polygonal.ds.IntIntHashTable",methodName:"new"});-1==b?b=a:(Ga._assert(2<=b,"minimum capacity is 2(initialCapacity >= 2)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntIntHashTable.hx",lineNumber:163,className:"polygonal.ds.IntIntHashTable",methodName:"new"}),Ga._assert(0<a&&0==(a&a-1),"capacity is not a power of 2(MathTools.isPow2(slotCount))",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntIntHashTable.hx",
lineNumber:164,className:"polygonal.ds.IntIntHashTable",methodName:"new"}));this.mMinCapacity=this.capacity=b;this.slotCount=a;this.mMask=a-1;this.mHash=Db.init(Array(a),-1);this.mData=Array(3*this.capacity);this.mNext=Array(this.capacity);b=2;a=this.mData;for(var c=0,d=this.capacity;c<d;)c++,a[b-1]=-2147483648,a[b]=-1,b+=3;a=this.mNext;b=0;for(c=this.capacity-1;b<c;)d=b++,a[d]=d+1;a[this.capacity-1]=-1;this.mTmpBuffer=Array(this.mTmpBufferSize)};h["polygonal.ds.IntIntHashTable"]=Tg;Tg.__name__="polygonal.ds.IntIntHashTable";
Tg.__interfaces__=[hj];Tg.prototype={key:null,capacity:null,growthRate:null,reuseIterator:null,get_loadFactor:function(){return this.mSize/this.slotCount},slotCount:null,mHash:null,mData:null,mNext:null,mMask:null,mFree:null,mSize:null,mMinCapacity:null,mIterator:null,mTmpBuffer:null,mTmpBufferSize:null,getCollisionCount:function(){for(var a=0,b,c=this.mData,d=this.mHash,e=0,f=this.slotCount;e<f;)if(b=e++,b=d[b],-1!=b)for(b=c[b+2];-1!=b;)b=c[b+2],++a;return a},getFront:function(a){var b=73856093*
a&this.mMask,c=this.mHash[b];if(-1==c)return-2147483648;var d=this.mData;if(d[c]==a)return d[c+1];var e=-2147483648,f=c,g=f;for(c=d[c+2];-1!=c;){if(d[c]==a){e=d[c+1];d[g+2]=d[c+2];d[c+2]=f;this.mHash[b]=c;break}g=c;c=d[g+2]}return e},setIfAbsent:function(a,b){Ga._assert(-2147483648!=b,"val 0x80000000 is reserved(val != KEY_ABSENT)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntIntHashTable.hx",lineNumber:291,className:"polygonal.ds.IntIntHashTable",methodName:"setIfAbsent"});
var c=73856093*a&this.mMask,d=this.mData,e=this.mHash[c];if(-1==e)return this.mSize==this.capacity&&(this.grow(),d=this.mData),e=3*this.mFree,this.mFree=this.mNext[this.mFree],this.mHash[c]=e,d[e]=a,d[e+1]=b,this.mSize++,!0;if(d[e]==a)return!1;for(c=d[e+2];-1!=c;){if(d[c]==a){e=-1;break}e=c;c=d[e+2]}if(-1==e)return!1;this.mSize==this.capacity&&(this.grow(),d=this.mData);c=3*this.mFree;this.mFree=this.mNext[this.mFree];d[e+2]=c;d[c]=a;d[c+1]=b;this.mSize++;return!0},rehash:function(a){Ga._assert(0<
a&&0==(a&a-1),"slotCount is not a power of 2(MathTools.isPow2(slotCount))",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntIntHashTable.hx",lineNumber:403,className:"polygonal.ds.IntIntHashTable",methodName:"rehash"});if(this.slotCount==a)return this;for(var b=new Tg(a,this.capacity),c=this.mData,d=0,e=this.capacity;d<e;){var f=d++,g=c[3*f+1];if(-2147483648!=g){var k=c[3*f];Ga._assert(-2147483648!=g,"val 0x80000000 is reserved(val != KEY_ABSENT)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntIntHashTable.hx",
lineNumber:1046,className:"polygonal.ds.IntIntHashTable",methodName:"set"});b.mSize==b.capacity&&b.grow();f=b.mData;var l=b.mHash,m=3*b.mFree;b.mFree=b.mNext[b.mFree];f[m]=k;f[m+1]=g;k=73856093*k&b.mMask;g=l[k];if(-1==g)l[k]=m;else{for(l=f[g+2];-1!=l;)g=l,l=f[l+2];f[g+2]=m}b.mSize++}}this.mHash=b.mHash;this.mData=b.mData;this.mNext=b.mNext;this.slotCount=a;this.mMask=b.mMask;this.mFree=b.mFree;return this},remap:function(a,b){var c=this.mHash[73856093*a&this.mMask];if(-1==c)return!1;var d=this.mData;
if(d[c]==a)return d[c+1]=b,!0;for(c=d[c+2];-1!=c;){if(d[c]==a){d[c+1]=b;break}c=d[c+2]}return-1!=c},extract:function(a){var b=73856093*a&this.mMask,c=this.mHash,d=c[b];if(-1==d)return-2147483648;var e=this.mData;if(a==e[d])return a=e[d+1],c[b]=-1==e[d+2]?-1:e[d+2],b=d/3|0,this.mNext[b]=this.mFree,this.mFree=b,e[d+1]=-2147483648,e[d+2]=-1,this.mSize--,a;c=d;d=e[d+2];for(b=-2147483648;-1!=d;){if(e[d]==a){b=e[d+1];break}c=d;d=e[c+2]}return-2147483648!=b?(e[c+2]=e[d+2],a=d/3|0,this.mNext[a]=this.mFree,
this.mFree=a,e[d+1]=-2147483648,e[d+2]=-1,this.mSize--,b):-2147483648},toKeyArray:function(){if(0==this.mSize)return[];var a=this.mSize;Ga._assert(0<=a,"len >= 0",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:37,className:"polygonal.ds.tools.ArrayTools",methodName:"alloc"});a=Array(a);for(var b=0,c=this.mData,d=0,e=this.capacity;d<e;){var f=d++;-2147483648!=c[3*f+1]&&(a[b++]=c[3*f])}return a},toString:function(){var a=""+K.string(gb.format("[ IntIntHashTable size="+
this.mSize+" capacity="+this.capacity+" load=%.2f",[this.get_loadFactor()]));if(0==this.mSize)return a+" ]";a+="\n";for(var b=0,c=this.keys();c.hasNext();){var d=c.next();b=Math.max(b,d)}for(var e=1;0!=b;)++e,b=b/10|0;b=[];c="  %- "+e+"d -> %s\n";d=[];for(e=this.keys();e.hasNext();){var f=e.next();d.push(f)}d.sort(function(a,b){return a-b});e=1;f=d.length;for(var g=0,k=1;e<f;){if(d[g]==d[e])++k;else{g=d[g];b[0]=g;if(1<k)k=[],this.getAll(g,k),b[1]=k.join(",");else{k=this.mHash[73856093*g&this.mMask];
if(-1==k)g=-2147483648;else{var l=this.mData;if(l[k]==g)g=l[k+1];else{var m=-2147483648;for(k=l[k+2];-1!=k;){if(l[k]==g){m=l[k+1];break}k=l[k+2]}g=m}}b[1]=g}a+=K.string(gb.format(c,b));g=e;k=1}++e}d=d[g];b[0]=d;if(1<k)e=[],this.getAll(d,e),b[1]=e.join(",");else{e=this.mHash[73856093*d&this.mMask];if(-1==e)d=-2147483648;else if(f=this.mData,f[e]==d)d=f[e+1];else{g=-2147483648;for(e=f[e+2];-1!=e;){if(f[e]==d){g=f[e+1];break}e=f[e+2]}d=g}b[1]=d}a+=K.string(gb.format(c,b));return a+"]"},has:function(a){Ga._assert(-2147483648!=
a,"val 0x80000000 is reserved(val != VAL_ABSENT)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntIntHashTable.hx",lineNumber:697,className:"polygonal.ds.IntIntHashTable",methodName:"has"});for(var b=!1,c=this.mData,d=0,e=this.capacity;d<e;){var f=d++;if(c[3*f+1]==a){b=!0;break}}return b},hasKey:function(a){var b=this.mHash[73856093*a&this.mMask];if(-1==b)return!1;var c=this.mData;if(c[b]==a)return!0;var d=!1;for(b=c[b+2];-1!=b;){if(c[b]==a){d=!0;break}b=c[b+
2]}return d},count:function(a){var b=0,c=this.mHash[73856093*a&this.mMask];if(-1!=c)for(var d=this.mData;-1!=c;)d[c]==a&&++b,c=d[c+2];return b},get:function(a){var b=this.mHash[73856093*a&this.mMask];if(-1==b)return-2147483648;var c=this.mData;if(c[b]==a)return c[b+1];var d=-2147483648;for(b=c[b+2];-1!=b;){if(c[b]==a){d=c[b+1];break}b=c[b+2]}return d},getAll:function(a,b){var c=this.mHash[73856093*a&this.mMask];if(-1==c)return 0;var d=0,e=this.mData;e[c]==a&&(b[d++]=e[c+1]);for(c=e[c+2];-1!=c;)e[c]==
a&&(b[d++]=e[c+1]),c=e[c+2];return d},hasPair:function(a,b){Ga._assert(-2147483648!=b,"val 0x80000000 is reserved(val != KEY_ABSENT)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntIntHashTable.hx",lineNumber:891,className:"polygonal.ds.IntIntHashTable",methodName:"hasPair"});var c=this.mHash[73856093*a&this.mMask];if(-1!=c){var d=this.mData;if(d[c]==a&&d[c+1]==b)return!0;for(c=d[c+2];-1!=c;){if(d[c]==a&&d[c+1]==b)return!0;c=d[c+2]}}return!1},unsetPair:function(a,
b){Ga._assert(-2147483648!=b,"val 0x80000000 is reserved(val != KEY_ABSENT)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntIntHashTable.hx",lineNumber:939,className:"polygonal.ds.IntIntHashTable",methodName:"unsetPair"});var c=73856093*a&this.mMask,d=this.mHash,e=d[c];if(-1==e)return!1;var f=this.mData;if(a==f[e]&&b==f[e+1])return d[c]=-1==f[e+2]?-1:f[e+2],a=e/3|0,this.mNext[a]=this.mFree,this.mFree=a,f[e+1]=-2147483648,f[e+2]=-1,this.mSize--,!0;c=!1;d=e;
for(e=f[e+2];-1!=e;){if(f[e]==a&&f[e+1]==b){c=!0;break}d=e;e=f[d+2]}return c?(f[d+2]=f[e+2],a=e/3|0,this.mNext[a]=this.mFree,this.mFree=a,f[e+1]=-2147483648,f[e+2]=-1,--this.mSize,!0):!1},set:function(a,b){Ga._assert(-2147483648!=b,"val 0x80000000 is reserved(val != KEY_ABSENT)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntIntHashTable.hx",lineNumber:1046,className:"polygonal.ds.IntIntHashTable",methodName:"set"});this.mSize==this.capacity&&this.grow();
var c=this.mData,d=this.mHash,e=3*this.mFree;this.mFree=this.mNext[this.mFree];c[e]=a;c[e+1]=b;var f=73856093*a&this.mMask;b=d[f];if(-1==b)return d[f]=e,this.mSize++,!0;d=c[b]!=a;for(f=c[b+2];-1!=f;)c[f]==a&&(d=!1),b=f,f=c[f+2];c[b+2]=e;this.mSize++;return d},unset:function(a){var b=73856093*a&this.mMask,c=this.mHash,d=c[b];if(-1==d)return!1;var e=this.mData;if(a==e[d])return c[b]=-1==e[d+2]?-1:e[d+2],a=d/3|0,this.mNext[a]=this.mFree,this.mFree=a,e[d+1]=-2147483648,e[d+2]=-1,this.mSize--,!0;b=!1;
c=d;for(d=e[d+2];-1!=d;){if(e[d]==a){b=!0;break}c=d;d=e[c+2]}return b?(e[c+2]=e[d+2],a=d/3|0,this.mNext[a]=this.mFree,this.mFree=a,e[d+1]=-2147483648,e[d+2]=-1,this.mSize--,!0):!1},toValSet:function(){for(var a=new qh(this.capacity),b=this.mData,c=0,d=this.capacity;c<d;){var e=c++;e=b[3*e+1];if(-2147483648!=e){Ga._assert(-2147483648!=e,"value 0x80000000 is reserved(val != VAL_ABSENT)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntHashSet.hx",lineNumber:521,
className:"polygonal.ds.IntHashSet",methodName:"set"});var f=73856093*e&a.mMask,g=a.mData,k=a.mHash[f];if(-1==k)a.mSize==a.capacity&&(a.grow(),g=a.mData),k=a.mFree<<1,a.mFree=a.mNext[a.mFree],a.mHash[f]=k,g[k]=e,a.mSize++;else if(g[k]!=e){for(f=g[k+1];-1!=f;){if(g[f]==e){k=-1;break}k=f;f=g[f+1]}-1!=k&&(a.mSize==a.capacity&&(a.grow(),g=a.mData),f=a.mFree<<1,a.mFree=a.mNext[a.mFree],g[f]=e,g[k+1]=f,a.mSize++)}}}return a},toKeySet:function(){for(var a=new qh(this.capacity),b=this.mData,c=0,d=this.capacity;c<
d;){var e=c++;if(-2147483648!=b[3*e+1]){e=b[3*e];Ga._assert(-2147483648!=e,"value 0x80000000 is reserved(val != VAL_ABSENT)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntHashSet.hx",lineNumber:521,className:"polygonal.ds.IntHashSet",methodName:"set"});var f=73856093*e&a.mMask,g=a.mData,k=a.mHash[f];if(-1==k)a.mSize==a.capacity&&(a.grow(),g=a.mData),k=a.mFree<<1,a.mFree=a.mNext[a.mFree],a.mHash[f]=k,g[k]=e,a.mSize++;else if(g[k]!=e){for(f=g[k+1];-1!=f;){if(g[f]==
e){k=-1;break}k=f;f=g[f+1]}-1!=k&&(a.mSize==a.capacity&&(a.grow(),g=a.mData),f=a.mFree<<1,a.mFree=a.mNext[a.mFree],g[f]=e,g[k+1]=f,a.mSize++)}}}return a},keys:function(){return new Hp(this)},pack:function(){if(this.capacity==this.mMinCapacity)return this;var a=this.mSize,b=this.mMinCapacity;this.capacity=a>b?a:b;a=this.mData;b=0;for(var c=this.mHash,d=Array(3*this.capacity),e=2,f=0,g=this.capacity;f<g;)f++,d[e-1]=-2147483648,d[e]=-1,e+=3;f=0;for(g=this.slotCount;f<g;){var k=f++;e=c[k];if(-1!=e)for(c[k]=
b,d[b]=a[e],d[b+1]=a[e+1],d[b+2]=-1,b+=3,e=a[e+2];-1!=e;)d[b-1]=b,d[b]=a[e],d[b+1]=a[e+1],d[b+2]=-1,b+=3,e=a[e+2]}this.mData=d;a=this.mNext=Array(this.capacity);b=0;for(c=this.capacity-1;b<c;)d=b++,a[d]=d+1;this.mFree=a[this.capacity-1]=-1;return this},iter:function(a){Ga._assert(null!=a,"f != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntIntHashTable.hx",lineNumber:1360,className:"polygonal.ds.IntIntHashTable",methodName:"iter"});for(var b=this.mData,
c,d,e=0,f=this.capacity;e<f;)c=3*e++,d=b[c+1],-2147483648!=d&&a(b[c],d);return this},hashCode:function(a){return 73856093*a&this.mMask},grow:function(){var a=this.capacity;this.capacity=oh.compute(this.growthRate,this.capacity);var b=Array(this.capacity);Db.blit(this.mNext,0,b,0,a);this.mNext=b;b=Array(3*this.capacity);Db.blit(this.mData,0,b,0,3*a);this.mData=b;b=this.mNext;for(var c=a-1,d=this.capacity-1;c<d;){var e=c++;b[e]=e+1}b[this.capacity-1]=-1;this.mFree=a;c=3*a+2;b=this.mData;d=0;for(a=this.capacity-
a;d<a;)d++,b[c-1]=-2147483648,b[c]=-1,c+=3},get_size:function(){return this.mSize},free:function(){this.mNext=this.mData=this.mHash=null;null!=this.mIterator&&(this.mIterator.free(),this.mIterator=null);this.mTmpBuffer=null},contains:function(a){return this.has(a)},remove:function(a){Ga._assert(-2147483648!=a,"val 0x80000000 is reserved(val != KEY_ABSENT)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/IntIntHashTable.hx",lineNumber:1465,className:"polygonal.ds.IntIntHashTable",
methodName:"remove"});for(var b=0,c=this.mTmpBuffer,d=this.mTmpBufferSize,e=this.mData,f,g=0,k=this.capacity;g<k;)f=3*g++,e[f+1]==a&&(b==d&&(this.mTmpBufferSize=d<<=1,c=Array(d),Db.blit(this.mTmpBuffer,0,c,0,b),this.mTmpBuffer=c),c[b++]=e[f]);a=0;for(d=b;a<d;){e=a++;g=c[e];k=73856093*g&this.mMask;var l=this.mHash;e=l[k];if(-1!=e)if(f=this.mData,g==f[e])l[k]=-1==f[e+2]?-1:f[e+2],g=e/3|0,this.mNext[g]=this.mFree,this.mFree=g,f[e+1]=-2147483648,f[e+2]=-1,this.mSize--;else{k=!1;l=e;for(e=f[e+2];-1!=e;){if(f[e]==
g){k=!0;break}l=e;e=f[l+2]}k&&(f[l+2]=f[e+2],g=e/3|0,this.mNext[g]=this.mFree,this.mFree=g,f[e+1]=-2147483648,f[e+2]=-1,this.mSize--)}}return 0<b},clear:function(a){a=this.mHash;for(var b=0,c=this.slotCount;b<c;){var d=b++;a[d]=-1}b=2;a=this.mData;c=0;for(d=this.capacity;c<d;)c++,a[b-1]=-2147483648,a[b]=-1,b+=3;a=this.mNext;b=0;for(c=this.capacity-1;b<c;)d=b++,a[d]=d+1;a[this.capacity-1]=-1;this.mSize=this.mFree=0},iterator:function(){return this.reuseIterator?(null==this.mIterator?this.mIterator=
new Wl(this):this.mIterator.reset(),this.mIterator):new Wl(this)},isEmpty:function(){return 0==this.mSize},toArray:function(){if(0==this.mSize)return[];var a=this.mSize;Ga._assert(0<=a,"len >= 0",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:37,className:"polygonal.ds.tools.ArrayTools",methodName:"alloc"});a=Array(a);for(var b=0,c,d=this.mData,e=0,f=this.capacity;e<f;)c=e++,c=d[3*c+1],-2147483648!=c&&(a[b++]=c);return a},clone:function(a,
b){a=new Tg(this.slotCount,this.capacity);Db.blit(this.mHash,0,a.mHash,0,this.slotCount);Db.blit(this.mData,0,a.mData,0,3*this.capacity);Db.blit(this.mNext,0,a.mNext,0,this.capacity);a.mMask=this.mMask;a.slotCount=this.slotCount;a.capacity=this.capacity;a.mFree=this.mFree;a.mSize=this.mSize;return a},__class__:Tg,__properties__:{get_size:"get_size",get_loadFactor:"get_loadFactor"}};var Wl=function(a){this.mObject=a;this.mData=a.mData;this.mI=0;this.mS=a.capacity;this.scan()};h["polygonal.ds.IntIntHashTableValIterator"]=
Wl;Wl.__name__="polygonal.ds.IntIntHashTableValIterator";Wl.__interfaces__=[ph];Wl.prototype={mObject:null,mI:null,mS:null,mData:null,free:function(){this.mData=this.mObject=null},reset:function(){this.mData=this.mObject.mData;this.mI=0;this.mS=this.mObject.capacity;this.scan();return this},hasNext:function(){return this.mI<this.mS},next:function(){var a=this.mData[3*this.mI++ +1];this.scan();return a},remove:function(){throw new E("unsupported operation");},scan:function(){for(;this.mI<this.mS&&
-2147483648==this.mData[3*this.mI+1];)this.mI++},__class__:Wl};var Hp=function(a){this.mObject=a;this.mData=a.mData;this.mI=0;this.mS=a.capacity;this.scan()};h["polygonal.ds.IntIntHashTableKeyIterator"]=Hp;Hp.__name__="polygonal.ds.IntIntHashTableKeyIterator";Hp.__interfaces__=[ph];Hp.prototype={mObject:null,mI:null,mS:null,mData:null,free:function(){this.mData=this.mObject=null},reset:function(){this.mData=this.mObject.mData;this.mI=0;this.mS=this.mObject.capacity;this.scan();return this},hasNext:function(){return this.mI<
this.mS},next:function(){var a=this.mData[3*this.mI++];this.scan();return a},remove:function(){throw new E("unsupported operation");},scan:function(){for(;this.mI<this.mS&&-2147483648==this.mData[3*this.mI+1];)this.mI++},__class__:Hp};var ij=function(a,b){null==a&&(a=16);this.mIterator=null;this.mSize=0;this.reuseIterator=!1;this.growthRate=-2;this.key=Sg.next();this.capacity=this.mInitialCapacity=1>a?1:a;null!=b&&(this.capacity=b.length);this.mData=Array(this.capacity);if(null!=b)for(a=0;a<b.length;){var c=
b[a];++a;this.set(c)}};h["polygonal.ds.ListSet"]=ij;ij.__name__="polygonal.ds.ListSet";ij.__interfaces__=[xk];ij.prototype={key:null,capacity:null,growthRate:null,reuseIterator:null,mData:null,mInitialCapacity:null,mSize:null,mIterator:null,reserve:function(a){a>this.capacity&&(this.capacity=a,this.resizeContainer(a));return this},pack:function(){if(this.capacity>this.mInitialCapacity){var a=this.mInitialCapacity,b=this.mSize;this.capacity=a>b?a:b;this.resizeContainer(this.capacity)}else{a=this.mData;
b=this.mSize;for(var c=this.capacity;b<c;){var d=b++;a[d]=null}}return this},iter:function(a){Ga._assert(null!=a,"f != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/ListSet.hx",lineNumber:136,className:"polygonal.ds.ListSet",methodName:"iter"});for(var b=this.mData,c=0,d=this.mSize;c<d;){var e=c++;a(b[e])}return this},toString:function(){var a=""+K.string("[ ListSet size="+this.mSize);if(this.isEmpty())return a+" ]";a+="\n";for(var b=0,c=this.mSize;b<
c;){var d=b++;a+="  ";a+=K.string(K.string(this.mData[d]));a+="\n"}return a+"]"},has:function(a){if(this.isEmpty())return!1;for(var b=this.mData,c=0,d=this.mSize;c<d;){var e=c++;if(b[e]==a)return!0}return!1},set:function(a){for(var b=this.mData,c=0,d=this.mSize;c<d;){var e=c++;if(b[e]==a)return!1}this.mSize==this.capacity&&(this.grow(),b=this.mData);b[this.mSize++]=a;return!0},unset:function(a){return this.remove(a)},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(),Ga._assert(L.__implements(a,Rg),"element is not of type Cloneable(Std.is(val, Cloneable))",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/ListSet.hx",lineNumber:230,className:"polygonal.ds.ListSet",methodName:"merge"}),this.set(L.__cast(a,Rg).clone())},get_size:function(){return this.mSize},free:function(){Db.nullify(this.mData);this.mData=
null;null!=this.mIterator&&(this.mIterator.free(),this.mIterator=null)},contains:function(a){return this.has(a)},remove:function(a){for(var b=this.mData,c=0,d=this.mSize;c<d;){var e=c++;if(b[e]==a)return b[e]=this.mData[--this.mSize],!0}return!1},clear:function(a){null==a&&(a=!1);a&&Db.nullify(this.mData);this.mSize=0},iterator:function(){if(this.reuseIterator){if(null==this.mIterator)this.mIterator=new Xl(this);else{var a=this.mIterator;a.mData=a.mObject.mData;a.mS=a.mObject.mSize;a.mI=0}return this.mIterator}return new Xl(this)},
isEmpty:function(){return 0==this.mSize},toArray:function(){return Db.toArray(this.mData,0,this.mSize,[])},clone:function(a,b){null==a&&(a=!0);var c=new ij;c.capacity=this.mSize;c.mSize=this.mSize;c.mData=Array(this.mSize);var d=this.mData,e=c.mData;if(a)Db.blit(d,0,e,0,this.mSize);else if(null==b)for(b=0,a=this.mSize;b<a;){var f=b++;Ga._assert(L.__implements(d[f],Rg),"element is not of type Cloneable(Std.is(src.get(i), Cloneable))",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/ListSet.hx",
lineNumber:359,className:"polygonal.ds.ListSet",methodName:"clone"});e[f]=L.__cast(d[f],Rg).clone()}else for(a=0,f=this.mSize;a<f;){var g=a++;e[g]=b(d[g])}return c},grow:function(){this.capacity=oh.compute(this.growthRate,this.capacity);this.resizeContainer(this.capacity)},resizeContainer:function(a){a=Array(a);Db.blit(this.mData,0,a,0,this.mSize);this.mData=a},__class__:ij,__properties__:{get_size:"get_size"}};var Xl=function(a){this.mObject=a;this.mData=this.mObject.mData;this.mS=this.mObject.mSize;
this.mI=0};h["polygonal.ds.ListSetIterator"]=Xl;Xl.__name__="polygonal.ds.ListSetIterator";Xl.__interfaces__=[ph];Xl.prototype={mObject:null,mData:null,mI:null,mS:null,free:function(){this.mData=this.mObject=null},reset:function(){this.mData=this.mObject.mData;this.mS=this.mObject.mSize;this.mI=0;return this},hasNext:function(){return this.mI<this.mS},next:function(){return this.mData[this.mI++]},remove:function(){Ga._assert(0<this.mI,"call next() before removing an element(mI > 0)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/ListSet.hx",
lineNumber:430,className:"polygonal.ds.ListSetIterator",methodName:"remove"});this.mData[this.mI]=this.mData[--this.mS]},__class__:Xl};var gb=function(){};h["polygonal.ds.Printf"]=gb;gb.__name__="polygonal.ds.Printf";gb.init=function(){gb._padChars=Array(40);gb._padChars[0]=ba.rpad("","0",0);gb._padChars[1]=ba.rpad("","0",1);gb._padChars[2]=ba.rpad("","0",2);gb._padChars[3]=ba.rpad("","0",3);gb._padChars[4]=ba.rpad("","0",4);gb._padChars[5]=ba.rpad("","0",5);gb._padChars[6]=ba.rpad("","0",6);gb._padChars[7]=
ba.rpad("","0",7);gb._padChars[8]=ba.rpad("","0",8);gb._padChars[9]=ba.rpad("","0",9);gb._padChars[10]=ba.rpad("","0",10);gb._padChars[11]=ba.rpad("","0",11);gb._padChars[12]=ba.rpad("","0",12);gb._padChars[13]=ba.rpad("","0",13);gb._padChars[14]=ba.rpad("","0",14);gb._padChars[15]=ba.rpad("","0",15);gb._padChars[16]=ba.rpad("","0",16);gb._padChars[17]=ba.rpad("","0",17);gb._padChars[18]=ba.rpad("","0",18);gb._padChars[19]=ba.rpad("","0",19);for(var a=0;20>a;){var b=a++;gb._padChars[b+20]=ba.rpad("",
" ",b)}gb._tmp=Array(64)};gb.format=function(a,b){gb._initialized||(gb._initialized=!0,gb.init());var c=new bd,d=0,e=[],f=0;for(a=gb.tokenize(a,e);f<a;){var g=f++,k=e[g];switch(k._hx_index){case 0:g=k.string;c.b+=null==g?"null":""+g;break;case 1:g=k.args;k=k.type;if(null==g.width){if(!L.__instanceof(b[d],Hg))throw new E(new Oh("invalid 'width' argument"));g.width=b[d++]}if(null==g.precision){if(!L.__instanceof(b[d],Hg))throw new E(new Oh("invalid 'precision' argument"));g.precision=b[d++]}if(-1<g.pos){if(g.pos>
b.length-1)throw new E(new Oh("argument index out of range"));var l=b[g.pos]}else l=b[d++];null==l&&(l="null");switch(k._hx_index){case 0:switch(k.type._hx_index){case 0:gb.formatCharacter(l,g,c);break;case 1:gb.formatSignedDecimal(l,g,c);break;case 2:gb.formatUnsignedDecimal(l,g,c);break;case 3:gb.formatOctal(l,g,c);break;case 4:gb.formatHexadecimal(l,g,c);break;case 5:gb.formatBinary(l,g,c)}break;case 1:switch(k.floatType._hx_index){case 0:gb.formatFloat(l,g,c);break;case 1:gb.formatScientific(l,
g,c);break;case 2:gb.formatNaturalFloat(l,g,c)}break;case 2:gb.formatString(l,g,c);break;case 3:throw new E(new Oh("specifier 'p' is not supported"));case 4:throw new E(new Oh("specifier 'n' is not supported"));}break;case 2:g=k.name;if(!Object.prototype.hasOwnProperty.call(b[0],g))throw new E(new Oh('no field named "'+g+'" found'));c.b+=K.string(K.string(X.field(b[0],g)));++d;break;case 3:throw new E(new Oh("Invalid format specifier."));}}return c.b};gb.tokenize=function(a,b){for(var c=0,d,e=0,f=
new bd,g=a.length;c<g;)if(d=a.charCodeAt(c++),37==d)if(d=a.charCodeAt(c++),37==d)f.b+=String.fromCodePoint(d);else{0<f.b.length&&(b[e++]=Yl.Raw(f.b),f=new bd);if(40==d)if(d=a.indexOf(")",c),-1==d)d=Yl.Unknown("named parameter",c);else{var k=B.substr(a,c,d-c);c=d+1;d=Yl.Property(k)}else{k=0;null==k&&(k=0);k=new Hr(k,-1,-1,-1);a:for(;32<=d&&48>=d;)switch(d){case 32:d=a.charCodeAt(c++);k.flags|=1<<nb.Space._hx_index;break;case 35:d=a.charCodeAt(c++);k.flags|=1<<nb.Sharp._hx_index;break;case 43:d=a.charCodeAt(c++);
k.flags|=1<<nb.Plus._hx_index;break;case 45:d=a.charCodeAt(c++);k.flags|=1<<nb.Minus._hx_index;break;case 48:d=a.charCodeAt(c++);k.flags|=1<<nb.Zero._hx_index;break;default:break a}0!=(k.flags&1<<nb.Minus._hx_index)&&0!=(k.flags&1<<nb.Zero._hx_index)&&(k.flags&=-1-(1<<nb.Zero._hx_index));0!=(k.flags&1<<nb.Space._hx_index)&&0!=(k.flags&1<<nb.Plus._hx_index)&&(k.flags&=-1-(1<<nb.Space._hx_index));if(42==d)k.width=null,d=a.charCodeAt(c++);else if(48<=d&&57>=d){for(var l=0;48<=d&&57>=d;)l=d-48+10*l,d=
a.charCodeAt(c++);k.width=l;if(36==d)if(k.pos=l-1,k.width=-1,d=a.charCodeAt(c++),42==d)k.width=null,d=a.charCodeAt(c++);else if(48<=d&&57>=d){for(l=0;48<=d&&57>=d;)l=d-48+10*l,d=a.charCodeAt(c++);k.width=l}}if(46==d)if(d=a.charCodeAt(c++),42==d)k.precision=null,d=a.charCodeAt(c++);else{l=0;if(48<=d&&57>=d)for(;48<=d&&57>=d;)l=d-48+10*l,d=a.charCodeAt(c++);k.precision=l}a:for(;76<=d&&108>=d;)switch(d){case 76:d=a.charCodeAt(c++);k.flags|=1<<nb.LengthUpperCaseL._hx_index;break;case 104:d=a.charCodeAt(c++);
k.flags|=1<<nb.LengthH._hx_index;break;case 108:d=a.charCodeAt(c++);k.flags|=1<<nb.LengthLowerCaseL._hx_index;break;default:break a}if(69<=d&&120>=d){switch(d){case 69:k.flags|=1<<nb.UpperCase._hx_index;l=Of.FmtFloat(Ir.FScientific);break;case 71:k.flags|=1<<nb.UpperCase._hx_index;l=Of.FmtFloat(Ir.FNatural);break;case 88:k.flags|=1<<nb.UpperCase._hx_index;l=Of.FmtInt(yk.IHex);break;case 98:l=Of.FmtInt(yk.IBin);break;case 99:l=Of.FmtInt(yk.ICharacter);break;case 100:l=Of.FmtInt(yk.ISignedDecimal);
break;case 101:l=Of.FmtFloat(Ir.FScientific);break;case 102:l=Of.FmtFloat(Ir.FNormal);break;case 103:l=Of.FmtFloat(Ir.FNatural);break;case 105:l=Of.FmtInt(yk.ISignedDecimal);break;case 110:l=Of.FmtNothing;break;case 111:l=Of.FmtInt(yk.IOctal);break;case 112:l=Of.FmtPointer;break;case 115:l=Of.FmtString;break;case 117:l=Of.FmtInt(yk.IUnsignedDecimal);break;case 120:l=Of.FmtInt(yk.IHex);break;default:l=null}d=null==l?Yl.Unknown(String.fromCodePoint(d),c):Yl.Tag(l,k)}else d=Yl.Unknown(String.fromCodePoint(d),
c)}b[e++]=d}else f.b+=String.fromCodePoint(d);0<f.b.length&&(b[e++]=Yl.Raw(f.b));return e};gb.formatBinary=function(a,b,c){var d=b.flags,e=b.precision,f=b.width;0!=(d&1<<nb.LengthH._hx_index)&&(a&=65535);if(0==a){if(0==e)return;d&=-1-(1<<nb.Sharp._hx_index)}-1==e&&(e=1);b=gb._tmp;for(var g=0;b[g++]=a&1,a>>>=1,0<a;);a=g;if(0!=(d&1<<nb.Minus._hx_index)){0!=(d&1<<nb.Sharp._hx_index)&&(c.b+="0b");if(e>g)for(var k=0,l=e-g;k<l;)k++,c.b+="0";for(;-1<--a;)c.b+=String.fromCodePoint(48+b[a]);0!=(d&1<<nb.Sharp._hx_index)&&
(f-=2);e>g&&(g=e);if(f>g)for(e=0,b=f-g;e<b;)e++,c.b+=" "}else{k=g;e>k&&(k=e);0!=(d&1<<nb.Sharp._hx_index)&&(f-=2);if(f>k)if(0!=(d&1<<nb.Zero._hx_index)&&1==e)for(l=0,f-=k;l<f;)l++,c.b+="0";else for(l=0,f-=k;l<f;)l++,c.b+=" ";0!=(d&1<<nb.Sharp._hx_index)&&(c.b+="0b");if(e>g)for(d=0,e-=g;d<e;)d++,c.b+="0";for(;-1<--a;)c.b+=String.fromCodePoint(48+b[a])}};gb.formatOctal=function(a,b,c){var d=b.flags,e=b.precision,f=b.width;0!=(d&1<<nb.LengthH._hx_index)&&(a&=65535);if(0==a){if(0==e){c.b+=K.string(0!=
(d&1<<nb.Sharp._hx_index)?"0":"");return}d&=-1-(1<<nb.Sharp._hx_index)}b=gb._tmp;for(var g=0;b[g++]=a&7,a>>>=3,0<a;);a=g;-1!=e?0!=(d&1<<nb.Zero._hx_index)&&(d&=-1-(1<<nb.Zero._hx_index),d|=1<<nb.Space._hx_index):e=1;if(0!=(d&1<<nb.Minus._hx_index)){0!=(d&1<<nb.Sharp._hx_index)&&(c.b+="0",++g);if(e>g){d=0;for(var k=e-g;d<k;)d++,c.b+="0"}for(;-1<--a;)d=String.fromCodePoint(48+b[a]),c.b+=K.string(d);e>g&&(g=e);if(f>g)for(b=0,e=f-g;b<e;)b++,c.b+=" "}else{0!=(d&1<<nb.Sharp._hx_index)&&++g;k=g;e>k&&(k=
e);if(f>k)if(0!=(d&1<<nb.Zero._hx_index)){var l=0;for(f-=k;l<f;)l++,c.b+="0"}else for(l=0,f-=k;l<f;)l++,c.b+=" ";0!=(d&1<<nb.Sharp._hx_index)&&(c.b+="0");if(e>g)for(f=0,e-=g;f<e;)f++,c.b+="0";for(;-1<--a;)e=String.fromCodePoint(48+b[a]),c.b+=K.string(e)}};gb.formatHexadecimal=function(a,b,c){var d=b.flags,e=b.precision,f=b.width;0!=(d&1<<nb.LengthH._hx_index)&&(a&=65535);if(0==a){if(0==e)return;d&=-1-(1<<nb.Sharp._hx_index)}-1==e&&(e=1);b=gb._tmp;for(var g=0;b[g++]=a&15,a>>>=4,0<a;);a=g;if(0!=(d&
1<<nb.Minus._hx_index)){0!=(d&1<<nb.Sharp._hx_index)&&(c.b=0!=(d&1<<nb.UpperCase._hx_index)?c.b+"0X":c.b+"0x");if(e>g)for(var k=0,l=e-g;k<l;)k++,c.b+="0";for(k=0!=(d&1<<nb.UpperCase._hx_index)?65:97;-1<--a;)l=b[a],l=10>l?String.fromCodePoint(48+l):String.fromCodePoint(k+(l-10)),c.b+=K.string(l);0!=(d&1<<nb.Sharp._hx_index)&&(f-=2);e>g&&(g=e);if(f>g)for(b=0,a=f-g;b<a;)b++,c.b+=" "}else{k=g;e>k&&(k=e);0!=(d&1<<nb.Sharp._hx_index)&&(f-=2);if(f>k)if(0!=(d&1<<nb.Zero._hx_index)&&1==e)for(l=0,f-=k;l<f;)l++,
c.b+="0";else for(l=0,f-=k;l<f;)l++,c.b+=" ";0!=(d&1<<nb.Sharp._hx_index)&&(c.b=0!=(d&1<<nb.UpperCase._hx_index)?c.b+"0X":c.b+"0x");if(e>g)for(f=0,e-=g;f<e;)f++,c.b+="0";for(d=0!=(d&1<<nb.UpperCase._hx_index)?65:97;-1<--a;)e=b[a],e=10>e?String.fromCodePoint(48+e):String.fromCodePoint(d+(e-10)),c.b+=K.string(e)}};gb.formatSignedDecimal=function(a,b,c){var d=b.flags,e=b.precision,f=b.width;if(0!=e||0!=a){0!=(d&1<<nb.LengthH._hx_index)&&(a&=65535);b=K.string(0>a?-a:a);var g=b.length,k=0>a?"-":0!=(d&
1<<nb.Plus._hx_index)?"+":0!=(d&1<<nb.Space._hx_index)?" ":null;a=null!=k;if(0!=(d&1<<nb.Minus._hx_index)){a&&(c.b+=null==k?"null":""+k);if(e>g)for(d=0,k=e-g;d<k;)d++,c.b+="0";c.b+=null==b?"null":""+b;e>g&&(g=e);g+=a?1:0;if(f>g)for(e=0,b=f-g;e<b;)e++,c.b+=" "}else{var l=g+(a?1:0);e>l&&(l=e);if(f>l)if(0!=(d&1<<nb.Zero._hx_index)){a&&(c.b+=null==k?"null":""+k);var m=0;for(f-=l;m<f;)m++,c.b+="0"}else for(m=0,f-=l;m<f;)m++,c.b+=" ";a&&0==(d&1<<nb.Zero._hx_index)&&(c.b+=null==k?"null":""+k);if(e>g)for(d=
0,e-=g;d<e;)d++,c.b+="0";c.b+=null==b?"null":""+b}}};gb.formatUnsignedDecimal=function(a,b,c){if(0<=a)gb.formatSignedDecimal(a,b,c);else{a=new Xb(0,a);a=Qn.toString(a);var d=a.length,e=b.flags,f=b.precision;b=b.width;if(0!=(e&1<<nb.Minus._hx_index)){if(f>d){var g=0;for(e=f-d;g<e;)g++,c.b+="0"}c.b+=null==a?"null":""+a;f>d&&(d=f);if(b>d)for(a=0,d=b-d;a<d;)a++,c.b+=" "}else{g=d;f>g&&(g=f);if(b>g)if(0!=(e&1<<nb.Zero._hx_index))for(e=0,b-=g;e<b;)e++,c.b+="0";else for(e=0,b-=g;e<b;)e++,c.b+=" ";if(f>d)for(b=
0,d=f-d;b<d;)b++,c.b+="0";c.b+=null==a?"null":""+a}}};gb.formatNaturalFloat=function(a,b,c){var d=new bd;gb.formatFloat(a,b,d);var e=d.b;d=new bd;gb.formatScientific(a,b,d);a=d.b;e=e.length<=a.length?e:a;c.b+=null==e?"null":""+e};gb.formatScientific=function(a,b,c){var d=b.flags,e=b.precision;-1==e&&(e=gb.DEFAULT_PRECISION);var f,g="";if(0==a){var k=f=0;g+="0";if(0<e){g+=".";for(var l=0,m=e;l<m;)l++,g+="0"}}else l=Math,f=0<a?1:0>a?-1:0,a=l.abs(a),k=l.floor(Math.log(a)/2.302585092994046),a/=l.pow(10,
k),l=l.pow(.1,e),a=Math.round(a/l)*l;0!=a&&(g+=B.substr(null==a?"null":""+a,0,e+2));g+=0!=(d&1<<nb.UpperCase._hx_index)?"E":"e";g+=0<=k?"+":"-";a=K.string(0>k?-k:k);l=gb.DEFAULT_NUM_EXP_DIGITS-a.length;if(!(1>l)){if(30<l)for(e="0",k=0,--l;k<l;)k++,e+="0";else e=gb._padChars[l];a=e+a}g+=a;(a=-1==f||0!=(d&1<<nb.Plus._hx_index)||0!=(d&1<<nb.Space._hx_index))&&0==(d&1<<nb.Zero._hx_index)&&(g=(-1==f?"-":0!=(d&1<<nb.Plus._hx_index)?"+":" ")+g);if(0<b.width&&(b=b.width,a&&0!=(d&1<<nb.Zero._hx_index)&&--b,
e=0!=(d&1<<nb.Zero._hx_index)?0:20,b-=g.length,!(1>b))){if(30<b)for(e=k=0==e?"0":" ",l=0,--b;l<b;)l++,e+=k;else e=gb._padChars[e+b];g=e+g}a&&0!=(d&1<<nb.Zero._hx_index)&&(g=(-1==f?"-":0!=(d&1<<nb.Plus._hx_index)?"+":" ")+g);c.b+=null==g?"null":""+g};gb.formatFloat=function(a,b,c){var d=b.flags,e=b.precision;-1==e&&(e=gb.DEFAULT_PRECISION);b=b.width;var f=0>a;0==e?(a=K.string(Math.round(a)),0!=(d&1<<nb.Sharp._hx_index)&&(a+=".")):a=a.toFixed(e);var g=a.length;f&&-1<a.indexOf("-")&&(a=B.substr(a,1,
null));e=null;0==(d&1<<nb.Plus._hx_index)||f?0!=(d&1<<nb.Space._hx_index)?(e=" ",++g):f&&(e="-"):(e="+",++g);f=null!=e;if(0!=(d&1<<nb.Minus._hx_index)){if(f&&(c.b+=null==e?"null":""+e),c.b+=null==a?"null":""+a,b>g)for(a=0,b-=g;a<b;)a++,c.b+=" "}else{if(b>g)if(0!=(d&1<<nb.Zero._hx_index))for(f&&(c.b+=null==e?"null":""+e,f=!1),d=0,b-=g;d<b;)d++,c.b+="0";else for(d=0,b-=g;d<b;)d++,c.b+=" ";f&&(c.b+=null==e?"null":""+e);c.b+=null==a?"null":""+a}};gb.formatCharacter=function(a,b,c){if(0!=(b.flags&1<<nb.Minus._hx_index))for(a=
String.fromCodePoint(a),c.b+=K.string(a),a=0,b=b.width-1;a<b;)a++,c.b+=" ";else{var d=0;for(b=b.width-1;d<b;)d++,c.b+=" ";b=String.fromCodePoint(a);c.b+=K.string(b)}};gb.formatString=function(a,b,c){var d=a.length,e=b.precision;if(0!=(b.flags&1<<nb.Minus._hx_index))for(-1!=e?(c.b+=null==e?B.substr(a,0,null):B.substr(a,0,e),d=e):c.b+=null==a?"null":""+a,a=0,b=b.width-d;a<b;)a++,c.b+=" ";else{-1!=e&&(d=e);var f=0;for(b=b.width-d;f<b;)f++,c.b+=" ";c.b=-1!=e?c.b+(null==e?B.substr(a,0,null):B.substr(a,
0,e)):c.b+(null==a?"null":""+a)}};gb.pad=function(a,b,c,d){b-=a.length;if(1>b)return a;if(30<b){var e=0==c?"0":" ";c=e;var f=0;for(--b;f<b;)f++,c+=e}else c=gb._padChars[c+b];return 0<d?a+c:c+a};var Oh=function(a){this.message=a};h["polygonal.ds.PrintfError"]=Oh;Oh.__name__="polygonal.ds.PrintfError";Oh.prototype={message:null,toString:function(){return this.message},__class__:Oh};var Hr=function(a,b,c,d){this.flags=a;this.pos=b;this.width=c;this.precision=d};h["polygonal.ds._Printf.FormatArgs"]=Hr;
Hr.__name__="polygonal.ds._Printf.FormatArgs";Hr.prototype={flags:null,pos:null,width:null,precision:null,__class__:Hr};var nb=C["polygonal.ds._Printf.FormatFlag"]={__ename__:"polygonal.ds._Printf.FormatFlag",__constructs__:"Minus Plus Space Sharp Zero LengthH LengthUpperCaseL LengthLowerCaseL UpperCase".split(" "),Minus:{_hx_index:0,__enum__:"polygonal.ds._Printf.FormatFlag",toString:u},Plus:{_hx_index:1,__enum__:"polygonal.ds._Printf.FormatFlag",toString:u},Space:{_hx_index:2,__enum__:"polygonal.ds._Printf.FormatFlag",
toString:u},Sharp:{_hx_index:3,__enum__:"polygonal.ds._Printf.FormatFlag",toString:u},Zero:{_hx_index:4,__enum__:"polygonal.ds._Printf.FormatFlag",toString:u},LengthH:{_hx_index:5,__enum__:"polygonal.ds._Printf.FormatFlag",toString:u},LengthUpperCaseL:{_hx_index:6,__enum__:"polygonal.ds._Printf.FormatFlag",toString:u},LengthLowerCaseL:{_hx_index:7,__enum__:"polygonal.ds._Printf.FormatFlag",toString:u},UpperCase:{_hx_index:8,__enum__:"polygonal.ds._Printf.FormatFlag",toString:u}},Yl=C["polygonal.ds._Printf.FormatToken"]=
{__ename__:"polygonal.ds._Printf.FormatToken",__constructs__:["Raw","Tag","Property","Unknown"],Raw:(x=function(a){return{_hx_index:0,string:a,__enum__:"polygonal.ds._Printf.FormatToken",toString:u}},x.__params__=["string"],x),Tag:(x=function(a,b){return{_hx_index:1,type:a,args:b,__enum__:"polygonal.ds._Printf.FormatToken",toString:u}},x.__params__=["type","args"],x),Property:(x=function(a){return{_hx_index:2,name:a,__enum__:"polygonal.ds._Printf.FormatToken",toString:u}},x.__params__=["name"],x),
Unknown:(x=function(a,b){return{_hx_index:3,string:a,pos:b,__enum__:"polygonal.ds._Printf.FormatToken",toString:u}},x.__params__=["string","pos"],x)},Of=C["polygonal.ds._Printf.FormatDataType"]={__ename__:"polygonal.ds._Printf.FormatDataType",__constructs__:["FmtInt","FmtFloat","FmtString","FmtPointer","FmtNothing"],FmtInt:(x=function(a){return{_hx_index:0,type:a,__enum__:"polygonal.ds._Printf.FormatDataType",toString:u}},x.__params__=["type"],x),FmtFloat:(x=function(a){return{_hx_index:1,floatType:a,
__enum__:"polygonal.ds._Printf.FormatDataType",toString:u}},x.__params__=["floatType"],x),FmtString:{_hx_index:2,__enum__:"polygonal.ds._Printf.FormatDataType",toString:u},FmtPointer:{_hx_index:3,__enum__:"polygonal.ds._Printf.FormatDataType",toString:u},FmtNothing:{_hx_index:4,__enum__:"polygonal.ds._Printf.FormatDataType",toString:u}},yk=C["polygonal.ds._Printf.IntType"]={__ename__:"polygonal.ds._Printf.IntType",__constructs__:"ICharacter ISignedDecimal IUnsignedDecimal IOctal IHex IBin".split(" "),
ICharacter:{_hx_index:0,__enum__:"polygonal.ds._Printf.IntType",toString:u},ISignedDecimal:{_hx_index:1,__enum__:"polygonal.ds._Printf.IntType",toString:u},IUnsignedDecimal:{_hx_index:2,__enum__:"polygonal.ds._Printf.IntType",toString:u},IOctal:{_hx_index:3,__enum__:"polygonal.ds._Printf.IntType",toString:u},IHex:{_hx_index:4,__enum__:"polygonal.ds._Printf.IntType",toString:u},IBin:{_hx_index:5,__enum__:"polygonal.ds._Printf.IntType",toString:u}},Ir=C["polygonal.ds._Printf.FloatType"]={__ename__:"polygonal.ds._Printf.FloatType",
__constructs__:["FNormal","FScientific","FNatural"],FNormal:{_hx_index:0,__enum__:"polygonal.ds._Printf.FloatType",toString:u},FScientific:{_hx_index:1,__enum__:"polygonal.ds._Printf.FloatType",toString:u},FNatural:{_hx_index:2,__enum__:"polygonal.ds._Printf.FloatType",toString:u}},Be=function(){};h["polygonal.ds.tools.ArrayTools"]=Be;Be.__name__="polygonal.ds.tools.ArrayTools";Be.alloc=function(a){Ga._assert(0<=a,"len >= 0",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:37,className:"polygonal.ds.tools.ArrayTools",methodName:"alloc"});return Array(a)};Be.trim=function(a,b){a.length>b&&(a.length=b);return a};Be.swap=function(a,b,c){Ga._assert(null!=a,"array != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:94,className:"polygonal.ds.tools.ArrayTools",methodName:"swap"});Ga._assert(0<=b&&b<a.length,"0 <= a && a < array.length",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:95,className:"polygonal.ds.tools.ArrayTools",methodName:"swap"});Ga._assert(0<=c&&c<a.length,"0 <= b && b < array.length",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:96,className:"polygonal.ds.tools.ArrayTools",methodName:"swap"});if(b!=c){var d=a[b];a[b]=a[c];a[c]=d}};Be.getFront=function(a,b){Ga._assert(null!=a,"array != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:113,className:"polygonal.ds.tools.ArrayTools",methodName:"getFront"});Ga._assert(0<=b&&b<a.length,"0 <= index && index < array.length",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:114,className:"polygonal.ds.tools.ArrayTools",methodName:"getFront"});Ga._assert(null!=a,"array != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:94,className:"polygonal.ds.tools.ArrayTools",
methodName:"swap"});Ga._assert(0<=b&&b<a.length,"0 <= a && a < array.length",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:95,className:"polygonal.ds.tools.ArrayTools",methodName:"swap"});Ga._assert(0<a.length,"0 <= b && b < array.length",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:96,className:"polygonal.ds.tools.ArrayTools",methodName:"swap"});if(0!=b){var c=
a[b];a[b]=a[0];a[0]=c}return a[0]};Be.init=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);d=0>=d?a.length:c+d;Ga._assert(0<=c&&c<a.length,"min >= 0 && min < a.length",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:129,className:"polygonal.ds.tools.ArrayTools",methodName:"init"});for(Ga._assert(d<=a.length,"max <= a.length",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:130,className:"polygonal.ds.tools.ArrayTools",methodName:"init"});c<d;)a[c++]=b;return a};Be.blit=function(a,b,c,d,e){if(0<e)if(Ga._assert(b<a.length,"srcPos out of range(srcPos < src.length)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:145,className:"polygonal.ds.tools.ArrayTools",methodName:"blit"}),Ga._assert(d<c.length,"dstPos out of range(dstPos < dst.length)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:146,className:"polygonal.ds.tools.ArrayTools",methodName:"blit"}),Ga._assert(b+e<=a.length&&d+e<=c.length,"n out of range(srcPos + n <= src.length && dstPos + n <= dst.length)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:147,className:"polygonal.ds.tools.ArrayTools",methodName:"blit"}),a==c)if(b<d)for(c=b+e,d+=e,b=0;b<e;)b++,--c,--d,a[d]=a[c];else{if(b>d)for(c=b,b=0;b<e;)b++,a[d]=a[c],++c,++d}else if(0==b&&0==d)for(d=
0;d<e;)b=d++,c[b]=a[b];else if(0==b)for(b=0;b<e;){var f=b++;c[d+f]=a[f]}else if(0==d)for(d=0;d<e;)f=d++,c[f]=a[b+f];else for(f=0;f<e;){var g=f++;c[d+g]=a[b+g]}};Be.iter=function(a,b,c){null==c&&(c=0);0==c&&(c=a.length);for(var d=0;d<c;){var e=d++;b(a[e])}};Be.forEach=function(a,b){for(var c=0,d=a.length;c<d;){var e=c++;a[e]=b(a[e],e)}};Be.binarySearchCmp=function(a,b,c,d,e){Ga._assert(null!=a,"a != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:236,className:"polygonal.ds.tools.ArrayTools",methodName:"binarySearchCmp"});Ga._assert(null!=e,"comparator != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:237,className:"polygonal.ds.tools.ArrayTools",methodName:"binarySearchCmp"});Ga._assert(0<=c&&c<a.length,"min >= 0 && min < a.length",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:238,
className:"polygonal.ds.tools.ArrayTools",methodName:"binarySearchCmp"});Ga._assert(d<a.length,"max < a.length",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:239,className:"polygonal.ds.tools.ArrayTools",methodName:"binarySearchCmp"});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};Be.binarySearchf=function(a,b,c,d){Ga._assert(null!=a,"a != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:265,className:"polygonal.ds.tools.ArrayTools",methodName:"binarySearchf"});Ga._assert(0<=c&&c<a.length,"min >= 0 && min < a.length",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:266,className:"polygonal.ds.tools.ArrayTools",methodName:"binarySearchf"});Ga._assert(d<a.length,"max < a.length",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:267,className:"polygonal.ds.tools.ArrayTools",
methodName:"binarySearchf"});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};Be.binarySearchi=function(a,b,c,d){Ga._assert(null!=a,"a != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:293,className:"polygonal.ds.tools.ArrayTools",methodName:"binarySearchi"});Ga._assert(0<=c&&c<a.length,"min >= 0 && min < a.length",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:294,className:"polygonal.ds.tools.ArrayTools",methodName:"binarySearchi"});Ga._assert(d<a.length,"max < a.length",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:295,className:"polygonal.ds.tools.ArrayTools",methodName:"binarySearchi"});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};Be.shuffle=function(a,b){Ga._assert(null!=a,"a != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:320,className:"polygonal.ds.tools.ArrayTools",methodName:"shuffle"});var c=a.length;if(null==b)for(;1<--c;){b=zk._f()*c|0;var d=a[c];a[c]=a[b];a[b]=d}else for(Ga._assert(b.length>=a.length,"insufficient random values(rvals.length >= a.length)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:335,className:"polygonal.ds.tools.ArrayTools",methodName:"shuffle"}),d=0;1<--c;){var e=b[d++]*c|0,f=a[c];a[c]=a[e];a[e]=f}};Be.sortRange=
function(a,b,c,d,e){var f=a.length;if(1<f)if(Ga._assert(0<=d&&d<=f-1&&d+e<=f,"first out of range(first >= 0 && first <= k - 1 && first + n <= k)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:361,className:"polygonal.ds.tools.ArrayTools",methodName:"sortRange"}),Ga._assert(0<=e&&e<=f,"n out of range(n >= 0 && n <= k)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:362,
className:"polygonal.ds.tools.ArrayTools",methodName:"sortRange"}),c)for(c=d+1,e=d+e;c<e;){var g=c++;for(f=a[g];g>d;){var k=a[g-1];if(0<b(k,f))a[g]=k,--g;else break}a[g]=f}else Be._quickSort(a,d,e,b)};Be.quickPerm=function(a){for(var b=[],c=[],d=[],e,f,g=0;g<a;)c[g]=g+1,d[g]=0,++g;b.push(c.slice());for(g=1;g<a;)d[g]<g?(e=g%2*d[g],f=c[e],c[e]=c[g],c[g]=f,b.push(c.slice()),d[g]++,g=1):(d[g]=0,++g);return b};Be.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};Be.split=function(a,b,c){Ga._assert(0==b%c,"n is not a multiple of k(n % k == 0)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:450,className:"polygonal.ds.tools.ArrayTools",methodName:"split"});for(var d=[],e=null,f=0;f<b;){var g=f++;0==g%c&&(e=[],d[g/c|0]=e);e.push(a[g])}return d};Be.pairwise=function(a,b){var c=0,d=a.length;for(Ga._assert(0==(d&1),"k & 1 == 0",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",
lineNumber:476,className:"polygonal.ds.tools.ArrayTools",methodName:"pairwise"});c<d;)b(c,a[c],a[c+1]),c+=2};Be.bruteforce=function(a,b){for(var c=0,d,e=a.length,f=e-1;c<f;){for(d=c+1;d<e;)b(a[c],a[d]),++d;++c}};Be._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 l=a[b],m=a[k],p=a[c],n=d(l,p);k=0>n&&0>d(l,m)?0>d(m,p)?k:c:0>d(m,l)&&0>d(m,p)?0>n?b:c:0>d(p,l)?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;Be._quickSort(a,b,f-b,d);Be._quickSort(a,f+1,e-f,d)}};var Ga=function(){};h["polygonal.ds.tools.Assert"]=Ga;Ga.__name__="polygonal.ds.tools.Assert";Ga._assert=function(a,b,c){if(!a)throw a="in file "+c.fileName+", line "+c.lineNumber,Error("Assertion failed"+(null!=b?": ":" ")+(null==b?a:""+b+" ("+a+")"));};var oh=function(){};h["polygonal.ds.tools.GrowthRate"]=oh;oh.__name__="polygonal.ds.tools.GrowthRate";oh.compute=function(a,b){Ga._assert(-3<=a,"invalid growth rate(rate >= -3)",
{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/GrowthRate.hx",lineNumber:52,className:"polygonal.ds.tools.GrowthRate",methodName:"compute"});if(0<a)b+=a;else switch(a){case -3:b<<=1;break;case -2:b=(3*b>>1)+1;break;case -1:a=b+1;b=(a>>3)+(9>a?3:6)+a;break;case 0:throw new E("out of space");}return b};var Db=function(){};h["polygonal.ds.tools.NativeArrayTools"]=Db;Db.__name__="polygonal.ds.tools.NativeArrayTools";Db.alloc=function(a){return Array(a)};Db.get=
function(a,b){return a[b]};Db.set=function(a,b,c){a[b]=c};Db.size=function(a){return a.length};Db.toArray=function(a,b,c,d){Ga._assert(0<=b&&b<a.length,"first index out of range(first >= 0 && first < size(src))",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:138,className:"polygonal.ds.tools.NativeArrayTools",methodName:"toArray"});Ga._assert(0<=c&&b+c<=a.length,"len out of range(len >= 0 && first + len <= size(src))",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/NativeArrayTools.hx",
lineNumber:139,className:"polygonal.ds.tools.NativeArrayTools",methodName:"toArray"});if(0==c)return[];Ga._assert(0<=c,"len >= 0",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/ArrayTools.hx",lineNumber:37,className:"polygonal.ds.tools.ArrayTools",methodName:"alloc"});d=Array(c);if(0==b)for(b=0;b<c;){var e=b++;d[e]=a[e]}else for(e=b,c=b+c;e<c;){var f=e++;d[f-b]=a[f]}return d};Db.ofArray=function(a){return a.slice(0,a.length)};Db.blit=function(a,b,c,d,e){if(0<
e)if(Ga._assert(b<a.length,"srcPos out of range(srcPos < size(src))",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:195,className:"polygonal.ds.tools.NativeArrayTools",methodName:"blit"}),Ga._assert(d<c.length,"dstPos out of range(dstPos < size(dst))",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:196,className:"polygonal.ds.tools.NativeArrayTools",
methodName:"blit"}),Ga._assert(b+e<=a.length&&d+e<=c.length,"n out of range(srcPos + n <= size(src) && dstPos + n <= size(dst))",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:197,className:"polygonal.ds.tools.NativeArrayTools",methodName:"blit"}),a==c)if(b<d)for(c=b+e,d+=e,b=0;b<e;)b++,--c,--d,a[d]=a[c];else{if(b>d)for(c=b,b=0;b<e;)b++,a[d]=a[c],++c,++d}else if(0==b&&0==d)for(d=0;d<e;)b=d++,c[b]=a[b];else if(0==b)for(b=
0;b<e;){var f=b++;c[d+f]=a[f]}else if(0==d)for(d=0;d<e;)f=d++,c[f]=a[b+f];else for(f=0;f<e;){var g=f++;c[d+g]=a[b+g]}};Db.copy=function(a){return a.slice(0)};Db.zero=function(a,b,c){null==c&&(c=0);null==b&&(b=0);c=0>=c?a.length:b+c;Ga._assert(0<=b&&b<a.length,"min >= 0 && min < size(dst)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:291,className:"polygonal.ds.tools.NativeArrayTools",methodName:"zero"});for(Ga._assert(c<=
a.length,"max <= size(dst)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:292,className:"polygonal.ds.tools.NativeArrayTools",methodName:"zero"});b<c;)a[b++]=0;return a};Db.init=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);d=0>=d?a.length:c+d;Ga._assert(0<=c&&c<a.length,"min >= 0 && min < size(a)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:313,
className:"polygonal.ds.tools.NativeArrayTools",methodName:"init"});for(Ga._assert(d<=a.length,"max <= size(a)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:314,className:"polygonal.ds.tools.NativeArrayTools",methodName:"init"});c<d;)a[c++]=b;return a};Db.nullify=function(a,b,c){null==c&&(c=0);null==b&&(b=0);c=0>=c?a.length:b+c;Ga._assert(0<=b&&b<a.length,"min >= 0 && min < size(a)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/NativeArrayTools.hx",
lineNumber:329,className:"polygonal.ds.tools.NativeArrayTools",methodName:"nullify"});for(Ga._assert(c<=a.length,"max <= size(a)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:330,className:"polygonal.ds.tools.NativeArrayTools",methodName:"nullify"});b<c;)a[b++]=null;return a};Db.binarySearchCmp=function(a,b,c,d,e){Ga._assert(null!=a,"a != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/NativeArrayTools.hx",
lineNumber:349,className:"polygonal.ds.tools.NativeArrayTools",methodName:"binarySearchCmp"});Ga._assert(null!=e,"cmp != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:350,className:"polygonal.ds.tools.NativeArrayTools",methodName:"binarySearchCmp"});Ga._assert(0<=c&&c<a.length,"min >= 0 && min < size(a)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/NativeArrayTools.hx",
lineNumber:351,className:"polygonal.ds.tools.NativeArrayTools",methodName:"binarySearchCmp"});Ga._assert(d<a.length,"max < size(a)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:352,className:"polygonal.ds.tools.NativeArrayTools",methodName:"binarySearchCmp"});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};Db.binarySearchf=function(a,b,c,d){Ga._assert(null!=a,"a != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/NativeArrayTools.hx",
lineNumber:377,className:"polygonal.ds.tools.NativeArrayTools",methodName:"binarySearchf"});Ga._assert(0<=c&&c<a.length,"min >= 0 && min < size(a)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:378,className:"polygonal.ds.tools.NativeArrayTools",methodName:"binarySearchf"});Ga._assert(d<a.length,"max < size(a)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/NativeArrayTools.hx",
lineNumber:379,className:"polygonal.ds.tools.NativeArrayTools",methodName:"binarySearchf"});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};Db.binarySearchi=function(a,b,c,d){Ga._assert(null!=a,"a != null",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:404,className:"polygonal.ds.tools.NativeArrayTools",methodName:"binarySearchi"});Ga._assert(0<=c&&c<a.length,"min >= 0 && min < size(a)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/NativeArrayTools.hx",
lineNumber:405,className:"polygonal.ds.tools.NativeArrayTools",methodName:"binarySearchi"});Ga._assert(d<a.length,"max < size(a)",{fileName:"C:/Program Files/Stencyl/plaf/haxe/lib/polygonal-ds/2,0,0/src/polygonal/ds/tools/NativeArrayTools.hx",lineNumber:406,className:"polygonal.ds.tools.NativeArrayTools",methodName:"binarySearchi"});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};var zk=function(){};h["polygonal.ds.tools.Shuffle"]=zk;zk.__name__="polygonal.ds.tools.Shuffle";
zk._f=function(){return Math.random()};zk.setRandom=function(a){zk._f=a};zk.frand=function(){return zk._f()};var Jr=function(a,b,c){ja.call(this,b)};h["scripts.ActorEvents_2"]=Jr;Jr.__name__="scripts.ActorEvents_2";Jr.__super__=ja;Jr.prototype=w(ja.prototype,{init:function(){},forwardMessage:function(a){},__class__:Jr});var Kr=function(a,b){r.call(this);a=this.nameMap;null!=q["Next Scene"]?a.setReserved("Next Scene","_NextScene"):a.h["Next Scene"]="_NextScene";a=this.nameMap;null!=q["Out Time"]?a.setReserved("Out Time",
"_OutTime"):a.h["Out Time"]="_OutTime";this._OutTime=.5;a=this.nameMap;null!=q["In Time"]?a.setReserved("In Time","_InTime"):a.h["In Time"]="_InTime";this._InTime=.5;a=this.nameMap;null!=q["Transition Style"]?a.setReserved("Transition Style","_TransitionStyle"):a.h["Transition Style"]="_TransitionStyle";this._TransitionStyle=""};h["scripts.Design_109_109_SwitchSceneonClickorTouch"]=Kr;Kr.__name__="scripts.Design_109_109_SwitchSceneonClickorTouch";Kr.__super__=Na;Kr.prototype=w(Na.prototype,{_NextScene:null,
_OutTime:null,_InTime:null,_TransitionStyle:null,_customEvent_SwitchScene:function(){var a=this._NextScene;if((r.isPrimitive(a)||("string"==typeof a?""!=L.__cast(a,String):null!=a))&&!r.isTransitioning())if("Fade"==this._TransitionStyle){a=this._NextScene.getID();var b=0,c=0,d=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);b=r.createFadeOut(this._OutTime,b<<16|c<<8|d);var e=d=c=0;null==e&&(e=0);null==d&&(d=0);null==c&&(c=0);r.switchScene(a,b,r.createFadeIn(this._InTime,c<<16|d<<8|e))}else"Blinds"==
this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),b=r.createBlindsOut(this._OutTime,b<<16|c<<8|d),e=d=c=0,null==e&&(e=0),null==d&&(d=0),null==c&&(c=0),r.switchScene(a,b,r.createBlindsIn(this._InTime,c<<16|d<<8|e))):"Bubbles"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),b=r.createBubblesOut(this._OutTime,b<<16|c<<8|d),e=d=c=0,null==e&&(e=0),null==d&&(d=0),null==c&&(c=0),r.switchScene(a,b,r.createBubblesIn(this._InTime,
c<<16|d<<8|e))):"Spotlight"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),b=r.createCircleOut(this._OutTime,b<<16|c<<8|d),e=d=c=0,null==e&&(e=0),null==d&&(d=0),null==c&&(c=0),r.switchScene(a,b,r.createCircleIn(this._InTime,c<<16|d<<8|e))):"Blur"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),b=r.createPixelizeOut(this._OutTime,b<<16|c<<8|d),e=d=c=0,null==e&&(e=0),null==d&&(d=0),null==c&&
(c=0),r.switchScene(a,b,r.createPixelizeIn(this._InTime,c<<16|d<<8|e))):"Box"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),b=r.createRectangleOut(this._OutTime,b<<16|c<<8|d),e=d=c=0,null==e&&(e=0),null==d&&(d=0),null==c&&(c=0),r.switchScene(a,b,r.createRectangleIn(this._InTime,c<<16|d<<8|e))):"Crossfade"==this._TransitionStyle?r.switchScene(this._NextScene.getID(),null,r.createCrossfadeTransition(this._OutTime)):"Slide Up"==this._TransitionStyle?
r.switchScene(this._NextScene.getID(),null,r.createSlideUpTransition(this._OutTime)):"Slide Down"==this._TransitionStyle?r.switchScene(this._NextScene.getID(),null,r.createSlideDownTransition(this._OutTime)):"Slide Left"==this._TransitionStyle?r.switchScene(this._NextScene.getID(),null,r.createSlideLeftTransition(this._OutTime)):"Slide Right"==this._TransitionStyle&&r.switchScene(this._NextScene.getID(),null,r.createSlideRightTransition(this._OutTime))},init:function(){var a=this;this.addMousePressedListener(function(b){a.wrapper.enabled&&
a._customEvent_SwitchScene()})},forwardMessage:function(a){},__class__:Kr});var Lr=function(a,b){r.call(this);a=this.nameMap;null!=q.Region?a.setReserved("Region","_Region"):a.h.Region="_Region";a=this.nameMap;null!=q["Next Scene"]?a.setReserved("Next Scene","_NextScene"):a.h["Next Scene"]="_NextScene";a=this.nameMap;null!=q.Actor?a.setReserved("Actor","_Actor"):a.h.Actor="_Actor";a=this.nameMap;null!=q["In Region"]?a.setReserved("In Region","_InRegion"):a.h["In Region"]="_InRegion";this._InRegion=
!1;a=this.nameMap;null!=q["Only Switch On Key Press"]?a.setReserved("Only Switch On Key Press","_OnlySwitchOnKeyPress"):a.h["Only Switch On Key Press"]="_OnlySwitchOnKeyPress";this._OnlySwitchOnKeyPress=!1;a=this.nameMap;null!=q["Switch Control"]?a.setReserved("Switch Control","_SwitchControl"):a.h["Switch Control"]="_SwitchControl";a=this.nameMap;null!=q["Out Time"]?a.setReserved("Out Time","_OutTime"):a.h["Out Time"]="_OutTime";this._OutTime=.5;a=this.nameMap;null!=q["In Time"]?a.setReserved("In Time",
"_InTime"):a.h["In Time"]="_InTime";this._InTime=.5;a=this.nameMap;null!=q["Transition Style"]?a.setReserved("Transition Style","_TransitionStyle"):a.h["Transition Style"]="_TransitionStyle";this._TransitionStyle=""};h["scripts.Design_10_10_SwitchSceneonEnterRegion"]=Lr;Lr.__name__="scripts.Design_10_10_SwitchSceneonEnterRegion";Lr.__super__=Na;Lr.prototype=w(Na.prototype,{_Region:null,_NextScene:null,_Actor:null,_InRegion:null,_OnlySwitchOnKeyPress:null,_SwitchControl:null,_OutTime:null,_InTime:null,
_TransitionStyle:null,_customEvent_SwitchScene:function(){var a=this._NextScene;if((r.isPrimitive(a)||("string"==typeof a?""!=L.__cast(a,String):null!=a))&&!r.isTransitioning())if("Fade"==this._TransitionStyle){a=this._NextScene.getID();var b=0,c=0,d=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);b=r.createFadeOut(this._OutTime,b<<16|c<<8|d);var e=d=c=0;null==e&&(e=0);null==d&&(d=0);null==c&&(c=0);r.switchScene(a,b,r.createFadeIn(this._InTime,c<<16|d<<8|e))}else"Blinds"==this._TransitionStyle?(a=
this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),b=r.createBlindsOut(this._OutTime,b<<16|c<<8|d),e=d=c=0,null==e&&(e=0),null==d&&(d=0),null==c&&(c=0),r.switchScene(a,b,r.createBlindsIn(this._InTime,c<<16|d<<8|e))):"Bubbles"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),b=r.createBubblesOut(this._OutTime,b<<16|c<<8|d),e=d=c=0,null==e&&(e=0),null==d&&(d=0),null==c&&(c=0),r.switchScene(a,b,r.createBubblesIn(this._InTime,
c<<16|d<<8|e))):"Spotlight"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),b=r.createCircleOut(this._OutTime,b<<16|c<<8|d),e=d=c=0,null==e&&(e=0),null==d&&(d=0),null==c&&(c=0),r.switchScene(a,b,r.createCircleIn(this._InTime,c<<16|d<<8|e))):"Blur"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),b=r.createPixelizeOut(this._OutTime,b<<16|c<<8|d),e=d=c=0,null==e&&(e=0),null==d&&(d=0),null==c&&
(c=0),r.switchScene(a,b,r.createPixelizeIn(this._InTime,c<<16|d<<8|e))):"Box"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),b=r.createRectangleOut(this._OutTime,b<<16|c<<8|d),e=d=c=0,null==e&&(e=0),null==d&&(d=0),null==c&&(c=0),r.switchScene(a,b,r.createRectangleIn(this._InTime,c<<16|d<<8|e))):"Crossfade"==this._TransitionStyle?r.switchScene(this._NextScene.getID(),null,r.createCrossfadeTransition(this._OutTime)):"Slide Up"==this._TransitionStyle?
r.switchScene(this._NextScene.getID(),null,r.createSlideUpTransition(this._OutTime)):"Slide Down"==this._TransitionStyle?r.switchScene(this._NextScene.getID(),null,r.createSlideDownTransition(this._OutTime)):"Slide Left"==this._TransitionStyle?r.switchScene(this._NextScene.getID(),null,r.createSlideLeftTransition(this._OutTime)):"Slide Right"==this._TransitionStyle&&r.switchScene(this._NextScene.getID(),null,r.createSlideRightTransition(this._OutTime))},init:function(){var a=this;this.addWhenUpdatedListener(null,
function(b,c){a.wrapper.enabled&&(a._InRegion=!1,b=a._Actor,(r.isPrimitive(b)||("string"==typeof b?""!=L.__cast(b,String):null!=b))&&a._Actor.isAlive()?(b=a._Region,r.isPrimitive(b)||("string"==typeof b?""!=L.__cast(b,String):null!=b)?(b=a._NextScene,b=r.isPrimitive(b)?!0:"string"==typeof b?""!=L.__cast(b,String):null!=b):b=!1,b=b&&!r.isTransitioning()):b=!1,b&&r.isInRegion(a._Actor,a._Region)&&(a._OnlySwitchOnKeyPress?a._InRegion=!0:a._customEvent_SwitchScene()))});this.addKeyStateListener(this._SwitchControl,
function(b,c,d){a.wrapper.enabled&&b&&a._InRegion&&a._customEvent_SwitchScene()})},forwardMessage:function(a){},__class__:Lr});var Mr=function(a,b){r.call(this);a=this.nameMap;null!=q.Channel?a.setReserved("Channel","_Channel"):a.h.Channel="_Channel";this._Channel=0;a=this.nameMap;null!=q["Stop Channel First"]?a.setReserved("Stop Channel First","_StopChannelFirst"):a.h["Stop Channel First"]="_StopChannelFirst";this._StopChannelFirst=!0;a=this.nameMap;null!=q["Music to Play"]?a.setReserved("Music to Play",
"_MusictoPlay"):a.h["Music to Play"]="_MusictoPlay"};h["scripts.Design_110_110_BackgroundMusic"]=Mr;Mr.__name__="scripts.Design_110_110_BackgroundMusic";Mr.__super__=Na;Mr.prototype=w(Na.prototype,{_Channel:null,_StopChannelFirst:null,_MusictoPlay:null,init:function(){this._StopChannelFirst&&r.stopSoundOnChannel(this._Channel|0);r.loopSoundOnChannel(this._MusictoPlay,this._Channel|0)},forwardMessage:function(a){},__class__:Mr});var Nr=function(a,b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor",
"actor"):a.h.Actor="actor";a=this.nameMap;null!=q["Normal Animation"]?a.setReserved("Normal Animation","_NormalAnimation"):a.h["Normal Animation"]="_NormalAnimation";a=this.nameMap;null!=q["Pressed Animation"]?a.setReserved("Pressed Animation","_PressedAnimation"):a.h["Pressed Animation"]="_PressedAnimation";a=this.nameMap;null!=q.Down?a.setReserved("Down","_Down"):a.h.Down="_Down";this._Down=!1;a=this.nameMap;null!=q["Hover Animation"]?a.setReserved("Hover Animation","_HoverAnimation"):a.h["Hover Animation"]=
"_HoverAnimation";a=this.nameMap;null!=q["Next Scene"]?a.setReserved("Next Scene","_NextScene"):a.h["Next Scene"]="_NextScene";a=this.nameMap;null!=q["Out Time"]?a.setReserved("Out Time","_OutTime"):a.h["Out Time"]="_OutTime";this._OutTime=.5;a=this.nameMap;null!=q["In Time"]?a.setReserved("In Time","_InTime"):a.h["In Time"]="_InTime";this._InTime=.5;a=this.nameMap;null!=q["Transition Style"]?a.setReserved("Transition Style","_TransitionStyle"):a.h["Transition Style"]="_TransitionStyle";this._TransitionStyle=
""};h["scripts.Design_11_11_SwitchSceneButton"]=Nr;Nr.__name__="scripts.Design_11_11_SwitchSceneButton";Nr.__super__=ja;Nr.prototype=w(ja.prototype,{_NormalAnimation:null,_PressedAnimation:null,_Down:null,_HoverAnimation:null,_NextScene:null,_OutTime:null,_InTime:null,_TransitionStyle:null,_customEvent_SwitchScene:function(){var a=this._NextScene;if((r.isPrimitive(a)||("string"==typeof a?""!=L.__cast(a,String):null!=a))&&!r.isTransitioning())if("Fade"==this._TransitionStyle){a=this._NextScene.getID();
var b=0,c=0,d=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);b=r.createFadeOut(this._OutTime,b<<16|c<<8|d);var e=d=c=0;null==e&&(e=0);null==d&&(d=0);null==c&&(c=0);r.switchScene(a,b,r.createFadeIn(this._InTime,c<<16|d<<8|e))}else"Blinds"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),b=r.createBlindsOut(this._OutTime,b<<16|c<<8|d),e=d=c=0,null==e&&(e=0),null==d&&(d=0),null==c&&(c=0),r.switchScene(a,b,r.createBlindsIn(this._InTime,c<<16|d<<8|
e))):"Bubbles"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),b=r.createBubblesOut(this._OutTime,b<<16|c<<8|d),e=d=c=0,null==e&&(e=0),null==d&&(d=0),null==c&&(c=0),r.switchScene(a,b,r.createBubblesIn(this._InTime,c<<16|d<<8|e))):"Spotlight"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),b=r.createCircleOut(this._OutTime,b<<16|c<<8|d),e=d=c=0,null==e&&(e=0),null==d&&(d=0),null==c&&(c=0),
r.switchScene(a,b,r.createCircleIn(this._InTime,c<<16|d<<8|e))):"Blur"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),b=r.createPixelizeOut(this._OutTime,b<<16|c<<8|d),e=d=c=0,null==e&&(e=0),null==d&&(d=0),null==c&&(c=0),r.switchScene(a,b,r.createPixelizeIn(this._InTime,c<<16|d<<8|e))):"Box"==this._TransitionStyle?(a=this._NextScene.getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),b=r.createRectangleOut(this._OutTime,b<<16|c<<8|d),
e=d=c=0,null==e&&(e=0),null==d&&(d=0),null==c&&(c=0),r.switchScene(a,b,r.createRectangleIn(this._InTime,c<<16|d<<8|e))):"Crossfade"==this._TransitionStyle?r.switchScene(this._NextScene.getID(),null,r.createCrossfadeTransition(this._OutTime)):"Slide Up"==this._TransitionStyle?r.switchScene(this._NextScene.getID(),null,r.createSlideUpTransition(this._OutTime)):"Slide Down"==this._TransitionStyle?r.switchScene(this._NextScene.getID(),null,r.createSlideDownTransition(this._OutTime)):"Slide Left"==this._TransitionStyle?
r.switchScene(this._NextScene.getID(),null,r.createSlideLeftTransition(this._OutTime)):"Slide Right"==this._TransitionStyle&&r.switchScene(this._NextScene.getID(),null,r.createSlideRightTransition(this._OutTime))},init:function(){var a=this;this.actor.anchorToScreen();this.addMouseOverActorListener(this.actor,function(b,c){a.wrapper.enabled&&3==b&&(a.actor.setAnimation(a._PressedAnimation),a._Down=!0)});this.addMouseOverActorListener(this.actor,function(b,c){a.wrapper.enabled&&5==b&&(a._Down&&a._customEvent_SwitchScene(),
a.actor.setAnimation(a._HoverAnimation),a._Down=!1)});this.addMouseOverActorListener(this.actor,function(b,c){a.wrapper.enabled&&1==b&&a.actor.setAnimation(a._HoverAnimation)});this.addMouseOverActorListener(this.actor,function(b,c){a.wrapper.enabled&&-1==b&&(a.actor.setAnimation(a._NormalAnimation),a._Down=!1)})},forwardMessage:function(a){},__class__:Nr});var Or=function(a,b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor","actor"):a.h.Actor="actor";a=this.nameMap;null!=q["Maximum Speed"]?
a.setReserved("Maximum Speed","_MaximumSpeed"):a.h["Maximum Speed"]="_MaximumSpeed";this._MaximumSpeed=10;a=this.nameMap;null!=q["Fragment Actor Type"]?a.setReserved("Fragment Actor Type","_FragmentActorType"):a.h["Fragment Actor Type"]="_FragmentActorType";a=this.nameMap;null!=q["Number of Fragments"]?a.setReserved("Number of Fragments","_NumberofFragments"):a.h["Number of Fragments"]="_NumberofFragments";this._NumberofFragments=5;a=this.nameMap;null!=q["Maximum Turning Speed"]?a.setReserved("Maximum Turning Speed",
"_MaximumTurningSpeed"):a.h["Maximum Turning Speed"]="_MaximumTurningSpeed";this._MaximumTurningSpeed=360;a=this.nameMap;null!=q["Minimum Speed"]?a.setReserved("Minimum Speed","_MinimumSpeed"):a.h["Minimum Speed"]="_MinimumSpeed";this._MinimumSpeed=5;a=this.nameMap;null!=q.Offset?a.setReserved("Offset","_Offset"):a.h.Offset="_Offset";this._Offset=0;a=this.nameMap;null!=q.Direction?a.setReserved("Direction","_Direction"):a.h.Direction="_Direction";this._Direction=0;a=this.nameMap;null!=q["Explosion Actor Type"]?
a.setReserved("Explosion Actor Type","_ExplosionActorType"):a.h["Explosion Actor Type"]="_ExplosionActorType"};h["scripts.Design_12_12_ExplodeOnDeath"]=Or;Or.__name__="scripts.Design_12_12_ExplodeOnDeath";Or.__super__=ja;Or.prototype=w(ja.prototype,{_MaximumSpeed:null,_FragmentActorType:null,_NumberofFragments:null,_MaximumTurningSpeed:null,_MinimumSpeed:null,_Offset:null,_Direction:null,_ExplosionActorType:null,init:function(){var a=this;this.addWhenKilledListener(this.actor,function(b){if(a.wrapper.enabled){b=
a._FragmentActorType;if(r.isPrimitive(b)||("string"==typeof b?""!=L.__cast(b,String):null!=b)){b=0;for(var c=a._NumberofFragments|0;b<c;)b++,r.createRecycledActor(a._FragmentActorType,0,0,0),a._Direction=r.randomInt(0,360),r.getLastCreatedActor().setX(a.actor.getXCenter()-r.getLastCreatedActor().getWidth()/2+a._Offset*Math.cos(.01745329251994278*a._Direction)),r.getLastCreatedActor().setY(a.actor.getYCenter()-r.getLastCreatedActor().getHeight()/2+a._Offset*Math.sin(.01745329251994278*a._Direction)),
r.getLastCreatedActor().setVelocity(a._Direction,a._MinimumSpeed+r.randomFloat()*a._MaximumSpeed),r.getLastCreatedActor().setAngularVelocity(.01745329251994278*(-a._MaximumTurningSpeed+r.randomFloat()*a._MaximumTurningSpeed*2))}b=a._ExplosionActorType;if(r.isPrimitive(b)||("string"==typeof b?""!=L.__cast(b,String):null!=b))r.createRecycledActor(a._ExplosionActorType,0,0,0),r.getLastCreatedActor().setX(a.actor.getXCenter()-r.getLastCreatedActor().getWidth()/2),r.getLastCreatedActor().setY(a.actor.getYCenter()-
r.getLastCreatedActor().getHeight()/2)}})},forwardMessage:function(a){},__class__:Or});var Pr=function(a,b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor","actor"):a.h.Actor="actor"};h["scripts.Design_13_13_DieOnLeavingScreen"]=Pr;Pr.__name__="scripts.Design_13_13_DieOnLeavingScreen";Pr.__super__=ja;Pr.prototype=w(ja.prototype,{init:function(){var a=this;this.actor.makeAlwaysSimulate();this.addActorPositionListener(this.actor,function(b,c,d,e,f){a.wrapper.enabled&&c&&r.recycleActor(a.actor)})},
forwardMessage:function(a){},__class__:Pr});var Qr=function(a,b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor","actor"):a.h.Actor="actor";a=this.nameMap;null!=q["Out Time"]?a.setReserved("Out Time","_OutTime"):a.h["Out Time"]="_OutTime";this._OutTime=.5;a=this.nameMap;null!=q["In Time"]?a.setReserved("In Time","_InTime"):a.h["In Time"]="_InTime";this._InTime=.5;a=this.nameMap;null!=q["Transition Style"]?a.setReserved("Transition Style","_TransitionStyle"):a.h["Transition Style"]=
"_TransitionStyle";this._TransitionStyle=""};h["scripts.Design_14_14_ReloadSceneOnDeath"]=Qr;Qr.__name__="scripts.Design_14_14_ReloadSceneOnDeath";Qr.__super__=ja;Qr.prototype=w(ja.prototype,{_OutTime:null,_InTime:null,_TransitionStyle:null,_customEvent_Reload:function(){if(!r.isTransitioning())if("Fade"==this._TransitionStyle){var a=0,b=0,c=0;null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);a=r.createFadeOut(this._OutTime,a<<16|b<<8|c);var d=c=b=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);r.reloadCurrentScene(a,
r.createFadeIn(this._InTime,b<<16|c<<8|d))}else"Blinds"==this._TransitionStyle?(c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),a=r.createBlindsOut(this._OutTime,a<<16|b<<8|c),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),r.reloadCurrentScene(a,r.createBlindsIn(this._InTime,b<<16|c<<8|d))):"Bubbles"==this._TransitionStyle?(c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),a=r.createBubblesOut(this._OutTime,a<<16|b<<8|c),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),r.reloadCurrentScene(a,
r.createBubblesIn(this._InTime,b<<16|c<<8|d))):"Spotlight"==this._TransitionStyle?(c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),a=r.createCircleOut(this._OutTime,a<<16|b<<8|c),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),r.reloadCurrentScene(a,r.createCircleIn(this._InTime,b<<16|c<<8|d))):"Blur"==this._TransitionStyle?(c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),a=r.createPixelizeOut(this._OutTime,a<<16|b<<8|c),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),r.reloadCurrentScene(a,
r.createPixelizeIn(this._InTime,b<<16|c<<8|d))):"Box"==this._TransitionStyle?(c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),a=r.createRectangleOut(this._OutTime,a<<16|b<<8|c),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),r.reloadCurrentScene(a,r.createRectangleIn(this._InTime,b<<16|c<<8|d))):"Crossfade"==this._TransitionStyle?r.reloadCurrentScene(null,r.createCrossfadeTransition(this._OutTime)):"Slide Up"==this._TransitionStyle?r.reloadCurrentScene(null,r.createSlideUpTransition(this._OutTime)):
"Slide Down"==this._TransitionStyle?r.reloadCurrentScene(null,r.createSlideDownTransition(this._OutTime)):"Slide Left"==this._TransitionStyle?r.reloadCurrentScene(null,r.createSlideLeftTransition(this._OutTime)):"Slide Right"==this._TransitionStyle&&r.reloadCurrentScene(null,r.createSlideRightTransition(this._OutTime))},init:function(){var a=this;this.addWhenKilledListener(this.actor,function(b){a.wrapper.enabled&&a._customEvent_Reload()})},forwardMessage:function(a){},__class__:Qr});var Rr=function(a,
b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor","actor"):a.h.Actor="actor";a=this.nameMap;null!=q["Out Time"]?a.setReserved("Out Time","_OutTime"):a.h["Out Time"]="_OutTime";this._OutTime=.5;a=this.nameMap;null!=q["In Time"]?a.setReserved("In Time","_InTime"):a.h["In Time"]="_InTime";this._InTime=.5;a=this.nameMap;null!=q["Transition Style"]?a.setReserved("Transition Style","_TransitionStyle"):a.h["Transition Style"]="_TransitionStyle";this._TransitionStyle=""};h["scripts.Design_15_15_DieInPitAndReload"]=
Rr;Rr.__name__="scripts.Design_15_15_DieInPitAndReload";Rr.__super__=ja;Rr.prototype=w(ja.prototype,{_OutTime:null,_InTime:null,_TransitionStyle:null,_customEvent_Reload:function(){if(!r.isTransitioning())if("Fade"==this._TransitionStyle){var a=0,b=0,c=0;null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);a=r.createFadeOut(this._OutTime,a<<16|b<<8|c);var d=c=b=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);r.reloadCurrentScene(a,r.createFadeIn(this._InTime,b<<16|c<<8|d))}else"Blinds"==this._TransitionStyle?
(c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),a=r.createBlindsOut(this._OutTime,a<<16|b<<8|c),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),r.reloadCurrentScene(a,r.createBlindsIn(this._InTime,b<<16|c<<8|d))):"Bubbles"==this._TransitionStyle?(c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),a=r.createBubblesOut(this._OutTime,a<<16|b<<8|c),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),r.reloadCurrentScene(a,r.createBubblesIn(this._InTime,b<<16|c<<8|d))):"Spotlight"==this._TransitionStyle?
(c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),a=r.createCircleOut(this._OutTime,a<<16|b<<8|c),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),r.reloadCurrentScene(a,r.createCircleIn(this._InTime,b<<16|c<<8|d))):"Blur"==this._TransitionStyle?(c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),a=r.createPixelizeOut(this._OutTime,a<<16|b<<8|c),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),r.reloadCurrentScene(a,r.createPixelizeIn(this._InTime,b<<16|c<<8|d))):"Box"==this._TransitionStyle?
(c=b=a=0,null==c&&(c=0),null==b&&(b=0),null==a&&(a=0),a=r.createRectangleOut(this._OutTime,a<<16|b<<8|c),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),r.reloadCurrentScene(a,r.createRectangleIn(this._InTime,b<<16|c<<8|d))):"Crossfade"==this._TransitionStyle?r.reloadCurrentScene(null,r.createCrossfadeTransition(this._OutTime)):"Slide Up"==this._TransitionStyle?r.reloadCurrentScene(null,r.createSlideUpTransition(this._OutTime)):"Slide Down"==this._TransitionStyle?r.reloadCurrentScene(null,r.createSlideDownTransition(this._OutTime)):
"Slide Left"==this._TransitionStyle?r.reloadCurrentScene(null,r.createSlideLeftTransition(this._OutTime)):"Slide Right"==this._TransitionStyle&&r.reloadCurrentScene(null,r.createSlideRightTransition(this._OutTime))},init:function(){var a=this;this.actor.makeAlwaysSimulate();this.addWhenUpdatedListener(null,function(b,c){a.wrapper.enabled&&a.actor.isAlive()&&a.actor.getY()+a.actor.getHeight()>r.getSceneHeight()&&(r.recycleActor(a.actor),a._customEvent_Reload())})},forwardMessage:function(a){},__class__:Rr});
var Sr=function(a,b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor","actor"):a.h.Actor="actor"};h["scripts.Design_20_20_CannotExitScreen"]=Sr;Sr.__name__="scripts.Design_20_20_CannotExitScreen";Sr.__super__=ja;Sr.prototype=w(ja.prototype,{init:function(){var a=this;this.actor.makeAlwaysSimulate();this.addWhenUpdatedListener(null,function(b,c){a.wrapper.enabled&&(0>a.actor.getScreenX()&&(a.actor.setX(r.getScreenX()),a.actor.setXVelocity(0)),0>a.actor.getScreenY()&&(a.actor.setY(r.getScreenY()),
a.actor.setYVelocity(0)),a.actor.getScreenX()+a.actor.getWidth()>r.getScreenWidth()&&(a.actor.setX(r.getScreenX()+(r.getScreenWidth()-a.actor.getWidth())),a.actor.setXVelocity(0)),a.actor.getScreenY()+a.actor.getHeight()>r.getScreenHeight()&&(a.actor.setY(r.getScreenY()+(r.getScreenHeight()-a.actor.getHeight())),a.actor.setYVelocity(0)))})},forwardMessage:function(a){},__class__:Sr});var Tr=function(a,b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor","actor"):a.h.Actor="actor";
a=this.nameMap;null!=q.Bottom?a.setReserved("Bottom","_Bottom"):a.h.Bottom="_Bottom";this._Bottom=0};h["scripts.Design_21_21_CannotExitScene"]=Tr;Tr.__name__="scripts.Design_21_21_CannotExitScene";Tr.__super__=ja;Tr.prototype=w(ja.prototype,{_Bottom:null,init:function(){var a=this;this.actor.makeAlwaysSimulate();this.addWhenUpdatedListener(null,function(b,c){a.wrapper.enabled&&(0>a.actor.getX()&&(a.actor.setX(0),a.actor.setXVelocity(0)),0>a.actor.getY()&&(a.actor.setY(0),a.actor.setYVelocity(0)),
a.actor.getX()+a.actor.getWidth()>r.getSceneWidth()&&(a.actor.setX(r.getSceneWidth()-a.actor.getWidth()),a.actor.setXVelocity(0)),a.actor.getY()+a.actor.getHeight()>r.getSceneHeight()&&(a.actor.setY(r.getSceneHeight()-a.actor.getHeight()),a.actor.setYVelocity(0)))})},forwardMessage:function(a){},__class__:Tr});var Ur=function(a,b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor","actor"):a.h.Actor="actor";a=this.nameMap;null!=q["Playing One Time?"]?a.setReserved("Playing One Time?",
"_PlayingOneTime"):a.h["Playing One Time?"]="_PlayingOneTime";this._PlayingOneTime=!1;a=this.nameMap;null!=q["Current Category"]?a.setReserved("Current Category","_CurrentCategory"):a.h["Current Category"]="_CurrentCategory";this._CurrentCategory="";a=this.nameMap;null!=q["Default Right Animation"]?a.setReserved("Default Right Animation","_DefaultRightAnimation"):a.h["Default Right Animation"]="_DefaultRightAnimation";a=this.nameMap;null!=q["Default Left Animation"]?a.setReserved("Default Left Animation",
"_DefaultLeftAnimation"):a.h["Default Left Animation"]="_DefaultLeftAnimation";a=this.nameMap;null!=q["Category Hierarchy"]?a.setReserved("Category Hierarchy","_CategoryHierarchy"):a.h["Category Hierarchy"]="_CategoryHierarchy";this._CategoryHierarchy="Ground Pounding;Ducking;Wall Sliding;Falling;Wall Jumping;Air Jumping;Jumping;Running;Walking".split(";");a=this.nameMap;null!=q["Current Index"]?a.setReserved("Current Index","_CurrentIndex"):a.h["Current Index"]="_CurrentIndex";this._CurrentIndex=
!1;a=this.nameMap;null!=q["Requested Index"]?a.setReserved("Requested Index","_RequestedIndex"):a.h["Requested Index"]="_RequestedIndex";this._RequestedIndex=!1};h["scripts.Design_27_27_AnimationManager"]=Ur;Ur.__name__="scripts.Design_27_27_AnimationManager";Ur.__super__=ja;Ur.prototype=w(ja.prototype,{_PlayingOneTime:null,_CurrentCategory:null,_DefaultRightAnimation:null,_DefaultLeftAnimation:null,_CategoryHierarchy:null,_CurrentIndex:null,_RequestedIndex:null,_customBlock_ClearAnimCat:function(a){a==
this._CurrentCategory&&(this._CurrentCategory=r.getDefaultValue(this._CurrentCategory))},_customBlock_CategorySameAs:function(a){return a==this._CurrentCategory},_customBlock_GetCat:function(){return this._CurrentCategory},_customBlock_ClearCat:function(){this._CurrentCategory=r.getDefaultValue(this._CurrentCategory)},_customBlock_LoopAnim:function(a,b){if(!this._PlayingOneTime){var c=this._CurrentCategory;r.isPrimitive(c)||("string"==typeof c?""!=L.__cast(c,String):null!=c)||(this._CurrentCategory=
b);this._RequestedIndex=this._CurrentIndex=!1;c=0;for(var d=L.__cast(this._CategoryHierarchy,Array);c<d.length;){var e=d[c];++c;e==b&&(this._RequestedIndex=!0);e==this._CurrentCategory&&(this._CurrentIndex=!0);if(this._CurrentIndex&&!this._RequestedIndex)return}this.actor.setAnimation(a);this._CurrentCategory=b}},_customBlock_PlayOnce:function(a){this.actor.setAnimation(a);this._PlayingOneTime=!0},init:function(){var a=this;this.addWhenUpdatedListener(null,function(b,c){if(a.wrapper.enabled){if(a._PlayingOneTime){if(a.actor.isAnimationPlaying())return;
a._PlayingOneTime=!1}b=a._CurrentCategory;r.isPrimitive(b)||("string"==typeof b?""!=L.__cast(b,String):null!=b)||(b=a.actor.getActorValue("Facing Right?"),1==b||"true"==b?a.actor.setAnimation(a._DefaultRightAnimation):a.actor.setAnimation(a._DefaultLeftAnimation))}})},forwardMessage:function(a){},__class__:Ur});var Vr=function(a,b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor","actor"):a.h.Actor="actor";a=this.nameMap;null!=q.onSlope?a.setReserved("onSlope","onSlope"):a.h.onSlope=
"onSlope";this.onSlope=!1;a=this.nameMap;null!=q.yNorm?a.setReserved("yNorm","yNorm"):a.h.yNorm="yNorm";this.yNorm=0;a=this.nameMap;null!=q.touchedSlope?a.setReserved("touchedSlope","touchedSlope"):a.h.touchedSlope="touchedSlope";this.touchedSlope=!1;a=this.nameMap;null!=q.preventSlide?a.setReserved("preventSlide","preventSlide"):a.h.preventSlide="preventSlide";this.preventSlide=!1;a=this.nameMap;null!=q.canSlide?a.setReserved("canSlide","canSlide"):a.h.canSlide="canSlide";this.canSlide=!1;a=this.nameMap;
null!=q.oldX?a.setReserved("oldX","oldX"):a.h.oldX="oldX";this.oldX=0;a=this.nameMap;null!=q["Left Control"]?a.setReserved("Left Control","LeftControl"):a.h["Left Control"]="LeftControl";a=this.nameMap;null!=q["Right Control"]?a.setReserved("Right Control","RightControl"):a.h["Right Control"]="RightControl";a=this.nameMap;null!=q["Max Slope Grade"]?a.setReserved("Max Slope Grade","MaxSlopeGrade"):a.h["Max Slope Grade"]="MaxSlopeGrade";this.MaxSlopeGrade=20;a=this.nameMap;null!=q["Enable Debugging?"]?
a.setReserved("Enable Debugging?","EnableDebugging"):a.h["Enable Debugging?"]="EnableDebugging";this.EnableDebugging=!1;a=this.nameMap;null!=q["Slide While Ducking?"]?a.setReserved("Slide While Ducking?","SlideWhileDucking"):a.h["Slide While Ducking?"]="SlideWhileDucking";this.SlideWhileDucking=!0;a=this.nameMap;null!=q["Duck Control"]?a.setReserved("Duck Control","DuckControl"):a.h["Duck Control"]="DuckControl";a=this.nameMap;null!=q["Jump Control"]?a.setReserved("Jump Control","JumpControl"):a.h["Jump Control"]=
"JumpControl";a=this.nameMap;null!=q.oldY?a.setReserved("oldY","oldY"):a.h.oldY="oldY";this.oldY=0;a=this.nameMap;null!=q["Slope Grade"]?a.setReserved("Slope Grade","SlopeGrade"):a.h["Slope Grade"]="SlopeGrade";this.SlopeGrade=0;a=this.nameMap;null!=q["Slide Speed"]?a.setReserved("Slide Speed","SlideSpeed"):a.h["Slide Speed"]="SlideSpeed";this.SlideSpeed=.3;a=this.nameMap;null!=q["Slide Acceleration"]?a.setReserved("Slide Acceleration","SlideAcceleration"):a.h["Slide Acceleration"]="SlideAcceleration";
this.SlideAcceleration=.003};h["scripts.Design_28_28_SlopeDetection"]=Vr;Vr.__name__="scripts.Design_28_28_SlopeDetection";Vr.__super__=ja;Vr.prototype=w(ja.prototype,{onSlope:null,yNorm:null,touchedSlope:null,preventSlide:null,canSlide:null,oldX:null,LeftControl:null,RightControl:null,MaxSlopeGrade:null,EnableDebugging:null,SlideWhileDucking:null,DuckControl:null,JumpControl:null,oldY:null,SlopeGrade:null,SlideSpeed:null,SlideAcceleration:null,init:function(){},forwardMessage:function(a){},__class__:Vr});
var Wr=function(a,b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor","actor"):a.h.Actor="actor";a=this.nameMap;null!=q["Prevent Running?"]?a.setReserved("Prevent Running?","_PreventRunning"):a.h["Prevent Running?"]="_PreventRunning";this._PreventRunning=!1;a=this.nameMap;null!=q["Run Key"]?a.setReserved("Run Key","_RunKey"):a.h["Run Key"]="_RunKey";a=this.nameMap;null!=q["Key Released?"]?a.setReserved("Key Released?","_KeyReleased"):a.h["Key Released?"]="_KeyReleased";this._KeyReleased=
!0;a=this.nameMap;null!=q["Old Accel"]?a.setReserved("Old Accel","_OldAccel"):a.h["Old Accel"]="_OldAccel";this._OldAccel=0;a=this.nameMap;null!=q["Old Max Speed"]?a.setReserved("Old Max Speed","_OldMaxSpeed"):a.h["Old Max Speed"]="_OldMaxSpeed";this._OldMaxSpeed=0;a=this.nameMap;null!=q["At Full Speed?"]?a.setReserved("At Full Speed?","_AtFullSpeed"):a.h["At Full Speed?"]="_AtFullSpeed";this._AtFullSpeed=!1;a=this.nameMap;null!=q["Elapsed Time"]?a.setReserved("Elapsed Time","_ElapsedTime"):a.h["Elapsed Time"]=
"_ElapsedTime";this._ElapsedTime=0;a=this.nameMap;null!=q.Acceleration?a.setReserved("Acceleration","_Acceleration"):a.h.Acceleration="_Acceleration";this._Acceleration=100;a=this.nameMap;null!=q["Mid Run Speed"]?a.setReserved("Mid Run Speed","_MidRunSpeed"):a.h["Mid Run Speed"]="_MidRunSpeed";this._MidRunSpeed=25;a=this.nameMap;null!=q["Max Run Speed"]?a.setReserved("Max Run Speed","_MaxRunSpeed"):a.h["Max Run Speed"]="_MaxRunSpeed";this._MaxRunSpeed=35;a=this.nameMap;null!=q["Right Key"]?a.setReserved("Right Key",
"_RightKey"):a.h["Right Key"]="_RightKey";a=this.nameMap;null!=q["Left Key"]?a.setReserved("Left Key","_LeftKey"):a.h["Left Key"]="_LeftKey";a=this.nameMap;null!=q["Time To Max Speed"]?a.setReserved("Time To Max Speed","_TimeToMaxSpeed"):a.h["Time To Max Speed"]="_TimeToMaxSpeed";this._TimeToMaxSpeed=.4;a=this.nameMap;null!=q["Can Slide?"]?a.setReserved("Can Slide?","_CanSlide"):a.h["Can Slide?"]="_CanSlide";this._CanSlide=!0;a=this.nameMap;null!=q["Run Right Animation"]?a.setReserved("Run Right Animation",
"_RunRightAnimation"):a.h["Run Right Animation"]="_RunRightAnimation";a=this.nameMap;null!=q["Run Left Animation"]?a.setReserved("Run Left Animation","_RunLeftAnimation"):a.h["Run Left Animation"]="_RunLeftAnimation";a=this.nameMap;null!=q["Slip Right Animation"]?a.setReserved("Slip Right Animation","_SlipRightAnimation"):a.h["Slip Right Animation"]="_SlipRightAnimation";a=this.nameMap;null!=q["Slip Left Animation"]?a.setReserved("Slip Left Animation","_SlipLeftAnimation"):a.h["Slip Left Animation"]=
"_SlipLeftAnimation";a=this.nameMap;null!=q["Full Run Right Animation"]?a.setReserved("Full Run Right Animation","_FullRunRightAnimation"):a.h["Full Run Right Animation"]="_FullRunRightAnimation";a=this.nameMap;null!=q["Full Run Left Animation"]?a.setReserved("Full Run Left Animation","_FullRunLeftAnimation"):a.h["Full Run Left Animation"]="_FullRunLeftAnimation";a=this.nameMap;null!=q["Animation Category"]?a.setReserved("Animation Category","_AnimationCategory"):a.h["Animation Category"]="_AnimationCategory";
this._AnimationCategory="Running"};h["scripts.Design_29_29_Running"]=Wr;Wr.__name__="scripts.Design_29_29_Running";Wr.__super__=ja;Wr.prototype=w(ja.prototype,{_PreventRunning:null,_RunKey:null,_KeyReleased:null,_OldAccel:null,_OldMaxSpeed:null,_AtFullSpeed:null,_ElapsedTime:null,_Acceleration:null,_MidRunSpeed:null,_MaxRunSpeed:null,_RightKey:null,_LeftKey:null,_TimeToMaxSpeed:null,_CanSlide:null,_RunRightAnimation:null,_RunLeftAnimation:null,_SlipRightAnimation:null,_SlipLeftAnimation:null,_FullRunRightAnimation:null,
_FullRunLeftAnimation:null,_AnimationCategory:null,init:function(){},forwardMessage:function(a){},__class__:Wr});var Xr=function(a,b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor","actor"):a.h.Actor="actor";a=this.nameMap;null!=q["Key Released?"]?a.setReserved("Key Released?","_KeyReleased"):a.h["Key Released?"]="_KeyReleased";this._KeyReleased=!1;a=this.nameMap;null!=q["Can Jump?"]?a.setReserved("Can Jump?","_CanJump"):a.h["Can Jump?"]="_CanJump";this._CanJump=!1;a=this.nameMap;
null!=q["Jump Key"]?a.setReserved("Jump Key","_JumpKey"):a.h["Jump Key"]="_JumpKey";a=this.nameMap;null!=q["Max Jump Time"]?a.setReserved("Max Jump Time","_MaxJumpTime"):a.h["Max Jump Time"]="_MaxJumpTime";this._MaxJumpTime=.075;a=this.nameMap;null!=q["Jump Right Animation"]?a.setReserved("Jump Right Animation","_JumpRightAnimation"):a.h["Jump Right Animation"]="_JumpRightAnimation";a=this.nameMap;null!=q["Jump Left Animation"]?a.setReserved("Jump Left Animation","_JumpLeftAnimation"):a.h["Jump Left Animation"]=
"_JumpLeftAnimation";a=this.nameMap;null!=q["Prevent Jumping?"]?a.setReserved("Prevent Jumping?","_PreventJumping"):a.h["Prevent Jumping?"]="_PreventJumping";this._PreventJumping=!1;a=this.nameMap;null!=q["Elapsed Jump Time"]?a.setReserved("Elapsed Jump Time","_ElapsedJumpTime"):a.h["Elapsed Jump Time"]="_ElapsedJumpTime";this._ElapsedJumpTime=0;a=this.nameMap;null!=q["Current Jump Time"]?a.setReserved("Current Jump Time","_CurrentJumpTime"):a.h["Current Jump Time"]="_CurrentJumpTime";this._CurrentJumpTime=
0;a=this.nameMap;null!=q.oldY?a.setReserved("oldY","_oldY"):a.h.oldY="_oldY";this._oldY=0;a=this.nameMap;null!=q["Jumping Slowdown"]?a.setReserved("Jumping Slowdown","_JumpingSlowdown"):a.h["Jumping Slowdown"]="_JumpingSlowdown";this._JumpingSlowdown=.75;a=this.nameMap;null!=q["Jump Sound"]?a.setReserved("Jump Sound","_JumpSound"):a.h["Jump Sound"]="_JumpSound";a=this.nameMap;null!=q["Jump Force"]?a.setReserved("Jump Force","_JumpForce"):a.h["Jump Force"]="_JumpForce";this._JumpForce=35;a=this.nameMap;
null!=q["Animation Category"]?a.setReserved("Animation Category","_AnimationCategory"):a.h["Animation Category"]="_AnimationCategory";this._AnimationCategory="Jumping"};h["scripts.Design_30_30_Jumping"]=Xr;Xr.__name__="scripts.Design_30_30_Jumping";Xr.__super__=ja;Xr.prototype=w(ja.prototype,{_KeyReleased:null,_CanJump:null,_JumpKey:null,_MaxJumpTime:null,_JumpRightAnimation:null,_JumpLeftAnimation:null,_PreventJumping:null,_ElapsedJumpTime:null,_CurrentJumpTime:null,_oldY:null,_JumpingSlowdown:null,
_JumpSound:null,_JumpForce:null,_AnimationCategory:null,init:function(){var a=this;this.addWhenUpdatedListener(null,function(b,c){if(a.wrapper.enabled){b=a.actor.getActorValue("On Ground?");if(1==b||"true"==b)a.actor.setActorValue("Is Jumping?",!1),a.actor.say("Animation Manager","_customBlock_ClearAnimCat",[a._AnimationCategory]),a._KeyReleased&&(a._CanJump=!0);r.isKeyPressed(a._JumpKey)&&(b=a.actor.getActorValue("On Ground?"),1!=b&&"true"!=b&&r.runLater(150,function(b){a.actor.isAlive()&&(b=a.actor.getActorValue("On Ground?"),
1!=b&&"true"!=b&&(a._KeyReleased=!1))},a.actor));a._KeyReleased||r.isKeyDown(a._JumpKey)||(a._KeyReleased=!0,b=a.actor.getActorValue("Is Jumping?"),(1==b||"true"==b)&&a.actor.getY()<a._oldY&&a.actor.setYVelocity(a.actor.getYVelocity()*a._JumpingSlowdown));r.isKeyDown(a._JumpKey)?a._CanJump?a._KeyReleased?(b=a.actor.getActorValue("On Ground?"),b=1==b?!0:"true"==b):b=!1:b=!1:b=!1;if(b)r.playSound(a._JumpSound),a._ElapsedJumpTime=0,a.actor.setYVelocity(-a._JumpForce),a._CanJump=!1,a._KeyReleased=!1,
r.runLater(75,function(b){a.actor.isAlive()&&a.actor.setActorValue("Is Jumping?",!0)},a.actor);else{b=a.actor.getActorValue("Is Jumping?");if(1==b||"true"==b)a._ElapsedJumpTime+=1,b=a.actor.getActorValue("Facing Right?"),1==b||"true"==b?a.actor.getY()<a._oldY&&a.actor.say("Animation Manager","_customBlock_LoopAnim",[a._JumpRightAnimation,a._AnimationCategory]):a.actor.getY()<a._oldY&&a.actor.say("Animation Manager","_customBlock_LoopAnim",[a._JumpLeftAnimation,a._AnimationCategory]),a._ElapsedJumpTime<=
1E3*a._MaxJumpTime/r.getStepSize()&&r.isKeyDown(a._JumpKey)&&!a._KeyReleased&&a.actor.getY()<a._oldY&&a.actor.setYVelocity(-a._JumpForce);a._oldY=a.actor.getY()}}})},forwardMessage:function(a){},__class__:Xr});var Yr=function(a,b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor","actor"):a.h.Actor="actor";a=this.nameMap;null!=q["Right Key"]?a.setReserved("Right Key","_RightKey"):a.h["Right Key"]="_RightKey";a=this.nameMap;null!=q["Left Key"]?a.setReserved("Left Key","_LeftKey"):
a.h["Left Key"]="_LeftKey";a=this.nameMap;null!=q["Ground Slowdown"]?a.setReserved("Ground Slowdown","_GroundSlowdown"):a.h["Ground Slowdown"]="_GroundSlowdown";this._GroundSlowdown=.9;a=this.nameMap;null!=q["Air Slowdown"]?a.setReserved("Air Slowdown","_AirSlowdown"):a.h["Air Slowdown"]="_AirSlowdown";this._AirSlowdown=.99;a=this.nameMap;null!=q["Ducking Slowdown"]?a.setReserved("Ducking Slowdown","_DuckingSlowdown"):a.h["Ducking Slowdown"]="_DuckingSlowdown";this._DuckingSlowdown=.975;a=this.nameMap;
null!=q["Moving Air Slowdown"]?a.setReserved("Moving Air Slowdown","_MovingAirSlowdown"):a.h["Moving Air Slowdown"]="_MovingAirSlowdown";this._MovingAirSlowdown=.975;a=this.nameMap;null!=q["Moving Ground Slowdown"]?a.setReserved("Moving Ground Slowdown","_MovingGroundSlowdown"):a.h["Moving Ground Slowdown"]="_MovingGroundSlowdown";this._MovingGroundSlowdown=.9};h["scripts.Design_31_31_Slowdown"]=Yr;Yr.__name__="scripts.Design_31_31_Slowdown";Yr.__super__=ja;Yr.prototype=w(ja.prototype,{_RightKey:null,
_LeftKey:null,_GroundSlowdown:null,_AirSlowdown:null,_DuckingSlowdown:null,_MovingAirSlowdown:null,_MovingGroundSlowdown:null,init:function(){},forwardMessage:function(a){},__class__:Yr});var Zr=function(a,b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor","actor"):a.h.Actor="actor";a=this.nameMap;null!=q["Hit Ground?"]?a.setReserved("Hit Ground?","_HitGround"):a.h["Hit Ground?"]="_HitGround";this._HitGround=!1;a=this.nameMap;null!=q["Limit To Tiles?"]?a.setReserved("Limit To Tiles?",
"_LimitToTiles"):a.h["Limit To Tiles?"]="_LimitToTiles";this._LimitToTiles=!1;a=this.nameMap;null!=q["Excluded Groups"]?a.setReserved("Excluded Groups","_ExcludedGroups"):a.h["Excluded Groups"]="_ExcludedGroups"};h["scripts.Design_32_32_OnGround"]=Zr;Zr.__name__="scripts.Design_32_32_OnGround";Zr.__super__=ja;Zr.prototype=w(ja.prototype,{_HitGround:null,_LimitToTiles:null,_ExcludedGroups:null,init:function(){var a=this;this.addCollisionListener(this.actor,function(b,c){if(a.wrapper.enabled&&!(b.thisCollidedWithSensor||
a._LimitToTiles&&!b.thisCollidedWithTile)){if(0<a._ExcludedGroups.length){c=0;for(var d=L.__cast(a._ExcludedGroups,Array);c<d.length;){var e=d[c];++c;if(""+K.string(e)==""+K.string(a.internalGetGroup(b.otherActor,b.otherShape,b)))return}}c=0;for(d=b.points;c<d.length;)if(e=d[c],++c,.1<Math.abs(Math.round(p.toPixelUnits(e.normalY)))){a._HitGround=!0;return}b.thisFromBottom&&(a._HitGround=!0)}});this.addWhenUpdatedListener(null,function(b,c){a.wrapper.enabled&&(a.actor.setActorValue("On Ground?",a._HitGround),
a._HitGround=!1)})},forwardMessage:function(a){},__class__:Zr});var $r=function(a,b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor","actor"):a.h.Actor="actor";a=this.nameMap;null!=q["Prevent Air Jump?"]?a.setReserved("Prevent Air Jump?","_PreventAirJump"):a.h["Prevent Air Jump?"]="_PreventAirJump";this._PreventAirJump=!1;a=this.nameMap;null!=q["Current Jumps"]?a.setReserved("Current Jumps","_CurrentJumps"):a.h["Current Jumps"]="_CurrentJumps";this._CurrentJumps=0;a=this.nameMap;
null!=q["Can Jump?"]?a.setReserved("Can Jump?","_CanJump"):a.h["Can Jump?"]="_CanJump";this._CanJump=!1;a=this.nameMap;null!=q["Elapsed Time"]?a.setReserved("Elapsed Time","_ElapsedTime"):a.h["Elapsed Time"]="_ElapsedTime";this._ElapsedTime=0;a=this.nameMap;null!=q["Old Y"]?a.setReserved("Old Y","_OldY"):a.h["Old Y"]="_OldY";this._OldY=0;a=this.nameMap;null!=q["Max Jumps"]?a.setReserved("Max Jumps","_MaxJumps"):a.h["Max Jumps"]="_MaxJumps";this._MaxJumps=999;a=this.nameMap;null!=q["Jump Key"]?a.setReserved("Jump Key",
"_JumpKey"):a.h["Jump Key"]="_JumpKey";a=this.nameMap;null!=q["Must Be Rising?"]?a.setReserved("Must Be Rising?","_MustBeRising"):a.h["Must Be Rising?"]="_MustBeRising";this._MustBeRising=!1;a=this.nameMap;null!=q["Jump Force"]?a.setReserved("Jump Force","_JumpForce"):a.h["Jump Force"]="_JumpForce";this._JumpForce=50;a=this.nameMap;null!=q["Jump Right Animation"]?a.setReserved("Jump Right Animation","_JumpRightAnimation"):a.h["Jump Right Animation"]="_JumpRightAnimation";a=this.nameMap;null!=q["Jump Left Animation"]?
a.setReserved("Jump Left Animation","_JumpLeftAnimation"):a.h["Jump Left Animation"]="_JumpLeftAnimation";a=this.nameMap;null!=q["Animation Category"]?a.setReserved("Animation Category","_AnimationCategory"):a.h["Animation Category"]="_AnimationCategory";this._AnimationCategory="Air Jumping"};h["scripts.Design_33_33_AirJumping"]=$r;$r.__name__="scripts.Design_33_33_AirJumping";$r.__super__=ja;$r.prototype=w(ja.prototype,{_PreventAirJump:null,_CurrentJumps:null,_CanJump:null,_ElapsedTime:null,_OldY:null,
_MaxJumps:null,_JumpKey:null,_MustBeRising:null,_JumpForce:null,_JumpRightAnimation:null,_JumpLeftAnimation:null,_AnimationCategory:null,init:function(){},forwardMessage:function(a){},__class__:$r});var as=function(a,b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor","actor"):a.h.Actor="actor";a=this.nameMap;null!=q["Old Y"]?a.setReserved("Old Y","_OldY"):a.h["Old Y"]="_OldY";this._OldY=0;a=this.nameMap;null!=q["Can Fall?"]?a.setReserved("Can Fall?","_CanFall"):a.h["Can Fall?"]=
"_CanFall";this._CanFall=!1;a=this.nameMap;null!=q["Fall Right Animation"]?a.setReserved("Fall Right Animation","_FallRightAnimation"):a.h["Fall Right Animation"]="_FallRightAnimation";a=this.nameMap;null!=q["Fall Left Animation"]?a.setReserved("Fall Left Animation","_FallLeftAnimation"):a.h["Fall Left Animation"]="_FallLeftAnimation";a=this.nameMap;null!=q["Ground Y"]?a.setReserved("Ground Y","_GroundY"):a.h["Ground Y"]="_GroundY";this._GroundY=0;a=this.nameMap;null!=q["Animation Category"]?a.setReserved("Animation Category",
"_AnimationCategory"):a.h["Animation Category"]="_AnimationCategory";this._AnimationCategory="Falling"};h["scripts.Design_34_34_Falling"]=as;as.__name__="scripts.Design_34_34_Falling";as.__super__=ja;as.prototype=w(ja.prototype,{_OldY:null,_CanFall:null,_FallRightAnimation:null,_FallLeftAnimation:null,_GroundY:null,_AnimationCategory:null,init:function(){},forwardMessage:function(a){},__class__:as});var bs=function(a,b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor","actor"):
a.h.Actor="actor";a=this.nameMap;null!=q["Duck Key"]?a.setReserved("Duck Key","_DuckKey"):a.h["Duck Key"]="_DuckKey";a=this.nameMap;null!=q["Duck Right Animation"]?a.setReserved("Duck Right Animation","_DuckRightAnimation"):a.h["Duck Right Animation"]="_DuckRightAnimation";a=this.nameMap;null!=q["Duck Left Animation"]?a.setReserved("Duck Left Animation","_DuckLeftAnimation"):a.h["Duck Left Animation"]="_DuckLeftAnimation";a=this.nameMap;null!=q["Animation Category"]?a.setReserved("Animation Category",
"_AnimationCategory"):a.h["Animation Category"]="_AnimationCategory";this._AnimationCategory="Ducking"};h["scripts.Design_35_35_Ducking"]=bs;bs.__name__="scripts.Design_35_35_Ducking";bs.__super__=ja;bs.prototype=w(ja.prototype,{_DuckKey:null,_DuckRightAnimation:null,_DuckLeftAnimation:null,_AnimationCategory:null,init:function(){},forwardMessage:function(a){},__class__:bs});var cs=function(a,b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor","actor"):a.h.Actor="actor";a=this.nameMap;
null!=q["Move Right Key"]?a.setReserved("Move Right Key","_MoveRightKey"):a.h["Move Right Key"]="_MoveRightKey";a=this.nameMap;null!=q["Move Left Key"]?a.setReserved("Move Left Key","_MoveLeftKey"):a.h["Move Left Key"]="_MoveLeftKey";a=this.nameMap;null!=q.Acceleration?a.setReserved("Acceleration","_Acceleration"):a.h.Acceleration="_Acceleration";this._Acceleration=85;a=this.nameMap;null!=q["Max Walking Speed"]?a.setReserved("Max Walking Speed","_MaxWalkingSpeed"):a.h["Max Walking Speed"]="_MaxWalkingSpeed";
this._MaxWalkingSpeed=20;a=this.nameMap;null!=q["Limit Speed?"]?a.setReserved("Limit Speed?","_LimitSpeed"):a.h["Limit Speed?"]="_LimitSpeed";this._LimitSpeed=!1;a=this.nameMap;null!=q["Walk Right Animation"]?a.setReserved("Walk Right Animation","_WalkRightAnimation"):a.h["Walk Right Animation"]="_WalkRightAnimation";a=this.nameMap;null!=q["Walk Left Animation"]?a.setReserved("Walk Left Animation","_WalkLeftAnimation"):a.h["Walk Left Animation"]="_WalkLeftAnimation";a=this.nameMap;null!=q["Idle Right Animation"]?
a.setReserved("Idle Right Animation","_IdleRightAnimation"):a.h["Idle Right Animation"]="_IdleRightAnimation";a=this.nameMap;null!=q["Idle Left Animation"]?a.setReserved("Idle Left Animation","_IdleLeftAnimation"):a.h["Idle Left Animation"]="_IdleLeftAnimation";a=this.nameMap;null!=q["Prevent Walking?"]?a.setReserved("Prevent Walking?","_PreventWalking"):a.h["Prevent Walking?"]="_PreventWalking";this._PreventWalking=!1;a=this.nameMap;null!=q["Disable Statuses"]?a.setReserved("Disable Statuses","_DisableStatuses"):
a.h["Disable Statuses"]="_DisableStatuses";a=this.nameMap;null!=q["Animation Category"]?a.setReserved("Animation Category","_AnimationCategory"):a.h["Animation Category"]="_AnimationCategory";this._AnimationCategory="Walking"};h["scripts.Design_36_36_Walking"]=cs;cs.__name__="scripts.Design_36_36_Walking";cs.__super__=ja;cs.prototype=w(ja.prototype,{_MoveRightKey:null,_MoveLeftKey:null,_Acceleration:null,_MaxWalkingSpeed:null,_LimitSpeed:null,_WalkRightAnimation:null,_WalkLeftAnimation:null,_IdleRightAnimation:null,
_IdleLeftAnimation:null,_PreventWalking:null,_DisableStatuses:null,_AnimationCategory:null,_customBlock_SlowToMax:function(a){Math.abs(this.actor.getXVelocity())>this._MaxWalkingSpeed&&this.actor.setXVelocity(this.actor.getXVelocity()*a)},_customBlock_LimitSpeed:function(a){this._LimitSpeed=a},_customBlock_PreventWalk:function(a){this._PreventWalking=a},_customBlock_GetMaxWalkSpeed:function(){return this._MaxWalkingSpeed},_customBlock_MaxWalkSpeed:function(a){this._MaxWalkingSpeed=a},_customBlock_GetWalkAccel:function(){return this._Acceleration},
_customBlock_WalkAccel:function(a){this._Acceleration=a},_customBlock_AtMaxWalkingSpeed:function(){var a=this.actor.getActorValue("Facing Right?");if((1==a||"true"==a)&&this.actor.getXVelocity()>=this._MaxWalkingSpeed)return this._LimitSpeed&&this.actor.setXVelocity(this._MaxWalkingSpeed),!0;a=this.actor.getActorValue("Facing Right?");return 1!=a&&"true"!=a&&this.actor.getXVelocity()<=-this._MaxWalkingSpeed?(this._LimitSpeed&&this.actor.setXVelocity(-this._MaxWalkingSpeed),!0):!1},init:function(){var a=
this;this.actor.setActorValue("Facing Right?",!0);this.addWhenUpdatedListener(null,function(b,c){if(a.wrapper.enabled){b=0;for(c=L.__cast(a._DisableStatuses,Array);b<c.length;){var d=c[b];++b;d=a.actor.getActorValue(""+K.string(d));if(1==d||"true"==d)return}if(!a._PreventWalking){if(r.isKeyDown(a._MoveRightKey)&&!r.isKeyDown(a._MoveLeftKey)){a.actor.setActorValue("Facing Right?",!0);b=a.actor.getActorValue("On Ground?");1!=b&&"true"!=b||a.actor.say("Animation Manager","_customBlock_LoopAnim",[a._WalkRightAnimation,
a._AnimationCategory]);if(a._customBlock_AtMaxWalkingSpeed())return;a.actor.push(1,0,a._Acceleration)}if(r.isKeyDown(a._MoveLeftKey)&&!r.isKeyDown(a._MoveRightKey)){a.actor.setActorValue("Facing Right?",!1);b=a.actor.getActorValue("On Ground?");1!=b&&"true"!=b||a.actor.say("Animation Manager","_customBlock_LoopAnim",[a._WalkLeftAnimation,a._AnimationCategory]);if(a._customBlock_AtMaxWalkingSpeed())return;a.actor.push(-1,0,a._Acceleration)}r.isKeyDown(a._MoveRightKey)||r.isKeyDown(a._MoveLeftKey)||
(b=a.actor.getActorValue("On Ground?"),1!=b&&"true"!=b)||(b=a.actor.getActorValue("Facing Right?"),1==b||"true"==b?a.actor.say("Animation Manager","_customBlock_LoopAnim",[a._IdleRightAnimation,a._AnimationCategory]):a.actor.say("Animation Manager","_customBlock_LoopAnim",[a._IdleLeftAnimation,a._AnimationCategory]))}}})},forwardMessage:function(a){},__class__:cs});var ds=function(a,b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor","actor"):a.h.Actor="actor";a=this.nameMap;null!=
q["Colliding Left?"]?a.setReserved("Colliding Left?","_CollidingLeft"):a.h["Colliding Left?"]="_CollidingLeft";this._CollidingLeft=!1;a=this.nameMap;null!=q["Colliding Right?"]?a.setReserved("Colliding Right?","_CollidingRight"):a.h["Colliding Right?"]="_CollidingRight";this._CollidingRight=!1;a=this.nameMap;null!=q["Collided Left?"]?a.setReserved("Collided Left?","_CollidedLeft"):a.h["Collided Left?"]="_CollidedLeft";this._CollidedLeft=!1;a=this.nameMap;null!=q["Collided Right?"]?a.setReserved("Collided Right?",
"_CollidedRight"):a.h["Collided Right?"]="_CollidedRight";this._CollidedRight=!1;a=this.nameMap;null!=q["Key Released?"]?a.setReserved("Key Released?","_KeyReleased"):a.h["Key Released?"]="_KeyReleased";this._KeyReleased=!0;a=this.nameMap;null!=q["Jumped?"]?a.setReserved("Jumped?","_Jumped"):a.h["Jumped?"]="_Jumped";this._Jumped=!1;a=this.nameMap;null!=q["Jump Key"]?a.setReserved("Jump Key","_JumpKey"):a.h["Jump Key"]="_JumpKey";a=this.nameMap;null!=q["Can Jump?"]?a.setReserved("Can Jump?","_CanJump"):
a.h["Can Jump?"]="_CanJump";this._CanJump=!1;a=this.nameMap;null!=q["Elapsed Time"]?a.setReserved("Elapsed Time","_ElapsedTime"):a.h["Elapsed Time"]="_ElapsedTime";this._ElapsedTime=0;a=this.nameMap;null!=q["Jump Right Angle"]?a.setReserved("Jump Right Angle","_JumpRightAngle"):a.h["Jump Right Angle"]="_JumpRightAngle";this._JumpRightAngle=290;a=this.nameMap;null!=q["Jump Left Angle"]?a.setReserved("Jump Left Angle","_JumpLeftAngle"):a.h["Jump Left Angle"]="_JumpLeftAngle";this._JumpLeftAngle=250;
a=this.nameMap;null!=q["Jump Force"]?a.setReserved("Jump Force","_JumpForce"):a.h["Jump Force"]="_JumpForce";this._JumpForce=65;a=this.nameMap;null!=q["Wall Jump Right Animation"]?a.setReserved("Wall Jump Right Animation","_WallJumpRightAnimation"):a.h["Wall Jump Right Animation"]="_WallJumpRightAnimation";a=this.nameMap;null!=q["Wall Jump Left Animation"]?a.setReserved("Wall Jump Left Animation","_WallJumpLeftAnimation"):a.h["Wall Jump Left Animation"]="_WallJumpLeftAnimation";a=this.nameMap;null!=
q["Prevent Wall Jump"]?a.setReserved("Prevent Wall Jump","_PreventWallJump"):a.h["Prevent Wall Jump"]="_PreventWallJump";this._PreventWallJump=!1;a=this.nameMap;null!=q["Animation Category"]?a.setReserved("Animation Category","_AnimationCategory"):a.h["Animation Category"]="_AnimationCategory";this._AnimationCategory="Wall Jumping"};h["scripts.Design_37_37_WallJumping"]=ds;ds.__name__="scripts.Design_37_37_WallJumping";ds.__super__=ja;ds.prototype=w(ja.prototype,{_CollidingLeft:null,_CollidingRight:null,
_CollidedLeft:null,_CollidedRight:null,_KeyReleased:null,_Jumped:null,_JumpKey:null,_CanJump:null,_ElapsedTime:null,_JumpRightAngle:null,_JumpLeftAngle:null,_JumpForce:null,_WallJumpRightAnimation:null,_WallJumpLeftAnimation:null,_PreventWallJump:null,_AnimationCategory:null,init:function(){},forwardMessage:function(a){},__class__:ds});var es=function(a,b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor","actor"):a.h.Actor="actor";a=this.nameMap;null!=q["Can Slide?"]?a.setReserved("Can Slide?",
"_CanSlide"):a.h["Can Slide?"]="_CanSlide";this._CanSlide=!1;a=this.nameMap;null!=q["Colliding Left?"]?a.setReserved("Colliding Left?","_CollidingLeft"):a.h["Colliding Left?"]="_CollidingLeft";this._CollidingLeft=!1;a=this.nameMap;null!=q["Colliding Right?"]?a.setReserved("Colliding Right?","_CollidingRight"):a.h["Colliding Right?"]="_CollidingRight";this._CollidingRight=!1;a=this.nameMap;null!=q["Collided Left?"]?a.setReserved("Collided Left?","_CollidedLeft"):a.h["Collided Left?"]="_CollidedLeft";
this._CollidedLeft=!1;a=this.nameMap;null!=q["Collided Right?"]?a.setReserved("Collided Right?","_CollidedRight"):a.h["Collided Right?"]="_CollidedRight";this._CollidedRight=!1;a=this.nameMap;null!=q["Old Y"]?a.setReserved("Old Y","_OldY"):a.h["Old Y"]="_OldY";this._OldY=0;a=this.nameMap;null!=q["Left Key"]?a.setReserved("Left Key","_LeftKey"):a.h["Left Key"]="_LeftKey";a=this.nameMap;null!=q["Right Key"]?a.setReserved("Right Key","_RightKey"):a.h["Right Key"]="_RightKey";a=this.nameMap;null!=q["Slide Speed"]?
a.setReserved("Slide Speed","_SlideSpeed"):a.h["Slide Speed"]="_SlideSpeed";this._SlideSpeed=7;a=this.nameMap;null!=q["Slide Right Animation"]?a.setReserved("Slide Right Animation","_SlideRightAnimation"):a.h["Slide Right Animation"]="_SlideRightAnimation";a=this.nameMap;null!=q["Slide Left Animation"]?a.setReserved("Slide Left Animation","_SlideLeftAnimation"):a.h["Slide Left Animation"]="_SlideLeftAnimation";a=this.nameMap;null!=q["Limit to Tiles?"]?a.setReserved("Limit to Tiles?","_LimittoTiles"):
a.h["Limit to Tiles?"]="_LimittoTiles";this._LimittoTiles=!1;a=this.nameMap;null!=q["Prevent Wall Slide?"]?a.setReserved("Prevent Wall Slide?","_PreventWallSlide"):a.h["Prevent Wall Slide?"]="_PreventWallSlide";this._PreventWallSlide=!1;a=this.nameMap;null!=q["Animation Category"]?a.setReserved("Animation Category","_AnimationCategory"):a.h["Animation Category"]="_AnimationCategory";this._AnimationCategory="Wall Sliding"};h["scripts.Design_38_38_WallSliding"]=es;es.__name__="scripts.Design_38_38_WallSliding";
es.__super__=ja;es.prototype=w(ja.prototype,{_CanSlide:null,_CollidingLeft:null,_CollidingRight:null,_CollidedLeft:null,_CollidedRight:null,_OldY:null,_LeftKey:null,_RightKey:null,_SlideSpeed:null,_SlideRightAnimation:null,_SlideLeftAnimation:null,_LimittoTiles:null,_PreventWallSlide:null,_AnimationCategory:null,init:function(){},forwardMessage:function(a){},__class__:es});var fs=function(a,b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor","actor"):a.h.Actor="actor";a=this.nameMap;
null!=q["Can Pound?"]?a.setReserved("Can Pound?","_CanPound"):a.h["Can Pound?"]="_CanPound";this._CanPound=!1;a=this.nameMap;null!=q["Ground Pound Key"]?a.setReserved("Ground Pound Key","_GroundPoundKey"):a.h["Ground Pound Key"]="_GroundPoundKey";a=this.nameMap;null!=q["Down Key"]?a.setReserved("Down Key","_DownKey"):a.h["Down Key"]="_DownKey";a=this.nameMap;null!=q["Down Key Required?"]?a.setReserved("Down Key Required?","_DownKeyRequired"):a.h["Down Key Required?"]="_DownKeyRequired";this._DownKeyRequired=
!0;a=this.nameMap;null!=q.Force?a.setReserved("Force","_Force"):a.h.Force="_Force";this._Force=0;a=this.nameMap;null!=q["Pound Right Animation"]?a.setReserved("Pound Right Animation","_PoundRightAnimation"):a.h["Pound Right Animation"]="_PoundRightAnimation";a=this.nameMap;null!=q["Pound Left Animation"]?a.setReserved("Pound Left Animation","_PoundLeftAnimation"):a.h["Pound Left Animation"]="_PoundLeftAnimation";a=this.nameMap;null!=q["Old X"]?a.setReserved("Old X","_OldX"):a.h["Old X"]="_OldX";this._OldX=
0;a=this.nameMap;null!=q["Animation Category"]?a.setReserved("Animation Category","_AnimationCategory"):a.h["Animation Category"]="_AnimationCategory";this._AnimationCategory="Ground Pounding"};h["scripts.Design_39_39_GroundPound"]=fs;fs.__name__="scripts.Design_39_39_GroundPound";fs.__super__=ja;fs.prototype=w(ja.prototype,{_CanPound:null,_GroundPoundKey:null,_DownKey:null,_DownKeyRequired:null,_Force:null,_PoundRightAnimation:null,_PoundLeftAnimation:null,_OldX:null,_AnimationCategory:null,init:function(){},
forwardMessage:function(a){},__class__:fs});var gs=function(a,b){r.call(this);a=this.nameMap;null!=q.Started?a.setReserved("Started","_Started"):a.h.Started="_Started";this._Started=!1;a=this.nameMap;null!=q["Font To Use"]?a.setReserved("Font To Use","_FontToUse"):a.h["Font To Use"]="_FontToUse";a=this.nameMap;null!=q["Time Before Retreat"]?a.setReserved("Time Before Retreat","_TimeBeforeRetreat"):a.h["Time Before Retreat"]="_TimeBeforeRetreat";this._TimeBeforeRetreat=1;a=this.nameMap;null!=q["Y Centre Position"]?
a.setReserved("Y Centre Position","_YCentrePosition"):a.h["Y Centre Position"]="_YCentrePosition";this._YCentrePosition=0;a=this.nameMap;null!=q["Alternative Text"]?a.setReserved("Alternative Text","_AlternativeText"):a.h["Alternative Text"]="_AlternativeText";this._AlternativeText="";a=this.nameMap;null!=q["Slide Speed"]?a.setReserved("Slide Speed","_SlideSpeed"):a.h["Slide Speed"]="_SlideSpeed";this._SlideSpeed=-5;a=this.nameMap;null!=q["Draw Rounded Rectangle?"]?a.setReserved("Draw Rounded Rectangle?",
"_DrawRectangle"):a.h["Draw Rounded Rectangle?"]="_DrawRectangle";this._DrawRectangle=!1;a=this.nameMap;null!=q["X Centre Position"]?a.setReserved("X Centre Position","_XCentrePosition"):a.h["X Centre Position"]="_XCentrePosition";this._XCentrePosition=0;a=this.nameMap;null!=q["Fill Colour"]?a.setReserved("Fill Colour","_FillColour"):a.h["Fill Colour"]="_FillColour";a=204;var c=b=255;null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this._FillColour=a<<16|b<<8|c;a=this.nameMap;null!=q["Stroke Colour"]?
a.setReserved("Stroke Colour","_StrokeColour"):a.h["Stroke Colour"]="_StrokeColour";a=153;b=204;c=255;null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this._StrokeColour=a<<16|b<<8|c;a=this.nameMap;null!=q["Stroke Thickness"]?a.setReserved("Stroke Thickness","_StrokeThickness"):a.h["Stroke Thickness"]="_StrokeThickness";this._StrokeThickness=1;a=this.nameMap;null!=q.Padding?a.setReserved("Padding","_Padding"):a.h.Padding="_Padding";this._Padding=4;a=this.nameMap;null!=q.Rounding?a.setReserved("Rounding",
"_Rounding"):a.h.Rounding="_Rounding";this._Rounding=2;a=this.nameMap;null!=q["Slide Direction"]?a.setReserved("Slide Direction","_SlideDirection"):a.h["Slide Direction"]="_SlideDirection";this._SlideDirection="";a=this.nameMap;null!=q["Slide Speed Change"]?a.setReserved("Slide Speed Change","_SlideSpeedChange"):a.h["Slide Speed Change"]="_SlideSpeedChange";this._SlideSpeedChange=.5};h["scripts.Design_49_49_IntroTitle"]=gs;gs.__name__="scripts.Design_49_49_IntroTitle";gs.__super__=Na;gs.prototype=
w(Na.prototype,{_Started:null,_FontToUse:null,_TimeBeforeRetreat:null,_YCentrePosition:null,_AlternativeText:null,_SlideSpeed:null,_DrawRectangle:null,_XCentrePosition:null,_FillColour:null,_StrokeColour:null,_StrokeThickness:null,_Padding:null,_Rounding:null,_SlideDirection:null,_SlideSpeedChange:null,init:function(){var a=this;this._Started=!1;r.runLater(1E3*this._TimeBeforeRetreat,function(b){a._Started=!0},null);var b=this._AlternativeText;if(!r.isPrimitive(b)&&("string"==typeof b?""==L.__cast(b,
String):null==b)||0==this._AlternativeText.length)this._AlternativeText=r.getCurrentSceneName();this.addWhenUpdatedListener(null,function(b,d){a.wrapper.enabled&&a._Started&&("Up"==a._SlideDirection?a._YCentrePosition-=a._SlideSpeed:"Down"==a._SlideDirection?a._YCentrePosition+=a._SlideSpeed:"Left"==a._SlideDirection?a._XCentrePosition-=a._SlideSpeed:"Right"==a._SlideDirection&&(a._XCentrePosition+=a._SlideSpeed),a._SlideSpeed+=a._SlideSpeedChange)});this.addWhenDrawingListener(null,function(b,d,
e,f){if(a.wrapper.enabled){b.alpha=(100-Math.abs(a._SlideSpeed))/100;d=a._FontToUse;null!=d&&d!=b.font&&(b.font=d);if(a._DrawRectangle){d=a._FillColour;b.fillColor=0>d?d+16777216:d;b.strokeColor=a._StrokeColour;b.strokeSize=a._StrokeThickness|0;d=a._XCentrePosition-(b.font.getTextWidth(a._AlternativeText)/p.SCALE/2+a._Padding);e=a._YCentrePosition-(b.font.getHeight()/p.SCALE/2+a._Padding);f=b.font.getTextWidth(a._AlternativeText)/p.SCALE+2*a._Padding;var c=b.font.getHeight()/p.SCALE+2*a._Padding,
k=a._Rounding;d*=b.scaleX;e*=b.scaleY;f*=b.scaleX;c*=b.scaleY;!b.drawActor||null!=b.actor&&b.actor.isHUD||(b.x-=p.cameraX,b.y-=p.cameraY);0==b.strokeSize?b.graphics.lineStyle():b.graphics.lineStyle(b.strokeSize*p.SCALE,b.strokeColor,b.alpha);b.graphics.beginFill(b.fillColor,b.alpha);b.graphics.drawRoundRect(b.x+d,b.y+e,f,c,k,k);b.graphics.endFill();b.drawActor&&!b.actor.isHUD&&(b.x+=p.cameraX,b.y+=p.cameraY);b.graphics.lineStyle();d=a._XCentrePosition-(b.font.getTextWidth(a._AlternativeText)/p.SCALE/
2+a._Padding);e=a._YCentrePosition-(b.font.getHeight()/p.SCALE/2+a._Padding);f=b.font.getTextWidth(a._AlternativeText)/p.SCALE+2*a._Padding;c=b.font.getHeight()/p.SCALE+2*a._Padding;k=a._Rounding;d*=b.scaleX;e*=b.scaleY;f*=b.scaleX;c*=b.scaleY;!b.drawActor||null!=b.actor&&b.actor.isHUD||(b.x-=p.cameraX,b.y-=p.cameraY);0==b.strokeSize?b.graphics.lineStyle():b.graphics.lineStyle(b.strokeSize*p.SCALE,b.strokeColor,b.alpha);b.graphics.drawRoundRect(b.x+d,b.y+e,f,c,k,k);b.drawActor&&!b.actor.isHUD&&(b.x+=
p.cameraX,b.y+=p.cameraY);b.graphics.lineStyle()}f=""+a._AlternativeText;d=a._XCentrePosition-b.font.getTextWidth(a._AlternativeText)/p.SCALE/2;e=a._YCentrePosition-b.font.getHeight()/p.SCALE/2;null==b.font&&(b.font=b.defaultFont,b.font.fontScale!=p.SCALE&&(b.font.fontScale=p.SCALE));b.drawActor?null!=b.actor&&b.actor.isHUD?(d=b.x+d*b.scaleX,e=b.y+e*b.scaleY):(d=b.x+d*b.scaleX-p.cameraX,e=b.y+e*b.scaleY-p.cameraY):(d=b.x+d*b.scaleX,e=b.y+e*b.scaleY);b.mtx.identity();b.mtx.translate(d,e);c=null;k=
b.font;k=f+":"+k.ID+":"+b.alpha+":"+k.letterSpacing+":"+p.SCALE;var l=ab.drawnStringCache;if(null!=q[k]?l.existsReserved(k):l.h.hasOwnProperty(k))f=ab.drawnStringCache,f=null!=q[k]?f.getReserved(k):f.h[k],f.lifetime=5,c=f.img;else{l=b.font.font.getTextWidth(f,b.font.letterSpacing,b.font.fontScale);var m=b.font.font.getFontHeight()*b.font.fontScale|0;0<l&&0<m&&(c=new na(l,m,!0,0),b.font.font.renderToImg(c,f,0,b.alpha,0,0,b.font.letterSpacing,b.font.fontScale,0,!1),f=new qf,f.img=c,f.lifetime=5,l=ab.drawnStringCache,
null!=q[k]?l.setReserved(k,f):l.h[k]=f,ab.drawnStringCacheKeys.push(k))}null!=c&&(b.graphics.beginBitmapFill(c,b.mtx,!1,ma.antialias),b.graphics.drawRect(d,e,c.width,c.height),b.graphics.endFill())}})},forwardMessage:function(a){},__class__:gs});var hs=function(a,b){r.call(this);a=this.nameMap;null!=q["Backgound Opacity"]?a.setReserved("Backgound Opacity","_BackgoundOpacity"):a.h["Backgound Opacity"]="_BackgoundOpacity";this._BackgoundOpacity=80;a=this.nameMap;null!=q["Background Color"]?a.setReserved("Background Color",
"_BackgroundColor"):a.h["Background Color"]="_BackgroundColor";var c=b=a=51;null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this._BackgroundColor=a<<16|b<<8|c;a=this.nameMap;null!=q["Border Color"]?a.setReserved("Border Color","_BorderColor"):a.h["Border Color"]="_BorderColor";a=204;b=255;c=204;null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this._BorderColor=a<<16|b<<8|c;a=this.nameMap;null!=q.Font?a.setReserved("Font","_Font"):a.h.Font="_Font";a=this.nameMap;null!=q.Activated?a.setReserved("Activated",
"_Activated"):a.h.Activated="_Activated";this._Activated=!1;a=this.nameMap;null!=q.Height?a.setReserved("Height","_Height"):a.h.Height="_Height";this._Height=0;a=this.nameMap;null!=q.X?a.setReserved("X","_XVar"):a.h.X="_XVar";this._XVar=0;a=this.nameMap;null!=q.Y?a.setReserved("Y","_YVar"):a.h.Y="_YVar";this._YVar=0;a=this.nameMap;null!=q.Width?a.setReserved("Width","_Width"):a.h.Width="_Width";this._Width=0;a=this.nameMap;null!=q.Mode?a.setReserved("Mode","_Mode"):a.h.Mode="_Mode";this._Mode="";
a=this.nameMap;null!=q.Behavior?a.setReserved("Behavior","_Behavior"):a.h.Behavior="_Behavior";this._Behavior="";a=this.nameMap;null!=q.Row?a.setReserved("Row","_Row"):a.h.Row="_Row";this._Row=0;a=this.nameMap;null!=q["Max Behavior Width"]?a.setReserved("Max Behavior Width","_MaxBehaviorWidth"):a.h["Max Behavior Width"]="_MaxBehaviorWidth";this._MaxBehaviorWidth=0;a=this.nameMap;null!=q.Item?a.setReserved("Item","_Item"):a.h.Item="_Item";this._Item=0;a=this.nameMap;null!=q["Max Attribute Width"]?
a.setReserved("Max Attribute Width","_MaxAttributeWidth"):a.h["Max Attribute Width"]="_MaxAttributeWidth";this._MaxAttributeWidth=0;a=this.nameMap;null!=q["Behavior List"]?a.setReserved("Behavior List","_BehaviorList"):a.h["Behavior List"]="_BehaviorList";a=this.nameMap;null!=q["Attribute List"]?a.setReserved("Attribute List","_AttributeList"):a.h["Attribute List"]="_AttributeList";a=this.nameMap;null!=q["Max Value Width"]?a.setReserved("Max Value Width","_MaxValueWidth"):a.h["Max Value Width"]="_MaxValueWidth";
this._MaxValueWidth=0;a=this.nameMap;null!=q.Actor?a.setReserved("Actor","_Actor"):a.h.Actor="_Actor";a=this.nameMap;null!=q["Font Opacity"]?a.setReserved("Font Opacity","_FontOpacity"):a.h["Font Opacity"]="_FontOpacity";this._FontOpacity=40;a=this.nameMap;null!=q.Value?a.setReserved("Value","_Value"):a.h.Value="_Value";this._Value="";a=this.nameMap;null!=q["Toggle Control"]?a.setReserved("Toggle Control","_ToggleControl"):a.h["Toggle Control"]="_ToggleControl";a=this.nameMap;null!=q.Hidden?a.setReserved("Hidden",
"_Hidden"):a.h.Hidden="_Hidden";this._Hidden=!1;a=this.nameMap;null!=q.Offset?a.setReserved("Offset","_Offset"):a.h.Offset="_Offset";this._Offset=0;a=this.nameMap;null!=q.Index?a.setReserved("Index","_Index"):a.h.Index="_Index";this._Index=0;a=this.nameMap;null!=q.Start?a.setReserved("Start","_Start"):a.h.Start="_Start";this._Start=0;a=this.nameMap;null!=q.End?a.setReserved("End","_End"):a.h.End="_End";this._End=0;a=this.nameMap;null!=q["Max Offset"]?a.setReserved("Max Offset","_MaxOffset"):a.h["Max Offset"]=
"_MaxOffset";this._MaxOffset=0;a=this.nameMap;null!=q["Inspect Width"]?a.setReserved("Inspect Width","_InspectWidth"):a.h["Inspect Width"]="_InspectWidth";this._InspectWidth=0;a=this.nameMap;null!=q["Actor Width"]?a.setReserved("Actor Width","_ActorWidth"):a.h["Actor Width"]="_ActorWidth";this._ActorWidth=0;a=this.nameMap;null!=q["Scene Width"]?a.setReserved("Scene Width","_SceneWidth"):a.h["Scene Width"]="_SceneWidth";this._SceneWidth=0;a=this.nameMap;null!=q["Char Width"]?a.setReserved("Char Width",
"_CharWidth"):a.h["Char Width"]="_CharWidth";this._CharWidth=0;a=this.nameMap;null!=q["Selected Actor Width"]?a.setReserved("Selected Actor Width","_SelectedActorWidth"):a.h["Selected Actor Width"]="_SelectedActorWidth";this._SelectedActorWidth=0;a=this.nameMap;null!=q.Name?a.setReserved("Name","_Name"):a.h.Name="_Name";this._Name="";a=this.nameMap;null!=q["Game Width"]?a.setReserved("Game Width","_GameWidth"):a.h["Game Width"]="_GameWidth";this._GameWidth=0;a=this.nameMap;null!=q["Actor List"]?a.setReserved("Actor List",
"_ActorList"):a.h["Actor List"]="_ActorList";a=this.nameMap;null!=q["Max Actor Width"]?a.setReserved("Max Actor Width","_MaxActorWidth"):a.h["Max Actor Width"]="_MaxActorWidth";this._MaxActorWidth=0};h["scripts.Design_50_50_BehaviorInspector"]=hs;hs.__name__="scripts.Design_50_50_BehaviorInspector";hs.__super__=Na;hs.prototype=w(Na.prototype,{_BackgoundOpacity:null,_BackgroundColor:null,_BorderColor:null,_Font:null,_Activated:null,_Height:null,_XVar:null,_YVar:null,_Width:null,_Mode:null,_Behavior:null,
_Row:null,_MaxBehaviorWidth:null,_Item:null,_MaxAttributeWidth:null,_BehaviorList:null,_AttributeList:null,_MaxValueWidth:null,_Actor:null,_FontOpacity:null,_Value:null,_ToggleControl:null,_Hidden:null,_Offset:null,_Index:null,_Start:null,_End:null,_MaxOffset:null,_InspectWidth:null,_ActorWidth:null,_SceneWidth:null,_CharWidth:null,_SelectedActorWidth:null,_Name:null,_GameWidth:null,_ActorList:null,_MaxActorWidth:null,init:function(){var a=this;this._ActorList=[];this.addKeyStateListener(this._ToggleControl,
function(b,c,d){a.wrapper.enabled&&b&&(a._Hidden=!a._Hidden)});this.addWhenDrawingListener(null,function(b,c,d,e){if(a.wrapper.enabled&&!a._Hidden){var f=a._Font;if(r.isPrimitive(f)||("string"==typeof f?""!=L.__cast(f,String):null!=f)){var g=a._Font;null!=g&&g!=b.font&&(b.font=g)}var k=a._BackgroundColor;b.fillColor=0>k?k+16777216:k;b.strokeColor=a._BorderColor;b.strokeSize=1;a._XVar=0;a._YVar=0;var l=b.font.getTextWidth("Inspect");a._InspectWidth=l/p.SCALE;var m=b.font.getTextWidth("W");a._CharWidth=
m/p.SCALE;a._Width=a._InspectWidth;var h=b.font.getHeight();a._Height=h/p.SCALE;b.alpha=a._BackgoundOpacity/100;var n=0,t=0,u=a._Width,x=a._Height;n*=b.scaleX;t*=b.scaleY;u*=b.scaleX;x*=b.scaleY;!b.drawActor||null!=b.actor&&b.actor.isHUD||(b.x-=p.cameraX,b.y-=p.cameraY);0==b.strokeSize?b.graphics.lineStyle():b.graphics.lineStyle(b.strokeSize*p.SCALE,b.strokeColor,b.alpha);b.graphics.beginFill(b.fillColor,b.alpha);b.graphics.drawRect(b.x+n,b.y+t,u,x);b.graphics.endFill();b.drawActor&&!b.actor.isHUD&&
(b.x+=p.cameraX,b.y+=p.cameraY);b.graphics.lineStyle();b.alpha=a._Activated?1:a._FontOpacity/100;null==b.font&&(b.font=b.defaultFont,b.font.fontScale!=p.SCALE&&(b.font.fontScale=p.SCALE));if(b.drawActor)if(null!=b.actor&&b.actor.isHUD){var v=b.x+0*b.scaleX;var w=b.y+0*b.scaleY}else v=b.x+0*b.scaleX-p.cameraX,w=b.y+0*b.scaleY-p.cameraY;else v=b.x+0*b.scaleX,w=b.y+0*b.scaleY;b.mtx.identity();b.mtx.translate(v,w);var J=null,C=b.font,Q="Inspect:"+C.ID+":"+b.alpha+":"+C.letterSpacing+":"+p.SCALE,F=ab.drawnStringCache;
if(null!=q[Q]?F.existsReserved(Q):F.h.hasOwnProperty(Q)){var B=ab.drawnStringCache,D=null!=q[Q]?B.getReserved(Q):B.h[Q];D.lifetime=5;J=D.img}else{var E=b.font.font.getTextWidth("Inspect",b.font.letterSpacing,b.font.fontScale),A=b.font.font.getFontHeight()*b.font.fontScale|0;if(0<E&&0<A){J=new na(E,A,!0,0);b.font.font.renderToImg(J,"Inspect",0,b.alpha,0,0,b.font.letterSpacing,b.font.fontScale,0,!1);var G=new qf;G.img=J;G.lifetime=5;var H=ab.drawnStringCache;null!=q[Q]?H.setReserved(Q,G):H.h[Q]=G;ab.drawnStringCacheKeys.push(Q)}}null!=
J&&(b.graphics.beginBitmapFill(J,b.mtx,!1,ma.antialias),b.graphics.drawRect(v,w,J.width,J.height),b.graphics.endFill());if(a._Activated){a._XVar=0;a._YVar=a._Height;var I=b.font.getTextWidth("Actor");a._ActorWidth=I/p.SCALE;a._Width=a._ActorWidth;b.alpha=a._BackgoundOpacity/100;var y=a._XVar,M=a._YVar,N=a._Width,P=a._Height;y*=b.scaleX;M*=b.scaleY;N*=b.scaleX;P*=b.scaleY;!b.drawActor||null!=b.actor&&b.actor.isHUD||(b.x-=p.cameraX,b.y-=p.cameraY);0==b.strokeSize?b.graphics.lineStyle():b.graphics.lineStyle(b.strokeSize*
p.SCALE,b.strokeColor,b.alpha);b.graphics.beginFill(b.fillColor,b.alpha);b.graphics.drawRect(b.x+y,b.y+M,N,P);b.graphics.endFill();b.drawActor&&!b.actor.isHUD&&(b.x+=p.cameraX,b.y+=p.cameraY);b.graphics.lineStyle();b.alpha="Actor"==a._Mode?1:a._FontOpacity/100;var S=a._XVar,T=a._YVar;null==b.font&&(b.font=b.defaultFont,b.font.fontScale!=p.SCALE&&(b.font.fontScale=p.SCALE));if(b.drawActor)if(null!=b.actor&&b.actor.isHUD){var Pa=b.x+S*b.scaleX;var U=b.y+T*b.scaleY}else Pa=b.x+S*b.scaleX-p.cameraX,U=
b.y+T*b.scaleY-p.cameraY;else Pa=b.x+S*b.scaleX,U=b.y+T*b.scaleY;b.mtx.identity();b.mtx.translate(Pa,U);var da=null,Aa=b.font,Ca="Actor:"+Aa.ID+":"+b.alpha+":"+Aa.letterSpacing+":"+p.SCALE,W=ab.drawnStringCache;if(null!=q[Ca]?W.existsReserved(Ca):W.h.hasOwnProperty(Ca)){var Y=ab.drawnStringCache,Z=null!=q[Ca]?Y.getReserved(Ca):Y.h[Ca];Z.lifetime=5;da=Z.img}else{var aa=b.font.font.getTextWidth("Actor",b.font.letterSpacing,b.font.fontScale),O=b.font.font.getFontHeight()*b.font.fontScale|0;if(0<aa&&
0<O){da=new na(aa,O,!0,0);b.font.font.renderToImg(da,"Actor",0,b.alpha,0,0,b.font.letterSpacing,b.font.fontScale,0,!1);var ba=new qf;ba.img=da;ba.lifetime=5;var R=ab.drawnStringCache;null!=q[Ca]?R.setReserved(Ca,ba):R.h[Ca]=ba;ab.drawnStringCacheKeys.push(Ca)}}null!=da&&(b.graphics.beginBitmapFill(da,b.mtx,!1,ma.antialias),b.graphics.drawRect(Pa,U,da.width,da.height),b.graphics.endFill());a._XVar=a._ActorWidth;var ea=b.font.getTextWidth("Scene");a._SceneWidth=ea/p.SCALE;a._Width=a._SceneWidth;b.alpha=
a._BackgoundOpacity/100;var V=a._XVar,cc=a._YVar,ca=a._Width,fa=a._Height;V*=b.scaleX;cc*=b.scaleY;ca*=b.scaleX;fa*=b.scaleY;!b.drawActor||null!=b.actor&&b.actor.isHUD||(b.x-=p.cameraX,b.y-=p.cameraY);0==b.strokeSize?b.graphics.lineStyle():b.graphics.lineStyle(b.strokeSize*p.SCALE,b.strokeColor,b.alpha);b.graphics.beginFill(b.fillColor,b.alpha);b.graphics.drawRect(b.x+V,b.y+cc,ca,fa);b.graphics.endFill();b.drawActor&&!b.actor.isHUD&&(b.x+=p.cameraX,b.y+=p.cameraY);b.graphics.lineStyle();b.alpha="Scene"==
a._Mode?1:a._FontOpacity/100;var ha=a._XVar,ia=a._YVar;null==b.font&&(b.font=b.defaultFont,b.font.fontScale!=p.SCALE&&(b.font.fontScale=p.SCALE));if(b.drawActor)if(null!=b.actor&&b.actor.isHUD){var De=b.x+ha*b.scaleX;var la=b.y+ia*b.scaleY}else De=b.x+ha*b.scaleX-p.cameraX,la=b.y+ia*b.scaleY-p.cameraY;else De=b.x+ha*b.scaleX,la=b.y+ia*b.scaleY;b.mtx.identity();b.mtx.translate(De,la);var ja=null,oa=b.font,ka="Scene:"+oa.ID+":"+b.alpha+":"+oa.letterSpacing+":"+p.SCALE,pa=ab.drawnStringCache;if(null!=
q[ka]?pa.existsReserved(ka):pa.h.hasOwnProperty(ka)){var qa=ab.drawnStringCache,ra=null!=q[ka]?qa.getReserved(ka):qa.h[ka];ra.lifetime=5;ja=ra.img}else{var Ed=b.font.font.getTextWidth("Scene",b.font.letterSpacing,b.font.fontScale),va=b.font.font.getFontHeight()*b.font.fontScale|0;if(0<Ed&&0<va){ja=new na(Ed,va,!0,0);b.font.font.renderToImg(ja,"Scene",0,b.alpha,0,0,b.font.letterSpacing,b.font.fontScale,0,!1);var Ja=new qf;Ja.img=ja;Ja.lifetime=5;var sa=ab.drawnStringCache;null!=q[ka]?sa.setReserved(ka,
Ja):sa.h[ka]=Ja;ab.drawnStringCacheKeys.push(ka)}}null!=ja&&(b.graphics.beginBitmapFill(ja,b.mtx,!1,ma.antialias),b.graphics.drawRect(De,la,ja.width,ja.height),b.graphics.endFill());a._XVar=a._ActorWidth+a._SceneWidth;var ua=b.font.getTextWidth("Game");a._GameWidth=ua/p.SCALE;a._Width=a._GameWidth;b.alpha=a._BackgoundOpacity/100;var ta=a._XVar,Ka=a._YVar,Wd=a._Width,wa=a._Height;ta*=b.scaleX;Ka*=b.scaleY;Wd*=b.scaleX;wa*=b.scaleY;!b.drawActor||null!=b.actor&&b.actor.isHUD||(b.x-=p.cameraX,b.y-=p.cameraY);
0==b.strokeSize?b.graphics.lineStyle():b.graphics.lineStyle(b.strokeSize*p.SCALE,b.strokeColor,b.alpha);b.graphics.beginFill(b.fillColor,b.alpha);b.graphics.drawRect(b.x+ta,b.y+Ka,Wd,wa);b.graphics.endFill();b.drawActor&&!b.actor.isHUD&&(b.x+=p.cameraX,b.y+=p.cameraY);b.graphics.lineStyle();b.alpha="Game"==a._Mode?1:a._FontOpacity/100;var Sa=a._XVar,ya=a._YVar;null==b.font&&(b.font=b.defaultFont,b.font.fontScale!=p.SCALE&&(b.font.fontScale=p.SCALE));if(b.drawActor)if(null!=b.actor&&b.actor.isHUD){var xa=
b.x+Sa*b.scaleX;var za=b.y+ya*b.scaleY}else xa=b.x+Sa*b.scaleX-p.cameraX,za=b.y+ya*b.scaleY-p.cameraY;else xa=b.x+Sa*b.scaleX,za=b.y+ya*b.scaleY;b.mtx.identity();b.mtx.translate(xa,za);var ed=null,pe=b.font,Ba="Game:"+pe.ID+":"+b.alpha+":"+pe.letterSpacing+":"+p.SCALE,Da=ab.drawnStringCache;if(null!=q[Ba]?Da.existsReserved(Ba):Da.h.hasOwnProperty(Ba)){var Ea=ab.drawnStringCache,Fa=null!=q[Ba]?Ea.getReserved(Ba):Ea.h[Ba];Fa.lifetime=5;ed=Fa.img}else{var Ha=b.font.font.getTextWidth("Game",b.font.letterSpacing,
b.font.fontScale),Ia=b.font.font.getFontHeight()*b.font.fontScale|0;if(0<Ha&&0<Ia){ed=new na(Ha,Ia,!0,0);b.font.font.renderToImg(ed,"Game",0,b.alpha,0,0,b.font.letterSpacing,b.font.fontScale,0,!1);var Ga=new qf;Ga.img=ed;Ga.lifetime=5;var La=ab.drawnStringCache;null!=q[Ba]?La.setReserved(Ba,Ga):La.h[Ba]=Ga;ab.drawnStringCacheKeys.push(Ba)}}null!=ed&&(b.graphics.beginBitmapFill(ed,b.mtx,!1,ma.antialias),b.graphics.drawRect(xa,za,ed.width,ed.height),b.graphics.endFill());if("Actor"==a._Mode){a._XVar=
0;a._YVar=2*a._Height;var Na=a._Actor;if(r.isPrimitive(Na)||("string"==typeof Na?""!=L.__cast(Na,String):null!=Na)){var Wa=b.font.getTextWidth(""+K.string(a._Actor));a._SelectedActorWidth=Wa/p.SCALE;a._Width=a._SelectedActorWidth;b.alpha=a._BackgoundOpacity/100;var Ra=a._XVar,Va=a._YVar,Xa=a._Width,Ma=a._Height;Ra*=b.scaleX;Va*=b.scaleY;Xa*=b.scaleX;Ma*=b.scaleY;!b.drawActor||null!=b.actor&&b.actor.isHUD||(b.x-=p.cameraX,b.y-=p.cameraY);0==b.strokeSize?b.graphics.lineStyle():b.graphics.lineStyle(b.strokeSize*
p.SCALE,b.strokeColor,b.alpha);b.graphics.beginFill(b.fillColor,b.alpha);b.graphics.drawRect(b.x+Ra,b.y+Va,Xa,Ma);b.graphics.endFill();b.drawActor&&!b.actor.isHUD&&(b.x+=p.cameraX,b.y+=p.cameraY);b.graphics.lineStyle();b.alpha=1;var Ta=""+K.string(a._Actor),Ua=a._XVar,Za=a._YVar;null==b.font&&(b.font=b.defaultFont,b.font.fontScale!=p.SCALE&&(b.font.fontScale=p.SCALE));if(b.drawActor)if(null!=b.actor&&b.actor.isHUD){var Ya=b.x+Ua*b.scaleX;var cb=b.y+Za*b.scaleY}else Ya=b.x+Ua*b.scaleX-p.cameraX,cb=
b.y+Za*b.scaleY-p.cameraY;else Ya=b.x+Ua*b.scaleX,cb=b.y+Za*b.scaleY;b.mtx.identity();b.mtx.translate(Ya,cb);var Qa=null,$a=b.font,Oa=Ta+":"+$a.ID+":"+b.alpha+":"+$a.letterSpacing+":"+p.SCALE,bb=ab.drawnStringCache;if(null!=q[Oa]?bb.existsReserved(Oa):bb.h.hasOwnProperty(Oa)){var rb=ab.drawnStringCache,eb=null!=q[Oa]?rb.getReserved(Oa):rb.h[Oa];eb.lifetime=5;Qa=eb.img}else{var fb=b.font.font.getTextWidth(Ta,b.font.letterSpacing,b.font.fontScale),gb=b.font.font.getFontHeight()*b.font.fontScale|0;if(0<
fb&&0<gb){Qa=new na(fb,gb,!0,0);b.font.font.renderToImg(Qa,Ta,0,b.alpha,0,0,b.font.letterSpacing,b.font.fontScale,0,!1);var db=new qf;db.img=Qa;db.lifetime=5;var hb=ab.drawnStringCache;null!=q[Oa]?hb.setReserved(Oa,db):hb.h[Oa]=db;ab.drawnStringCacheKeys.push(Oa)}}null!=Qa&&(b.graphics.beginBitmapFill(Qa,b.mtx,!1,ma.antialias),b.graphics.drawRect(Ya,cb,Qa.width,Qa.height),b.graphics.endFill())}else{var ib=b.font.getTextWidth("<Choose an Actor>");a._Width=ib/p.SCALE;b.alpha=a._BackgoundOpacity/100;
var jb=a._XVar,We=a._YVar,lb=a._Width,mb=a._Height;jb*=b.scaleX;We*=b.scaleY;lb*=b.scaleX;mb*=b.scaleY;!b.drawActor||null!=b.actor&&b.actor.isHUD||(b.x-=p.cameraX,b.y-=p.cameraY);0==b.strokeSize?b.graphics.lineStyle():b.graphics.lineStyle(b.strokeSize*p.SCALE,b.strokeColor,b.alpha);b.graphics.beginFill(b.fillColor,b.alpha);b.graphics.drawRect(b.x+jb,b.y+We,lb,mb);b.graphics.endFill();b.drawActor&&!b.actor.isHUD&&(b.x+=p.cameraX,b.y+=p.cameraY);b.graphics.lineStyle();b.alpha=a._FontOpacity/100;var nb=
a._XVar,pb=a._YVar;null==b.font&&(b.font=b.defaultFont,b.font.fontScale!=p.SCALE&&(b.font.fontScale=p.SCALE));if(b.drawActor)if(null!=b.actor&&b.actor.isHUD){var ob=b.x+nb*b.scaleX;var qb=b.y+pb*b.scaleY}else ob=b.x+nb*b.scaleX-p.cameraX,qb=b.y+pb*b.scaleY-p.cameraY;else ob=b.x+nb*b.scaleX,qb=b.y+pb*b.scaleY;b.mtx.identity();b.mtx.translate(ob,qb);var kb=null,sb=b.font,Wc="<Choose an Actor>:"+sb.ID+":"+b.alpha+":"+sb.letterSpacing+":"+p.SCALE,tb=ab.drawnStringCache;if(null!=q[Wc]?tb.existsReserved(Wc):
tb.h.hasOwnProperty(Wc)){var ub=ab.drawnStringCache,vb=null!=q[Wc]?ub.getReserved(Wc):ub.h[Wc];vb.lifetime=5;kb=vb.img}else{var xb=b.font.font.getTextWidth("<Choose an Actor>",b.font.letterSpacing,b.font.fontScale),yb=b.font.font.getFontHeight()*b.font.fontScale|0;if(0<xb&&0<yb){kb=new na(xb,yb,!0,0);b.font.font.renderToImg(kb,"<Choose an Actor>",0,b.alpha,0,0,b.font.letterSpacing,b.font.fontScale,0,!1);var wb=new qf;wb.img=kb;wb.lifetime=5;var Ab=ab.drawnStringCache;null!=q[Wc]?Ab.setReserved(Wc,
wb):Ab.h[Wc]=wb;ab.drawnStringCacheKeys.push(Wc)}}null!=kb&&(b.graphics.beginBitmapFill(kb,b.mtx,!1,ma.antialias),b.graphics.drawRect(ob,qb,kb.width,kb.height),b.graphics.endFill());if(0!=a._ActorList.length){a._YVar+=a._Height;for(var zb=a._MaxActorWidth=0,Bb=L.__cast(a._ActorList,Array);zb<Bb.length;){var Qb=Bb[zb];++zb;var Cb=a._MaxActorWidth,Hb=b.font.getTextWidth(" "+K.string(Qb))/p.SCALE;a._MaxActorWidth=Math.max(Cb,Hb)}a._Width=a._MaxActorWidth;for(var Eb=0,Gb=L.__cast(a._ActorList,Array);Eb<
Gb.length;){var Ib=Gb[Eb];++Eb;b.alpha=a._BackgoundOpacity/100;var Jb=a._XVar,Nb=a._YVar,Pb=a._Width,ig=a._Height;Jb*=b.scaleX;Nb*=b.scaleY;Pb*=b.scaleX;ig*=b.scaleY;!b.drawActor||null!=b.actor&&b.actor.isHUD||(b.x-=p.cameraX,b.y-=p.cameraY);0==b.strokeSize?b.graphics.lineStyle():b.graphics.lineStyle(b.strokeSize*p.SCALE,b.strokeColor,b.alpha);b.graphics.beginFill(b.fillColor,b.alpha);b.graphics.drawRect(b.x+Jb,b.y+Nb,Pb,ig);b.graphics.endFill();b.drawActor&&!b.actor.isHUD&&(b.x+=p.cameraX,b.y+=p.cameraY);
b.graphics.lineStyle();b.alpha=a._FontOpacity/100;var Lb=" "+K.string(Ib),Mb=a._XVar,Ob=a._YVar;null==b.font&&(b.font=b.defaultFont,b.font.fontScale!=p.SCALE&&(b.font.fontScale=p.SCALE));if(b.drawActor)if(null!=b.actor&&b.actor.isHUD){var Kb=b.x+Mb*b.scaleX;var id=b.y+Ob*b.scaleY}else Kb=b.x+Mb*b.scaleX-p.cameraX,id=b.y+Ob*b.scaleY-p.cameraY;else Kb=b.x+Mb*b.scaleX,id=b.y+Ob*b.scaleY;b.mtx.identity();b.mtx.translate(Kb,id);var Fb=null,Rb=b.font,Db=Lb+":"+Rb.ID+":"+b.alpha+":"+Rb.letterSpacing+":"+
p.SCALE,Sb=ab.drawnStringCache;if(null!=q[Db]?Sb.existsReserved(Db):Sb.h.hasOwnProperty(Db)){var Ub=ab.drawnStringCache,Vb=null!=q[Db]?Ub.getReserved(Db):Ub.h[Db];Vb.lifetime=5;Fb=Vb.img}else{var Wb=b.font.font.getTextWidth(Lb,b.font.letterSpacing,b.font.fontScale),Xb=b.font.font.getFontHeight()*b.font.fontScale|0;if(0<Wb&&0<Xb){Fb=new na(Wb,Xb,!0,0);b.font.font.renderToImg(Fb,Lb,0,b.alpha,0,0,b.font.letterSpacing,b.font.fontScale,0,!1);var oe=new qf;oe.img=Fb;oe.lifetime=5;var Zb=ab.drawnStringCache;
null!=q[Db]?Zb.setReserved(Db,oe):Zb.h[Db]=oe;ab.drawnStringCacheKeys.push(Db)}}null!=Fb&&(b.graphics.beginBitmapFill(Fb,b.mtx,!1,ma.antialias),b.graphics.drawRect(Kb,id,Fb.width,Fb.height),b.graphics.endFill());a._YVar+=a._Height}}}}var $b=null;if("Scene"!=a._Mode)if("Actor"==a._Mode){var Tb=a._Actor;var Yb=r.isPrimitive(Tb)?!0:"string"==typeof Tb?""!=L.__cast(Tb,String):null!=Tb}else Yb=!1;else Yb=!0;if(Yb){a._XVar=0;a._YVar+=a._Height;a._BehaviorList="Scene"==a._Mode?p.engine.behaviors.behaviors:
a._Actor.behaviors.behaviors;for(var bc=a._MaxBehaviorWidth=0,dc=L.__cast(a._BehaviorList,Array);bc<dc.length;){var gc=dc[bc];++bc;var hc=a._MaxBehaviorWidth,jc=b.font.getTextWidth(" "+K.string(gc.name))/p.SCALE;a._MaxBehaviorWidth=Math.max(hc,jc)}a._Width=a._MaxBehaviorWidth;if(""==a._Behavior)for(var fc=0,ic=L.__cast(a._BehaviorList,Array);fc<ic.length;){var oc=ic[fc];++fc;b.alpha=a._BackgoundOpacity/100;var kc=a._XVar,Md=a._YVar,rc=a._Width,sc=a._Height;kc*=b.scaleX;Md*=b.scaleY;rc*=b.scaleX;sc*=
b.scaleY;!b.drawActor||null!=b.actor&&b.actor.isHUD||(b.x-=p.cameraX,b.y-=p.cameraY);0==b.strokeSize?b.graphics.lineStyle():b.graphics.lineStyle(b.strokeSize*p.SCALE,b.strokeColor,b.alpha);b.graphics.beginFill(b.fillColor,b.alpha);b.graphics.drawRect(b.x+kc,b.y+Md,rc,sc);b.graphics.endFill();b.drawActor&&!b.actor.isHUD&&(b.x+=p.cameraX,b.y+=p.cameraY);b.graphics.lineStyle();b.alpha=a._FontOpacity/100;var mc=" "+K.string(oc.name),nc=a._XVar,pc=a._YVar;null==b.font&&(b.font=b.defaultFont,b.font.fontScale!=
p.SCALE&&(b.font.fontScale=p.SCALE));if(b.drawActor)if(null!=b.actor&&b.actor.isHUD){var Ve=b.x+nc*b.scaleX;var lc=b.y+pc*b.scaleY}else Ve=b.x+nc*b.scaleX-p.cameraX,lc=b.y+pc*b.scaleY-p.cameraY;else Ve=b.x+nc*b.scaleX,lc=b.y+pc*b.scaleY;b.mtx.identity();b.mtx.translate(Ve,lc);var ec=null,uc=b.font,ac=mc+":"+uc.ID+":"+b.alpha+":"+uc.letterSpacing+":"+p.SCALE,vc=ab.drawnStringCache;if(null!=q[ac]?vc.existsReserved(ac):vc.h.hasOwnProperty(ac)){var wc=ab.drawnStringCache,xc=null!=q[ac]?wc.getReserved(ac):
wc.h[ac];xc.lifetime=5;ec=xc.img}else{var yc=b.font.font.getTextWidth(mc,b.font.letterSpacing,b.font.fontScale),zc=b.font.font.getFontHeight()*b.font.fontScale|0;if(0<yc&&0<zc){ec=new na(yc,zc,!0,0);b.font.font.renderToImg(ec,mc,0,b.alpha,0,0,b.font.letterSpacing,b.font.fontScale,0,!1);var tc=new qf;tc.img=ec;tc.lifetime=5;var bd=ab.drawnStringCache;null!=q[ac]?bd.setReserved(ac,tc):bd.h[ac]=tc;ab.drawnStringCacheKeys.push(ac)}}null!=ec&&(b.graphics.beginBitmapFill(ec,b.mtx,!1,ma.antialias),b.graphics.drawRect(Ve,
lc,ec.width,ec.height),b.graphics.endFill());a._YVar+=a._Height}else{b.alpha=a._BackgoundOpacity/100;var Ec=a._XVar,Gc=a._YVar,Hc=a._Width,Ic=a._Height;Ec*=b.scaleX;Gc*=b.scaleY;Hc*=b.scaleX;Ic*=b.scaleY;!b.drawActor||null!=b.actor&&b.actor.isHUD||(b.x-=p.cameraX,b.y-=p.cameraY);0==b.strokeSize?b.graphics.lineStyle():b.graphics.lineStyle(b.strokeSize*p.SCALE,b.strokeColor,b.alpha);b.graphics.beginFill(b.fillColor,b.alpha);b.graphics.drawRect(b.x+Ec,b.y+Gc,Hc,Ic);b.graphics.endFill();b.drawActor&&
!b.actor.isHUD&&(b.x+=p.cameraX,b.y+=p.cameraY);b.graphics.lineStyle();b.alpha=1;var Cc=" "+a._Behavior,Dc=a._XVar,Fc=a._YVar;null==b.font&&(b.font=b.defaultFont,b.font.fontScale!=p.SCALE&&(b.font.fontScale=p.SCALE));if(b.drawActor)if(null!=b.actor&&b.actor.isHUD){var Ac=b.x+Dc*b.scaleX;var Bc=b.y+Fc*b.scaleY}else Ac=b.x+Dc*b.scaleX-p.cameraX,Bc=b.y+Fc*b.scaleY-p.cameraY;else Ac=b.x+Dc*b.scaleX,Bc=b.y+Fc*b.scaleY;b.mtx.identity();b.mtx.translate(Ac,Bc);var qc=null,Dd=b.font,Xe=Cc+":"+Dd.ID+":"+b.alpha+
":"+Dd.letterSpacing+":"+p.SCALE,Pc=ab.drawnStringCache;if(null!=q[Xe]?Pc.existsReserved(Xe):Pc.h.hasOwnProperty(Xe)){var Vd=ab.drawnStringCache,Qc=null!=q[Xe]?Vd.getReserved(Xe):Vd.h[Xe];Qc.lifetime=5;qc=Qc.img}else{var Sc=b.font.font.getTextWidth(Cc,b.font.letterSpacing,b.font.fontScale),Uc=b.font.font.getFontHeight()*b.font.fontScale|0;if(0<Sc&&0<Uc){qc=new na(Sc,Uc,!0,0);b.font.font.renderToImg(qc,Cc,0,b.alpha,0,0,b.font.letterSpacing,b.font.fontScale,0,!1);var Kc=new qf;Kc.img=qc;Kc.lifetime=
5;var Xc=ab.drawnStringCache;null!=q[Xe]?Xc.setReserved(Xe,Kc):Xc.h[Xe]=Kc;ab.drawnStringCacheKeys.push(Xe)}}null!=qc&&(b.graphics.beginBitmapFill(qc,b.mtx,!1,ma.antialias),b.graphics.drawRect(Ac,Bc,qc.width,qc.height),b.graphics.endFill());for(var Rc=0,Zc=L.__cast(a._BehaviorList,Array);Rc<Zc.length;){var $c=Zc[Rc];++Rc;if(a._Behavior==$c.name){$b=$c;break}}}}if("Game"!=a._Mode)if(""!=a._Behavior)if("Scene"!=a._Mode)if("Actor"==a._Mode){var Oc=a._Actor;var Jc=r.isPrimitive(Oc)?!0:"string"==typeof Oc?
""!=L.__cast(Oc,String):null!=Oc}else Jc=!1;else Jc=!0;else Jc=!1;else Jc=!0;if(Jc){if("Game"==a._Mode){a._AttributeList=[];for(var ad=p.engine.gameAttributes.keys();ad.hasNext();){var dd=ad.next();a._AttributeList.push(dd)}a._AttributeList.sort(function(a,b){return X.compare(a.toLowerCase(),b.toLowerCase())})}else a._AttributeList=Lc.array($b.attributes),a._AttributeList.sort(function(a,b){return X.compare(a.fullName.toLowerCase(),b.fullName.toLowerCase())});a._MaxAttributeWidth=0;for(var Vc=a._MaxValueWidth=
0,cd=L.__cast(a._AttributeList,Array);Vc<cd.length;){var Nc=cd[Vc];++Vc;a._Name="Game"==a._Mode?""+K.string(Nc):""+K.string(Nc.fullName);var fd=a._MaxAttributeWidth,gd=b.font.getTextWidth("  "+a._Name)/p.SCALE;a._MaxAttributeWidth=Math.max(fd,gd);if("Scene"==a._Mode){var hd=K.string(r.getValueForScene(a._Behavior,""+K.string(Nc.fieldName)));a._Value=""+hd}else if("Actor"==a._Mode){var kd=K.string(a._Actor.getValue(a._Behavior,""+K.string(Nc.fieldName)));a._Value=""+kd}else{var md=K.string(r.getGameAttribute(""+
K.string(Nc)));a._Value=""+md}var rd=a._MaxValueWidth,td=b.font.getTextWidth(" = "+a._Value)/p.SCALE;a._MaxValueWidth=Math.max(rd,td)}a._XVar=0;a._YVar+=a._Height;if(0==a._AttributeList.length){var vd=b.font.getTextWidth("  <No Attributes>");a._Width=vd/p.SCALE;b.alpha=a._BackgoundOpacity/100;var pd=a._XVar,qd=a._YVar,uh=a._Width,ud=a._Height;pd*=b.scaleX;qd*=b.scaleY;uh*=b.scaleX;ud*=b.scaleY;!b.drawActor||null!=b.actor&&b.actor.isHUD||(b.x-=p.cameraX,b.y-=p.cameraY);0==b.strokeSize?b.graphics.lineStyle():
b.graphics.lineStyle(b.strokeSize*p.SCALE,b.strokeColor,b.alpha);b.graphics.beginFill(b.fillColor,b.alpha);b.graphics.drawRect(b.x+pd,b.y+qd,uh,ud);b.graphics.endFill();b.drawActor&&!b.actor.isHUD&&(b.x+=p.cameraX,b.y+=p.cameraY);b.graphics.lineStyle();b.alpha=a._FontOpacity/100;var nd=a._XVar,od=a._YVar;null==b.font&&(b.font=b.defaultFont,b.font.fontScale!=p.SCALE&&(b.font.fontScale=p.SCALE));if(b.drawActor)if(null!=b.actor&&b.actor.isHUD){var jd=b.x+nd*b.scaleX;var ld=b.y+od*b.scaleY}else jd=b.x+
nd*b.scaleX-p.cameraX,ld=b.y+od*b.scaleY-p.cameraY;else jd=b.x+nd*b.scaleX,ld=b.y+od*b.scaleY;b.mtx.identity();b.mtx.translate(jd,ld);var Tc=null,yd=b.font,Mc="  <No Attributes>:"+yd.ID+":"+b.alpha+":"+yd.letterSpacing+":"+p.SCALE,Ad=ab.drawnStringCache;if(null!=q[Mc]?Ad.existsReserved(Mc):Ad.h.hasOwnProperty(Mc)){var Bd=ab.drawnStringCache,Cd=null!=q[Mc]?Bd.getReserved(Mc):Bd.h[Mc];Cd.lifetime=5;Tc=Cd.img}else{var Nd=b.font.font.getTextWidth("  <No Attributes>",b.font.letterSpacing,b.font.fontScale),
Od=b.font.font.getFontHeight()*b.font.fontScale|0;if(0<Nd&&0<Od){Tc=new na(Nd,Od,!0,0);b.font.font.renderToImg(Tc,"  <No Attributes>",0,b.alpha,0,0,b.font.letterSpacing,b.font.fontScale,0,!1);var Gd=new qf;Gd.img=Tc;Gd.lifetime=5;var Rd=ab.drawnStringCache;null!=q[Mc]?Rd.setReserved(Mc,Gd):Rd.h[Mc]=Gd;ab.drawnStringCacheKeys.push(Mc)}}null!=Tc&&(b.graphics.beginBitmapFill(Tc,b.mtx,!1,ma.antialias),b.graphics.drawRect(jd,ld,Tc.width,Tc.height),b.graphics.endFill())}else{a._Width=a._MaxAttributeWidth+
a._MaxValueWidth;for(var Kd=a._Index=0,Xd=L.__cast(a._AttributeList,Array);Kd<Xd.length;){var Hd=Xd[Kd];++Kd;a._Index+=1;if(!(a._Index<=a._Offset)){if(a._YVar+a._Height>r.getScreenHeight())break;a._Name="Game"==a._Mode?""+K.string(Hd):""+K.string(Hd.fullName);b.alpha=a._BackgoundOpacity/100;var Yd=a._XVar,Zd=a._YVar,$d=a._Width,ae=a._Height;Yd*=b.scaleX;Zd*=b.scaleY;$d*=b.scaleX;ae*=b.scaleY;!b.drawActor||null!=b.actor&&b.actor.isHUD||(b.x-=p.cameraX,b.y-=p.cameraY);0==b.strokeSize?b.graphics.lineStyle():
b.graphics.lineStyle(b.strokeSize*p.SCALE,b.strokeColor,b.alpha);b.graphics.beginFill(b.fillColor,b.alpha);b.graphics.drawRect(b.x+Yd,b.y+Zd,$d,ae);b.graphics.endFill();b.drawActor&&!b.actor.isHUD&&(b.x+=p.cameraX,b.y+=p.cameraY);b.graphics.lineStyle();b.alpha=a._FontOpacity/100;var Pd="  "+a._Name,Qd=a._XVar,Sd=a._YVar;null==b.font&&(b.font=b.defaultFont,b.font.fontScale!=p.SCALE&&(b.font.fontScale=p.SCALE));if(b.drawActor)if(null!=b.actor&&b.actor.isHUD){var Jd=b.x+Qd*b.scaleX;var Ld=b.y+Sd*b.scaleY}else Jd=
b.x+Qd*b.scaleX-p.cameraX,Ld=b.y+Sd*b.scaleY-p.cameraY;else Jd=b.x+Qd*b.scaleX,Ld=b.y+Sd*b.scaleY;b.mtx.identity();b.mtx.translate(Jd,Ld);var wd=null,ce=b.font,sd=Pd+":"+ce.ID+":"+b.alpha+":"+ce.letterSpacing+":"+p.SCALE,fe=ab.drawnStringCache;if(null!=q[sd]?fe.existsReserved(sd):fe.h.hasOwnProperty(sd)){var ie=ab.drawnStringCache,ke=null!=q[sd]?ie.getReserved(sd):ie.h[sd];ke.lifetime=5;wd=ke.img}else{var le=b.font.font.getTextWidth(Pd,b.font.letterSpacing,b.font.fontScale),me=b.font.font.getFontHeight()*
b.font.fontScale|0;if(0<le&&0<me){wd=new na(le,me,!0,0);b.font.font.renderToImg(wd,Pd,0,b.alpha,0,0,b.font.letterSpacing,b.font.fontScale,0,!1);var Td=new qf;Td.img=wd;Td.lifetime=5;var ne=ab.drawnStringCache;null!=q[sd]?ne.setReserved(sd,Td):ne.h[sd]=Td;ab.drawnStringCacheKeys.push(sd)}}null!=wd&&(b.graphics.beginBitmapFill(wd,b.mtx,!1,ma.antialias),b.graphics.drawRect(Jd,Ld,wd.width,wd.height),b.graphics.endFill());a._XVar=a._MaxAttributeWidth;if("Scene"==a._Mode){var se=K.string(r.getValueForScene(a._Behavior,
""+K.string(Hd.fieldName)));a._Value=""+se}else if("Actor"==a._Mode){var te=K.string(a._Actor.getValue(a._Behavior,""+K.string(Hd.fieldName)));a._Value=""+te}else{var ue=K.string(r.getGameAttribute(""+K.string(Hd)));a._Value=""+ue}var ge=" = "+a._Value,he=a._XVar,je=a._YVar;null==b.font&&(b.font=b.defaultFont,b.font.fontScale!=p.SCALE&&(b.font.fontScale=p.SCALE));if(b.drawActor)if(null!=b.actor&&b.actor.isHUD){var de=b.x+he*b.scaleX;var ee=b.y+je*b.scaleY}else de=b.x+he*b.scaleX-p.cameraX,ee=b.y+
je*b.scaleY-p.cameraY;else de=b.x+he*b.scaleX,ee=b.y+je*b.scaleY;b.mtx.identity();b.mtx.translate(de,ee);var Fd=null,we=b.font,zd=ge+":"+we.ID+":"+b.alpha+":"+we.letterSpacing+":"+p.SCALE,ye=ab.drawnStringCache;if(null!=q[zd]?ye.existsReserved(zd):ye.h.hasOwnProperty(zd)){var ze=ab.drawnStringCache,Be=null!=q[zd]?ze.getReserved(zd):ze.h[zd];Be.lifetime=5;Fd=Be.img}else{var Ee=b.font.font.getTextWidth(ge,b.font.letterSpacing,b.font.fontScale),Fe=b.font.font.getFontHeight()*b.font.fontScale|0;if(0<
Ee&&0<Fe){Fd=new na(Ee,Fe,!0,0);b.font.font.renderToImg(Fd,ge,0,b.alpha,0,0,b.font.letterSpacing,b.font.fontScale,0,!1);var re=new qf;re.img=Fd;re.lifetime=5;var Ge=ab.drawnStringCache;null!=q[zd]?Ge.setReserved(zd,re):Ge.h[zd]=re;ab.drawnStringCacheKeys.push(zd)}}null!=Fd&&(b.graphics.beginBitmapFill(Fd,b.mtx,!1,ma.antialias),b.graphics.drawRect(de,ee,Fd.width,Fd.height),b.graphics.endFill());a._XVar=0;a._YVar+=a._Height}}}a._Start="Scene"==a._Mode?3:"Actor"==a._Mode?4:2;var Me=Math.floor(r.getScreenHeight()/
a._Height);a._End=Me-1;a._MaxOffset=a._AttributeList.length-(a._End-a._Start)-1;if((a._Start+a._AttributeList.length)*a._Height>r.getScreenHeight()){a._XVar=0;b.alpha=1;if(0<a._Offset){a._YVar=a._Start*a._Height;var Ne=b.font.getTextWidth("^");a._Width=Ne/p.SCALE;var He=a._XVar,Ie=a._YVar,Je=a._Width,Ke=a._Height;He*=b.scaleX;Ie*=b.scaleY;Je*=b.scaleX;Ke*=b.scaleY;!b.drawActor||null!=b.actor&&b.actor.isHUD||(b.x-=p.cameraX,b.y-=p.cameraY);0==b.strokeSize?b.graphics.lineStyle():b.graphics.lineStyle(b.strokeSize*
p.SCALE,b.strokeColor,b.alpha);b.graphics.drawRect(b.x+He,b.y+Ie,Je,Ke);b.drawActor&&!b.actor.isHUD&&(b.x+=p.cameraX,b.y+=p.cameraY);b.graphics.lineStyle();var Ae=a._XVar,Ce=a._YVar;null==b.font&&(b.font=b.defaultFont,b.font.fontScale!=p.SCALE&&(b.font.fontScale=p.SCALE));if(b.drawActor)if(null!=b.actor&&b.actor.isHUD){var ve=b.x+Ae*b.scaleX;var xe=b.y+Ce*b.scaleY}else ve=b.x+Ae*b.scaleX-p.cameraX,xe=b.y+Ce*b.scaleY-p.cameraY;else ve=b.x+Ae*b.scaleX,xe=b.y+Ce*b.scaleY;b.mtx.identity();b.mtx.translate(ve,
xe);var Ud=null,Oe=b.font,Id="^:"+Oe.ID+":"+b.alpha+":"+Oe.letterSpacing+":"+p.SCALE,Qe=ab.drawnStringCache;if(null!=q[Id]?Qe.existsReserved(Id):Qe.h.hasOwnProperty(Id)){var Re=ab.drawnStringCache,Ue=null!=q[Id]?Re.getReserved(Id):Re.h[Id];Ue.lifetime=5;Ud=Ue.img}else{var Ye=b.font.font.getTextWidth("^",b.font.letterSpacing,b.font.fontScale),$e=b.font.font.getFontHeight()*b.font.fontScale|0;if(0<Ye&&0<$e){Ud=new na(Ye,$e,!0,0);b.font.font.renderToImg(Ud,"^",0,b.alpha,0,0,b.font.letterSpacing,b.font.fontScale,
0,!1);var Le=new qf;Le.img=Ud;Le.lifetime=5;var af=ab.drawnStringCache;null!=q[Id]?af.setReserved(Id,Le):af.h[Id]=Le;ab.drawnStringCacheKeys.push(Id)}}null!=Ud&&(b.graphics.beginBitmapFill(Ud,b.mtx,!1,ma.antialias),b.graphics.drawRect(ve,xe,Ud.width,Ud.height),b.graphics.endFill())}if(a._Offset<a._MaxOffset){a._YVar=a._End*a._Height;var gf=b.font.getTextWidth("v");a._Width=gf/p.SCALE;var bf=a._XVar,cf=a._YVar,df=a._Width,ef=a._Height;bf*=b.scaleX;cf*=b.scaleY;df*=b.scaleX;ef*=b.scaleY;!b.drawActor||
null!=b.actor&&b.actor.isHUD||(b.x-=p.cameraX,b.y-=p.cameraY);0==b.strokeSize?b.graphics.lineStyle():b.graphics.lineStyle(b.strokeSize*p.SCALE,b.strokeColor,b.alpha);b.graphics.drawRect(b.x+bf,b.y+cf,df,ef);b.drawActor&&!b.actor.isHUD&&(b.x+=p.cameraX,b.y+=p.cameraY);b.graphics.lineStyle();var Se=a._XVar,Te=a._YVar;null==b.font&&(b.font=b.defaultFont,b.font.fontScale!=p.SCALE&&(b.font.fontScale=p.SCALE));if(b.drawActor)if(null!=b.actor&&b.actor.isHUD){var mf=b.x+Se*b.scaleX;var Pe=b.y+Te*b.scaleY}else mf=
b.x+Se*b.scaleX-p.cameraX,Pe=b.y+Te*b.scaleY-p.cameraY;else mf=b.x+Se*b.scaleX,Pe=b.y+Te*b.scaleY;b.mtx.identity();b.mtx.translate(mf,Pe);var qe=null,ff=b.font,be="v:"+ff.ID+":"+b.alpha+":"+ff.letterSpacing+":"+p.SCALE,hf=ab.drawnStringCache;if(null!=q[be]?hf.existsReserved(be):hf.h.hasOwnProperty(be)){var jf=ab.drawnStringCache,kf=null!=q[be]?jf.getReserved(be):jf.h[be];kf.lifetime=5;qe=kf.img}else{var lf=b.font.font.getTextWidth("v",b.font.letterSpacing,b.font.fontScale),nf=b.font.font.getFontHeight()*
b.font.fontScale|0;if(0<lf&&0<nf){qe=new na(lf,nf,!0,0);b.font.font.renderToImg(qe,"v",0,b.alpha,0,0,b.font.letterSpacing,b.font.fontScale,0,!1);var Ze=new qf;Ze.img=qe;Ze.lifetime=5;var pf=ab.drawnStringCache;null!=q[be]?pf.setReserved(be,Ze):pf.h[be]=Ze;ab.drawnStringCacheKeys.push(be)}}null!=qe&&(b.graphics.beginBitmapFill(qe,b.mtx,!1,ma.antialias),b.graphics.drawRect(mf,Pe,qe.width,qe.height),b.graphics.endFill())}}}}}});this.addMousePressedListener(function(b){if(a.wrapper.enabled&&!a._Hidden)if(b=
r.getMouseY()/a._Height,a._Row=Math.floor(b),0==a._Row&&r.getMouseX()<a._InspectWidth)a._Activated=!a._Activated,a._Activated||(a._Mode="",a._Behavior="",a._Actor=r.getDefaultValue(a._Actor),a._Offset=0);else if(a._Activated){if(1==a._Row){r.getMouseX()<a._ActorWidth?("Actor"==a._Mode?(b=a._Actor,b=!(r.isPrimitive(b)||("string"==typeof b?""!=L.__cast(b,String):null!=b))&&0==a._ActorList.length):b=!1,b=!b):b=!1;if(b){a._Mode="Actor";a._ActorList.length=0;a._Actor=r.getDefaultValue(a._Actor);a._Behavior=
"";a._Offset=0;return}if(r.getMouseX()>=a._ActorWidth&&r.getMouseX()<a._ActorWidth+a._SceneWidth){a._Mode="Scene";a._ActorList.length=0;a._Actor=r.getDefaultValue(a._Actor);a._Behavior="";a._Offset=0;return}if(r.getMouseX()>=a._ActorWidth+a._SceneWidth&&r.getMouseX()<a._ActorWidth+a._SceneWidth+a._GameWidth){a._Mode="Game";a._ActorList.length=0;a._Actor=r.getDefaultValue(a._Actor);a._Behavior="";a._Offset=0;return}}"Scene"!=a._Mode?"Actor"==a._Mode?(b=a._Actor,b=r.isPrimitive(b)?!0:"string"==typeof b?
""!=L.__cast(b,String):null!=b):b=!1:b=!0;b&&(""==a._Behavior?(a._Item="Scene"==a._Mode?a._Row-2:a._Row-3,0<=a._Item&&a._Item<a._BehaviorList.length&&r.getMouseX()<a._MaxBehaviorWidth&&(a._Behavior=""+K.string(a._BehaviorList[a._Item|0].name))):("Scene"==a._Mode&&2==a._Row||"Actor"==a._Mode&&3==a._Row)&&r.getMouseX()<a._Font.getTextWidth(a._Behavior)/p.SCALE&&(a._Behavior="",a._Offset=0));"Game"!=a._Mode?""!=a._Behavior?"Scene"!=a._Mode?"Actor"==a._Mode?(b=a._Actor,b=r.isPrimitive(b)?!0:"string"==
typeof b?""!=L.__cast(b,String):null!=b):b=!1:b=!0:b=!1:b=!0;b&&(a._Row==a._Start&&r.getMouseX()<a._CharWidth?a._Offset=Math.max(0,a._Offset-1):a._Row==a._End&&r.getMouseX()<a._CharWidth&&(a._Offset=Math.min(a._MaxOffset,a._Offset+1)));if("Actor"==a._Mode)if(b=a._Actor,r.isPrimitive(b)||("string"==typeof b?""!=L.__cast(b,String):null!=b))2==a._Row&&r.getMouseX()<a._SelectedActorWidth&&(a._ActorList.length=0,a._Actor=r.getDefaultValue(a._Actor),a._Behavior="",a._Offset=0);else if(0==a._ActorList.length){a._ActorList.length=
0;r.engine.allActors.reuseIterator=!1;for(b=r.engine.allActors.iterator();b.hasNext();){var c=b.next();null==c||c.dead||c.recycled||!c.isOnScreenCache||c.isMouseOver()&&a._ActorList.push(c)}r.engine.allActors.reuseIterator=!0;1==a._ActorList.length&&(a._Actor=a._ActorList[0])}else a._Item=a._Row-3,0<=a._Item&&a._Item<a._ActorList.length&&r.getMouseX()<a._MaxActorWidth&&(a._Actor=a._ActorList[a._Item|0])}})},forwardMessage:function(a){},__class__:hs});var is=function(a,b){r.call(this);a=this.nameMap;
null!=q.Region?a.setReserved("Region","_Region"):a.h.Region="_Region";a=this.nameMap;null!=q.Scene?a.setReserved("Scene","_Scene"):a.h.Scene="_Scene";a=this.nameMap;null!=q["Region Scene List"]?a.setReserved("Region Scene List","_RegionSceneList"):a.h["Region Scene List"]="_RegionSceneList";a=this.nameMap;null!=q.Entry?a.setReserved("Entry","_Entry"):a.h.Entry="_Entry";a=this.nameMap;null!=q["Region ID"]?a.setReserved("Region ID","_RegionID"):a.h["Region ID"]="_RegionID";this._RegionID=0;a=this.nameMap;
null!=q["Scene Name"]?a.setReserved("Scene Name","_SceneName"):a.h["Scene Name"]="_SceneName";this._SceneName="";a=this.nameMap;null!=q.X?a.setReserved("X","_XVar"):a.h.X="_XVar";this._XVar=0;a=this.nameMap;null!=q.Y?a.setReserved("Y","_YVar"):a.h.Y="_YVar";this._YVar=0;a=this.nameMap;null!=q["Actor Type"]?a.setReserved("Actor Type","_ActorType"):a.h["Actor Type"]="_ActorType";a=this.nameMap;null!=q["Only Switch On Key Press"]?a.setReserved("Only Switch On Key Press","_OnlySwitchOnKeyPress"):a.h["Only Switch On Key Press"]=
"_OnlySwitchOnKeyPress";this._OnlySwitchOnKeyPress=!1;a=this.nameMap;null!=q["Switch Control"]?a.setReserved("Switch Control","_SwitchControl"):a.h["Switch Control"]="_SwitchControl";a=this.nameMap;null!=q["In Region"]?a.setReserved("In Region","_InRegion"):a.h["In Region"]="_InRegion";this._InRegion=!1;a=this.nameMap;null!=q.Done?a.setReserved("Done","_Done"):a.h.Done="_Done";this._Done=!1;a=this.nameMap;null!=q["Out Time"]?a.setReserved("Out Time","_OutTime"):a.h["Out Time"]="_OutTime";this._OutTime=
.5;a=this.nameMap;null!=q["In Time"]?a.setReserved("In Time","_InTime"):a.h["In Time"]="_InTime";this._InTime=.5;a=this.nameMap;null!=q["Transition Style"]?a.setReserved("Transition Style","_TransitionStyle"):a.h["Transition Style"]="_TransitionStyle";this._TransitionStyle=""};h["scripts.Design_51_51_RegionSceneSwitcher"]=is;is.__name__="scripts.Design_51_51_RegionSceneSwitcher";is.__super__=Na;is.prototype=w(Na.prototype,{_Region:null,_Scene:null,_RegionSceneList:null,_Entry:null,_RegionID:null,
_SceneName:null,_XVar:null,_YVar:null,_ActorType:null,_OnlySwitchOnKeyPress:null,_SwitchControl:null,_InRegion:null,_Done:null,_OutTime:null,_InTime:null,_TransitionStyle:null,_customEvent_SwitchScene:function(){if(!r.isTransitioning()){if(4<=this._Entry.length){var a=this._Entry[2];this._XVar=null==a?0:"number"==typeof a?L.__cast(a,rj):"number"==typeof a&&(a|0)===a?L.__cast(a,Hg):"boolean"==typeof a?L.__cast(a,sj)?1:0:"string"==typeof a?parseFloat(a):parseFloat(K.string(a));a=this._Entry[3];this._YVar=
null==a?0:"number"==typeof a?L.__cast(a,rj):"number"==typeof a&&(a|0)===a?L.__cast(a,Hg):"boolean"==typeof a?L.__cast(a,sj)?1:0:"string"==typeof a?parseFloat(a):parseFloat(K.string(a));r.createActorInNextScene(this._ActorType,this._XVar,this._YVar,0)}if("Fade"==this._TransitionStyle){a=Eb.get().scenes;var b=r.getIDForScene(this._SceneName);a=a.h[b].getID();var c=b=0,d=0;null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);b=r.createFadeOut(this._OutTime,b<<16|c<<8|d);var e=d=c=0;null==e&&(e=0);null==d&&(d=
0);null==c&&(c=0);r.switchScene(a,b,r.createFadeIn(this._InTime,c<<16|d<<8|e))}else"Blinds"==this._TransitionStyle?(a=Eb.get().scenes,b=r.getIDForScene(this._SceneName),a=a.h[b].getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),b=r.createBlindsOut(this._OutTime,b<<16|c<<8|d),e=d=c=0,null==e&&(e=0),null==d&&(d=0),null==c&&(c=0),r.switchScene(a,b,r.createBlindsIn(this._InTime,c<<16|d<<8|e))):"Bubbles"==this._TransitionStyle?(a=Eb.get().scenes,b=r.getIDForScene(this._SceneName),a=a.h[b].getID(),
d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),b=r.createBubblesOut(this._OutTime,b<<16|c<<8|d),e=d=c=0,null==e&&(e=0),null==d&&(d=0),null==c&&(c=0),r.switchScene(a,b,r.createBubblesIn(this._InTime,c<<16|d<<8|e))):"Spotlight"==this._TransitionStyle?(a=Eb.get().scenes,b=r.getIDForScene(this._SceneName),a=a.h[b].getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),b=r.createCircleOut(this._OutTime,b<<16|c<<8|d),e=d=c=0,null==e&&(e=0),null==d&&(d=0),null==c&&(c=0),r.switchScene(a,b,r.createCircleIn(this._InTime,
c<<16|d<<8|e))):"Blur"==this._TransitionStyle?(a=Eb.get().scenes,b=r.getIDForScene(this._SceneName),a=a.h[b].getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),b=r.createPixelizeOut(this._OutTime,b<<16|c<<8|d),e=d=c=0,null==e&&(e=0),null==d&&(d=0),null==c&&(c=0),r.switchScene(a,b,r.createPixelizeIn(this._InTime,c<<16|d<<8|e))):"Box"==this._TransitionStyle?(a=Eb.get().scenes,b=r.getIDForScene(this._SceneName),a=a.h[b].getID(),d=c=b=0,null==d&&(d=0),null==c&&(c=0),null==b&&(b=0),b=r.createRectangleOut(this._OutTime,
b<<16|c<<8|d),e=d=c=0,null==e&&(e=0),null==d&&(d=0),null==c&&(c=0),r.switchScene(a,b,r.createRectangleIn(this._InTime,c<<16|d<<8|e))):"Crossfade"==this._TransitionStyle?(a=Eb.get().scenes,b=r.getIDForScene(this._SceneName),r.switchScene(a.h[b].getID(),null,r.createCrossfadeTransition(this._OutTime))):"Slide Up"==this._TransitionStyle?(a=Eb.get().scenes,b=r.getIDForScene(this._SceneName),r.switchScene(a.h[b].getID(),null,r.createSlideUpTransition(this._OutTime))):"Slide Down"==this._TransitionStyle?
(a=Eb.get().scenes,b=r.getIDForScene(this._SceneName),r.switchScene(a.h[b].getID(),null,r.createSlideDownTransition(this._OutTime))):"Slide Left"==this._TransitionStyle?(a=Eb.get().scenes,b=r.getIDForScene(this._SceneName),r.switchScene(a.h[b].getID(),null,r.createSlideLeftTransition(this._OutTime))):"Slide Right"==this._TransitionStyle&&(a=Eb.get().scenes,b=r.getIDForScene(this._SceneName),r.switchScene(a.h[b].getID(),null,r.createSlideRightTransition(this._OutTime)))}},init:function(){var a=this;
this.addWhenUpdatedListener(null,function(b,c){if(a.wrapper.enabled&&(a._InRegion=!1,b=a._ActorType,(r.isPrimitive(b)||("string"==typeof b?""!=L.__cast(b,String):null!=b))&&!r.isTransitioning()))for(b=0,c=r.getActorsOfType(a._ActorType);b<c.length;){var d=c[b];++b;if(null!=d&&!d.dead&&!d.recycled){for(var e=0,f=L.__cast(a._RegionSceneList,Array);e<f.length;){var g=f[e];++e;a._Entry=(""+K.string(g)).split(",");if(2<=a._Entry.length&&(g=a._Entry[0],g=null==g?0:"number"==typeof g?L.__cast(g,rj):"number"==
typeof g&&(g|0)===g?L.__cast(g,Hg):"boolean"==typeof g?L.__cast(g,sj)?1:0:"string"==typeof g?parseFloat(g):parseFloat(K.string(g)),a._RegionID=g,a._SceneName=""+K.string(a._Entry[1]),a._Region=r.engine.getRegion(a._RegionID|0),r.isInRegion(d,a._Region))){a._OnlySwitchOnKeyPress?a._InRegion=!0:a._customEvent_SwitchScene();a._Done=!0;break}}if(a._Done)break}}});this.addKeyStateListener(this._SwitchControl,function(b,c,d){a.wrapper.enabled&&b&&a._OnlySwitchOnKeyPress&&a._InRegion&&a._customEvent_SwitchScene()})},
forwardMessage:function(a){},__class__:is});var rh=function(a,b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor","actor"):a.h.Actor="actor";a=this.nameMap;null!=q["Normal Animation"]?a.setReserved("Normal Animation","_NormalAnimation"):a.h["Normal Animation"]="_NormalAnimation";a=this.nameMap;null!=q["Pressed Animation"]?a.setReserved("Pressed Animation","_PressedAnimation"):a.h["Pressed Animation"]="_PressedAnimation";a=this.nameMap;null!=q.Control?a.setReserved("Control","_Control"):
a.h.Control="_Control";a=this.nameMap;null!=q["Show Only in Mobile Games"]?a.setReserved("Show Only in Mobile Games","_ShowOnlyinMobileGames"):a.h["Show Only in Mobile Games"]="_ShowOnlyinMobileGames";this._ShowOnlyinMobileGames=!1;a=this.nameMap;null!=q.Down?a.setReserved("Down","_Down"):a.h.Down="_Down";this._Down=!1;a=this.nameMap;null!=q["Allow Slide"]?a.setReserved("Allow Slide","_AllowSlide"):a.h["Allow Slide"]="_AllowSlide";this._AllowSlide=!1;a=this.nameMap;null!=q["Hover Animation"]?a.setReserved("Hover Animation",
"_HoverAnimation"):a.h["Hover Animation"]="_HoverAnimation";a=this.nameMap;null!=q["Touching IDs"]?a.setReserved("Touching IDs","_TouchingIDs"):a.h["Touching IDs"]="_TouchingIDs";a=this.nameMap;null!=q["On Self"]?a.setReserved("On Self","_OnSelf"):a.h["On Self"]="_OnSelf";this._OnSelf=!1;a=this.nameMap;null!=q["Was Touching"]?a.setReserved("Was Touching","_WasTouching"):a.h["Was Touching"]="_WasTouching";this._WasTouching=!1;a=this.nameMap;null!=q["Enable Multi-Touch"]?a.setReserved("Enable Multi-Touch",
"_EnableMultiTouch"):a.h["Enable Multi-Touch"]="_EnableMultiTouch";this._EnableMultiTouch=!0;a=this.nameMap;null!=q["Button Name"]?a.setReserved("Button Name","_ButtonName"):a.h["Button Name"]="_ButtonName";this._ButtonName=""};h["scripts.Design_52_52_OnScreenButton"]=rh;rh.__name__="scripts.Design_52_52_OnScreenButton";rh.__super__=ja;rh.prototype=w(ja.prototype,{_NormalAnimation:null,_PressedAnimation:null,_Control:null,_ShowOnlyinMobileGames:null,_Down:null,_AllowSlide:null,_HoverAnimation:null,
_TouchingIDs:null,_OnSelf:null,_WasTouching:null,_EnableMultiTouch:null,_ButtonName:null,init:function(){var a=this;""==this._ButtonName&&(this._ButtonName=""+K.string(this.actor.getType()));null==rh.touchMap&&(rh.touchMap=new ua);var b=this._ButtonName,c=rh.touchMap;if(null!=q[b]?!c.existsReserved(b):!c.h.hasOwnProperty(b)){b=this._ButtonName;c=[];var d=rh.touchMap;null!=q[b]?d.setReserved(b,c):d.h[b]=c}this.actor.anchorToScreen();this.actor.setAnimation(this._NormalAnimation);this._ShowOnlyinMobileGames&&
r.recycleActor(this.actor);this.addMouseOverActorListener(this.actor,function(b,c){a.wrapper.enabled&&3==b&&(r.simulateKeyPress(a._Control),a.actor.setAnimation(a._PressedAnimation),a._Down=!0)});this.addMouseOverActorListener(this.actor,function(b,c){a.wrapper.enabled&&5==b&&a._Down&&(r.simulateKeyRelease(a._Control),a.actor.setAnimation(a._HoverAnimation),a._Down=!1)});this.addMouseOverActorListener(this.actor,function(b,c){a.wrapper.enabled&&1==b&&(a._AllowSlide&&r.isMouseDown()?(r.simulateKeyPress(a._Control),
a.actor.setAnimation(a._PressedAnimation),a._Down=!0):a.actor.setAnimation(a._HoverAnimation))});this.addMouseOverActorListener(this.actor,function(b,c){a.wrapper.enabled&&-1==b&&(a._AllowSlide&&a._Down&&r.simulateKeyRelease(a._Control),a.actor.setAnimation(a._NormalAnimation),a._Down=!1)});this.addMultiTouchStartListener(function(b,c){if(a.wrapper.enabled&&a._EnableMultiTouch){c=a._ButtonName;var d=rh.touchMap;c=null!=q[c]?d.getReserved(c):d.h[c];a._TouchingIDs=c;B.remove(a._TouchingIDs,b.touchPointID);
c=(b.stageX-p.screenOffsetX)/(p.screenScaleX*p.SCALE)>a.actor.getX()&&(b.stageX-p.screenOffsetX)/(p.screenScaleX*p.SCALE)<a.actor.getX()+a.actor.getWidth()&&(b.stageY-p.screenOffsetY)/(p.screenScaleY*p.SCALE)>a.actor.getY()&&(b.stageY-p.screenOffsetY)/(p.screenScaleY*p.SCALE)<a.actor.getY()+a.actor.getHeight();a._OnSelf=c;a._OnSelf&&(r.simulateKeyPress(a._Control),a.actor.setAnimation(a._PressedAnimation),a._TouchingIDs.push(b.touchPointID))}});this.addMultiTouchMoveListener(function(b,c){if(a.wrapper.enabled&&
a._EnableMultiTouch){c=a._ButtonName;var d=rh.touchMap;c=null!=q[c]?d.getReserved(c):d.h[c];a._TouchingIDs=c;c=(b.stageX-p.screenOffsetX)/(p.screenScaleX*p.SCALE)>a.actor.getX()&&(b.stageX-p.screenOffsetX)/(p.screenScaleX*p.SCALE)<a.actor.getX()+a.actor.getWidth()&&(b.stageY-p.screenOffsetY)/(p.screenScaleY*p.SCALE)>a.actor.getY()&&(b.stageY-p.screenOffsetY)/(p.screenScaleY*p.SCALE)<a.actor.getY()+a.actor.getHeight();a._OnSelf=c;a._WasTouching=T.contains(a._TouchingIDs,b.touchPointID);a._OnSelf&&
!a._WasTouching&&a._AllowSlide?(r.simulateKeyPress(a._Control),a.actor.setAnimation(a._PressedAnimation),a._TouchingIDs.push(b.touchPointID)):!a._OnSelf&&a._WasTouching&&(a._AllowSlide&&r.simulateKeyRelease(a._Control),a.actor.setAnimation(a._NormalAnimation),B.remove(a._TouchingIDs,b.touchPointID))}});this.addMultiTouchEndListener(function(b,c){if(a.wrapper.enabled&&a._EnableMultiTouch){c=a._ButtonName;var d=rh.touchMap;c=null!=q[c]?d.getReserved(c):d.h[c];a._TouchingIDs=c;c=(b.stageX-p.screenOffsetX)/
(p.screenScaleX*p.SCALE)>a.actor.getX()&&(b.stageX-p.screenOffsetX)/(p.screenScaleX*p.SCALE)<a.actor.getX()+a.actor.getWidth()&&(b.stageY-p.screenOffsetY)/(p.screenScaleY*p.SCALE)>a.actor.getY()&&(b.stageY-p.screenOffsetY)/(p.screenScaleY*p.SCALE)<a.actor.getY()+a.actor.getHeight();a._OnSelf=c;a._WasTouching=T.contains(a._TouchingIDs,b.touchPointID);(a._OnSelf||a._AllowSlide)&&a._WasTouching&&(r.simulateKeyRelease(a._Control),B.remove(a._TouchingIDs,b.touchPointID),a.actor.setAnimation(a._NormalAnimation))}})},
forwardMessage:function(a){},__class__:rh});var js=function(a,b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor","actor"):a.h.Actor="actor";a=this.nameMap;null!=q["Normal Animation"]?a.setReserved("Normal Animation","_NormalAnimation"):a.h["Normal Animation"]="_NormalAnimation";a=this.nameMap;null!=q["Pressed Animation"]?a.setReserved("Pressed Animation","_PressedAnimation"):a.h["Pressed Animation"]="_PressedAnimation";a=this.nameMap;null!=q.Down?a.setReserved("Down","_Down"):
a.h.Down="_Down";this._Down=!1;a=this.nameMap;null!=q["Hover Animation"]?a.setReserved("Hover Animation","_HoverAnimation"):a.h["Hover Animation"]="_HoverAnimation";a=this.nameMap;null!=q.Message?a.setReserved("Message","_Message"):a.h.Message="_Message";this._Message=""};h["scripts.Design_53_53_ThreeStateButton"]=js;js.__name__="scripts.Design_53_53_ThreeStateButton";js.__super__=ja;js.prototype=w(ja.prototype,{_NormalAnimation:null,_PressedAnimation:null,_Down:null,_HoverAnimation:null,_Message:null,
_customEvent_Action:function(){this.actor.shout("_customEvent_"+this._Message)},init:function(){var a=this;this.actor.anchorToScreen();this.addMouseOverActorListener(this.actor,function(b,c){a.wrapper.enabled&&3==b&&(a.actor.setAnimation(a._PressedAnimation),a._Down=!0)});this.addMouseOverActorListener(this.actor,function(b,c){a.wrapper.enabled&&5==b&&(a._Down&&a._customEvent_Action(),a.actor.setAnimation(a._HoverAnimation),a._Down=!1)});this.addMouseOverActorListener(this.actor,function(b,c){a.wrapper.enabled&&
1==b&&a.actor.setAnimation(a._HoverAnimation)});this.addMouseOverActorListener(this.actor,function(b,c){a.wrapper.enabled&&-1==b&&(a.actor.setAnimation(a._NormalAnimation),a._Down=!1)})},forwardMessage:function(a){},__class__:js});var ks=function(a,b,c){ja.call(this,b);a=this.nameMap;null!=q.Actor?a.setReserved("Actor","actor"):a.h.Actor="actor";a=this.nameMap;null!=q["Left Control"]?a.setReserved("Left Control","_LeftControl"):a.h["Left Control"]="_LeftControl";a=this.nameMap;null!=q["Right Control"]?
a.setReserved("Right Control","_RightControl"):a.h["Right Control"]="_RightControl";a=this.nameMap;null!=q.Move?a.setReserved("Move","_Move"):a.h.Move="_Move";this._Move=0;a=this.nameMap;null!=q["Use Controls"]?a.setReserved("Use Controls","_UseControls"):a.h["Use Controls"]="_UseControls";this._UseControls=!0;a=this.nameMap;null!=q["Jump Control"]?a.setReserved("Jump Control","_JumpControl"):a.h["Jump Control"]="_JumpControl";a=this.nameMap;null!=q.Jump?a.setReserved("Jump","_Jump"):a.h.Jump="_Jump";
this._Jump=!1;a=this.nameMap;null!=q["On Ground"]?a.setReserved("On Ground","_OnGround"):a.h["On Ground"]="_OnGround";this._OnGround=!1;a=this.nameMap;null!=q["Maximum Running Speed"]?a.setReserved("Maximum Running Speed","_MaximumRunningSpeed"):a.h["Maximum Running Speed"]="_MaximumRunningSpeed";this._MaximumRunningSpeed=15;a=this.nameMap;null!=q["Jumping Force"]?a.setReserved("Jumping Force","_JumpingForce"):a.h["Jumping Force"]="_JumpingForce";this._JumpingForce=25;a=this.nameMap;null!=q["Run Right Animation"]?
a.setReserved("Run Right Animation","_RunRightAnimation"):a.h["Run Right Animation"]="_RunRightAnimation";a=this.nameMap;null!=q["Run Left Animation"]?a.setReserved("Run Left Animation","_RunLeftAnimation"):a.h["Run Left Animation"]="_RunLeftAnimation";a=this.nameMap;null!=q["Idle Right Animation"]?a.setReserved("Idle Right Animation","_IdleRightAnimation"):a.h["Idle Right Animation"]="_IdleRightAnimation";a=this.nameMap;null!=q["Idle Left Animation"]?a.setReserved("Idle Left Animation","_IdleLeftAnimation"):
a.h["Idle Left Animation"]="_IdleLeftAnimation";a=this.nameMap;null!=q.Jumping?a.setReserved("Jumping","_Jumping"):a.h.Jumping="_Jumping";this._Jumping=!1;a=this.nameMap;null!=q["Jump Right Animation"]?a.setReserved("Jump Right Animation","_JumpRightAnimation"):a.h["Jump Right Animation"]="_JumpRightAnimation";a=this.nameMap;null!=q["Jump Left Animation"]?a.setReserved("Jump Left Animation","_JumpLeftAnimation"):a.h["Jump Left Animation"]="_JumpLeftAnimation";a=this.nameMap;null!=q["Facing Left"]?
a.setReserved("Facing Left","_FacingLeft"):a.h["Facing Left"]="_FacingLeft";this._FacingLeft=!1;a=this.nameMap;null!=q["Jump Animation When Falling"]?a.setReserved("Jump Animation When Falling","_JumpAnimationWhenFalling"):a.h["Jump Animation When Falling"]="_JumpAnimationWhenFalling";this._JumpAnimationWhenFalling=!1;a=this.nameMap;null!=q["Jump Higher"]?a.setReserved("Jump Higher","_JumpHigher"):a.h["Jump Higher"]="_JumpHigher";this._JumpHigher=!1;a=this.nameMap;null!=q["Was Jump"]?a.setReserved("Was Jump",
"_WasJump"):a.h["Was Jump"]="_WasJump";this._WasJump=!1;a=this.nameMap;null!=q["Variable Jump"]?a.setReserved("Variable Jump","_VariableJump"):a.h["Variable Jump"]="_VariableJump";this._VariableJump=!1;a=this.nameMap;null!=q["Variable Jump Duration"]?a.setReserved("Variable Jump Duration","_VariableJumpDuration"):a.h["Variable Jump Duration"]="_VariableJumpDuration";this._VariableJumpDuration=.2;a=this.nameMap;null!=q["Running Force"]?a.setReserved("Running Force","_RunningForce"):a.h["Running Force"]=
"_RunningForce";this._RunningForce=50};h["scripts.Design_9_9_JumpandRunMovement"]=ks;ks.__name__="scripts.Design_9_9_JumpandRunMovement";ks.__super__=ja;ks.prototype=w(ja.prototype,{_LeftControl:null,_RightControl:null,_Move:null,_UseControls:null,_JumpControl:null,_Jump:null,_OnGround:null,_MaximumRunningSpeed:null,_JumpingForce:null,_RunRightAnimation:null,_RunLeftAnimation:null,_IdleRightAnimation:null,_IdleLeftAnimation:null,_Jumping:null,_JumpRightAnimation:null,_JumpLeftAnimation:null,_FacingLeft:null,
_JumpAnimationWhenFalling:null,_JumpHigher:null,_WasJump:null,_VariableJump:null,_VariableJumpDuration:null,_RunningForce:null,_customEvent_MoveLeft:function(){this._Move=-1},_customEvent_MoveRight:function(){this._Move=1},_customEvent_Jump:function(){this._JumpHigher=this._Jump=!0},init:function(){var a=this;this.addWhenUpdatedListener(null,function(b,c){a.wrapper.enabled&&(a._UseControls&&(b=r.isKeyDown(a._RightControl),b=null==b?0:"number"==typeof b?L.__cast(b,rj):"number"==typeof b&&(b|0)===b?
L.__cast(b,Hg):"boolean"==typeof b?L.__cast(b,sj)?1:0:"string"==typeof b?parseFloat(b):parseFloat(K.string(b)),c=r.isKeyDown(a._LeftControl),c=null==c?0:"number"==typeof c?L.__cast(c,rj):"number"==typeof c&&(c|0)===c?L.__cast(c,Hg):"boolean"==typeof c?L.__cast(c,sj)?1:0:"string"==typeof c?parseFloat(c):parseFloat(K.string(c)),a._Move=b-c,a._Jump=r.isKeyPressed(a._JumpControl)),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._VariableJump?(a._JumpHigher=!0,r.runLater(1E3*a._VariableJumpDuration,function(b){a._JumpHigher=!1;a._Jumping||(a._JumpHigher=!1,b.repeats=!1)},a.actor)):a.actor.applyImpulse(0,-1,a._JumpingForce)),a._JumpHigher&&r.isKeyDown(a._JumpControl)&&a.actor.applyImpulse(0,-1,a._JumpingForce/r.getStepSize()),-1==a._Move?a._FacingLeft=!0:1==a._Move&&(a._FacingLeft=!1),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=0,a._WasJump=a._Jump,a._Jump=!1,a._OnGround=!1)});this.addCollisionListener(this.actor,function(b,c){a.wrapper.enabled&&(b.thisFromBottom&&!b.thisCollidedWithSensor&&
(a._OnGround=!0),a._OnGround&&!a._WasJump&&(a._Jumping=!1))})},forwardMessage:function(a){},__class__:ks});var nu=function(){};h["scripts.MyScripts"]=nu;nu.__name__="scripts.MyScripts";var ls=function(a,b){r.call(this)};h["scripts.SceneEvents_0"]=ls;ls.__name__="scripts.SceneEvents_0";ls.__super__=Na;ls.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:ls});var ms=function(a,b){r.call(this)};h["scripts.SceneEvents_11"]=ms;ms.__name__="scripts.SceneEvents_11";ms.__super__=
Na;ms.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:ms});var ns=function(a,b){r.call(this)};h["scripts.SceneEvents_12"]=ns;ns.__name__="scripts.SceneEvents_12";ns.__super__=Na;ns.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:ns});var os=function(a,b){r.call(this)};h["scripts.SceneEvents_16"]=os;os.__name__="scripts.SceneEvents_16";os.__super__=Na;os.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:os});
var ps=function(a,b){r.call(this)};h["scripts.SceneEvents_17"]=ps;ps.__name__="scripts.SceneEvents_17";ps.__super__=Na;ps.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:ps});var qs=function(a,b){r.call(this)};h["scripts.SceneEvents_18"]=qs;qs.__name__="scripts.SceneEvents_18";qs.__super__=Na;qs.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:qs});var rs=function(a,b){r.call(this)};h["scripts.SceneEvents_19"]=rs;rs.__name__="scripts.SceneEvents_19";
rs.__super__=Na;rs.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:rs});var ss=function(a,b){r.call(this)};h["scripts.SceneEvents_21"]=ss;ss.__name__="scripts.SceneEvents_21";ss.__super__=Na;ss.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:ss});var ts=function(a,b){r.call(this)};h["scripts.SceneEvents_22"]=ts;ts.__name__="scripts.SceneEvents_22";ts.__super__=Na;ts.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},
__class__:ts});var us=function(a,b){r.call(this)};h["scripts.SceneEvents_23"]=us;us.__name__="scripts.SceneEvents_23";us.__super__=Na;us.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:us});var vs=function(a,b){r.call(this)};h["scripts.SceneEvents_24"]=vs;vs.__name__="scripts.SceneEvents_24";vs.__super__=Na;vs.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:vs});var ws=function(a,b){r.call(this)};h["scripts.SceneEvents_26"]=ws;
ws.__name__="scripts.SceneEvents_26";ws.__super__=Na;ws.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:ws});var xs=function(a,b){r.call(this)};h["scripts.SceneEvents_27"]=xs;xs.__name__="scripts.SceneEvents_27";xs.__super__=Na;xs.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:xs});var ys=function(a,b){r.call(this)};h["scripts.SceneEvents_28"]=ys;ys.__name__="scripts.SceneEvents_28";ys.__super__=Na;ys.prototype=w(Na.prototype,
{init:function(){},forwardMessage:function(a){},__class__:ys});var zs=function(a,b){r.call(this)};h["scripts.SceneEvents_29"]=zs;zs.__name__="scripts.SceneEvents_29";zs.__super__=Na;zs.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:zs});var As=function(a,b){r.call(this)};h["scripts.SceneEvents_30"]=As;As.__name__="scripts.SceneEvents_30";As.__super__=Na;As.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:As});var Bs=function(a,
b){r.call(this)};h["scripts.SceneEvents_31"]=Bs;Bs.__name__="scripts.SceneEvents_31";Bs.__super__=Na;Bs.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:Bs});var Cs=function(a,b){r.call(this)};h["scripts.SceneEvents_33"]=Cs;Cs.__name__="scripts.SceneEvents_33";Cs.__super__=Na;Cs.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:Cs});var Ds=function(a,b){r.call(this)};h["scripts.SceneEvents_34"]=Ds;Ds.__name__="scripts.SceneEvents_34";
Ds.__super__=Na;Ds.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:Ds});var Es=function(a,b){r.call(this)};h["scripts.SceneEvents_35"]=Es;Es.__name__="scripts.SceneEvents_35";Es.__super__=Na;Es.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:Es});var Fs=function(a,b){r.call(this)};h["scripts.SceneEvents_36"]=Fs;Fs.__name__="scripts.SceneEvents_36";Fs.__super__=Na;Fs.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},
__class__:Fs});var Gs=function(a,b){r.call(this)};h["scripts.SceneEvents_37"]=Gs;Gs.__name__="scripts.SceneEvents_37";Gs.__super__=Na;Gs.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:Gs});var Hs=function(a,b){r.call(this)};h["scripts.SceneEvents_38"]=Hs;Hs.__name__="scripts.SceneEvents_38";Hs.__super__=Na;Hs.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:Hs});var Is=function(a,b){r.call(this)};h["scripts.SceneEvents_39"]=Is;
Is.__name__="scripts.SceneEvents_39";Is.__super__=Na;Is.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:Is});var Js=function(a,b){r.call(this)};h["scripts.SceneEvents_4"]=Js;Js.__name__="scripts.SceneEvents_4";Js.__super__=Na;Js.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:Js});var Ks=function(a,b){r.call(this)};h["scripts.SceneEvents_40"]=Ks;Ks.__name__="scripts.SceneEvents_40";Ks.__super__=Na;Ks.prototype=w(Na.prototype,{init:function(){},
forwardMessage:function(a){},__class__:Ks});var Ls=function(a,b){r.call(this)};h["scripts.SceneEvents_41"]=Ls;Ls.__name__="scripts.SceneEvents_41";Ls.__super__=Na;Ls.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:Ls});var Ms=function(a,b){r.call(this)};h["scripts.SceneEvents_42"]=Ms;Ms.__name__="scripts.SceneEvents_42";Ms.__super__=Na;Ms.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:Ms});var Ns=function(a,b){r.call(this)};h["scripts.SceneEvents_43"]=
Ns;Ns.__name__="scripts.SceneEvents_43";Ns.__super__=Na;Ns.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:Ns});var Os=function(a,b){r.call(this)};h["scripts.SceneEvents_44"]=Os;Os.__name__="scripts.SceneEvents_44";Os.__super__=Na;Os.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:Os});var Ps=function(a,b){r.call(this)};h["scripts.SceneEvents_45"]=Ps;Ps.__name__="scripts.SceneEvents_45";Ps.__super__=Na;Ps.prototype=w(Na.prototype,
{init:function(){},forwardMessage:function(a){},__class__:Ps});var Qs=function(a,b){r.call(this)};h["scripts.SceneEvents_46"]=Qs;Qs.__name__="scripts.SceneEvents_46";Qs.__super__=Na;Qs.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:Qs});var Rs=function(a,b){r.call(this)};h["scripts.SceneEvents_47"]=Rs;Rs.__name__="scripts.SceneEvents_47";Rs.__super__=Na;Rs.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:Rs});var Ss=function(a,
b){r.call(this)};h["scripts.SceneEvents_48"]=Ss;Ss.__name__="scripts.SceneEvents_48";Ss.__super__=Na;Ss.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:Ss});var Ts=function(a,b){r.call(this)};h["scripts.SceneEvents_49"]=Ts;Ts.__name__="scripts.SceneEvents_49";Ts.__super__=Na;Ts.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:Ts});var Us=function(a,b){r.call(this)};h["scripts.SceneEvents_50"]=Us;Us.__name__="scripts.SceneEvents_50";
Us.__super__=Na;Us.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:Us});var Vs=function(a,b){r.call(this)};h["scripts.SceneEvents_51"]=Vs;Vs.__name__="scripts.SceneEvents_51";Vs.__super__=Na;Vs.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:Vs});var Ws=function(a,b){r.call(this)};h["scripts.SceneEvents_8"]=Ws;Ws.__name__="scripts.SceneEvents_8";Ws.__super__=Na;Ws.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},
__class__:Ws});var Xs=function(a,b){r.call(this)};h["scripts.SceneEvents_9"]=Xs;Xs.__name__="scripts.SceneEvents_9";Xs.__super__=Na;Xs.prototype=w(Na.prototype,{init:function(){},forwardMessage:function(a){},__class__:Xs});var Ys=function(){};h["scripts.SplashBox"]=Ys;Ys.__name__="scripts.SplashBox";Ys.prototype={__class__:Ys};var $l=function(){this.onComplete=new me;var a=this;qa.call(this);$a.get_current().addChild(this);this.locked=!1;var b=p.SCALE;this.background=new qa;this.background.get_graphics().beginFill(-15592942,
1);this.background.get_graphics().drawRect(0,0,this.getWidth(),this.getHeight());this.addChild(this.background);var c=2*b;this.barWidth=b*p.screenScaleX*120|0;this.barHeight=b*p.screenScaleY*8|0;var d=0*b;b*=0;var e=this.getWidth()/2-this.barWidth/2,f=this.getHeight()/2-this.barHeight/2;this.barBorder=new qa;this.barBorder.get_graphics().beginFill(-12303292,1);this.barBorder.get_graphics().drawRect(-c,-c,this.barWidth+2*c,this.barHeight+2*c);this.barBorder.set_x(e+d);this.barBorder.set_y(f+b);this.addChild(this.barBorder);
this.barBackground=new qa;this.barBackground.get_graphics().beginFill(-12303292,1);this.barBackground.get_graphics().drawRect(0,0,this.barWidth,this.barHeight);this.barBackground.set_x(e+d);this.barBackground.set_y(f+b);this.barBackground.set_scaleX(1);this.addChild(this.barBackground);this.bar=new qa;this.bar.get_graphics().beginFill(-7829368,1);this.bar.get_graphics().drawRect(0,0,this.barWidth,this.barHeight);c=new ia(0,0,0,this.barHeight);this.bar.set_scrollRect(c);this.bar.set_x(e+d);this.bar.set_y(f+
b);this.addChild(this.bar);T.getConfigBitmap("config/preloader-badge.png").onComplete(function(b){a.addChild(b);b.set_x(a.getWidth()-114-5);b.set_y(a.getHeight()-62-5)});""!=this.getURL()&&this.addEventListener("mouseDown",v(this,this.onMouseDown),!1,2);b=this.getLockURL();if(this.isSiteLocked()&&null!=b&&""!=b){d=!1;c=$a.get_current().get_loaderInfo().url;if(null==c)d=!0;else if(0>c.indexOf("http://")&&0>c.indexOf("https://"))d=!0;else if(0<c.indexOf("stencyl.com")||0<c.indexOf("localhost"))d=!0;
if(!d){b=b.split(",");for(e=0;e<b.length;)f=b[e],++e,f=ba.trim(f),null!=c&&0<=c.indexOf(f)&&(d=!0);d||this.showLockScreen(b[0])}}};h["scripts.StencylPreloader"]=$l;$l.__name__="scripts.StencylPreloader";$l.__super__=qa;$l.prototype=w(qa.prototype,{barBorder:null,bar:null,barBackground:null,background:null,barWidth:null,barHeight:null,locked:null,onComplete:null,adPlaying:null,ready:null,getLockURL:function(){return""},isSiteLocked:function(){return!1},showLockScreen:function(a){this.locked=!0;T.removeAllChildren(this);
var b=new Zc(new na(this.getWidth()|0,this.getHeight()|0,!1,5658198));this.addChild(b);var c=new ge;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",v(this,this.onMouseDown));
c.addEventListener("click",v(this,this.goToLockURL));b.addEventListener("click",v(this,this.goToLockURL))},getURL:function(){return""},goToLockURL:function(a){$a.getURL(new Jg(this.getLockURL()),"_parent")},onMouseDown:function(a){this.removeEventListener("mouseDown",v(this,this.onMouseDown));$a.getURL(new Jg(this.getURL()),"_blank")},getBackgroundColor:function(){return 3368601},getWidth:function(){return Y.windowWidth},getHeight:function(){return Y.windowHeight},onUpdate:function(a,b){$a.get_current().get_loaderInfo().__update(a,
b);null!=this.bar&&(a=new ia(0,0,a/b*this.barWidth,this.barHeight),this.bar.set_scrollRect(a))},onLoaded:function(){$a.get_current().get_loaderInfo().__complete();this.ready=!0;this.adPlaying||this.unload()},adFinished:function(){this.adPlaying=!1;this.ready&&this.unload()},unload:function(){new Ys;this.isSiteLocked()&&this.locked||(this.parent==$a.get_current()&&$a.get_current().removeChild(this),$a.get_current().stage.set_focus(null),this.onComplete.dispatch())},__class__:$l});var Kb=function(){};
h["tweenxcore.Easing"]=Kb;Kb.__name__="tweenxcore.Easing";Kb.linear=function(a){return a};Kb.sineIn=function(a){return 0==a?0:1==a?1:1-Math.cos(1.5707963267948966*a)};Kb.sineOut=function(a){return 0==a?0:1==a?1:Math.sin(1.5707963267948966*a)};Kb.sineInOut=function(a){return 0==a?0:1==a?1:-.5*(Math.cos(3.141592653589793*a)-1)};Kb.sineOutIn=function(a){return 0==a?0:1==a?1:.5>a?.5*Math.sin(3.141592653589793*a):-.5*Math.cos(1.5707963267948966*(2*a-1))+1};Kb.quadIn=function(a){return a*a};Kb.quadOut=
function(a){return-a*(a-2)};Kb.quadInOut=function(a){return.5>a?2*a*a:-2*--a*a+1};Kb.quadOutIn=function(a){if(.5>a)return-.5*(a*=2)*(a-2);a=2*a-1;return.5*a*a+.5};Kb.cubicIn=function(a){return a*a*a};Kb.cubicOut=function(a){return--a*a*a+1};Kb.cubicInOut=function(a){return 1>(a*=2)?.5*a*a*a:.5*((a-=2)*a*a+2)};Kb.cubicOutIn=function(a){a=2*a-1;return.5*(a*a*a+1)};Kb.quartIn=function(a){return(a*=a)*a};Kb.quartOut=function(a){a*=--a;return 1-a*a};Kb.quartInOut=function(a){if(1>(a*=2))return.5*(a*=a)*
a;a*=a-=2;return-.5*(a*a-2)};Kb.quartOutIn=function(a){if(.5>a)return a=2*a-1,-.5*(a*=a)*a+.5;a=2*a-1;return.5*(a*=a)*a+.5};Kb.quintIn=function(a){return a*(a*=a)*a};Kb.quintOut=function(a){return--a*(a*=a)*a+1};Kb.quintInOut=function(a){return 1>(a*=2)?.5*a*(a*=a)*a:.5*(a-=2)*(a*=a)*a+1};Kb.quintOutIn=function(a){a=2*a-1;return.5*(a*(a*=a)*a+1)};Kb.expoIn=function(a){return 0==a?0:Math.exp(6.931471805599453*(a-1))};Kb.expoOut=function(a){return 1==a?1:1-Math.exp(-6.931471805599453*a)};Kb.expoInOut=
function(a){return 0==a?0:1==a?1:1>(a*=2)?.5*Math.exp(6.931471805599453*(a-1)):.5*(2-Math.exp(-6.931471805599453*(a-1)))};Kb.expoOutIn=function(a){return.5>a?.5*(1-Math.exp(-13.862943611198906*a)):.5==a?.5:.5*(Math.exp(13.862943611198906*(a-1))+1)};Kb.circIn=function(a){return-1>a||1<a?0:1-Math.sqrt(1-a*a)};Kb.circOut=function(a){return 0>a||2<a?0:Math.sqrt(a*(2-a))};Kb.circInOut=function(a){return-.5>a||1.5<a?.5:1>(a*=2)?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)};Kb.circOutIn=function(a){if(0>
a)return 0;if(1<a)return 1;if(.5>a)return a=2*a-1,.5*Math.sqrt(1-a*a);a=2*a-1;return-.5*(Math.sqrt(1-a*a)-1-1)};Kb.bounceIn=function(a){a=1-a;return.36363636363636365>a?1-7.5625*a*a:.7272727272727273>a?1-(7.5625*(a-=.5454545454545454)*a+.75):.9090909090909091>a?1-(7.5625*(a-=.8181818181818182)*a+.9375):1-(7.5625*(a-=.9545454545454546)*a+.984375)};Kb.bounceOut=function(a){return.36363636363636365>a?7.5625*a*a:.7272727272727273>a?7.5625*(a-=.5454545454545454)*a+.75:.9090909090909091>a?7.5625*(a-=.8181818181818182)*
a+.9375:7.5625*(a-=.9545454545454546)*a+.984375};Kb.bounceInOut=function(a){if(.5>a)return a=1-2*a,.36363636363636365>a?.5*(1-7.5625*a*a):.7272727272727273>a?.5*(1-(7.5625*(a-=.5454545454545454)*a+.75)):.9090909090909091>a?.5*(1-(7.5625*(a-=.8181818181818182)*a+.9375)):.5*(1-(7.5625*(a-=.9545454545454546)*a+.984375));a=2*a-1;return.36363636363636365>a?7.5625*a*a*.5+.5:.7272727272727273>a?.5*(7.5625*(a-=.5454545454545454)*a+.75)+.5:.9090909090909091>a?.5*(7.5625*(a-=.8181818181818182)*a+.9375)+.5:
.5*(7.5625*(a-=.9545454545454546)*a+.984375)+.5};Kb.bounceOutIn=function(a){if(.5>a)return.36363636363636365>(a*=2)?3.78125*a*a:.7272727272727273>a?.5*(7.5625*(a-=.5454545454545454)*a+.75):.9090909090909091>a?.5*(7.5625*(a-=.8181818181818182)*a+.9375):.5*(7.5625*(a-=.9545454545454546)*a+.984375);a=1-(2*a-1);return.36363636363636365>a?.5-3.78125*a*a+.5:.7272727272727273>a?.5-.5*(7.5625*(a-=.5454545454545454)*a+.75)+.5:.9090909090909091>a?.5-.5*(7.5625*(a-=.8181818181818182)*a+.9375)+.5:.5-.5*(7.5625*
(a-=.9545454545454546)*a+.984375)+.5};Kb.backIn=function(a){return 0==a?0:1==a?1:a*a*(2.70158*a-1.70158)};Kb.backOut=function(a){return 0==a?0:1==a?1:--a*a*(2.70158*a+1.70158)+1};Kb.backInOut=function(a){return 0==a?0:1==a?1:1>(a*=2)?.5*a*a*(3.5949095*a-2.5949095):.5*((a-=2)*a*(3.5949095*a+2.5949095)+2)};Kb.backOutIn=function(a){if(0==a)return 0;if(1==a)return 1;if(.5>a)return a=2*a-1,.5*(a*a*(2.70158*a+1.70158)+1);a=2*a-1;return.5*a*a*(2.70158*a-1.70158)+.5};Kb.elasticIn=function(a){return 0==a?
0:1==a?1:-(Math.exp(6.931471805599453*--a)*Math.sin(6.283185307179586*(.001*a-7.5E-5)/3E-4))};Kb.elasticOut=function(a){return 0==a?0:1==a?1:Math.exp(-6.931471805599453*a)*Math.sin(6.283185307179586*(.001*a-7.5E-5)/3E-4)+1};Kb.elasticInOut=function(a){return 0==a?0:1==a?1:1>(a*=2)?-.5*Math.exp(6.931471805599453*--a)*Math.sin(6.283185307179586*(.001*a-7.5E-5)/3E-4):Math.exp(-6.931471805599453*--a)*Math.sin(6.283185307179586*(.001*a-7.5E-5)/3E-4)*.5+1};Kb.elasticOutIn=function(a){if(.5>a)return 0==
(a*=2)?0:.5*Math.exp(-6.931471805599453*a)*Math.sin(6.283185307179586*(.001*a-7.5E-5)/3E-4)+.5;if(.5==a)return.5;if(1==a)return 1;a=2*a-1;return-(.5*Math.exp(6.931471805599453*--a)*Math.sin(6.283185307179586*(.001*a-7.5E-5)/3E-4))+.5};Kb.warpOut=function(a){return 0>=a?0:1};Kb.warpIn=function(a){return 1>a?0:1};Kb.warpInOut=function(a){return.5>a?0:1};Kb.warpOutIn=function(a){return 0>=a?0:1>a?.5:1};var mb=function(){};h["tweenxcore.FloatTools"]=mb;mb.__name__="tweenxcore.FloatTools";mb.revert=function(a){return 1-
a};mb.clamp=function(a,b,c){null==c&&(c=1);null==b&&(b=0);return a<=b?b:c<=a?c:a};mb.lerp=function(a,b,c){return b*(1-a)+c*a};mb.inverseLerp=function(a,b,c){return(a-b)/(c-b)};mb.repeat=function(a,b,c){null==c&&(c=1);null==b&&(b=0);a=mb.inverseLerp(a,b,c);return a-Math.floor(a)};mb.shake=function(a,b,c){null==b&&(b=0);null==c&&(c=Math.random);return b+mb.spread(c(),a)};mb.spread=function(a,b){return mb.lerp(a,-b,b)};mb.sinByRate=function(a){return Math.sin(2*a*Math.PI)};mb.cosByRate=function(a){return Math.cos(2*
a*Math.PI)};mb.yoyo=function(a,b){return b(2*(.5>a?a:1-a))};mb.zigzag=function(a,b){return.5>a?b(2*a):1-b(2*(a-.5))};mb.mixEasing=function(a,b,c,d){null==d&&(d=.5);return mb.lerp(d,b(a),c(a))};mb.crossfadeEasing=function(a,b,c,d,e,f){null==f&&(f=1);null==e&&(e=0);return mb.lerp(mb.lerp(d(a),e,f),b(a),c(a))};mb.connectEasing=function(a,b,c,d,e){null==e&&(e=.5);null==d&&(d=.5);return a<d?mb.lerp(b(mb.inverseLerp(a,0,d)),0,e):mb.lerp(c(mb.inverseLerp(a,d,1)),e,1)};mb.oneTwoEasing=function(a,b,c,d){null==
d&&(d=.5);return a<d?b(mb.inverseLerp(a,0,d)):c(mb.inverseLerp(a,d,1))};mb.binarySearch=function(a,b,c){null==c&&(c=0);var d=0,e=a.length;if(0==c)for(;c=((e-d)/2|0)+d,a[c]<=b?d=c+1:e=c,d!=e;);else for(;c=((e-d)/2|0)+d,a[c]<b?d=c+1:e=c,d!=e;);return d};mb.polyline=function(a,b){if(2>b.length)throw new E("points length must be more than 2");var c=b.length-1;a*=c;c=Math.floor(mb.clamp(a,0,c-1));return mb.lerp(a-c,b[c],b[c+1])};mb.bezier2=function(a,b,c,d){return mb.lerp(a,mb.lerp(a,b,c),mb.lerp(a,c,
d))};mb.bezier3=function(a,b,c,d,e){return mb.bezier2(a,mb.lerp(a,b,c),mb.lerp(a,c,d),mb.lerp(a,d,e))};mb.bezier=function(a,b){if(2>b.length)throw new E("points length must be more than 2");return 2==b.length?mb.lerp(a,b[0],b[1]):3==b.length?mb.bezier2(a,b[0],b[1],b[2]):mb._bezier(a,b)};mb._bezier=function(a,b){if(4==b.length)return mb.bezier3(a,b[0],b[1],b[2],b[3]);for(var c=[],d=0,e=b.length-1;d<e;){var f=d++;c.push(mb.lerp(a,b[f],b[f+1]))}return mb._bezier(a,c)};mb.uniformQuadraticBSpline=function(a,
b){if(2>b.length)throw new E("points length must be more than 2");if(2==b.length)return mb.lerp(a,b[0],b[1]);var c=b.length-2;a*=c;c=Math.floor(mb.clamp(a,0,c-1));a-=c;var d=b[c],e=b[c+1];return a*a*(d/2-e+b[c+2]/2)+a*(-d+e)+d/2+e/2};mb.frameToSecond=function(a,b){return a/b};mb.secondToFrame=function(a,b){return a*b};mb.degreeToRate=function(a){return a/360};mb.rateToDegree=function(a){return 360*a};mb.radianToRate=function(a){return a/(2*Math.PI)};mb.rateToRadian=function(a){return 2*a*Math.PI};
mb.millisecondToBeat=function(a,b){return a*b/6E4};mb.beatToMillisecond=function(a,b){return 6E4*a/b};var Zl=function(){};h["tweenxcore.PointTools"]=Zl;Zl.__name__="tweenxcore.PointTools";Zl.polyline=function(a,b,c){var d=[],e=[];for(c=O(c);c.hasNext();){var f=c.next();d.push(f.x);e.push(f.y)}a.x=mb.polyline(b,d);a.y=mb.polyline(b,e)};Zl.bezier2=function(a,b,c,d,e){a.x=mb.bezier2(b,c.x,d.x,c.x);a.y=mb.bezier2(b,c.y,d.y,c.y)};Zl.bezier3=function(a,b,c,d,e,f){a.x=mb.bezier3(b,c.x,d.x,e.x,c.x);a.y=mb.bezier3(b,
c.y,d.y,e.y,c.y)};Zl.bezier=function(a,b,c){var d=[],e=[];for(c=O(c);c.hasNext();){var f=c.next();d.push(f.x);e.push(f.y)}a.x=mb.bezier(b,d);a.y=mb.bezier(b,e)};Zl.uniformQuadraticBSpline=function(a,b,c){var d=[],e=[];for(c=O(c);c.hasNext();){var f=c.next();d.push(f.x);e.push(f.y)}a.x=mb.uniformQuadraticBSpline(b,d);a.y=mb.uniformQuadraticBSpline(b,e)};var gu=function(){};h["tweenxcore.MatrixTools"]=gu;gu.__name__="tweenxcore.MatrixTools";gu.createSimilarityTransform=function(a,b,c,d,e){d-=b;var f=
e-c;e=Math.atan2(f,d);d=Math.sqrt(d*d+f*f);a.a=d*Math.cos(e);a.b=d*Math.sin(e);a.c=-d*Math.sin(e);a.d=d*Math.cos(e);a.tx=b;a.ty=c};R.$haxeUID|=0;h.Math=Math;Aa.count=0;null==String.fromCodePoint&&(String.fromCodePoint=function(a){return 65536>a?String.fromCharCode(a):String.fromCharCode((a>>10)+55232)+String.fromCharCode((a&1023)+56320)});String.prototype.__class__=h.String=String;String.__name__="String";h.Array=Array;Array.__name__="Array";Date.prototype.__class__=h.Date=Date;Date.__name__="Date";
var Hg={},tu={},rj=Number,sj=Boolean,et={},iu={},q={};fi.content=[{name:"config_game_config_json",data:"ewoJImFudGlhbGlhcyI6IHRydWUsCgkiYnVpbGRDb25maWciOiB7ImRlYnVnIjp0cnVlLCJleHRyYSI6W10sInBsYXRmb3JtIjoiaHRtbDUifSwKCSJkZWJ1Z0RyYXciOiBmYWxzZSwKCSJkaXNwb3NlSW1hZ2VzIjogZmFsc2UsCgkiZm9yY2VIaVJlc0Fzc2V0cyI6IHRydWUsCgkiaW5pdFNjZW5lSUQiOiAxMiwKCSJrZXlzIjogewoJCSJ1cCI6IFsiVVAiXSwKCQkiZG93biI6IFsiRE9XTiJdLAoJCSJsZWZ0IjogWyJMRUZUIl0sCgkJInJpZ2h0IjogWyJSSUdIVCJdLAoJCSJhY3Rpb24xIjogWyJaIl0sCgkJImFjdGlvbjIiOiBbIlgiXSwKCQkiZW50ZXIiOiBbIkVOVEVSIl0KCQkKCX0sCgkicGl4ZWxzbmFwIjogZmFsc2UsCgkicGh5c2ljc01vZGUiOiAiTk9STUFMX1BIWVNJQ1MiLAoJInJlbGVhc2VNb2RlIjogdHJ1ZSwKCSJzaG93Q29uc29sZSI6IGZhbHNlLAoJInN0YWdlV2lkdGgiOiA0ODAsCgkic3RhZ2VIZWlnaHQiOiAzMjAsCgkidG9vbHNldEludGVyZmFjZUhvc3QiOiAibG9jYWxob3N0IiwKCSJ0b29sc2V0SW50ZXJmYWNlUG9ydCI6IC0xLAoJInVzZUdjaUxvZ2dpbmciOiBmYWxzZSwKCQoJImNvbmZpZy1tb2JpbGUiOiB7CgkJImFkUG9zaXRpb25Cb3R0b20iOiB0cnVlLAoJCSJhdXRvcm90YXRlIjogZmFsc2UsCgkJImdhbWVTY2FsZSI6IDEsCgkJImxhbmRzY2FwZSI6IGZhbHNlLAoJCSJ0ZXN0QWRzIjogZmFsc2UsCgkJInRvb2xzZXRJbnRlcmZhY2VIb3N0IjogIjE5Mi4xNjguMjE5LjEwNCIsCgoJCSJjb25maWctYW5kcm9pZCI6IHsKCQkJImRpc2FibGVCYWNrQnV0dG9uIjogZmFsc2UsCgkJCSJzY2FsZU1vZGUiOiAiTk9fU0NBTElORyIsCgkJCSJzY2FsZXMiOiBbIjF4Il0KCQl9LAoJCQoJCSJjb25maWctaW9zIjogewoJCQkic2NhbGVNb2RlIjogIk5PX1NDQUxJTkciLAoJCQkic2NhbGVzIjogWyIxeCJdCgkJfQoJfSwKCQoJImNvbmZpZy1kZXNrdG9wIjogewoJCSJnYW1lU2NhbGUiOiAxLjAsCgkJInNjYWxlTW9kZSI6ICJOT19TQ0FMSU5HIiwKCQkic2NhbGVzIjogWyIxeCJdLAoJCSJzdGFydEluRnVsbFNjcmVlbiI6IGZhbHNlCgl9LAoJCgkiY29uZmlnLXdlYiI6IHsKCQkiZ2FtZVNjYWxlIjogMS4wLAoJCSJzdGFydEluRnVsbFNjcmVlbiI6IGZhbHNlLAoJCSJzY2FsZXMiOiBbIjF4Il0sCgoJCSJjb25maWctZmxhc2giOiB7CgkJCSJzY2FsZU1vZGUiOiAiTk9fU0NBTElORyIKCQl9LAoJCQoJCSJjb25maWctaHRtbDUiOiB7CgkJCSJ0b29sc2V0SW50ZXJmYWNlSG9zdCI6ICIxOTIuMTY4LjIxOS4xMDQiCgkJfQoJfQp9"},
{name:"config_preloader_badge_txt",data:" "},
{name:"config_preloadpaths_txt",data:"YXNzZXRzL2dyYXBoaWNzL0lNR19CQVNFL3RpbGVzZXQtMS5wbmcKYXNzZXRzL2dyYXBoaWNzL0lNR19CQVNFL3Nwcml0ZS0zLTAucG5nCmFzc2V0cy9ncmFwaGljcy9JTUdfQkFTRS9zcHJpdGUtMy0xLnBuZwphc3NldHMvZ3JhcGhpY3MvSU1HX0JBU0Uvc3ByaXRlLTMtMi5wbmcKYXNzZXRzL2dyYXBoaWNzL0lNR19CQVNFL3Nwcml0ZS0zLTMucG5nCmFzc2V0cy9ncmFwaGljcy9JTUdfQkFTRS9zcHJpdGUtMy00LnBuZwphc3NldHMvZ3JhcGhpY3MvSU1HX0JBU0Uvc3ByaXRlLTMtNS5wbmcKYXNzZXRzL2dyYXBoaWNzL0lNR19CQVNFL2JhY2tncm91bmQtNS0wLnBuZwphc3NldHMvc2Z4L3NvdW5kLTIzLm9nZwphc3NldHMvc2Z4L3NvdW5kLTI0Lm9nZwphc3NldHMvZ3JhcGhpY3MvSU1HX0JBU0UvODguU09VTkRfRVhUCmFzc2V0cy9zZngvc291bmQtODkub2dnCmFzc2V0cy9ncmFwaGljcy9JTUdfQkFTRS85Mi5TT1VORF9FWFQKYXNzZXRzL2dyYXBoaWNzL0lNR19CQVNFLzk0LlNPVU5EX0VYVAphc3NldHMvc2Z4L3NvdW5kLTk1Lm9nZwphc3NldHMvc2Z4L3NvdW5kLTk2Lm9nZwo"}];
Object.defineProperty(E.prototype,"message",{get:function(){return String(this.val)}});L.__toStr={}.toString;null==ArrayBuffer.prototype.slice&&(ArrayBuffer.prototype.slice=it.sliceImpl);var wu=new Uint32Array(256);I.__alpha16=wu;for(var ou=0;256>ou;){var pu=ou++;I.__alpha16[pu]=Math.ceil(257.00392156862745*pu)}var xu=new Uint8Array(511);I.__clamp=xu;for(var qu=0;255>qu;){var ru=qu++;I.__clamp[ru]=ru}for(var su=255;511>su;){var yu=su++;I.__clamp[yu]=255}Dh.available=!1;Dh.enabled=!1;Ta.level=0;"undefined"==
typeof console&&(console={});null==console.log&&(console.log=function(){});D.hitTestCanvas="undefined"!=typeof window?window.document.createElement("canvas"):null;D.hitTestContext="undefined"!=typeof window?D.hitTestCanvas.getContext("2d"):null;Oe.maxTouchPoints=2;Oe.supportedGestures=null;Oe.supportsGestureEvents=!1;Oe.inputMode=2;Pa.reloadListeners=[];ca.TOUCH_POINT=1;ca.GESTURE=2;ca.GESTURE_CAPTURE=3;ca.PAN_X=1;ca.PAN_Y=2;ca.PAN_XY=3;ca.READY=0;ca.BEGIN=1;ca.TWO_FINGER_MOVE=2;ca.MOVE=4;ca.R2D=
180/Math.PI;ca.SWIPE_SCROLL_TIME=2;ca.SWIPE_SAMPLE_TIME=.2;ca.VELOCITY_RATIO=.25;ca.touchEvents="touchBegin touchEnd touchMove touchOver touchOut touchRollOver touchRollOut touchTap".split(" ");ca.mouseEvents="mouseDown mouseUp mouseMove mouseOver mouseOut rollOver rollOut click".split(" ");ca.geTouchEvents=["touchBegin","touchEnd","touchMove","touchOut"];ca.geMouseEvents=["mouseDown","mouseUp","mouseMove","mouseOut"];ca.initialized=!1;ca.moveToleSqr=1;ca.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(" ");
ca.typeMap=function(a){a=new ua;for(var b=0,c=ca.MAP.length>>1;b<c;){var d=b++,e=ca.MAP[d<<1];d=ca.MAP[(d<<1)+1];null!=q[e]?a.setReserved(e,d):a.h[e]=d}return a}(this);da.ACTIVATE="activate";da.ADDED="added";da.ADDED_TO_STAGE="addedToStage";da.CANCEL="cancel";da.CHANGE="change";da.CLEAR="clear";da.CLOSE="close";da.COMPLETE="complete";da.CONNECT="connect";da.CONTEXT3D_CREATE="context3DCreate";da.COPY="copy";da.CUT="cut";da.DEACTIVATE="deactivate";da.ENTER_FRAME="enterFrame";da.EXIT_FRAME="exitFrame";
da.FRAME_CONSTRUCTED="frameConstructed";da.FRAME_LABEL="frameLabel";da.FULLSCREEN="fullScreen";da.ID3="id3";da.INIT="init";da.MOUSE_LEAVE="mouseLeave";da.OPEN="open";da.PASTE="paste";da.REMOVED="removed";da.REMOVED_FROM_STAGE="removedFromStage";da.RENDER="render";da.RESIZE="resize";da.SCROLL="scroll";da.SELECT="select";da.SELECT_ALL="selectAll";da.SOUND_COMPLETE="soundComplete";da.TAB_CHILDREN_CHANGE="tabChildrenChange";da.TAB_ENABLED_CHANGE="tabEnabledChange";da.TAB_INDEX_CHANGE="tabIndexChange";
da.TEXTURE_READY="textureReady";da.UNLOAD="unload";da.__pool=new Ma(function(){return new da(null)},function(a){a.__init()});Ka.TOUCH_BEGIN="rox_touch_begin";Ka.TOUCH_END="rox_touch_end";Ka.TOUCH_MOVE="rox_touch_move";Ka.TOUCH_OVER="rox_touch_over";Ka.TOUCH_OUT="rox_touch_out";Ka.TOUCH_ROLL_OVER="rox_touch_roll_over";Ka.TOUCH_ROLL_OUT="rox_touch_roll_in";Ka.TOUCH_TAP="rox_touch_tap";Ka.GESTURE_TAP="rox_gesture_tap";Ka.GESTURE_LONG_PRESS="rox_gesture_long_press";Ka.GESTURE_PAN="rox_gesture_pan";Ka.GESTURE_SWIPE=
"rox_gesture_swipe";Ka.GESTURE_BEGIN="rox_gesture_begin";Ka.GESTURE_PINCH="rox_gesture_pinch";Ka.GESTURE_ROTATION="rox_gesture_rotation";Ka.GESTURE_END="rox_gesture_end";Ua.__meta__={statics:{toNullVector:{SuppressWarnings:["checkstyle:Dynamic"]}}};sa.__meta__={fields:{__cairo:{SuppressWarnings:["checkstyle:Dynamic"]},addEventListener:{SuppressWarnings:["checkstyle:Dynamic"]},removeEventListener:{SuppressWarnings:["checkstyle:Dynamic"]}}};sa.__broadcastEvents=new ua;sa.__instanceCount=0;sa.__tempStack=
new Ma(function(){return Ua.toObjectVector(null)},function(a){a.set_length(0)});Y.logicalWidth=0;Y.logicalHeight=0;Y.windowWidth=0;Y.windowHeight=0;fa.Element=0;fa.PCData=1;fa.CData=2;fa.Comment=3;fa.DocType=4;fa.ProcessingInstruction=5;fa.Document=6;N.pool=[];N.pooli=0;Q.VERTEX=0;Q.FACE=1;J.b2_nullFeature=255;J.s_incidentEdge=J.makeClipPointVector();J.s_clipPoints1=J.makeClipPointVector();J.s_clipPoints2=J.makeClipPointVector();J.s_edgeAO=[];J.s_edgeBO=[];J.s_localTangent=new N;J.s_localNormal=new N;
J.s_planePoint=new N;J.s_normal=new N;J.s_tangent=new N;J.s_tangent2=new N;J.s_v11=new N;J.s_v12=new N;J.b2CollidePolyTempVec=new N;ed.s_simplex=new De;ed.s_saveA=[];ed.s_saveB=[];Gk.currentID=0;Rh.e_circles=1;Rh.e_faceA=2;Rh.e_faceB=4;Ff.e_points=1;Ff.e_faceA=2;Ff.e_faceB=4;Fb.b2_toiCalls=0;Fb.b2_toiIters=0;Fb.b2_toiMaxIters=0;Fb.b2_toiRootIters=0;Fb.b2_toiMaxRootIters=0;Fb.s_cache=function(a){a=new fm;a.useCache=!0;return a}(this);Fb.s_distanceInput=new Wd;Fb.s_xfA=new xf;Fb.s_xfB=new xf;Fb.s_fcn=
new Ff;Fb.s_distanceOutput=new ig;dc.initialized=!1;dc.distanceInput=new Wd;dc.proxyA=new We;dc.proxyB=new We;dc.simplexCache=new fm;dc.distanceOutput=new ig;dc.e_unknownShape=-1;dc.e_circleShape=0;dc.e_polygonShape=1;dc.e_edgeShape=2;dc.e_shapeTypeCount=3;dc.e_hitCollide=1;dc.e_missCollide=0;dc.e_startsInsideCollide=-1;Lb.s_mat=new Qc;ha.VERSION="2.1alpha";ha.USHRT_MAX=65535;ha.b2_pi=Math.PI;ha.b2_maxManifoldPoints=2;ha.b2_aabbExtension=.1;ha.b2_aabbMultiplier=2;ha.b2_linearSlop=.005;ha.b2_polygonRadius=
2*ha.b2_linearSlop;ha.b2_angularSlop=.011111111111111112*ha.b2_pi;ha.b2_toiSlop=8*ha.b2_linearSlop;ha.b2_maxTOIContactsPerIsland=32;ha.b2_maxTOIJointsPerIsland=32;ha.b2_velocityThreshold=1;ha.b2_maxLinearCorrection=.2;ha.b2_maxAngularCorrection=.044444444444444446*ha.b2_pi;ha.b2_maxTranslation=2;ha.b2_maxTranslationSquared=ha.b2_maxTranslation*ha.b2_maxTranslation;ha.b2_maxRotation=.5*ha.b2_pi;ha.b2_maxRotationSquared=ha.b2_maxRotation*ha.b2_maxRotation;ha.b2_contactBaumgarte=.2;ha.b2_timeToSleep=
.5;ha.b2_linearSleepTolerance=.01;ha.b2_angularSleepTolerance=.011111111111111112*ha.b2_pi;P.b2Vec2_zero=new N(0,0);P.b2Mat22_identity=Qc.fromVV(new N(1,0),new N(0,1));P.b2Transform_identity=new xf(P.b2Vec2_zero,P.b2Mat22_identity);wa.s_xf1=new xf;wa.e_islandFlag=1;wa.e_awakeFlag=2;wa.e_allowSleepFlag=4;wa.e_bulletFlag=8;wa.e_fixedRotationFlag=16;wa.e_activeFlag=32;wa.e_ignoreGravityFlag=128;wa.e_alwaysActiveFlag=256;wa.e_pausedFlag=512;wa.b2_staticBody=0;wa.b2_kinematicBody=1;wa.b2_dynamicBody=2;
Jk.b2_defaultFilter=new Jk;vh.KEY_LOCK=0;vh.b2_defaultListener=new vh;hm.s_evalCP=new F;qe.e_shapeBit=1;qe.e_jointBit=2;qe.e_aabbBit=4;qe.e_pairBit=8;qe.e_centerOfMassBit=16;qe.e_controllerBit=32;jg.tempAABB1=new id;jg.tempAABB2=new id;Bi.s_impulse=new Op;rc.s_timestep2=new Lk;rc.s_xf=new xf;rc.s_backupA=new Sh;rc.s_backupB=new Sh;rc.s_timestep=new Lk;rc.s_queue=[];rc.s_jointColor=new gm(.5,.8,.8);rc.m_warmStarting=!0;rc.m_continuousPhysics=!1;rc.e_newFixture=1;rc.e_locked=2;ib.e_sensorFlag=1;ib.e_continuousFlag=
2;ib.e_islandFlag=4;ib.e_toiFlag=8;ib.e_touchingFlag=16;ib.e_enabledFlag=32;ib.e_filterFlag=64;ib.s_input=new Np;Mk.circlePointA=new N;Mk.circlePointB=new N;ff.staticFix=ha.b2_maxManifoldPoints;ff.s_worldManifold=new Hk;ff.s_psm=new Mk;Va.m_xf=new xf;Va.q=new N;Va.p=new N;Va.e=new N;Va.temp1=new N;Va.temp2=new N;Va.m_centroidB=new N;Va.mat=new Qc;G.m_xf=new xf;G.temp=new N;G.m_centroidB=new N;G.m_lowerLimit=new N;G.m_upperLimit=new N;G.m_polygonB=new Sp;G.edgeAxis=new mm;G.polygonAxis=new mm;G.perp=
new N;G.n=new N;G.rf=new Tp;G.mat=new Qc;G.temp1=new N;G.temp2=new N;G.ie=[new Wh,new Wh];G.clipPoints1=[new Wh,new Wh];G.clipPoints2=[new Wh,new Wh];G.edge0=new N;G.edge1=new N;G.edge2=new N;G.m_normal=new N;G.m_normal0=new N;G.m_normal1=new N;G.m_normal2=new N;Yb.e_unknownJoint=0;Yb.e_revoluteJoint=1;Yb.e_prismaticJoint=2;Yb.e_distanceJoint=3;Yb.e_pulleyJoint=4;Yb.e_mouseJoint=5;Yb.e_gearJoint=6;Yb.e_lineJoint=7;Yb.e_weldJoint=8;Yb.e_frictionJoint=9;Yb.e_inactiveLimit=0;Yb.e_atLowerLimit=1;Yb.e_atUpperLimit=
2;Yb.e_equalLimits=3;td.CENTER="center";Vg.b2_minPulleyLength=2;Dg.tImpulse=new N;xh.FPS_ONLY=!1;xh.GRAPH_WIDTH=70;xh.XPOS=69;xh.GRAPH_HEIGHT=50;xh.TEXT_HEIGHT=50;Wg.bg=51;Wg.fps=16776960;Wg.ms=65280;Wg.mem=65535;Wg.memmax=16711792;Wg.bgCSS="#000033";Wg.msCSS="#00ff00";Wg.fpsCSS="#ffff00";Wg.memCSS="#00ffff";Wg.memmaxCSS="#ff0070";Yh.whirlID="";Yh.whirlID1="";Yh.ioswhirlID="";Yh.ioswhirlID1="";Yh.cpmstarID="";Yh.newgroundsID="";Yh.newgroundsKey="";Yh.androidPublicKey="";ma.defines=function(a){a=new ua;
null!=q.web?a.setReserved("web","1"):a.h.web="1";null!=q.verbose?a.setReserved("verbose","1"):a.h.verbose="1";null!=q.utf16?a.setReserved("utf16","1"):a.h.utf16="1";null!=q.use_tilemap?a.setReserved("use_tilemap","1"):a.h.use_tilemap="1";null!=q.tweenxcore?a.setReserved("tweenxcore","1.0.4"):a.h.tweenxcore="1.0.4";null!=q["true"]?a.setReserved("true","1"):a.h["true"]="1";null!=q.tools?a.setReserved("tools","7.6.3"):a.h.tools="7.6.3";null!=q["target.utf16"]?a.setReserved("target.utf16","true"):a.h["target.utf16"]=
"true";null!=q["target.unicode"]?a.setReserved("target.unicode","true"):a.h["target.unicode"]="true";null!=q["target.name"]?a.setReserved("target.name","js"):a.h["target.name"]="js";null!=q.stencyl?a.setReserved("stencyl","4.0.2"):a.h.stencyl="4.0.2";null!=q["source-header"]?a.setReserved("source-header","Generated by Haxe 4.0.2"):a.h["source-header"]="Generated by Haxe 4.0.2";null!=q.polygonal_printf?a.setReserved("polygonal_printf","1.0.0-beta"):a.h.polygonal_printf="1.0.0-beta";null!=q.polygonal_ds?
a.setReserved("polygonal_ds","2.0.1"):a.h.polygonal_ds="2.0.1";null!=q["polygonal-printf"]?a.setReserved("polygonal-printf","1.0.0-beta"):a.h["polygonal-printf"]="1.0.0-beta";null!=q["polygonal-ds"]?a.setReserved("polygonal-ds","2.0.1"):a.h["polygonal-ds"]="2.0.1";null!=q.openfl_html5?a.setReserved("openfl_html5","1"):a.h.openfl_html5="1";null!=q.openfl_enable_handle_error?a.setReserved("openfl_enable_handle_error","1"):a.h.openfl_enable_handle_error="1";null!=q["openfl-html5"]?a.setReserved("openfl-html5",
"1"):a.h["openfl-html5"]="1";null!=q["openfl-enable-handle-error"]?a.setReserved("openfl-enable-handle-error","1"):a.h["openfl-enable-handle-error"]="1";null!=q.openfl?a.setReserved("openfl","8.9.5"):a.h.openfl="8.9.5";null!=q.no_traces?a.setReserved("no_traces","1"):a.h.no_traces="1";null!=q.no_compilation?a.setReserved("no_compilation","1"):a.h.no_compilation="1";null!=q["no-compilation"]?a.setReserved("no-compilation","1"):a.h["no-compilation"]="1";null!=q.mbs?a.setReserved("mbs","1.0.0"):a.h.mbs=
"1.0.0";null!=q.lime_webgl?a.setReserved("lime_webgl","1"):a.h.lime_webgl="1";null!=q.lime_html5?a.setReserved("lime_html5","1"):a.h.lime_html5="1";null!=q.lime_howlerjs?a.setReserved("lime_howlerjs","1"):a.h.lime_howlerjs="1";null!=q.lime_dom?a.setReserved("lime_dom","1"):a.h.lime_dom="1";null!=q.lime_canvas?a.setReserved("lime_canvas","1"):a.h.lime_canvas="1";null!=q["lime-webgl"]?a.setReserved("lime-webgl","1"):a.h["lime-webgl"]="1";null!=q["lime-html5"]?a.setReserved("lime-html5","1"):a.h["lime-html5"]=
"1";null!=q["lime-howlerjs"]?a.setReserved("lime-howlerjs","1"):a.h["lime-howlerjs"]="1";null!=q["lime-dom"]?a.setReserved("lime-dom","1"):a.h["lime-dom"]="1";null!=q["lime-canvas"]?a.setReserved("lime-canvas","1"):a.h["lime-canvas"]="1";null!=q.lime?a.setReserved("lime","7.6.3"):a.h.lime="7.6.3";null!=q.js_es5?a.setReserved("js_es5","1"):a.h.js_es5="1";null!=q.js_es?a.setReserved("js_es","5"):a.h.js_es="5";null!=q["js-es5"]?a.setReserved("js-es5","1"):a.h["js-es5"]="1";null!=q.js?a.setReserved("js",
"1"):a.h.js="1";null!=q.html5?a.setReserved("html5","1"):a.h.html5="1";null!=q.hscript?a.setReserved("hscript","2.1.1"):a.h.hscript="2.1.1";null!=q.howlerjs?a.setReserved("howlerjs","1"):a.h.howlerjs="1";null!=q.haxe_ver?a.setReserved("haxe_ver","4.002"):a.h.haxe_ver="4.002";null!=q.haxe4?a.setReserved("haxe4","1"):a.h.haxe4="1";null!=q.haxe3?a.setReserved("haxe3","1"):a.h.haxe3="1";null!=q.haxe?a.setReserved("haxe","4.0.2"):a.h.haxe="4.0.2";null!=q.debug_console?a.setReserved("debug_console","0.0.0"):
a.h.debug_console="0.0.0";null!=q["debug-console"]?a.setReserved("debug-console","0.0.0"):a.h["debug-console"]="0.0.0";null!=q.debug?a.setReserved("debug","1"):a.h.debug="1";null!=q.dce?a.setReserved("dce","std"):a.h.dce="std";null!=q.cloner?a.setReserved("cloner","1.0.0"):a.h.cloner="1.0.0";null!=q.box2d?a.setReserved("box2d","0.0.0"):a.h.box2d="0.0.0";null!=q.actuate_manual_update?a.setReserved("actuate_manual_update","1"):a.h.actuate_manual_update="1";null!=q.actuate_manual_time?a.setReserved("actuate_manual_time",
"1"):a.h.actuate_manual_time="1";return a}(this);jd.TYPE_ADS=1;jd.TYPE_PURCHASES=2;jd.TYPE_GAMECENTER=3;jd.TYPE_KEYBOARD=4;p.__meta__={fields:{getLayer:{deprecated:["Use getLayerById or getLayerByName"]}}};p.DOODAD="";p.INTERNAL_SHIFT="iSHIFT";p.INTERNAL_CTRL="iCTRL";p.INTERNAL_COMMAND="iCOMMAND";p.NO_PHYSICS=!1;p.DEBUG_DRAW=!1;p.IMG_BASE="";p.SCALE=1;p.checkedWideScreen=!1;p.isStandardIOS=!1;p.isExtendedIOS=!1;p.isIPhone6=!1;p.isIPhone6Plus=!1;p.isIPhoneX=!1;p.isIPhoneXMax=!1;p.isIPhoneXR=!1;p.isTabletIOS=
!1;p.landscape=!1;p.limitCameraToScene=!0;p.paused=!1;p.started=!1;p.inFocus=!0;p.events=new jd;p.ITERATIONS=3;p.physicsScale=10;p.preservePadding=!1;p.paddingLeft=0;p.paddingRight=0;p.paddingTop=0;p.paddingBottom=0;p.STEP_SIZE=10;p.MS_PER_SEC=1E3;p.elapsedTime=0;p.timeScale=1;p.totalElapsedTime=0;p.debug=!1;S.mouseX=0;S.mouseY=0;S.mouseWheelDelta=0;S.multipleGamepadsEnabled=!1;S._enabled=!1;S._key=[];S._controlsToReset=[];S._controlMap=new ua;S._keyControlMap=new Wa;Xa.ANY=-1;Xa.LEFT=37;Xa.UP=38;
Xa.RIGHT=39;Xa.DOWN=40;Xa.ENTER=13;Xa.CONTROL=17;Xa.COMMAND=15;Xa.SPACE=32;Xa.SHIFT=16;Xa.BACKSPACE=8;Xa.CAPS_LOCK=20;Xa.DELETE=46;Xa.END=35;Xa.ESCAPE=27;Xa.HOME=36;Xa.INSERT=45;Xa.TAB=9;Xa.PAGE_DOWN=34;Xa.PAGE_UP=33;Xa.LEFT_SQUARE_BRACKET=219;Xa.RIGHT_SQUARE_BRACKET=221;Xa.A=97;Xa.B=98;Xa.C=99;Xa.D=100;Xa.E=101;Xa.F=102;Xa.G=103;Xa.H=104;Xa.I=105;Xa.J=106;Xa.K=107;Xa.L=108;Xa.M=109;Xa.N=110;Xa.O=111;Xa.P=112;Xa.Q=113;Xa.R=114;Xa.S=115;Xa.T=116;Xa.U=117;Xa.V=118;Xa.W=119;Xa.X=120;Xa.Y=121;Xa.Z=122;
Xa.F1=112;Xa.F2=113;Xa.F3=114;Xa.F4=115;Xa.F5=116;Xa.F6=117;Xa.F7=118;Xa.F8=119;Xa.F9=120;Xa.F10=121;Xa.F11=122;Xa.F12=123;Xa.F13=124;Xa.F14=125;Xa.F15=126;Xa.DIGIT_0=48;Xa.DIGIT_1=49;Xa.DIGIT_2=50;Xa.DIGIT_3=51;Xa.DIGIT_4=52;Xa.DIGIT_5=53;Xa.DIGIT_6=54;Xa.DIGIT_7=55;Xa.DIGIT_8=56;Xa.DIGIT_9=57;Xa.NUMPAD_0=96;Xa.NUMPAD_1=97;Xa.NUMPAD_2=98;Xa.NUMPAD_3=99;Xa.NUMPAD_4=100;Xa.NUMPAD_5=101;Xa.NUMPAD_6=102;Xa.NUMPAD_7=103;Xa.NUMPAD_8=104;Xa.NUMPAD_9=105;Xa.NUMPAD_ADD=107;Xa.NUMPAD_DECIMAL=110;Xa.NUMPAD_DIVIDE=
111;Xa.NUMPAD_ENTER=108;Xa.NUMPAD_MULTIPLY=106;Xa.NUMPAD_SUBTRACT=109;Xa.keyboardNameMap=function(a){a=new ua;null!=q.NUMBER_0?a.setReserved("NUMBER_0",48):a.h.NUMBER_0=48;null!=q.NUMBER_1?a.setReserved("NUMBER_1",49):a.h.NUMBER_1=49;null!=q.NUMBER_2?a.setReserved("NUMBER_2",50):a.h.NUMBER_2=50;null!=q.NUMBER_3?a.setReserved("NUMBER_3",51):a.h.NUMBER_3=51;null!=q.NUMBER_4?a.setReserved("NUMBER_4",52):a.h.NUMBER_4=52;null!=q.NUMBER_5?a.setReserved("NUMBER_5",53):a.h.NUMBER_5=53;null!=q.NUMBER_6?a.setReserved("NUMBER_6",
54):a.h.NUMBER_6=54;null!=q.NUMBER_7?a.setReserved("NUMBER_7",55):a.h.NUMBER_7=55;null!=q.NUMBER_8?a.setReserved("NUMBER_8",56):a.h.NUMBER_8=56;null!=q.NUMBER_9?a.setReserved("NUMBER_9",57):a.h.NUMBER_9=57;null!=q.A?a.setReserved("A",65):a.h.A=65;null!=q.B?a.setReserved("B",66):a.h.B=66;null!=q.C?a.setReserved("C",67):a.h.C=67;null!=q.D?a.setReserved("D",68):a.h.D=68;null!=q.E?a.setReserved("E",69):a.h.E=69;null!=q.F?a.setReserved("F",70):a.h.F=70;null!=q.G?a.setReserved("G",71):a.h.G=71;null!=q.H?
a.setReserved("H",72):a.h.H=72;null!=q.I?a.setReserved("I",73):a.h.I=73;null!=q.J?a.setReserved("J",74):a.h.J=74;null!=q.K?a.setReserved("K",75):a.h.K=75;null!=q.L?a.setReserved("L",76):a.h.L=76;null!=q.M?a.setReserved("M",77):a.h.M=77;null!=q.N?a.setReserved("N",78):a.h.N=78;null!=q.O?a.setReserved("O",79):a.h.O=79;null!=q.P?a.setReserved("P",80):a.h.P=80;null!=q.Q?a.setReserved("Q",81):a.h.Q=81;null!=q.R?a.setReserved("R",82):a.h.R=82;null!=q.S?a.setReserved("S",83):a.h.S=83;null!=q.T?a.setReserved("T",
84):a.h.T=84;null!=q.U?a.setReserved("U",85):a.h.U=85;null!=q.V?a.setReserved("V",86):a.h.V=86;null!=q.W?a.setReserved("W",87):a.h.W=87;null!=q.X?a.setReserved("X",88):a.h.X=88;null!=q.Y?a.setReserved("Y",89):a.h.Y=89;null!=q.Z?a.setReserved("Z",90):a.h.Z=90;null!=q.NUMPAD_0?a.setReserved("NUMPAD_0",96):a.h.NUMPAD_0=96;null!=q.NUMPAD_1?a.setReserved("NUMPAD_1",97):a.h.NUMPAD_1=97;null!=q.NUMPAD_2?a.setReserved("NUMPAD_2",98):a.h.NUMPAD_2=98;null!=q.NUMPAD_3?a.setReserved("NUMPAD_3",99):a.h.NUMPAD_3=
99;null!=q.NUMPAD_4?a.setReserved("NUMPAD_4",100):a.h.NUMPAD_4=100;null!=q.NUMPAD_5?a.setReserved("NUMPAD_5",101):a.h.NUMPAD_5=101;null!=q.NUMPAD_6?a.setReserved("NUMPAD_6",102):a.h.NUMPAD_6=102;null!=q.NUMPAD_7?a.setReserved("NUMPAD_7",103):a.h.NUMPAD_7=103;null!=q.NUMPAD_8?a.setReserved("NUMPAD_8",104):a.h.NUMPAD_8=104;null!=q.NUMPAD_9?a.setReserved("NUMPAD_9",105):a.h.NUMPAD_9=105;null!=q.NUMPAD_MULTIPLY?a.setReserved("NUMPAD_MULTIPLY",106):a.h.NUMPAD_MULTIPLY=106;null!=q.NUMPAD_ADD?a.setReserved("NUMPAD_ADD",
107):a.h.NUMPAD_ADD=107;null!=q.NUMPAD_ENTER?a.setReserved("NUMPAD_ENTER",108):a.h.NUMPAD_ENTER=108;null!=q.NUMPAD_SUBTRACT?a.setReserved("NUMPAD_SUBTRACT",109):a.h.NUMPAD_SUBTRACT=109;null!=q.NUMPAD_DECIMAL?a.setReserved("NUMPAD_DECIMAL",110):a.h.NUMPAD_DECIMAL=110;null!=q.NUMPAD_DIVIDE?a.setReserved("NUMPAD_DIVIDE",111):a.h.NUMPAD_DIVIDE=111;null!=q.F1?a.setReserved("F1",112):a.h.F1=112;null!=q.F2?a.setReserved("F2",113):a.h.F2=113;null!=q.F3?a.setReserved("F3",114):a.h.F3=114;null!=q.F4?a.setReserved("F4",
115):a.h.F4=115;null!=q.F5?a.setReserved("F5",116):a.h.F5=116;null!=q.F6?a.setReserved("F6",117):a.h.F6=117;null!=q.F7?a.setReserved("F7",118):a.h.F7=118;null!=q.F8?a.setReserved("F8",119):a.h.F8=119;null!=q.F9?a.setReserved("F9",120):a.h.F9=120;null!=q.F10?a.setReserved("F10",121):a.h.F10=121;null!=q.F11?a.setReserved("F11",122):a.h.F11=122;null!=q.F12?a.setReserved("F12",123):a.h.F12=123;null!=q.F13?a.setReserved("F13",124):a.h.F13=124;null!=q.F14?a.setReserved("F14",125):a.h.F14=125;null!=q.F15?
a.setReserved("F15",126):a.h.F15=126;null!=q.BACKSPACE?a.setReserved("BACKSPACE",8):a.h.BACKSPACE=8;null!=q.TAB?a.setReserved("TAB",9):a.h.TAB=9;null!=q.ALTERNATE?a.setReserved("ALTERNATE",18):a.h.ALTERNATE=18;null!=q.ENTER?a.setReserved("ENTER",13):a.h.ENTER=13;null!=q.COMMAND?a.setReserved("COMMAND",15):a.h.COMMAND=15;null!=q.SHIFT?a.setReserved("SHIFT",16):a.h.SHIFT=16;null!=q.CONTROL?a.setReserved("CONTROL",17):a.h.CONTROL=17;null!=q.BREAK?a.setReserved("BREAK",19):a.h.BREAK=19;null!=q.CAPS_LOCK?
a.setReserved("CAPS_LOCK",20):a.h.CAPS_LOCK=20;null!=q.NUMPAD?a.setReserved("NUMPAD",21):a.h.NUMPAD=21;null!=q.ESCAPE?a.setReserved("ESCAPE",27):a.h.ESCAPE=27;null!=q.SPACE?a.setReserved("SPACE",32):a.h.SPACE=32;null!=q.PAGE_UP?a.setReserved("PAGE_UP",33):a.h.PAGE_UP=33;null!=q.PAGE_DOWN?a.setReserved("PAGE_DOWN",34):a.h.PAGE_DOWN=34;null!=q.END?a.setReserved("END",35):a.h.END=35;null!=q.HOME?a.setReserved("HOME",36):a.h.HOME=36;null!=q.LEFT?a.setReserved("LEFT",37):a.h.LEFT=37;null!=q.RIGHT?a.setReserved("RIGHT",
39):a.h.RIGHT=39;null!=q.UP?a.setReserved("UP",38):a.h.UP=38;null!=q.DOWN?a.setReserved("DOWN",40):a.h.DOWN=40;null!=q.INSERT?a.setReserved("INSERT",45):a.h.INSERT=45;null!=q.DELETE?a.setReserved("DELETE",46):a.h.DELETE=46;null!=q.NUMLOCK?a.setReserved("NUMLOCK",144):a.h.NUMLOCK=144;null!=q.SEMICOLON?a.setReserved("SEMICOLON",186):a.h.SEMICOLON=186;null!=q.EQUAL?a.setReserved("EQUAL",187):a.h.EQUAL=187;null!=q.COMMA?a.setReserved("COMMA",188):a.h.COMMA=188;null!=q.MINUS?a.setReserved("MINUS",189):
a.h.MINUS=189;null!=q.PERIOD?a.setReserved("PERIOD",190):a.h.PERIOD=190;null!=q.SLASH?a.setReserved("SLASH",191):a.h.SLASH=191;null!=q.BACKQUOTE?a.setReserved("BACKQUOTE",192):a.h.BACKQUOTE=192;null!=q.LEFTBRACKET?a.setReserved("LEFTBRACKET",219):a.h.LEFTBRACKET=219;null!=q.BACKSLASH?a.setReserved("BACKSLASH",220):a.h.BACKSLASH=220;null!=q.RIGHTBRACKET?a.setReserved("RIGHTBRACKET",221):a.h.RIGHTBRACKET=221;null!=q.QUOTE?a.setReserved("QUOTE",222):a.h.QUOTE=222;return a}(this);pa.__pool=new Ma(function(){return new pa},
function(a){a.setTo(0,0)});ia.__pool=new Ma(function(){return new ia},function(a){a.setTo(0,0,0,0)});r.FRONT=0;r.MIDDLE=1;r.BACK=2;r.CHANNELS=32;r.mpx=0;r.mpy=0;r.mrx=0;r.mry=0;r.dummyVec=new N;r.imageApiAutoscale=!0;r.dummyRect=new ia(0,0,1,1);r.dummyPoint=new pa(0,0);r.BASE_64_ENCODINGS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";r.BASE_64_PADDING="=";Nc.AD_USER_OPEN=100;Nc.AD_USER_CLOSE=101;Nc.AD_LOADED=102;Nc.AD_FAILED=103;Nc.AD_CLICKED=104;Nc.FULL_AD_USER_OPEN=105;Nc.FULL_AD_USER_CLOSE=
106;Nc.FULL_AD_LOADED=107;Nc.FULL_AD_FAILED=108;Nc.FULL_AD_CLICKED=109;Nc.PURCHASE_READY=200;Nc.PURCHASE_SUCCESS=201;Nc.PURCHASE_FAIL=202;Nc.PURCHASE_RESTORE=203;Nc.PURCHASE_CANCEL=204;Nc.PURCHASE_PRODUCTS_VERIFIED=205;Nc.PURCHASE_PRODUCT_VALIDATED=206;Nc.GAME_CENTER_READY=300;Nc.GAME_CENTER_SCORE=301;Nc.GAME_CENTER_ACHIEVEMENT=302;Nc.GAME_CENTER_ACHIEVEMENT_RESET=303;Nc.GAME_CENTER_READY_FAIL=304;Nc.GAME_CENTER_SCORE_FAIL=305;Nc.GAME_CENTER_ACHIEVEMENT_FAIL=306;Nc.GAME_CENTER_ACHIEVEMENT_RESET_FAIL=
307;Nc.KEYBOARD_EVENT=400;Nc.KEYBOARD_DONE=401;Nc.KEYBOARD_SHOW=402;Nc.KEYBOARD_HIDE=403;Pm.stringBlendMap=function(a){a=new ua;null!=q.add?a.setReserved("add",0):a.h.add=0;null!=q.alpha?a.setReserved("alpha",1):a.h.alpha=1;null!=q.darken?a.setReserved("darken",2):a.h.darken=2;null!=q.difference?a.setReserved("difference",3):a.h.difference=3;null!=q.erase?a.setReserved("erase",4):a.h.erase=4;null!=q.hardlight?a.setReserved("hardlight",5):a.h.hardlight=5;null!=q.invert?a.setReserved("invert",6):a.h.invert=
6;null!=q.lighten?a.setReserved("lighten",8):a.h.lighten=8;null!=q.multiply?a.setReserved("multiply",9):a.h.multiply=9;null!=q.normal?a.setReserved("normal",10):a.h.normal=10;null!=q.overlay?a.setReserved("overlay",11):a.h.overlay=11;null!=q.screen?a.setReserved("screen",12):a.h.screen=12;null!=q.subtract?a.setReserved("subtract",14):a.h.subtract=14;return a}(this);ab.drawnStringCache=new ua;ab.drawnStringCacheKeys=[];yd.MAX_TEXTURE_CAP=4096;fe._1X=new fe(1);fe._1_5X=new fe(1.5);fe._2X=new fe(2);
fe._3X=new fe(3);fe._4X=new fe(4);Xg.NO_SCALING=0;Xg.FULLSCREEN=1;Xg.STRETCH_TO_FIT=2;Xg.SCALE_TO_FIT_LETTERBOX=3;Xg.SCALE_TO_FIT_FILL=4;Xg.SCALE_TO_FIT_FULLSCREEN=5;Gf._storedFonts=new ua;Gf.ZERO_POINT=new pa;ai.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";
aq.LEFT=1;aq.RIGHT=2;aq.CENTER=3;Od.CONTEXT_LOST="glcontextlost";Od.CONTEXT_RESTORED="glcontextrestored";Od.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}";Cb.IN="in";Cb.OUT="out";Cb.THROUGH="through";Ze.SLIDE_UP="up";Ze.SLIDE_DOWN="down";Ze.SLIDE_LEFT="left";Ze.SLIDE_RIGHT="right";M.BOOLEAN=new ng("boolean",
1);M.INTEGER=new ng("integer",4);M.FLOAT=new ng("float",4);M.STRING=new ng("string",4);M.LIST=new ng("list",4);M.DYNAMIC=new ng("dynamic",8);Ii.basicTypes=function(a){a=[];a.push(M.BOOLEAN);a.push(M.INTEGER);a.push(M.FLOAT);a.push(M.STRING);a.push(M.LIST);a.push(M.DYNAMIC);Fc.initializeType();gd.initializeType();ud.initializeType();a.push(Fc.MBS_HEADER);a.push(gd.MBS_TYPE_INFO);a.push(ud.MBS_FIELD_INFO);return a}(this);Bb.GROUP_OFFSET=1E6;Bb.manifold=new Hk;Eb.INHERIT_ID=-1E3;Eb.REGION_ID=-2;Eb.PLAYER_ID=
0;Eb.TERRAIN_ID=1;Eb.DOODAD_ID=2;Eb.ACTOR_ID=3;La.fixedCenter=0;La.showWherePressed=1;La.viewOffsetX=0;La.viewOffsetY=0;La.initialized=!1;yh.NORMAL_PHYSICS=0;yh.SIMPLE_PHYSICS=1;yh.MINIMAL_PHYSICS=2;Nd.UNSET_ID=-1;Tm.MAX_VERTICES=200;$b.muted=!1;$b.masterVolume=1;wh.UNSET_ID=-1;Ud.allAnimations=[];Cc.recycledCollisions=[];Cc.collisionResponses=new Wa;ue.freedCollisionPoints=[];lg.WHITE=-1;lg.TRANSPARENT=-2;ag.infoArray=[];be.NO_AUTOTILE_DATA=0;be.CORNER_TL=1;be.CORNER_TR=2;be.CORNER_BR=4;be.CORNER_BL=
8;be.SIDE_L=16;be.SIDE_T=32;be.SIDE_R=64;be.SIDE_B=128;fd.dummyRect=new ia;Ce.TILESET_CACHE_MULTIPLIER=1E6;Ce.cacheSource=new Wa;Ce.autotileFlagPointMap=function(a){a=new Wa;var b=be.CORNER_TL,c=new pa(-1,-1);a.h[b]=c;b=be.CORNER_TR;c=new pa(1,-1);a.h[b]=c;b=be.CORNER_BL;c=new pa(-1,1);a.h[b]=c;b=be.CORNER_BR;c=new pa(1,1);a.h[b]=c;b=be.SIDE_T;c=new pa(0,-1);a.h[b]=c;b=be.SIDE_B;c=new pa(0,1);a.h[b]=c;b=be.SIDE_L;c=new pa(-1,0);a.h[b]=c;b=be.SIDE_R;c=new pa(1,0);a.h[b]=c;return a}(this);Rf.temp=new ia;
Jc.BLACK=-16777216;Jc.WHITE=-1;Jc.RED=-65536;Jc.GREEN=-16711936;Jc.BLUE=-16776961;Jc.CYAN=-16711681;Jc.MAGENTA=-65281;Jc.YELLOW=-256;bb.LUMA_R=.212671;bb.LUMA_G=.71516;bb.LUMA_B=.072169;bb.LUMA_R2=.3086;bb.LUMA_G2=.6094;bb.LUMA_B2=.082;bb.INV3=.3333333333333333;ke.BLACK=0;ke.WHITE=16777215;ke.RED=16711680;ke.GREEN=65280;ke.BLUE=255;ke.CYAN=65535;ke.MAGENTA=16711935;ke.YELLOW=16776960;Tf.__meta__={fields:{clone:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};ei.__identity=new ei;Ha.__meta__={fields:{equals:{SuppressWarnings:["checkstyle:FieldDocComment"]},
to3DString:{SuppressWarnings:["checkstyle:FieldDocComment"]},toMozString:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Ha.__identity=new Ha;Ha.__pool=new Ma(function(){return new Ha},function(a){a.identity()});Ha.__matrix3=new ei;Sb.__pool=new Ma(function(){return new Sb},function(a){a.__identity()});T.INTEGER_MAX=1E8;T.NUMBER_MAX_VALUE=1.79769313486231E308;T.blackColor=-16777216;T.rate=1;T.camera=new pa;T.cloner=new Wp;T._bitmap=new ua;T._seed=0;T._volume=1;T._pan=0;T._soundTransform=new Tf;
T.DEG=57.29577951308402;T.RAD=.01745329251994278;T.point=new pa;T.point2=new pa;T.zero=new pa;T.rect=new ia;T.matrix=new Ha;T.sprite=new qa;T.collision=new Cc;tb.linear=new tn;tb.sineIn=new Gn;tb.sineOut=new In;tb.sineInOut=new Hn;tb.sineOutIn=new Jn;tb.quadIn=new un;tb.quadOut=new wn;tb.quadInOut=new vn;tb.quadOutIn=new xn;tb.cubicIn=new gn;tb.cubicOut=new jn;tb.cubicInOut=new hn;tb.cubicOutIn=new kn;tb.quartIn=new yn;tb.quartOut=new An;tb.quartInOut=new zn;tb.quartOutIn=new Bn;tb.quintIn=new Cn;
tb.quintOut=new En;tb.quintInOut=new Dn;tb.quintOutIn=new Fn;tb.expoIn=new pn;tb.expoOut=new rn;tb.expoInOut=new qn;tb.expoOutIn=new sn;tb.circIn=new cn;tb.circOut=new en;tb.circInOut=new dn;tb.circOutIn=new fn;tb.bounceIn=new Zm;tb.bounceOut=new an;tb.bounceInOut=new $m;tb.bounceOutIn=new bn;tb.backIn=new Vm;tb.backOut=new Xm;tb.backInOut=new Wm;tb.backOutIn=new Ym;tb.elasticIn=new ln;tb.elasticOut=new nn;tb.elasticInOut=new mn;tb.elasticOutIn=new on;tb.warpOut=new Mn;tb.warpIn=new Kn;tb.warpInOut=
new Ln;tb.warpOutIn=new Nn;Ki.PI=3.141592653589793;Ki.PI_H=1.5707963267948966;Ki.LN_2=.6931471805599453;Ki.LN_2_10=6.931471805599453;Ki.overshoot=1.70158;Ki.amplitude=1;Ki.period=3E-4;Gb.activeObjects=[];Gb.finishedObjects=[];Id.USE_CACHE=!1;Id.USE_ENUM_INDEX=!1;Id.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";af.DEFAULT_RESOLVER=new Rn;af.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";gi.CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
gi.BYTES=hb.ofString(gi.CHARS);zd.i64tmp=new Xb(0,0);zd.helper=new DataView(new ArrayBuffer(8));Qh.escapes=function(a){a=new ua;null!=q.lt?a.setReserved("lt","<"):a.h.lt="<";null!=q.gt?a.setReserved("gt",">"):a.h.gt=">";null!=q.amp?a.setReserved("amp","&"):a.h.amp="&";null!=q.quot?a.setReserved("quot",'"'):a.h.quot='"';null!=q.apos?a.setReserved("apos","'"):a.h.apos="'";return a}(this);gf.LEN_EXTRA_BITS_TBL=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,-1,-1];gf.LEN_BASE_VAL_TBL=[3,4,
5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258];gf.DIST_EXTRA_BITS_TBL=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,-1,-1];gf.DIST_BASE_VAL_TBL=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];gf.CODE_LENGTHS_POS=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ii.p1=0;ii.readPos=0;ii.tokenMin=0;ii.tokenMax=0;fb.OPTION_REVOKE_URL=1;fb.activeRequests=0;fb.requestLimit=17;fb.requestQueue=
new Sa;Pb.dummyCharacter="\u007f";Pb.windowID=0;qg.DICTIONARY="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");qg.EXTENDED_DICTIONARY=function(a){a=[];for(var b=0,c=qg.DICTIONARY;b<c.length;){var d=c[b];++b;for(var e=0,f=qg.DICTIONARY;e<f.length;){var g=f[e];++e;a.push(d+g)}}return a}(this);Bf.MUL_TABLE=[1,171,205,293,57,373,79,137,241,27,391,357,41,19,283,265,497,469,443,421,25,191,365,349,335,161,155,149,9,278,269,261,505,245,475,231,449,437,213,415,405,395,193,377,369,
361,353,345,169,331,325,319,313,307,301,37,145,285,281,69,271,267,263,259,509,501,493,243,479,118,465,459,113,446,55,435,429,423,209,413,51,403,199,393,97,3,379,375,371,367,363,359,355,351,347,43,85,337,333,165,327,323,5,317,157,311,77,305,303,75,297,294,73,289,287,71,141,279,277,275,68,135,67,133,33,262,260,129,511,507,503,499,495,491,61,121,481,477,237,235,467,232,115,457,227,451,7,445,221,439,218,433,215,427,425,211,419,417,207,411,409,203,202,401,399,396,197,49,389,387,385,383,95,189,47,187,93,
185,23,183,91,181,45,179,89,177,11,175,87,173,345,343,341,339,337,21,167,83,331,329,327,163,81,323,321,319,159,79,315,313,39,155,309,307,153,305,303,151,75,299,149,37,295,147,73,291,145,289,287,143,285,71,141,281,35,279,139,69,275,137,273,17,271,135,269,267,133,265,33,263,131,261,130,259,129,257,1];Bf.SHG_TABLE=[0,9,10,11,9,12,10,11,12,9,13,13,10,9,13,13,14,14,14,14,10,13,14,14,14,13,13,13,9,14,14,14,15,14,15,14,15,15,14,15,15,15,14,15,15,15,15,15,14,15,15,15,15,15,15,12,14,15,15,13,15,15,15,15,16,
16,16,15,16,14,16,16,14,16,13,16,16,16,15,16,13,16,15,16,14,9,16,16,16,16,16,16,16,16,16,13,14,16,16,15,16,16,10,16,15,16,14,16,16,14,16,16,14,16,16,14,15,16,16,16,14,15,14,15,13,16,16,15,17,17,17,17,17,17,14,15,17,17,16,16,17,16,15,17,16,17,11,17,16,17,16,17,16,17,17,16,17,17,16,17,17,16,16,17,17,17,16,14,17,17,17,17,15,16,14,16,15,16,13,16,15,16,14,16,15,16,12,16,15,16,17,17,17,17,17,13,16,15,17,17,17,16,15,17,17,17,16,15,17,17,14,16,17,17,16,17,17,16,15,17,16,14,17,16,15,17,16,17,17,16,17,15,16,
17,14,17,16,15,17,16,17,13,17,16,17,17,16,17,14,17,16,17,16,17,16,17,9];sg.minCodePoint=0;sg.maxCodePoint=1114111;sg.minHighSurrogate=55296;sg.maxHighSurrogate=56319;sg.minLowSurrogate=56320;sg.maxLowSurrogate=57343;Uq.FT_LOAD_FORCE_AUTOHINT=32;t.DEPTH_BUFFER_BIT=256;t.STENCIL_BUFFER_BIT=1024;t.COLOR_BUFFER_BIT=16384;t.POINTS=0;t.LINES=1;t.LINE_LOOP=2;t.LINE_STRIP=3;t.TRIANGLES=4;t.TRIANGLE_STRIP=5;t.TRIANGLE_FAN=6;t.ZERO=0;t.ONE=1;t.SRC_COLOR=768;t.ONE_MINUS_SRC_COLOR=769;t.SRC_ALPHA=770;t.ONE_MINUS_SRC_ALPHA=
771;t.DST_ALPHA=772;t.ONE_MINUS_DST_ALPHA=773;t.DST_COLOR=774;t.ONE_MINUS_DST_COLOR=775;t.SRC_ALPHA_SATURATE=776;t.FUNC_ADD=32774;t.BLEND_EQUATION=32777;t.BLEND_EQUATION_RGB=32777;t.BLEND_EQUATION_ALPHA=34877;t.FUNC_SUBTRACT=32778;t.FUNC_REVERSE_SUBTRACT=32779;t.BLEND_DST_RGB=32968;t.BLEND_SRC_RGB=32969;t.BLEND_DST_ALPHA=32970;t.BLEND_SRC_ALPHA=32971;t.CONSTANT_COLOR=32769;t.ONE_MINUS_CONSTANT_COLOR=32770;t.CONSTANT_ALPHA=32771;t.ONE_MINUS_CONSTANT_ALPHA=32772;t.BLEND_COLOR=32773;t.ARRAY_BUFFER=34962;
t.ELEMENT_ARRAY_BUFFER=34963;t.ARRAY_BUFFER_BINDING=34964;t.ELEMENT_ARRAY_BUFFER_BINDING=34965;t.STREAM_DRAW=35040;t.STATIC_DRAW=35044;t.DYNAMIC_DRAW=35048;t.BUFFER_SIZE=34660;t.BUFFER_USAGE=34661;t.CURRENT_VERTEX_ATTRIB=34342;t.FRONT=1028;t.BACK=1029;t.FRONT_AND_BACK=1032;t.CULL_FACE=2884;t.BLEND=3042;t.DITHER=3024;t.STENCIL_TEST=2960;t.DEPTH_TEST=2929;t.SCISSOR_TEST=3089;t.POLYGON_OFFSET_FILL=32823;t.SAMPLE_ALPHA_TO_COVERAGE=32926;t.SAMPLE_COVERAGE=32928;t.NO_ERROR=0;t.INVALID_ENUM=1280;t.INVALID_VALUE=
1281;t.INVALID_OPERATION=1282;t.OUT_OF_MEMORY=1285;t.CW=2304;t.CCW=2305;t.LINE_WIDTH=2849;t.ALIASED_POINT_SIZE_RANGE=33901;t.ALIASED_LINE_WIDTH_RANGE=33902;t.CULL_FACE_MODE=2885;t.FRONT_FACE=2886;t.DEPTH_RANGE=2928;t.DEPTH_WRITEMASK=2930;t.DEPTH_CLEAR_VALUE=2931;t.DEPTH_FUNC=2932;t.STENCIL_CLEAR_VALUE=2961;t.STENCIL_FUNC=2962;t.STENCIL_FAIL=2964;t.STENCIL_PASS_DEPTH_FAIL=2965;t.STENCIL_PASS_DEPTH_PASS=2966;t.STENCIL_REF=2967;t.STENCIL_VALUE_MASK=2963;t.STENCIL_WRITEMASK=2968;t.STENCIL_BACK_FUNC=34816;
t.STENCIL_BACK_FAIL=34817;t.STENCIL_BACK_PASS_DEPTH_FAIL=34818;t.STENCIL_BACK_PASS_DEPTH_PASS=34819;t.STENCIL_BACK_REF=36003;t.STENCIL_BACK_VALUE_MASK=36004;t.STENCIL_BACK_WRITEMASK=36005;t.VIEWPORT=2978;t.SCISSOR_BOX=3088;t.COLOR_CLEAR_VALUE=3106;t.COLOR_WRITEMASK=3107;t.UNPACK_ALIGNMENT=3317;t.PACK_ALIGNMENT=3333;t.MAX_TEXTURE_SIZE=3379;t.MAX_VIEWPORT_DIMS=3386;t.SUBPIXEL_BITS=3408;t.RED_BITS=3410;t.GREEN_BITS=3411;t.BLUE_BITS=3412;t.ALPHA_BITS=3413;t.DEPTH_BITS=3414;t.STENCIL_BITS=3415;t.POLYGON_OFFSET_UNITS=
10752;t.POLYGON_OFFSET_FACTOR=32824;t.TEXTURE_BINDING_2D=32873;t.SAMPLE_BUFFERS=32936;t.SAMPLES=32937;t.SAMPLE_COVERAGE_VALUE=32938;t.SAMPLE_COVERAGE_INVERT=32939;t.NUM_COMPRESSED_TEXTURE_FORMATS=34466;t.COMPRESSED_TEXTURE_FORMATS=34467;t.DONT_CARE=4352;t.FASTEST=4353;t.NICEST=4354;t.GENERATE_MIPMAP_HINT=33170;t.BYTE=5120;t.UNSIGNED_BYTE=5121;t.SHORT=5122;t.UNSIGNED_SHORT=5123;t.INT=5124;t.UNSIGNED_INT=5125;t.FLOAT=5126;t.DEPTH_COMPONENT=6402;t.ALPHA=6406;t.RGB=6407;t.RGBA=6408;t.LUMINANCE=6409;t.LUMINANCE_ALPHA=
6410;t.UNSIGNED_SHORT_4_4_4_4=32819;t.UNSIGNED_SHORT_5_5_5_1=32820;t.UNSIGNED_SHORT_5_6_5=33635;t.FRAGMENT_SHADER=35632;t.VERTEX_SHADER=35633;t.MAX_VERTEX_ATTRIBS=34921;t.MAX_VERTEX_UNIFORM_VECTORS=36347;t.MAX_VARYING_VECTORS=36348;t.MAX_COMBINED_TEXTURE_IMAGE_UNITS=35661;t.MAX_VERTEX_TEXTURE_IMAGE_UNITS=35660;t.MAX_TEXTURE_IMAGE_UNITS=34930;t.MAX_FRAGMENT_UNIFORM_VECTORS=36349;t.SHADER_TYPE=35663;t.DELETE_STATUS=35712;t.LINK_STATUS=35714;t.VALIDATE_STATUS=35715;t.ATTACHED_SHADERS=35717;t.ACTIVE_UNIFORMS=
35718;t.ACTIVE_ATTRIBUTES=35721;t.SHADING_LANGUAGE_VERSION=35724;t.CURRENT_PROGRAM=35725;t.NEVER=512;t.LESS=513;t.EQUAL=514;t.LEQUAL=515;t.GREATER=516;t.NOTEQUAL=517;t.GEQUAL=518;t.ALWAYS=519;t.KEEP=7680;t.REPLACE=7681;t.INCR=7682;t.DECR=7683;t.INVERT=5386;t.INCR_WRAP=34055;t.DECR_WRAP=34056;t.VENDOR=7936;t.RENDERER=7937;t.VERSION=7938;t.EXTENSIONS=7939;t.NEAREST=9728;t.LINEAR=9729;t.NEAREST_MIPMAP_NEAREST=9984;t.LINEAR_MIPMAP_NEAREST=9985;t.NEAREST_MIPMAP_LINEAR=9986;t.LINEAR_MIPMAP_LINEAR=9987;
t.TEXTURE_MAG_FILTER=10240;t.TEXTURE_MIN_FILTER=10241;t.TEXTURE_WRAP_S=10242;t.TEXTURE_WRAP_T=10243;t.TEXTURE_2D=3553;t.TEXTURE=5890;t.TEXTURE_CUBE_MAP=34067;t.TEXTURE_BINDING_CUBE_MAP=34068;t.TEXTURE_CUBE_MAP_POSITIVE_X=34069;t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070;t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071;t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072;t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073;t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074;t.MAX_CUBE_MAP_TEXTURE_SIZE=34076;t.TEXTURE0=33984;t.TEXTURE1=33985;t.TEXTURE2=33986;t.TEXTURE3=
33987;t.TEXTURE4=33988;t.TEXTURE5=33989;t.TEXTURE6=33990;t.TEXTURE7=33991;t.TEXTURE8=33992;t.TEXTURE9=33993;t.TEXTURE10=33994;t.TEXTURE11=33995;t.TEXTURE12=33996;t.TEXTURE13=33997;t.TEXTURE14=33998;t.TEXTURE15=33999;t.TEXTURE16=34E3;t.TEXTURE17=34001;t.TEXTURE18=34002;t.TEXTURE19=34003;t.TEXTURE20=34004;t.TEXTURE21=34005;t.TEXTURE22=34006;t.TEXTURE23=34007;t.TEXTURE24=34008;t.TEXTURE25=34009;t.TEXTURE26=34010;t.TEXTURE27=34011;t.TEXTURE28=34012;t.TEXTURE29=34013;t.TEXTURE30=34014;t.TEXTURE31=34015;
t.ACTIVE_TEXTURE=34016;t.REPEAT=10497;t.CLAMP_TO_EDGE=33071;t.MIRRORED_REPEAT=33648;t.FLOAT_VEC2=35664;t.FLOAT_VEC3=35665;t.FLOAT_VEC4=35666;t.INT_VEC2=35667;t.INT_VEC3=35668;t.INT_VEC4=35669;t.BOOL=35670;t.BOOL_VEC2=35671;t.BOOL_VEC3=35672;t.BOOL_VEC4=35673;t.FLOAT_MAT2=35674;t.FLOAT_MAT3=35675;t.FLOAT_MAT4=35676;t.SAMPLER_2D=35678;t.SAMPLER_CUBE=35680;t.VERTEX_ATTRIB_ARRAY_ENABLED=34338;t.VERTEX_ATTRIB_ARRAY_SIZE=34339;t.VERTEX_ATTRIB_ARRAY_STRIDE=34340;t.VERTEX_ATTRIB_ARRAY_TYPE=34341;t.VERTEX_ATTRIB_ARRAY_NORMALIZED=
34922;t.VERTEX_ATTRIB_ARRAY_POINTER=34373;t.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING=34975;t.IMPLEMENTATION_COLOR_READ_TYPE=35738;t.IMPLEMENTATION_COLOR_READ_FORMAT=35739;t.VERTEX_PROGRAM_POINT_SIZE=34370;t.POINT_SPRITE=34913;t.COMPILE_STATUS=35713;t.LOW_FLOAT=36336;t.MEDIUM_FLOAT=36337;t.HIGH_FLOAT=36338;t.LOW_INT=36339;t.MEDIUM_INT=36340;t.HIGH_INT=36341;t.FRAMEBUFFER=36160;t.RENDERBUFFER=36161;t.RGBA4=32854;t.RGB5_A1=32855;t.RGB565=36194;t.DEPTH_COMPONENT16=33189;t.STENCIL_INDEX=6401;t.STENCIL_INDEX8=
36168;t.DEPTH_STENCIL=34041;t.RENDERBUFFER_WIDTH=36162;t.RENDERBUFFER_HEIGHT=36163;t.RENDERBUFFER_INTERNAL_FORMAT=36164;t.RENDERBUFFER_RED_SIZE=36176;t.RENDERBUFFER_GREEN_SIZE=36177;t.RENDERBUFFER_BLUE_SIZE=36178;t.RENDERBUFFER_ALPHA_SIZE=36179;t.RENDERBUFFER_DEPTH_SIZE=36180;t.RENDERBUFFER_STENCIL_SIZE=36181;t.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE=36048;t.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME=36049;t.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL=36050;t.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE=36051;t.COLOR_ATTACHMENT0=
36064;t.DEPTH_ATTACHMENT=36096;t.STENCIL_ATTACHMENT=36128;t.DEPTH_STENCIL_ATTACHMENT=33306;t.NONE=0;t.FRAMEBUFFER_COMPLETE=36053;t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT=36054;t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT=36055;t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS=36057;t.FRAMEBUFFER_UNSUPPORTED=36061;t.FRAMEBUFFER_BINDING=36006;t.RENDERBUFFER_BINDING=36007;t.MAX_RENDERBUFFER_SIZE=34024;t.INVALID_FRAMEBUFFER_OPERATION=1286;t.UNPACK_FLIP_Y_WEBGL=37440;t.UNPACK_PREMULTIPLY_ALPHA_WEBGL=37441;t.CONTEXT_LOST_WEBGL=
37442;t.UNPACK_COLORSPACE_CONVERSION_WEBGL=37443;t.BROWSER_DEFAULT_WEBGL=37444;t.READ_BUFFER=3074;t.UNPACK_ROW_LENGTH=3314;t.UNPACK_SKIP_ROWS=3315;t.UNPACK_SKIP_PIXELS=3316;t.PACK_ROW_LENGTH=3330;t.PACK_SKIP_ROWS=3331;t.PACK_SKIP_PIXELS=3332;t.TEXTURE_BINDING_3D=32874;t.UNPACK_SKIP_IMAGES=32877;t.UNPACK_IMAGE_HEIGHT=32878;t.MAX_3D_TEXTURE_SIZE=32883;t.MAX_ELEMENTS_VERTICES=33E3;t.MAX_ELEMENTS_INDICES=33001;t.MAX_TEXTURE_LOD_BIAS=34045;t.MAX_FRAGMENT_UNIFORM_COMPONENTS=35657;t.MAX_VERTEX_UNIFORM_COMPONENTS=
35658;t.MAX_ARRAY_TEXTURE_LAYERS=35071;t.MIN_PROGRAM_TEXEL_OFFSET=35076;t.MAX_PROGRAM_TEXEL_OFFSET=35077;t.MAX_VARYING_COMPONENTS=35659;t.FRAGMENT_SHADER_DERIVATIVE_HINT=35723;t.RASTERIZER_DISCARD=35977;t.VERTEX_ARRAY_BINDING=34229;t.MAX_VERTEX_OUTPUT_COMPONENTS=37154;t.MAX_FRAGMENT_INPUT_COMPONENTS=37157;t.MAX_SERVER_WAIT_TIMEOUT=37137;t.MAX_ELEMENT_INDEX=36203;t.RED=6403;t.RGB8=32849;t.RGBA8=32856;t.RGB10_A2=32857;t.TEXTURE_3D=32879;t.TEXTURE_WRAP_R=32882;t.TEXTURE_MIN_LOD=33082;t.TEXTURE_MAX_LOD=
33083;t.TEXTURE_BASE_LEVEL=33084;t.TEXTURE_MAX_LEVEL=33085;t.TEXTURE_COMPARE_MODE=34892;t.TEXTURE_COMPARE_FUNC=34893;t.SRGB=35904;t.SRGB8=35905;t.SRGB8_ALPHA8=35907;t.COMPARE_REF_TO_TEXTURE=34894;t.RGBA32F=34836;t.RGB32F=34837;t.RGBA16F=34842;t.RGB16F=34843;t.TEXTURE_2D_ARRAY=35866;t.TEXTURE_BINDING_2D_ARRAY=35869;t.R11F_G11F_B10F=35898;t.RGB9_E5=35901;t.RGBA32UI=36208;t.RGB32UI=36209;t.RGBA16UI=36214;t.RGB16UI=36215;t.RGBA8UI=36220;t.RGB8UI=36221;t.RGBA32I=36226;t.RGB32I=36227;t.RGBA16I=36232;t.RGB16I=
36233;t.RGBA8I=36238;t.RGB8I=36239;t.RED_INTEGER=36244;t.RGB_INTEGER=36248;t.RGBA_INTEGER=36249;t.R8=33321;t.RG8=33323;t.R16F=33325;t.R32F=33326;t.RG16F=33327;t.RG32F=33328;t.R8I=33329;t.R8UI=33330;t.R16I=33331;t.R16UI=33332;t.R32I=33333;t.R32UI=33334;t.RG8I=33335;t.RG8UI=33336;t.RG16I=33337;t.RG16UI=33338;t.RG32I=33339;t.RG32UI=33340;t.R8_SNORM=36756;t.RG8_SNORM=36757;t.RGB8_SNORM=36758;t.RGBA8_SNORM=36759;t.RGB10_A2UI=36975;t.TEXTURE_IMMUTABLE_FORMAT=37167;t.TEXTURE_IMMUTABLE_LEVELS=33503;t.UNSIGNED_INT_2_10_10_10_REV=
33640;t.UNSIGNED_INT_10F_11F_11F_REV=35899;t.UNSIGNED_INT_5_9_9_9_REV=35902;t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269;t.UNSIGNED_INT_24_8=34042;t.HALF_FLOAT=5131;t.RG=33319;t.RG_INTEGER=33320;t.INT_2_10_10_10_REV=36255;t.CURRENT_QUERY=34917;t.QUERY_RESULT=34918;t.QUERY_RESULT_AVAILABLE=34919;t.ANY_SAMPLES_PASSED=35887;t.ANY_SAMPLES_PASSED_CONSERVATIVE=36202;t.MAX_DRAW_BUFFERS=34852;t.DRAW_BUFFER0=34853;t.DRAW_BUFFER1=34854;t.DRAW_BUFFER2=34855;t.DRAW_BUFFER3=34856;t.DRAW_BUFFER4=34857;t.DRAW_BUFFER5=
34858;t.DRAW_BUFFER6=34859;t.DRAW_BUFFER7=34860;t.DRAW_BUFFER8=34861;t.DRAW_BUFFER9=34862;t.DRAW_BUFFER10=34863;t.DRAW_BUFFER11=34864;t.DRAW_BUFFER12=34865;t.DRAW_BUFFER13=34866;t.DRAW_BUFFER14=34867;t.DRAW_BUFFER15=34868;t.MAX_COLOR_ATTACHMENTS=36063;t.COLOR_ATTACHMENT1=36065;t.COLOR_ATTACHMENT2=36066;t.COLOR_ATTACHMENT3=36067;t.COLOR_ATTACHMENT4=36068;t.COLOR_ATTACHMENT5=36069;t.COLOR_ATTACHMENT6=36070;t.COLOR_ATTACHMENT7=36071;t.COLOR_ATTACHMENT8=36072;t.COLOR_ATTACHMENT9=36073;t.COLOR_ATTACHMENT10=
36074;t.COLOR_ATTACHMENT11=36075;t.COLOR_ATTACHMENT12=36076;t.COLOR_ATTACHMENT13=36077;t.COLOR_ATTACHMENT14=36078;t.COLOR_ATTACHMENT15=36079;t.SAMPLER_3D=35679;t.SAMPLER_2D_SHADOW=35682;t.SAMPLER_2D_ARRAY=36289;t.SAMPLER_2D_ARRAY_SHADOW=36292;t.SAMPLER_CUBE_SHADOW=36293;t.INT_SAMPLER_2D=36298;t.INT_SAMPLER_3D=36299;t.INT_SAMPLER_CUBE=36300;t.INT_SAMPLER_2D_ARRAY=36303;t.UNSIGNED_INT_SAMPLER_2D=36306;t.UNSIGNED_INT_SAMPLER_3D=36307;t.UNSIGNED_INT_SAMPLER_CUBE=36308;t.UNSIGNED_INT_SAMPLER_2D_ARRAY=
36311;t.MAX_SAMPLES=36183;t.SAMPLER_BINDING=35097;t.PIXEL_PACK_BUFFER=35051;t.PIXEL_UNPACK_BUFFER=35052;t.PIXEL_PACK_BUFFER_BINDING=35053;t.PIXEL_UNPACK_BUFFER_BINDING=35055;t.COPY_READ_BUFFER=36662;t.COPY_WRITE_BUFFER=36663;t.COPY_READ_BUFFER_BINDING=36662;t.COPY_WRITE_BUFFER_BINDING=36663;t.FLOAT_MAT2x3=35685;t.FLOAT_MAT2x4=35686;t.FLOAT_MAT3x2=35687;t.FLOAT_MAT3x4=35688;t.FLOAT_MAT4x2=35689;t.FLOAT_MAT4x3=35690;t.UNSIGNED_INT_VEC2=36294;t.UNSIGNED_INT_VEC3=36295;t.UNSIGNED_INT_VEC4=36296;t.UNSIGNED_NORMALIZED=
35863;t.SIGNED_NORMALIZED=36764;t.VERTEX_ATTRIB_ARRAY_INTEGER=35069;t.VERTEX_ATTRIB_ARRAY_DIVISOR=35070;t.TRANSFORM_FEEDBACK_BUFFER_MODE=35967;t.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS=35968;t.TRANSFORM_FEEDBACK_VARYINGS=35971;t.TRANSFORM_FEEDBACK_BUFFER_START=35972;t.TRANSFORM_FEEDBACK_BUFFER_SIZE=35973;t.TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN=35976;t.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS=35978;t.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS=35979;t.INTERLEAVED_ATTRIBS=35980;t.SEPARATE_ATTRIBS=
35981;t.TRANSFORM_FEEDBACK_BUFFER=35982;t.TRANSFORM_FEEDBACK_BUFFER_BINDING=35983;t.TRANSFORM_FEEDBACK=36386;t.TRANSFORM_FEEDBACK_PAUSED=36387;t.TRANSFORM_FEEDBACK_ACTIVE=36388;t.TRANSFORM_FEEDBACK_BINDING=36389;t.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING=33296;t.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE=33297;t.FRAMEBUFFER_ATTACHMENT_RED_SIZE=33298;t.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE=33299;t.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE=33300;t.FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE=33301;t.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE=
33302;t.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE=33303;t.FRAMEBUFFER_DEFAULT=33304;t.DEPTH24_STENCIL8=35056;t.DRAW_FRAMEBUFFER_BINDING=36006;t.READ_FRAMEBUFFER=36008;t.DRAW_FRAMEBUFFER=36009;t.READ_FRAMEBUFFER_BINDING=36010;t.RENDERBUFFER_SAMPLES=36011;t.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER=36052;t.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE=36182;t.UNIFORM_BUFFER=35345;t.UNIFORM_BUFFER_BINDING=35368;t.UNIFORM_BUFFER_START=35369;t.UNIFORM_BUFFER_SIZE=35370;t.MAX_VERTEX_UNIFORM_BLOCKS=35371;t.MAX_FRAGMENT_UNIFORM_BLOCKS=
35373;t.MAX_COMBINED_UNIFORM_BLOCKS=35374;t.MAX_UNIFORM_BUFFER_BINDINGS=35375;t.MAX_UNIFORM_BLOCK_SIZE=35376;t.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS=35377;t.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS=35379;t.UNIFORM_BUFFER_OFFSET_ALIGNMENT=35380;t.ACTIVE_UNIFORM_BLOCKS=35382;t.UNIFORM_TYPE=35383;t.UNIFORM_SIZE=35384;t.UNIFORM_BLOCK_INDEX=35386;t.UNIFORM_OFFSET=35387;t.UNIFORM_ARRAY_STRIDE=35388;t.UNIFORM_MATRIX_STRIDE=35389;t.UNIFORM_IS_ROW_MAJOR=35390;t.UNIFORM_BLOCK_BINDING=35391;t.UNIFORM_BLOCK_DATA_SIZE=
35392;t.UNIFORM_BLOCK_ACTIVE_UNIFORMS=35394;t.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES=35395;t.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER=35396;t.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER=35398;t.OBJECT_TYPE=37138;t.SYNC_CONDITION=37139;t.SYNC_STATUS=37140;t.SYNC_FLAGS=37141;t.SYNC_FENCE=37142;t.SYNC_GPU_COMMANDS_COMPLETE=37143;t.UNSIGNALED=37144;t.SIGNALED=37145;t.ALREADY_SIGNALED=37146;t.TIMEOUT_EXPIRED=37147;t.CONDITION_SATISFIED=37148;t.WAIT_FAILED=37149;t.SYNC_FLUSH_COMMANDS_BIT=1;t.COLOR=6144;
t.DEPTH=6145;t.STENCIL=6146;t.MIN=32775;t.MAX=32776;t.DEPTH_COMPONENT24=33190;t.STREAM_READ=35041;t.STREAM_COPY=35042;t.STATIC_READ=35045;t.STATIC_COPY=35046;t.DYNAMIC_READ=35049;t.DYNAMIC_COPY=35050;t.DEPTH_COMPONENT32F=36012;t.DEPTH32F_STENCIL8=36013;t.INVALID_INDEX=-1;t.TIMEOUT_IGNORED=-1;t.MAX_CLIENT_WAIT_TIMEOUT_WEBGL=37447;Hb.__identity=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];oa.__identity=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Pc.audioSources=[];Pc.sourcesToRemove=[];jl.ID=0;H.NONE=0;H.FALSE=
0;H.TRUE=1;H.SOURCE_RELATIVE=514;H.CONE_INNER_ANGLE=4097;H.CONE_OUTER_ANGLE=4098;H.PITCH=4099;H.POSITION=4100;H.DIRECTION=4101;H.VELOCITY=4102;H.LOOPING=4103;H.BUFFER=4105;H.GAIN=4106;H.MIN_GAIN=4109;H.MAX_GAIN=4110;H.ORIENTATION=4111;H.SOURCE_STATE=4112;H.INITIAL=4113;H.PLAYING=4114;H.PAUSED=4115;H.STOPPED=4116;H.BUFFERS_QUEUED=4117;H.BUFFERS_PROCESSED=4118;H.REFERENCE_DISTANCE=4128;H.ROLLOFF_FACTOR=4129;H.CONE_OUTER_GAIN=4130;H.MAX_DISTANCE=4131;H.SEC_OFFSET=4132;H.SAMPLE_OFFSET=4133;H.BYTE_OFFSET=
4134;H.SOURCE_TYPE=4135;H.STATIC=4136;H.STREAMING=4137;H.UNDETERMINED=4144;H.FORMAT_MONO8=4352;H.FORMAT_MONO16=4353;H.FORMAT_STEREO8=4354;H.FORMAT_STEREO16=4355;H.FREQUENCY=8193;H.BITS=8194;H.CHANNELS=8195;H.SIZE=8196;H.NO_ERROR=0;H.INVALID_NAME=40961;H.INVALID_ENUM=40962;H.INVALID_VALUE=40963;H.INVALID_OPERATION=40964;H.OUT_OF_MEMORY=40965;H.VENDOR=45057;H.VERSION=45058;H.RENDERER=45059;H.EXTENSIONS=45060;H.DOPPLER_FACTOR=49152;H.SPEED_OF_SOUND=49155;H.DOPPLER_VELOCITY=49153;H.DISTANCE_MODEL=53248;
H.INVERSE_DISTANCE=53249;H.INVERSE_DISTANCE_CLAMPED=53250;H.LINEAR_DISTANCE=53251;H.LINEAR_DISTANCE_CLAMPED=53252;H.EXPONENT_DISTANCE=53253;H.EXPONENT_DISTANCE_CLAMPED=53254;H.METERS_PER_UNIT=131076;H.DIRECT_FILTER=131077;H.AUXILIARY_SEND_FILTER=131078;H.AIR_ABSORPTION_FACTOR=131079;H.ROOM_ROLLOFF_FACTOR=131080;H.CONE_OUTER_GAINHF=131081;H.DIRECT_FILTER_GAINHF_AUTO=131082;H.AUXILIARY_SEND_FILTER_GAIN_AUTO=131083;H.AUXILIARY_SEND_FILTER_GAINHF_AUTO=131084;H.REVERB_DENSITY=1;H.REVERB_DIFFUSION=2;H.REVERB_GAIN=
3;H.REVERB_GAINHF=4;H.REVERB_DECAY_TIME=5;H.REVERB_DECAY_HFRATIO=6;H.REVERB_REFLECTIONS_GAIN=7;H.REVERB_REFLECTIONS_DELAY=8;H.REVERB_LATE_REVERB_GAIN=9;H.REVERB_LATE_REVERB_DELAY=10;H.REVERB_AIR_ABSORPTION_GAINHF=11;H.REVERB_ROOM_ROLLOFF_FACTOR=12;H.REVERB_DECAY_HFLIMIT=13;H.EAXREVERB_DENSITY=1;H.EAXREVERB_DIFFUSION=2;H.EAXREVERB_GAIN=3;H.EAXREVERB_GAINHF=4;H.EAXREVERB_GAINLF=5;H.EAXREVERB_DECAY_TIME=6;H.EAXREVERB_DECAY_HFRATIO=7;H.EAXREVERB_DECAY_LFRATIO=8;H.EAXREVERB_REFLECTIONS_GAIN=9;H.EAXREVERB_REFLECTIONS_DELAY=
10;H.EAXREVERB_REFLECTIONS_PAN=11;H.EAXREVERB_LATE_REVERB_GAIN=12;H.EAXREVERB_LATE_REVERB_DELAY=13;H.EAXREVERB_LATE_REVERB_PAN=14;H.EAXREVERB_ECHO_TIME=15;H.EAXREVERB_ECHO_DEPTH=16;H.EAXREVERB_MODULATION_TIME=17;H.EAXREVERB_MODULATION_DEPTH=18;H.EAXREVERB_AIR_ABSORPTION_GAINHF=19;H.EAXREVERB_HFREFERENCE=20;H.EAXREVERB_LFREFERENCE=21;H.EAXREVERB_ROOM_ROLLOFF_FACTOR=22;H.EAXREVERB_DECAY_HFLIMIT=23;H.CHORUS_WAVEFORM=1;H.CHORUS_PHASE=2;H.CHORUS_RATE=3;H.CHORUS_DEPTH=4;H.CHORUS_FEEDBACK=5;H.CHORUS_DELAY=
6;H.DISTORTION_EDGE=1;H.DISTORTION_GAIN=2;H.DISTORTION_LOWPASS_CUTOFF=3;H.DISTORTION_EQCENTER=4;H.DISTORTION_EQBANDWIDTH=5;H.ECHO_DELAY=1;H.ECHO_LRDELAY=2;H.ECHO_DAMPING=3;H.ECHO_FEEDBACK=4;H.ECHO_SPREAD=5;H.FLANGER_WAVEFORM=1;H.FLANGER_PHASE=2;H.FLANGER_RATE=3;H.FLANGER_DEPTH=4;H.FLANGER_FEEDBACK=5;H.FLANGER_DELAY=6;H.FREQUENCY_SHIFTER_FREQUENCY=1;H.FREQUENCY_SHIFTER_LEFT_DIRECTION=2;H.FREQUENCY_SHIFTER_RIGHT_DIRECTION=3;H.VOCAL_MORPHER_PHONEMEA=1;H.VOCAL_MORPHER_PHONEMEA_COARSE_TUNING=2;H.VOCAL_MORPHER_PHONEMEB=
3;H.VOCAL_MORPHER_PHONEMEB_COARSE_TUNING=4;H.VOCAL_MORPHER_WAVEFORM=5;H.VOCAL_MORPHER_RATE=6;H.PITCH_SHIFTER_COARSE_TUNE=1;H.PITCH_SHIFTER_FINE_TUNE=2;H.RING_MODULATOR_FREQUENCY=1;H.RING_MODULATOR_HIGHPASS_CUTOFF=2;H.RING_MODULATOR_WAVEFORM=3;H.AUTOWAH_ATTACK_TIME=1;H.AUTOWAH_RELEASE_TIME=2;H.AUTOWAH_RESONANCE=3;H.AUTOWAH_PEAK_GAIN=4;H.COMPRESSOR_ONOFF=1;H.EQUALIZER_LOW_GAIN=1;H.EQUALIZER_LOW_CUTOFF=2;H.EQUALIZER_MID1_GAIN=3;H.EQUALIZER_MID1_CENTER=4;H.EQUALIZER_MID1_WIDTH=5;H.EQUALIZER_MID2_GAIN=
6;H.EQUALIZER_MID2_CENTER=7;H.EQUALIZER_MID2_WIDTH=8;H.EQUALIZER_HIGH_GAIN=9;H.EQUALIZER_HIGH_CUTOFF=10;H.EFFECT_FIRST_PARAMETER=0;H.EFFECT_LAST_PARAMETER=32768;H.EFFECT_TYPE=32769;H.EFFECT_NULL=0;H.EFFECT_EAXREVERB=32768;H.EFFECT_REVERB=1;H.EFFECT_CHORUS=2;H.EFFECT_DISTORTION=3;H.EFFECT_ECHO=4;H.EFFECT_FLANGER=5;H.EFFECT_FREQUENCY_SHIFTER=6;H.EFFECT_VOCAL_MORPHER=7;H.EFFECT_PITCH_SHIFTER=8;H.EFFECT_RING_MODULATOR=9;H.FFECT_AUTOWAH=10;H.EFFECT_COMPRESSOR=11;H.EFFECT_EQUALIZER=12;H.EFFECTSLOT_EFFECT=
1;H.EFFECTSLOT_GAIN=2;H.EFFECTSLOT_AUXILIARY_SEND_AUTO=3;H.LOWPASS_GAIN=1;H.LOWPASS_GAINHF=2;H.HIGHPASS_GAIN=1;H.HIGHPASS_GAINLF=2;H.BANDPASS_GAIN=1;H.BANDPASS_GAINLF=2;H.BANDPASS_GAINHF=3;H.FILTER_FIRST_PARAMETER=0;H.FILTER_LAST_PARAMETER=32768;H.FILTER_TYPE=32769;H.FILTER_NULL=0;H.FILTER_LOWPASS=1;H.FILTER_HIGHPASS=2;H.FILTER_BANDPASS=3;Jb.FALSE=0;Jb.TRUE=1;Jb.FREQUENCY=4103;Jb.REFRESH=4104;Jb.SYNC=4105;Jb.MONO_SOURCES=4112;Jb.STEREO_SOURCES=4113;Jb.NO_ERROR=0;Jb.INVALID_DEVICE=40961;Jb.INVALID_CONTEXT=
40962;Jb.INVALID_ENUM=40963;Jb.INVALID_VALUE=40964;Jb.OUT_OF_MEMORY=40965;Jb.ATTRIBUTES_SIZE=4098;Jb.ALL_ATTRIBUTES=4099;Jb.DEFAULT_DEVICE_SPECIFIER=4100;Jb.DEVICE_SPECIFIER=4101;Jb.EXTENSIONS=4102;Jb.ENUMERATE_ALL_EXT=1;Jb.DEFAULT_ALL_DEVICES_SPECIFIER=4114;Jb.ALL_DEVICES_SPECIFIER=4115;He.onUpdate=new me;Qe.alreadyCreated=new ua;Qe.initialized=!1;pg.sensorByID=new Wa;pg.sensors=[];Ra.__directories=new Wa;le.devices=new Wa;le.onConnect=new Sq;Ri.LEFT_X=0;Ri.LEFT_Y=1;Ri.RIGHT_X=2;Ri.RIGHT_Y=3;Ri.TRIGGER_LEFT=
4;Ri.TRIGGER_RIGHT=5;sf.A=0;sf.B=1;sf.X=2;sf.Y=3;sf.BACK=4;sf.GUIDE=5;sf.START=6;sf.LEFT_STICK=7;sf.RIGHT_STICK=8;sf.LEFT_SHOULDER=9;sf.RIGHT_SHOULDER=10;sf.DPAD_UP=11;sf.DPAD_DOWN=12;sf.DPAD_LEFT=13;sf.DPAD_RIGHT=14;pd.devices=new Wa;pd.onConnect=new Tq;Ie.CENTER=0;Ie.DOWN=4;Ie.LEFT=8;Ie.RIGHT=2;Ie.UP=1;Ie.DOWN_LEFT=12;Ie.DOWN_RIGHT=6;Ie.UP_LEFT=9;Ie.UP_RIGHT=3;U.UNKNOWN=0;U.BACKSPACE=8;U.TAB=9;U.RETURN=13;U.ESCAPE=27;U.SPACE=32;U.EXCLAMATION=33;U.QUOTE=34;U.HASH=35;U.DOLLAR=36;U.PERCENT=37;U.AMPERSAND=
38;U.SINGLE_QUOTE=39;U.LEFT_PARENTHESIS=40;U.RIGHT_PARENTHESIS=41;U.ASTERISK=42;U.PLUS=43;U.COMMA=44;U.MINUS=45;U.PERIOD=46;U.SLASH=47;U.NUMBER_0=48;U.NUMBER_1=49;U.NUMBER_2=50;U.NUMBER_3=51;U.NUMBER_4=52;U.NUMBER_5=53;U.NUMBER_6=54;U.NUMBER_7=55;U.NUMBER_8=56;U.NUMBER_9=57;U.COLON=58;U.SEMICOLON=59;U.LESS_THAN=60;U.EQUALS=61;U.GREATER_THAN=62;U.QUESTION=63;U.AT=64;U.LEFT_BRACKET=91;U.BACKSLASH=92;U.RIGHT_BRACKET=93;U.CARET=94;U.UNDERSCORE=95;U.GRAVE=96;U.A=97;U.B=98;U.C=99;U.D=100;U.E=101;U.F=102;
U.G=103;U.H=104;U.I=105;U.J=106;U.K=107;U.L=108;U.M=109;U.N=110;U.O=111;U.P=112;U.Q=113;U.R=114;U.S=115;U.T=116;U.U=117;U.V=118;U.W=119;U.X=120;U.Y=121;U.Z=122;U.DELETE=127;U.CAPS_LOCK=1073741881;U.F1=1073741882;U.F2=1073741883;U.F3=1073741884;U.F4=1073741885;U.F5=1073741886;U.F6=1073741887;U.F7=1073741888;U.F8=1073741889;U.F9=1073741890;U.F10=1073741891;U.F11=1073741892;U.F12=1073741893;U.PRINT_SCREEN=1073741894;U.SCROLL_LOCK=1073741895;U.PAUSE=1073741896;U.INSERT=1073741897;U.HOME=1073741898;U.PAGE_UP=
1073741899;U.END=1073741901;U.PAGE_DOWN=1073741902;U.RIGHT=1073741903;U.LEFT=1073741904;U.DOWN=1073741905;U.UP=1073741906;U.NUM_LOCK=1073741907;U.NUMPAD_DIVIDE=1073741908;U.NUMPAD_MULTIPLY=1073741909;U.NUMPAD_MINUS=1073741910;U.NUMPAD_PLUS=1073741911;U.NUMPAD_ENTER=1073741912;U.NUMPAD_1=1073741913;U.NUMPAD_2=1073741914;U.NUMPAD_3=1073741915;U.NUMPAD_4=1073741916;U.NUMPAD_5=1073741917;U.NUMPAD_6=1073741918;U.NUMPAD_7=1073741919;U.NUMPAD_8=1073741920;U.NUMPAD_9=1073741921;U.NUMPAD_0=1073741922;U.NUMPAD_PERIOD=
1073741923;U.APPLICATION=1073741925;U.POWER=1073741926;U.NUMPAD_EQUALS=1073741927;U.F13=1073741928;U.F14=1073741929;U.F15=1073741930;U.F16=1073741931;U.F17=1073741932;U.F18=1073741933;U.F19=1073741934;U.F20=1073741935;U.F21=1073741936;U.F22=1073741937;U.F23=1073741938;U.F24=1073741939;U.EXECUTE=1073741940;U.HELP=1073741941;U.MENU=1073741942;U.SELECT=1073741943;U.STOP=1073741944;U.AGAIN=1073741945;U.UNDO=1073741946;U.CUT=1073741947;U.COPY=1073741948;U.PASTE=1073741949;U.FIND=1073741950;U.MUTE=1073741951;
U.VOLUME_UP=1073741952;U.VOLUME_DOWN=1073741953;U.NUMPAD_COMMA=1073741957;U.ALT_ERASE=1073741977;U.SYSTEM_REQUEST=1073741978;U.CANCEL=1073741979;U.CLEAR=1073741980;U.PRIOR=1073741981;U.RETURN2=1073741982;U.SEPARATOR=1073741983;U.OUT=1073741984;U.OPER=1073741985;U.CLEAR_AGAIN=1073741986;U.CRSEL=1073741987;U.EXSEL=1073741988;U.NUMPAD_00=1073742E3;U.NUMPAD_000=1073742001;U.THOUSAND_SEPARATOR=1073742002;U.DECIMAL_SEPARATOR=1073742003;U.CURRENCY_UNIT=1073742004;U.CURRENCY_SUBUNIT=1073742005;U.NUMPAD_LEFT_PARENTHESIS=
1073742006;U.NUMPAD_RIGHT_PARENTHESIS=1073742007;U.NUMPAD_LEFT_BRACE=1073742008;U.NUMPAD_RIGHT_BRACE=1073742009;U.NUMPAD_TAB=1073742010;U.NUMPAD_BACKSPACE=1073742011;U.NUMPAD_A=1073742012;U.NUMPAD_B=1073742013;U.NUMPAD_C=1073742014;U.NUMPAD_D=1073742015;U.NUMPAD_E=1073742016;U.NUMPAD_F=1073742017;U.NUMPAD_XOR=1073742018;U.NUMPAD_POWER=1073742019;U.NUMPAD_PERCENT=1073742020;U.NUMPAD_LESS_THAN=1073742021;U.NUMPAD_GREATER_THAN=1073742022;U.NUMPAD_AMPERSAND=1073742023;U.NUMPAD_DOUBLE_AMPERSAND=1073742024;
U.NUMPAD_VERTICAL_BAR=1073742025;U.NUMPAD_DOUBLE_VERTICAL_BAR=1073742026;U.NUMPAD_COLON=1073742027;U.NUMPAD_HASH=1073742028;U.NUMPAD_SPACE=1073742029;U.NUMPAD_AT=1073742030;U.NUMPAD_EXCLAMATION=1073742031;U.NUMPAD_MEM_STORE=1073742032;U.NUMPAD_MEM_RECALL=1073742033;U.NUMPAD_MEM_CLEAR=1073742034;U.NUMPAD_MEM_ADD=1073742035;U.NUMPAD_MEM_SUBTRACT=1073742036;U.NUMPAD_MEM_MULTIPLY=1073742037;U.NUMPAD_MEM_DIVIDE=1073742038;U.NUMPAD_PLUS_MINUS=1073742039;U.NUMPAD_CLEAR=1073742040;U.NUMPAD_CLEAR_ENTRY=1073742041;
U.NUMPAD_BINARY=1073742042;U.NUMPAD_OCTAL=1073742043;U.NUMPAD_DECIMAL=1073742044;U.NUMPAD_HEXADECIMAL=1073742045;U.LEFT_CTRL=1073742048;U.LEFT_SHIFT=1073742049;U.LEFT_ALT=1073742050;U.LEFT_META=1073742051;U.RIGHT_CTRL=1073742052;U.RIGHT_SHIFT=1073742053;U.RIGHT_ALT=1073742054;U.RIGHT_META=1073742055;U.MODE=1073742081;U.AUDIO_NEXT=1073742082;U.AUDIO_PREVIOUS=1073742083;U.AUDIO_STOP=1073742084;U.AUDIO_PLAY=1073742085;U.AUDIO_MUTE=1073742086;U.MEDIA_SELECT=1073742087;U.WWW=1073742088;U.MAIL=1073742089;
U.CALCULATOR=1073742090;U.COMPUTER=1073742091;U.APP_CONTROL_SEARCH=1073742092;U.APP_CONTROL_HOME=1073742093;U.APP_CONTROL_BACK=1073742094;U.APP_CONTROL_FORWARD=1073742095;U.APP_CONTROL_STOP=1073742096;U.APP_CONTROL_REFRESH=1073742097;U.APP_CONTROL_BOOKMARKS=1073742098;U.BRIGHTNESS_DOWN=1073742099;U.BRIGHTNESS_UP=1073742100;U.DISPLAY_SWITCH=1073742101;U.BACKLIGHT_TOGGLE=1073742102;U.BACKLIGHT_DOWN=1073742103;U.BACKLIGHT_UP=1073742104;U.EJECT=1073742105;U.SLEEP=1073742106;wb.NONE=0;wb.LEFT_SHIFT=1;
wb.RIGHT_SHIFT=2;wb.LEFT_CTRL=64;wb.RIGHT_CTRL=128;wb.LEFT_ALT=256;wb.RIGHT_ALT=512;wb.LEFT_META=1024;wb.RIGHT_META=2048;wb.NUM_LOCK=4096;wb.CAPS_LOCK=8192;wb.MODE=16384;wb.CTRL=192;wb.SHIFT=3;wb.ALT=768;wb.META=3072;W.UNKNOWN=0;W.BACKSPACE=42;W.TAB=43;W.RETURN=40;W.ESCAPE=41;W.SPACE=44;W.SINGLE_QUOTE=52;W.COMMA=54;W.MINUS=45;W.PERIOD=55;W.SLASH=56;W.NUMBER_0=39;W.NUMBER_1=30;W.NUMBER_2=31;W.NUMBER_3=32;W.NUMBER_4=33;W.NUMBER_5=34;W.NUMBER_6=35;W.NUMBER_7=36;W.NUMBER_8=37;W.NUMBER_9=38;W.SEMICOLON=
51;W.EQUALS=46;W.LEFT_BRACKET=47;W.BACKSLASH=49;W.RIGHT_BRACKET=48;W.GRAVE=53;W.A=4;W.B=5;W.C=6;W.D=7;W.E=8;W.F=9;W.G=10;W.H=11;W.I=12;W.J=13;W.K=14;W.L=15;W.M=16;W.N=17;W.O=18;W.P=19;W.Q=20;W.R=21;W.S=22;W.T=23;W.U=24;W.V=25;W.W=26;W.X=27;W.Y=28;W.Z=29;W.DELETE=76;W.CAPS_LOCK=57;W.F1=58;W.F2=59;W.F3=60;W.F4=61;W.F5=62;W.F6=63;W.F7=64;W.F8=65;W.F9=66;W.F10=67;W.F11=68;W.F12=69;W.PRINT_SCREEN=70;W.SCROLL_LOCK=71;W.PAUSE=72;W.INSERT=73;W.HOME=74;W.PAGE_UP=75;W.END=77;W.PAGE_DOWN=78;W.RIGHT=79;W.LEFT=
80;W.DOWN=81;W.UP=82;W.NUM_LOCK=83;W.NUMPAD_DIVIDE=84;W.NUMPAD_MULTIPLY=85;W.NUMPAD_MINUS=86;W.NUMPAD_PLUS=87;W.NUMPAD_ENTER=88;W.NUMPAD_1=89;W.NUMPAD_2=90;W.NUMPAD_3=91;W.NUMPAD_4=92;W.NUMPAD_5=93;W.NUMPAD_6=94;W.NUMPAD_7=95;W.NUMPAD_8=96;W.NUMPAD_9=97;W.NUMPAD_0=98;W.NUMPAD_PERIOD=99;W.APPLICATION=101;W.POWER=102;W.NUMPAD_EQUALS=103;W.F13=104;W.F14=105;W.F15=106;W.F16=107;W.F17=108;W.F18=109;W.F19=110;W.F20=111;W.F21=112;W.F22=113;W.F23=114;W.F24=115;W.EXECUTE=116;W.HELP=117;W.MENU=118;W.SELECT=
119;W.STOP=120;W.AGAIN=121;W.UNDO=122;W.CUT=123;W.COPY=124;W.PASTE=125;W.FIND=126;W.MUTE=127;W.VOLUME_UP=128;W.VOLUME_DOWN=129;W.NUMPAD_COMMA=133;W.ALT_ERASE=153;W.SYSTEM_REQUEST=154;W.CANCEL=155;W.CLEAR=156;W.PRIOR=157;W.RETURN2=158;W.SEPARATOR=159;W.OUT=160;W.OPER=161;W.CLEAR_AGAIN=162;W.CRSEL=163;W.EXSEL=164;W.NUMPAD_00=176;W.NUMPAD_000=177;W.THOUSAND_SEPARATOR=178;W.DECIMAL_SEPARATOR=179;W.CURRENCY_UNIT=180;W.CURRENCY_SUBUNIT=181;W.NUMPAD_LEFT_PARENTHESIS=182;W.NUMPAD_RIGHT_PARENTHESIS=183;W.NUMPAD_LEFT_BRACE=
184;W.NUMPAD_RIGHT_BRACE=185;W.NUMPAD_TAB=186;W.NUMPAD_BACKSPACE=187;W.NUMPAD_A=188;W.NUMPAD_B=189;W.NUMPAD_C=190;W.NUMPAD_D=191;W.NUMPAD_E=192;W.NUMPAD_F=193;W.NUMPAD_XOR=194;W.NUMPAD_POWER=195;W.NUMPAD_PERCENT=196;W.NUMPAD_LESS_THAN=197;W.NUMPAD_GREATER_THAN=198;W.NUMPAD_AMPERSAND=199;W.NUMPAD_DOUBLE_AMPERSAND=200;W.NUMPAD_VERTICAL_BAR=201;W.NUMPAD_DOUBLE_VERTICAL_BAR=202;W.NUMPAD_COLON=203;W.NUMPAD_HASH=204;W.NUMPAD_SPACE=205;W.NUMPAD_AT=206;W.NUMPAD_EXCLAMATION=207;W.NUMPAD_MEM_STORE=208;W.NUMPAD_MEM_RECALL=
209;W.NUMPAD_MEM_CLEAR=210;W.NUMPAD_MEM_ADD=211;W.NUMPAD_MEM_SUBTRACT=212;W.NUMPAD_MEM_MULTIPLY=213;W.NUMPAD_MEM_DIVIDE=214;W.NUMPAD_PLUS_MINUS=215;W.NUMPAD_CLEAR=216;W.NUMPAD_CLEAR_ENTRY=217;W.NUMPAD_BINARY=218;W.NUMPAD_OCTAL=219;W.NUMPAD_DECIMAL=220;W.NUMPAD_HEXADECIMAL=221;W.LEFT_CTRL=224;W.LEFT_SHIFT=225;W.LEFT_ALT=226;W.LEFT_META=227;W.RIGHT_CTRL=228;W.RIGHT_SHIFT=229;W.RIGHT_ALT=230;W.RIGHT_META=231;W.MODE=257;W.AUDIO_NEXT=258;W.AUDIO_PREVIOUS=259;W.AUDIO_STOP=260;W.AUDIO_PLAY=261;W.AUDIO_MUTE=
262;W.MEDIA_SELECT=263;W.WWW=264;W.MAIL=265;W.CALCULATOR=266;W.COMPUTER=267;W.APP_CONTROL_SEARCH=268;W.APP_CONTROL_HOME=269;W.APP_CONTROL_BACK=270;W.APP_CONTROL_FORWARD=271;W.APP_CONTROL_STOP=272;W.APP_CONTROL_REFRESH=273;W.APP_CONTROL_BOOKMARKS=274;W.BRIGHTNESS_DOWN=275;W.BRIGHTNESS_UP=276;W.DISPLAY_SWITCH=277;W.BACKLIGHT_TOGGLE=278;W.BACKLIGHT_DOWN=279;W.BACKLIGHT_UP=280;W.EJECT=281;W.SLEEP=282;Ad.onCancel=new Jj;Ad.onEnd=new Jj;Ad.onMove=new Jj;Ad.onStart=new Jj;ta.cache=new br;ta.onChange=new me;
ta.bundlePaths=new ua;ta.libraries=new ua;ta.libraryPaths=new ua;qo.BYTES_PER_ELEMENT=4;ro.BYTES_PER_ELEMENT=8;so.BYTES_PER_ELEMENT=2;to.BYTES_PER_ELEMENT=4;uo.BYTES_PER_ELEMENT=1;Ta.throwErrors=!0;dh.NONE=0;dh.ERROR=1;dh.WARN=2;dh.INFO=3;dh.DEBUG=4;dh.VERBOSE=5;vo.BYTES_PER_ELEMENT=2;wo.BYTES_PER_ELEMENT=4;xo.BYTES_PER_ELEMENT=1;nl.BYTES_PER_ELEMENT=1;$a.__lastTimerID=0;$a.__sentWarnings=new ua;$a.__timers=new Wa;Fh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};cg.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},
fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]}}};eg.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};fg.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]}}};dg.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]}}};Pf.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},
fields:{concat:{SuppressWarnings:["checkstyle:Dynamic"]},toJSON:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};Xc.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{notImplemented:{SuppressWarnings:["checkstyle:NullableParameter"]}}};Xc.__sentWarnings=new ua;cf.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};cf.limitedProfile=!0;Mj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ao.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
Nj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ti.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Og.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};rl.__useParentFPS=!1;tl.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};sb.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};sb.__regexAlign=new Ca("align\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");sb.__regexBreakTag=new Ca("<br\\s*/?>","gi");sb.__regexBlockIndent=new Ca("blockindent\\s?=\\s?(\"([^\"]+)\"|'([^']+)')",
"i");sb.__regexColor=new Ca("color\\s?=\\s?(\"#([^\"]+)\"|'#([^']+)')","i");sb.__regexEntities=[new Ca("&quot;","g"),new Ca("&apos;","g"),new Ca("&amp;","g"),new Ca("&lt;","g"),new Ca("&gt;","g"),new Ca("&nbsp;","g")];sb.__regexFace=new Ca("face\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");sb.__regexHTMLTag=new Ca("<.*?>","g");sb.__regexHref=new Ca("href\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");sb.__regexIndent=new Ca(" indent\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");sb.__regexLeading=new Ca("leading\\s?=\\s?(\"([^\"]+)\"|'([^']+)')",
"i");sb.__regexLeftMargin=new Ca("leftmargin\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");sb.__regexRightMargin=new Ca("rightmargin\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");sb.__regexSize=new Ca("size\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");sb.__regexTabStops=new Ca("tabstops\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");Jf.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{resolveClass:{SuppressWarnings:["checkstyle:Dynamic"]},resolveEnum:{SuppressWarnings:["checkstyle:Dynamic"]}}};Jf.instances=
new ua;Io.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};df.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{o:{SuppressWarnings:["checkstyle:Dynamic"]}}};df.empty=new df;xg.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{obj:{SuppressWarnings:["checkstyle:Dynamic"]}}};zh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};No.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{overrideIntValues:{SuppressWarnings:["checkstyle:Dynamic"]}}};
Et.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Vi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Vj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};jf.__meta__={fields:{__type:{SuppressWarnings:["checkstyle:Dynamic"]}}};Wi.__meta__={obj:{SuppressWarnings:["checkstyle:Dynamic"]}};Wj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};jr.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Xj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},
statics:{renderTileContainer:{SuppressWarnings:["checkstyle:Dynamic"]}}};Ft.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Gt.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};D.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{windingRule:{SuppressWarnings:["checkstyle:Dynamic"]},createBitmapFill:{SuppressWarnings:["checkstyle:Dynamic"]},createGradientPattern:{SuppressWarnings:["checkstyle:Dynamic"]}}};D.SIN45=.7071067811865476;D.TAN22=.41421356237309503;
D.fillCommands=new df;D.strokeCommands=new df;Xi.__meta__={obj:{SuppressWarnings:["checkstyle:Dynamic"]}};ih.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ht.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};aa.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};pi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{renderTileContainer:{SuppressWarnings:["checkstyle:Dynamic"]}}};kr.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
ef.__meta__={fields:{glProgram:{SuppressWarnings:["checkstyle:Dynamic"]}}};jh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};qi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};qi.MAX_INDEX_BUFFER_LENGTH=65535;qi.MAX_QUADS_PER_INDEX_BUFFER=10922;qi.MAX_QUAD_INDEX_BUFFER_LENGTH=65532;mr.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};na.__meta__={fields:{image:{SuppressWarnings:["checkstyle:Dynamic"]},__framebufferContext:{SuppressWarnings:["checkstyle:Dynamic"]},
__indexBufferContext:{SuppressWarnings:["checkstyle:Dynamic"]},__surface:{SuppressWarnings:["checkstyle:Dynamic"]},__textureContext:{SuppressWarnings:["checkstyle:Dynamic"]},__vertexBufferContext:{SuppressWarnings:["checkstyle:Dynamic"]},compare:{SuppressWarnings:["checkstyle:Dynamic"]},getSurface:{SuppressWarnings:["checkstyle:Dynamic"]},__fromImage:{SuppressWarnings:["checkstyle:Dynamic"]}}};na.VERTEX_BUFFER_STRIDE=14;na.__pool=new Jo;na.__tempVector=new Gd;Vc.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
Vc.blankBitmapData=new na(1,1,!1,0);Vc.tempColorTransform=new Sb(1,1,1,1,0,0,0,0);Yi.opaqueBitmapData=new na(1,1,!1,0);Zj.__meta__={obj:{SuppressWarnings:["checkstyle:Dynamic"]}};zb.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};zb.__alphaValue=[1];zb.__colorMultipliersValue=[0,0,0,0];zb.__colorOffsetsValue=[0,0,0,0];zb.__defaultColorMultipliersValue=[1,1,1,1];zb.__emptyColorValue=[0,0,0,0];zb.__emptyAlphaValue=[1];zb.__hasColorTransformValue=[!1];zb.__scissorRectangle=new ia;zb.__textureSizeValue=
[0,0];Kf.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};yl.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};xl.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};la.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ih.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ih.__textureSizeValue=[0,0];ce.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Jh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
aj.__meta__={obj:{SuppressWarnings:["checkstyle:Dynamic"]}};zl.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Se.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};xc.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};xc.__regexColor=new Ca("color=(\"#([^\"]+)\"|'#([^']+)')","i");xc.__regexFace=new Ca("face=(\"([^\"]+)\"|'([^']+)')","i");xc.__regexFont=new Ca("<font ([^>]+)>","gi");xc.__regexCloseFont=new Ca("</font>","gi");xc.__regexSize=new Ca("size=(\"([^\"]+)\"|'([^']+)')",
"i");ak.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};bk.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};ri.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};bj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};bj.alphaColorTransform=new Sb;bj.bitmap=new Zc;bj.destPoint=new pa;bj.sourceRect=new ia;ur.__meta__={obj:{SuppressWarnings:[["checkstyle:FieldDocComment","checkstyle:Dynamic"]]}};Zb.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},
fields:{__cairoFont:{SuppressWarnings:["checkstyle:Dynamic"]}}};Zb.UTF8_TAB=9;Zb.UTF8_ENDLINE=10;Zb.UTF8_SPACE=32;Zb.UTF8_HYPHEN=45;Zb.GUTTER=2;Zb.__defaultFonts=new ua;de.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{glyphs:{SuppressWarnings:["checkstyle:Dynamic"]},__handle:{SuppressWarnings:["checkstyle:Dynamic"]},__hbBuffer:{SuppressWarnings:["checkstyle:Dynamic"]},__hbFont:{SuppressWarnings:["checkstyle:Dynamic"]},get_glyphs:{SuppressWarnings:["checkstyle:Dynamic"]}}};
de.FT_LOAD_DEFAULT=0;de.FT_LOAD_NO_SCALE=1;de.FT_LOAD_NO_HINTING=2;de.FT_LOAD_RENDER=4;de.FT_LOAD_NO_BITMAP=8;de.FT_LOAD_VERTICAL_LAYOUT=16;de.FT_LOAD_FORCE_AUTOHINT=32;de.FT_LOAD_CROP_BITMAP=64;de.FT_LOAD_PEDANTIC=128;de.FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH=256;de.FT_LOAD_NO_RECURSE=512;de.FT_LOAD_IGNORE_TRANSFORM=1024;de.FT_LOAD_MONOCHROME=2048;de.FT_LOAD_LINEAR_DESIGN=4096;de.FT_LOAD_NO_AUTOHINT=8192;de.FT_LOAD_COLOR=16384;de.FT_LOAD_COMPUTE_METRICS=32768;de.FT_LOAD_BITMAP_METRICS_ONLY=65536;de.FT_LOAD_TARGET_NORMAL=
0;de.FT_LOAD_TARGET_LIGHT=0;Wf.INVALID=0;Wf.LEFT_TO_RIGHT=4;Wf.RIGHT_TO_LEFT=5;Wf.TOP_TO_BOTTOM=6;Wf.BOTTOM_TO_TOP=7;ya.COMMON="Zyyy";ya.INHERITED="Zinh";ya.UNKNOWN="Zzzz";ya.ARABIC="Arab";ya.ARMENIAN="Armn";ya.BENGALI="Beng";ya.CYRILLIC="Cyrl";ya.DEVANAGARI="Deva";ya.GEORGIAN="Geor";ya.GREEK="Grek";ya.GUJARATI="Gujr";ya.GURMUKHI="Guru";ya.HANGUL="Hang";ya.HAN="Hani";ya.HEBREW="Hebr";ya.HIRAGANA="Hira";ya.KANNADA="Knda";ya.KATAKANA="Kana";ya.LAO="Laoo";ya.LATIN="Latn";ya.MALAYALAM="Mlym";ya.ORIYA=
"Orya";ya.TAMIL="Taml";ya.TELUGA="Telu";ya.THAI="Thai";ya.TIBETAN="Tibt";ya.BOPOMOFO="Bopo";ya.BRAILLE="Brai";ya.CANADIAN_SYLLABICS="Cans";ya.CHEROKEE="Cher";ya.ETHIOPIC="Ethi";ya.KHMER="Khmr";ya.MONGOLIAN="Mong";ya.MYANMAR="Mymr";ya.OGHAM="Ogam";ya.RUNIC="Runr";ya.SINHALA="Sinh";ya.SYRIAC="Syrc";ya.THAANA="Thaa";ya.YI="Yiii";ya.DESERET="Dsrt";ya.GOTHIC="Goth";ya.OLD_ITALIC="Ital";ya.BUHID="Buhd";ya.HANUNOO="Hano";ya.TAGALOG="Tglg";ya.TAGBANWA="Tagb";ya.CYPRIOT="Cprt";ya.LIMBU="Limb";ya.LINEAR_B=
"Linb";ya.OSMANYA="Osma";ya.SHAVIAN="Shaw";ya.TAI_LE="Tale";ya.UGARITIC="Ugar";ya.BUGINESE="Bugi";ya.COPTIC="Copt";ya.GLAGOLITIC="Glag";ya.KHAROSHTHI="Khar";ya.NEW_TAI_LUE="Talu";ya.OLD_PERSIAN="Xpeo";ya.SYLOTI_NAGRI="Sylo";ya.TIFINAGH="Tfng";ya.BALINESE="Bali";ya.CUNEIFORM="Xsux";ya.NKO="Nkoo";ya.PHAGS_PA="Phag";ya.PHOENICIAN="Phnx";ya.CARIAN="Cari";ya.CHAM="Cham";ya.KAYAH_LI="Kali";ya.LEPCHA="Lepc";ya.LYCIAN="Lyci";ya.LYDIAN="Lydi";ya.OL_CHIKI="Olck";ya.REJANG="Rjng";ya.SAURASHTRA="Saur";ya.SUNDANESE=
"Sund";ya.VAI="Vaii";ya.AVESTAN="Avst";ya.BAMUM="Bamu";ya.EGYPTIAN_HIEROGLYPHS="Egyp";ya.IMPERIAL_ARAMAIC="Armi";ya.INSCRIPTIONAL_PAHLAVI="Phli";ya.INSCRIPTIONAL_PARTHIAN="Prti";ya.JAVANESE="Java";ya.KAITHI="Kthi";ya.LISU="Lisu";ya.MEETEI_MAYEK="Mtei";ya.OLD_SOUTH_ARABIAN="Sarb";ya.OLD_TURKIC="Orkh";ya.SAMARITAN="Samr";ya.TAI_THAM="Lana";ya.TAI_VIET="Tavt";ya.BATAK="Batk";ya.BRAHMI="Brah";ya.MANDAIC="Mand";ya.CHAKMA="Cakm";ya.MEROITIC_CURSIVE="Merc";ya.MEROITIC_HIEROGLYPHS="Mero";ya.MIAO="Plrd";ya.SHARADA=
"Shrd";ya.SORA_SOMPENG="Sora";ya.TAKRI="Takr";ya.BASSA_VAH="Bass";ya.CAUCASIAN_ALBANIAN="Aghb";ya.DUPLOYAN="Dupl";ya.ELBASAN="Elba";ya.GRANTHA="Gran";ya.KHOJKI="Khoj";ya.KHUDAWADI="Sind";ya.LINEAR_A="Lina";ya.MAHAJANI="Mahj";ya.MANICHAEAN="Mani";ya.MENDE_KIKAKUI="Mend";ya.MODI="Modi";ya.MRO="Mroo";ya.NABATAEAN="Nbat";ya.OLD_NORTH_ARABIAN="Narb";ya.OLD_PERMIC="Perm";ya.PAHAWH_HMONG="Hmng";ya.PALMYRENE="Palm";ya.PAU_CIN_HAU="Pauc";ya.PSALTER_PAHLAVI="Phlp";ya.SIDDHAM="Sidd";ya.TIRHUTA="Tirh";ya.WARANG_CITI=
"Wara";To.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};ck.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Zi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{P:{SuppressWarnings:["checkstyle:ConstantName"]}}};Zi.P=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,
71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,
179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180,151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,
40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,
121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180];cj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{touch:{SuppressWarnings:["checkstyle:Dynamic"]}}};cj.__pool=new Ma(function(){return new cj},function(a){a.reset()});Ak.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};kf.ADD=0;kf.ALPHA=1;kf.DARKEN=2;kf.DIFFERENCE=3;kf.ERASE=4;kf.HARDLIGHT=5;kf.INVERT=6;kf.LAYER=7;kf.LIGHTEN=8;kf.MULTIPLY=9;kf.NORMAL=10;kf.OVERLAY=
11;kf.SCREEN=12;kf.SHADER=13;kf.SUBTRACT=14;oi.NONE=0;oi.ROUND=1;oi.SQUARE=2;Uo.__meta__={fields:{__element:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};dk.LINEAR=0;dk.RADIAL=1;nf.__meta__={fields:{overrideBlendMode:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};ek.SIN45=.7071067811865476;ek.TAN22=.41421356237309503;$o.EVEN_ODD=0;$o.NON_ZERO=1;fk.LINEAR_RGB=0;fk.RGB=1;ni.BEVEL=0;ni.MITER=1;ni.ROUND=2;ti.HORIZONTAL=0;ti.NONE=1;ti.NORMAL=2;ti.VERTICAL=
3;Uk.__meta__={fields:{BitmapData_onError:{SuppressWarnings:["checkstyle:Dynamic"]}}};Ig.__meta__={statics:{create:{SuppressWarnings:["checkstyle:FieldDocComment"]}},fields:{parameters:{SuppressWarnings:["checkstyle:Dynamic"]}}};Ig.__rootURL="undefined"!=typeof window?window.document.URL:"";ye.__useParentFPS=!1;Cl.ALWAYS=0;Cl.AUTO=1;Cl.NEVER=2;zr.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{onComplete:{SuppressWarnings:["checkstyle:Dynamic"]}}};bp.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
Oo.__meta__={fields:{index:{SuppressWarnings:["checkstyle:Dynamic"]},name:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Yj.__meta__={fields:{index:{SuppressWarnings:["checkstyle:Dynamic"]},name:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};ee.BOOL=0;ee.BOOL2=1;ee.BOOL3=2;ee.BOOL4=3;ee.FLOAT=4;ee.FLOAT2=5;ee.FLOAT3=6;ee.FLOAT4=7;ee.INT=8;ee.INT2=9;ee.INT3=10;ee.INT4=11;ee.MATRIX2X2=12;ee.MATRIX2X3=13;ee.MATRIX2X4=14;ee.MATRIX3X2=15;ee.MATRIX3X3=16;ee.MATRIX3X4=17;ee.MATRIX4X2=18;ee.MATRIX4X3=
19;ee.MATRIX4X4=20;cp.FAST=0;cp.FULL=1;dj.PAD=0;dj.REFLECT=1;dj.REPEAT=2;hk.__meta__={fields:{__broadcastEvent:{SuppressWarnings:["checkstyle:Dynamic"]},__dispatchEvent:{SuppressWarnings:[["checkstyle:Dynamic","checkstyle:LeftCurly"]]},__dispatchStack:{SuppressWarnings:[["checkstyle:Dynamic","checkstyle:LeftCurly"]]},__dispatchTarget:{SuppressWarnings:["checkstyle:Dynamic"]},__handleError:{SuppressWarnings:["checkstyle:Dynamic"]}}};kh.BOTTOM=0;kh.BOTTOM_LEFT=1;kh.BOTTOM_RIGHT=2;kh.LEFT=3;kh.RIGHT=
4;kh.TOP=5;kh.TOP_LEFT=6;kh.TOP_RIGHT=7;Dl.FULL_SCREEN=0;Dl.FULL_SCREEN_INTERACTIVE=1;Dl.NORMAL=2;ik.BEST=0;ik.HIGH=1;ik.LOW=2;ik.MEDIUM=3;jk.EXACT_FIT=0;jk.NO_BORDER=1;jk.NO_SCALE=2;jk.SHOW_ALL=3;Kg.__meta__={fields:{data:{SuppressWarnings:["checkstyle:Dynamic"]}}};dp.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};El.NEGATIVE=0;El.NONE=1;El.POSITIVE=2;Al.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{_:{SuppressWarnings:["checkstyle:Dynamic"]}}};Hc.supportsVideoTexture=
!0;Hc.__glDepthStencil=-1;Hc.__glMaxTextureMaxAnisotropy=-1;Hc.__glMaxViewportDims=-1;Hc.__glTextureMaxAnisotropy=-1;Ag.DESTINATION_ALPHA=0;Ag.DESTINATION_COLOR=1;Ag.ONE=2;Ag.ONE_MINUS_DESTINATION_ALPHA=3;Ag.ONE_MINUS_DESTINATION_COLOR=4;Ag.ONE_MINUS_SOURCE_ALPHA=5;Ag.ONE_MINUS_SOURCE_COLOR=6;Ag.SOURCE_ALPHA=7;Ag.SOURCE_COLOR=8;Ag.ZERO=9;mk.DYNAMIC_DRAW=0;mk.STATIC_DRAW=1;lh.ALWAYS=0;lh.EQUAL=1;lh.GREATER=2;lh.GREATER_EQUAL=3;lh.LESS=4;lh.LESS_EQUAL=5;lh.NEVER=6;lh.NOT_EQUAL=7;Gl.MIPLINEAR=0;Gl.MIPNEAREST=
1;Gl.MIPNONE=2;vi.BASELINE=0;vi.BASELINE_CONSTRAINED=1;vi.BASELINE_EXTENDED=2;vi.STANDARD=3;vi.STANDARD_CONSTRAINED=4;vi.STANDARD_EXTENDED=5;fp.AGAL=0;fp.GLSL=1;nk.FRAGMENT=0;nk.VERTEX=1;gp.AUTO=0;gp.SOFTWARE=1;mh.DECREMENT_SATURATE=0;mh.DECREMENT_WRAP=1;mh.INCREMENT_SATURATE=2;mh.INCREMENT_WRAP=3;mh.INVERT=4;mh.KEEP=5;mh.SET=6;mh.ZERO=7;wi.ANISOTROPIC16X=0;wi.ANISOTROPIC2X=1;wi.ANISOTROPIC4X=2;wi.ANISOTROPIC8X=3;wi.LINEAR=4;wi.NEAREST=5;Lh.BGR_PACKED=0;Lh.BGRA=1;Lh.BGRA_PACKED=2;Lh.COMPRESSED=3;
Lh.COMPRESSED_ALPHA=4;Lh.RGBA_HALF_FLOAT=5;ok.BACK=0;ok.FRONT=1;ok.FRONT_AND_BACK=2;ok.NONE=3;gj.BYTES_4=0;gj.FLOAT_1=1;gj.FLOAT_2=2;gj.FLOAT_3=3;gj.FLOAT_4=4;pk.CLAMP=0;pk.CLAMP_U_REPEAT_V=1;pk.REPEAT=2;pk.REPEAT_U_CLAMP_V=3;hp.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Hl.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};pc.__meta__={fields:{__textureContext:{SuppressWarnings:["checkstyle:Dynamic"]},__getGLFramebuffer:{SuppressWarnings:["checkstyle:Dynamic"]}}};
fj.__lowMemoryMode=!1;hd.DEFAULT_TO_STRING="Error";Pg.ACTIVITY="activity";Pg.__pool=new Ma(function(){return new Pg(null)},function(a){a.__init()});Ef.LINK="link";Ef.TEXT_INPUT="textInput";Ef.__pool=new Ma(function(){return new Ef(null)},function(a){a.__init()});Te.ERROR="error";Te.__pool=new Ma(function(){return new Te(null)},function(a){a.__init()});Ck.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Bk.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Lf.FOCUS_IN=
"focusIn";Lf.FOCUS_OUT="focusOut";Lf.KEY_FOCUS_CHANGE="keyFocusChange";Lf.MOUSE_FOCUS_CHANGE="mouseFocusChange";Lf.__pool=new Ma(function(){return new Lf(null)},function(a){a.__init()});hg.FULL_SCREEN="fullScreen";hg.FULL_SCREEN_INTERACTIVE_ACCEPTED="fullScreenInteractiveAccepted";hg.__pool=new Ma(function(){return new hg(null)},function(a){a.__init()});Bg.DEVICE_ADDED="deviceAdded";Bg.DEVICE_REMOVED="deviceRemoved";Bg.DEVICE_UNUSABLE="deviceUnusable";Bg.__pool=new Ma(function(){return new Bg(null)},
function(a){a.__init()});Nh.HTTP_RESPONSE_STATUS="httpResponseStatus";Nh.HTTP_STATUS="httpStatus";Nh.__pool=new Ma(function(){return new Nh(null)},function(a){a.__init()});Xf.IO_ERROR="ioError";Xf.__pool=new Ma(function(){return new Xf(null)},function(a){a.__init()});Kh.KEY_DOWN="keyDown";Kh.KEY_UP="keyUp";Kh.__pool=new Ma(function(){return new Kh(null)},function(a){a.__init()});Tb.CLICK="click";Tb.DOUBLE_CLICK="doubleClick";Tb.MIDDLE_CLICK="middleClick";Tb.MIDDLE_MOUSE_DOWN="middleMouseDown";Tb.MIDDLE_MOUSE_UP=
"middleMouseUp";Tb.MOUSE_DOWN="mouseDown";Tb.MOUSE_MOVE="mouseMove";Tb.MOUSE_OUT="mouseOut";Tb.MOUSE_OVER="mouseOver";Tb.MOUSE_UP="mouseUp";Tb.MOUSE_WHEEL="mouseWheel";Tb.RELEASE_OUTSIDE="releaseOutside";Tb.RIGHT_CLICK="rightClick";Tb.RIGHT_MOUSE_DOWN="rightMouseDown";Tb.RIGHT_MOUSE_UP="rightMouseUp";Tb.ROLL_OUT="rollOut";Tb.ROLL_OVER="rollOver";Tb.__pool=new Ma(function(){return new Tb(null)},function(a){a.__init()});Mf.NET_STATUS="netStatus";Mf.__pool=new Ma(function(){return new Mf(null)},function(a){a.__init()});
zg.PROGRESS="progress";zg.SOCKET_DATA="socketData";zg.__pool=new Ma(function(){return new zg(null)},function(a){a.__init()});gg.CLEAR_DOM="clearDOM";gg.RENDER_CAIRO="renderCairo";gg.RENDER_CANVAS="renderCanvas";gg.RENDER_DOM="renderDOM";gg.RENDER_OPENGL="renderOpenGL";gg.__pool=new Ma(function(){return new gg(null)},function(a){a.__init()});xi.SECURITY_ERROR="securityError";xi.__pool=new Ma(function(){return new xi(null)},function(a){a.__init()});sd.__meta__={fields:{delta:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};
sd.TOUCH_BEGIN="touchBegin";sd.TOUCH_END="touchEnd";sd.TOUCH_MOVE="touchMove";sd.TOUCH_OUT="touchOut";sd.TOUCH_OVER="touchOver";sd.TOUCH_ROLL_OUT="touchRollOut";sd.TOUCH_ROLL_OVER="touchRollOver";sd.TOUCH_TAP="touchTap";sd.__pool=new Ma(function(){return new sd(null)},function(a){a.__init()});ui.UNCAUGHT_ERROR="uncaughtError";ui.__pool=new Ma(function(){return new ui(null)},function(a){a.__init()});wg.__blurShader=new ip;Il.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Sf.__colorMatrixShader=
new Il;nh.__convolutionShader=new jp;uc.__displacementMapShader=new kp;uc.__matrixData=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];uc.__offset=[.5,.5,0,0];ki.__hideShader=new lp;se.__invertAlphaShader=new rp;se.__blurAlphaShader=new mp;se.__combineShader=new op;se.__innerCombineShader=new qp;se.__combineKnockoutShader=new np;se.__innerCombineKnockoutShader=new pp;ze.__meta__={statics:{create2D:{SuppressWarnings:["checkstyle:FieldDocComment"]},createABCD:{SuppressWarnings:["checkstyle:FieldDocComment"]},createOrtho:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};
Jl.AXIS_ANGLE=0;Jl.EULER_ANGLES=1;Jl.QUATERNION=2;te.MAX_ACTIVE_CHANNELS=32;te.__soundChannels=[];te.__soundTransform=new Tf;tp.VERTEX_BUFFER_STRIDE=5;Kl.__meta__={statics:{CONNECT_SUCCESS:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Kl.CONNECT_SUCCESS="NetConnection.Connect.Success";up.__meta__={fields:{audioCodec:{SuppressWarnings:["checkstyle:FieldDocComment"]},decodedFrames:{SuppressWarnings:["checkstyle:FieldDocComment"]},speed:{SuppressWarnings:["checkstyle:FieldDocComment"]},requestVideoStatus:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};
Mc.defaultObjectEncoding=10;vp.FLUSHED=0;vp.PENDING=1;Ll.BINARY=0;Ll.TEXT=1;Ll.VARIABLES=2;yi.followRedirects=!0;yi.idleTimeout=0;yi.manageCookies=!1;gk.currentDomain=new gk(null);qc.avHardwareDisable=!0;qc.hasAccessibility=!1;qc.hasAudio=!0;qc.hasAudioEncoder=!1;qc.hasEmbeddedVideo=!1;qc.hasIME=!1;qc.hasMP3=!1;qc.hasPrinting=!0;qc.hasScreenBroadcast=!1;qc.hasScreenPlayback=!1;qc.hasStreamingAudio=!1;qc.hasStreamingVideo=!1;qc.hasTLS=!0;qc.hasVideoEncoder=!0;qc.isDebugger=!0;qc.isEmbeddedInAcrobat=
!1;qc.localFileReadDisable=!0;qc.maxLevelIDC=0;qc.playerType="PlugIn";qc.screenColor="color";qc.serverString="";qc.supports32BitProcesses=!1;qc.supports64BitProcesses=!1;qc.touchscreenType=0;qc.__standardDensities=[120,160,240,320,480,640,800,960];Ml.__meta__={obj:{SuppressWarnings:["checkstyle:UnnecessaryConstructor"]}};Ml.currentDomain=new Ml;Fg.useCodePage=!1;Nl.FINGER=0;Nl.NONE=1;Nl.STYLUS=2;wp.ADVANCED=0;wp.NORMAL=1;tc.__fontByName=new ua;tc.__registeredFonts=[];rk.BOLD=0;rk.BOLD_ITALIC=1;rk.ITALIC=
2;rk.REGULAR=3;Ol.DEVICE=0;Ol.EMBEDDED=1;Ol.EMBEDDED_CFF=2;Pl.NONE=0;Pl.PIXEL=1;Pl.SUBPIXEL=2;ge.__missingFontWarning=new ua;sk.CENTER=0;sk.LEFT=1;sk.NONE=2;sk.RIGHT=3;xp.DYNAMIC=0;xp.INPUT=1;Eg.__meta__={fields:{clone:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Hh.CENTER=0;Hh.END=1;Hh.JUSTIFY=2;Hh.LEFT=3;Hh.RIGHT=4;Hh.START=5;fc.__meta__={fields:{addEventListener:{SuppressWarnings:["checkstyle:Dynamic"]}}};fc.isSupported=!0;fc.numDevices=0;fc.__deviceList=[];fc.__instances=[];fc.__devices=
new Aa;yp.MAX_BUFFER_SIZE=32E3;Fa.__meta__={statics:{BREAK:{SuppressWarnings:["checkstyle:FieldDocComment"]},NUMLOCK:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Fa.NUMBER_0=48;Fa.NUMBER_1=49;Fa.NUMBER_2=50;Fa.NUMBER_3=51;Fa.NUMBER_4=52;Fa.NUMBER_5=53;Fa.NUMBER_6=54;Fa.NUMBER_7=55;Fa.NUMBER_8=56;Fa.NUMBER_9=57;Fa.A=65;Fa.B=66;Fa.C=67;Fa.D=68;Fa.E=69;Fa.F=70;Fa.G=71;Fa.H=72;Fa.I=73;Fa.J=74;Fa.K=75;Fa.L=76;Fa.M=77;Fa.N=78;Fa.O=79;Fa.P=80;Fa.Q=81;Fa.R=82;Fa.S=83;Fa.T=84;Fa.U=85;Fa.V=86;Fa.W=87;
Fa.X=88;Fa.Y=89;Fa.Z=90;Fa.NUMPAD_0=96;Fa.NUMPAD_1=97;Fa.NUMPAD_2=98;Fa.NUMPAD_3=99;Fa.NUMPAD_4=100;Fa.NUMPAD_5=101;Fa.NUMPAD_6=102;Fa.NUMPAD_7=103;Fa.NUMPAD_8=104;Fa.NUMPAD_9=105;Fa.NUMPAD_MULTIPLY=106;Fa.NUMPAD_ADD=107;Fa.NUMPAD_ENTER=108;Fa.NUMPAD_SUBTRACT=109;Fa.NUMPAD_DECIMAL=110;Fa.NUMPAD_DIVIDE=111;Fa.F1=112;Fa.F2=113;Fa.F3=114;Fa.F4=115;Fa.F5=116;Fa.F6=117;Fa.F7=118;Fa.F8=119;Fa.F9=120;Fa.F10=121;Fa.F11=122;Fa.F12=123;Fa.F13=124;Fa.F14=125;Fa.F15=126;Fa.BACKSPACE=8;Fa.TAB=9;Fa.ALTERNATE=18;
Fa.ENTER=13;Fa.COMMAND=15;Fa.SHIFT=16;Fa.CONTROL=17;Fa.BREAK=19;Fa.CAPS_LOCK=20;Fa.NUMPAD=21;Fa.ESCAPE=27;Fa.SPACE=32;Fa.PAGE_UP=33;Fa.PAGE_DOWN=34;Fa.END=35;Fa.HOME=36;Fa.LEFT=37;Fa.RIGHT=39;Fa.UP=38;Fa.DOWN=40;Fa.INSERT=45;Fa.DELETE=46;Fa.NUMLOCK=144;Fa.SEMICOLON=186;Fa.EQUAL=187;Fa.COMMA=188;Fa.MINUS=189;Fa.PERIOD=190;Fa.SLASH=191;Fa.BACKQUOTE=192;Fa.LEFTBRACKET=219;Fa.BACKSLASH=220;Fa.RIGHTBRACKET=221;Fa.QUOTE=222;ve.supportsCursor=!0;ve.supportsNativeCursor=!0;ve.__cursor="auto";lf.ARROW="arrow";
lf.AUTO="auto";lf.BUTTON="button";lf.HAND="hand";lf.IBEAM="ibeam";lf.__CROSSHAIR="crosshair";lf.__CUSTOM="custom";lf.__MOVE="move";lf.__RESIZE_NESW="resize_nesw";lf.__RESIZE_NS="resize_ns";lf.__RESIZE_NWSE="resize_nwse";lf.__RESIZE_WE="resize_we";lf.__WAIT="wait";lf.__WAIT_ARROW="waitarrow";Ql.GESTURE=0;Ql.NONE=1;Ql.TOUCH_POINT=2;Z.__meta__={obj:{SuppressWarnings:[["checkstyle:ConstantName","checkstyle:FieldDocComment"]]}};Z.OPMAP=new ua;Z.REGMAP=new ua;Z.SAMPLEMAP=new ua;Z.MAX_NESTING=4;Z.MAX_OPCODES=
4096;Z.FRAGMENT="fragment";Z.VERTEX="vertex";Z.SAMPLER_TYPE_SHIFT=8;Z.SAMPLER_DIM_SHIFT=12;Z.SAMPLER_SPECIAL_SHIFT=16;Z.SAMPLER_REPEAT_SHIFT=20;Z.SAMPLER_MIPMAP_SHIFT=24;Z.SAMPLER_FILTER_SHIFT=28;Z.REG_WRITE=1;Z.REG_READ=2;Z.REG_FRAG=32;Z.REG_VERT=64;Z.OP_SCALAR=1;Z.OP_SPECIAL_TEX=8;Z.OP_SPECIAL_MATRIX=16;Z.OP_FRAG_ONLY=32;Z.OP_VERT_ONLY=64;Z.OP_NO_DEST=128;Z.OP_VERSION2=256;Z.OP_INCNEST=512;Z.OP_DECNEST=1024;Z.MOV="mov";Z.ADD="add";Z.SUB="sub";Z.MUL="mul";Z.DIV="div";Z.RCP="rcp";Z.MIN="min";Z.MAX=
"max";Z.FRC="frc";Z.SQT="sqt";Z.RSQ="rsq";Z.POW="pow";Z.LOG="log";Z.EXP="exp";Z.NRM="nrm";Z.SIN="sin";Z.COS="cos";Z.CRS="crs";Z.DP3="dp3";Z.DP4="dp4";Z.ABS="abs";Z.NEG="neg";Z.SAT="sat";Z.M33="m33";Z.M44="m44";Z.M34="m34";Z.DDX="ddx";Z.DDY="ddy";Z.IFE="ife";Z.INE="ine";Z.IFG="ifg";Z.IFL="ifl";Z.IEG="ieg";Z.IEL="iel";Z.ELS="els";Z.EIF="eif";Z.TED="ted";Z.KIL="kil";Z.TEX="tex";Z.SGE="sge";Z.SLT="slt";Z.SGN="sgn";Z.SEQ="seq";Z.SNE="sne";Z.VA="va";Z.VC="vc";Z.VT="vt";Z.VO="vo";Z.VI="vi";Z.FC="fc";Z.FT=
"ft";Z.FS="fs";Z.FO="fo";Z.FD="fd";Z.IID="iid";Z.D2="2d";Z.D3="3d";Z.CUBE="cube";Z.MIPNEAREST="mipnearest";Z.MIPLINEAR="miplinear";Z.MIPNONE="mipnone";Z.NOMIP="nomip";Z.NEAREST="nearest";Z.LINEAR="linear";Z.ANISOTROPIC2X="anisotropic2x";Z.ANISOTROPIC4X="anisotropic4x";Z.ANISOTROPIC8X="anisotropic8x";Z.ANISOTROPIC16X="anisotropic16x";Z.CENTROID="centroid";Z.SINGLE="single";Z.IGNORESAMPLER="ignoresampler";Z.REPEAT="repeat";Z.WRAP="wrap";Z.CLAMP="clamp";Z.REPEAT_U_CLAMP_V="repeat_u_clamp_v";Z.CLAMP_U_REPEAT_V=
"clamp_u_repeat_v";Z.RGBA="rgba";Z.COMPRESSED="compressed";Z.COMPRESSEDALPHA="compressedalpha";Z.DXT1="dxt1";Z.DXT5="dxt5";Z.VIDEO="video";Z.initialized=!1;gc.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Nf.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};qd.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ea.cache=new Ap;Ea.dispatcher=new A;za.__bytePointer=new vg(null,0);vc.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};vc.defaultObjectEncoding=
10;Rl.DEFLATE=0;Rl.LZMA=1;Rl.ZLIB=2;vk.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};tk.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};uk.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};$i.BIG_ENDIAN=0;$i.LITTLE_ENDIAN=1;Qg.__meta__={statics:{iterator:{SuppressWarnings:["checkstyle:FieldDocComment"]},__get:{SuppressWarnings:["checkstyle:FieldDocComment"]},__set:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Dp.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
Sl.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};qh.VAL_ABSENT=-2147483648;qh.EMPTY_SLOT=-1;qh.NULL_POINTER=-1;Tg.KEY_ABSENT=-2147483648;Tg.VAL_ABSENT=-2147483648;Tg.EMPTY_SLOT=-1;Tg.NULL_POINTER=-1;gb.DEFAULT_PRECISION=6;gb.DEFAULT_NUM_EXP_DIGITS=2;gb._initialized=!1;gb.PAD_0=0;gb.PAD_SPACE=20;oh.FIXED=0;oh.MILD=-1;oh.NORMAL=-2;oh.DOUBLE=-3;Kb.PI=3.141592653589793;Kb.PI_H=1.5707963267948966;Kb.LN_2=.6931471805599453;Kb.LN_2_10=6.931471805599453;Kb.overshoot=1.70158;Kb.amplitude=
1;Kb.period=3E-4;Pa.main()})("undefined"!=typeof y?y:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this,"undefined"!=typeof window?window:"undefined"!=typeof R?R:"undefined"!=typeof self?self:this)};ca.lime.embed=function(V){var R={},O=ca.lime.$scripts[V];if(!O)throw Error('Cannot find project name "'+V+'"');O(R,y);for(var va in R)ca[va]=ca[va]||R[va];(O=R.lime||window.lime)&&O.embed&&this!=O.embed&&O.embed.apply(O,arguments);return R};"function"==typeof define&&define.amd&&(define([],
function(){return ca.lime}),define.__amd=define.amd,define.amd=null)})("undefined"!=typeof exports?exports:"function"==typeof define&&define.amd?{}:"undefined"!=typeof window?window:"undefined"!=typeof self?self:this,"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this);
!function(){var ca=function(){this.init()};ca.prototype={init:function(){var h=this||y;return h._counter=1E3,h._html5AudioPool=[],h.html5PoolSize=10,h._codecs={},h._howls=[],h._muted=!1,h._volume=1,h._canPlayEvent="canplaythrough",h._navigator="undefined"!=typeof window&&window.navigator?window.navigator:null,h.masterGain=null,h.noAudio=!1,h.usingWebAudio=!0,h.autoSuspend=!0,h.ctx=null,h.autoUnlock=!0,h._setup(),h},volume:function(u){var v=this||y;if(u=parseFloat(u),v.ctx||h(),void 0!==u&&0<=u&&1>=
u){if(v._volume=u,v._muted)return v;v.usingWebAudio&&v.masterGain.gain.setValueAtTime(u,y.ctx.currentTime);for(var x=0;x<v._howls.length;x++)if(!v._howls[x]._webAudio)for(var w=v._howls[x]._getSoundIds(),Ca=0;Ca<w.length;Ca++){var B=v._howls[x]._soundById(w[Ca]);B&&B._node&&(B._node.volume=B._volume*u)}return v}return v._volume},mute:function(u){var v=this||y;v.ctx||h();v._muted=u;v.usingWebAudio&&v.masterGain.gain.setValueAtTime(u?0:v._volume,y.ctx.currentTime);for(var x=0;x<v._howls.length;x++)if(!v._howls[x]._webAudio)for(var w=
v._howls[x]._getSoundIds(),Ca=0;Ca<w.length;Ca++){var B=v._howls[x]._soundById(w[Ca]);B&&B._node&&(B._node.muted=!!u||B._muted)}return v},unload:function(){for(var u=this||y,v=u._howls.length-1;0<=v;v--)u._howls[v].unload();return u.usingWebAudio&&u.ctx&&void 0!==u.ctx.close&&(u.ctx.close(),u.ctx=null,h()),u},codecs:function(h){return(this||y)._codecs[h.replace(/^x-/,"")]},_setup:function(){var h=this||y;if(h.state=h.ctx?h.ctx.state||"suspended":"suspended",h._autoSuspend(),!h.usingWebAudio)if("undefined"!=
typeof Audio)try{var v=new Audio;void 0===v.oncanplaythrough&&(h._canPlayEvent="canplay")}catch(x){h.noAudio=!0}else h.noAudio=!0;try{v=new Audio,v.muted&&(h.noAudio=!0)}catch(x){}return h.noAudio||h._setupCodecs(),h},_setupCodecs:function(){var h=this||y,v=null;try{v="undefined"!=typeof Audio?new Audio:null}catch(Ca){return h}if(!v||"function"!=typeof v.canPlayType)return h;var x=v.canPlayType("audio/mpeg;").replace(/^no$/,""),w=h._navigator&&h._navigator.userAgent.match(/OPR\/([0-6].)/g);w=w&&33>
parseInt(w[0].split("/")[1],10);return h._codecs={mp3:!(w||!x&&!v.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!x,opus:!!v.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!v.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!v.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!v.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),aac:!!v.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!v.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(v.canPlayType("audio/x-m4a;")||
v.canPlayType("audio/m4a;")||v.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(v.canPlayType("audio/x-mp4;")||v.canPlayType("audio/mp4;")||v.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!v.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,""),webm:!!v.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,""),dolby:!!v.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(v.canPlayType("audio/x-flac;")||v.canPlayType("audio/flac;")).replace(/^no$/,"")},h},_unlockAudio:function(){var h=
this||y,v=/iPhone|iPad|iPod|Android|BlackBerry|BB10|Silk|Mobi|Chrome|Safari/i.test(h._navigator&&h._navigator.userAgent);if(!h._audioUnlocked&&h.ctx&&v){h._audioUnlocked=!1;h.autoUnlock=!1;h._mobileUnloaded||44100===h.ctx.sampleRate||(h._mobileUnloaded=!0,h.unload());h._scratchBuffer=h.ctx.createBuffer(1,1,22050);var x=function(u){for(u=0;u<h.html5PoolSize;u++){var v=new Audio;v._unlocked=!0;h._releaseHtml5Audio(v)}for(u=0;u<h._howls.length;u++)if(!h._howls[u]._webAudio){v=h._howls[u]._getSoundIds();
for(var w=0;w<v.length;w++){var C=h._howls[u]._soundById(v[w]);C&&C._node&&!C._node._unlocked&&(C._node._unlocked=!0,C._node.load())}}h._autoResume();var y=h.ctx.createBufferSource();y.buffer=h._scratchBuffer;y.connect(h.ctx.destination);void 0===y.start?y.noteOn(0):y.start(0);"function"==typeof h.ctx.resume&&h.ctx.resume();y.onended=function(){y.disconnect(0);h._audioUnlocked=!0;document.removeEventListener("touchstart",x,!0);document.removeEventListener("touchend",x,!0);document.removeEventListener("click",
x,!0);for(var u=0;u<h._howls.length;u++)h._howls[u]._emit("unlock")}};return document.addEventListener("touchstart",x,!0),document.addEventListener("touchend",x,!0),document.addEventListener("click",x,!0),h}},_obtainHtml5Audio:function(){var h=this||y;if(h._html5AudioPool.length)return h._html5AudioPool.pop();h=(new Audio).play();return h&&"undefined"!=typeof Promise&&(h instanceof Promise||"function"==typeof h.then)&&h.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),
new Audio},_releaseHtml5Audio:function(h){var u=this||y;return h._unlocked&&u._html5AudioPool.push(h),u},_autoSuspend:function(){var h=this;if(h.autoSuspend&&h.ctx&&void 0!==h.ctx.suspend&&y.usingWebAudio){for(var v=0;v<h._howls.length;v++)if(h._howls[v]._webAudio)for(var x=0;x<h._howls[v]._sounds.length;x++)if(!h._howls[v]._sounds[x]._paused)return h;return h._suspendTimer&&clearTimeout(h._suspendTimer),h._suspendTimer=setTimeout(function(){h.autoSuspend&&(h._suspendTimer=null,h.state="suspending",
h.ctx.suspend().then(function(){h.state="suspended";h._resumeAfterSuspend&&(delete h._resumeAfterSuspend,h._autoResume())}))},3E4),h}},_autoResume:function(){var h=this;if(h.ctx&&void 0!==h.ctx.resume&&y.usingWebAudio)return"running"===h.state&&h._suspendTimer?(clearTimeout(h._suspendTimer),h._suspendTimer=null):"suspended"===h.state?(h.ctx.resume().then(function(){h.state="running";for(var u=0;u<h._howls.length;u++)h._howls[u]._emit("resume")}),h._suspendTimer&&(clearTimeout(h._suspendTimer),h._suspendTimer=
null)):"suspending"===h.state&&(h._resumeAfterSuspend=!0),h}};var y=new ca,V=function(h){if(!h.src||0===h.src.length)return void console.error("An array of source files must be passed with any new Howl.");this.init(h)};V.prototype={init:function(u){var v=this;return y.ctx||h(),v._autoplay=u.autoplay||!1,v._format="string"!=typeof u.format?u.format:[u.format],v._html5=u.html5||!1,v._muted=u.mute||!1,v._loop=u.loop||!1,v._pool=u.pool||5,v._preload="boolean"!=typeof u.preload||u.preload,v._rate=u.rate||
1,v._sprite=u.sprite||{},v._src="string"!=typeof u.src?u.src:[u.src],v._volume=void 0!==u.volume?u.volume:1,v._xhrWithCredentials=u.xhrWithCredentials||!1,v._duration=0,v._state="unloaded",v._sounds=[],v._endTimers={},v._queue=[],v._playLock=!1,v._onend=u.onend?[{fn:u.onend}]:[],v._onfade=u.onfade?[{fn:u.onfade}]:[],v._onload=u.onload?[{fn:u.onload}]:[],v._onloaderror=u.onloaderror?[{fn:u.onloaderror}]:[],v._onplayerror=u.onplayerror?[{fn:u.onplayerror}]:[],v._onpause=u.onpause?[{fn:u.onpause}]:[],
v._onplay=u.onplay?[{fn:u.onplay}]:[],v._onstop=u.onstop?[{fn:u.onstop}]:[],v._onmute=u.onmute?[{fn:u.onmute}]:[],v._onvolume=u.onvolume?[{fn:u.onvolume}]:[],v._onrate=u.onrate?[{fn:u.onrate}]:[],v._onseek=u.onseek?[{fn:u.onseek}]:[],v._onunlock=u.onunlock?[{fn:u.onunlock}]:[],v._onresume=[],v._webAudio=y.usingWebAudio&&!v._html5,void 0!==y.ctx&&y.ctx&&y.autoUnlock&&y._unlockAudio(),y._howls.push(v),v._autoplay&&v._queue.push({event:"play",action:function(){v.play()}}),v._preload&&v.load(),v},load:function(){var h=
null;if(y.noAudio)return void this._emit("loaderror",null,"No audio support.");"string"==typeof this._src&&(this._src=[this._src]);for(var v=0;v<this._src.length;v++){var x;if(this._format&&this._format[v])var w=this._format[v];else{if("string"!=typeof(x=this._src[v])){this._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}(w=/^data:audio\/([^;,]+);/i.exec(x))||(w=/\.([^.]+)$/.exec(x.split("?",1)[0]));w&&(w=w[1].toLowerCase())}if(w||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),
w&&y.codecs(w)){h=this._src[v];break}}return h?(this._src=h,this._state="loading","https:"===window.location.protocol&&"http:"===h.slice(0,5)&&(this._html5=!0,this._webAudio=!1),new R(this),this._webAudio&&va(this),this):void this._emit("loaderror",null,"No codec support for selected audio sources.")},play:function(h,v){var u=this,w=null;if("number"==typeof h)w=h,h=null;else{if("string"==typeof h&&"loaded"===u._state&&!u._sprite[h])return null;if(void 0===h&&(h="__default",!u._playLock)){for(var C=
0,B=0;B<u._sounds.length;B++)u._sounds[B]._paused&&!u._sounds[B]._ended&&(C++,w=u._sounds[B]._id);1===C?h=null:w=null}}var O=w?u._soundById(w):u._inactiveSound();if(!O)return null;if(w&&!h&&(h=O._sprite||"__default"),"loaded"!==u._state){O._sprite=h;O._ended=!1;var R=O._id;return u._queue.push({event:"play",action:function(){u.play(R)}}),R}if(w&&!O._paused)return v||u._loadQueue("play"),O._id;u._webAudio&&y._autoResume();var V=Math.max(0,0<O._seek?O._seek:u._sprite[h][0]/1E3),X=Math.max(0,(u._sprite[h][0]+
u._sprite[h][1])/1E3-V),ca=1E3*X/Math.abs(O._rate),Ja=u._sprite[h][0]/1E3,va=(u._sprite[h][0]+u._sprite[h][1])/1E3,Qb=!(!O._loop&&!u._sprite[h][2]);O._sprite=h;O._ended=!1;var Aa=function(){O._paused=!1;O._seek=V;O._start=Ja;O._stop=va;O._loop=Qb};if(V>=va)return void u._ended(O);var Sa=O._node;if(u._webAudio)w=function(){u._playLock=!1;Aa();u._refreshBuffer(O);Sa.gain.setValueAtTime(O._muted||u._muted?0:O._volume,y.ctx.currentTime);O._playStart=y.ctx.currentTime;void 0===Sa.bufferSource.start?O._loop?
Sa.bufferSource.noteGrainOn(0,V,86400):Sa.bufferSource.noteGrainOn(0,V,X):O._loop?Sa.bufferSource.start(0,V,86400):Sa.bufferSource.start(0,V,X);ca!==1/0&&(u._endTimers[O._id]=setTimeout(u._ended.bind(u,O),ca));v||setTimeout(function(){u._emit("play",O._id);u._loadQueue()},0)},"running"===y.state?w():(u._playLock=!0,u.once("resume",w),u._clearTimer(O._id));else{var da=function(){Sa.currentTime=V;Sa.muted=O._muted||u._muted||y._muted||Sa.muted;Sa.volume=O._volume*y.volume();Sa.playbackRate=O._rate;
try{var x=Sa.play();if(x&&"undefined"!=typeof Promise&&(x instanceof Promise||"function"==typeof x.then)?(u._playLock=!0,Aa(),x.then(function(){u._playLock=!1;Sa._unlocked=!0;v||(u._emit("play",O._id),u._loadQueue())}).catch(function(){u._playLock=!1;u._emit("playerror",O._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");O._ended=!0;O._paused=!0})):v||(u._playLock=!1,Aa(),u._emit("play",O._id),u._loadQueue()),
Sa.playbackRate=O._rate,Sa.paused)return void u._emit("playerror",O._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");"__default"!==h||O._loop?u._endTimers[O._id]=setTimeout(u._ended.bind(u,O),ca):(u._endTimers[O._id]=function(){u._ended(O);Sa.removeEventListener("ended",u._endTimers[O._id],!1)},Sa.addEventListener("ended",u._endTimers[O._id],!1))}catch(oe){u._emit("playerror",O._id,oe)}};w=window&&window.ejecta||
!Sa.readyState&&y._navigator.isCocoonJS;if(3<=Sa.readyState||w)da();else{u._playLock=!0;var Ka=function(){da();Sa.removeEventListener(y._canPlayEvent,Ka,!1)};Sa.addEventListener(y._canPlayEvent,Ka,!1);u._clearTimer(O._id)}}return O._id},pause:function(h,v){var u=this;if("loaded"!==u._state||u._playLock)return u._queue.push({event:"pause",action:function(){u.pause(h)}}),u;for(var w=u._getSoundIds(h),C=0;C<w.length;C++){u._clearTimer(w[C]);var B=u._soundById(w[C]);if(B&&!B._paused&&(B._seek=u.seek(w[C]),
B._rateSeek=0,B._paused=!0,u._stopFade(w[C]),B._node))if(u._webAudio){if(!B._node.bufferSource)continue;void 0===B._node.bufferSource.stop?B._node.bufferSource.noteOff(0):B._node.bufferSource.stop(0);u._cleanBuffer(B._node)}else isNaN(B._node.duration)&&B._node.duration!==1/0||B._node.pause();v||u._emit("pause",B?B._id:null)}return u},stop:function(h,v){var u=this;if("loaded"!==u._state||u._playLock)return u._queue.push({event:"stop",action:function(){u.stop(h)}}),u;for(var w=u._getSoundIds(h),C=
0;C<w.length;C++){u._clearTimer(w[C]);var B=u._soundById(w[C]);B&&(B._seek=B._start||0,B._rateSeek=0,B._paused=!0,B._ended=!0,u._stopFade(w[C]),B._node&&(u._webAudio?B._node.bufferSource&&(void 0===B._node.bufferSource.stop?B._node.bufferSource.noteOff(0):B._node.bufferSource.stop(0),u._cleanBuffer(B._node)):isNaN(B._node.duration)&&B._node.duration!==1/0||(B._node.currentTime=B._start||0,B._node.pause())),v||u._emit("stop",B._id))}return u},mute:function(h,v){var u=this;if("loaded"!==u._state||u._playLock)return u._queue.push({event:"mute",
action:function(){u.mute(h,v)}}),u;if(void 0===v){if("boolean"!=typeof h)return u._muted;u._muted=h}for(var w=u._getSoundIds(v),C=0;C<w.length;C++){var B=u._soundById(w[C]);B&&(B._muted=h,B._interval&&u._stopFade(B._id),u._webAudio&&B._node?B._node.gain.setValueAtTime(h?0:B._volume,y.ctx.currentTime):B._node&&(B._node.muted=!!y._muted||h),u._emit("mute",B._id))}return u},volume:function(){var h,v,x=this,w=arguments;if(0===w.length)return x._volume;1===w.length||2===w.length&&void 0===w[1]?0<=x._getSoundIds().indexOf(w[0])?
v=parseInt(w[0],10):h=parseFloat(w[0]):2<=w.length&&(h=parseFloat(w[0]),v=parseInt(w[1],10));var O;if(!(void 0!==h&&0<=h&&1>=h))return O=v?x._soundById(v):x._sounds[0],O?O._volume:0;if("loaded"!==x._state||x._playLock)return x._queue.push({event:"volume",action:function(){x.volume.apply(x,w)}}),x;void 0===v&&(x._volume=h);v=x._getSoundIds(v);for(var B=0;B<v.length;B++)(O=x._soundById(v[B]))&&(O._volume=h,w[2]||x._stopFade(v[B]),x._webAudio&&O._node&&!O._muted?O._node.gain.setValueAtTime(h,y.ctx.currentTime):
O._node&&!O._muted&&(O._node.volume=h*y.volume()),x._emit("volume",O._id));return x},fade:function(h,v,x,w){var u=this;if("loaded"!==u._state||u._playLock)return u._queue.push({event:"fade",action:function(){u.fade(h,v,x,w)}}),u;h=parseFloat(h);v=parseFloat(v);x=parseFloat(x);u.volume(h,w);for(var C=u._getSoundIds(w),O=0;O<C.length;O++){var Pa=u._soundById(C[O]);if(Pa){if(w||u._stopFade(C[O]),u._webAudio&&!Pa._muted){var V=y.ctx.currentTime,X=V+x/1E3;Pa._volume=h;Pa._node.gain.setValueAtTime(h,V);
Pa._node.gain.linearRampToValueAtTime(v,X)}u._startFadeInterval(Pa,h,v,x,C[O],void 0===w)}}return u},_startFadeInterval:function(h,v,x,w,y,B){var u=this,C=v,O=x-v;y=Math.abs(O/.01);y=Math.max(4,0<y?w/y:w);var X=Date.now();h._fadeTo=x;h._interval=setInterval(function(){var y=(Date.now()-X)/w;X=Date.now();C+=O*y;C=Math.max(0,C);C=Math.min(1,C);C=Math.round(100*C)/100;u._webAudio?h._volume=C:u.volume(C,h._id,!0);B&&(u._volume=C);(x<v&&C<=x||x>v&&C>=x)&&(clearInterval(h._interval),h._interval=null,h._fadeTo=
null,u.volume(x,h._id),u._emit("fade",h._id))},y)},_stopFade:function(h){var u=this._soundById(h);return u&&u._interval&&(this._webAudio&&u._node.gain.cancelScheduledValues(y.ctx.currentTime),clearInterval(u._interval),u._interval=null,this.volume(u._fadeTo,h),u._fadeTo=null,this._emit("fade",h)),this},loop:function(){var h,v,x,w=arguments;if(0===w.length)return this._loop;if(1===w.length){if("boolean"!=typeof w[0])return!!(x=this._soundById(parseInt(w[0],10)))&&x._loop;this._loop=h=w[0]}else 2===
w.length&&(h=w[0],v=parseInt(w[1],10));v=this._getSoundIds(v);for(w=0;w<v.length;w++)(x=this._soundById(v[w]))&&(x._loop=h,this._webAudio&&x._node&&x._node.bufferSource&&(x._node.bufferSource.loop=h,h&&(x._node.bufferSource.loopStart=x._start||0,x._node.bufferSource.loopEnd=x._stop)));return this},rate:function(){var h,v,x=this,w=arguments;0===w.length?v=x._sounds[0]._id:1===w.length?0<=x._getSoundIds().indexOf(w[0])?v=parseInt(w[0],10):h=parseFloat(w[0]):2===w.length&&(h=parseFloat(w[0]),v=parseInt(w[1],
10));var O;if("number"!=typeof h)return O=x._soundById(v),O?O._rate:x._rate;if("loaded"!==x._state||x._playLock)return x._queue.push({event:"rate",action:function(){x.rate.apply(x,w)}}),x;void 0===v&&(x._rate=h);v=x._getSoundIds(v);for(var B=0;B<v.length;B++)if(O=x._soundById(v[B])){x.playing(v[B])&&(O._rateSeek=x.seek(v[B]),O._playStart=x._webAudio?y.ctx.currentTime:O._playStart);O._rate=h;x._webAudio&&O._node&&O._node.bufferSource?O._node.bufferSource.playbackRate.setValueAtTime(h,y.ctx.currentTime):
O._node&&(O._node.playbackRate=h);var V=x.seek(v[B]);V=1E3*((x._sprite[O._sprite][0]+x._sprite[O._sprite][1])/1E3-V)/Math.abs(O._rate);!x._endTimers[v[B]]&&O._paused||(x._clearTimer(v[B]),x._endTimers[v[B]]=setTimeout(x._ended.bind(x,O),V));x._emit("rate",O._id)}return x},seek:function(){var h,v,x=this,w=arguments;0===w.length?v=x._sounds[0]._id:1===w.length?0<=x._getSoundIds().indexOf(w[0])?v=parseInt(w[0],10):x._sounds.length&&(v=x._sounds[0]._id,h=parseFloat(w[0])):2===w.length&&(h=parseFloat(w[0]),
v=parseInt(w[1],10));if(void 0===v)return x;if("loaded"!==x._state||x._playLock)return x._queue.push({event:"seek",action:function(){x.seek.apply(x,w)}}),x;var O=x._soundById(v);if(O){if(!("number"==typeof h&&0<=h))return x._webAudio?(h=x.playing(v)?y.ctx.currentTime-O._playStart:0,O._seek+((O._rateSeek?O._rateSeek-O._seek:0)+h*Math.abs(O._rate))):O._node.currentTime;var B=x.playing(v);B&&x.pause(v,!0);O._seek=h;O._ended=!1;x._clearTimer(v);x._webAudio||!O._node||isNaN(O._node.duration)||(O._node.currentTime=
h);var V=function(){x._emit("seek",v);B&&x.play(v,!0)};if(B&&!x._webAudio){var R=function(){x._playLock?setTimeout(R,0):V()};setTimeout(R,0)}else V()}return x},playing:function(h){if("number"==typeof h)return h=this._soundById(h),!!h&&!h._paused;for(h=0;h<this._sounds.length;h++)if(!this._sounds[h]._paused)return!0;return!1},duration:function(h){var u=this._duration;h=this._soundById(h);return h&&(u=this._sprite[h._sprite][1]/1E3),u},state:function(){return this._state},unload:function(){for(var h=
this._sounds,v=0;v<h.length;v++)(h[v]._paused||this.stop(h[v]._id),this._webAudio)||(/MSIE |Trident\//.test(y._navigator&&y._navigator.userAgent)||(h[v]._node.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"),h[v]._node.removeEventListener("error",h[v]._errorFn,!1),h[v]._node.removeEventListener(y._canPlayEvent,h[v]._loadFn,!1),y._releaseHtml5Audio(h[v]._node)),delete h[v]._node,this._clearTimer(h[v]._id);v=y._howls.indexOf(this);0<=v&&y._howls.splice(v,
1);h=!0;for(v=0;v<y._howls.length;v++)if(y._howls[v]._src===this._src||0<=this._src.indexOf(y._howls[v]._src)){h=!1;break}return O&&h&&delete O[this._src],y.noAudio=!1,this._state="unloaded",this._sounds=[],null},on:function(h,v,x,w){h=this["_on"+h];return"function"==typeof v&&h.push(w?{id:x,fn:v,once:w}:{id:x,fn:v}),this},off:function(h,v,x){var u=this["_on"+h];if("number"==typeof v&&(x=v,v=null),v||x)for(h=0;h<u.length;h++){var w=x===u[h].id;if(v===u[h].fn&&w||!v&&w){u.splice(h,1);break}}else if(h)this["_on"+
h]=[];else for(v=Object.keys(this),h=0;h<v.length;h++)0===v[h].indexOf("_on")&&Array.isArray(this[v[h]])&&(this[v[h]]=[]);return this},once:function(h,v,x){return this.on(h,v,x,1),this},_emit:function(h,v,x){for(var u=this["_on"+h],w=u.length-1;0<=w;w--)u[w].id&&u[w].id!==v&&"load"!==h||(setTimeout(function(h){h.call(this,v,x)}.bind(this,u[w].fn),0),u[w].once&&this.off(h,u[w].fn,u[w].id));return this._loadQueue(h),this},_loadQueue:function(h){if(0<this._queue.length){var u=this._queue[0];u.event===
h&&(this._queue.shift(),this._loadQueue());h||u.action()}return this},_ended:function(h){var u=h._sprite;if(!this._webAudio&&h._node&&!h._node.paused&&!h._node.ended&&h._node.currentTime<h._stop)return setTimeout(this._ended.bind(this,h),100),this;u=!(!h._loop&&!this._sprite[u][2]);if(this._emit("end",h._id),!this._webAudio&&u&&this.stop(h._id,!0).play(h._id),this._webAudio&&u){this._emit("play",h._id);h._seek=h._start||0;h._rateSeek=0;h._playStart=y.ctx.currentTime;var v=1E3*(h._stop-h._start)/Math.abs(h._rate);
this._endTimers[h._id]=setTimeout(this._ended.bind(this,h),v)}return this._webAudio&&!u&&(h._paused=!0,h._ended=!0,h._seek=h._start||0,h._rateSeek=0,this._clearTimer(h._id),this._cleanBuffer(h._node),y._autoSuspend()),this._webAudio||u||this.stop(h._id,!0),this},_clearTimer:function(h){if(this._endTimers[h]){if("function"!=typeof this._endTimers[h])clearTimeout(this._endTimers[h]);else{var u=this._soundById(h);u&&u._node&&u._node.removeEventListener("ended",this._endTimers[h],!1)}delete this._endTimers[h]}return this},
_soundById:function(h){for(var u=0;u<this._sounds.length;u++)if(h===this._sounds[u]._id)return this._sounds[u];return null},_inactiveSound:function(){this._drain();for(var h=0;h<this._sounds.length;h++)if(this._sounds[h]._ended)return this._sounds[h].reset();return new R(this)},_drain:function(){var h=this._pool,v=0,x;if(!(this._sounds.length<h)){for(x=0;x<this._sounds.length;x++)this._sounds[x]._ended&&v++;for(x=this._sounds.length-1;0<=x&&!(v<=h);x--)this._sounds[x]._ended&&(this._webAudio&&this._sounds[x]._node&&
this._sounds[x]._node.disconnect(0),this._sounds.splice(x,1),v--)}},_getSoundIds:function(h){if(void 0===h){h=[];for(var u=0;u<this._sounds.length;u++)h.push(this._sounds[u]._id);return h}return[h]},_refreshBuffer:function(h){return h._node.bufferSource=y.ctx.createBufferSource(),h._node.bufferSource.buffer=O[this._src],h._panner?h._node.bufferSource.connect(h._panner):h._node.bufferSource.connect(h._node),h._node.bufferSource.loop=h._loop,h._loop&&(h._node.bufferSource.loopStart=h._start||0,h._node.bufferSource.loopEnd=
h._stop||0),h._node.bufferSource.playbackRate.setValueAtTime(h._rate,y.ctx.currentTime),this},_cleanBuffer:function(h){var u=y._navigator&&0<=y._navigator.vendor.indexOf("Apple");if(y._scratchBuffer&&h.bufferSource&&(h.bufferSource.onended=null,h.bufferSource.disconnect(0),u))try{h.bufferSource.buffer=y._scratchBuffer}catch(x){}return h.bufferSource=null,this}};var R=function(h){this._parent=h;this.init()};R.prototype={init:function(){var h=this._parent;return this._muted=h._muted,this._loop=h._loop,
this._volume=h._volume,this._rate=h._rate,this._seek=0,this._paused=!0,this._ended=!0,this._sprite="__default",this._id=++y._counter,h._sounds.push(this),this.create(),this},create:function(){var h=this._parent,v=y._muted||this._muted||this._parent._muted?0:this._volume;return h._webAudio?(this._node=void 0===y.ctx.createGain?y.ctx.createGainNode():y.ctx.createGain(),this._node.gain.setValueAtTime(v,y.ctx.currentTime),this._node.paused=!0,this._node.connect(y.masterGain)):(this._node=y._obtainHtml5Audio(),
this._errorFn=this._errorListener.bind(this),this._node.addEventListener("error",this._errorFn,!1),this._loadFn=this._loadListener.bind(this),this._node.addEventListener(y._canPlayEvent,this._loadFn,!1),this._node.src=h._src,this._node.preload="auto",this._node.volume=v*y.volume(),this._node.load()),this},reset:function(){var h=this._parent;return this._muted=h._muted,this._loop=h._loop,this._volume=h._volume,this._rate=h._rate,this._seek=0,this._rateSeek=0,this._paused=!0,this._ended=!0,this._sprite=
"__default",this._id=++y._counter,this},_errorListener:function(){this._parent._emit("loaderror",this._id,this._node.error?this._node.error.code:0);this._node.removeEventListener("error",this._errorFn,!1)},_loadListener:function(){var h=this._parent;h._duration=Math.ceil(10*this._node.duration)/10;0===Object.keys(h._sprite).length&&(h._sprite={__default:[0,1E3*h._duration]});"loaded"!==h._state&&(h._state="loaded",h._emit("load"),h._loadQueue());this._node.removeEventListener(y._canPlayEvent,this._loadFn,
!1)}};var O={},va=function(h){var u=h._src;if(O[u])return h._duration=O[u].duration,void v(h);if(/^data:[^;]+;base64,/.test(u)){for(var x=atob(u.split(",")[1]),y=new Uint8Array(x.length),V=0;V<x.length;++V)y[V]=x.charCodeAt(V);Ja(y.buffer,h)}else{var B=new XMLHttpRequest;B.open("GET",u,!0);B.withCredentials=h._xhrWithCredentials;B.responseType="arraybuffer";B.onload=function(){var u=(B.status+"")[0];if("0"!==u&&"2"!==u&&"3"!==u)return void h._emit("loaderror",null,"Failed loading audio file with status: "+
B.status+".");Ja(B.response,h)};B.onerror=function(){h._webAudio&&(h._html5=!0,h._webAudio=!1,h._sounds=[],delete O[u],h.load())};w(B)}},w=function(h){try{h.send()}catch(C){h.onerror()}},Ja=function(h,w){var u=function(){w._emit("loaderror",null,"Decoding audio data failed.")},C=function(h){h&&0<w._sounds.length?(O[w._src]=h,v(w,h)):u()};"undefined"!=typeof Promise&&1===y.ctx.decodeAudioData.length?y.ctx.decodeAudioData(h).then(C).catch(u):y.ctx.decodeAudioData(h,C,u)},v=function(h,v){v&&!h._duration&&
(h._duration=v.duration);0===Object.keys(h._sprite).length&&(h._sprite={__default:[0,1E3*h._duration]});"loaded"!==h._state&&(h._state="loaded",h._emit("load"),h._loadQueue())},h=function(){if(y.usingWebAudio){try{"undefined"!=typeof AudioContext?y.ctx=new AudioContext:"undefined"!=typeof webkitAudioContext?y.ctx=new webkitAudioContext:y.usingWebAudio=!1}catch(x){y.usingWebAudio=!1}y.ctx||(y.usingWebAudio=!1);var h=/iP(hone|od|ad)/.test(y._navigator&&y._navigator.platform),v=y._navigator&&y._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);
v=v?parseInt(v[1],10):null;h&&v&&9>v&&(h=/safari/.test(y._navigator&&y._navigator.userAgent.toLowerCase()),(y._navigator&&y._navigator.standalone&&!h||y._navigator&&!y._navigator.standalone&&!h)&&(y.usingWebAudio=!1));y.usingWebAudio&&(y.masterGain=void 0===y.ctx.createGain?y.ctx.createGainNode():y.ctx.createGain(),y.masterGain.gain.setValueAtTime(y._muted?0:1,y.ctx.currentTime),y.masterGain.connect(y.ctx.destination));y._setup()}};"function"==typeof define&&define.amd&&define([],function(){return{Howler:y,
Howl:V}});"undefined"!=typeof exports&&(exports.Howler=y,exports.Howl=V);"undefined"!=typeof window?(window.HowlerGlobal=ca,window.Howler=y,window.Howl=V,window.Sound=R):"undefined"!=typeof global&&(global.HowlerGlobal=ca,global.Howler=y,global.Howl=V,global.Sound=R)}();
!function(){HowlerGlobal.prototype._pos=[0,0,0];HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0];HowlerGlobal.prototype.stereo=function(y){if(!this.ctx||!this.ctx.listener)return this;for(var V=this._howls.length-1;0<=V;V--)this._howls[V].stereo(y);return this};HowlerGlobal.prototype.pos=function(y,V,R){return this.ctx&&this.ctx.listener?(V="number"!=typeof V?this._pos[1]:V,R="number"!=typeof R?this._pos[2]:R,"number"!=typeof y?this._pos:(this._pos=[y,V,R],void 0!==this.ctx.listener.positionX?(this.ctx.listener.positionX.setTargetAtTime(this._pos[0],
Howler.ctx.currentTime,.1),this.ctx.listener.positionY.setTargetAtTime(this._pos[1],Howler.ctx.currentTime,.1),this.ctx.listener.positionZ.setTargetAtTime(this._pos[2],Howler.ctx.currentTime,.1)):this.ctx.listener.setPosition(this._pos[0],this._pos[1],this._pos[2]),this)):this};HowlerGlobal.prototype.orientation=function(y,V,R,O,ca,w){if(!this.ctx||!this.ctx.listener)return this;var Ja=this._orientation;return V="number"!=typeof V?Ja[1]:V,R="number"!=typeof R?Ja[2]:R,O="number"!=typeof O?Ja[3]:O,
ca="number"!=typeof ca?Ja[4]:ca,w="number"!=typeof w?Ja[5]:w,"number"!=typeof y?Ja:(this._orientation=[y,V,R,O,ca,w],void 0!==this.ctx.listener.forwardX?(this.ctx.listener.forwardX.setTargetAtTime(y,Howler.ctx.currentTime,.1),this.ctx.listener.forwardY.setTargetAtTime(V,Howler.ctx.currentTime,.1),this.ctx.listener.forwardZ.setTargetAtTime(R,Howler.ctx.currentTime,.1),this.ctx.listener.upX.setTargetAtTime(y,Howler.ctx.currentTime,.1),this.ctx.listener.upY.setTargetAtTime(V,Howler.ctx.currentTime,.1),
this.ctx.listener.upZ.setTargetAtTime(R,Howler.ctx.currentTime,.1)):this.ctx.listener.setOrientation(y,V,R,O,ca,w),this)};Howl.prototype.init=function(y){return function(V){return this._orientation=V.orientation||[1,0,0],this._stereo=V.stereo||null,this._pos=V.pos||null,this._pannerAttr={coneInnerAngle:void 0!==V.coneInnerAngle?V.coneInnerAngle:360,coneOuterAngle:void 0!==V.coneOuterAngle?V.coneOuterAngle:360,coneOuterGain:void 0!==V.coneOuterGain?V.coneOuterGain:0,distanceModel:void 0!==V.distanceModel?
V.distanceModel:"inverse",maxDistance:void 0!==V.maxDistance?V.maxDistance:1E4,panningModel:void 0!==V.panningModel?V.panningModel:"HRTF",refDistance:void 0!==V.refDistance?V.refDistance:1,rolloffFactor:void 0!==V.rolloffFactor?V.rolloffFactor:1},this._onstereo=V.onstereo?[{fn:V.onstereo}]:[],this._onpos=V.onpos?[{fn:V.onpos}]:[],this._onorientation=V.onorientation?[{fn:V.onorientation}]:[],y.call(this,V)}}(Howl.prototype.init);Howl.prototype.stereo=function(y,V){var R=this;if(!R._webAudio)return R;
if("loaded"!==R._state)return R._queue.push({event:"stereo",action:function(){R.stereo(y,V)}}),R;var O=void 0===Howler.ctx.createStereoPanner?"spatial":"stereo";if(void 0===V){if("number"!=typeof y)return R._stereo;R._stereo=y;R._pos=[y,0,0]}for(var va=R._getSoundIds(V),w=0;w<va.length;w++){var Ja=R._soundById(va[w]);if(Ja){if("number"!=typeof y)return Ja._stereo;Ja._stereo=y;Ja._pos=[y,0,0];Ja._node&&(Ja._pannerAttr.panningModel="equalpower",Ja._panner&&Ja._panner.pan||ca(Ja,O),"spatial"===O?void 0!==
Ja._panner.positionX?(Ja._panner.positionX.setValueAtTime(y,Howler.ctx.currentTime),Ja._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),Ja._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):Ja._panner.setPosition(y,0,0):Ja._panner.pan.setValueAtTime(y,Howler.ctx.currentTime));R._emit("stereo",Ja._id)}}return R};Howl.prototype.pos=function(y,V,R,O){var va=this;if(!va._webAudio)return va;if("loaded"!==va._state)return va._queue.push({event:"pos",action:function(){va.pos(y,V,R,O)}}),
va;if(V="number"!=typeof V?0:V,R="number"!=typeof R?-.5:R,void 0===O){if("number"!=typeof y)return va._pos;va._pos=[y,V,R]}for(var w=va._getSoundIds(O),Ja=0;Ja<w.length;Ja++){var v=va._soundById(w[Ja]);if(v){if("number"!=typeof y)return v._pos;v._pos=[y,V,R];v._node&&(v._panner&&!v._panner.pan||ca(v,"spatial"),void 0!==v._panner.positionX?(v._panner.positionX.setValueAtTime(y,Howler.ctx.currentTime),v._panner.positionY.setValueAtTime(V,Howler.ctx.currentTime),v._panner.positionZ.setValueAtTime(R,
Howler.ctx.currentTime)):v._panner.setPosition(y,V,R));va._emit("pos",v._id)}}return va};Howl.prototype.orientation=function(y,V,R,O){var va=this;if(!va._webAudio)return va;if("loaded"!==va._state)return va._queue.push({event:"orientation",action:function(){va.orientation(y,V,R,O)}}),va;if(V="number"!=typeof V?va._orientation[1]:V,R="number"!=typeof R?va._orientation[2]:R,void 0===O){if("number"!=typeof y)return va._orientation;va._orientation=[y,V,R]}for(var w=va._getSoundIds(O),Ja=0;Ja<w.length;Ja++){var v=
va._soundById(w[Ja]);if(v){if("number"!=typeof y)return v._orientation;v._orientation=[y,V,R];v._node&&(v._panner||(v._pos||(v._pos=va._pos||[0,0,-.5]),ca(v,"spatial")),void 0!==v._panner.orientationX?(v._panner.orientationX.setValueAtTime(y,Howler.ctx.currentTime),v._panner.orientationY.setValueAtTime(V,Howler.ctx.currentTime),v._panner.orientationZ.setValueAtTime(R,Howler.ctx.currentTime)):v._panner.setOrientation(y,V,R));va._emit("orientation",v._id)}}return va};Howl.prototype.pannerAttr=function(){var y,
V,R=arguments;if(!this._webAudio)return this;if(0===R.length)return this._pannerAttr;if(1===R.length){if("object"!=typeof R[0])return V=this._soundById(parseInt(R[0],10)),V?V._pannerAttr:this._pannerAttr;var O=R[0];void 0===y&&(O.pannerAttr||(O.pannerAttr={coneInnerAngle:O.coneInnerAngle,coneOuterAngle:O.coneOuterAngle,coneOuterGain:O.coneOuterGain,distanceModel:O.distanceModel,maxDistance:O.maxDistance,refDistance:O.refDistance,rolloffFactor:O.rolloffFactor,panningModel:O.panningModel}),this._pannerAttr=
{coneInnerAngle:void 0!==O.pannerAttr.coneInnerAngle?O.pannerAttr.coneInnerAngle:this._coneInnerAngle,coneOuterAngle:void 0!==O.pannerAttr.coneOuterAngle?O.pannerAttr.coneOuterAngle:this._coneOuterAngle,coneOuterGain:void 0!==O.pannerAttr.coneOuterGain?O.pannerAttr.coneOuterGain:this._coneOuterGain,distanceModel:void 0!==O.pannerAttr.distanceModel?O.pannerAttr.distanceModel:this._distanceModel,maxDistance:void 0!==O.pannerAttr.maxDistance?O.pannerAttr.maxDistance:this._maxDistance,refDistance:void 0!==
O.pannerAttr.refDistance?O.pannerAttr.refDistance:this._refDistance,rolloffFactor:void 0!==O.pannerAttr.rolloffFactor?O.pannerAttr.rolloffFactor:this._rolloffFactor,panningModel:void 0!==O.pannerAttr.panningModel?O.pannerAttr.panningModel:this._panningModel})}else 2===R.length&&(O=R[0],y=parseInt(R[1],10));y=this._getSoundIds(y);for(R=0;R<y.length;R++)if(V=this._soundById(y[R])){var va=V._pannerAttr;va={coneInnerAngle:void 0!==O.coneInnerAngle?O.coneInnerAngle:va.coneInnerAngle,coneOuterAngle:void 0!==
O.coneOuterAngle?O.coneOuterAngle:va.coneOuterAngle,coneOuterGain:void 0!==O.coneOuterGain?O.coneOuterGain:va.coneOuterGain,distanceModel:void 0!==O.distanceModel?O.distanceModel:va.distanceModel,maxDistance:void 0!==O.maxDistance?O.maxDistance:va.maxDistance,refDistance:void 0!==O.refDistance?O.refDistance:va.refDistance,rolloffFactor:void 0!==O.rolloffFactor?O.rolloffFactor:va.rolloffFactor,panningModel:void 0!==O.panningModel?O.panningModel:va.panningModel};var w=V._panner;w?(w.coneInnerAngle=
va.coneInnerAngle,w.coneOuterAngle=va.coneOuterAngle,w.coneOuterGain=va.coneOuterGain,w.distanceModel=va.distanceModel,w.maxDistance=va.maxDistance,w.refDistance=va.refDistance,w.rolloffFactor=va.rolloffFactor,w.panningModel=va.panningModel):(V._pos||(V._pos=this._pos||[0,0,-.5]),ca(V,"spatial"))}return this};Sound.prototype.init=function(y){return function(){var V=this._parent;this._orientation=V._orientation;this._stereo=V._stereo;this._pos=V._pos;this._pannerAttr=V._pannerAttr;y.call(this);this._stereo?
V.stereo(this._stereo):this._pos&&V.pos(this._pos[0],this._pos[1],this._pos[2],this._id)}}(Sound.prototype.init);Sound.prototype.reset=function(y){return function(){var V=this._parent;return this._orientation=V._orientation,this._stereo=V._stereo,this._pos=V._pos,this._pannerAttr=V._pannerAttr,this._stereo?V.stereo(this._stereo):this._pos?V.pos(this._pos[0],this._pos[1],this._pos[2],this._id):this._panner&&(this._panner.disconnect(0),this._panner=void 0,V._refreshBuffer(this)),y.call(this)}}(Sound.prototype.reset);
var ca=function(y,V){"spatial"===(V||"spatial")?(y._panner=Howler.ctx.createPanner(),y._panner.coneInnerAngle=y._pannerAttr.coneInnerAngle,y._panner.coneOuterAngle=y._pannerAttr.coneOuterAngle,y._panner.coneOuterGain=y._pannerAttr.coneOuterGain,y._panner.distanceModel=y._pannerAttr.distanceModel,y._panner.maxDistance=y._pannerAttr.maxDistance,y._panner.refDistance=y._pannerAttr.refDistance,y._panner.rolloffFactor=y._pannerAttr.rolloffFactor,y._panner.panningModel=y._pannerAttr.panningModel,void 0!==
y._panner.positionX?(y._panner.positionX.setValueAtTime(y._pos[0],Howler.ctx.currentTime),y._panner.positionY.setValueAtTime(y._pos[1],Howler.ctx.currentTime),y._panner.positionZ.setValueAtTime(y._pos[2],Howler.ctx.currentTime)):y._panner.setPosition(y._pos[0],y._pos[1],y._pos[2]),void 0!==y._panner.orientationX?(y._panner.orientationX.setValueAtTime(y._orientation[0],Howler.ctx.currentTime),y._panner.orientationY.setValueAtTime(y._orientation[1],Howler.ctx.currentTime),y._panner.orientationZ.setValueAtTime(y._orientation[2],
Howler.ctx.currentTime)):y._panner.setOrientation(y._orientation[0],y._orientation[1],y._orientation[2])):(y._panner=Howler.ctx.createStereoPanner(),y._panner.pan.setValueAtTime(y._stereo,Howler.ctx.currentTime));y._panner.connect(y._node);y._paused||y._parent.pause(y._id,!0).play(y._id,!0)}}();
!function(ca){"object"==typeof exports&&"undefined"!=typeof module?module.exports=ca():"function"==typeof define&&define.amd?define([],ca):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=ca()}(function(){return function y(V,R,O){function va(v,h){if(!R[v]){if(!V[v]){var u="function"==typeof require&&require;if(!h&&u)return u(v,!0);if(w)return w(v,!0);h=Error("Cannot find module '"+v+"'");throw h.code="MODULE_NOT_FOUND",h;}h=R[v]={exports:{}};
V[v][0].call(h.exports,function(h){var u=V[v][1][h];return va(u?u:h)},h,h.exports,y,V,R,O)}return R[v].exports}for(var w="function"==typeof require&&require,Ja=0;Ja<O.length;Ja++)va(O[Ja]);return va}({1:[function(y,V,R){function O(y){if(!(this instanceof O))return new O(y);y=this.options=Ja.assign({level:Pa,method:B,chunkSize:16384,windowBits:15,memLevel:8,strategy:Ca,to:""},y||{});y.raw&&0<y.windowBits?y.windowBits=-y.windowBits:y.gzip&&0<y.windowBits&&16>y.windowBits&&(y.windowBits+=16);this.err=
0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new u;this.strm.avail_out=0;var V=w.deflateInit2(this.strm,y.level,y.method,y.windowBits,y.memLevel,y.strategy);if(V!==x)throw Error(h[V]);if(y.header&&w.deflateSetHeader(this.strm,y.header),y.dictionary){var R;if(R="string"==typeof y.dictionary?v.string2buf(y.dictionary):"[object ArrayBuffer]"===C.call(y.dictionary)?new Uint8Array(y.dictionary):y.dictionary,V=w.deflateSetDictionary(this.strm,R),V!==x)throw Error(h[V]);this._dict_set=!0}}function va(h,
u){u=new O(u);if(u.push(h,!0),u.err)throw u.msg;return u.result}var w=y("./zlib/deflate"),Ja=y("./utils/common"),v=y("./utils/strings"),h=y("./zlib/messages"),u=y("./zlib/zstream"),C=Object.prototype.toString,x=0,Pa=-1,Ca=0,B=8;O.prototype.push=function(h,u){var B,y=this.strm,O=this.options.chunkSize;if(this.ended)return!1;u=u===~~u?u:!0===u?4:0;"string"==typeof h?y.input=v.string2buf(h):"[object ArrayBuffer]"===C.call(h)?y.input=new Uint8Array(h):y.input=h;y.next_in=0;y.avail_in=y.input.length;do{if(0===
y.avail_out&&(y.output=new Ja.Buf8(O),y.next_out=0,y.avail_out=O),B=w.deflate(y,u),1!==B&&B!==x)return this.onEnd(B),this.ended=!0,!1;0!==y.avail_out&&(0!==y.avail_in||4!==u&&2!==u)||("string"===this.options.to?this.onData(v.buf2binstring(Ja.shrinkBuf(y.output,y.next_out))):this.onData(Ja.shrinkBuf(y.output,y.next_out)))}while((0<y.avail_in||0===y.avail_out)&&1!==B);return 4===u?(B=w.deflateEnd(this.strm),this.onEnd(B),this.ended=!0,B===x):2!==u||(this.onEnd(x),y.avail_out=0,!0)};O.prototype.onData=
function(h){this.chunks.push(h)};O.prototype.onEnd=function(h){h===x&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ja.flattenChunks(this.chunks));this.chunks=[];this.err=h;this.msg=this.strm.msg};R.Deflate=O;R.deflate=va;R.deflateRaw=function(h,u){return u=u||{},u.raw=!0,va(h,u)};R.gzip=function(h,u){return u=u||{},u.gzip=!0,va(h,u)}},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(y,V,R){function O(v){if(!(this instanceof
O))return new O(v);var B=this.options=Ja.assign({chunkSize:16384,windowBits:0,to:""},v||{});B.raw&&0<=B.windowBits&&16>B.windowBits&&(B.windowBits=-B.windowBits,0===B.windowBits&&(B.windowBits=-15));!(0<=B.windowBits&&16>B.windowBits)||v&&v.windowBits||(B.windowBits+=32);15<B.windowBits&&48>B.windowBits&&0===(15&B.windowBits)&&(B.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new C;this.strm.avail_out=0;v=w.inflateInit2(this.strm,B.windowBits);if(v!==h.Z_OK)throw Error(u[v]);
this.header=new x;w.inflateGetHeader(this.strm,this.header)}function va(h,u){u=new O(u);if(u.push(h,!0),u.err)throw u.msg;return u.result}var w=y("./zlib/inflate"),Ja=y("./utils/common"),v=y("./utils/strings"),h=y("./zlib/constants"),u=y("./zlib/messages"),C=y("./zlib/zstream"),x=y("./zlib/gzheader"),Pa=Object.prototype.toString;O.prototype.push=function(u,x){var C,y,B,O,V,R=this.strm,va=this.options.chunkSize,Ca=this.options.dictionary,Aa=!1;if(this.ended)return!1;x=x===~~x?x:!0===x?h.Z_FINISH:h.Z_NO_FLUSH;
"string"==typeof u?R.input=v.binstring2buf(u):"[object ArrayBuffer]"===Pa.call(u)?R.input=new Uint8Array(u):R.input=u;R.next_in=0;R.avail_in=R.input.length;do{if(0===R.avail_out&&(R.output=new Ja.Buf8(va),R.next_out=0,R.avail_out=va),C=w.inflate(R,h.Z_NO_FLUSH),C===h.Z_NEED_DICT&&Ca&&(V="string"==typeof Ca?v.string2buf(Ca):"[object ArrayBuffer]"===Pa.call(Ca)?new Uint8Array(Ca):Ca,C=w.inflateSetDictionary(this.strm,V)),C===h.Z_BUF_ERROR&&!0===Aa&&(C=h.Z_OK,Aa=!1),C!==h.Z_STREAM_END&&C!==h.Z_OK)return this.onEnd(C),
this.ended=!0,!1;R.next_out&&(0!==R.avail_out&&C!==h.Z_STREAM_END&&(0!==R.avail_in||x!==h.Z_FINISH&&x!==h.Z_SYNC_FLUSH)||("string"===this.options.to?(y=v.utf8border(R.output,R.next_out),B=R.next_out-y,O=v.buf2string(R.output,y),R.next_out=B,R.avail_out=va-B,B&&Ja.arraySet(R.output,R.output,y,B,0),this.onData(O)):this.onData(Ja.shrinkBuf(R.output,R.next_out))));0===R.avail_in&&0===R.avail_out&&(Aa=!0)}while((0<R.avail_in||0===R.avail_out)&&C!==h.Z_STREAM_END);return C===h.Z_STREAM_END&&(x=h.Z_FINISH),
x===h.Z_FINISH?(C=w.inflateEnd(this.strm),this.onEnd(C),this.ended=!0,C===h.Z_OK):x!==h.Z_SYNC_FLUSH||(this.onEnd(h.Z_OK),R.avail_out=0,!0)};O.prototype.onData=function(h){this.chunks.push(h)};O.prototype.onEnd=function(u){u===h.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ja.flattenChunks(this.chunks));this.chunks=[];this.err=u;this.msg=this.strm.msg};R.Inflate=O;R.inflate=va;R.inflateRaw=function(h,u){return u=u||{},u.raw=!0,va(h,u)};R.ungzip=va},{"./utils/common":3,
"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(y,V,R){y="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;R.assign=function(w){for(var y=Array.prototype.slice.call(arguments,1);y.length;){var v=y.shift();if(v){if("object"!=typeof v)throw new TypeError(v+"must be non-object");for(var h in v)v.hasOwnProperty(h)&&(w[h]=v[h])}}return w};R.shrinkBuf=function(w,y){return w.length===
y?w:w.subarray?w.subarray(0,y):(w.length=y,w)};var O={arraySet:function(w,y,v,h,u){if(y.subarray&&w.subarray)return void w.set(y.subarray(v,v+h),u);for(var C=0;C<h;C++)w[u+C]=y[v+C]},flattenChunks:function(w){var y,v;var h=v=0;for(y=w.length;h<y;h++)v+=w[h].length;var u=new Uint8Array(v);h=v=0;for(y=w.length;h<y;h++){var C=w[h];u.set(C,v);v+=C.length}return u}},va={arraySet:function(w,y,v,h,u){for(var C=0;C<h;C++)w[u+C]=y[v+C]},flattenChunks:function(w){return[].concat.apply([],w)}};R.setTyped=function(w){w?
(R.Buf8=Uint8Array,R.Buf16=Uint16Array,R.Buf32=Int32Array,R.assign(R,O)):(R.Buf8=Array,R.Buf16=Array,R.Buf32=Array,R.assign(R,va))};R.setTyped(y)},{}],4:[function(y,V,R){function O(h,u){if(65537>u&&(h.subarray&&Ja||!h.subarray&&w))return String.fromCharCode.apply(null,va.shrinkBuf(h,u));for(var v="",x=0;x<u;x++)v+=String.fromCharCode(h[x]);return v}var va=y("./common"),w=!0,Ja=!0;try{String.fromCharCode.apply(null,[0])}catch(h){w=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(h){Ja=
!1}var v=new va.Buf8(256);for(y=0;256>y;y++)v[y]=252<=y?6:248<=y?5:240<=y?4:224<=y?3:192<=y?2:1;v[254]=v[254]=1;R.string2buf=function(h){var u,v,x,w=h.length,y=0;for(v=0;v<w;v++){var B=h.charCodeAt(v);55296===(64512&B)&&v+1<w&&(u=h.charCodeAt(v+1),56320===(64512&u)&&(B=65536+(B-55296<<10)+(u-56320),v++));y+=128>B?1:2048>B?2:65536>B?3:4}var O=new va.Buf8(y);for(v=x=0;x<y;v++)B=h.charCodeAt(v),55296===(64512&B)&&v+1<w&&(u=h.charCodeAt(v+1),56320===(64512&u)&&(B=65536+(B-55296<<10)+(u-56320),v++)),128>
B?O[x++]=B:2048>B?(O[x++]=192|B>>>6,O[x++]=128|63&B):65536>B?(O[x++]=224|B>>>12,O[x++]=128|B>>>6&63,O[x++]=128|63&B):(O[x++]=240|B>>>18,O[x++]=128|B>>>12&63,O[x++]=128|B>>>6&63,O[x++]=128|63&B);return O};R.buf2binstring=function(h){return O(h,h.length)};R.binstring2buf=function(h){for(var u=new va.Buf8(h.length),v=0,x=u.length;v<x;v++)u[v]=h.charCodeAt(v);return u};R.buf2string=function(h,u){var w,x,y,R=u||h.length,B=Array(2*R);for(u=w=0;u<R;)if(x=h[u++],128>x)B[w++]=x;else if(y=v[x],4<y)B[w++]=65533,
u+=y-1;else{for(x&=2===y?31:3===y?15:7;1<y&&u<R;)x=x<<6|63&h[u++],y--;1<y?B[w++]=65533:65536>x?B[w++]=x:(x-=65536,B[w++]=55296|x>>10&1023,B[w++]=56320|1023&x)}return O(B,w)};R.utf8border=function(h,u){var w;u=u||h.length;u>h.length&&(u=h.length);for(w=u-1;0<=w&&128===(192&h[w]);)w--;return 0>w?u:0===w?u:w+v[h[w]]>u?w:u}},{"./common":3}],5:[function(y,V,R){V.exports=function(y,R,w,V){var v=65535&y|0;y=y>>>16&65535|0;for(var h;0!==w;){h=2E3<w?2E3:w;w-=h;do v=v+R[V++]|0,y=y+v|0;while(--h);v%=65521;y%=
65521}return v|y<<16|0}},{}],6:[function(y,V,R){V.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],7:[function(y,V,R){var O=function(){for(var y,w=[],O=0;256>
O;O++){y=O;for(var v=0;8>v;v++)y=1&y?3988292384^y>>>1:y>>>1;w[O]=y}return w}();V.exports=function(y,w,R,v){R=v+R;for(y^=-1;v<R;v++)y=y>>>8^O[255&(y^w[v])];return y^-1}},{}],8:[function(y,V,R){function O(h,u){return h.msg=Qb[u],u}function va(h){for(var u=h.length;0<=--u;)h[u]=0}function w(h){var u=h.state,v=u.pending;v>h.avail_out&&(v=h.avail_out);0!==v&&(X.arraySet(h.output,u.pending_buf,u.pending_out,v,h.next_out),h.next_out+=v,u.pending_out+=v,h.total_out+=v,h.avail_out-=v,u.pending-=v,0===u.pending&&
(u.pending_out=0))}function Ja(h,u){Md._tr_flush_block(h,0<=h.block_start?h.block_start:-1,h.strstart-h.block_start,u);h.block_start=h.strstart;w(h.strm)}function v(h,u){h.pending_buf[h.pending++]=u}function h(h,u){h.pending_buf[h.pending++]=u>>>8&255;h.pending_buf[h.pending++]=255&u}function u(h,u){var v,w,x=h.max_chain_length,Q=h.strstart,y=h.prev_length,B=h.nice_match,C=h.strstart>h.w_size-db?h.strstart-(h.w_size-db):0,A=h.window,K=h.w_mask,N=h.prev,O=h.strstart+Za,da=A[Q+y-1],Aa=A[Q+y];h.prev_length>=
h.good_match&&(x>>=2);B>h.lookahead&&(B=h.lookahead);do if(v=u,A[v+y]===Aa&&A[v+y-1]===da&&A[v]===A[Q]&&A[++v]===A[Q+1]){Q+=2;for(v++;A[++Q]===A[++v]&&A[++Q]===A[++v]&&A[++Q]===A[++v]&&A[++Q]===A[++v]&&A[++Q]===A[++v]&&A[++Q]===A[++v]&&A[++Q]===A[++v]&&A[++Q]===A[++v]&&Q<O;);if(w=Za-(O-Q),Q=O-Za,w>y){if(h.match_start=u,y=w,w>=B)break;da=A[Q+y-1];Aa=A[Q+y]}}while((u=N[u&K])>C&&0!==--x);return y<=h.lookahead?y:h.lookahead}function C(h){var u,v,w=h.w_size;do{if(v=h.window_size-h.lookahead-h.strstart,
h.strstart>=w+(w-db)){X.arraySet(h.window,h.window,w,w,0);h.match_start-=w;h.strstart-=w;h.block_start-=w;var x=u=h.hash_size;do{var Q=h.head[--x];h.head[x]=Q>=w?Q-w:0}while(--u);x=u=w;do Q=h.prev[--x],h.prev[x]=Q>=w?Q-w:0;while(--u);v+=w}if(0===h.strm.avail_in)break;x=h.strm;Q=h.window;var y=h.strstart+h.lookahead,A=x.avail_in;if(u=(A>v&&(A=v),0===A?0:(x.avail_in-=A,X.arraySet(Q,x.input,x.next_in,A,y),1===x.state.wrap?x.adler=cb(x.adler,Q,A,y):2===x.state.wrap&&(x.adler=Ma(x.adler,Q,A,y)),x.next_in+=
A,x.total_in+=A,A)),h.lookahead+=u,h.lookahead+h.insert>=sa)for(v=h.strstart-h.insert,h.ins_h=h.window[v],h.ins_h=(h.ins_h<<h.hash_shift^h.window[v+1])&h.hash_mask;h.insert&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[v+sa-1])&h.hash_mask,h.prev[v&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=v,v++,h.insert--,!(h.lookahead+h.insert<sa)););}while(h.lookahead<db&&0!==h.strm.avail_in)}function x(h,v){for(var w,x;;){if(h.lookahead<db){if(C(h),h.lookahead<db&&v===Aa)return ea;if(0===h.lookahead)break}if(w=0,
h.lookahead>=sa&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+sa-1])&h.hash_mask,w=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart),0!==w&&h.strstart-w<=h.w_size-db&&(h.match_length=u(h,w)),h.match_length>=sa)if(x=Md._tr_tally(h,h.strstart-h.match_start,h.match_length-sa),h.lookahead-=h.match_length,h.match_length<=h.max_lazy_match&&h.lookahead>=sa){h.match_length--;do h.strstart++,h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+sa-1])&h.hash_mask,w=h.prev[h.strstart&
h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart;while(0!==--h.match_length);h.strstart++}else h.strstart+=h.match_length,h.match_length=0,h.ins_h=h.window[h.strstart],h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+1])&h.hash_mask;else x=Md._tr_tally(h,0,h.window[h.strstart]),h.lookahead--,h.strstart++;if(x&&(Ja(h,!1),0===h.strm.avail_out))return ea}return h.insert=h.strstart<sa-1?h.strstart:sa-1,v===Sa?(Ja(h,!0),0===h.strm.avail_out?id:N):h.last_lit&&(Ja(h,!1),0===h.strm.avail_out)?ea:fa}
function Pa(h,v){for(var w,x,y;;){if(h.lookahead<db){if(C(h),h.lookahead<db&&v===Aa)return ea;if(0===h.lookahead)break}if(w=0,h.lookahead>=sa&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+sa-1])&h.hash_mask,w=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart),h.prev_length=h.match_length,h.prev_match=h.match_start,h.match_length=sa-1,0!==w&&h.prev_length<h.max_lazy_match&&h.strstart-w<=h.w_size-db&&(h.match_length=u(h,w),5>=h.match_length&&(h.strategy===oe||h.match_length===
sa&&4096<h.strstart-h.match_start)&&(h.match_length=sa-1)),h.prev_length>=sa&&h.match_length<=h.prev_length){y=h.strstart+h.lookahead-sa;x=Md._tr_tally(h,h.strstart-1-h.prev_match,h.prev_length-sa);h.lookahead-=h.prev_length-1;h.prev_length-=2;do++h.strstart<=y&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[h.strstart+sa-1])&h.hash_mask,w=h.prev[h.strstart&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=h.strstart);while(0!==--h.prev_length);if(h.match_available=0,h.match_length=sa-1,h.strstart++,x&&(Ja(h,!1),
0===h.strm.avail_out))return ea}else if(h.match_available){if(x=Md._tr_tally(h,0,h.window[h.strstart-1]),x&&Ja(h,!1),h.strstart++,h.lookahead--,0===h.strm.avail_out)return ea}else h.match_available=1,h.strstart++,h.lookahead--}return h.match_available&&(Md._tr_tally(h,0,h.window[h.strstart-1]),h.match_available=0),h.insert=h.strstart<sa-1?h.strstart:sa-1,v===Sa?(Ja(h,!0),0===h.strm.avail_out?id:N):h.last_lit&&(Ja(h,!1),0===h.strm.avail_out)?ea:fa}function Ca(h,u,v,w,x){this.good_length=h;this.max_lazy=
u;this.nice_length=v;this.max_chain=w;this.func=x}function B(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=Dd;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=
this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new X.Buf16(2*Vd);this.dyn_dtree=new X.Buf16(2*(2*mf+1));this.bl_tree=new X.Buf16(2*(2*A+1));va(this.dyn_ltree);va(this.dyn_dtree);va(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new X.Buf16(Ua+1);this.heap=new X.Buf16(2*Da+1);va(this.heap);this.heap_max=this.heap_len=0;this.depth=new X.Buf16(2*Da+1);va(this.depth);
this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0}function cc(h){var u;return h&&h.state?(h.total_in=h.total_out=0,h.data_type=ba,u=h.state,u.pending=0,u.pending_out=0,0>u.wrap&&(u.wrap=-u.wrap),u.status=u.wrap?qa:Y,h.adler=2===u.wrap?0:1,u.last_flush=Aa,Md._tr_init(u),da):O(h,Ka)}function Lc(h){var u=cc(h);u===da&&(h=h.state,h.window_size=2*h.w_size,va(h.head),h.max_lazy_match=Ve[h.level].max_lazy,h.good_match=Ve[h.level].good_length,
h.nice_match=Ve[h.level].nice_length,h.max_chain_length=Ve[h.level].max_chain,h.strstart=0,h.block_start=0,h.lookahead=0,h.insert=0,h.match_length=h.prev_length=sa-1,h.match_available=0,h.ins_h=0);return u}function Wc(h,u,v,w,x,y){if(!h)return Ka;var J=1;if(u===K&&(u=6),0>w?(J=0,w=-w):15<w&&(J=2,w-=16),1>x||x>rb||v!==Dd||8>w||15<w||0>u||9<u||0>y||y>bd)return O(h,Ka);8===w&&(w=9);var F=new B;return h.state=F,F.strm=h,F.wrap=J,F.gzhead=null,F.w_bits=w,F.w_size=1<<F.w_bits,F.w_mask=F.w_size-1,F.hash_bits=
x+7,F.hash_size=1<<F.hash_bits,F.hash_mask=F.hash_size-1,F.hash_shift=~~((F.hash_bits+sa-1)/sa),F.window=new X.Buf8(2*F.w_size),F.head=new X.Buf16(F.hash_size),F.prev=new X.Buf16(F.w_size),F.lit_bufsize=1<<x+6,F.pending_buf_size=4*F.lit_bufsize,F.pending_buf=new X.Buf8(F.pending_buf_size),F.d_buf=1*F.lit_bufsize,F.l_buf=3*F.lit_bufsize,F.level=u,F.strategy=y,F.method=v,Lc(h)}var X=y("../utils/common"),Md=y("./trees"),cb=y("./adler32"),Ma=y("./crc32"),Qb=y("./messages"),Aa=0,Sa=4,da=0,Ka=-2,K=-1,oe=
1,bd=4,ba=2,Dd=8,rb=9,Da=286,mf=30,A=19,Vd=2*Da+1,Ua=15,sa=3,Za=258,db=Za+sa+1,qa=42,Y=113,ea=1,fa=2,id=3,N=4;var Ve=[new Ca(0,0,0,0,function(h,u){var v=65535;for(v>h.pending_buf_size-5&&(v=h.pending_buf_size-5);;){if(1>=h.lookahead){if(C(h),0===h.lookahead&&u===Aa)return ea;if(0===h.lookahead)break}h.strstart+=h.lookahead;h.lookahead=0;var w=h.block_start+v;if((0===h.strstart||h.strstart>=w)&&(h.lookahead=h.strstart-w,h.strstart=w,Ja(h,!1),0===h.strm.avail_out)||h.strstart-h.block_start>=h.w_size-
db&&(Ja(h,!1),0===h.strm.avail_out))return ea}return h.insert=0,u===Sa?(Ja(h,!0),0===h.strm.avail_out?id:N):(h.strstart>h.block_start&&Ja(h,!1),ea)}),new Ca(4,4,8,4,x),new Ca(4,5,16,8,x),new Ca(4,6,32,32,x),new Ca(4,4,16,16,Pa),new Ca(8,16,32,32,Pa),new Ca(8,16,128,128,Pa),new Ca(8,32,128,256,Pa),new Ca(32,128,258,1024,Pa),new Ca(32,258,258,4096,Pa)];R.deflateInit=function(h,u){return Wc(h,u,Dd,15,8,0)};R.deflateInit2=Wc;R.deflateReset=Lc;R.deflateResetKeep=cc;R.deflateSetHeader=function(h,u){return h&&
h.state?2!==h.state.wrap?Ka:(h.state.gzhead=u,da):Ka};R.deflate=function(u,x){var J,F;if(!u||!u.state||5<x||0>x)return u?O(u,Ka):Ka;if(F=u.state,!u.output||!u.input&&0!==u.avail_in||666===F.status&&x!==Sa)return O(u,0===u.avail_out?-5:Ka);if(F.strm=u,J=F.last_flush,F.last_flush=x,F.status===qa)if(2===F.wrap)u.adler=0,v(F,31),v(F,139),v(F,8),F.gzhead?(v(F,(F.gzhead.text?1:0)+(F.gzhead.hcrc?2:0)+(F.gzhead.extra?4:0)+(F.gzhead.name?8:0)+(F.gzhead.comment?16:0)),v(F,255&F.gzhead.time),v(F,F.gzhead.time>>
8&255),v(F,F.gzhead.time>>16&255),v(F,F.gzhead.time>>24&255),v(F,9===F.level?2:2<=F.strategy||2>F.level?4:0),v(F,255&F.gzhead.os),F.gzhead.extra&&F.gzhead.extra.length&&(v(F,255&F.gzhead.extra.length),v(F,F.gzhead.extra.length>>8&255)),F.gzhead.hcrc&&(u.adler=Ma(u.adler,F.pending_buf,F.pending,0)),F.gzindex=0,F.status=69):(v(F,0),v(F,0),v(F,0),v(F,0),v(F,0),v(F,9===F.level?2:2<=F.strategy||2>F.level?4:0),v(F,3),F.status=Y);else{var y=Dd+(F.w_bits-8<<4)<<8;y|=(2<=F.strategy||2>F.level?0:6>F.level?
1:6===F.level?2:3)<<6;0!==F.strstart&&(y|=32);F.status=Y;h(F,y+(31-y%31));0!==F.strstart&&(h(F,u.adler>>>16),h(F,65535&u.adler));u.adler=1}if(69===F.status)if(F.gzhead.extra){for(y=F.pending;F.gzindex<(65535&F.gzhead.extra.length)&&(F.pending!==F.pending_buf_size||(F.gzhead.hcrc&&F.pending>y&&(u.adler=Ma(u.adler,F.pending_buf,F.pending-y,y)),w(u),y=F.pending,F.pending!==F.pending_buf_size));)v(F,255&F.gzhead.extra[F.gzindex]),F.gzindex++;F.gzhead.hcrc&&F.pending>y&&(u.adler=Ma(u.adler,F.pending_buf,
F.pending-y,y));F.gzindex===F.gzhead.extra.length&&(F.gzindex=0,F.status=73)}else F.status=73;if(73===F.status)if(F.gzhead.name){y=F.pending;do{if(F.pending===F.pending_buf_size&&(F.gzhead.hcrc&&F.pending>y&&(u.adler=Ma(u.adler,F.pending_buf,F.pending-y,y)),w(u),y=F.pending,F.pending===F.pending_buf_size)){var A=1;break}A=F.gzindex<F.gzhead.name.length?255&F.gzhead.name.charCodeAt(F.gzindex++):0;v(F,A)}while(0!==A);F.gzhead.hcrc&&F.pending>y&&(u.adler=Ma(u.adler,F.pending_buf,F.pending-y,y));0===
A&&(F.gzindex=0,F.status=91)}else F.status=91;if(91===F.status)if(F.gzhead.comment){y=F.pending;do{if(F.pending===F.pending_buf_size&&(F.gzhead.hcrc&&F.pending>y&&(u.adler=Ma(u.adler,F.pending_buf,F.pending-y,y)),w(u),y=F.pending,F.pending===F.pending_buf_size)){A=1;break}A=F.gzindex<F.gzhead.comment.length?255&F.gzhead.comment.charCodeAt(F.gzindex++):0;v(F,A)}while(0!==A);F.gzhead.hcrc&&F.pending>y&&(u.adler=Ma(u.adler,F.pending_buf,F.pending-y,y));0===A&&(F.status=103)}else F.status=103;if(103===
F.status&&(F.gzhead.hcrc?(F.pending+2>F.pending_buf_size&&w(u),F.pending+2<=F.pending_buf_size&&(v(F,255&u.adler),v(F,u.adler>>8&255),u.adler=0,F.status=Y)):F.status=Y),0!==F.pending){if(w(u),0===u.avail_out)return F.last_flush=-1,da}else if(0===u.avail_in&&(x<<1)-(4<x?9:0)<=(J<<1)-(4<J?9:0)&&x!==Sa)return O(u,-5);if(666===F.status&&0!==u.avail_in)return O(u,-5);if(0!==u.avail_in||0!==F.lookahead||x!==Aa&&666!==F.status){if(2===F.strategy)a:{for(var B;;){if(0===F.lookahead&&(C(F),0===F.lookahead)){if(x===
Aa){var K=ea;break a}break}if(F.match_length=0,B=Md._tr_tally(F,0,F.window[F.strstart]),F.lookahead--,F.strstart++,B&&(Ja(F,!1),0===F.strm.avail_out)){K=ea;break a}}K=(F.insert=0,x===Sa?(Ja(F,!0),0===F.strm.avail_out?id:N):F.last_lit&&(Ja(F,!1),0===F.strm.avail_out)?ea:fa)}else if(3===F.strategy)a:{var Q,R;for(B=F.window;;){if(F.lookahead<=Za){if(C(F),F.lookahead<=Za&&x===Aa){K=ea;break a}if(0===F.lookahead)break}if(F.match_length=0,F.lookahead>=sa&&0<F.strstart&&(R=F.strstart-1,Q=B[R],Q===B[++R]&&
Q===B[++R]&&Q===B[++R])){for(J=F.strstart+Za;Q===B[++R]&&Q===B[++R]&&Q===B[++R]&&Q===B[++R]&&Q===B[++R]&&Q===B[++R]&&Q===B[++R]&&Q===B[++R]&&R<J;);F.match_length=Za-(J-R);F.match_length>F.lookahead&&(F.match_length=F.lookahead)}if(F.match_length>=sa?(K=Md._tr_tally(F,1,F.match_length-sa),F.lookahead-=F.match_length,F.strstart+=F.match_length,F.match_length=0):(K=Md._tr_tally(F,0,F.window[F.strstart]),F.lookahead--,F.strstart++),K&&(Ja(F,!1),0===F.strm.avail_out)){K=ea;break a}}K=(F.insert=0,x===Sa?
(Ja(F,!0),0===F.strm.avail_out?id:N):F.last_lit&&(Ja(F,!1),0===F.strm.avail_out)?ea:fa)}else K=Ve[F.level].func(F,x);if(K!==id&&K!==N||(F.status=666),K===ea||K===id)return 0===u.avail_out&&(F.last_flush=-1),da;if(K===fa&&(1===x?Md._tr_align(F):5!==x&&(Md._tr_stored_block(F,0,0,!1),3===x&&(va(F.head),0===F.lookahead&&(F.strstart=0,F.block_start=0,F.insert=0))),w(u),0===u.avail_out))return F.last_flush=-1,da}return x!==Sa?da:0>=F.wrap?1:(2===F.wrap?(v(F,255&u.adler),v(F,u.adler>>8&255),v(F,u.adler>>
16&255),v(F,u.adler>>24&255),v(F,255&u.total_in),v(F,u.total_in>>8&255),v(F,u.total_in>>16&255),v(F,u.total_in>>24&255)):(h(F,u.adler>>>16),h(F,65535&u.adler)),w(u),0<F.wrap&&(F.wrap=-F.wrap),0!==F.pending?da:1)};R.deflateEnd=function(h){var u;return h&&h.state?(u=h.state.status,u!==qa&&69!==u&&73!==u&&91!==u&&103!==u&&u!==Y&&666!==u?O(h,Ka):(h.state=null,u===Y?O(h,-3):da)):Ka};R.deflateSetDictionary=function(h,u){var v,w,x;var y=u.length;if(!h||!h.state||(v=h.state,w=v.wrap,2===w||1===w&&v.status!==
qa||v.lookahead))return Ka;1===w&&(h.adler=cb(h.adler,u,y,0));v.wrap=0;y>=v.w_size&&(0===w&&(va(v.head),v.strstart=0,v.block_start=0,v.insert=0),x=new X.Buf8(v.w_size),X.arraySet(x,u,y-v.w_size,v.w_size,0),u=x,y=v.w_size);x=h.avail_in;var A=h.next_in;var B=h.input;h.avail_in=y;h.next_in=0;h.input=u;for(C(v);v.lookahead>=sa;){u=v.strstart;y=v.lookahead-(sa-1);do v.ins_h=(v.ins_h<<v.hash_shift^v.window[u+sa-1])&v.hash_mask,v.prev[u&v.w_mask]=v.head[v.ins_h],v.head[v.ins_h]=u,u++;while(--y);v.strstart=
u;v.lookahead=sa-1;C(v)}return v.strstart+=v.lookahead,v.block_start=v.strstart,v.insert=v.lookahead,v.lookahead=0,v.match_length=v.prev_length=sa-1,v.match_available=0,h.next_in=A,h.input=B,h.avail_in=x,v.wrap=w,da};R.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,"./trees":14}],9:[function(y,V,R){V.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=
!1}},{}],10:[function(y,V,R){V.exports=function(y,R){var w,O,v;var h=y.state;var u=y.next_in;var C=y.input;var x=u+(y.avail_in-5);var V=y.next_out;var Ca=y.output;R=V-(R-y.avail_out);var B=V+(y.avail_out-257);var va=h.dmax;var Lc=h.wsize;var Wc=h.whave;var X=h.wnext;var Md=h.window;var cb=h.hold;var Ma=h.bits;var Qb=h.lencode;var Aa=h.distcode;var Sa=(1<<h.lenbits)-1;var da=(1<<h.distbits)-1;a:do{15>Ma&&(cb+=C[u++]<<Ma,Ma+=8,cb+=C[u++]<<Ma,Ma+=8);var Ka=Qb[cb&Sa];b:for(;;){if(w=Ka>>>24,cb>>>=w,Ma-=
w,w=Ka>>>16&255,0===w)Ca[V++]=65535&Ka;else{if(!(16&w)){if(0===(64&w)){Ka=Qb[(65535&Ka)+(cb&(1<<w)-1)];continue b}if(32&w){h.mode=12;break a}y.msg="invalid literal/length code";h.mode=30;break a}var K=65535&Ka;(w&=15)&&(Ma<w&&(cb+=C[u++]<<Ma,Ma+=8),K+=cb&(1<<w)-1,cb>>>=w,Ma-=w);15>Ma&&(cb+=C[u++]<<Ma,Ma+=8,cb+=C[u++]<<Ma,Ma+=8);Ka=Aa[cb&da];c:for(;;){if(w=Ka>>>24,cb>>>=w,Ma-=w,w=Ka>>>16&255,!(16&w)){if(0===(64&w)){Ka=Aa[(65535&Ka)+(cb&(1<<w)-1)];continue c}y.msg="invalid distance code";h.mode=30;
break a}if(O=65535&Ka,w&=15,Ma<w&&(cb+=C[u++]<<Ma,Ma+=8,Ma<w&&(cb+=C[u++]<<Ma,Ma+=8)),O+=cb&(1<<w)-1,O>va){y.msg="invalid distance too far back";h.mode=30;break a}if(cb>>>=w,Ma-=w,w=V-R,O>w){if(w=O-w,w>Wc&&h.sane){y.msg="invalid distance too far back";h.mode=30;break a}if(Ka=0,v=Md,0===X){if(Ka+=Lc-w,w<K){K-=w;do Ca[V++]=Md[Ka++];while(--w);Ka=V-O;v=Ca}}else if(X<w){if(Ka+=Lc+X-w,w-=X,w<K){K-=w;do Ca[V++]=Md[Ka++];while(--w);if(Ka=0,X<K){w=X;K-=w;do Ca[V++]=Md[Ka++];while(--w);Ka=V-O;v=Ca}}}else if(Ka+=
X-w,w<K){K-=w;do Ca[V++]=Md[Ka++];while(--w);Ka=V-O;v=Ca}for(;2<K;)Ca[V++]=v[Ka++],Ca[V++]=v[Ka++],Ca[V++]=v[Ka++],K-=3;K&&(Ca[V++]=v[Ka++],1<K&&(Ca[V++]=v[Ka++]))}else{Ka=V-O;do Ca[V++]=Ca[Ka++],Ca[V++]=Ca[Ka++],Ca[V++]=Ca[Ka++],K-=3;while(2<K);K&&(Ca[V++]=Ca[Ka++],1<K&&(Ca[V++]=Ca[Ka++]))}break}}break}}while(u<x&&V<B);K=Ma>>3;u-=K;Ma-=K<<3;y.next_in=u;y.next_out=V;y.avail_in=u<x?5+(x-u):5-(u-x);y.avail_out=V<B?257+(B-V):257-(V-B);h.hold=cb&(1<<Ma)-1;h.bits=Ma}},{}],11:[function(y,V,R){function O(h){return(h>>>
24&255)+(h>>>8&65280)+((65280&h)<<8)+((255&h)<<24)}function va(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new Pa.Buf16(320);this.work=new Pa.Buf16(288);this.distdyn=this.lendyn=null;
this.was=this.back=this.sane=0}function w(h){var u;return h&&h.state?(u=h.state,h.total_in=h.total_out=u.total=0,h.msg="",u.wrap&&(h.adler=1&u.wrap),u.mode=Md,u.last=0,u.havedict=0,u.dmax=32768,u.head=null,u.hold=0,u.bits=0,u.lencode=u.lendyn=new Pa.Buf32(cb),u.distcode=u.distdyn=new Pa.Buf32(Ma),u.sane=1,u.back=-1,Wc):X}function Ja(h){var u;return h&&h.state?(u=h.state,u.wsize=0,u.whave=0,u.wnext=0,w(h)):X}function v(h,u){var v,w;return h&&h.state?(w=h.state,0>u?(v=0,u=-u):(v=(u>>4)+1,48>u&&(u&=
15)),u&&(8>u||15<u)?X:(null!==w.window&&w.wbits!==u&&(w.window=null),w.wrap=v,w.wbits=u,Ja(h))):X}function h(h,u){var w,x;return h?(x=new va,h.state=x,x.window=null,w=v(h,u),w!==Wc&&(h.state=null),w):X}function u(h,u,v,w){var x;h=h.state;return null===h.window&&(h.wsize=1<<h.wbits,h.wnext=0,h.whave=0,h.window=new Pa.Buf8(h.wsize)),w>=h.wsize?(Pa.arraySet(h.window,u,v-h.wsize,h.wsize,0),h.wnext=0,h.whave=h.wsize):(x=h.wsize-h.wnext,x>w&&(x=w),Pa.arraySet(h.window,u,v-w,x,h.wnext),w-=x,w?(Pa.arraySet(h.window,
u,v-w,w,0),h.wnext=w,h.whave=h.wsize):(h.wnext+=x,h.wnext===h.wsize&&(h.wnext=0),h.whave<h.wsize&&(h.whave+=x))),0}var C,x,Pa=y("../utils/common"),Ca=y("./adler32"),B=y("./crc32"),cc=y("./inffast"),Lc=y("./inftrees"),Wc=0,X=-2,Md=1,cb=852,Ma=592,Qb=!0;R.inflateReset=Ja;R.inflateReset2=v;R.inflateResetKeep=w;R.inflateInit=function(u){return h(u,15)};R.inflateInit2=h;R.inflate=function(h,v){var w,y,K,R,V,ba,va,Aa=0,Da=new Pa.Buf8(4),Ja=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!h||!h.state||
!h.output||!h.input&&0!==h.avail_in)return X;var A=h.state;12===A.mode&&(A.mode=13);var Ma=h.next_out;var Ua=h.output;var sa=h.avail_out;var Za=h.next_in;var db=h.input;var qa=h.avail_in;var Y=A.hold;var ea=A.bits;var fa=qa;var Sa=sa;var N=Wc;a:for(;;)switch(A.mode){case Md:if(0===A.wrap){A.mode=13;break}for(;16>ea;){if(0===qa)break a;qa--;Y+=db[Za++]<<ea;ea+=8}if(2&A.wrap&&35615===Y){A.check=0;Da[0]=255&Y;Da[1]=Y>>>8&255;A.check=B(A.check,Da,2,0);ea=Y=0;A.mode=2;break}if(A.flags=0,A.head&&(A.head.done=
!1),!(1&A.wrap)||(((255&Y)<<8)+(Y>>8))%31){h.msg="incorrect header check";A.mode=30;break}if(8!==(15&Y)){h.msg="unknown compression method";A.mode=30;break}if(Y>>>=4,ea-=4,ba=(15&Y)+8,0===A.wbits)A.wbits=ba;else if(ba>A.wbits){h.msg="invalid window size";A.mode=30;break}A.dmax=1<<ba;h.adler=A.check=1;A.mode=512&Y?10:12;ea=Y=0;break;case 2:for(;16>ea;){if(0===qa)break a;qa--;Y+=db[Za++]<<ea;ea+=8}if(A.flags=Y,8!==(255&A.flags)){h.msg="unknown compression method";A.mode=30;break}if(57344&A.flags){h.msg=
"unknown header flags set";A.mode=30;break}A.head&&(A.head.text=Y>>8&1);512&A.flags&&(Da[0]=255&Y,Da[1]=Y>>>8&255,A.check=B(A.check,Da,2,0));ea=Y=0;A.mode=3;case 3:for(;32>ea;){if(0===qa)break a;qa--;Y+=db[Za++]<<ea;ea+=8}A.head&&(A.head.time=Y);512&A.flags&&(Da[0]=255&Y,Da[1]=Y>>>8&255,Da[2]=Y>>>16&255,Da[3]=Y>>>24&255,A.check=B(A.check,Da,4,0));ea=Y=0;A.mode=4;case 4:for(;16>ea;){if(0===qa)break a;qa--;Y+=db[Za++]<<ea;ea+=8}A.head&&(A.head.xflags=255&Y,A.head.os=Y>>8);512&A.flags&&(Da[0]=255&Y,
Da[1]=Y>>>8&255,A.check=B(A.check,Da,2,0));ea=Y=0;A.mode=5;case 5:if(1024&A.flags){for(;16>ea;){if(0===qa)break a;qa--;Y+=db[Za++]<<ea;ea+=8}A.length=Y;A.head&&(A.head.extra_len=Y);512&A.flags&&(Da[0]=255&Y,Da[1]=Y>>>8&255,A.check=B(A.check,Da,2,0));ea=Y=0}else A.head&&(A.head.extra=null);A.mode=6;case 6:if(1024&A.flags&&(w=A.length,w>qa&&(w=qa),w&&(A.head&&(ba=A.head.extra_len-A.length,A.head.extra||(A.head.extra=Array(A.head.extra_len)),Pa.arraySet(A.head.extra,db,Za,w,ba)),512&A.flags&&(A.check=
B(A.check,db,w,Za)),qa-=w,Za+=w,A.length-=w),A.length))break a;A.length=0;A.mode=7;case 7:if(2048&A.flags){if(0===qa)break a;w=0;do ba=db[Za+w++],A.head&&ba&&65536>A.length&&(A.head.name+=String.fromCharCode(ba));while(ba&&w<qa);if(512&A.flags&&(A.check=B(A.check,db,w,Za)),qa-=w,Za+=w,ba)break a}else A.head&&(A.head.name=null);A.length=0;A.mode=8;case 8:if(4096&A.flags){if(0===qa)break a;w=0;do ba=db[Za+w++],A.head&&ba&&65536>A.length&&(A.head.comment+=String.fromCharCode(ba));while(ba&&w<qa);if(512&
A.flags&&(A.check=B(A.check,db,w,Za)),qa-=w,Za+=w,ba)break a}else A.head&&(A.head.comment=null);A.mode=9;case 9:if(512&A.flags){for(;16>ea;){if(0===qa)break a;qa--;Y+=db[Za++]<<ea;ea+=8}if(Y!==(65535&A.check)){h.msg="header crc mismatch";A.mode=30;break}ea=Y=0}A.head&&(A.head.hcrc=A.flags>>9&1,A.head.done=!0);h.adler=A.check=0;A.mode=12;break;case 10:for(;32>ea;){if(0===qa)break a;qa--;Y+=db[Za++]<<ea;ea+=8}h.adler=A.check=O(Y);ea=Y=0;A.mode=11;case 11:if(0===A.havedict)return h.next_out=Ma,h.avail_out=
sa,h.next_in=Za,h.avail_in=qa,A.hold=Y,A.bits=ea,2;h.adler=A.check=1;A.mode=12;case 12:if(5===v||6===v)break a;case 13:if(A.last){Y>>>=7&ea;ea-=7&ea;A.mode=27;break}for(;3>ea;){if(0===qa)break a;qa--;Y+=db[Za++]<<ea;ea+=8}switch(A.last=1&Y,Y>>>=1,--ea,3&Y){case 0:A.mode=14;break;case 1:var cb=A;if(Qb){C=new Pa.Buf32(512);x=new Pa.Buf32(32);for(K=0;144>K;)cb.lens[K++]=8;for(;256>K;)cb.lens[K++]=9;for(;280>K;)cb.lens[K++]=7;for(;288>K;)cb.lens[K++]=8;Lc(1,cb.lens,0,288,C,0,cb.work,{bits:9});for(K=0;32>
K;)cb.lens[K++]=5;Lc(2,cb.lens,0,32,x,0,cb.work,{bits:5});Qb=!1}cb.lencode=C;cb.lenbits=9;cb.distcode=x;cb.distbits=5;if(A.mode=20,6===v){Y>>>=2;ea-=2;break a}break;case 2:A.mode=17;break;case 3:h.msg="invalid block type",A.mode=30}Y>>>=2;ea-=2;break;case 14:Y>>>=7&ea;for(ea-=7&ea;32>ea;){if(0===qa)break a;qa--;Y+=db[Za++]<<ea;ea+=8}if((65535&Y)!==(Y>>>16^65535)){h.msg="invalid stored block lengths";A.mode=30;break}if(A.length=65535&Y,Y=0,ea=0,A.mode=15,6===v)break a;case 15:A.mode=16;case 16:if(w=
A.length){if(w>qa&&(w=qa),w>sa&&(w=sa),0===w)break a;Pa.arraySet(Ua,db,Za,w,Ma);qa-=w;Za+=w;sa-=w;Ma+=w;A.length-=w;break}A.mode=12;break;case 17:for(;14>ea;){if(0===qa)break a;qa--;Y+=db[Za++]<<ea;ea+=8}if(A.nlen=(31&Y)+257,Y>>>=5,ea-=5,A.ndist=(31&Y)+1,Y>>>=5,ea-=5,A.ncode=(15&Y)+4,Y>>>=4,ea-=4,286<A.nlen||30<A.ndist){h.msg="too many length or distance symbols";A.mode=30;break}A.have=0;A.mode=18;case 18:for(;A.have<A.ncode;){for(;3>ea;){if(0===qa)break a;qa--;Y+=db[Za++]<<ea;ea+=8}A.lens[Ja[A.have++]]=
7&Y;Y>>>=3;ea-=3}for(;19>A.have;)A.lens[Ja[A.have++]]=0;if(A.lencode=A.lendyn,A.lenbits=7,va={bits:A.lenbits},N=Lc(0,A.lens,0,19,A.lencode,0,A.work,va),A.lenbits=va.bits,N){h.msg="invalid code lengths set";A.mode=30;break}A.have=0;A.mode=19;case 19:for(;A.have<A.nlen+A.ndist;){for(;Aa=A.lencode[Y&(1<<A.lenbits)-1],R=Aa>>>24,cb=65535&Aa,!(R<=ea);){if(0===qa)break a;qa--;Y+=db[Za++]<<ea;ea+=8}if(16>cb)Y>>>=R,ea-=R,A.lens[A.have++]=cb;else{if(16===cb){for(K=R+2;ea<K;){if(0===qa)break a;qa--;Y+=db[Za++]<<
ea;ea+=8}if(Y>>>=R,ea-=R,0===A.have){h.msg="invalid bit length repeat";A.mode=30;break}ba=A.lens[A.have-1];w=3+(3&Y);Y>>>=2;ea-=2}else if(17===cb){for(K=R+3;ea<K;){if(0===qa)break a;qa--;Y+=db[Za++]<<ea;ea+=8}Y>>>=R;ea-=R;ba=0;w=3+(7&Y);Y>>>=3;ea-=3}else{for(K=R+7;ea<K;){if(0===qa)break a;qa--;Y+=db[Za++]<<ea;ea+=8}Y>>>=R;ea-=R;ba=0;w=11+(127&Y);Y>>>=7;ea-=7}if(A.have+w>A.nlen+A.ndist){h.msg="invalid bit length repeat";A.mode=30;break}for(;w--;)A.lens[A.have++]=ba}}if(30===A.mode)break;if(0===A.lens[256]){h.msg=
"invalid code -- missing end-of-block";A.mode=30;break}if(A.lenbits=9,va={bits:A.lenbits},N=Lc(1,A.lens,0,A.nlen,A.lencode,0,A.work,va),A.lenbits=va.bits,N){h.msg="invalid literal/lengths set";A.mode=30;break}if(A.distbits=6,A.distcode=A.distdyn,va={bits:A.distbits},N=Lc(2,A.lens,A.nlen,A.ndist,A.distcode,0,A.work,va),A.distbits=va.bits,N){h.msg="invalid distances set";A.mode=30;break}if(A.mode=20,6===v)break a;case 20:A.mode=21;case 21:if(6<=qa&&258<=sa){h.next_out=Ma;h.avail_out=sa;h.next_in=Za;
h.avail_in=qa;A.hold=Y;A.bits=ea;cc(h,Sa);Ma=h.next_out;Ua=h.output;sa=h.avail_out;Za=h.next_in;db=h.input;qa=h.avail_in;Y=A.hold;ea=A.bits;12===A.mode&&(A.back=-1);break}for(A.back=0;Aa=A.lencode[Y&(1<<A.lenbits)-1],R=Aa>>>24,K=Aa>>>16&255,cb=65535&Aa,!(R<=ea);){if(0===qa)break a;qa--;Y+=db[Za++]<<ea;ea+=8}if(K&&0===(240&K)){var Q=R;var pe=K;for(V=cb;Aa=A.lencode[V+((Y&(1<<Q+pe)-1)>>Q)],R=Aa>>>24,K=Aa>>>16&255,cb=65535&Aa,!(Q+R<=ea);){if(0===qa)break a;qa--;Y+=db[Za++]<<ea;ea+=8}Y>>>=Q;ea-=Q;A.back+=
Q}if(Y>>>=R,ea-=R,A.back+=R,A.length=cb,0===K){A.mode=26;break}if(32&K){A.back=-1;A.mode=12;break}if(64&K){h.msg="invalid literal/length code";A.mode=30;break}A.extra=15&K;A.mode=22;case 22:if(A.extra){for(K=A.extra;ea<K;){if(0===qa)break a;qa--;Y+=db[Za++]<<ea;ea+=8}A.length+=Y&(1<<A.extra)-1;Y>>>=A.extra;ea-=A.extra;A.back+=A.extra}A.was=A.length;A.mode=23;case 23:for(;Aa=A.distcode[Y&(1<<A.distbits)-1],R=Aa>>>24,K=Aa>>>16&255,cb=65535&Aa,!(R<=ea);){if(0===qa)break a;qa--;Y+=db[Za++]<<ea;ea+=8}if(0===
(240&K)){Q=R;pe=K;for(V=cb;Aa=A.distcode[V+((Y&(1<<Q+pe)-1)>>Q)],R=Aa>>>24,K=Aa>>>16&255,cb=65535&Aa,!(Q+R<=ea);){if(0===qa)break a;qa--;Y+=db[Za++]<<ea;ea+=8}Y>>>=Q;ea-=Q;A.back+=Q}if(Y>>>=R,ea-=R,A.back+=R,64&K){h.msg="invalid distance code";A.mode=30;break}A.offset=cb;A.extra=15&K;A.mode=24;case 24:if(A.extra){for(K=A.extra;ea<K;){if(0===qa)break a;qa--;Y+=db[Za++]<<ea;ea+=8}A.offset+=Y&(1<<A.extra)-1;Y>>>=A.extra;ea-=A.extra;A.back+=A.extra}if(A.offset>A.dmax){h.msg="invalid distance too far back";
A.mode=30;break}A.mode=25;case 25:if(0===sa)break a;if(w=Sa-sa,A.offset>w){if(w=A.offset-w,w>A.whave&&A.sane){h.msg="invalid distance too far back";A.mode=30;break}w>A.wnext?(w-=A.wnext,y=A.wsize-w):y=A.wnext-w;w>A.length&&(w=A.length);K=A.window}else K=Ua,y=Ma-A.offset,w=A.length;w>sa&&(w=sa);sa-=w;A.length-=w;do Ua[Ma++]=K[y++];while(--w);0===A.length&&(A.mode=21);break;case 26:if(0===sa)break a;Ua[Ma++]=A.length;sa--;A.mode=21;break;case 27:if(A.wrap){for(;32>ea;){if(0===qa)break a;qa--;Y|=db[Za++]<<
ea;ea+=8}if(Sa-=sa,h.total_out+=Sa,A.total+=Sa,Sa&&(h.adler=A.check=A.flags?B(A.check,Ua,Sa,Ma-Sa):Ca(A.check,Ua,Sa,Ma-Sa)),Sa=sa,(A.flags?Y:O(Y))!==A.check){h.msg="incorrect data check";A.mode=30;break}ea=Y=0}A.mode=28;case 28:if(A.wrap&&A.flags){for(;32>ea;){if(0===qa)break a;qa--;Y+=db[Za++]<<ea;ea+=8}if(Y!==(4294967295&A.total)){h.msg="incorrect length check";A.mode=30;break}ea=Y=0}A.mode=29;case 29:N=1;break a;case 30:N=-3;break a;case 31:return-4;default:return X}return h.next_out=Ma,h.avail_out=
sa,h.next_in=Za,h.avail_in=qa,A.hold=Y,A.bits=ea,(A.wsize||Sa!==h.avail_out&&30>A.mode&&(27>A.mode||4!==v))&&u(h,h.output,h.next_out,Sa-h.avail_out)?(A.mode=31,-4):(fa-=h.avail_in,Sa-=h.avail_out,h.total_in+=fa,h.total_out+=Sa,A.total+=Sa,A.wrap&&Sa&&(h.adler=A.check=A.flags?B(A.check,Ua,Sa,h.next_out-Sa):Ca(A.check,Ua,Sa,h.next_out-Sa)),h.data_type=A.bits+(A.last?64:0)+(12===A.mode?128:0)+(20===A.mode||15===A.mode?256:0),(0===fa&&0===Sa||4===v)&&N===Wc&&(N=-5),N)};R.inflateEnd=function(h){if(!h||
!h.state)return X;var u=h.state;return u.window&&(u.window=null),h.state=null,Wc};R.inflateGetHeader=function(h,u){var v;return h&&h.state?(v=h.state,0===(2&v.wrap)?X:(v.head=u,u.done=!1,Wc)):X};R.inflateSetDictionary=function(h,v){var w,x,y=v.length;return h&&h.state?(w=h.state,0!==w.wrap&&11!==w.mode?X:11===w.mode&&(x=1,x=Ca(x,v,y,0),x!==w.check)?-3:u(h,v,y,y)?(w.mode=31,-4):(w.havedict=1,Wc)):X};R.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,
"./inffast":10,"./inftrees":12}],12:[function(y,V,R){var O=y("../utils/common"),va=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],w=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],Ja=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],v=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];V.exports=
function(h,u,y,x,R,V,B,cc){var C,Ca,X,Pa,cb,Ma,Qb=cc.bits,Aa,Sa,da,Ka,K,oe=0,bd,ba=null,Dd=0,rb=new O.Buf16(16);var Da=new O.Buf16(16);var mf=null,A=0;for(Aa=0;15>=Aa;Aa++)rb[Aa]=0;for(Sa=0;Sa<x;Sa++)rb[u[y+Sa]]++;var Vd=Qb;for(da=15;1<=da&&0===rb[da];da--);if(Vd>da&&(Vd=da),0===da)return R[V++]=20971520,R[V++]=20971520,cc.bits=1,0;for(Qb=1;Qb<da&&0===rb[Qb];Qb++);Vd<Qb&&(Vd=Qb);for(Aa=C=1;15>=Aa;Aa++)if(C<<=1,C-=rb[Aa],0>C)return-1;if(0<C&&(0===h||1!==da))return-1;Da[1]=0;for(Aa=1;15>Aa;Aa++)Da[Aa+
1]=Da[Aa]+rb[Aa];for(Sa=0;Sa<x;Sa++)0!==u[y+Sa]&&(B[Da[u[y+Sa]]++]=Sa);if(0===h?(ba=mf=B,Pa=19):1===h?(ba=va,Dd-=257,mf=w,A-=257,Pa=256):(ba=Ja,mf=v,Pa=-1),bd=0,Sa=0,Aa=Qb,Da=V,Ka=Vd,K=0,X=-1,oe=1<<Vd,x=oe-1,1===h&&852<oe||2===h&&592<oe)return 1;for(var Ua=0;;){Ua++;var sa=Aa-K;B[Sa]<Pa?(cb=0,Ma=B[Sa]):B[Sa]>Pa?(cb=mf[A+B[Sa]],Ma=ba[Dd+B[Sa]]):(cb=96,Ma=0);C=1<<Aa-K;Qb=Ca=1<<Ka;do Ca-=C,R[Da+(bd>>K)+Ca]=sa<<24|cb<<16|Ma|0;while(0!==Ca);for(C=1<<Aa-1;bd&C;)C>>=1;if(0!==C?(bd&=C-1,bd+=C):bd=0,Sa++,
0===--rb[Aa]){if(Aa===da)break;Aa=u[y+B[Sa]]}if(Aa>Vd&&(bd&x)!==X){0===K&&(K=Vd);Da+=Qb;Ka=Aa-K;for(C=1<<Ka;Ka+K<da&&(C-=rb[Ka+K],!(0>=C));)Ka++,C<<=1;if(oe+=1<<Ka,1===h&&852<oe||2===h&&592<oe)return 1;X=bd&x;R[X]=Vd<<24|Ka<<16|Da-V|0}}return 0!==bd&&(R[Da+bd]=Aa-K<<24|4194304),cc.bits=Vd,0}},{"../utils/common":3}],13:[function(y,V,R){V.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},
{}],14:[function(y,V,R){function O(h){for(var u=h.length;0<=--u;)h[u]=0}function va(h,u,v,w,x){this.static_tree=h;this.extra_bits=u;this.extra_base=v;this.elems=w;this.max_length=x;this.has_stree=h&&h.length}function w(h,u){this.dyn_tree=h;this.max_code=0;this.stat_desc=u}function Ja(h,u){h.pending_buf[h.pending++]=255&u;h.pending_buf[h.pending++]=u>>>8&255}function v(h,u,v){h.bi_valid>Dd-v?(h.bi_buf|=u<<h.bi_valid&65535,Ja(h,h.bi_buf),h.bi_buf=u>>Dd-h.bi_valid,h.bi_valid+=v-Dd):(h.bi_buf|=u<<h.bi_valid&
65535,h.bi_valid+=v)}function h(h,u,w){v(h,w[2*u],w[2*u+1])}function u(h,u){var v=0;do v|=1&h,h>>>=1,v<<=1;while(0<--u);return v>>>1}function C(h,v,w){var x,y=Array(ba+1),J=0;for(x=1;x<=ba;x++)y[x]=J=J+w[x-1]<<1;for(w=0;w<=v;w++)x=h[2*w+1],0!==x&&(h[2*w]=u(y[x]++,x))}function x(h){var u;for(u=0;u<Ka;u++)h.dyn_ltree[2*u]=0;for(u=0;u<K;u++)h.dyn_dtree[2*u]=0;for(u=0;u<oe;u++)h.bl_tree[2*u]=0;h.dyn_ltree[2*rb]=1;h.opt_len=h.static_len=0;h.last_lit=h.matches=0}function Pa(h){8<h.bi_valid?Ja(h,h.bi_buf):
0<h.bi_valid&&(h.pending_buf[h.pending++]=h.bi_buf);h.bi_buf=0;h.bi_valid=0}function Ca(h,u,v,w){var x=2*u,y=2*v;return h[x]<h[y]||h[x]===h[y]&&w[u]<=w[v]}function B(h,u,v){for(var w=h.heap[v],x=v<<1;x<=h.heap_len&&(x<h.heap_len&&Ca(u,h.heap[x+1],h.heap[x],h.depth)&&x++,!Ca(u,w,h.heap[x],h.depth));)h.heap[v]=h.heap[x],v=x,x<<=1;h.heap[v]=w}function cc(u,w,x){var y,J,F=0;if(0!==u.last_lit){do{var A=u.pending_buf[u.d_buf+2*F]<<8|u.pending_buf[u.d_buf+2*F+1];var B=u.pending_buf[u.l_buf+F];F++;0===A?
h(u,B,w):(y=ea[B],h(u,y+da+1,w),J=Vd[y],0!==J&&(B-=fa[y],v(u,B,J)),A--,y=256>A?Y[A]:Y[256+(A>>>7)],h(u,y,x),J=Ua[y],0!==J&&(A-=id[y],v(u,A,J)))}while(F<u.last_lit)}h(u,rb,w)}function Lc(h,u){var v,w=u.dyn_tree;var x=u.stat_desc.static_tree;var y=u.stat_desc.has_stree,A=u.stat_desc.elems,F=-1;h.heap_len=0;h.heap_max=bd;for(v=0;v<A;v++)0!==w[2*v]?(h.heap[++h.heap_len]=F=v,h.depth[v]=0):w[2*v+1]=0;for(;2>h.heap_len;){var J=h.heap[++h.heap_len]=2>F?++F:0;w[2*J]=1;h.depth[J]=0;h.opt_len--;y&&(h.static_len-=
x[2*J+1])}u.max_code=F;for(v=h.heap_len>>1;1<=v;v--)B(h,w,v);J=A;do v=h.heap[1],h.heap[1]=h.heap[h.heap_len--],B(h,w,1),x=h.heap[1],h.heap[--h.heap_max]=v,h.heap[--h.heap_max]=x,w[2*J]=w[2*v]+w[2*x],h.depth[J]=(h.depth[v]>=h.depth[x]?h.depth[v]:h.depth[x])+1,w[2*v+1]=w[2*x+1]=J,h.heap[1]=J++,B(h,w,1);while(2<=h.heap_len);h.heap[--h.heap_max]=h.heap[1];var K,N;v=u.dyn_tree;J=u.max_code;A=u.stat_desc.static_tree;var O=u.stat_desc.has_stree,Q=u.stat_desc.extra_bits,R=u.stat_desc.extra_base,V=u.stat_desc.max_length,
X=0;for(y=0;y<=ba;y++)h.bl_count[y]=0;v[2*h.heap[h.heap_max]+1]=0;for(u=h.heap_max+1;u<bd;u++)x=h.heap[u],y=v[2*v[2*x+1]+1]+1,y>V&&(y=V,X++),v[2*x+1]=y,x>J||(h.bl_count[y]++,K=0,x>=R&&(K=Q[x-R]),N=v[2*x],h.opt_len+=N*(y+K),O&&(h.static_len+=N*(A[2*x+1]+K)));if(0!==X){do{for(y=V-1;0===h.bl_count[y];)y--;h.bl_count[y]--;h.bl_count[y+1]+=2;h.bl_count[V]--;X-=2}while(0<X);for(y=V;0!==y;y--)for(x=h.bl_count[y];0!==x;)K=h.heap[--u],K>J||(v[2*K+1]!==y&&(h.opt_len+=(y-v[2*K+1])*v[2*K],v[2*K+1]=y),x--)}C(w,
F,h.bl_count)}function Wc(h,u,v){var w,x=-1,y=u[1],J=0,F=7,B=4;0===y&&(F=138,B=3);u[2*(v+1)+1]=65535;for(w=0;w<=v;w++){var C=y;y=u[2*(w+1)+1];++J<F&&C===y||(J<B?h.bl_tree[2*C]+=J:0!==C?(C!==x&&h.bl_tree[2*C]++,h.bl_tree[2*Da]++):10>=J?h.bl_tree[2*mf]++:h.bl_tree[2*A]++,J=0,x=C,0===y?(F=138,B=3):C===y?(F=6,B=3):(F=7,B=4))}}function X(u,w,x){var y,F,J=-1,B=w[1],C=0,K=7,N=4;0===B&&(K=138,N=3);for(y=0;y<=x;y++)if(F=B,B=w[2*(y+1)+1],!(++C<K&&F===B)){if(C<N){do h(u,F,u.bl_tree);while(0!==--C)}else 0!==
F?(F!==J&&(h(u,F,u.bl_tree),C--),h(u,Da,u.bl_tree),v(u,C-3,2)):10>=C?(h(u,mf,u.bl_tree),v(u,C-3,3)):(h(u,A,u.bl_tree),v(u,C-11,7));C=0;J=F;0===B?(K=138,N=3):F===B?(K=6,N=3):(K=7,N=4)}}function Md(h){var u,v=4093624447;for(u=0;31>=u;u++,v>>>=1)if(1&v&&0!==h.dyn_ltree[2*u])return Qb;if(0!==h.dyn_ltree[18]||0!==h.dyn_ltree[20]||0!==h.dyn_ltree[26])return Aa;for(u=32;u<da;u++)if(0!==h.dyn_ltree[2*u])return Aa;return Qb}function cb(h,u,w,x){v(h,(Sa<<1)+(x?1:0),3);Pa(h);Ja(h,w);Ja(h,~w);Ma.arraySet(h.pending_buf,
h.window,u,w,h.pending);h.pending+=w}var Ma=y("../utils/common"),Qb=0,Aa=1,Sa=0,da=256,Ka=da+1+29,K=30,oe=19,bd=2*Ka+1,ba=15,Dd=16,rb=256,Da=16,mf=17,A=18,Vd=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Ua=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],sa=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Za=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],db=Array(2*(Ka+2));O(db);var qa=Array(2*K);O(qa);var Y=Array(512);O(Y);var ea=Array(256);O(ea);var fa=Array(29);O(fa);
var id=Array(K);O(id);var N,Ve,Q,pe=!1;R._tr_init=function(h){if(!pe){var v,y,A,B=Array(ba+1);for(A=y=0;28>A;A++)for(fa[A]=y,v=0;v<1<<Vd[A];v++)ea[y++]=A;ea[y-1]=A;for(A=y=0;16>A;A++)for(id[A]=y,v=0;v<1<<Ua[A];v++)Y[y++]=A;for(y>>=7;A<K;A++)for(id[A]=y<<7,v=0;v<1<<Ua[A]-7;v++)Y[256+y++]=A;for(v=0;v<=ba;v++)B[v]=0;for(v=0;143>=v;)db[2*v+1]=8,v++,B[8]++;for(;255>=v;)db[2*v+1]=9,v++,B[9]++;for(;279>=v;)db[2*v+1]=7,v++,B[7]++;for(;287>=v;)db[2*v+1]=8,v++,B[8]++;C(db,Ka+1,B);for(v=0;v<K;v++)qa[2*v+1]=
5,qa[2*v]=u(v,5);N=new va(db,Vd,da+1,Ka,ba);Ve=new va(qa,Ua,0,K,ba);Q=new va([],sa,0,oe,7);pe=!0}h.l_desc=new w(h.dyn_ltree,N);h.d_desc=new w(h.dyn_dtree,Ve);h.bl_desc=new w(h.bl_tree,Q);h.bi_buf=0;h.bi_valid=0;x(h)};R._tr_stored_block=cb;R._tr_flush_block=function(h,u,w,y){var A=0;if(0<h.level){2===h.strm.data_type&&(h.strm.data_type=Md(h));Lc(h,h.l_desc);Lc(h,h.d_desc);Wc(h,h.dyn_ltree,h.l_desc.max_code);Wc(h,h.dyn_dtree,h.d_desc.max_code);Lc(h,h.bl_desc);for(A=oe-1;3<=A&&0===h.bl_tree[2*Za[A]+
1];A--);A=(h.opt_len+=3*(A+1)+14,A);var B=h.opt_len+3+7>>>3;var C=h.static_len+3+7>>>3;C<=B&&(B=C)}else B=C=w+5;if(w+4<=B&&-1!==u)cb(h,u,w,y);else if(4===h.strategy||C===B)v(h,2+(y?1:0),3),cc(h,db,qa);else{v(h,4+(y?1:0),3);u=h.l_desc.max_code+1;w=h.d_desc.max_code+1;A+=1;v(h,u-257,5);v(h,w-1,5);v(h,A-4,4);for(B=0;B<A;B++)v(h,h.bl_tree[2*Za[B]+1],3);X(h,h.dyn_ltree,u-1);X(h,h.dyn_dtree,w-1);cc(h,h.dyn_ltree,h.dyn_dtree)}x(h);y&&Pa(h)};R._tr_tally=function(h,u,v){return h.pending_buf[h.d_buf+2*h.last_lit]=
u>>>8&255,h.pending_buf[h.d_buf+2*h.last_lit+1]=255&u,h.pending_buf[h.l_buf+h.last_lit]=255&v,h.last_lit++,0===u?h.dyn_ltree[2*v]++:(h.matches++,u--,h.dyn_ltree[2*(ea[v]+da+1)]++,h.dyn_dtree[2*(256>u?Y[u]:Y[256+(u>>>7)])]++),h.last_lit===h.lit_bufsize-1};R._tr_align=function(u){v(u,2,3);h(u,rb,db);16===u.bi_valid?(Ja(u,u.bi_buf),u.bi_buf=0,u.bi_valid=0):8<=u.bi_valid&&(u.pending_buf[u.pending++]=255&u.bi_buf,u.bi_buf>>=8,u.bi_valid-=8)}},{"../utils/common":3}],15:[function(y,V,R){V.exports=function(){this.input=
null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(y,V,R){R=y("./lib/utils/common").assign;var O=y("./lib/deflate"),va=y("./lib/inflate");y=y("./lib/zlib/constants");var w={};R(w,O,va,y);V.exports=w},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});
var saveAs=saveAs||function(ca){if(!("undefined"===typeof ca||"undefined"!==typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var y=ca.document.createElementNS("http://www.w3.org/1999/xhtml","a"),V="download"in y,R=/constructor/i.test(ca.HTMLElement)||ca.safari,O=/CriOS\/[\d]+/.test(navigator.userAgent),va=function(h){(ca.setImmediate||ca.setTimeout)(function(){throw h;},0)},w=function(h){setTimeout(function(){"string"===typeof h?(ca.URL||ca.webkitURL||ca).revokeObjectURL(h):h.remove()},
4E4)},Ja=function(h){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(h.type)?new Blob([String.fromCharCode(65279),h],{type:h.type}):h},v=function(h,v,x){x||(h=Ja(h));var u=this,C="application/octet-stream"===h.type,B=function(){var h=["writestart","progress","write","writeend"];h=[].concat(h);for(var v=h.length;v--;){var w=u["on"+h[v]];if("function"===typeof w)try{w.call(u,u)}catch(Md){va(Md)}}};u.readyState=u.INIT;if(V){var cc=(ca.URL||ca.webkitURL||ca).createObjectURL(h);
setTimeout(function(){y.href=cc;y.download=v;var h=new MouseEvent("click");y.dispatchEvent(h);B();w(cc);u.readyState=u.DONE})}else(function(){if((O||C&&R)&&ca.FileReader){var v=new FileReader;v.onloadend=function(){var h=O?v.result:v.result.replace(/^data:[^;]*;/,"data:attachment/file;");ca.open(h,"_blank")||(ca.location.href=h);u.readyState=u.DONE;B()};v.readAsDataURL(h);u.readyState=u.INIT}else cc||(cc=(ca.URL||ca.webkitURL||ca).createObjectURL(h)),C?ca.location.href=cc:ca.open(cc,"_blank")||(ca.location.href=
cc),u.readyState=u.DONE,B(),w(cc)})()},h=v.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(h,v,w){v=v||h.name||"download";w||(h=Ja(h));return navigator.msSaveOrOpenBlob(h,v)};h.abort=function(){};h.readyState=h.INIT=0;h.WRITING=1;h.DONE=2;h.error=h.onwritestart=h.onprogress=h.onwrite=h.onabort=h.onerror=h.onwriteend=null;return function(h,w,x){return new v(h,w||h.name||"download",x)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
"undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!==define.amd&&define("FileSaver.js",function(){return saveAs});"function"==typeof define&&define.__amd&&(define.amd=define.__amd,delete define.__amd);
//# sourceMappingURL=9.js.map