/*
 howler.js v2.2.4 | (c) 2013-2020, 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.arrayIteratorImpl=function(B){var v=0;return function(){return v<B.length?{done:!1,value:B[v++]}:{done:!0}}};$jscomp.arrayIterator=function(B){return{next:$jscomp.arrayIteratorImpl(B)}};$jscomp.makeIterator=function(B){var v="undefined"!=typeof Symbol&&Symbol.iterator&&B[Symbol.iterator];return v?v.call(B):$jscomp.arrayIterator(B)};
$jscomp.getGlobal=function(B){B=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global,B];for(var v=0;v<B.length;++v){var F=B[v];if(F&&F.Math==Math)return F}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(B,v,F){B!=Array.prototype&&B!=Object.prototype&&(B[v]=F.value)};$jscomp.polyfill=function(B,v,F,I){if(v){F=$jscomp.global;B=B.split(".");for(I=0;I<B.length-1;I++){var P=B[I];P in F||(F[P]={});F=F[P]}B=B[B.length-1];I=F[B];v=v(I);v!=I&&null!=v&&$jscomp.defineProperty(F,B,{configurable:!0,writable:!0,value:v})}};$jscomp.FORCE_POLYFILL_PROMISE=!1;
$jscomp.polyfill("Promise",function(B){function v(){this.batch_=null}function F(v){return v instanceof P?v:new P(function(x,ca){x(v)})}if(B&&!$jscomp.FORCE_POLYFILL_PROMISE)return B;v.prototype.asyncExecute=function(v){if(null==this.batch_){this.batch_=[];var x=this;this.asyncExecuteFunction(function(){x.executeBatch_()})}this.batch_.push(v)};var I=$jscomp.global.setTimeout;v.prototype.asyncExecuteFunction=function(v){I(v,0)};v.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var v=
this.batch_;this.batch_=[];for(var x=0;x<v.length;++x){var B=v[x];v[x]=null;try{B()}catch(q){this.asyncThrow_(q)}}}this.batch_=null};v.prototype.asyncThrow_=function(v){this.asyncExecuteFunction(function(){throw v;})};var P=function(v){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var x=this.createResolveAndReject_();try{v(x.resolve,x.reject)}catch(oa){x.reject(oa)}};P.prototype.createResolveAndReject_=function(){function v(q){return function(h){B||(B=!0,q.call(x,h))}}var x=this,B=
!1;return{resolve:v(this.resolveTo_),reject:v(this.reject_)}};P.prototype.resolveTo_=function(v){if(v===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(v instanceof P)this.settleSameAsPromise_(v);else{a:switch(typeof v){case "object":var x=null!=v;break a;case "function":x=!0;break a;default:x=!1}x?this.resolveToNonPromiseObj_(v):this.fulfill_(v)}};P.prototype.resolveToNonPromiseObj_=function(v){var x=void 0;try{x=v.then}catch(oa){this.reject_(oa);return}"function"==
typeof x?this.settleSameAsThenable_(x,v):this.fulfill_(v)};P.prototype.reject_=function(v){this.settle_(2,v)};P.prototype.fulfill_=function(v){this.settle_(1,v)};P.prototype.settle_=function(v,x){if(0!=this.state_)throw Error("Cannot settle("+v+", "+x+"): Promise already settled in state"+this.state_);this.state_=v;this.result_=x;this.executeOnSettledCallbacks_()};P.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var v=0;v<this.onSettledCallbacks_.length;++v)Q.asyncExecute(this.onSettledCallbacks_[v]);
this.onSettledCallbacks_=null}};var Q=new v;P.prototype.settleSameAsPromise_=function(v){var x=this.createResolveAndReject_();v.callWhenSettled_(x.resolve,x.reject)};P.prototype.settleSameAsThenable_=function(v,x){var B=this.createResolveAndReject_();try{v.call(x,B.resolve,B.reject)}catch(q){B.reject(q)}};P.prototype.then=function(v,x){function B(t,n){return"function"==typeof t?function(n){try{q(t(n))}catch(Bb){h(Bb)}}:n}var q,h,t=new P(function(t,n){q=t;h=n});this.callWhenSettled_(B(v,q),B(x,h));
return t};P.prototype.catch=function(v){return this.then(void 0,v)};P.prototype.callWhenSettled_=function(v,x){function B(){switch(q.state_){case 1:v(q.result_);break;case 2:x(q.result_);break;default:throw Error("Unexpected state: "+q.state_);}}var q=this;null==this.onSettledCallbacks_?Q.asyncExecute(B):this.onSettledCallbacks_.push(B)};P.resolve=F;P.reject=function(v){return new P(function(x,B){B(v)})};P.race=function(v){return new P(function(x,B){for(var q=$jscomp.makeIterator(v),h=q.next();!h.done;h=
q.next())F(h.value).callWhenSettled_(x,B)})};P.all=function(v){var x=$jscomp.makeIterator(v),B=x.next();return B.done?F([]):new P(function(q,h){function t(h){return function(t){v[h]=t;n--;0==n&&q(v)}}var v=[],n=0;do v.push(void 0),n++,F(B.value).callWhenSettled_(t(v.length-1),h),B=x.next();while(!B.done)})};return P},"es6","es3");$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};
$jscomp.SymbolClass=function(B,v){this.$jscomp$symbol$id_=B;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:v})};$jscomp.SymbolClass.prototype.toString=function(){return this.$jscomp$symbol$id_};$jscomp.Symbol=function(){function B(F){if(this instanceof B)throw new TypeError("Symbol is not a constructor");return new $jscomp.SymbolClass($jscomp.SYMBOL_PREFIX+(F||"")+"_"+v++,F)}var v=0;return B}();
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var B=$jscomp.global.Symbol.iterator;B||(B=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[B]&&$jscomp.defineProperty(Array.prototype,B,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}});$jscomp.initSymbolIterator=function(){}};
$jscomp.initSymbolAsyncIterator=function(){$jscomp.initSymbol();var B=$jscomp.global.Symbol.asyncIterator;B||(B=$jscomp.global.Symbol.asyncIterator=$jscomp.global.Symbol("Symbol.asyncIterator"));$jscomp.initSymbolAsyncIterator=function(){}};$jscomp.iteratorPrototype=function(B){$jscomp.initSymbolIterator();B={next:B};B[$jscomp.global.Symbol.iterator]=function(){return this};return B};$jscomp.underscoreProtoCanBeSet=function(){var B={a:!0},v={};try{return v.__proto__=B,v.a}catch(F){}return!1};
$jscomp.setPrototypeOf="function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(B,v){B.__proto__=v;if(B.__proto__!==v)throw new TypeError(B+" is not extensible");return B}:null;$jscomp.generator={};$jscomp.generator.ensureIteratorResultIsObject_=function(B){if(!(B instanceof Object))throw new TypeError("Iterator result "+B+" is not an object");};
$jscomp.generator.Context=function(){this.isRunning_=!1;this.yieldAllIterator_=null;this.yieldResult=void 0;this.nextAddress=1;this.finallyAddress_=this.catchAddress_=0;this.finallyContexts_=this.abruptCompletion_=null};$jscomp.generator.Context.prototype.start_=function(){if(this.isRunning_)throw new TypeError("Generator is already running");this.isRunning_=!0};$jscomp.generator.Context.prototype.stop_=function(){this.isRunning_=!1};
$jscomp.generator.Context.prototype.jumpToErrorHandler_=function(){this.nextAddress=this.catchAddress_||this.finallyAddress_};$jscomp.generator.Context.prototype.next_=function(B){this.yieldResult=B};$jscomp.generator.Context.prototype.throw_=function(B){this.abruptCompletion_={exception:B,isException:!0};this.jumpToErrorHandler_()};$jscomp.generator.Context.prototype.return=function(B){this.abruptCompletion_={return:B};this.nextAddress=this.finallyAddress_};
$jscomp.generator.Context.prototype.jumpThroughFinallyBlocks=function(B){this.abruptCompletion_={jumpTo:B};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.yield=function(B,v){this.nextAddress=v;return{value:B}};$jscomp.generator.Context.prototype.yieldAll=function(B,v){B=$jscomp.makeIterator(B);var F=B.next();$jscomp.generator.ensureIteratorResultIsObject_(F);if(F.done)this.yieldResult=F.value,this.nextAddress=v;else return this.yieldAllIterator_=B,this.yield(F.value,v)};
$jscomp.generator.Context.prototype.jumpTo=function(B){this.nextAddress=B};$jscomp.generator.Context.prototype.jumpToEnd=function(){this.nextAddress=0};$jscomp.generator.Context.prototype.setCatchFinallyBlocks=function(B,v){this.catchAddress_=B;void 0!=v&&(this.finallyAddress_=v)};$jscomp.generator.Context.prototype.setFinallyBlock=function(B){this.catchAddress_=0;this.finallyAddress_=B||0};$jscomp.generator.Context.prototype.leaveTryBlock=function(B,v){this.nextAddress=B;this.catchAddress_=v||0};
$jscomp.generator.Context.prototype.enterCatchBlock=function(B){this.catchAddress_=B||0;B=this.abruptCompletion_.exception;this.abruptCompletion_=null;return B};$jscomp.generator.Context.prototype.enterFinallyBlock=function(B,v,F){F?this.finallyContexts_[F]=this.abruptCompletion_:this.finallyContexts_=[this.abruptCompletion_];this.catchAddress_=B||0;this.finallyAddress_=v||0};
$jscomp.generator.Context.prototype.leaveFinallyBlock=function(B,v){v=this.finallyContexts_.splice(v||0)[0];if(v=this.abruptCompletion_=this.abruptCompletion_||v){if(v.isException)return this.jumpToErrorHandler_();void 0!=v.jumpTo&&this.finallyAddress_<v.jumpTo?(this.nextAddress=v.jumpTo,this.abruptCompletion_=null):this.nextAddress=this.finallyAddress_}else this.nextAddress=B};$jscomp.generator.Context.prototype.forIn=function(B){return new $jscomp.generator.Context.PropertyIterator(B)};
$jscomp.generator.Context.PropertyIterator=function(B){this.object_=B;this.properties_=[];for(var v in B)this.properties_.push(v);this.properties_.reverse()};$jscomp.generator.Context.PropertyIterator.prototype.getNext=function(){for(;0<this.properties_.length;){var B=this.properties_.pop();if(B in this.object_)return B}return null};$jscomp.generator.Engine_=function(B){this.context_=new $jscomp.generator.Context;this.program_=B};
$jscomp.generator.Engine_.prototype.next_=function(B){this.context_.start_();if(this.context_.yieldAllIterator_)return this.yieldAllStep_(this.context_.yieldAllIterator_.next,B,this.context_.next_);this.context_.next_(B);return this.nextStep_()};
$jscomp.generator.Engine_.prototype.return_=function(B){this.context_.start_();var v=this.context_.yieldAllIterator_;if(v)return this.yieldAllStep_("return"in v?v["return"]:function(v){return{value:v,done:!0}},B,this.context_.return);this.context_.return(B);return this.nextStep_()};
$jscomp.generator.Engine_.prototype.throw_=function(B){this.context_.start_();if(this.context_.yieldAllIterator_)return this.yieldAllStep_(this.context_.yieldAllIterator_["throw"],B,this.context_.next_);this.context_.throw_(B);return this.nextStep_()};
$jscomp.generator.Engine_.prototype.yieldAllStep_=function(B,v,F){try{var I=B.call(this.context_.yieldAllIterator_,v);$jscomp.generator.ensureIteratorResultIsObject_(I);if(!I.done)return this.context_.stop_(),I;var P=I.value}catch(Q){return this.context_.yieldAllIterator_=null,this.context_.throw_(Q),this.nextStep_()}this.context_.yieldAllIterator_=null;F.call(this.context_,P);return this.nextStep_()};
$jscomp.generator.Engine_.prototype.nextStep_=function(){for(;this.context_.nextAddress;)try{var B=this.program_(this.context_);if(B)return this.context_.stop_(),{value:B.value,done:!1}}catch(v){this.context_.yieldResult=void 0,this.context_.throw_(v)}this.context_.stop_();if(this.context_.abruptCompletion_){B=this.context_.abruptCompletion_;this.context_.abruptCompletion_=null;if(B.isException)throw B.exception;return{value:B.return,done:!0}}return{value:void 0,done:!0}};
$jscomp.generator.Generator_=function(B){this.next=function(v){return B.next_(v)};this.throw=function(v){return B.throw_(v)};this.return=function(v){return B.return_(v)};$jscomp.initSymbolIterator();this[Symbol.iterator]=function(){return this}};$jscomp.generator.createGenerator=function(B,v){v=new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(v));$jscomp.setPrototypeOf&&$jscomp.setPrototypeOf(v,B.prototype);return v};
$jscomp.asyncExecutePromiseGenerator=function(B){function v(v){return B.next(v)}function F(v){return B.throw(v)}return new Promise(function(I,P){function Q(B){B.done?I(B.value):Promise.resolve(B.value).then(v,F).then(Q,P)}Q(B.next())})};$jscomp.asyncExecutePromiseGeneratorFunction=function(B){return $jscomp.asyncExecutePromiseGenerator(B())};$jscomp.asyncExecutePromiseGeneratorProgram=function(B){return $jscomp.asyncExecutePromiseGenerator(new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(B)))};
$jscomp.iteratorFromArray=function(B,v){$jscomp.initSymbolIterator();B instanceof String&&(B+="");var F=0,I={next:function(){if(F<B.length){var P=F++;return{value:v(P,B[P]),done:!1}}I.next=function(){return{done:!0,value:void 0}};return I.next()}};I[Symbol.iterator]=function(){return I};return I};$jscomp.polyfill("Array.prototype.keys",function(B){return B?B:function(){return $jscomp.iteratorFromArray(this,function(v){return v})}},"es6","es3");
$jscomp.checkStringArgs=function(B,v,F){if(null==B)throw new TypeError("The 'this' value for String.prototype."+F+" must not be null or undefined");if(v instanceof RegExp)throw new TypeError("First argument to String.prototype."+F+" must not be a regular expression");return B+""};
$jscomp.polyfill("String.prototype.startsWith",function(B){return B?B:function(v,B){var F=$jscomp.checkStringArgs(this,v,"startsWith");v+="";var P=F.length,Q=v.length;B=Math.max(0,Math.min(B|0,F.length));for(var ca=0;ca<Q&&B<P;)if(F[B++]!=v[ca++])return!1;return ca>=Q}},"es6","es3");
$jscomp.polyfill("Array.prototype.fill",function(B){return B?B:function(v,B,I){var P=this.length||0;0>B&&(B=Math.max(0,P+B));if(null==I||I>P)I=P;I=Number(I);0>I&&(I=Math.max(0,P+I));for(B=Number(B||0);B<I;B++)this[B]=v;return this}},"es6","es3");
$jscomp.polyfill("String.prototype.endsWith",function(B){return B?B:function(v,B){var F=$jscomp.checkStringArgs(this,v,"endsWith");v+="";void 0===B&&(B=F.length);B=Math.max(0,Math.min(B|0,F.length));for(var P=v.length;0<P&&0<B;)if(F[--B]!=v[--P])return!1;return 0>=P}},"es6","es3");
$jscomp.polyfill("String.fromCodePoint",function(B){return B?B:function(v){for(var B="",I=0;I<arguments.length;I++){var P=Number(arguments[I]);if(0>P||1114111<P||P!==Math.floor(P))throw new RangeError("invalid_code_point "+P);65535>=P?B+=String.fromCharCode(P):(P-=65536,B+=String.fromCharCode(P>>>10&1023|55296),B+=String.fromCharCode(P&1023|56320))}return B}},"es6","es3");
$jscomp.polyfill("Array.prototype.values",function(B){return B?B:function(){return $jscomp.iteratorFromArray(this,function(v,B){return B})}},"es8","es3");$jscomp.owns=function(B,v){return Object.prototype.hasOwnProperty.call(B,v)};$jscomp.polyfill("Object.values",function(B){return B?B:function(v){var B=[],I;for(I in v)$jscomp.owns(v,I)&&B.push(v[I]);return B}},"es8","es3");$jscomp.polyfill("Object.setPrototypeOf",function(B){return B||$jscomp.setPrototypeOf},"es6","es5");
$jscomp.polyfill("String.prototype.repeat",function(B){return B?B:function(v){var B=$jscomp.checkStringArgs(this,null,"repeat");if(0>v||1342177279<v)throw new RangeError("Invalid count value");v|=0;for(var I="";v;)if(v&1&&(I+=B),v>>>=1)B+=B;return I}},"es6","es3");$jscomp.polyfill("Object.is",function(B){return B?B:function(v,B){return v===B?0!==v||1/v===1/B:v!==v&&B!==B}},"es6","es3");
$jscomp.polyfill("Array.prototype.includes",function(B){return B?B:function(v,B){var I=this;I instanceof String&&(I=String(I));var P=I.length;B=B||0;for(0>B&&(B=Math.max(B+P,0));B<P;B++){var F=I[B];if(F===v||Object.is(F,v))return!0}return!1}},"es7","es3");$jscomp.polyfill("String.prototype.includes",function(B){return B?B:function(v,B){return-1!==$jscomp.checkStringArgs(this,v,"includes").indexOf(v,B||0)}},"es6","es3");
var $lime_init=function(B,v){var F=function(v,B){(function(v,B){function x(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 P(a){return a instanceof Array?new Ld(a):a.iterator()}function q(a,b){if(null==b)return null;null==b.__id__&&(b.__id__=B.$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}v.lime=v.lime||{};var h=
{},t=function(){return na.__string_rec(this,"")},G=G||{},n,Kb=function(){};h["lime.app.IModule"]=Kb;Kb.__name__="lime.app.IModule";Kb.__isInterface__=!0;Kb.prototype={__registerLimeModule:null,__unregisterLimeModule:null,__class__:Kb};var Bb=function(){this.onExit=new dh};h["lime.app.Module"]=Bb;Bb.__name__="lime.app.Module";Bb.__interfaces__=[Kb];Bb.prototype={onExit:null,__registerLimeModule:function(a){},__unregisterLimeModule:function(a){},__class__:Bb};var I=function(a){this.gameDeviceCache=
new hc;this.parent=a;this.nextUpdate=this.lastUpdate=this.currentUpdate=0;this.framePeriod=-1;ld.init();this.accelerometer=De.registerSensor(Wn.ACCELEROMETER,0)};h["lime._internal.backend.html5.HTML5Application"]=I;I.__name__="lime._internal.backend.html5.HTML5Application";I.prototype={accelerometer:null,currentUpdate:null,deltaTime:null,framePeriod:null,gameDeviceCache:null,hidden: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",q(this,this.handleKeyEvent),!1);window.addEventListener("keyup",q(this,this.handleKeyEvent),!1);window.addEventListener("focus",q(this,this.handleWindowEvent),!1);window.addEventListener("blur",q(this,this.handleWindowEvent),!1);window.addEventListener("resize",q(this,this.handleWindowEvent),!1);window.addEventListener("beforeunload",q(this,this.handleWindowEvent),!1);Object.prototype.hasOwnProperty.call(window,"Accelerometer")&&window.addEventListener("devicemotion",
q(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=window.performance.now(),f=Math.max(0,16-(d-b));c=window.setTimeout(function(){a(d+f)},f);b=d+f;return c});window.cancelAnimationFrame||
(window.cancelAnimationFrame=function(a){clearTimeout(a)});window.requestAnimFrame=window.requestAnimationFrame;this.lastUpdate=window.performance.now();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=window.performance.now();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(q(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.hidden||(this.parent.__window.onFocusOut.dispatch(),this.parent.__window.onDeactivate.dispatch(),this.hidden=!0);break;case "focus":this.hidden&&(this.parent.__window.onFocusIn.dispatch(),this.parent.__window.onActivate.dispatch(),this.hidden=!1);break;case "resize":this.parent.__window.__backend.handleResizeEvent(a);break;case "visibilitychange":window.document.hidden?this.hidden||(this.parent.__window.onFocusOut.dispatch(),this.parent.__window.onDeactivate.dispatch(),
this.hidden=!0):this.hidden&&(this.parent.__window.onFocusIn.dispatch(),this.parent.__window.onActivate.dispatch(),this.hidden=!1)}},updateGameDevices:function(){var a=Fc.__getDeviceData();if(null!=a)for(var b,c,d,f,g,k=0,l=a.length;k<l;)if(b=k++,f=a[b],null!=f){if(!this.gameDeviceCache.h.hasOwnProperty(b)){g=new $l;g.id=b;g.connected=f.connected;c=0;for(d=f.buttons.length;c<d;){var m=c++;g.buttons.push(f.buttons[m].value)}c=0;for(d=f.axes.length;c<d;)m=c++,g.axes.push(f.axes[m]);"standard"==f.mapping&&
(g.isGamepad=!0);this.gameDeviceCache.h[b]=g;f.connected&&(Fc.__connect(b),g.isGamepad&&$c.__connect(b))}g=this.gameDeviceCache.h[b];d=Fc.devices.h[b];c=$c.devices.h[b];if(f.connected){for(var z=0,h=f.buttons.length;z<h;){var p=z++;m=f.buttons[p].value;if(m!=g.buttons[p]){if(6==p)d.onAxisMove.dispatch(f.axes.length,m),null!=c&&c.onAxisMove.dispatch(4,m);else if(7==p)d.onAxisMove.dispatch(f.axes.length+1,m),null!=c&&c.onAxisMove.dispatch(5,m);else if(0<m?d.onButtonDown.dispatch(p):d.onButtonUp.dispatch(p),
null!=c){switch(p){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<m?c.onButtonDown.dispatch(b):c.onButtonUp.dispatch(b)}g.buttons[p]=m}}b=0;for(m=f.axes.length;b<m;)z=b++,f.axes[z]!=g.axes[z]&&(d.onAxisMove.dispatch(z,f.axes[z]),null!=c&&c.onAxisMove.dispatch(z,
f.axes[z]),g.axes[z]=f.axes[z])}else g.connected&&(g.connected=!1,Fc.__disconnect(b),$c.__disconnect(b))}},__class__:I};var F=function(){this.onCreateWindow=new am;this.onUpdate=new dh;this.onExit=new dh;null==F.current&&(F.current=this);this.meta=new Ba;this.modules=[];this.__windowByID=new hc;this.__windows=[];this.__backend=new I(this);this.__registerLimeModule(this);this.__preloader=new bm;this.__preloader.onProgress.add(q(this,this.onPreloadProgress));this.__preloader.onComplete.add(q(this,this.onPreloadComplete))};
h["lime.app.Application"]=F;F.__name__="lime.app.Application";F.current=null;F.__super__=Bb;F.prototype=x(Bb.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(){F.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){},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),y.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=this;a.onClose.add(function(){b.__onWindowClose(a)},!1,-1E4);null==this.__window&&(this.__window=a,a.onActivate.add(q(this,this.onWindowActivate)),a.onRenderContextLost.add(q(this,this.onRenderContextLost)),a.onRenderContextRestored.add(q(this,this.onRenderContextRestored)),a.onDeactivate.add(q(this,this.onWindowDeactivate)),a.onDropFile.add(q(this,this.onWindowDropFile)),a.onEnter.add(q(this,this.onWindowEnter)),a.onExpose.add(q(this,this.onWindowExpose)),a.onFocusIn.add(q(this,
this.onWindowFocusIn)),a.onFocusOut.add(q(this,this.onWindowFocusOut)),a.onFullscreen.add(q(this,this.onWindowFullscreen)),a.onKeyDown.add(q(this,this.onKeyDown)),a.onKeyUp.add(q(this,this.onKeyUp)),a.onLeave.add(q(this,this.onWindowLeave)),a.onMinimize.add(q(this,this.onWindowMinimize)),a.onMouseDown.add(q(this,this.onMouseDown)),a.onMouseMove.add(q(this,this.onMouseMove)),a.onMouseMoveRelative.add(q(this,this.onMouseMoveRelative)),a.onMouseUp.add(q(this,this.onMouseUp)),a.onMouseWheel.add(q(this,
this.onMouseWheel)),a.onMove.add(q(this,this.onWindowMove)),a.onRender.add(q(this,this.render)),a.onResize.add(q(this,this.onWindowResize)),a.onRestore.add(q(this,this.onWindowRestore)),a.onTextEdit.add(q(this,this.onTextEdit)),a.onTextInput.add(q(this,this.onTextInput)),this.onWindowCreate());this.onCreateWindow.dispatch(a)}},__createWindow:function(a){a=new eh(this,a);return-1==a.id?null:a},__registerLimeModule:function(a){a.onUpdate.add(q(this,this.update));a.onExit.add(q(this,this.onModuleExit),
!1,0);a.onExit.add(q(this,this.__onModuleExit),!1,-1E3);for(a=$c.devices.iterator();a.hasNext();){var b=a.next();this.__onGamepadConnect(b)}$c.onConnect.add(q(this,this.__onGamepadConnect));for(a=Fc.devices.iterator();a.hasNext();)b=a.next(),this.__onJoystickConnect(b);Fc.onConnect.add(q(this,this.__onJoystickConnect));Nc.onCancel.add(q(this,this.onTouchCancel));Nc.onStart.add(q(this,this.onTouchStart));Nc.onMove.add(q(this,this.onTouchMove));Nc.onEnd.add(q(this,this.onTouchEnd))},__removeWindow:function(a){null!=
a&&this.__windowByID.h.hasOwnProperty(a.id)&&(this.__window==a&&(this.__window=null),y.remove(this.__windows,a),this.__windowByID.remove(a.id),a.close(),this.__checkForAllWindowsClosed())},__checkForAllWindowsClosed:function(){0==this.__windows.length&&Fa.exit(0)},__onGamepadConnect:function(a){this.onGamepadConnect(a);var b=this,c=function(c,d){b.onGamepadAxisMove(a,c,d)};a.onAxisMove.add(c);var d=this;c=function(b){d.onGamepadButtonDown(a,b)};a.onButtonDown.add(c);var f=this;c=function(b){f.onGamepadButtonUp(a,
b)};a.onButtonUp.add(c);var g=this;a.onDisconnect.add(function(){g.onGamepadDisconnect(a)})},__onJoystickConnect:function(a){this.onJoystickConnect(a);var b=this,c=function(c,d){b.onJoystickAxisMove(a,c,d)};a.onAxisMove.add(c);var d=this;c=function(b){d.onJoystickButtonDown(a,b)};a.onButtonDown.add(c);var f=this;c=function(b){f.onJoystickButtonUp(a,b)};a.onButtonUp.add(c);var g=this;a.onDisconnect.add(function(){g.onJoystickDisconnect(a)});var k=this;c=function(b,c){k.onJoystickHatMove(a,b,c)};a.onHatMove.add(c)},
__onModuleExit:function(a){this.onExit.canceled||(this.__unregisterLimeModule(this),this.__backend.exit(),F.current==this&&(F.current=null))},__onWindowClose:function(a){if(this.__window==a)this.onWindowClose();this.__removeWindow(a)},__unregisterLimeModule:function(a){a.onUpdate.remove(q(this,this.update));a.onExit.remove(q(this,this.__onModuleExit));a.onExit.remove(q(this,this.onModuleExit));$c.onConnect.remove(q(this,this.__onGamepadConnect));Fc.onConnect.remove(q(this,this.__onJoystickConnect));
Nc.onCancel.remove(q(this,this.onTouchCancel));Nc.onStart.remove(q(this,this.onTouchStart));Nc.onMove.remove(q(this,this.onTouchMove));Nc.onEnd.remove(q(this,this.onTouchEnd))},get_preloader:function(){return this.__preloader},get_window:function(){return this.__window},get_windows:function(){return this.__windows},__class__:F,__properties__:{get_windows:"get_windows",get_window:"get_window",get_preloader:"get_preloader"}});var ca=function(){};h.ApplicationMain=ca;ca.__name__="ApplicationMain";ca.main=
function(){Fa.__registerEntryPoint("fgj25",ca.create)};ca.create=function(a){var b=new Hi;Lb.init(a);b.meta.h.build="44";b.meta.h.company="HaxeFlixel";b.meta.h.file="fgj25";b.meta.h.name="fgj25";b.meta.h.packageName="com.example.myapp";b.meta.h.version="0.0.1";var c={allowHighDPI:!0,alwaysOnTop:!1,borderless:!1,element:null,frameRate:60,height:180,hidden:!1,maximized:!1,minimized:!1,parameters:{},resizable:!0,title:"fgj25",width:320,x:null,y:null,context:{antialiasing:0,background:0,colorDepth:32,
depth:!0,hardware:!0,stencil:!0,type:null,vsync:!1}};if(null==b.__window&&null!=a)for(var d=0,f=la.fields(a);d<f.length;){var g=f[d];++d;Object.prototype.hasOwnProperty.call(c,g)?c[g]=la.field(a,g):Object.prototype.hasOwnProperty.call(c.context,g)&&(c.context[g]=la.field(a,g))}b.createWindow(c);var k=new Gj(new Hj);b.__preloader.onProgress.add(function(a,b){k.update(a,b)});b.__preloader.onComplete.add(function(){k.start()});var l=b.__window.stage;k.onComplete.add(function(){ca.start(l)});d=0;for(f=
Lb.preloadLibraries;d<f.length;)a=f[d],++d,b.__preloader.addLibrary(a);d=0;for(f=Lb.preloadLibraryNames;d<f.length;)a=f[d],++d,b.__preloader.addLibraryName(a);b.__preloader.load();b.exec()};ca.start=function(a){if(a.__uncaughtErrorEvents.__enabled)try{var b=a.getChildAt(0);null!=b&&b instanceof Ta||(b=new Of,a.addChild(b));new Gd(b);a.dispatchEvent(new fa("resize",!1,!1));a.window.__fullscreen&&a.dispatchEvent(new uf("fullScreen",!1,!1,!0,!0))}catch(c){db.lastError=c,b=J.caught(c).unwrap(),a.__handleError(b)}else b=
a.getChildAt(0),null!=b&&b instanceof Ta||(b=new Of,a.addChild(b)),new Gd(b),a.dispatchEvent(new fa("resize",!1,!1)),a.window.__fullscreen&&a.dispatchEvent(new uf("fullScreen",!1,!1,!0,!0))};var Q=function(){};h["openfl.events.IEventDispatcher"]=Q;Q.__name__="openfl.events.IEventDispatcher";Q.__isInterface__=!0;Q.prototype={addEventListener:null,dispatchEvent:null,hasEventListener:null,removeEventListener:null,willTrigger:null,__class__:Q};var Da=function(a){null!=a&&(this.__targetDispatcher=a)};
h["openfl.events.EventDispatcher"]=Da;Da.__name__="openfl.events.EventDispatcher";Da.__interfaces__=[Q];Da.prototype={__eventMap:null,__iterators:null,__targetDispatcher:null,addEventListener:function(a,b,c,d,f){null==f&&(f=!1);null==d&&(d=0);null==c&&(c=!1);if(null!=b)if(null==this.__eventMap&&(this.__eventMap=new Ba,this.__iterators=new Ba),Object.prototype.hasOwnProperty.call(this.__eventMap.h,a)){m=this.__eventMap.h[a];for(var g=0,k=m.length;g<k;){var l=g++;if(m[l].match(b,c))return}a=this.__iterators.h[a];
for(g=0;g<a.length;)k=a[g],++g,k.active&&k.copy();this.__addListenerByPriority(m,new fh(b,c,d,f))}else{var m=[];m.push(new fh(b,c,d,f));k=new Ii(m);this.__eventMap.h[a]=m;this.__iterators.h[a]=[k]}},dispatchEvent:function(a){a.target=null!=this.__targetDispatcher?this.__targetDispatcher:this;return this.__dispatchEvent(a)},hasEventListener:function(a){return null==this.__eventMap?!1:Object.prototype.hasOwnProperty.call(this.__eventMap.h,a)},removeEventListener:function(a,b,c){null==c&&(c=!1);if(null!=
this.__eventMap&&null!=b){var d=this.__eventMap.h[a];if(null!=d){for(var f=this.__iterators.h[a],g=0,k=d.length;g<k;){var l=g++;if(d[l].match(b,c)){for(b=0;b<f.length;)c=f[b],++b,c.remove(d[l],l);d.splice(l,1);break}}0==d.length&&(d=this.__eventMap,f=a,Object.prototype.hasOwnProperty.call(d.h,f)&&delete d.h[f],d=this.__iterators,f=a,Object.prototype.hasOwnProperty.call(d.h,f)&&delete d.h[f]);0>=Object.keys(this.__eventMap.h).length&&(this.__iterators=this.__eventMap=null)}}},toString:function(){return"[object "+
na.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.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;b=this.__iterators.h[b];var f=b[0];f.active&&(f=new Ii(c),b.push(f));f.start();for(var g=f;g.hasNext();){var k=g.next();if(null!=k&&k.useCapture==
d){if(k.useWeakReference&&null!=k.weakRefCallback){var l=k.weakRefCallback.deref();if(null==l)l=f.index-1,c.splice(l,1),f.remove(k,l);else if(null!=ha.get_current()&&null!=ha.get_current().stage&&ha.get_current().stage.__uncaughtErrorEvents.__enabled)try{l(a)}catch(m){db.lastError=m,k=J.caught(m).unwrap(),a instanceof Cg||ha.get_current().stage.__handleError(k)}else l(a)}else if(null!=ha.get_current()&&null!=ha.get_current().stage&&ha.get_current().stage.__uncaughtErrorEvents.__enabled)try{k.callback(a)}catch(m){db.lastError=
m,k=J.caught(m).unwrap(),a instanceof Cg||ha.get_current().stage.__handleError(k)}else k.callback(a);if(a.__isCanceledNow)break}}f.stop();f!=b[0]?y.remove(b,f):f.reset(c);return!a.isDefaultPrevented()},__removeAllListeners:function(){this.__iterators=this.__eventMap=null},__addListenerByPriority:function(a,b){for(var c=a.length,d=c,f=0;f<c;){var g=f++;if(a[g].priority<b.priority){d=g;break}}a.splice(d,0,b)},__class__:Da};var Fb=function(){};h["openfl.display.IBitmapDrawable"]=Fb;Fb.__name__="openfl.display.IBitmapDrawable";
Fb.__isInterface__=!0;Fb.prototype={__blendMode:null,__drawableType:null,__isMask:null,__renderable:null,__renderTransform:null,__transform:null,__worldAlpha:null,__worldColorTransform:null,__worldTransform:null,__getBounds:null,__update:null,__updateTransforms:null,__mask:null,__scrollRect:null,__class__:Fb};var ia={__properties__:{set_length:"set_length",get_length:"get_length",set_fixed:"set_fixed",get_fixed:"get_fixed"},ofArray_Float:function(a){for(var b=ia.toFloatVector(null),c=0,d=a.length;c<
d;){var f=c++;b.set(f,a[f])}return b},ofArray_Int:function(a){for(var b=ia.toIntVector(null),c=0,d=a.length;c<d;){var f=c++;b.set(f,a[f])}return b},concat:function(a,b){return a.concat(b)},copy:function(a){return a.copy()},every:function(a,b,c){for(var d=0,f=a.get_length();d<f;){var g=d++;a.__tempIndex=g;if(null!=c){if(0==b.apply(c,[a.get(g),g,a]))break}else if(0==b(a.get(g),g,a))break}return a.__tempIndex==a.get_length()-1},filter:function(a,b){return a.filter(b)},get:function(a,b){return a.get(b)},
indexOf:function(a,b,c){null==c&&(c=0);return a.indexOf(b,c)},insertAt:function(a,b,c){a.insertAt(b,c)},iterator:function(a){return a.iterator()},join:function(a,b){null==b&&(b=",");return a.join(b)},lastIndexOf:function(a,b,c){return a.lastIndexOf(b,c)},pop:function(a){return a.pop()},push:function(a,b){return a.push(b)},removeAt:function(a,b){return a.removeAt(b)},reverse:function(a){return a.reverse()},set:function(a,b,c){return a.set(b,c)},shift:function(a){return a.shift()},slice:function(a,
b,c){null==b&&(b=0);return a.slice(b,c)},some:function(a,b,c){for(var d=0,f=a.get_length();d<f;){var g=d++;a.__tempIndex=g;if(null!=c){if(1==b.apply(c,[a.get(g),g,a]))break}else if(b(a.get(g),g,a))break;g==a.get_length()-1&&a.__tempIndex++}return a.__tempIndex<a.get_length()-1},sort:function(a,b){a.sort(b)},splice:function(a,b,c){for(var d=arguments.length,f=Array(3<d?d-3:0),g=3;g<d;++g)f[g-3]=arguments[g];a.__tempIndex=b;for(d=0;d<f.length;)g=f[d++],a.insertAt(a.__tempIndex,g),a.__tempIndex++;return a.splice(a.__tempIndex,
c)},toString:function(a){return null!=a?a.toString():null},unshift:function(a,b){a.unshift(b)},convert:function(a){return a},toBoolVector:function(a,b,c,d){return new Ve(b,c,d)},toIntVector:function(a,b,c,d){return new We(b,c,d)},toFloatVector:function(a,b,c,d){return new Xe(b,c,d,!0)},toFunctionVector:function(a,b,c,d){return new Ye(b,c,d)},toObjectVector:function(a,b,c,d){return new Ee(b,c,d,!0)},toNullVector:function(a,b,c,d){return new Ee(b,c,d,!0)},fromBoolVector:function(a){return a},fromIntVector:function(a){return a},
fromFloatVector:function(a){return a},fromFunctionVector:function(a){return a},fromObjectVector:function(a){return a},get_fixed:function(a){return a.fixed},set_fixed:function(a,b){return a.fixed=b},get_length:function(a){return a.get_length()},set_length:function(a,b){return a.set_length(b)}},Jc=function(a,b,c){this.__pool=new Ga;this.inactiveObjects=this.activeObjects=0;this.__inactiveObject1=this.__inactiveObject0=null;this.__inactiveObjectList=new ib;null!=a&&(this.create=a);null!=b&&(this.clean=
b);null!=c&&this.set_size(c)};h["lime.utils.ObjectPool"]=Jc;Jc.__name__="lime.utils.ObjectPool";Jc.prototype={activeObjects:null,inactiveObjects:null,__inactiveObject0:null,__inactiveObject1:null,__inactiveObjectList:null,__pool:null,__size:null,add:function(a){null==a||this.__pool.exists(a)||(this.__pool.set(a,!1),this.clean(a),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 Ga;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.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.activeObjects--;null==this.__size||this.activeObjects+this.inactiveObjects<this.__size?(this.clean(a),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){null!=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){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.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__:Jc,
__properties__:{set_size:"set_size",get_size:"get_size"}};var ta=function(){};h["haxe.IMap"]=ta;ta.__name__="haxe.IMap";ta.__isInterface__=!0;ta.prototype={get:null,set:null,exists:null,remove:null,keys:null,iterator:null,keyValueIterator:null,__class__:ta};var Ga=function(){this.h={__keys__:{}}};h["haxe.ds.ObjectMap"]=Ga;Ga.__name__="haxe.ds.ObjectMap";Ga.__interfaces__=[ta];Ga.prototype={h:null,set:function(a,b){var c=a.__id__;null==c&&(c=a.__id__=B.$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 new Ld(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 Dg(this)},toString:function(){var a="[";for(var b=this.keys();b.hasNext();){var c=b.next();a+=M.string(M.string(c));a+=" => ";a+=M.string(M.string(this.h[c.__id__]));b.hasNext()&&(a+=", ")}return a+"]"},__class__:Ga};var ib=function(){this.length=0};h["haxe.ds.List"]=ib;ib.__name__="haxe.ds.List";ib.prototype={h:null,q:null,length:null,add:function(a){a=new Ij(a,null);null==this.h?this.h=a:this.q.next=a;this.q=a;this.length++},push:function(a){this.h=a=new Ij(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},isEmpty:function(){return null==this.h},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 cm(this.h)},__class__:ib};var da=
function(){Da.call(this);this.__alpha=this.__drawableType=1;this.__blendMode=10;this.__cacheAsBitmap=!1;this.__transform=new wa;this.__visible=!0;this.__rotationSine=this.__rotation=0;this.__worldAlpha=this.__scaleY=this.__scaleX=this.__rotationCosine=1;this.__worldBlendMode=10;this.__worldTransform=new wa;this.__worldColorTransform=new Ub;this.__renderTransform=new wa;this.__worldVisible=!0;this.set_name("instance"+ ++da.__instanceCount);null!=da.__initStage&&(this.stage=da.__initStage,da.__initStage=
null,this.stage.addChild(this))};h["openfl.display.DisplayObject"]=da;da.__name__="openfl.display.DisplayObject";da.__interfaces__=[Fb];da.__initStage=null;da.__supportDOM=null;da.__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};da.__super__=Da;da.prototype=x(Da.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,__cacheBitmapMatrix:null,__cacheBitmapRenderer:null,__cairo:null,__children:null,__customRenderClear:null,__customRenderEvent:null,__drawableType: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,__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,f){null==f&&(f=!1);null==d&&(d=0);null==c&&(c=!1);switch(a){case "activate":case "deactivate":case "enterFrame":case "exitFrame":case "frameConstructed":case "render":Object.prototype.hasOwnProperty.call(da.__broadcastEvents.h,a)||(da.__broadcastEvents.h[a]=[]);var g=da.__broadcastEvents.h[a];-1==g.indexOf(this)&&
g.push(this);break;case "clearDOM":case "renderCairo":case "renderCanvas":case "renderDOM":case "renderOpenGL":null==this.__customRenderEvent&&(this.__customRenderEvent=new Pf(null),this.__customRenderEvent.objectColorTransform=new Ub,this.__customRenderEvent.objectMatrix=new wa,this.__customRenderClear=!0)}Da.prototype.addEventListener.call(this,a,b,c,d,f)},dispatchEvent:function(a){if(a instanceof vb){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 wd&&(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=wa.__pool.get();if(null!=a&&a!=this){b.copyFrom(this.__getWorldTransform());var c=wa.__pool.get();c.copyFrom(a.__getWorldTransform());c.invert();b.concat(c);wa.__pool.release(c)}else b.identity();a=new ea;this.__getBounds(a,
b);wa.__pool.release(b);return a},getRect:function(a){return this.getBounds(a)},globalToLocal:function(a){return this.__globalToLocal(a,new Ya)},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);Da.prototype.removeEventListener.call(this,a,b,c);switch(a){case "activate":case "deactivate":case "enterFrame":case "exitFrame":case "frameConstructed":case "render":this.hasEventListener(a)||Object.prototype.hasOwnProperty.call(da.__broadcastEvents.h,a)&&y.remove(da.__broadcastEvents.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.__cacheBitmapData&&(this.__cacheBitmapData.dispose(),this.__cacheBitmapData=null)},__dispatch:function(a){if(null!=
this.__eventMap&&this.hasEventListener(a.type)){var b=Da.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=Da.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=da.__tempStack.get(),c=this.parent,d=0;null!=c;)b.set(d,c),c=c.parent,++d;c=0;for(var f=d;c<f;){var g=c++;b.get(d-g-1).__dispatch(a)}da.__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=
ea.__pool.get();for(var c=0,d=this.__filters;c<d.length;){var f=d[c];++c;b.__expand(-f.__leftExtension,-f.__topExtension,f.__leftExtension+f.__rightExtension,f.__topExtension+f.__bottomExtension)}a.width+=b.width;a.height+=b.height;a.x+=b.x;a.y+=b.y;ea.__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=ea.__pool.get();c.copyFrom(this.__scrollRect);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);ea.__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 f=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=f}}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,f,g){if(null!=this.__graphics){if(!g.__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||f||d.push(g),!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(da.__supportDOM&&(this.__renderTransformChanged=!this.__renderTransform.equals(this.__renderTransformCache),null==this.__renderTransformCache?this.__renderTransformCache=this.__renderTransform.clone():
this.__renderTransformCache.copyFrom(this.__renderTransform)),null!=c){if(da.__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;null!=this.__objectTransform?(this.__worldColorTransform.__copyFrom(this.__objectTransform.__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(),da.__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.__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 wa);null==this.__renderTransform&&(this.__renderTransform=new wa);var c=null!=this.__renderParent?this.__renderParent:this.parent;if(b||null==this.parent)this.__worldTransform.copyFrom(a);
else{var d=this.parent.__worldTransform,f=this.__worldTransform;f.a=a.a*d.a+a.b*d.c;f.b=a.a*d.b+a.b*d.d;f.c=a.c*d.a+a.d*d.c;f.d=a.c*d.b+a.d*d.d;f.tx=a.tx*d.a+a.ty*d.c+d.tx;f.ty=a.tx*d.b+a.ty*d.d+d.ty}b||null==c?this.__renderTransform.copyFrom(a):(d=c.__renderTransform,f=this.__renderTransform,f.a=a.a*d.a+a.b*d.c,f.b=a.a*d.b+a.b*d.d,f.c=a.c*d.a+a.d*d.c,f.d=a.c*d.b+a.d*d.d,f.tx=a.tx*d.a+a.ty*d.c+d.tx,f.ty=a.tx*d.b+a.ty*d.d+d.ty);null!=this.__scrollRect&&(b=this.__renderTransform,a=-this.__scrollRect.x,
c=-this.__scrollRect.y,b.tx=a*b.a+c*b.c+b.tx,b.ty=a*b.b+c*b.d+b.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){if(null!=a&&0<a.length){for(var b=[],c=0;c<a.length;){var d=a[c];++c;d=d.clone();d.__renderDirty=!0;b.push(d)}this.__filters=b;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())}else null!=this.__filters&&(this.__filters=null,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));return a},get_height:function(){var a=ea.__pool.get();this.__getLocalBounds(a);var b=a.height;ea.__pool.release(a);
return b},set_height:function(a){var b=ea.__pool.get(),c=wa.__pool.get();c.identity();this.__getBounds(b,c);a!=b.height?this.set_scaleY(a/b.height):this.set_scaleY(1);ea.__pool.release(b);wa.__pool.release(c);return a},get_loaderInfo:function(){return null!=this.stage?Bc.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:Bc.current.stage.__mouseX,b=null!=this.stage?this.stage.__mouseY:
Bc.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:Bc.current.stage.__mouseX,b=null!=this.stage?this.stage.__mouseY:Bc.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?
Bc.current:null},get_rotation:function(){return this.__rotation},set_rotation:function(a){if(a!=this.__rotation){a%=360;180<a?a-=360:-180>a&&(a+=360);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 ea),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 ea),this.__scrollRect.copyFrom(a)):this.__scrollRect=null;this.__setTransformDirty();
da.__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 Jj(this));return this.__objectTransform},set_transform:function(a){if(null==a)throw new eg("Parameter transform must be non-null.");null==this.__objectTransform&&
(this.__objectTransform=new Jj(this));this.__setTransformDirty();this.__objectTransform.set_matrix(a.get_matrix());if(!this.__objectTransform.__colorTransform.__equals(a.__colorTransform,!0)||!this.get_cacheAsBitmap()&&this.__objectTransform.__colorTransform.alphaMultiplier!=a.__colorTransform.alphaMultiplier)this.__objectTransform.__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=ea.__pool.get();this.__getLocalBounds(a);var b=a.width;ea.__pool.release(a);return b},set_width:function(a){var b=ea.__pool.get(),c=wa.__pool.get();c.identity();this.__getBounds(b,c);a!=b.width?this.set_scaleX(a/b.width):this.set_scaleX(1);ea.__pool.release(b);wa.__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__:da,__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 Aa=function(){da.call(this);this.doubleClickEnabled=!1;this.mouseEnabled=!0;this.needsSoftKeyboard=!1;this.__tabEnabled=null;this.__tabIndex=
-1};h["openfl.display.InteractiveObject"]=Aa;Aa.__name__="openfl.display.InteractiveObject";Aa.__super__=da;Aa.prototype=x(da.prototype,{doubleClickEnabled:null,focusRect:null,mouseEnabled:null,needsSoftKeyboard:null,softKeyboardInputAreaOfInterest:null,__tabEnabled:null,__tabIndex:null,requestSoftKeyboard:function(){Bc.notImplemented({fileName:"openfl/display/InteractiveObject.hx",lineNumber:1255,className:"openfl.display.InteractiveObject",methodName:"requestSoftKeyboard"});return!1},__allowMouseFocus:function(){return this.mouseEnabled?
this.get_tabEnabled():!1},__getInteractive:function(a){null!=a&&(a.push(this),null!=this.parent&&this.parent.__getInteractive(a));return!0},__hitTest:function(a,b,c,d,f,g){return!g.get_visible()||this.__isMask||f&&!this.mouseEnabled?!1:da.prototype.__hitTest.call(this,a,b,c,d,f,g)},__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 fa("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 gh("Parameter tabIndex must be a non-negative number; got "+a);this.__tabIndex=a;this.dispatchEvent(new fa("tabIndexChange",!0,!1))}return this.__tabIndex},__class__:Aa,__properties__:x(da.prototype.__properties__,{set_tabIndex:"set_tabIndex",get_tabIndex:"get_tabIndex",set_tabEnabled:"set_tabEnabled",get_tabEnabled:"get_tabEnabled"})});var Ta=function(){Aa.call(this);
this.__tabChildren=this.mouseChildren=!0;this.__children=[];this.__removedChildren=ia.toObjectVector(null)};h["openfl.display.DisplayObjectContainer"]=Ta;Ta.__name__="openfl.display.DisplayObjectContainer";Ta.__super__=Aa;Ta.prototype=x(Aa.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 eg("Error #2007: Parameter child must be non-null."),a.errorID=2007,a;
if(a==this)throw a=new Eg("Error #2024: An object cannot be added as a child of itself."),a.errorID=2024,a;if(a.stage==a)throw a=new Eg("Error #3783: A Stage object cannot be added as the child of another object."),a.errorID=3783,a;if(b>this.__children.length||0>b)throw J.thrown("Invalid index position "+b);if(a.parent==this)this.__children[b]!=a&&(y.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)&&a.__setStageReference(this.stage);a.__setTransformDirty();a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty());this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());var c=new fa("added");c.bubbles=!0;c.target=a;a.__dispatchWithCapture(c);b&&(c=new fa("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 fa("removed",!0);a.__dispatchWithCapture(b);null!=this.stage&&(null!=a.stage&&this.stage.get_focus()==a&&this.stage.set_focus(null),b=new fa("removedFromStage",!1,!1),a.__dispatchWithCapture(b),a.__dispatchChildren(b),a.__setStageReference(null));a.parent=null;y.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 gh("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&&(y.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(){Aa.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){Aa.prototype.__getBounds.call(this,a,b);if(0!=this.__children.length){for(var c=
wa.__pool.get(),d=0,f=this.__children;d<f.length;){var g=f[d];++d;if(0!=g.__scaleX&&0!=g.__scaleY){var k=g.__transform;c.a=k.a*b.a+k.b*b.c;c.b=k.a*b.b+k.b*b.d;c.c=k.c*b.a+k.d*b.c;c.d=k.c*b.b+k.d*b.d;c.tx=k.tx*b.a+k.ty*b.c+b.tx;c.ty=k.tx*b.b+k.ty*b.d+b.ty;g.__getBounds(a,c)}}wa.__pool.release(c)}},__getFilterBounds:function(a,b){Aa.prototype.__getFilterBounds.call(this,a,b);if(null==this.__scrollRect&&0!=this.__children.length){for(var c=wa.__pool.get(),d=0,f=this.__children;d<f.length;){var g=f[d];
++d;if(0!=g.__scaleX&&0!=g.__scaleY&&!g.__isMask){var k=g.__transform;c.a=k.a*b.a+k.b*b.c;c.b=k.a*b.b+k.b*b.d;c.c=k.c*b.a+k.d*b.c;c.d=k.c*b.b+k.d*b.d;c.tx=k.tx*b.a+k.ty*b.c+b.tx;c.ty=k.tx*b.b+k.ty*b.d+b.ty;k=ea.__pool.get();g.__getFilterBounds(k,c);a.__expand(k.x,k.y,k.width,k.height);ea.__pool.release(k)}}wa.__pool.release(c)}},__getRenderBounds:function(a,b){if(null!=this.__scrollRect)Aa.prototype.__getRenderBounds.call(this,a,b);else if(Aa.prototype.__getBounds.call(this,a,b),0!=this.__children.length){for(var c=
wa.__pool.get(),d=0,f=this.__children;d<f.length;){var g=f[d];++d;if(0!=g.__scaleX&&0!=g.__scaleY&&!g.__isMask){var k=g.__transform;c.a=k.a*b.a+k.b*b.c;c.b=k.a*b.b+k.b*b.d;c.c=k.c*b.a+k.d*b.c;c.d=k.c*b.b+k.d*b.d;c.tx=k.tx*b.a+k.ty*b.c+b.tx;c.ty=k.tx*b.b+k.ty*b.d+b.ty;g.__getRenderBounds(a,c)}}wa.__pool.release(c)}},__hitTest:function(a,b,c,d,f,g){if(!g.get_visible()||this.__isMask||f&&!this.mouseEnabled&&!this.mouseChildren||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b))return!1;if(null!=
this.__scrollRect){var k=Ya.__pool.get();k.setTo(a,b);var l=this.__getRenderTransform(),m=l.a*l.d-l.b*l.c;if(0==m)k.x=-l.tx,k.y=-l.ty;else{var z=1/m*(l.c*(l.ty-k.y)+l.d*(k.x-l.tx));k.y=1/m*(l.a*(k.y-l.ty)+l.b*(l.tx-k.x));k.x=z}if(!this.__scrollRect.containsPoint(k))return Ya.__pool.release(k),!1;Ya.__pool.release(k)}k=this.__children.length;if(f)if(null==d||!this.mouseChildren)for(;0<=--k;){if(this.__children[k].__hitTest(a,b,c,null,!0,this.__children[k]))return null!=d&&d.push(g),!0}else{if(null!=
d){f=d.length;for(m=!1;0<=--k&&!(((l=this.__children[k].__getInteractive(null))||this.mouseEnabled&&!m)&&this.__children[k].__hitTest(a,b,c,d,!0,this.__children[k])&&(m=!0,l&&d.length>f)););if(m)return d.splice(f,0,g),!0}}else{for(m=!1;0<=--k&&(!this.__children[k].__hitTest(a,b,c,d,!1,this.__children[k])||(m=!0,null!=d)););return m}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){Aa.prototype.__readGraphicsData.call(this,a,b);if(b)for(var c=0,d=this.__children;c<d.length;){var f=d[c];++c;f.__readGraphicsData(a,b)}},__setStageReference:function(a){Aa.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){Aa.prototype.__tabTest.call(this,a);if(this.get_tabChildren())for(var b,c=0,d=this.__children;c<d.length;){var f=d[c];++c;if(b=f.__getInteractive(null))b=f,b.__tabTest(a)}},__update:function(a,b){Aa.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 fa("tabChildrenChange",!0,!1)));return this.__tabChildren},__class__:Ta,__properties__:x(Aa.prototype.__properties__,{set_tabChildren:"set_tabChildren",get_tabChildren:"get_tabChildren",get_numChildren:"get_numChildren"})});var Ka=function(){Ta.call(this);this.__drawableType=4;this.__buttonMode=!1;this.useHandCursor=!0;if(null!=this.__pendingBindLibrary){var a=
this.__pendingBindLibrary,b=this.__pendingBindClassName;this.__pendingBindClassName=this.__pendingBindLibrary=null;a.bind(b,this)}else null!=Ka.__constructor&&(a=Ka.__constructor,Ka.__constructor=null,a(this))};h["openfl.display.Sprite"]=Ka;Ka.__name__="openfl.display.Sprite";Ka.__constructor=null;Ka.fromTimeline=function(a){var b=new Ka;a.initializeSprite(b);return b};Ka.__super__=Ta;Ka.prototype=x(Ta.prototype,{dropTarget:null,hitArea:null,useHandCursor:null,__buttonMode:null,__pendingBindClassName:null,
__pendingBindLibrary: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)},__setStageReference:function(a){this.stage!=a&&null!=this.stage&&this.stage.__dragObject==this&&this.stopDrag();Ta.prototype.__setStageReference.call(this,a)},__bind:function(a,b){null==this.__worldTransform?(this.__pendingBindLibrary=a,this.__pendingBindClassName=b):null!=a&&null!=b&&a.bind(b,this)||Pa.error('Cannot bind class name "'+
b+'"',{fileName:"openfl/display/Sprite.hx",lineNumber:297,className:"openfl.display.Sprite",methodName:"__bind"})},__getCursor:function(){return this.__buttonMode&&this.useHandCursor?"button":null},__hitTest:function(a,b,c,d,f,g){if(f&&!this.mouseEnabled&&!this.mouseChildren)return!1;if(!g.get_visible()||this.__isMask||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b))return this.__hitTestHitArea(a,b,c,d,f,g);if(null!=this.__scrollRect){var k=Ya.__pool.get();k.setTo(a,b);var l=this.__getRenderTransform(),
m=l.a*l.d-l.b*l.c;if(0==m)k.x=-l.tx,k.y=-l.ty;else{var z=1/m*(l.c*(l.ty-k.y)+l.d*(k.x-l.tx));k.y=1/m*(l.a*(k.y-l.ty)+l.b*(l.tx-k.x));k.x=z}if(!this.__scrollRect.containsPoint(k))return Ya.__pool.release(k),this.__hitTestHitArea(a,b,c,d,!0,g);Ya.__pool.release(k)}return Ta.prototype.__hitTest.call(this,a,b,c,d,f,g)?null!=d?f:!0:null==this.hitArea&&null!=this.__graphics&&this.__graphics.__hitTest(a,b,c,this.__getRenderTransform())?(null==d||f&&!this.mouseEnabled||d.push(g),!0):this.__hitTestHitArea(a,
b,c,d,f,g)},__hitTestHitArea:function(a,b,c,d,f,g){return null==this.hitArea||this.hitArea.mouseEnabled?!1:(this.hitArea.mouseEnabled=!0,a=this.hitArea.__hitTest(a,b,c,null,!0,g),this.hitArea.mouseEnabled=!1,null!=d&&a&&(d[d.length]=g),a)},__hitTestMask:function(a,b){return Ta.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 Vd(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__:Ka,__properties__:x(Ta.prototype.__properties__,{get_graphics:"get_graphics",set_buttonMode:"set_buttonMode",get_buttonMode:"get_buttonMode"})});var ad=function(){Ka.call(this);this.addChild(new Kj(0,0,No.fromMaker(function(){return new Fe(Qf.START)}),60,60,!0))};h.Main=ad;ad.__name__="Main";
ad.__super__=Ka;ad.prototype=x(Ka.prototype,{__class__:ad});var Gd=function(a){a.addChild(this);ad.call(this);this.dispatchEvent(new fa("addedToStage",!1,!1))};h.DocumentClass=Gd;Gd.__name__="DocumentClass";Gd.__super__=ad;Gd.prototype=x(ad.prototype,{__class__:Gd});var $a=function(){};h.AssetPaths=$a;$a.__name__="AssetPaths";var bd=function(){};h.Colors=bd;bd.__name__="Colors";var Sd=G.Dir={__ename__:"Dir",__constructs__:null,LEFT:{_hx_name:"LEFT",_hx_index:0,__enum__:"Dir",toString:t},RIGHT:{_hx_name:"RIGHT",
_hx_index:1,__enum__:"Dir",toString:t}};Sd.__constructs__=[Sd.LEFT,Sd.RIGHT];var D=function(){};h["flixel.util.IFlxDestroyable"]=D;D.__name__="flixel.util.IFlxDestroyable";D.__isInterface__=!0;D.prototype={destroy:null,__class__:D};var Na=function(){this.flixelType=0;this.active=this.visible=this.alive=this.exists=!0;this.ID=Na.idEnumerator++};h["flixel.FlxBasic"]=Na;Na.__name__="flixel.FlxBasic";Na.__interfaces__=[D];Na.prototype={ID:null,active:null,visible:null,alive:null,exists:null,flixelType:null,
_cameras:null,container:null,destroy:function(){null!=this.get_container()&&this.get_container().remove(this);this.container=null;this.set_exists(!1);this._cameras=null},kill:function(){this.set_alive(!1);this.set_exists(!1)},revive:function(){this.set_alive(!0);this.set_exists(!0)},update:function(a){},draw:function(){},toString:function(){var a=this.active,b=Ua._pool.get();b.label="active";b.value=a;a=this.visible;var c=Ua._pool.get();c.label="visible";c.value=a;a=this.alive;var d=Ua._pool.get();
d.label="alive";d.value=a;a=this.exists;var f=Ua._pool.get();f.label="exists";f.value=a;return ab.getDebugString([b,c,d,f])},set_visible:function(a){return this.visible=a},set_active:function(a){return this.active=a},set_exists:function(a){return this.exists=a},set_alive:function(a){return this.alive=a},get_camera:function(){return null==this._cameras||0==this._cameras.length?jb._defaultCameras[0]:this._cameras[0]},set_camera:function(a){null==this._cameras?this._cameras=[a]:this._cameras[0]=a;return a},
getCameras:function(){return null!=this._cameras?this._cameras:null==this._cameras&&null!=this.get_container()?this.get_container().getCameras():jb._defaultCameras},getCamerasLegacy:function(){return null==this._cameras?jb._defaultCameras:this._cameras},get_cameras:function(){return this.getCamerasLegacy()},set_cameras:function(a){return this._cameras=a},get_container:function(){return this.container},__class__:Na,__properties__:{get_container:"get_container",set_cameras:"set_cameras",get_cameras:"get_cameras",
set_camera:"set_camera",get_camera:"get_camera",set_exists:"set_exists",set_alive:"set_alive",set_visible:"set_visible",set_active:"set_active"}};var Ha=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);var f=V._pool.get(),g=0,k=0,l=0,m=0;null==m&&(m=0);null==l&&(l=0);null==k&&(k=0);null==g&&(g=0);f.x=g;f.y=k;f.width=l;f.height=m;f._inPool=!1;this._rect=f;g=f=0;null==g&&(g=0);null==f&&(f=0);f=N.pool.get().set(f,g);f._inPool=!1;this._point=f;this.path=null;this.collisionYDrag=
0;this.collisionXDrag=2;this.allowCollisions=4369;this.touching=this.wasTouching=0;this.maxAngular=1E4;this.elasticity=this.angularVelocity=this.angularAcceleration=this.angularDrag=0;this.mass=1;this.immovable=!1;this.moves=Ha.defaultMoves;this.angle=0;this.pixelPerfectPosition=!0;this.x=this.y=0;Na.call(this);this.set_x(a);this.set_y(b);this.set_width(c);this.set_height(d);this.initVars()};h["flixel.FlxObject"]=Ha;Ha.__name__="flixel.FlxObject";Ha.allowCollisionDrag=function(a,b,c){if(c.active&&
c.moves)switch(a){case 0:return!1;case 1:return!0;case 2:return c.immovable;case 3:return c.immovable?!0:c.mass>b.mass}else return!1};Ha.processCheckTilemap=function(a,b,c,d,f){null==f&&(f=!0);return f&&a.immovable&&b.immovable?!1:3==a.flixelType?a.overlapsWithCallback(b,function(a,k){return Ha.processCheckTilemap(a,b,c,d,f)},!1,d):3==b.flixelType?b.overlapsWithCallback(a,function(b,k){return Ha.processCheckTilemap(a,b,c,d,f)},!1,d):c(a,b)};Ha.separate=function(a,b){var c=Ha.separateX(a,b);a=Ha.separateY(a,
b);return c?!0:a};Ha.separateX=function(a,b){return Ha.processCheckTilemap(a,b,Ha.separateXHelper)};Ha.separateY=function(a,b){return Ha.processCheckTilemap(a,b,Ha.separateYHelper)};Ha.separateXHelper=function(a,b){var c=Ha.computeOverlapX(a,b);if(0!=c){var d=a.x-a.last.x,f=b.x-b.last.x,g=a.velocity.x,k=b.velocity.x;if(a.immovable||b.immovable)a.immovable?b.immovable||(b.set_x(b.x+c),b.velocity.set_x(g-k*b.elasticity)):(a.set_x(a.x-c),a.velocity.set_x(k-g*a.elasticity));else{a.set_x(a.x-.5*c);b.set_x(b.x+
.5*c);c=a.mass;var l=b.mass,m=c*g+l*k;a.velocity.set_x((m+a.elasticity*l*(k-g))/(c+l));b.velocity.set_x((m+b.elasticity*c*(g-k))/(c+l))}Ha.allowCollisionDrag(a.collisionYDrag,a,b)&&d>f?a.set_y(a.y+(b.y-b.last.y)):Ha.allowCollisionDrag(b.collisionYDrag,b,a)&&f>d&&b.set_y(b.y+(a.y-a.last.y));return!0}return!1};Ha.separateYHelper=function(a,b){var c=Ha.computeOverlapY(a,b);if(0!=c){var d=a.y-a.last.y,f=b.y-b.last.y,g=a.velocity.y,k=b.velocity.y;if(a.immovable||b.immovable)a.immovable?b.immovable||(b.set_y(b.y+
c),b.velocity.set_y(g-k*b.elasticity)):(a.set_y(a.y-c),a.velocity.set_y(k-g*a.elasticity));else{a.set_y(a.y-c/2);b.set_y(b.y+c/2);c=a.mass;var l=b.mass,m=c*g+l*k,z=(m+b.elasticity*c*(g-k))/(c+l);a.velocity.set_y((m+a.elasticity*l*(k-g))/(c+l));b.velocity.set_y(z)}Ha.allowCollisionDrag(a.collisionXDrag,a,b)&&d>f?a.set_x(a.x+(b.x-b.last.x)):Ha.allowCollisionDrag(b.collisionXDrag,b,a)&&f>d&&b.set_x(b.x+(a.x-a.last.x));return!0}return!1};Ha.legacySeparateX=function(a,b,c){var d=a.velocity.x,f=b.velocity.x,
g=a.mass,k=b.mass;a.set_x(a.x-.5*c);b.set_x(b.x+.5*c);c=Math.sqrt(f*f*k/g)*(0<f?1:-1);d=Math.sqrt(d*d*g/k)*(0<d?1:-1);g=.5*(c+d);d-=g;a.velocity.set_x(g+(c-g)*a.elasticity);b.velocity.set_x(g+d*b.elasticity)};Ha.legacySeparateY=function(a,b,c){var d=a.velocity.y,f=b.velocity.y,g=a.mass,k=b.mass;a.set_y(a.y-.5*c);b.set_y(b.y+.5*c);c=Math.sqrt(f*f*k/g)*(0<f?1:-1);d=Math.sqrt(d*d*g/k)*(0<d?1:-1);g=.5*(c+d);d-=g;a.velocity.set_y(g+(c-g)*a.elasticity);b.velocity.set_y(g+d*b.elasticity)};Ha.updateTouchingFlags=
function(a,b){return Ha.processCheckTilemap(a,b,function(a,b){var c=Ha.updateTouchingFlagsXHelper(a,b);a=Ha.updateTouchingFlagsYHelper(a,b);return c?!0:a},null,!1)};Ha.updateTouchingFlagsX=function(a,b){return Ha.processCheckTilemap(a,b,Ha.updateTouchingFlagsXHelper,null,!1)};Ha.updateTouchingFlagsXHelper=function(a,b){return 0!=Ha.computeOverlapX(a,b,!1)};Ha.updateTouchingFlagsY=function(a,b){return Ha.processCheckTilemap(a,b,Ha.updateTouchingFlagsYHelper,null,!1)};Ha.updateTouchingFlagsYHelper=
function(a,b){return 0!=Ha.computeOverlapY(a,b,!1)};Ha.computeOverlapX=function(a,b,c){null==c&&(c=!0);var d=0,f=a.x-a.last.x,g=b.x-b.last.x;if(f!=g){var k=0<f?f:-f,l=0<g?g:-g,m=a.x-(0<f?f:0),z=a.last.y,h=a.get_width()+k,p=a.get_height();null==p&&(p=0);null==h&&(h=0);null==z&&(z=0);null==m&&(m=0);var sb=V._pool.get();null==p&&(p=0);null==h&&(h=0);null==z&&(z=0);null==m&&(m=0);sb.x=m;sb.y=z;sb.width=h;sb.height=p;sb._inPool=!1;var r=sb;m=b.x-(0<g?g:0);z=b.last.y;h=b.get_width()+l;p=b.get_height();
null==p&&(p=0);null==h&&(h=0);null==z&&(z=0);null==m&&(m=0);sb=V._pool.get();null==p&&(p=0);null==h&&(h=0);null==z&&(z=0);null==m&&(m=0);sb.x=m;sb.y=z;sb.width=h;sb.height=p;sb._inPool=!1;p=sb.x+sb.width>r.x&&sb.x<r.x+r.width&&sb.y+sb.height>r.y&&sb.y<r.y+r.height;sb._weak&&!sb._inPool&&(sb._inPool=!0,sb._weak=!1,V._pool.putUnsafe(sb));p&&(k=c?k+l+Ha.SEPARATE_BIAS:0,f>g?(d=a.x+a.get_width()-b.x,c&&d>k?c=!0:(c=16,c=(a.allowCollisions&c)!=c),c?c=!0:(c=1,c=(b.allowCollisions&c)!=c),c?d=0:(a.touching|=
16,b.touching|=1)):f<g&&(d=a.x-b.get_width()-b.x,c&&-d>k?c=!0:(c=1,c=(a.allowCollisions&c)!=c),c?c=!0:(c=16,c=(b.allowCollisions&c)!=c),c?d=0:(a.touching|=1,b.touching|=16)));r._inPool||(r._inPool=!0,r._weak=!1,V._pool.putUnsafe(r));sb._inPool||(sb._inPool=!0,sb._weak=!1,V._pool.putUnsafe(sb))}return d};Ha.computeOverlapY=function(a,b,c){null==c&&(c=!0);var d=0,f=a.y-a.last.y,g=b.y-b.last.y;if(f!=g){var k=0<f?f:-f,l=0<g?g:-g,m=a.last.x,z=a.y-(0<f?f:0),h=a.get_width(),p=a.get_height()+k;null==p&&(p=
0);null==h&&(h=0);null==z&&(z=0);null==m&&(m=0);var sb=V._pool.get();null==p&&(p=0);null==h&&(h=0);null==z&&(z=0);null==m&&(m=0);sb.x=m;sb.y=z;sb.width=h;sb.height=p;sb._inPool=!1;var r=sb;m=b.last.x;z=b.y-(0<g?g:0);h=b.get_width();p=b.get_height()+l;null==p&&(p=0);null==h&&(h=0);null==z&&(z=0);null==m&&(m=0);sb=V._pool.get();null==p&&(p=0);null==h&&(h=0);null==z&&(z=0);null==m&&(m=0);sb.x=m;sb.y=z;sb.width=h;sb.height=p;sb._inPool=!1;p=sb.x+sb.width>r.x&&sb.x<r.x+r.width&&sb.y+sb.height>r.y&&sb.y<
r.y+r.height;sb._weak&&!sb._inPool&&(sb._inPool=!0,sb._weak=!1,V._pool.putUnsafe(sb));p&&(k=c?k+l+Ha.SEPARATE_BIAS:0,f>g?(d=a.y+a.get_height()-b.y,c&&d>k?c=!0:(c=4096,c=(a.allowCollisions&c)!=c),c?c=!0:(c=256,c=(b.allowCollisions&c)!=c),c?d=0:(a.touching|=4096,b.touching|=256)):f<g&&(d=a.y-b.get_height()-b.y,c&&-d>k?c=!0:(c=256,c=(a.allowCollisions&c)!=c),c?c=!0:(c=4096,c=(b.allowCollisions&c)!=c),c?d=0:(a.touching|=256,b.touching|=4096)));r._inPool||(r._inPool=!0,r._weak=!1,V._pool.putUnsafe(r));
sb._inPool||(sb._inPool=!0,sb._weak=!1,V._pool.putUnsafe(sb))}return d};Ha.__super__=Na;Ha.prototype=x(Na.prototype,{x:null,y:null,width:null,height:null,pixelPerfectRender:null,pixelPerfectPosition:null,angle:null,moves:null,immovable:null,scrollFactor:null,velocity:null,acceleration:null,drag:null,maxVelocity:null,last:null,mass:null,elasticity:null,angularVelocity:null,angularAcceleration:null,angularDrag:null,maxAngular:null,touching:null,wasTouching:null,allowCollisions:null,collisionXDrag:null,
collisionYDrag:null,path:null,_point:null,_rect:null,initVars:function(){this.flixelType=1;var a=this.x,b=this.y;null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);b=N.pool.get().set(a,b);b._inPool=!1;this.last=b;b=a=1;null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);b=N.pool.get().set(a,b);b._inPool=!1;this.scrollFactor=b;this.pixelPerfectPosition=Ha.defaultPixelPerfectPosition;b=a=0;null==b&&(b=0);null==a&&(a=0);b=N.pool.get().set(a,b);b._inPool=!1;this.velocity=b;b=a=0;null==
b&&(b=0);null==a&&(a=0);b=N.pool.get().set(a,b);b._inPool=!1;this.acceleration=b;b=a=0;null==b&&(b=0);null==a&&(a=0);b=N.pool.get().set(a,b);b._inPool=!1;this.drag=b;b=a=1E4;null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);b=N.pool.get().set(a,b);b._inPool=!1;this.maxVelocity=b},initMotionVars:function(){var a=0,b=0;null==b&&(b=0);null==a&&(a=0);b=N.pool.get().set(a,b);b._inPool=!1;this.velocity=b;b=a=0;null==b&&(b=0);null==a&&(a=0);b=N.pool.get().set(a,b);b._inPool=!1;this.acceleration=
b;b=a=0;null==b&&(b=0);null==a&&(a=0);b=N.pool.get().set(a,b);b._inPool=!1;this.drag=b;b=a=1E4;null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);b=N.pool.get().set(a,b);b._inPool=!1;this.maxVelocity=b},destroy:function(){Na.prototype.destroy.call(this);this.velocity=ba.put(this.velocity);this.acceleration=ba.put(this.acceleration);this.drag=ba.put(this.drag);this.maxVelocity=ba.put(this.maxVelocity);this.scrollFactor=ba.put(this.scrollFactor);this.last=ba.put(this.last);this._point=ba.put(this._point);
this._rect=ba.put(this._rect)},update:function(a){var b=this.last,c=this.x,d=this.y;null==d&&(d=0);null==c&&(c=0);b.set_x(c);b.set_y(d);null!=this.path&&this.path.active&&this.path.update(a);this.moves&&this.updateMotion(a);this.wasTouching=this.touching;this.touching=0},updateMotion:function(a){var b=.5*(ke.computeVelocity(this.angularVelocity,this.angularAcceleration,this.angularDrag,this.maxAngular,a)-this.angularVelocity);this.angularVelocity+=b;this.set_angle(this.angle+this.angularVelocity*
a);this.angularVelocity+=b;b=.5*(ke.computeVelocity(this.velocity.x,this.acceleration.x,this.drag.x,this.maxVelocity.x,a)-this.velocity.x);this.velocity.set_x(this.velocity.x+b);var c=this.velocity.x*a;this.velocity.set_x(this.velocity.x+b);this.set_x(this.x+c);b=.5*(ke.computeVelocity(this.velocity.y,this.acceleration.y,this.drag.y,this.maxVelocity.y,a)-this.velocity.y);this.velocity.set_y(this.velocity.y+b);c=this.velocity.y*a;this.velocity.set_y(this.velocity.y+b);this.set_y(this.y+c)},draw:function(){},
overlaps:function(a,b,c){null==b&&(b=!1);var d=yb.resolveGroup(a);if(null!=d){var f=this,g=b,k=c;return d.any(function(a){return f.overlaps(a,g,k)})}if(3==a.flixelType)return a.overlaps(this,b,c);if(!b)return a.x+a.get_width()>this.x&&a.x<this.x+this.get_width()&&a.y+a.get_height()>this.y?a.y<this.y+this.get_height():!1;null==c&&(c=u.camera);b=a.getScreenPosition(null,c);this.getScreenPosition(this._point,c);return b.x+a.get_width()>this._point.x&&b.x<this._point.x+this.get_width()&&b.y+a.get_height()>
this._point.y?b.y<this._point.y+this.get_height():!1},overlapsCallback:function(a,b,c,d,f){return this.overlaps(a,d,f)},overlapsAt:function(a,b,c,d,f){null==d&&(d=!1);var g=yb.resolveGroup(c);if(null!=g){var k=this,l=d,m=f;return g.any(function(c){return k.overlapsAt(a,b,c,l,m)})}if(3==c.flixelType)return c.overlapsAt(c.x-(a-this.x),c.y-(b-this.y),this,d,f);if(!d)return c.x+c.get_width()>a&&c.x<a+this.get_width()&&c.y+c.get_height()>b?c.y<b+this.get_height():!1;null==f&&(f=u.camera);d=c.getScreenPosition(null,
f);this.getScreenPosition(this._point,f);return d.x+c.get_width()>this._point.x&&d.x<this._point.x+this.get_width()&&d.y+c.get_height()>this._point.y?d.y<this._point.y+this.get_height():!1},overlapsAtCallback:function(a,b,c,d,f){return this.overlapsAt(b,c,a,d,f)},overlapsPoint:function(a,b,c){null==b&&(b=!1);if(!b)return a.x>=this.x&&a.x<this.x+this.get_width()&&a.y>=this.y?a.y<this.y+this.get_height():!1;null==c&&(c=u.camera);b=a.x-c.scroll.x;var d=a.y-c.scroll.y;this.getScreenPosition(this._point,
c);a._weak&&a.put();return b>=this._point.x&&b<this._point.x+this.get_width()&&d>=this._point.y?d<this._point.y+this.get_height():!1},inWorldBounds:function(){if(this.x+this.get_width()>u.worldBounds.x){var a=u.worldBounds;a=this.x<a.x+a.width}else a=!1;return a&&this.y+this.get_height()>u.worldBounds.y?(a=u.worldBounds,this.y<a.y+a.height):!1},getScreenPosition:function(a,b){if(null==a){var c=0,d=0;null==d&&(d=0);null==c&&(c=0);a=N.pool.get().set(c,d);a._inPool=!1}null==b&&(b=u.camera);c=this.x;
d=this.y;null==d&&(d=0);null==c&&(c=0);a.set_x(c);a.set_y(d);this.pixelPerfectPosition&&(a.set_x(Math.floor(a.x)),a.set_y(Math.floor(a.y)));c=b.scroll.x*this.scrollFactor.x;d=b.scroll.y*this.scrollFactor.y;null==d&&(d=0);null==c&&(c=0);a.set_x(a.x-c);a.set_y(a.y-d);return a},getPosition:function(a){if(null==a){var b=0,c=0;null==c&&(c=0);null==b&&(b=0);a=N.pool.get().set(b,c);a._inPool=!1}b=this.x;c=this.y;null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c);return a},getMidpoint:function(a){if(null==
a){var b=0,c=0;null==c&&(c=0);null==b&&(b=0);a=N.pool.get().set(b,c);a._inPool=!1}b=this.x+.5*this.get_width();c=this.y+.5*this.get_height();null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c);return a},getHitbox:function(a){if(null==a){a=V._pool.get();var b=0,c=0,d=0,f=0;null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a.width=d;a.height=f;a._inPool=!1}b=this.x;c=this.y;d=this.get_width();f=this.get_height();null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);a.x=b;
a.y=c;a.width=d;a.height=f;return a},reset:function(a,b){this.wasTouching=this.touching=0;this.setPosition(a,b);var c=this.last;a=this.x;b=this.y;null==b&&(b=0);null==a&&(a=0);c.set_x(a);c.set_y(b);c=this.velocity;c.set_x(0);c.set_y(0);this.revive()},isOnScreen:function(a){null==a&&(a=u.camera);this.getScreenPosition(this._point,a);var b=this._point,c=this.get_width(),d=this.get_height();null==d&&(d=0);null==c&&(c=0);a=b.x+c>a.viewMarginX&&b.x<a.width-a.viewMarginX&&b.y+d>a.viewMarginY&&b.y<a.height-
a.viewMarginY;b._weak&&b.put();return a},isPixelPerfectRender:function(a){null==a&&(a=u.camera);return null==this.pixelPerfectRender?a.pixelPerfectRender:this.pixelPerfectRender},isTouching:function(a){return 0<(this.touching&a)},justTouched:function(a){return 0<(this.touching&a)?!(0<(this.wasTouching&a)):!1},screenCenter:function(a){null==a&&(a=17);1!=a&&17!=a||this.set_x((u.width-this.get_width())/2);16!=a&&17!=a||this.set_y((u.height-this.get_height())/2);return this},setPosition:function(a,b){null==
b&&(b=0);null==a&&(a=0);this.set_x(a);this.set_y(b)},setSize:function(a,b){this.set_width(a);this.set_height(b)},getBoundingBox:function(a){this.getScreenPosition(this._point,a);var b=this._rect,c=this._point.x,d=this._point.y,f=this.get_width(),g=this.get_height();null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);b.x=c;b.y=d;b.width=f;b.height=g;this._rect=a.transformRect(this._rect);this.isPixelPerfectRender(a)&&(b=this._rect,b.x=Math.floor(b.x),b.y=Math.floor(b.y),b.width=Math.floor(b.width),
b.height=Math.floor(b.height));return this._rect},getRotatedBounds:function(a){if(null==a){a=V._pool.get();var b=0,c=0,d=0,f=0;null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a.width=d;a.height=f;a._inPool=!1}b=this.x;c=this.y;d=this.get_width();f=this.get_height();null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a.width=d;a.height=f;return a.getRotatedBounds(this.angle,null,a)},toString:function(){var a=this.x,b=Ua._pool.get();b.label="x";b.value=a;
a=this.y;var c=Ua._pool.get();c.label="y";c.value=a;a=this.get_width();var d=Ua._pool.get();d.label="w";d.value=a;a=this.get_height();var f=Ua._pool.get();f.label="h";f.value=a;a=this.visible;var g=Ua._pool.get();g.label="visible";g.value=a;a=this.velocity;var k=Ua._pool.get();k.label="velocity";k.value=a;return ab.getDebugString([b,c,d,f,g,k])},set_x:function(a){return this.x=a},set_y:function(a){return this.y=a},set_width:function(a){return this.width=a},set_height:function(a){return this.height=
a},get_width:function(){return this.width},get_height:function(){return this.height},get_solid:function(){return 0<(this.allowCollisions&4369)},set_solid:function(a){this.set_allowCollisions(a?4369:0);return a},set_angle:function(a){return this.angle=a},set_moves:function(a){return this.moves=a},set_immovable:function(a){return this.immovable=a},set_pixelPerfectRender:function(a){return this.pixelPerfectRender=a},set_allowCollisions:function(a){return this.allowCollisions=a},get_collisonXDrag:function(){return 2==
this.collisionXDrag},set_collisonXDrag:function(a){this.collisionXDrag=a?2:0;return a},set_path:function(a){if(this.path==a)return a;null!=this.path&&this.path.set_object(null);null!=a&&a.set_object(this);return this.path=a},__class__:Ha,__properties__:x(Na.prototype.__properties__,{set_path:"set_path",set_collisonXDrag:"set_collisonXDrag",get_collisonXDrag:"get_collisonXDrag",set_allowCollisions:"set_allowCollisions",set_solid:"set_solid",get_solid:"get_solid",set_immovable:"set_immovable",set_moves:"set_moves",
set_angle:"set_angle",set_pixelPerfectRender:"set_pixelPerfectRender",set_height:"set_height",get_height:"get_height",set_width:"set_width",get_width:"get_width",set_y:"set_y",set_x:"set_x"})});var R=function(a,b,c){null==b&&(b=0);null==a&&(a=0);this._facingFlip=new hc;this._angleChanged=!0;this._cosAngle=1;this._sinAngle=0;this._facingHorizontalMult=this._facingVerticalMult=1;this.useColorTransform=!1;this.color=16777215;this.flipX=this.flipY=!1;this.facing=16;this.alpha=1;this.frameWidth=this.frameHeight=
this.bakedRotationAngle=0;this.dirty=!0;this.antialiasing=R.defaultAntialiasing;this.useFramePixels=!0;Ha.call(this,a,b);this.set_useFramePixels(u.renderBlit);null!=c&&this.loadGraphic(c)};h["flixel.FlxSprite"]=R;R.__name__="flixel.FlxSprite";R.__super__=Ha;R.prototype=x(Ha.prototype,{animation:null,framePixels:null,useFramePixels:null,antialiasing:null,dirty:null,frame:null,frameWidth:null,frameHeight:null,frames:null,graphic:null,bakedRotationAngle:null,alpha:null,facing:null,flipX:null,flipY:null,
origin:null,offset:null,scale:null,blend:null,color:null,colorTransform:null,useColorTransform:null,clipRect:null,shader:null,_frame:null,_frameGraphic:null,_facingHorizontalMult:null,_facingVerticalMult:null,_flashPoint:null,_flashRect:null,_flashRect2:null,_flashPointZero:null,_matrix:null,_halfSize:null,_scaledOrigin:null,_sinAngle:null,_cosAngle:null,_angleChanged:null,_facingFlip:null,initVars:function(){Ha.prototype.initVars.call(this);this.animation=new Lj(this);this._flashPoint=new Ya;this._flashRect=
new ea;this._flashRect2=new ea;this._flashPointZero=new Ya;var a=0,b=0;null==b&&(b=0);null==a&&(a=0);b=N.pool.get().set(a,b);b._inPool=!1;this.offset=b;b=a=0;null==b&&(b=0);null==a&&(a=0);b=N.pool.get().set(a,b);b._inPool=!1;this.origin=b;b=a=1;null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);b=N.pool.get().set(a,b);b._inPool=!1;this.scale=b;b=a=0;null==b&&(b=0);null==a&&(a=0);b=N.pool.get().set(a,b);b._inPool=!1;this._halfSize=b;this._matrix=new Ze;this.colorTransform=new Ub;b=a=0;null==
b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);b=N.pool.get().set(a,b);b._inPool=!1;this._scaledOrigin=b},destroy:function(){Ha.prototype.destroy.call(this);this.animation=ba.destroy(this.animation);this.offset=ba.put(this.offset);this.origin=ba.put(this.origin);this.scale=ba.put(this.scale);this._halfSize=ba.put(this._halfSize);this._scaledOrigin=ba.put(this._scaledOrigin);this.framePixels=ba.dispose(this.framePixels);this.colorTransform=this._matrix=this._flashPointZero=this._flashRect2=
this._flashRect=this._flashPoint=null;this.set_blend(null);this.set_frames(null);this.set_graphic(null);this._frame=ba.destroy(this._frame);this._frameGraphic=ba.destroy(this._frameGraphic);this.shader=null},clone:function(){return(new R).loadGraphicFromSprite(this)},loadGraphicFromSprite:function(a){this.set_frames(a.frames);this.bakedRotationAngle=a.bakedRotationAngle;0<this.bakedRotationAngle&&(this.set_width(a.get_width()),this.set_height(a.get_height()),this.centerOffsets());this.set_antialiasing(a.antialiasing);
this.animation.copyFrom(a.animation);this.graphicLoaded();this.set_clipRect(a.clipRect);return this},loadGraphic:function(a,b,c,d,f,g){null==f&&(f=!1);null==d&&(d=0);null==c&&(c=0);null==b&&(b=!1);a=u.bitmap.add(a,f,g);if(null==a)return this;0==c?(c=b?a.height:a.width,c>a.width&&(c=a.width)):c>a.width&&u.log.advanced("frameWidth:"+c+" is larger than the graphic's width:"+a.width,La.WARNING,!0);0==d?(d=b?c:a.height,d>a.height&&(d=a.height)):d>a.height&&u.log.advanced("frameHeight:"+d+" is larger than the graphic's height:"+
a.height,La.WARNING,!0);b?(b=c,null==d&&(d=0),null==b&&(b=0),null==d&&(d=0),null==b&&(b=0),d=N.pool.get().set(b,d),d._inPool=!1,this.set_frames(Cc.fromGraphic(a,d))):this.set_frames(a.get_imageFrame());return this},loadRotatedGraphic:function(a,b,c,d,f,g){null==f&&(f=!1);null==d&&(d=!1);null==c&&(c=-1);null==b&&(b=16);g=u.bitmap.add(a,!1,g);if(null==g)return this;a=g.bitmap;g=g.key;if(0<=c){var k=a.height,l=a.width/k|0;l>c||0==l||(c%=l);g+=":"+c;l=a;a=new ma(k,k,!0,0);this._flashRect.setTo(c*k,0,
k,k);a.copyPixels(l,this._flashRect,this._flashPointZero)}g+=":"+b+":"+(null==f?"null":""+f);c=u.bitmap._cache.h[g];null==c&&(d=xd.generateRotations(a,b,d,f),c=lc.fromBitmapData(d,!1,g));g=a.height>a.width?a.height:a.width;f&&(g=1.5*g|0);d=g;null==g&&(g=0);null==d&&(d=0);null==g&&(g=0);null==d&&(d=0);d=N.pool.get().set(d,g);d._inPool=!1;this.set_frames(Cc.fromGraphic(c,d));f&&(this.set_width(a.width),this.set_height(a.height),this.centerOffsets());this.bakedRotationAngle=360/b;this.animation.createPrerotated();
return this},loadRotatedFrame:function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!1);null==b&&(b=16);var f=a.parent.key;if(null!=a.name)f+=":"+a.name;else{var g=a.frame,k=g.x,l=Ua._pool.get();l.label="x";l.value=k;k=g.y;var m=Ua._pool.get();m.label="y";m.value=k;k=g.width;var z=Ua._pool.get();z.label="w";z.value=k;k=g.height;g=Ua._pool.get();g.label="h";g.value=k;f+=":"+ab.getDebugString([l,m,z,g])}g=u.bitmap._cache.h[f];null==g&&(g=lc.fromBitmapData(a.paint(),!1,f));return this.loadRotatedGraphic(g,b,
-1,c,d)},makeGraphic:function(a,b,c,d,f){null==d&&(d=!1);null==c&&(c=-1);a=u.bitmap.create(a,b,c,d,f);this.set_frames(a.get_imageFrame());return this},graphicLoaded:function(){},resetSize:function(){this._flashRect.x=0;this._flashRect.y=0;this._flashRect.width=this.frameWidth;this._flashRect.height=this.frameHeight},resetFrameSize:function(){null!=this.frame&&(this.frameWidth=this.frame.sourceSize.x|0,this.frameHeight=this.frame.sourceSize.y|0);var a=this._halfSize,b=.5*this.frameWidth,c=.5*this.frameHeight;
null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c);this._flashRect.x=0;this._flashRect.y=0;this._flashRect.width=this.frameWidth;this._flashRect.height=this.frameHeight},resetSizeFromFrame:function(){this.set_width(this.frameWidth);this.set_height(this.frameHeight)},resetFrame:function(){this.set_frame(this.frame)},setGraphicSize:function(a,b){null==b&&(b=0);null==a&&(a=0);if(!(0>=a&&0>=b)){var c=a/this.frameWidth,d=b/this.frameHeight,f=this.scale,g=c,k=d;null==k&&(k=0);null==g&&(g=0);f.set_x(g);
f.set_y(k);0>=a?this.scale.set_x(d):0>=b&&this.scale.set_y(c)}},updateHitbox:function(){this.set_width(Math.abs(this.scale.x)*this.frameWidth);this.set_height(Math.abs(this.scale.y)*this.frameHeight);var a=this.offset,b=-.5*(this.get_width()-this.frameWidth),c=-.5*(this.get_height()-this.frameHeight);null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c);a=this.origin;b=.5*this.frameWidth;c=.5*this.frameHeight;null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c)},resetHelpers:function(){null!=this.frame&&
(this.frameWidth=this.frame.sourceSize.x|0,this.frameHeight=this.frame.sourceSize.y|0);var a=this._halfSize,b=.5*this.frameWidth,c=.5*this.frameHeight;null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c);this._flashRect.x=0;this._flashRect.y=0;this._flashRect.width=this.frameWidth;this._flashRect.height=this.frameHeight;this.set_width(this.frameWidth);this.set_height(this.frameHeight);this._flashRect2.x=0;this._flashRect2.y=0;null!=this.graphic&&(this._flashRect2.width=this.graphic.width,this._flashRect2.height=
this.graphic.height);a=this.origin;b=.5*this.frameWidth;c=.5*this.frameHeight;null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c);u.renderBlit&&(this.dirty=!0,this.updateFramePixels())},update:function(a){Ha.prototype.update.call(this,a);this.updateAnimation(a)},updateAnimation:function(a){this.animation.update(a)},checkEmptyFrame:function(){if(null==this._frame)this.loadGraphic("flixel/images/logo/default.png");else if(null!=this.graphic&&null==this.graphic.shader){var a=this.get_width(),b=this.get_height();
u.log.advanced("Cannot render a destroyed graphic, the placeholder image will be used instead",La.ERROR,!0);this.loadGraphic("flixel/images/logo/default.png");this.set_width(a);this.set_height(b)}},draw:function(){this.checkEmptyFrame();if(0!=this.alpha&&2!=this._frame.type){this.dirty&&this.calcFrame(this.useFramePixels);for(var a=0,b=this.getCamerasLegacy();a<b.length;){var c=b[a];++a;c.visible&&c.exists&&this.isOnScreen(c)&&(this.isSimpleRender(c)?this.drawSimple(c):this.drawComplex(c))}}},drawSimple:function(a){var b=
this.getScreenPosition(this._point,a),c=this.offset,d=c.x,f=c.y;null==f&&(f=0);null==d&&(d=0);b.set_x(b.x-d);b.set_y(b.y-f);c._weak&&c.put();this.isPixelPerfectRender(a)&&(b=this._point,b.set_x(Math.floor(b.x)),b.set_y(Math.floor(b.y)));b=this._point;c=this._flashPoint;null==c&&(c=new Ya);c.x=b.x;c.y=b.y;a.copyPixels(this._frame,this.framePixels,this._flashRect,this._flashPoint,this.colorTransform,this.blend,this.antialiasing)},drawComplex:function(a){var b=this.flipX!=this._frame.flipX,c=this.flipY!=
this._frame.flipY;this._frame.prepareMatrix(this._matrix,0,null!=this.animation._curAnim?b!=this.animation._curAnim.flipX:b,null!=this.animation._curAnim?c!=this.animation._curAnim.flipY:c);this._matrix.translate(-this.origin.x,-this.origin.y);this._matrix.scale(this.scale.x,this.scale.y);if(0>=this.bakedRotationAngle&&(this._angleChanged&&(b=Math.PI/180*this.angle,this._sinAngle=Math.sin(b),this._cosAngle=Math.cos(b),this._angleChanged=!1),0!=this.angle)){b=this._matrix;c=this._cosAngle;var d=this._sinAngle,
f=b.a*c-b.b*d;b.b=b.a*d+b.b*c;b.a=f;f=b.c*c-b.d*d;b.d=b.c*d+b.d*c;b.c=f;f=b.tx*c-b.ty*d;b.ty=b.tx*d+b.ty*c;b.tx=f}b=this.getScreenPosition(this._point,a);c=this.offset;d=c.x;f=c.y;null==f&&(f=0);null==d&&(d=0);b.set_x(b.x-d);b.set_y(b.y-f);b=c;b._weak&&b.put();b=this._point;d=this.origin.x;f=this.origin.y;null==f&&(f=0);null==d&&(d=0);b.set_x(b.x+d);b.set_y(b.y+f);this._matrix.translate(this._point.x,this._point.y);this.isPixelPerfectRender(a)&&(this._matrix.tx=Math.floor(this._matrix.tx),this._matrix.ty=
Math.floor(this._matrix.ty));a.drawPixels(this._frame,this.framePixels,this._matrix,this.colorTransform,this.blend,this.antialiasing,this.shader)},stamp:function(a,b,c){null==c&&(c=0);null==b&&(b=0);a.drawFrame();if(null==this.graphic||null==a.graphic)throw J.thrown("Cannot stamp to or from a FlxSprite with no graphics.");var d=a.framePixels;this.isSimpleRenderBlit()?(this._flashPoint.x=b+this.frame.frame.x,this._flashPoint.y=c+this.frame.frame.y,this._flashRect2.width=d.width,this._flashRect2.height=
d.height,this.graphic.bitmap.copyPixels(d,this._flashRect2,this._flashPoint,null,null,!0),this._flashRect2.width=this.graphic.bitmap.width,this._flashRect2.height=this.graphic.bitmap.height):(this._matrix.identity(),this._matrix.translate(-a.origin.x,-a.origin.y),this._matrix.scale(a.scale.x,a.scale.y),0!=a.angle&&this._matrix.rotate(Math.PI/180*a.angle),this._matrix.translate(b+this.frame.frame.x+a.origin.x,c+this.frame.frame.y+a.origin.y),this.graphic.bitmap.draw(d,this._matrix,null,a.blend,null,
a.antialiasing));u.renderBlit&&(this.dirty=!0,this.calcFrame())},drawFrame:function(a){null==a&&(a=!1);if(u.renderBlit){if(a||this.dirty)this.dirty=!0,this.calcFrame()}else this.dirty=!0,this.calcFrame(!0)},centerOffsets:function(a){null==a&&(a=!1);this.offset.set_x(.5*(this.frameWidth-this.get_width()));this.offset.set_y(.5*(this.frameHeight-this.get_height()));a&&(this.set_x(this.x+this.offset.x),this.set_y(this.y+this.offset.y))},centerOrigin:function(){var a=this.origin,b=.5*this.frameWidth,c=
.5*this.frameHeight;null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c)},replaceColor:function(a,b,c){null==c&&(c=!1);a=xd.replaceColor(this.graphic.bitmap,a,b,c);null!=a&&(this.dirty=!0);return a},setColorTransform:function(a,b,c,d,f,g,k,l){null==l&&(l=0);null==k&&(k=0);null==g&&(g=0);null==f&&(f=0);null==d&&(d=1);null==c&&(c=1);null==b&&(b=1);null==a&&(a=1);var m=mb._new(),z=1;null==z&&(z=1);var h=Math.round(255*a);m=m&-16711681|(255<h?255:0>h?0:h)<<16;h=Math.round(255*b);m=m&-65281|(255<h?255:
0>h?0:h)<<8;h=Math.round(255*c);m=m&-256|(255<h?255:0>h?0:h);h=Math.round(255*z);this.set_color((m&16777215|(255<h?255:0>h?0:h)<<24)&16777215);this.set_alpha(d);Rc.setMultipliers(this.colorTransform,a,b,c,d);Rc.setOffsets(this.colorTransform,f,g,k,l);this.useColorTransform=1!=this.alpha||16777215!=this.color||Rc.hasRGBOffsets(this.colorTransform);this.dirty=!0},updateColorTransform:function(){null!=this.colorTransform&&((this.useColorTransform=1!=this.alpha||16777215!=this.color)?Rc.setMultipliers(this.colorTransform,
(this.color>>16&255)/255,(this.color>>8&255)/255,(this.color&255)/255,this.alpha):Rc.setMultipliers(this.colorTransform,1,1,1,1),this.dirty=!0)},pixelsOverlapPoint:function(a,b,c){null==b&&(b=255);a=this.getPixelAt(a,c);return null!=a?(a>>24&255)*this.alpha>=b:!1},getPixelAt:function(a,b){this.transformWorldToPixels(a,b,this._point);return 0<=this._point.x&&this._point.x<=this.frameWidth&&0<=this._point.y&&this._point.y<=this.frameHeight?this.updateFramePixels().getPixel32(this._point.x|0,this._point.y|
0):null},getPixelAtScreen:function(a,b){this.transformScreenToPixels(a,b,this._point);return 0<=this._point.x&&this._point.x<=this.frameWidth&&0<=this._point.y&&this._point.y<=this.frameHeight?this.updateFramePixels().getPixel32(this._point.x|0,this._point.y|0):null},transformWorldToPixels:function(a,b,c){null==b&&(b=u.camera);var d=a.x-b.scroll.x,f=a.y-b.scroll.y;null==f&&(f=0);null==d&&(d=0);null==f&&(f=0);null==d&&(d=0);null==f&&(f=0);null==d&&(d=0);d=N.pool.get().set(d,f);d._inPool=!1;d._weak=
!0;a._weak&&a.put();return this.transformScreenToPixels(d,b,c)},transformWorldToPixelsSimple:function(a,b){b=this.getPosition(b);var c=a.x,d=a.y;null==d&&(d=0);null==c&&(c=0);b.set_x(b.x-c);b.set_y(b.y-d);b.set_x(-1*b.x);b.set_y(-1*b.y);var f=this.offset;c=f.x;d=f.y;null==d&&(d=0);null==c&&(c=0);b.set_x(b.x+c);b.set_y(b.y+d);c=f;c._weak&&c.put();f=this.origin;c=f.x;d=f.y;null==d&&(d=0);null==c&&(c=0);b.set_x(b.x-c);b.set_y(b.y-d);c=f;c._weak&&c.put();c=1/this.scale.x;d=1/this.scale.y;null==d&&(d=
c);b.set_x(b.x*c);b.set_y(b.y*d);c=(Mb.get_radians(b)*(180/Math.PI)-this.angle)*(Math.PI/180);d=Math.sqrt(b.x*b.x+b.y*b.y);b.set_x(d*Math.cos(c));b.set_y(d*Math.sin(c));f=this.origin;c=f.x;d=f.y;null==d&&(d=0);null==c&&(c=0);b.set_x(b.x+c);b.set_y(b.y+d);c=f;c._weak&&c.put();c=a;c._weak&&c.put();return b},transformScreenToPixels:function(a,b,c){c=this.getScreenPosition(c,b);b=a.x;var d=a.y;null==d&&(d=0);null==b&&(b=0);c.set_x(c.x-b);c.set_y(c.y-d);c.set_x(-1*c.x);c.set_y(-1*c.y);var f=this.offset;
b=f.x;d=f.y;null==d&&(d=0);null==b&&(b=0);c.set_x(c.x+b);c.set_y(c.y+d);b=f;b._weak&&b.put();f=this.origin;b=f.x;d=f.y;null==d&&(d=0);null==b&&(b=0);c.set_x(c.x-b);c.set_y(c.y-d);b=f;b._weak&&b.put();b=1/this.scale.x;d=1/this.scale.y;null==d&&(d=b);c.set_x(c.x*b);c.set_y(c.y*d);b=(Mb.get_radians(c)*(180/Math.PI)-this.angle)*(Math.PI/180);d=Math.sqrt(c.x*c.x+c.y*c.y);c.set_x(d*Math.cos(b));c.set_y(d*Math.sin(b));f=this.origin;b=f.x;d=f.y;null==d&&(d=0);null==b&&(b=0);c.set_x(c.x+b);c.set_y(c.y+d);
b=f;b._weak&&b.put();b=a;b._weak&&b.put();return c},calcFrame:function(a){null==a&&(a=!1);this.checkEmptyFrame();u.renderTile&&!a||this.updateFramePixels()},updateFramePixels:function(){if(null==this._frame||!this.dirty)return this.framePixels;if(u.renderTile&&null!=this._frameGraphic)return this.dirty=!1,this.framePixels;var a=this.flipX!=this._frame.flipX;a=null!=this.animation._curAnim?a!=this.animation._curAnim.flipX:a;var b=this.flipY!=this._frame.flipY;b=null!=this.animation._curAnim?b!=this.animation._curAnim.flipY:
b;this.framePixels=a||b||0!=this._frame.type?this._frame.paintRotatedAndFlipped(this.framePixels,this._flashPointZero,0,a,b,!1,!0):this._frame.paint(this.framePixels,this._flashPointZero,!1,!0);this.useColorTransform&&this.framePixels.colorTransform(this._flashRect,this.colorTransform);u.renderTile&&this.useFramePixels&&(this._frameGraphic=ba.destroy(this._frameGraphic),this._frameGraphic=lc.fromBitmapData(this.framePixels,!1,null,!1),this._frame=this._frameGraphic.get_imageFrame().get_frame().copyTo(this._frame));
this.dirty=!1;return this.framePixels},getGraphicMidpoint:function(a){var b=this.getGraphicBounds();a=b.getMidpoint(a);b._inPool||(b._inPool=!0,b._weak=!1,V._pool.putUnsafe(b));return a},getGraphicBounds:function(a){if(null==a){a=V._pool.get();var b=0,c=0,d=0,f=0;null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a.width=d;a.height=f;a._inPool=!1}b=this.x;c=this.y;null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a.width=0;a.height=0;this.pixelPerfectPosition&&(a.x=Math.floor(a.x),a.y=
Math.floor(a.y),a.width=Math.floor(a.width),a.height=Math.floor(a.height));b=this._scaledOrigin;c=this.origin.x*this.scale.x;d=this.origin.y*this.scale.y;null==d&&(d=0);null==c&&(c=0);b.set_x(c);b.set_y(d);a.x+=this.origin.x-this.offset.x-this._scaledOrigin.x;a.y+=this.origin.y-this.offset.y-this._scaledOrigin.y;a.width=this.frameWidth*this.scale.x;a.height=this.frameHeight*this.scale.y;0!=this.angle%360&&a.getRotatedBounds(this.angle,this._scaledOrigin,a);return a},isOnScreen:function(a){null==a&&
(a=u.camera);var b=this.getScreenBounds(this._rect,a);a=b.x+b.width>a.viewMarginX&&b.x<a.width-a.viewMarginX&&b.y+b.height>a.viewMarginY&&b.y<a.height-a.viewMarginY;b._weak&&!b._inPool&&(b._inPool=!0,b._weak=!1,V._pool.putUnsafe(b));return a},isSimpleRender:function(a){return u.renderTile?!1:this.isSimpleRenderBlit(a)},isSimpleRenderBlit:function(a){var b=(0==this.angle||0<this.bakedRotationAngle)&&1==this.scale.x&&1==this.scale.y&&null==this.blend;return b=b&&(null!=a?this.isPixelPerfectRender(a):
this.pixelPerfectRender)},getRotatedBounds:function(a){if(null==a){a=V._pool.get();var b=0,c=0,d=0,f=0;null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a.width=d;a.height=f;a._inPool=!1}b=this.x;c=this.y;d=this.get_width();f=this.get_height();null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a.width=d;a.height=f;return a.getRotatedBounds(this.angle,this.origin,a)},getScreenBounds:function(a,b){if(null==a){a=V._pool.get();var c=0,d=0,f=0,g=0;null==g&&(g=
0);null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);a.x=c;a.y=d;a.width=f;a.height=g;a._inPool=!1}null==b&&(b=u.camera);a.x=this.x;a.y=this.y;this.pixelPerfectPosition&&(a.x=Math.floor(a.x),a.y=Math.floor(a.y),a.width=Math.floor(a.width),a.height=Math.floor(a.height));g=this._scaledOrigin;c=this.origin.x*this.scale.x;d=this.origin.y*this.scale.y;null==d&&(d=0);null==c&&(c=0);g.set_x(c);g.set_y(d);a.x+=-(b.scroll.x*this.scrollFactor.x|0)-this.offset.x+this.origin.x-this._scaledOrigin.x;a.y+=-(b.scroll.y*
this.scrollFactor.y|0)-this.offset.y+this.origin.y-this._scaledOrigin.y;this.isPixelPerfectRender(b)&&(a.x=Math.floor(a.x),a.y=Math.floor(a.y),a.width=Math.floor(a.width),a.height=Math.floor(a.height));g=this.frameHeight*Math.abs(this.scale.y);a.width=this.frameWidth*Math.abs(this.scale.x);a.height=g;return a.getRotatedBounds(this.angle,this._scaledOrigin,a)},setFacingFlip:function(a,b,c){this._facingFlip.h[a]={x:b,y:c}},setFrames:function(a,b){null==b&&(b=!0);if(b){b=this.animation._animations;var c=
!1,d=0,f=this.animation.frameIndex,g=null;null!=this.animation._curAnim&&(c=this.animation._curAnim.reversed,d=this.animation._curAnim.curFrame,g=this.animation._curAnim.name);this.animation._animations=null;this.set_frames(a);this.set_frame(this.frames.frames[f]);this.animation._animations=b;null!=g&&this.animation.play(g,!1,c,d)}else this.set_frames(a);return this},get_pixels:function(){return null==this.graphic?null:this.graphic.bitmap},set_pixels:function(a){var b=u.bitmap.findKeyForBitmap(a);
null==b?(b=u.bitmap.getUniqueKey(),this.set_graphic(u.bitmap.add(a,!1,b))):this.set_graphic(u.bitmap._cache.h[b]);this.set_frames(this.graphic.get_imageFrame());return a},set_frame:function(a){this.frame=a;if(null!=this.frame){null!=this.frame&&(this.frameWidth=this.frame.sourceSize.x|0,this.frameHeight=this.frame.sourceSize.y|0);a=this._halfSize;var b=.5*this.frameWidth,c=.5*this.frameHeight;null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c);this._flashRect.x=0;this._flashRect.y=0;this._flashRect.width=
this.frameWidth;this._flashRect.height=this.frameHeight;this.dirty=!0}else if(null!=this.frames&&null!=this.frames.frames&&0<this.get_numFrames())this.frame=this.frames.frames[0],this.dirty=!0;else return null;u.renderTile&&(this._frameGraphic=ba.destroy(this._frameGraphic));this._frame=null!=this.clipRect?this.frame.clipTo(this.clipRect,this._frame):this.frame.copyTo(this._frame);return this.frame},set_facing:function(a){var b=this._facingFlip.h[a];null!=b&&(this.set_flipX(b.x),this.set_flipY(b.y));
return this.facing=a},set_alpha:function(a){if(this.alpha==a)return a;a=0>a?0:a;this.alpha=1<a?1:a;this.updateColorTransform();return this.alpha},set_color:function(a){if(this.color==a)return a;this.color=a;this.updateColorTransform();return this.color},set_angle:function(a){var b=this.angle!=a;a=Ha.prototype.set_angle.call(this,a);b&&(this._angleChanged=!0,this.animation.update(0));return a},updateTrig:function(){if(this._angleChanged){var a=Math.PI/180*this.angle;this._sinAngle=Math.sin(a);this._cosAngle=
Math.cos(a);this._angleChanged=!1}},set_blend:function(a){return this.blend=a},set_graphic:function(a){this.graphic!=a&&(null!=a&&a.incrementUseCount(),null!=this.graphic&&this.graphic.decrementUseCount(),this.graphic=a);return a},set_clipRect:function(a){null!=a?(a.x=Math.round(a.x),a.y=Math.round(a.y),a.width=Math.round(a.width),a.height=Math.round(a.height),this.clipRect=a):this.clipRect=null;null!=this.frames&&this.set_frame(this.frames.frames[this.animation.frameIndex]);return a},set_frames:function(a){null!=
this.animation&&this.animation.destroyAnimations();null!=a?(this.set_graphic(a.parent),this.frames=a,this.set_frame(this.frames.frames[0]),this.resetHelpers(),this.bakedRotationAngle=0,this.animation.set_frameIndex(0),this.graphicLoaded()):(this.frames=null,this.set_frame(null),this.set_graphic(null));return a},get_numFrames:function(){return null!=this.frames?this.frames.frames.length:0},set_flipX:function(a){u.renderTile&&(this._facingHorizontalMult=a?-1:1);this.dirty=this.flipX!=a||this.dirty;
return this.flipX=a},set_flipY:function(a){u.renderTile&&(this._facingVerticalMult=a?-1:1);this.dirty=this.flipY!=a||this.dirty;return this.flipY=a},set_antialiasing:function(a){return this.antialiasing=a},set_useFramePixels:function(a){return u.renderTile?(a!=this.useFramePixels&&(this.useFramePixels=a,this.set_frame(this.frame),a&&this.updateFramePixels()),a):this.useFramePixels=!0},checkFlipX:function(){var a=this.flipX!=this._frame.flipX;return null!=this.animation._curAnim?a!=this.animation._curAnim.flipX:
a},checkFlipY:function(){var a=this.flipY!=this._frame.flipY;return null!=this.animation._curAnim?a!=this.animation._curAnim.flipY:a},__class__:R,__properties__:x(Ha.prototype.__properties__,{set_clipRect:"set_clipRect",set_color:"set_color",set_blend:"set_blend",set_flipY:"set_flipY",set_flipX:"set_flipX",set_facing:"set_facing",set_alpha:"set_alpha",set_graphic:"set_graphic",set_frames:"set_frames",get_numFrames:"get_numFrames",set_frame:"set_frame",set_pixels:"set_pixels",get_pixels:"get_pixels",
set_antialiasing:"set_antialiasing",set_useFramePixels:"set_useFramePixels"})});var lb=function(a,b,c,d){R.call(this,a,b);this.velocity=c;d==Sd.LEFT&&(this.set_flipX(!0),this.velocity.set_x(-1*this.velocity.x))};h.Creature=lb;lb.__name__="Creature";lb.getCreatureTypes=function(){var a=new R;a.loadGraphic("assets/images/medusa.png",!0,56,92);a.animation.add("swim",[0,1,2,3,4,5,6,7,8,9,10],5);a.animation.play("swim");var b=new R;b.loadGraphic("assets/images/ahven.png",!0,32,32);b.animation.add("swim",
[0,1,2,3,4,5,6],5);b.animation.play("swim");var c=new R;c.loadGraphic("assets/images/swordfish.png",!0,64,64);c.animation.add("swim",[0,1,2,3,4,5],5);c.animation.play("swim");var d=new R;d.loadGraphic("assets/images/whale.png",!0,192,128);d.animation.add("swim",[0,1,2,3,4,5,6,7,8,9,10,11],5);d.animation.play("swim");var f=new R;f.loadGraphic("assets/images/translucentboi.png",!0,64,64);f.animation.add("swim",[0,1,2,3,4],5);f.animation.play("swim");var g=new R;g.loadGraphic("assets/images/leviathan.png",
!0,270,200);g.animation.add("swim",[0,1,2,3,4,5,6,7],5);g.animation.play("swim");return[{sprite:a,speed_min:7,speed_max:12,min_depth:0,max_depth:3E3,probability:.5,alpha:.85},{sprite:b,speed_min:10,speed_max:20,min_depth:0,max_depth:1E3,probability:1,alpha:1},{sprite:c,speed_min:15,speed_max:20,min_depth:0,max_depth:1500,probability:.7,alpha:1},{sprite:d,speed_min:5,speed_max:8,min_depth:500,max_depth:4E3,probability:.3,alpha:1},{sprite:f,speed_min:10,speed_max:15,min_depth:2E3,max_depth:6E3,probability:.6,
alpha:.9},{sprite:g,speed_min:3,speed_max:5,min_depth:5E3,max_depth:9E3,probability:.3,alpha:1}]};lb.__super__=R;lb.prototype=x(R.prototype,{__class__:lb});var hb=function(a,b,c){null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.directAlpha=this._skipTransformChildren=!1;this.initGroup(c);R.call(this,a,b)};h["flixel.group.FlxTypedSpriteGroup"]=hb;hb.__name__="flixel.group.FlxTypedSpriteGroup";hb.__super__=R;hb.prototype=x(R.prototype,{transformChildren_flixel_math_FlxRect:function(a,b){if(!this._skipTransformChildren&&
null!=this.group)for(var c=0,d=this.group.members;c<d.length;){var f=d[c];++c;null!=f&&a(f,b)}},transformChildren_openfl_display_BlendMode:function(a,b){if(!this._skipTransformChildren&&null!=this.group)for(var c=0,d=this.group.members;c<d.length;){var f=d[c];++c;null!=f&&a(f,b)}},transformChildren_Int:function(a,b){if(!this._skipTransformChildren&&null!=this.group)for(var c=0,d=this.group.members;c<d.length;){var f=d[c];++c;null!=f&&a(f,b)}},transformChildren_Bool:function(a,b){if(!this._skipTransformChildren&&
null!=this.group)for(var c=0,d=this.group.members;c<d.length;){var f=d[c];++c;null!=f&&a(f,b)}},transformChildren_Array_flixel_FlxCamera:function(a,b){if(!this._skipTransformChildren&&null!=this.group)for(var c=0,d=this.group.members;c<d.length;){var f=d[c];++c;null!=f&&a(f,b)}},transformChildren_flixel_FlxCamera:function(a,b){if(!this._skipTransformChildren&&null!=this.group)for(var c=0,d=this.group.members;c<d.length;){var f=d[c];++c;null!=f&&a(f,b)}},multiTransformChildren_Float:function(a,b){if(!this._skipTransformChildren&&
null!=this.group){var c=a.length;if(!(c>b.length))for(var d,f=0,g=this.group.members;f<g.length;){var k=g[f];++f;if(null!=k&&k.exists)for(var l=0,m=c;l<m;){var z=l++;d=a[z];d(k,b[z])}}}},transformChildren_Float:function(a,b){if(!this._skipTransformChildren&&null!=this.group)for(var c=0,d=this.group.members;c<d.length;){var f=d[c];++c;null!=f&&a(f,b)}},transformChildren_flixel_math_FlxPoint:function(a,b){if(!this._skipTransformChildren&&null!=this.group)for(var c=0,d=this.group.members;c<d.length;){var f=
d[c];++c;null!=f&&a(f,b)}},group:null,directAlpha:null,_skipTransformChildren:null,initGroup:function(a){this.set_group(new yb(a))},initVars:function(){this.flixelType=4;this.offset=new hh(q(this,this.offsetCallback));this.origin=new hh(q(this,this.originCallback));this.scale=new hh(q(this,this.scaleCallback));this.scrollFactor=new hh(q(this,this.scrollFactorCallback));var a=this.scale,b=1,c=1;null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c);a=this.scrollFactor;c=b=1;null==c&&(c=0);null==b&&(b=
0);a.set_x(b);a.set_y(c);c=b=0;null==c&&(c=0);null==b&&(b=0);c=N.pool.get().set(b,c);c._inPool=!1;this.velocity=c;c=b=0;null==c&&(c=0);null==b&&(b=0);c=N.pool.get().set(b,c);c._inPool=!1;this.acceleration=c;c=b=0;null==c&&(c=0);null==b&&(b=0);c=N.pool.get().set(b,c);c._inPool=!1;this.drag=c;c=b=1E4;null==c&&(c=0);null==b&&(b=0);a=b;null==c&&(c=0);null==a&&(a=0);c=N.pool.get().set(a,c);c._inPool=!1;this.maxVelocity=c},destroy:function(){this.offset=ba.destroy(this.offset);this.origin=ba.destroy(this.origin);
this.scale=ba.destroy(this.scale);this.scrollFactor=ba.destroy(this.scrollFactor);this.group=ba.destroy(this.group);R.prototype.destroy.call(this)},clone:function(){for(var a=new hb(this.x,this.y,this.group.maxSize),b=0,c=this.group.members;b<c.length;){var d=c[b];++b;null!=d&&a.add(d.clone())}return a},isOnScreen:function(a){for(var b=0,c=this.group.members;b<c.length;){var d=c[b];++b;if(null!=d&&d.exists&&d.visible&&d.isOnScreen(a))return!0}return!1},overlapsPoint:function(a,b,c){null==b&&(b=!1);
for(var d=!1,f=0,g=this.group.members;f<g.length;){var k=g[f];++f;null!=k&&k.exists&&k.visible&&(d=d||k.overlapsPoint(a,b,c))}return d},pixelsOverlapPoint:function(a,b,c){null==b&&(b=255);for(var d=!1,f=0,g=this.group.members;f<g.length;){var k=g[f];++f;null!=k&&k.exists&&k.visible&&(d=d||k.pixelsOverlapPoint(a,b,c))}return d},update:function(a){this.group.update(a);null!=this.path&&this.path.active&&this.path.update(a);this.moves&&this.updateMotion(a)},draw:function(){this.group.draw()},replaceColor:function(a,
b,c){null==c&&(c=!1);var d=null;c&&(d=[]);for(var f,g=0,k=this.group.members;g<k.length;)f=k[g],++g,null!=f&&(f=f.replaceColor(a,b,c),c&&(d=d.concat(f)));return d},add:function(a){this.preAdd(a);return this.group.add(a)},insert:function(a,b){this.preAdd(b);return this.group.insert(a,b)},preAdd:function(a){a.set_x(a.x+this.x);a.set_y(a.y+this.y);a.set_alpha(a.alpha*this.alpha);var b=a.scrollFactor,c=this.scrollFactor,d=c.x,f=c.y;null==f&&(f=0);null==d&&(d=0);b.set_x(d);b.set_y(f);b=c;b._weak&&b.put();
a.set_cameras(this._cameras);if(null!=this.clipRect)if(b=this.clipRect,null==b)a.set_clipRect(null);else{f=b.x-a.x+this.x;var g=b.y-a.y+this.y;c=b.width;d=b.height;null==d&&(d=0);null==c&&(c=0);null==g&&(g=0);null==f&&(f=0);b=V._pool.get();null==d&&(d=0);null==c&&(c=0);null==g&&(g=0);null==f&&(f=0);b.x=f;b.y=g;b.width=c;b.height=d;b._inPool=!1;a.set_clipRect(b)}},recycle:function(a,b,c,d){null==d&&(d=!0);null==c&&(c=!1);return this.group.recycle(a,b,c,d)},remove:function(a,b){null==b&&(b=!1);a.set_x(a.x-
this.x);a.set_y(a.y-this.y);a.set_cameras(null);return this.group.remove(a,b)},replace:function(a,b){this.preAdd(b);return this.group.replace(a,b)},sort:function(a,b){null==b&&(b=-1);null==b&&(b=-1);var c=b;this.group.members.sort(function(b,f){return a(c,b,f)})},getFirstAvailable:function(a,b){null==b&&(b=!1);return this.group.getFirstAvailable(a,b)},getFirstNull:function(){return this.group.getFirstNull()},getFirstExisting:function(){return this.group.getFirstExisting()},getFirstAlive:function(){return this.group.getFirstAlive()},
getFirstDead:function(){return this.group.getFirstDead()},countLiving:function(){return this.group.countLiving()},countDead:function(){return this.group.countDead()},getRandom:function(a,b){null==b&&(b=0);null==a&&(a=0);return this.group.getRandom(a,b)},iterator:function(a){return new Mj(this.group.members,a)},forEach:function(a,b){null==b&&(b=!1);this.group.forEach(a,b)},forEachAlive:function(a,b){null==b&&(b=!1);this.group.forEachAlive(a,b)},forEachDead:function(a,b){null==b&&(b=!1);this.group.forEachDead(a,
b)},forEachExists:function(a,b){null==b&&(b=!1);this.group.forEachExists(a,b)},forEachOfType:function(a,b,c){null==c&&(c=!1);this.group.forEachOfType(a,b,c)},clear:function(){this.group.clear()},kill:function(){this._skipTransformChildren=!0;R.prototype.kill.call(this);this._skipTransformChildren=!1;this.group.kill()},revive:function(){this._skipTransformChildren=!0;R.prototype.revive.call(this);this._skipTransformChildren=!1;this.group.revive()},reset:function(a,b){for(var c=0,d=this.group.members;c<
d.length;){var f=d[c];++c;null!=f&&f.reset(f.x+a-this.x,f.y+b-this.y)}this._skipTransformChildren=!0;this.wasTouching=this.touching=0;this.set_x(a);this.set_y(b);a=this.velocity;a.set_x(0);a.set_y(0);R.prototype.revive.call(this);this._skipTransformChildren=!1},setPosition:function(a,b){null==b&&(b=0);null==a&&(a=0);var c=a-this.x,d=b-this.y;this.multiTransformChildren_Float([q(this,this.xTransform),q(this,this.yTransform)],[c,d]);this._skipTransformChildren=!0;this.set_x(a);this.set_y(b);this._skipTransformChildren=
!1},set_camera:function(a){this.get_camera()!=a&&this.transformChildren_flixel_FlxCamera(q(this,this.cameraTransform),a);return R.prototype.set_camera.call(this,a)},set_cameras:function(a){this._cameras!=a&&this.transformChildren_Array_flixel_FlxCamera(q(this,this.camerasTransform),a);return R.prototype.set_cameras.call(this,a)},set_exists:function(a){this.exists!=a&&this.transformChildren_Bool(q(this,this.existsTransform),a);return R.prototype.set_exists.call(this,a)},set_visible:function(a){this.exists&&
this.visible!=a&&this.transformChildren_Bool(q(this,this.visibleTransform),a);return R.prototype.set_visible.call(this,a)},set_active:function(a){this.exists&&this.active!=a&&this.transformChildren_Bool(q(this,this.activeTransform),a);return R.prototype.set_active.call(this,a)},set_alive:function(a){this.alive!=a&&this.transformChildren_Bool(q(this,this.aliveTransform),a);return R.prototype.set_alive.call(this,a)},set_x:function(a){this.exists&&this.x!=a&&this.transformChildren_Float(q(this,this.xTransform),
a-this.x);return this.x=a},set_y:function(a){this.exists&&this.y!=a&&this.transformChildren_Float(q(this,this.yTransform),a-this.y);return this.y=a},set_angle:function(a){this.exists&&this.angle!=a&&this.transformChildren_Float(q(this,this.angleTransform),a-this.angle);return this.angle=a},set_alpha:function(a){a=0>a?0:a;a=1<a?1:a;if(this.exists&&this.alpha!=a){var b=0<this.alpha?a/this.alpha:0;this.directAlpha||0==this.alpha?this.transformChildren_Float(q(this,this.directAlphaTransform),a):this.transformChildren_Float(q(this,
this.alphaTransform),b)}return this.alpha=a},set_facing:function(a){this.exists&&this.facing!=a&&this.transformChildren_Int(q(this,this.facingTransform),a);return this.facing=a},set_flipX:function(a){this.exists&&this.flipX!=a&&this.transformChildren_Bool(q(this,this.flipXTransform),a);return this.flipX=a},set_flipY:function(a){this.exists&&this.flipY!=a&&this.transformChildren_Bool(q(this,this.flipYTransform),a);return this.flipY=a},set_moves:function(a){this.exists&&this.moves!=a&&this.transformChildren_Bool(q(this,
this.movesTransform),a);return this.moves=a},set_immovable:function(a){this.exists&&this.immovable!=a&&this.transformChildren_Bool(q(this,this.immovableTransform),a);return this.immovable=a},set_solid:function(a){this.exists&&0<(this.allowCollisions&4369)!=a&&this.transformChildren_Bool(q(this,this.solidTransform),a);return R.prototype.set_solid.call(this,a)},set_color:function(a){this.exists&&this.color!=a&&this.transformChildren_Int(q(this,this.gColorTransform),a);return this.color=a},set_blend:function(a){this.exists&&
this.blend!=a&&this.transformChildren_openfl_display_BlendMode(q(this,this.blendTransform),a);return this.blend=a},set_clipRect:function(a){this.exists&&this.transformChildren_flixel_math_FlxRect(q(this,this.clipRectTransform),a);return R.prototype.set_clipRect.call(this,a)},set_pixelPerfectRender:function(a){this.exists&&this.pixelPerfectRender!=a&&this.transformChildren_Bool(q(this,this.pixelPerfectTransform),a);return R.prototype.set_pixelPerfectRender.call(this,a)},set_width:function(a){return a},
get_width:function(){return 0==this.group.length?0:this.findMaxXHelper()-this.findMinXHelper()},findMinX:function(){return 0==this.group.length?this.x:this.findMinXHelper()},findMinXHelper:function(){for(var a=Infinity,b=0,c=this.group.members;b<c.length;){var d=c[b];++b;null!=d&&(d=4==d.flixelType?d.findMinX():d.x,d<a&&(a=d))}return a},findMaxX:function(){return 0==this.group.length?this.x:this.findMaxXHelper()},findMaxXHelper:function(){for(var a=-Infinity,b=0,c=this.group.members;b<c.length;){var d=
c[b];++b;null!=d&&(d=4==d.flixelType?d.findMaxX():d.x+d.get_width(),d>a&&(a=d))}return a},set_height:function(a){return a},get_height:function(){return 0==this.group.length?0:this.findMaxYHelper()-this.findMinYHelper()},findMinY:function(){return 0==this.group.length?this.y:this.findMinYHelper()},findMinYHelper:function(){for(var a=Infinity,b=0,c=this.group.members;b<c.length;){var d=c[b];++b;null!=d&&(d=4==d.flixelType?d.findMinY():d.y,d<a&&(a=d))}return a},findMaxY:function(){return 0==this.group.length?
this.y:this.findMaxYHelper()},findMaxYHelper:function(){for(var a=-Infinity,b=0,c=this.group.members;b<c.length;){var d=c[b];++b;null!=d&&(d=4==d.flixelType?d.findMaxY():d.y+d.get_height(),d>a&&(a=d))}return a},get_length:function(){return this.group.length},get_maxSize:function(){return this.group.maxSize},set_maxSize:function(a){return this.group.set_maxSize(a)},get_members:function(){return this.group.members},xTransform:function(a,b){a.set_x(a.x+b)},yTransform:function(a,b){a.set_y(a.y+b)},angleTransform:function(a,
b){a.set_angle(a.angle+b)},alphaTransform:function(a,b){0!=a.alpha||0==b?a.set_alpha(a.alpha*b):a.set_alpha(1/b)},directAlphaTransform:function(a,b){a.set_alpha(b)},facingTransform:function(a,b){a.set_facing(b)},flipXTransform:function(a,b){a.set_flipX(b)},flipYTransform:function(a,b){a.set_flipY(b)},movesTransform:function(a,b){a.set_moves(b)},pixelPerfectTransform:function(a,b){a.set_pixelPerfectRender(b)},gColorTransform:function(a,b){a.set_color(b)},blendTransform:function(a,b){a.set_blend(b)},
immovableTransform:function(a,b){a.set_immovable(b)},visibleTransform:function(a,b){a.set_visible(b)},activeTransform:function(a,b){a.set_active(b)},solidTransform:function(a,b){a.set_solid(b)},aliveTransform:function(a,b){a.set_alive(b)},existsTransform:function(a,b){a.set_exists(b)},cameraTransform:function(a,b){a.set_camera(b)},camerasTransform:function(a,b){a.set_cameras(b)},offsetTransform:function(a,b){a=a.offset;var c=b.x,d=b.y;null==d&&(d=0);null==c&&(c=0);a.set_x(c);a.set_y(d);b._weak&&b.put()},
originTransform:function(a,b){a=a.origin;var c=b.x,d=b.y;null==d&&(d=0);null==c&&(c=0);a.set_x(c);a.set_y(d);b._weak&&b.put()},scaleTransform:function(a,b){a=a.scale;var c=b.x,d=b.y;null==d&&(d=0);null==c&&(c=0);a.set_x(c);a.set_y(d);b._weak&&b.put()},scrollFactorTransform:function(a,b){a=a.scrollFactor;var c=b.x,d=b.y;null==d&&(d=0);null==c&&(c=0);a.set_x(c);a.set_y(d);b._weak&&b.put()},clipRectTransform:function(a,b){if(null==b)a.set_clipRect(null);else{var c=b.x-a.x+this.x,d=b.y-a.y+this.y,f=b.width,
g=b.height;null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);b=V._pool.get();null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);b.x=c;b.y=d;b.width=f;b.height=g;b._inPool=!1;a.set_clipRect(b)}},offsetCallback:function(a){this.transformChildren_flixel_math_FlxPoint(q(this,this.offsetTransform),a)},originCallback:function(a){this.transformChildren_flixel_math_FlxPoint(q(this,this.originTransform),a)},scaleCallback:function(a){this.transformChildren_flixel_math_FlxPoint(q(this,this.scaleTransform),
a)},scrollFactorCallback:function(a){this.transformChildren_flixel_math_FlxPoint(q(this,this.scrollFactorTransform),a)},loadGraphicFromSprite:function(a){return this},loadGraphic:function(a,b,c,d,f,g){return this},loadRotatedGraphic:function(a,b,c,d,f,g){return this},makeGraphic:function(a,b,c,d,f){return this},set_pixels:function(a){return a},set_frame:function(a){return a},get_pixels:function(){return null},get__sprites:function(){return this.group.members},set_group:function(a){return this.group=
a},calcFrame:function(a){},resetHelpers:function(){},stamp:function(a,b,c){},set_frames:function(a){return a},updateColorTransform:function(){},__class__:hb,__properties__:x(R.prototype.__properties__,{get__sprites:"get__sprites",set_maxSize:"set_maxSize",get_maxSize:"get_maxSize",get_length:"get_length",get_members:"get_members",set_group:"set_group"})});var Ia=function(a,b,c){hb.call(this,a,b,c)};h["flixel.group.FlxTypedSpriteContainer"]=Ia;Ia.__name__="flixel.group.FlxTypedSpriteContainer";Ia.__super__=
hb;Ia.prototype=x(hb.prototype,{initGroup:function(a){this.group=new Nj(this,a)},draw:function(){var a=jb._defaultCameras;null!=this._cameras&&(jb._defaultCameras=this._cameras);hb.prototype.draw.call(this);jb._defaultCameras=a},set_group:function(a){throw J.thrown("FlxSpriteContainer.group cannot be set in FlxSpriteContainers");},set_camera:function(a){this._cameras=null==a?null:[a];return a},set_cameras:function(a){return this._cameras=a},__class__:Ia});var ja=function(a){hb.call(this,void 0,void 0,
void 0);this.depth=a;this.scrollFactor.set_y(1-a/5);this.depthShader=new Vb(1E3*a)};h.CreatureLayer=ja;ja.__name__="CreatureLayer";ja.__super__=Ia;ja.prototype=x(Ia.prototype,{depth:null,depthShader:null,add:function(a){var b=1-this.depth/4,c=a.scale,d=b;null==b&&(b=0);null==d&&(d=0);c.set_x(d);c.set_y(b);a.shader=this.depthShader;return Ia.prototype.add.call(this,a)},__class__:ja});var T=function(a,b,c){hb.call(this,a,b,void 0);this.thousands=new cd(0,0,0);this.hundreds=new cd(7,0,0);this.tens=new cd(14,
0,0);this.ones=new cd(21,0,0);this.add(this.thousands);this.add(this.hundreds);this.add(this.tens);this.add(this.ones)};h.DepthGauge=T;T.__name__="DepthGauge";T.__super__=Ia;T.prototype=x(Ia.prototype,{thousands:null,hundreds:null,tens:null,ones:null,set:function(a){a=Math.max(Math.min(a,9999),0);this.thousands.set(a/1E3|0);this.hundreds.set(a%1E3/100|0);this.tens.set(a%100/10|0);this.ones.set(a%10|0)},__class__:T});var Ic=function(a){this.byteCode=a;this.precisionHint=1;this.__glSourceDirty=!0;this.__numPasses=
1;this.__data=Oo._new(a)};h["openfl.display.Shader"]=Ic;Ic.__name__="openfl.display.Shader";Ic.prototype={byteCode:null,glProgram:null,precisionHint:null,program:null,__alpha: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);var f=c.getShaderInfoLog(d),g=null!=f&&""!=O.trim(f),k=c.getShaderParameter(d,c.COMPILE_STATUS);if(g||0==k)b=(0==k?"Error":
"Info")+(b==c.VERTEX_SHADER?" compiling vertex shader":" compiling fragment shader"),b=b+("\n"+f)+("\n"+a),0==k?Pa.error(b,{fileName:"openfl/display/Shader.hx",lineNumber:337,className:"openfl.display.Shader",methodName:"__createGLShader"}):g&&Pa.debug(b,{fileName:"openfl/display/Shader.hx",lineNumber:338,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 f=0,g=this.__paramFloat;f<g.length;){var k=g[f];++f;if(-1<k.name.indexOf("Position")&&O.startsWith(k.name,"openfl_")){c.bindAttribLocation(b,0,k.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),Pa.error(c,{fileName:"openfl/display/Shader.hx",lineNumber:371,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 f=d[c];++c;f.__disableGL(this.__context,b);++b;if(b==a.MAX_TEXTURE_IMAGE_UNITS)break}c=0;for(d=this.__paramBool;c<d.length;)b=d[c],++c,b.__disableGL(this.__context);c=0;for(d=this.__paramFloat;c<d.length;)b=d[c],++c,b.__disableGL(this.__context);c=0;for(d=this.__paramInt;c<d.length;)b=d[c],++c,b.__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 f=d[c];++c;b.uniform1i(f.index,a);++a}"opengl"==this.__context.__context.type&&0<a&&b.enable(b.TEXTURE_2D)},__init:function(){null==this.__data&&(this.__data=Oo._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=1==this.precisionHint?"precision mediump float;\n":
"precision lowp float;\n",c=b+this.get_glVertexSource();b+=this.get_glFragmentSource();var d=c+b;Object.prototype.hasOwnProperty.call(this.__context.__programs.h,d)?this.program=this.__context.__programs.h[d]:(this.program=this.__context.createProgram(1),this.program.__glProgram=this.__createGLProgram(c,b),this.__context.__programs.h[d]=this.program);if(null!=this.program){this.glProgram=this.program.__glProgram;c=0;for(b=this.__inputBitmapData;c<b.length;)d=b[c],++c,d.index=d.__isUniform?a.getUniformLocation(this.glProgram,
d.name):a.getAttribLocation(this.glProgram,d.name);c=0;for(b=this.__paramBool;c<b.length;)d=b[c],++c,d.index=d.__isUniform?a.getUniformLocation(this.glProgram,d.name):a.getAttribLocation(this.glProgram,d.name);c=0;for(b=this.__paramFloat;c<b.length;)d=b[c],++c,d.index=d.__isUniform?a.getUniformLocation(this.glProgram,d.name):a.getAttribLocation(this.glProgram,d.name);c=0;for(b=this.__paramInt;c<b.length;)d=b[c],++c,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 E("uniform ([A-Za-z0-9]+) ([A-Za-z0-9_]+)",""):new E("attribute ([A-Za-z0-9]+) ([A-Za-z0-9_]+)","");d.matchSub(a,c);){var f=d.matched(1);var g=d.matched(2);if(!O.startsWith(g,"gl_")){c="uniform"==b;if(O.startsWith(f,"sampler")){f=new Oj;f.name=g;f.__isUniform=c;this.__inputBitmapData.push(f);switch(g){case "bitmap":this.__bitmap=f;break;case "openfl_Texture":this.__texture=f}this.__data[g]=f;this.__isGenerated&&(this[g]=f)}else if(!Object.prototype.hasOwnProperty.call(this.__data,
g)||null==la.field(this.__data,g)){switch(f){case "bool":var k=0;break;case "bvec2":k=1;break;case "bvec3":k=2;break;case "bvec4":k=3;break;case "dvec2":case "vec2":k=5;break;case "dvec3":case "vec3":k=6;break;case "dvec4":case "vec4":k=7;break;case "double":case "float":k=4;break;case "mat2":case "mat2x2":k=12;break;case "mat2x3":k=13;break;case "mat2x4":k=14;break;case "mat3x2":k=15;break;case "mat3":case "mat3x3":k=16;break;case "mat3x4":k=17;break;case "mat4x2":k=18;break;case "mat4x3":k=19;break;
case "mat4":case "mat4x4":k=20;break;case "int":case "uint":k=8;break;case "ivec2":case "uvec2":k=9;break;case "ivec3":case "uvec3":k=10;break;case "ivec4":case "uvec4":k=11;break;default:k=null}switch(k){case 1:case 5:case 9:f=2;break;case 2:case 6:case 10:f=3;break;case 3:case 7:case 11:case 12:f=4;break;case 16:f=9;break;case 20:f=16;break;default:f=1}switch(k){case 12:var l=2;break;case 16:l=3;break;case 20:l=4;break;default:l=1}switch(k){case 0:case 1:case 2:case 3:var m=new Qh;m.set_name(g);
m.type=k;m.__arrayLength=l;m.__isBool=!0;m.__isUniform=c;m.__length=f;this.__paramBool.push(m);"openfl_HasColorTransform"==g&&(this.__hasColorTransform=m);this.__data[g]=m;this.__isGenerated&&(this[g]=m);break;case 8:case 9:case 10:case 11:m=new Qh;m.set_name(g);m.type=k;m.__arrayLength=l;m.__isInt=!0;m.__isUniform=c;m.__length=f;this.__paramInt.push(m);this.__data[g]=m;this.__isGenerated&&(this[g]=m);break;default:m=new Qh;m.set_name(g);m.type=k;m.__arrayLength=l;0<l&&(k=l*l,k=null!=k?new Float32Array(k):
null,m.__uniformMatrix=k);m.__isFloat=!0;m.__isUniform=c;m.__length=f;this.__paramFloat.push(m);if(O.startsWith(g,"openfl_"))switch(g){case "openfl_Alpha":this.__alpha=m;break;case "openfl_ColorMultiplier":this.__colorMultiplier=m;break;case "openfl_ColorOffset":this.__colorOffset=m;break;case "openfl_Matrix":this.__matrix=m;break;case "openfl_Position":this.__position=m;break;case "openfl_TextureCoord":this.__textureCoord=m;break;case "openfl_TextureSize":this.__textureSize=m}this.__data[g]=m;this.__isGenerated&&
(this[g]=m)}}g=d.matchedPos();c=g.pos+g.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}b=0;for(c=this.__paramBool;b<c.length;)a=c[b],++b,a.__updateGL(this.__context);b=0;for(c=this.__paramFloat;b<c.length;)a=c[b],++b,a.__updateGL(this.__context);b=0;for(c=this.__paramInt;b<
c.length;)a=c[b],++b,a.__updateGL(this.__context)},__updateGLFromBuffer:function(a,b){for(var c=0,d,f,g,k,l,m=0,z=a.inputCount;m<z;)l=m++,d=a.inputRefs[l],f=a.inputs[l],g=a.inputFilter[l],k=a.inputMipFilter[l],l=a.inputWrap[l],null!=f&&(d.__updateGL(this.__context,c,f,g,k,l),++c);m=this.__context.gl;0<a.paramDataLength?(null==a.paramDataBuffer&&(a.paramDataBuffer=m.createBuffer()),this.__context.__bindGLArrayBuffer(a.paramDataBuffer),ec.bufferData(m,m.ARRAY_BUFFER,a.paramData,m.DYNAMIC_DRAW)):this.__context.__bindGLArrayBuffer(null);
f=d=c=0;g=a.paramBoolCount;k=a.paramFloatCount;var h=a.paramData,p=null,sb=null,r=null;m=0;for(z=a.paramCount;m<z;){l=m++;var w=!1;if(l<g){var u=a.paramRefs_Bool[c];for(var n=0,t=a.overrideBoolCount;n<t;){var A=n++;if(u.name==a.overrideBoolNames[A]){p=a.overrideBoolValues[A];w=!0;break}}w?u.__updateGL(this.__context,p):u.__updateGLFromBuffer(this.__context,h,a.paramPositions[l],a.paramLengths[l],b);++c}else if(l<g+k){u=a.paramRefs_Float[d];n=0;for(t=a.overrideFloatCount;n<t;)if(A=n++,u.name==a.overrideFloatNames[A]){sb=
a.overrideFloatValues[A];w=!0;break}w?u.__updateGL(this.__context,sb):u.__updateGLFromBuffer(this.__context,h,a.paramPositions[l],a.paramLengths[l],b);++d}else{u=a.paramRefs_Int[f];n=0;for(t=a.overrideIntCount;n<t;)if(A=n++,u.name==a.overrideIntNames[A]){r=a.overrideIntValues[A];w=!0;break}w?u.__updateGL(this.__context,r):u.__updateGLFromBuffer(this.__context,h,a.paramPositions[l],a.paramLengths[l],b);++f}}},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__:Ic,__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 Qb=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}");
Ic.call(this,a);this.__isGenerated=!0;this.__initGL()};h["openfl.display.GraphicsShader"]=Qb;Qb.__name__="openfl.display.GraphicsShader";Qb.__super__=Ic;Qb.prototype=x(Ic.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__:Qb});var wc=function(){null==this.__glFragmentSource&&(this.__glFragmentSource="\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 bool openfl_HasColorTransform;\n\t\tuniform vec2 openfl_TextureSize;\n\t\tuniform sampler2D bitmap;\n\n\t\tuniform bool hasTransform;\n\t\tuniform bool hasColorTransform;\n\n\t\tvec4 flixel_texture2D(sampler2D bitmap, vec2 coord)\n\t\t{\n\t\t\tvec4 color = texture2D(bitmap, coord);\n\t\t\tif (!hasTransform)\n\t\t\t{\n\t\t\t\treturn color;\n\t\t\t}\n\n\t\t\tif (color.a == 0.0)\n\t\t\t{\n\t\t\t\treturn vec4(0.0, 0.0, 0.0, 0.0);\n\t\t\t}\n\n\t\t\tif (!hasColorTransform)\n\t\t\t{\n\t\t\t\treturn color * openfl_Alphav;\n\t\t\t}\n\n\t\t\tcolor = vec4(color.rgb / color.a, color.a);\n\n\t\t\tcolor = clamp(openfl_ColorOffsetv + (color * openfl_ColorMultiplierv), 0.0, 1.0);\n\n\t\t\tif (color.a > 0.0)\n\t\t\t{\n\t\t\t\treturn vec4(color.rgb * color.a * openfl_Alphav, color.a * openfl_Alphav);\n\t\t\t}\n\t\t\treturn vec4(0.0, 0.0, 0.0, 0.0);\n\t\t}\n\t\n\n\t\tvoid main(void)\n\t\t{\n\t\t\tgl_FragColor = flixel_texture2D(bitmap, openfl_TextureCoordv);\n\t\t}");
null==this.__glVertexSource&&(this.__glVertexSource="\n\t\tattribute 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\n\t\tattribute float alpha;\n\t\tattribute vec4 colorMultiplier;\n\t\tattribute vec4 colorOffset;\n\t\tuniform bool hasColorTransform;\n\n\t\tvoid main(void)\n\t\t{\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\n\t\t\topenfl_Alphav = openfl_Alpha * alpha;\n\n\t\t\tif (hasColorTransform)\n\t\t\t{\n\t\t\t\topenfl_ColorOffsetv = colorOffset / 255.0;\n\t\t\t\topenfl_ColorMultiplierv = colorMultiplier;\n\t\t\t}\n\t\t}");
Qb.call(this);this.__isGenerated=!0;this.__initGL()};h["flixel.graphics.tile.FlxGraphicsShader"]=wc;wc.__name__="flixel.graphics.tile.FlxGraphicsShader";wc.__super__=Qb;wc.prototype=x(Qb.prototype,{alpha:null,colorMultiplier:null,colorOffset:null,hasColorTransform:null,hasTransform:null,__class__:wc});var Vb=function(a){null==a&&(a=0);null==this.__glFragmentSource&&(this.__glFragmentSource="\n    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\tuniform bool hasTransform;\n\t\tuniform bool hasColorTransform;\n\n\t\tvec4 flixel_texture2D(sampler2D bitmap, vec2 coord)\n\t\t{\n\t\t\tvec4 color = texture2D(bitmap, coord);\n\t\t\tif (!hasTransform)\n\t\t\t{\n\t\t\t\treturn color;\n\t\t\t}\n\n\t\t\tif (color.a == 0.0)\n\t\t\t{\n\t\t\t\treturn vec4(0.0, 0.0, 0.0, 0.0);\n\t\t\t}\n\n\t\t\tif (!hasColorTransform)\n\t\t\t{\n\t\t\t\treturn color * openfl_Alphav;\n\t\t\t}\n\n\t\t\tcolor = vec4(color.rgb / color.a, color.a);\n\n\t\t\tcolor = clamp(openfl_ColorOffsetv + (color * openfl_ColorMultiplierv), 0.0, 1.0);\n\n\t\t\tif (color.a > 0.0)\n\t\t\t{\n\t\t\t\treturn vec4(color.rgb * color.a * openfl_Alphav, color.a * openfl_Alphav);\n\t\t\t}\n\t\t\treturn vec4(0.0, 0.0, 0.0, 0.0);\n\t\t}\n\t\n\n\n    #define MAX_DEPTH 9200.0\n\n    uniform float depth;\n\n    float easeInQuad(float x) {\n      return x * x;\n    }\n\n    float easeInCubic(float x) {\n      return x * x * x;\n    }\n\n    float easeInExpo(float x) {\n      if (x == 0.0) {\n        return 0.0;\n      }\n\n      return pow(2.0, 10.0 * x - 10.0);\n    }\n\n    void main()\n    {\n        vec2 st = openfl_TextureCoordv.xy;  // Note, already normalized\n\n        vec4 color = flixel_texture2D(bitmap, st);\n        float normalizedDepth = depth / MAX_DEPTH;\n\n        float r = 1.0 - easeInQuad(normalizedDepth);\n        float g = 1.0 - easeInCubic(normalizedDepth);\n        float b = 1.0 - easeInExpo(normalizedDepth);\n\n        gl_FragColor = color * vec4(0.8 * r, 0.9 * g, 1.0 * b, color.a);\n    }\n    ");
null==this.__glVertexSource&&(this.__glVertexSource="\n\t\tattribute 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\n\t\tattribute float alpha;\n\t\tattribute vec4 colorMultiplier;\n\t\tattribute vec4 colorOffset;\n\t\tuniform bool hasColorTransform;\n\n\t\tvoid main(void)\n\t\t{\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\n\t\t\topenfl_Alphav = openfl_Alpha * alpha;\n\n\t\t\tif (hasColorTransform)\n\t\t\t{\n\t\t\t\topenfl_ColorOffsetv = colorOffset / 255.0;\n\t\t\t\topenfl_ColorMultiplierv = colorMultiplier;\n\t\t\t}\n\t\t}");
wc.call(this);this.depth.value=[a];this.__isGenerated=!0;this.__initGL()};h.DepthShader=Vb;Vb.__name__="DepthShader";Vb.__super__=wc;Vb.prototype=x(wc.prototype,{update:function(a){},setDepth:function(a){this.depth.value[0]=a},depth:null,__class__:Vb});var E=function(a,b){this.r=new RegExp(a,b.split("u").join(""))};h.EReg=E;E.__name__="EReg";E.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 J.thrown("EReg::matched");},matchedRight:function(){if(null==this.r.m)throw J.thrown("No string matched");var a=this.r.m.index+this.r.m[0].length;return y.substr(this.r.s,a,this.r.s.length-a)},matchedPos:function(){if(null==this.r.m)throw J.thrown("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){if(this.r.lastIndex=b,this.r.m=this.r.exec(0>c?a:y.substr(a,0,b+
c)),c=null!=this.r.m)this.r.s=a}else if(c=this.match(0>c?y.substr(a,b,null):y.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){var c=0,d="";do{if(c>=a.length)break;else if(!this.matchSub(a,c)){d+=M.string(y.substr(a,c,null));break}var f=this.matchedPos();d+=M.string(y.substr(a,c,f.pos-c));d+=M.string(b(this));0==f.len?(d+=M.string(y.substr(a,f.pos,1)),c=f.pos+1):c=f.pos+f.len}while(this.r.global);
!this.r.global&&0<c&&c<a.length&&(d+=M.string(y.substr(a,c,null)));return d},__class__:E};var Rb=function(){};h.GameData=Rb;Rb.__name__="GameData";Rb.getZonePixelLimits=function(){for(var a=[],b=0,c=0,d=Rb.Zones.length;c<d;){var f=c++,g=Rb.Zones[f];f=f+1<Rb.Zones.length?Rb.Zones[f+1]:null;g=b+((null==f?8740:f.depth)-g.depth)/g.depthMultiplier;a.push({min:b,max:g});b=g}return a};Rb.getZoneIndex=function(a){for(var b=0,c=Rb.Zones.length-1;b<c;){var d=b++;if(a<Rb.Zones[d+1].depth)return d}return Rb.Zones.length-
1};Rb.getZone=function(a){return Rb.Zones[Rb.getZoneIndex(a)]};Rb.getZoneIndexByY=function(a){for(var b=0,c=Rb.ZonePixelLimits.length;b<c;){var d=b++,f=Rb.ZonePixelLimits[d];if(a>=f.min&&a<f.max)return d}return-1};var y=function(){};h.HxOverrides=y;y.__name__="HxOverrides";y.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 a=
a.split(" "),b=a[0].split("-"),a=a[1].split(":"),new Date(b[0],b[1]-1,b[2],a[0],a[1],a[2]);default:throw J.thrown("Invalid date format : "+a);}};y.cca=function(a,b){a=a.charCodeAt(b);if(a==a)return a};y.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)};y.remove=function(a,b){b=a.indexOf(b);if(-1==b)return!1;a.splice(b,1);return!0};y.now=function(){return Date.now()};var Y=function(a,b){this.min=a;this.max=b};h.IntIterator=Y;Y.__name__=
"IntIterator";Y.prototype={min:null,max:null,hasNext:function(){return this.min<this.max},next:function(){return this.min++},__class__:Y};var le=function(){};h.Lambda=le;le.__name__="Lambda";le.array=function(a){var b=[];for(a=P(a);a.hasNext();){var c=a.next();b.push(c)}return b};le.count=function(a,b){var c=0;if(null==b)for(b=P(a);b.hasNext();)b.next(),++c;else for(a=P(a);a.hasNext();){var d=a.next();b(d)&&++c}return c};var yb=function(a){null==a&&(a=0);this.length=this._marker=0;Na.call(this);this.members=
[];this.set_maxSize(Math.abs(a)|0);this.flixelType=2};h["flixel.group.FlxTypedGroup"]=yb;yb.__name__="flixel.group.FlxTypedGroup";yb.resolveGroup=function(a){if(null!=a){if(2==a.flixelType)return a;if(4==a.flixelType)return a.group}return null};yb.resolveSelectionGroup=function(a){return yb.resolveGroup(a)};yb.__super__=Na;yb.prototype=x(Na.prototype,{members:null,maxSize:null,length:null,_memberAdded:null,_memberRemoved:null,_marker:null,destroy:function(){Na.prototype.destroy.call(this);ba.destroy(this._memberAdded);
ba.destroy(this._memberRemoved);if(null!=this.members){for(var a=this.length;0<a--;){var b=this.members.shift();null!=b&&b.destroy()}this.members=null}},update:function(a){for(var b=0,c=this.members;b<c.length;){var d=c[b];++b;null!=d&&d.exists&&d.active&&d.update(a)}},draw:function(){var a=jb._defaultCameras;null!=this._cameras&&(jb._defaultCameras=this._cameras);for(var b=0,c=this.members;b<c.length;){var d=c[b];++b;null!=d&&d.exists&&d.visible&&d.draw()}jb._defaultCameras=a},add:function(a){if(null==
a)return u.log.advanced("Cannot add a `null` object to a FlxGroup.",La.WARNING,!0),null;if(0<=this.members.indexOf(a))return a;var b=this.getFirstNull();if(-1!=b)return this.members[b]=a,b>=this.length&&(this.length=b+1),this.onMemberAdd(a),a;if(0<this.maxSize&&this.length>=this.maxSize)return a;this.members.push(a);this.length++;this.onMemberAdd(a);return a},insert:function(a,b){if(null==b)return u.log.advanced("Cannot insert a `null` object into a FlxGroup.",La.WARNING,!0),null;if(0<=this.members.indexOf(b))return b;
if(a<this.length&&null==this.members[a])return this.members[a]=b,this.onMemberAdd(b),b;if(0<this.maxSize&&this.length>=this.maxSize)return b;this.members.splice(a,0,b);this.length++;this.onMemberAdd(b);return b},recycle:function(a,b,c,d){null==d&&(d=!0);null==c&&(c=!1);if(0<this.maxSize){if(this.length<this.maxSize)return null!=b?this.add(b()):null!=a?this.add(w.createInstance(a,[])):null;c=this.members[this._marker++];this._marker>=this.maxSize&&(this._marker=0);d&&c.revive();return c}c=this.getFirstAvailable(a,
c);return null!=c?(d&&c.revive(),c):null!=b?this.add(b()):null!=a?this.add(w.createInstance(a,[])):null},remove:function(a,b){null==b&&(b=!1);if(null==this.members)return null;var c=this.members.indexOf(a);if(0>c)return null;b?(this.members.splice(c,1),this.length--):this.members[c]=null;this.onMemberRemove(a);return a},replace:function(a,b){var c=this.members.indexOf(a);if(0>c)return null;this.members[c]=b;this.onMemberRemove(a);this.onMemberAdd(b);return b},sort:function(a,b){null==b&&(b=-1);var c=
b;this.members.sort(function(b,f){return a(c,b,f)})},getFirst:function(a){for(var b=null,c=0,d=this.members;c<d.length;){var f=d[c];++c;if(null!=f&&a(f)){b=f;break}}return b},getFirstHelper:function(a){for(var b=null,c=0,d=this.members;c<d.length;){var f=d[c];++c;if(null!=f&&a(f)){b=f;break}}return b},getLast:function(a){for(var b=null,c=this.members.length;0<c--;){var d=this.members[c];if(null!=d&&a(d)){b=d;break}}return b},getFirstIndex:function(a){for(var b=-1,c=0,d=this.members;c<d.length;){var f=
d[c],g=c++;if(null!=f&&a(f)){b=g;break}}return b},getLastIndex:function(a){for(var b=-1,c=this.members.length;0<c--;){var d=this.members[c];if(null!=d&&a(d)){b=c;break}}return b},any:function(a){for(var b=0,c=this.members;b<c.length;){var d=c[b];++b;if(null!=d&&a(d))return!0}return!1},every:function(a){for(var b=0,c=this.members;b<c.length;){var d=c[b];++b;if(null!=d&&!a(d))return!1}return!0},getFirstAvailable:function(a,b){null==b&&(b=!1);for(var c=0,d=this.members;c<d.length;){var f=d[c];++c;if(!(null==
f||f.exists||null!=a&&!na.__instanceof(f,a)||b&&na.getClass(f).__name__!=a.__name__))return f}return null},getFirstNull:function(){return this.members.indexOf(null)},getFirstExisting:function(){for(var a=null,b=0,c=this.members;b<c.length;){var d=c[b];++b;if(null!=d&&d.exists){a=d;break}}return a},getFirstAlive:function(){for(var a=null,b=0,c=this.members;b<c.length;){var d=c[b];++b;if(null!=d&&d.exists&&d.alive){a=d;break}}return a},getFirstDead:function(){for(var a=null,b=0,c=this.members;b<c.length;){var d=
c[b];++b;if(null!=d&&!d.alive){a=d;break}}return a},countLiving:function(){for(var a=-1,b=0,c=this.members;b<c.length;){var d=c[b];++b;null!=d&&(0>a&&(a=0),d.exists&&d.alive&&++a)}return a},countDead:function(){for(var a=-1,b=0,c=this.members;b<c.length;){var d=c[b];++b;null!=d&&(0>a&&(a=0),d.alive||++a)}return a},getRandom:function(a,b){null==b&&(b=0);null==a&&(a=0);0>a&&(a=0);0>=b&&(b=this.length);return u.random.getObject_flixel_group_FlxTypedGroup_T(this.members,null,a,b)},clear:function(){this.length=
0;if(null!=this._memberRemoved)for(var a=0,b=this.members;a<b.length;){var c=b[a];++a;this.onMemberRemove(c)}Hd.clearArray(this.members)},killMembers:function(){for(var a=0,b=this.members;a<b.length;){var c=b[a];++a;null!=c&&c.exists&&c.kill()}},kill:function(){this.killMembers();Na.prototype.kill.call(this)},reviveMembers:function(){for(var a=0,b=this.members;a<b.length;){var c=b[a];++a;null==c||c.exists||c.revive()}},revive:function(){this.reviveMembers();Na.prototype.revive.call(this)},iterator:function(a){return new Mj(this.members,
a)},keyValueIterator:function(){return new dm(this.members)},forEach:function(a,b){null==b&&(b=!1);for(var c=0,d=this.members;c<d.length;){var f=d[c];++c;if(null!=f){if(b){var g=yb.resolveGroup(f);null!=g&&g.forEach(a,b)}a(f)}}},forEachAlive:function(a,b){null==b&&(b=!1);for(var c=0,d=this.members;c<d.length;){var f=d[c];++c;if(null!=f&&f.exists&&f.alive){if(b){var g=yb.resolveGroup(f);null!=g&&g.forEachAlive(a,b)}a(f)}}},forEachDead:function(a,b){null==b&&(b=!1);for(var c=0,d=this.members;c<d.length;){var f=
d[c];++c;if(null!=f&&!f.alive){if(b){var g=yb.resolveGroup(f);null!=g&&g.forEachDead(a,b)}a(f)}}},forEachExists:function(a,b){null==b&&(b=!1);for(var c=0,d=this.members;c<d.length;){var f=d[c];++c;if(null!=f&&f.exists){if(b){var g=yb.resolveGroup(f);null!=g&&g.forEachExists(a,b)}a(f)}}},forEachOfType:function(a,b,c){null==c&&(c=!1);for(var d=0,f=this.members;d<f.length;){var g=f[d];++d;if(null!=g){if(c){var k=yb.resolveGroup(g);null!=k&&k.forEachOfType(a,b,c)}na.__instanceof(g,a)&&b(g)}}},set_maxSize:function(a){this.maxSize=
Math.abs(a)|0;this._marker>=this.maxSize&&(this._marker=0);if(0==this.maxSize||null==this.members||this.maxSize>=this.length)return this.maxSize;for(;this.length>this.maxSize;)a=this.members.splice(this.maxSize-1,1)[0],null!=a&&(this.onMemberRemove(a),a.destroy()),this.length--;return this.maxSize},onMemberAdd:function(a){null!=this._memberAdded&&this._memberAdded.dispatch(a)},onMemberRemove:function(a){null!=this._memberRemoved&&this._memberRemoved.dispatch(a)},get_memberAdded:function(){null==this._memberAdded&&
(this._memberAdded=new md);return this._memberAdded},get_memberRemoved:function(){null==this._memberRemoved&&(this._memberRemoved=new md);return this._memberRemoved},__class__:yb,__properties__:x(Na.prototype.__properties__,{get_memberRemoved:"get_memberRemoved",get_memberAdded:"get_memberAdded",set_maxSize:"set_maxSize"})});var Cd=function(a){null==a&&(a=0);yb.call(this,a)};h["flixel.group.FlxTypedContainer"]=Cd;Cd.__name__="flixel.group.FlxTypedContainer";Cd.__super__=yb;Cd.prototype=x(yb.prototype,
{onMemberAdd:function(a){null!=a.get_container()&&a.get_container().remove(a);a.container=this;yb.prototype.onMemberAdd.call(this,a)},onMemberRemove:function(a){a.container=null;yb.prototype.onMemberRemove.call(this,a)},__class__:Cd});var wb=function(){this._requestSubStateReset=!1;this.persistentDraw=this.destroySubStates=!0;this.persistentUpdate=!1;Cd.call(this,0)};h["flixel.FlxState"]=wb;wb.__name__="flixel.FlxState";wb.__super__=Cd;wb.prototype=x(Cd.prototype,{persistentUpdate:null,persistentDraw:null,
destroySubStates:null,_constructor:null,subState:null,_requestedSubState:null,_requestSubStateReset:null,_subStateOpened:null,_subStateClosed:null,create:function(){},draw:function(){(this.persistentDraw||null==this.subState)&&Cd.prototype.draw.call(this);null!=this.subState&&this.subState.draw()},openSubState:function(a){this._requestSubStateReset=!0;this._requestedSubState=a},closeSubState:function(){this._requestSubStateReset=!0},resetSubState:function(){null!=this.subState&&(null!=this.subState.closeCallback&&
this.subState.closeCallback(),null!=this._subStateClosed&&this._subStateClosed.dispatch(this.subState),this.destroySubStates&&this.subState.destroy());this.subState=this._requestedSubState;this._requestedSubState=null;if(null!=this.subState){if(!this.persistentUpdate)u.inputs.onStateSwitch();this.subState._parentState=this;this.subState._created||(this.subState._created=!0,this.subState.create());null!=this.subState.openCallback&&this.subState.openCallback();null!=this._subStateOpened&&this._subStateOpened.dispatch(this.subState)}},
destroy:function(){this._constructor=fg.fromMaker(function(){throw J.thrown("Attempting to resetState while the current state is destroyed");});ba.destroy(this._subStateOpened);ba.destroy(this._subStateClosed);null!=this.subState&&(this.subState.destroy(),this.subState=null);Cd.prototype.destroy.call(this)},switchTo:function(a){return!0},startOutro:function(a){a()},onFocusLost:function(){},onFocus:function(){},onResize:function(a,b){},tryUpdate:function(a){(this.persistentUpdate||null==this.subState)&&
this.update(a);this._requestSubStateReset&&(this._requestSubStateReset=!1,this.resetSubState());null!=this.subState&&this.subState.tryUpdate(a)},get_bgColor:function(){return u.cameras.get_bgColor()},set_bgColor:function(a){return u.cameras.set_bgColor(a)},get_subStateOpened:function(){null==this._subStateOpened&&(this._subStateOpened=new md);return this._subStateOpened},get_subStateClosed:function(){null==this._subStateClosed&&(this._subStateClosed=new md);return this._subStateClosed},__class__:wb,
__properties__:x(Cd.prototype.__properties__,{get_subStateClosed:"get_subStateClosed",get_subStateOpened:"get_subStateOpened",set_bgColor:"set_bgColor",get_bgColor:"get_bgColor"})});var vf=function(a){null==a&&(a=0);this._created=!1;wb.call(this);this.openCallback=this.closeCallback=null;u.renderTile&&(this._bgSprite=new Pj);this.set_bgColor(a)};h["flixel.FlxSubState"]=vf;vf.__name__="flixel.FlxSubState";vf.__super__=wb;vf.prototype=x(wb.prototype,{openCallback:null,closeCallback:null,_bgSprite:null,
_parentState:null,_bgColor:null,_created:null,draw:function(){if(u.renderBlit)for(var a=0,b=this.getCamerasLegacy();a<b.length;){var c=b[a];++a;c.fill(this._bgColor)}else null!=this._bgSprite&&this._bgSprite.visible&&this._bgSprite.draw();wb.prototype.draw.call(this)},destroy:function(){wb.prototype.destroy.call(this);this._parentState=this.openCallback=this.closeCallback=null;this._bgSprite=ba.destroy(this._bgSprite)},close:function(){null!=this._parentState&&this._parentState.subState==this&&this._parentState.closeSubState()},
get_bgColor:function(){return this._bgColor},set_bgColor:function(a){u.renderTile&&null!=this._bgSprite&&(this._bgSprite.set_alpha((a>>24&255)/255),this._bgSprite.set_visible(0<this._bgSprite.alpha),this._bgSprite.set_color(a&16777215));return this._bgColor=a},__class__:vf});var nd=function(a){vf.call(this);this.textString=a.text;this.sound=a.sound;this.soundDelay=a.soundDelay;this.soundVolume=a.soundVolume};h.LogEntryState=nd;nd.__name__="LogEntryState";nd.__super__=vf;nd.prototype=x(vf.prototype,
{bg:null,textString:null,text:null,sound:null,soundDelay:null,soundVolume:null,create:function(){var a=this;vf.prototype.create.call(this);rc.fromAngelCode("assets/fonts/notjamoldstyle11.png","assets/fonts/notjamoldstyle11.fnt");this.text=new ih(0,24,this.textString);this.text.set_color(855052);this.text.set_fieldWidth(160);this.text.set_wrap(wf.WORD(jh.LINE_WIDTH));var b=this.text,c=1;null==c&&(c=17);1!=c&&17!=c||b.set_x((u.width-b.get_width())/2);16!=c&&17!=c||b.set_y((u.height-b.get_height())/
2);this.bg=new R(0,0);this.bg.loadGraphic("assets/images/log_bg.png");this.add(this.bg);this.add(this.text);null!=this.sound&&Sc.delay(function(){u.sound.play(a.sound,null==a.soundVolume?1:a.soundVolume)},null==this.soundDelay?0:this.soundDelay|0)},update:function(a){vf.prototype.update.call(this,a);(u.keys.checkKeyArrayState(nb.DOWN_KEYS,2)||2==u.mouse._leftButton.current)&&this.close()},__class__:nd});var Lb=function(){};h.ManifestResources=Lb;Lb.__name__="ManifestResources";Lb.preloadLibraries=
null;Lb.preloadLibraryNames=null;Lb.rootPath=null;Lb.init=function(a){Lb.preloadLibraries=[];Lb.preloadLibraryNames=[];Lb.rootPath=null;null!=a&&Object.prototype.hasOwnProperty.call(a,"rootPath")&&(Lb.rootPath=la.field(a,"rootPath"),O.endsWith(Lb.rootPath,"/")||(Lb.rootPath+="/"));null==Lb.rootPath&&(Lb.rootPath="./");Xb.registerFont(kh);Xb.registerFont(lh);a=Gc.parse('{"name":null,"assets":"aoy4:pathy36:assets%2Fmusic%2Fmusic-goes-here.txty4:sizezy4:typey4:TEXTy2:idR1y7:preloadtgoR2i2305858R3y5:MUSICR5y32:assets%2Fmusic%2Fambientloop.mp3y9:pathGroupaR8hR6tgoR0y26:assets%2Fimages%2Fbell.pngR2i3154R3y5:IMAGER5R10R6tgoR0y32:assets%2Fimages%2Fwall_right.pngR2i6923R3R11R5R12R6tgoR0y31:assets%2Fimages%2Fwall_left.pngR2i7833R3R11R5R13R6tgoR0y33:assets%2Fimages%2Fwall_2_left.pngR2i1577R3R11R5R14R6tgoR0y34:assets%2Fimages%2Fwall_2_right.pngR2i1622R3R11R5R15R6tgoR0y33:assets%2Fimages%2Fwall_3_left.pngR2i777R3R11R5R16R6tgoR0y34:assets%2Fimages%2Fwall_3_right.pngR2i771R3R11R5R17R6tgoR0y28:assets%2Fimages%2Fcoral2.pngR2i423R3R11R5R18R6tgoR0y31:assets%2Fimages%2Fswordfish.pngR2i788R3R11R5R19R6tgoR0y30:assets%2Fimages%2Fseaweed2.pngR2i472R3R11R5R20R6tgoR0y29:assets%2Fimages%2Fseaweed.pngR2i539R3R11R5R21R6tgoR0y28:assets%2Fimages%2Fmedusa.pngR2i2044R3R11R5R22R6tgoR0y27:assets%2Fimages%2Fahven.pngR2i379R3R11R5R23R6tgoR0y28:assets%2Fimages%2Ftether.pngR2i1083R3R11R5R24R6tgoR0y30:assets%2Fimages%2Fplankton.pngR2i1782R3R11R5R25R6tgoR0y36:assets%2Fimages%2Ftranslucentboi.pngR2i1519R3R11R5R26R6tgoR0y31:assets%2Fimages%2Fleviathan.pngR2i3571R3R11R5R27R6tgoR0y27:assets%2Fimages%2Fwhale.pngR2i3716R3R11R5R28R6tgoR0y28:assets%2Fimages%2Fnumber.pngR2i454R3R11R5R29R6tgoR0y30:assets%2Fimages%2Fo2_alarm.pngR2i828R3R11R5R30R6tgoR0y24:assets%2Fimages%2Fui.pngR2i5534R3R11R5R31R6tgoR0y28:assets%2Fimages%2Flog_bg.pngR2i998R3R11R5R32R6tgoR0y33:assets%2Fimages%2Fradiobubble.pngR2i704R3R11R5R33R6tgoR0y26:assets%2Fimages%2Fpage.pngR2i512R3R11R5R34R6tgoR0y30:assets%2Fimages%2Fdesktop1.pngR2i9202R3R11R5R35R6tgoR0y30:assets%2Fimages%2Fdesktop2.pngR2i9712R3R11R5R36R6tgoR0y30:assets%2Fimages%2Fdesktop3.pngR2i9657R3R11R5R37R6tgoR0y38:assets%2Fimages%2Fradiobubblesmall.pngR2i575R3R11R5R38R6tgoR0y30:assets%2Fimages%2Fatlantis.pngR2i2737R3R11R5R39R6tgoR0y29:assets%2Fimages%2Fbubbles.pngR2i282R3R11R5R40R6tgoR0y36:assets%2Fsounds%2Fsounds-go-here.txtR2zR3R4R5R41R6tgoR2i65267R3R7R5y31:assets%2Fsounds%2Falarmloop.mp3R9aR42hR6tgoR2i227315R3R7R5y27:assets%2Fsounds%2Fdrone.mp3R9aR43hR6tgoR2i39155R3R7R5y30:assets%2Fsounds%2Fendradio.mp3R9aR44hR6tgoR2i161267R3R7R5y32:assets%2Fsounds%2Fghostbrawl.mp3R9aR45hR6tgoR2i129395R3R7R5y35:assets%2Fsounds%2Fghostcoughing.mp3R9aR46hR6tgoR2i225395R3R7R5y29:assets%2Fsounds%2Fnewzone.mp3R9aR47hR6tgoR2i18419R3R7R5y27:assets%2Fsounds%2Fradio.mp3R9aR48hR6tgoR2i243443R3R7R5y31:assets%2Fsounds%2Fwinchloop.mp3R9aR49hR6tgoR2i129395R3R7R5y27:assets%2Fsounds%2Friser.mp3R9aR50hR6tgoR0y34:assets%2Fdata%2Fdata-goes-here.txtR2zR3R4R5R51R6tgoR0y40:assets%2Ffonts%2Fnotjamuicondensed19.fntR2i11427R3R4R5R52R6tgoR0y40:assets%2Ffonts%2Fnotjamuicondensed19.pngR2i2133R3R11R5R53R6tgoR0y38:assets%2Ffonts%2Fnotjamchunkysans6.fntR2i11167R3R4R5R54R6tgoR0y38:assets%2Ffonts%2Fnotjamchunkysans6.pngR2i1449R3R11R5R55R6tgoR0y37:assets%2Ffonts%2Fnotjamoldstyle11.fntR2i11225R3R4R5R56R6tgoR0y37:assets%2Ffonts%2Fnotjamoldstyle11.pngR2i2339R3R11R5R57R6tgoR2i8220R3R7R5y26:flixel%2Fsounds%2Fbeep.mp3R9aR58y26:flixel%2Fsounds%2Fbeep.ogghR6tgoR2i39706R3R7R5y28:flixel%2Fsounds%2Fflixel.mp3R9aR60y28:flixel%2Fsounds%2Fflixel.ogghR6tgoR2i6840R3y5:SOUNDR5R59R9aR58R59hgoR2i33629R3R62R5R61R9aR60R61hgoR2i15744R3y4:FONTy9:classNamey35:__ASSET__flixel_fonts_nokiafc22_ttfR5y30:flixel%2Ffonts%2Fnokiafc22.ttfR6tgoR2i29724R3R63R64y36:__ASSET__flixel_fonts_monsterrat_ttfR5y31:flixel%2Ffonts%2Fmonsterrat.ttfR6tgoR0y33:flixel%2Fimages%2Fui%2Fbutton.pngR2i222R3R11R5R69R6tgoR0y36:flixel%2Fimages%2Flogo%2Fdefault.pngR2i484R3R11R5R70R6tgoR0y42:flixel%2Fimages%2Ftransitions%2Fcircle.pngR2i299R3R11R5R71R6tgoR0y53:flixel%2Fimages%2Ftransitions%2Fdiagonal_gradient.pngR2i730R3R11R5R72R6tgoR0y43:flixel%2Fimages%2Ftransitions%2Fdiamond.pngR2i236R3R11R5R73R6tgoR0y42:flixel%2Fimages%2Ftransitions%2Fsquare.pngR2i209R3R11R5R74R6tgh","rootPath":null,"version":2,"libraryArgs":[],"libraryType":null}',
Lb.rootPath);a=Yb.fromManifest(a);ra.registerLibrary("default",a);a=ra.getLibrary("default");null!=a?Lb.preloadLibraries.push(a):Lb.preloadLibraryNames.push("default")};var eb=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?ra.isLocal(this.__fontID)&&this.__fromBytes(ra.getBytes(this.__fontID)):null!=this.__fontPath&&this.__fromFile(this.__fontPath))};h["lime.text.Font"]=eb;eb.__name__="lime.text.Font";eb.fromBytes=function(a){if(null==a)return null;var b=new eb;b.__fromBytes(a);return b};eb.fromFile=function(a){if(null==a)return null;var b=new eb;b.__fromFile(a);return b};eb.loadFromBytes=function(a){return ob.withValue(eb.fromBytes(a))};eb.loadFromFile=
function(a){return(new Qj).load(a).then(function(a){return null!=a?ob.withValue(a):ob.withError("")})};eb.loadFromName=function(a){return(new eb).__loadFromName(a)};eb.__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};eb.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 od;this.name=a;var d=B.navigator.userAgent.toLowerCase(),f=0<=d.indexOf(" safari/")&&0>d.indexOf(" chrome/");d=(new E("(iPhone|iPod|iPad).*AppleWebKit(?!.*Version)","i")).match(d);if(!f&&!d&&window.document.fonts&&(n=window.document.fonts,q(n,n.load)))window.document.fonts.load("1em '"+a+"'").then(function(a){c.complete(b)},function(d){Pa.warn('Could not load web font "'+a+'"',{fileName:"lime/text/Font.hx",lineNumber:640,className:"lime.text.Font",methodName:"__loadFromName"});
c.complete(b)});else{var g=eb.__measureFontNode("'"+a+"', sans-serif"),k=eb.__measureFontNode("'"+a+"', serif"),l=g.offsetWidth,m=k.offsetWidth,z=-1,h=0,p,sb;z=window.setInterval(function(){h+=1;p=g.offsetWidth!=l||k.offsetWidth!=m;sb=3E3<=50*h;if(p||sb)window.clearInterval(z),g.parentNode.removeChild(g),k.parentNode.removeChild(k),k=g=null,sb&&Pa.warn('Could not load web font "'+a+'"',{fileName:"lime/text/Font.hx",lineNumber:675,className:"lime.text.Font",methodName:"__loadFromName"}),c.complete(b)},
50)}return c.future},__setSize:function(a,b){},__class__:eb};var mh=v.__ASSET__flixel_fonts_nokiafc22_ttf=function(){this.ascender=2048;this.descender=-512;this.height=2816;this.numGlyphs=172;this.underlinePosition=-640;this.underlineThickness=256;this.unitsPerEM=2048;this.name="Nokia Cellphone FC Small";eb.call(this)};h.__ASSET__flixel_fonts_nokiafc22_ttf=mh;mh.__name__="__ASSET__flixel_fonts_nokiafc22_ttf";mh.__super__=eb;mh.prototype=x(eb.prototype,{__class__:mh});var Fg=v.__ASSET__flixel_fonts_monsterrat_ttf=
function(){this.ascender=968;this.descender=-251;this.height=1219;this.numGlyphs=263;this.underlinePosition=-150;this.underlineThickness=50;this.unitsPerEM=1E3;this.name="Monsterrat";eb.call(this)};h.__ASSET__flixel_fonts_monsterrat_ttf=Fg;Fg.__name__="__ASSET__flixel_fonts_monsterrat_ttf";Fg.__super__=eb;Fg.prototype=x(eb.prototype,{__class__:Fg});var Xb=function(a){eb.call(this,a)};h["openfl.text.Font"]=Xb;Xb.__name__="openfl.text.Font";Xb.enumerateFonts=function(a){return Xb.__registeredFonts};
Xb.fromBytes=function(a){var b=new Xb;b.__fromBytes(kb.toBytes(a));return b};Xb.fromFile=function(a){if(null==a)return null;var b=new Xb;b.__fromFile(a);return b};Xb.loadFromBytes=function(a){return eb.loadFromBytes(kb.toBytes(a)).then(function(a){var b=new Xb;b.__fromLimeFont(a);return ob.withValue(b)})};Xb.loadFromFile=function(a){return eb.loadFromFile(a).then(function(a){var b=new Xb;b.__fromLimeFont(a);return ob.withValue(b)})};Xb.loadFromName=function(a){return eb.loadFromName(a).then(function(a){var b=
new Xb;b.__fromLimeFont(a);return ob.withValue(b)})};Xb.registerFont=function(a){a=null==na.getClass(a)?na.__cast(w.createInstance(a,[]),Xb):na.__cast(a,Xb);null!=a&&(Xb.__registeredFonts.push(a),Xb.__fontByName.h[a.name]=a)};Xb.__super__=eb;Xb.prototype=x(eb.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__:Xb,__properties__:{set_fontName:"set_fontName",get_fontName:"get_fontName"}});var kh=v.__ASSET__OPENFL__flixel_fonts_nokiafc22_ttf=function(){this.__fromLimeFont(new mh);eb.call(this,void 0)};h.__ASSET__OPENFL__flixel_fonts_nokiafc22_ttf=kh;kh.__name__="__ASSET__OPENFL__flixel_fonts_nokiafc22_ttf";kh.__super__=Xb;kh.prototype=x(Xb.prototype,{__class__:kh});var lh=v.__ASSET__OPENFL__flixel_fonts_monsterrat_ttf=function(){this.__fromLimeFont(new Fg);eb.call(this,void 0)};h.__ASSET__OPENFL__flixel_fonts_monsterrat_ttf=
lh;lh.__name__="__ASSET__OPENFL__flixel_fonts_monsterrat_ttf";lh.__super__=Xb;lh.prototype=x(Xb.prototype,{__class__:lh});Math.__name__="Math";var Qf=G.MenuVariant={__ename__:"MenuVariant",__constructs__:null,START:{_hx_name:"START",_hx_index:0,__enum__:"MenuVariant",toString:t},GAME_OVER:{_hx_name:"GAME_OVER",_hx_index:1,__enum__:"MenuVariant",toString:t},GAME_WIN:{_hx_name:"GAME_WIN",_hx_index:2,__enum__:"MenuVariant",toString:t}};Qf.__constructs__=[Qf.START,Qf.GAME_OVER,Qf.GAME_WIN];var Fe=function(a){this.started=
!1;wb.call(this);this.variant=a};h.MenuState=Fe;Fe.__name__="MenuState";Fe.__super__=wb;Fe.prototype=x(wb.prototype,{started:null,variant:null,create:function(){var a=this;wb.prototype.create.call(this);u.mouse.set_useSystemCursor(!0);var b=new R(0,0),c=new Gg(232,152,"Start",function(){a.started||a.start()});switch(this.variant._hx_index){case 0:b.loadGraphic("assets/images/desktop1.png");break;case 1:b.loadGraphic("assets/images/desktop2.png");null==c.label?(c.set_label(new Dc(c.x+c.labelOffsets[0].x,
c.y+c.labelOffsets[0].y,80,"Play Again")),c.label.setFormat(null,8,3355443,"center"),c.label.set_alpha(c.labelAlphas[c.status]),c.label.drawFrame(!0)):c.label.set_text("Play Again");break;case 2:b.loadGraphic("assets/images/desktop3.png"),null==c.label?(c.set_label(new Dc(c.x+c.labelOffsets[0].x,c.y+c.labelOffsets[0].y,80,"Play Again")),c.label.setFormat(null,8,3355443,"center"),c.label.set_alpha(c.labelAlphas[c.status]),c.label.drawFrame(!0)):c.label.set_text("Play Again")}b.set_x((u.width-b.get_width())/
2);b.set_y((u.height-b.get_height())/2);this.add(b);this.add(c);nb.cameraFadeIn(1)},start:function(){this.started=!0;nb.cameraFadeOut(.33,function(){var a=fg.fromState(new Ge),b=u.game._state;a instanceof wb&&!u.canSwitchTo(a)||u.game._state.startOutro(function(){u.game._state==b?u.game._nextState=a:u.log.advanced("`onOutroComplete` was called after the state was switched. This will be ignored",La.WARNING,!0)})})},__class__:Fe});var cd=function(a,b,c){R.call(this,a,b);this.loadGraphic("assets/images/number.png",
!0,6,11);this.animation.add("0",[0],0);this.animation.add("1",[1],0);this.animation.add("2",[2],0);this.animation.add("3",[3],0);this.animation.add("4",[4],0);this.animation.add("5",[5],0);this.animation.add("6",[6],0);this.animation.add("7",[7],0);this.animation.add("8",[8],0);this.animation.add("9",[9],0);this.animation.play(null==c?"null":""+c)};h.NumberDisplay=cd;cd.__name__="NumberDisplay";cd.__super__=R;cd.prototype=x(R.prototype,{set:function(a){this.animation.play(null==a?"null":""+a)},__class__:cd});
var Ge=function(){this.droneDepths=[];this.ascendDialogOpen=this.ascending=!1;this.previousPixelY=this.depth=0;wb.call(this)};h.PlayState=Ge;Ge.__name__="PlayState";Ge.__super__=wb;Ge.prototype=x(wb.prototype,{previousPixelY:null,depth:null,ascendDialogOpen:null,ascending:null,wallLayers:null,creatureLayers:null,titleManager:null,bell:null,tether:null,bubbleEmitter:null,ui:null,radioBubble:null,defaultCamera:null,uiCamera:null,depthShader:null,CREATURE_TYPES:null,music:null,winchSound:null,droneSound:null,
gameOver:null,droneDepths:null,create:function(){wb.prototype.create.call(this);u.mouse.set_useSystemCursor(!0);u.set_scaleMode(new Rj);this.defaultCamera=new jb;var a=mb._new(),b=255;null==b&&(b=255);this.defaultCamera.bgColor=(((a&-16711681|1310720)&-65281|5120)&-256|40)&16777215|(255<b?255:0>b?0:b)<<24;u.cameras.add(this.defaultCamera);this.uiCamera=new jb(0,0,320,180);this.uiCamera.bgColor=0;u.cameras.add(this.uiCamera,!1);u.camera=this.defaultCamera;this.wallLayers=[new qa("assets/images/wall_3_left.png",
"assets/images/wall_3_right.png",2),new qa("assets/images/wall_2_left.png","assets/images/wall_2_right.png",1),new qa("assets/images/wall_left.png","assets/images/wall_right.png",0)];this.creatureLayers=[new ja(3),new ja(2),new ja(1)];this.titleManager=new Hg;this.bell=new R(0,0);this.bell.loadGraphic("assets/images/bell.png");a=this.bell.maxVelocity;b=0;var c=10;null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c);a=this.bell.drag;b=0;c=10;null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c);this.tether=
new R(0,0);this.tether.loadGraphic("assets/images/tether.png");this.ui=new A;this.ui.set_camera(this.uiCamera);this.radioBubble=new nh(216,26);this.radioBubble.set_camera(this.uiCamera);this.bubbleEmitter=new Sj(this.bell.x,this.bell.y);this.bubbleEmitter.loadParticles("assets/images/bubbles.png",5,0,!0);this.bubbleEmitter.alpha.set(.4,.6);this.bubbleEmitter.launchAngle.set(-110,-70);this.bubbleEmitter.lifespan.set(150,300);this.bubbleEmitter.speed.set(5,7);this.bubbleEmitter.start(!1,2.47);this.add(this.creatureLayers[0]);
this.add(this.wallLayers[0]);this.add(this.creatureLayers[1]);this.add(this.wallLayers[1]);this.placeAtlantis();this.add(this.creatureLayers[2]);this.add(this.wallLayers[2]);this.placeLogEntries();this.add(this.titleManager);this.add(this.bubbleEmitter);this.add(this.tether);this.add(this.bell);this.add(this.ui);this.add(this.radioBubble);u.camera.follow(this.bell,Ig.NO_DEAD_ZONE);a=u.camera.targetOffset;b=0;c=24;null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c);this.depthShader=new Vb;u.camera.filters=
[new Rh(this.depthShader)];u.camera.filtersEnabled=!0;this.CREATURE_TYPES=lb.getCreatureTypes();if(null==this.music){a=this.music=u.sound.play("assets/music/ambientloop.mp3",0,!0);b=300;c=0;var d=100;null==d&&(d=1);null==c&&(c=0);null==b&&(b=1);null==a._channel&&a.play();null!=a.fadeTween&&a.fadeTween.cancel();a.fadeTween=Ma.num(c,d,b,{onComplete:null},q(a,a.volumeTween))}null==this.winchSound&&(this.winchSound=u.sound.play("assets/sounds/winchloop.mp3",0,!0));this.droneSound=u.sound.load("assets/sounds/drone.mp3",
10);this.gameOver=!1;nb.cameraFadeIn();this.droneDepths.push(nb.randomBetween(0,8740)|0);this.droneDepths.push(nb.randomBetween(0,8740)|0);this.droneDepths.push(nb.randomBetween(0,8740)|0);this.droneDepths.sort(function(a,b){return a-b});gg.trace(this.droneDepths,{fileName:"source/PlayState.hx",lineNumber:158,className:"PlayState",methodName:"create"})},update:function(a){var b=this;wb.prototype.update.call(this,a);var c=this.bubbleEmitter;a=this.bell.x+this.bell.get_width()/3;var d=this.bell.y+this.bell.get_height()/
3;null==d&&(d=0);null==a&&(a=0);c.x=a;c.y=d;a=this.getDepth(this.bell.y);8740!=a||this.gameOver||(this.gameOver=!0,Sc.delay(function(){b.ui.setO2Alarm(!0);u.sound.play("assets/sounds/riser.mp3",1,!1,null,!0,function(){nb.cameraFadeOut(0);b.ui.setO2Alarm(!1);var a=b.music;a.cleanup(a.autoDestroy,!0);Sc.delay(function(){var a=fg.fromState(new Fe(Qf.GAME_WIN)),b=u.game._state;a instanceof wb&&!u.canSwitchTo(a)||u.game._state.startOutro(function(){u.game._state==b?u.game._nextState=a:u.log.advanced("`onOutroComplete` was called after the state was switched. This will be ignored",
La.WARNING,!0)})},2E3)})},5E3));if(u.keys.checkKeyArrayState(nb.DOWN_KEYS,1)&&8740>a&&!this.ascending){c=this.bell.acceleration;d=0;var f=10;null==f&&(f=0);null==d&&(d=0);c.set_x(d);c.set_y(f)}else if(!this.ascending||this.ascending&&0>=this.bell.y)c=this.bell.acceleration,f=d=0,null==f&&(f=0),null==d&&(d=0),c.set_x(d),c.set_y(f);u.keys.checkKeyArrayState(nb.DOWN_KEYS,2)&&!this.ascending?(c=this.winchSound,d=1,null==d&&(d=1),null==c._channel&&c.play(),null!=c.fadeTween&&c.fadeTween.cancel(),c.fadeTween=
Ma.num(0,1,d,{onComplete:null},q(c,c.volumeTween))):u.keys.checkKeyArrayState(nb.DOWN_KEYS,-1)&&!this.ascending&&(c=this.winchSound,d=1,null==d&&(d=1),null!=c.fadeTween&&c.fadeTween.cancel(),c.fadeTween=Ma.num(c._volume,0,d,{onComplete:null},q(c,c.volumeTween)));!u.keys.checkKeyArrayState([87,38],2)||this.ascending||this.ascendDialogOpen||(this.radioBubble.show(a),this.ascendDialogOpen=!0);this.ascendDialogOpen&&-1!=u.keys.firstJustPressed()&&87!=u.keys.firstJustPressed()&&38!=u.keys.firstJustPressed()&&
(this.radioBubble.hide(),this.ascendDialogOpen=!1,c=u.keys.justPressed,c.keyManager.checkStatusUnsafe(89,c.status)&&Rb.getZone(a).allowReturn&&(this.ascending=!0,c=this.bell.acceleration,d=0,f=-10,null==f&&(f=0),null==d&&(d=0),c.set_x(d),c.set_y(f),c=this.bell.maxVelocity,d=0,f=20,null==f&&(f=0),null==d&&(d=0),c.set_x(d),c.set_y(f),c=this.winchSound,d=1,null==d&&(d=1),null==c._channel&&c.play(),null!=c.fadeTween&&c.fadeTween.cancel(),c.fadeTween=Ma.num(0,1,d,{onComplete:null},q(c,c.volumeTween)),
Sc.delay(function(){var a=b.winchSound,c=1;null==c&&(c=1);null!=a.fadeTween&&a.fadeTween.cancel();a.fadeTween=Ma.num(a._volume,0,c,{onComplete:null},q(a,a.volumeTween));a=b.music;c=1;null==c&&(c=1);null!=a.fadeTween&&a.fadeTween.cancel();a.fadeTween=Ma.num(a._volume,0,c,{onComplete:null},q(a,a.volumeTween));nb.cameraFadeOut(1,function(){var a=fg.fromState(new Fe(Qf.GAME_OVER)),b=u.game._state;a instanceof wb&&!u.canSwitchTo(a)||u.game._state.startOutro(function(){u.game._state==b?u.game._nextState=
a:u.log.advanced("`onOutroComplete` was called after the state was switched. This will be ignored",La.WARNING,!0)})})},4E3)));this.titleManager.setDepth(a,this.bell.y);this.tether.set_y(this.bell.y-150);this.ui.setDepth(a);f=this.getCaveWidth(a);c=0;for(d=this.wallLayers;c<d.length;){var g=d[c];++c;g.setCaveWidth(f)}this.depthShader.setDepth(Math.min(8740,a));c=0;for(d=this.creatureLayers;c<d.length;)f=d[c],++c,.006>Math.random()&&this.spawnCreature(f,a);!this.ascending&&0<this.droneDepths.length&&
a>=this.droneDepths[0]&&(this.droneDepths.shift(),this.droneSound.play(!1,0))},getCaveWidth:function(a){a/=8740;return 520+a*a*a*-100},spawnCreature:function(a,b){for(var c=Math.random(),d=[],f=0,g=this.CREATURE_TYPES;f<g.length;){var k=g[f];++f;b>=k.min_depth&&b<=k.max_depth&&c<=k.probability&&d.push(k)}b=nb.randomChoice(d);null!=b&&(c=.5>=Math.random()?Sd.RIGHT:Sd.LEFT,f=c==Sd.RIGHT?-160-b.sprite.get_width():160+b.sprite.get_width(),d=this.bell.y+180*Math.random(),g=nb.randomBetween(b.speed_min,
b.speed_max),f=this.bell.x+f,k=0,null==k&&(k=0),null==g&&(g=0),null==k&&(k=0),null==g&&(g=0),null==k&&(k=0),null==g&&(g=0),g=N.pool.get().set(g,k),g._inPool=!1,c=new lb(f,d,g,c),c.loadGraphicFromSprite(b.sprite),c.set_alpha(b.alpha),a.add(c))},getDepth:function(a){var b=Rb.getZoneIndexByY(a);if(-1==b)return 8740;var c=Rb.Zones[b];return c.depth+(a-Rb.ZonePixelLimits[b].min)*c.depthMultiplier},openLogEntry:function(a){a=new nd(a);a.set_camera(this.uiCamera);this.openSubState(a)},placeLogEntries:function(){for(var a=
this,b=0,c=Rb.Zones.length;b<c;){var d=b++,f=[Rb.Zones[d]];d=Rb.ZonePixelLimits[d];for(var g=(d.max-d.min)/(f[0].logs.length+1),k=0,l=f[0].logs.length;k<l;){var m=[k++],z=d.min+m[0]*g+90,h=this.getCaveWidth(this.getDepth(z));h=nb.randomBetween(-h/2+192,h/2-128);z=new R(h,z);z.loadGraphic("assets/images/page.png",!0,32,32);z.animation.add("idle",[0,1,2,3,4,5],4+nb.randomInt(3),!0,nb.randomBool(),nb.randomBool());z.animation.play("idle",!1,!1,-1);bc.globalManager.add(z,function(b,c){return function(d){a.openLogEntry(c[0].logs[b[0]])}}(m,
f),null,null,null,!1,!0,!0,null);this.add(z)}}},placeAtlantis:function(){var a=Rb.ZonePixelLimits[Rb.ZonePixelLimits.length-1].max+20,b=new R;b.loadGraphic("assets/images/atlantis.png");b.setPosition(this.bell.x-b.get_width()/2,a);var c=b.scale,d=.55;a=.55;null==a&&(a=0);null==d&&(d=0);c.set_x(d);c.set_y(a);this.add(b)},__class__:Ge});var nh=function(a,b){null==b&&(b=0);null==a&&(a=0);hb.call(this,a,b,void 0);this.bubble=new R;this.bubble.loadGraphic("assets/images/radiobubble.png",!1);this.bubbleSmall=
new R;this.bubbleSmall.loadGraphic("assets/images/radiobubblesmall.png",!1);this.text=new Dc(8,8);this.text.set_color(855052);this.add(this.bubble);this.add(this.bubbleSmall);this.add(this.text);this.bubble.set_alpha(0);this.bubbleSmall.set_alpha(0);this.text.set_alpha(0)};h.RadioBubble=nh;nh.__name__="RadioBubble";nh.__super__=Ia;nh.prototype=x(Ia.prototype,{bubble:null,bubbleSmall:null,text:null,show:function(a){var b=this;a=Rb.getZone(a);""==a.radioResponse?(u.sound.play("assets/sounds/endradio.mp3",
10),Sc.delay(function(){b.bubble.set_alpha(0);b.bubbleSmall.set_alpha(1);b.text.set_alpha(0)},300)):(this.text.set_text(a.radioResponse),u.sound.play("assets/sounds/radio.mp3",10),Sc.delay(function(){b.bubble.set_alpha(1);b.bubbleSmall.set_alpha(0);b.text.set_alpha(1)},300));this.set_visible(!0)},hide:function(){this.bubble.set_alpha(0);this.bubbleSmall.set_alpha(0);this.text.set_alpha(0)},__class__:nh});var la=function(){};h.Reflect=la;la.__name__="Reflect";la.field=function(a,b){try{return a[b]}catch(c){return db.lastError=
c,null}};la.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]};la.setProperty=function(a,b,c){var d;var f=a.__properties__?d=a.__properties__["set_"+b]:!1;if(f)a[d](c);else a[b]=c};la.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};la.isFunction=function(a){return"function"==typeof a?!(a.__name__||a.__ename__):
!1};la.compare=function(a,b){return a==b?0:a>b?1:-1};la.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};la.isEnumValue=function(a){return null!=a?null!=a.__enum__:!1};la.deleteField=function(a,b){if(!Object.prototype.hasOwnProperty.call(a,b))return!1;delete a[b];return!0};la.makeVarArgs=function(a){return function(){var b=Array.prototype.slice.call(arguments);return a(b)}};var M=function(){};
h.Std=M;M.__name__="Std";M.string=function(a){return na.__string_rec(a,"")};M.parseInt=function(a){a=parseInt(a);return isNaN(a)?null:a};var oh=function(){};h["_String.String_Impl_"]=oh;oh.__name__="_String.String_Impl_";oh.fromCharCode=function(a){return String.fromCodePoint(a)};var Wd=function(){this.b=""};h.StringBuf=Wd;Wd.__name__="StringBuf";Wd.prototype={b:null,__class__:Wd};var O=function(){};h.StringTools=O;O.__name__="StringTools";O.htmlEscape=function(a,b){for(var c="",d=0,f=a;d<f.length;){a=
f;var g=d++,k=a.charCodeAt(g);55296<=k&&56319>=k&&(k=k-55232<<10|a.charCodeAt(g+1)&1023);a=k;65536<=a&&++d;switch(a){case 34:c=b?c+"&quot;":c+String.fromCodePoint(a);break;case 38:c+="&amp;";break;case 39:c=b?c+"&#039;":c+String.fromCodePoint(a);break;case 60:c+="&lt;";break;case 62:c+="&gt;";break;default:c+=String.fromCodePoint(a)}}return c};O.htmlUnescape=function(a){return a.split("&gt;").join(">").split("&lt;").join("<").split("&quot;").join('"').split("&#039;").join("'").split("&amp;").join("&")};
O.startsWith=function(a,b){return a.length>=b.length?0==a.lastIndexOf(b,0):!1};O.endsWith=function(a,b){var c=b.length,d=a.length;return d>=c?a.indexOf(b,d-c)==d-c:!1};O.isSpace=function(a,b){a=y.cca(a,b);return 8<a&&14>a?!0:32==a};O.ltrim=function(a){for(var b=a.length,c=0;c<b&&O.isSpace(a,c);)++c;return 0<c?y.substr(a,c,b-c):a};O.rtrim=function(a){for(var b=a.length,c=0;c<b&&O.isSpace(a,b-c-1);)++c;return 0<c?y.substr(a,0,b-c):a};O.trim=function(a){return O.ltrim(O.rtrim(a))};O.replace=function(a,
b,c){return a.split(b).join(c)};O.hex=function(a,b){var c="";do c="0123456789ABCDEF".charAt(a&15)+c,a>>>=4;while(0<a);if(null!=b)for(;c.length<b;)c="0"+c;return c};var Tc=G.ValueType={__ename__:"ValueType",__constructs__:null,TNull:{_hx_name:"TNull",_hx_index:0,__enum__:"ValueType",toString:t},TInt:{_hx_name:"TInt",_hx_index:1,__enum__:"ValueType",toString:t},TFloat:{_hx_name:"TFloat",_hx_index:2,__enum__:"ValueType",toString:t},TBool:{_hx_name:"TBool",_hx_index:3,__enum__:"ValueType",toString:t},
TObject:{_hx_name:"TObject",_hx_index:4,__enum__:"ValueType",toString:t},TFunction:{_hx_name:"TFunction",_hx_index:5,__enum__:"ValueType",toString:t},TClass:(n=function(a){return{_hx_index:6,c:a,__enum__:"ValueType",toString:t}},n._hx_name="TClass",n.__params__=["c"],n),TEnum:(n=function(a){return{_hx_index:7,e:a,__enum__:"ValueType",toString:t}},n._hx_name="TEnum",n.__params__=["e"],n),TUnknown:{_hx_name:"TUnknown",_hx_index:8,__enum__:"ValueType",toString:t}};Tc.__constructs__=[Tc.TNull,Tc.TInt,
Tc.TFloat,Tc.TBool,Tc.TObject,Tc.TFunction,Tc.TClass,Tc.TEnum,Tc.TUnknown];var w=function(){};h.Type=w;w.__name__="Type";w.getEnum=function(a){return null==a?null:G[a.__enum__]};w.resolveEnum=function(a){return G[a]};w.createInstance=function(a,b){return new (Function.prototype.bind.apply(a,[null].concat(b)))};w.createEnum=function(a,b,c){var d=la.field(a,b);if(null==d)throw J.thrown("No such constructor "+b);if(la.isFunction(d)){if(null==c)throw J.thrown("Constructor "+b+" need parameters");return d.apply(a,
c)}if(null!=c&&0!=c.length)throw J.thrown("Constructor "+b+" does not need parameters");return d};w.getInstanceFields=function(a){var b=[],c;for(c in a.prototype)b.push(c);y.remove(b,"__class__");y.remove(b,"__properties__");return b};w.getClassFields=function(a){a=la.fields(a);y.remove(a,"__name__");y.remove(a,"__interfaces__");y.remove(a,"__properties__");y.remove(a,"__super__");y.remove(a,"__meta__");y.remove(a,"prototype");return a};w.typeof=function(a){switch(typeof a){case "boolean":return Tc.TBool;
case "function":return a.__name__||a.__ename__?Tc.TObject:Tc.TFunction;case "number":return Math.ceil(a)==a%2147483648?Tc.TInt:Tc.TFloat;case "object":if(null==a)return Tc.TNull;var b=a.__enum__;if(null!=b)return Tc.TEnum(G[b]);a=na.getClass(a);return null!=a?Tc.TClass(a):Tc.TObject;case "string":return Tc.TClass(String);case "undefined":return Tc.TNull;default:return Tc.TUnknown}};w.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=G[c].__constructs__[a._hx_index].__params__;for(c=0;c<d.length;){var f=d[c];++c;if(!w.enumEq(a[f],b[f]))return!1}}catch(g){return db.lastError=g,!1}return!0};w.enumParameters=function(a){var b=G[a.__enum__].__constructs__[a._hx_index].__params__;if(null!=b){for(var c=[],d=0;d<b.length;){var f=b[d];++d;c.push(a[f])}return c}return[]};var A=function(){hb.call(this,void 0,void 0,void 0);var a=this.scrollFactor,b=0,c=0;null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c);this.bg=new R(0,0);this.bg.loadGraphic("assets/images/ui.png");
this.o2=new R(46,141);this.o2.loadGraphic("assets/images/o2_alarm.png",!0,16,16);this.o2.animation.add("idle",[0],0);this.o2.animation.add("alarm",[0,1],2);this.o2.animation.play("idle");this.depthGauge=new T(7,162,0);this.add(this.bg);this.add(this.o2);this.add(this.depthGauge);this.alarmSound=u.sound.load("assets/sounds/alarmloop.mp3",1,!0)};h.UI=A;A.__name__="UI";A.__super__=Ia;A.prototype=x(Ia.prototype,{bg:null,o2:null,depthGauge:null,alarmSound:null,setO2Alarm:function(a){a?(this.o2.animation.play("alarm"),
this.alarmSound.play()):(this.o2.animation.play("idle"),a=this.alarmSound,a.cleanup(a.autoDestroy,!0))},setDepth:function(a){this.depthGauge.set(a|0)},__class__:A});var L={gt:function(a,b){var c=0>a;return c!=0>b?c:a>b},toFloat:function(a){return 0>a?4294967296+a:a+0}},va={__properties__:{get_length:"get_length"},charAt:function(a,b){if(0>b)return"";for(var c=0,d=0;d<a.length;){var f=d++,g=a.charCodeAt(f);55296<=g&&56319>=g&&(g=g-55232<<10|a.charCodeAt(f+1)&1023);f=g;if(c==b)return String.fromCodePoint(f);
65536<=f&&++d;++c}return""},charCodeAt:function(a,b){if(0>b)return null;for(var c=0,d=0;d<a.length;){var f=d++,g=a.charCodeAt(f);55296<=g&&56319>=g&&(g=g-55232<<10|a.charCodeAt(f+1)&1023);f=g;if(c==b)return f;65536<=f&&++d;++c}return null},substr:function(a,b,c){0>b&&(b=va.get_length(a)+b,0>b&&(b=0));if(null!=c&&(0>c&&(c=va.get_length(a)+c),0>=c))return"";for(var d=0,f=0,g=-1,k=0;f<a.length;){var l=a.charCodeAt(f);55296<=l&&56319>=l&&(l=l-55232<<10|a.charCodeAt(f+1)&1023);if(d>=b){if(0>g){if(null==
c)return y.substr(a,f,null);g=f}++k;if(k>=c)return y.substr(a,g,(65536>l?f:f+1)-g+1)}f+=65536<=l?2:1;++d}return 0>g?"":y.substr(a,g,null)},get_length:function(a){for(var b=0,c=0;c<a.length;){var d=a,f=c++,g=d.charCodeAt(f);55296<=g&&56319>=g&&(g=g-55232<<10|d.charCodeAt(f+1)&1023);65536<=g&&++c;++b}return b}},nb=function(){};h.Util=nb;nb.__name__="Util";nb.randomInt=function(a){return Math.floor(a*Math.random())};nb.randomBetween=function(a,b){return a+Math.random()*(b-a)};nb.randomChoice=function(a){return a[nb.randomInt(a.length)]};
nb.randomBool=function(){return.5>Math.random()};nb.cameraFadeOut=function(a,b){null==a&&(a=.33);u.cameras.fade(-16777216,a,!1,b)};nb.cameraFadeIn=function(a,b){null==a&&(a=.33);u.cameras.fade(-16777216,a,!0,b)};var qa=function(a,b,c){hb.call(this,void 0,void 0,void 0);this.xOffset=25*Math.pow(c,1.5);this.scrollFactor.set_y(1-c/5);var d=new Vb(2500*c);this.wallLeft=new Ji(a,16);this.wallLeft.set_y(123*c);this.wallLeft.shader=d;this.add(this.wallLeft);this.wallRight=new Ji(b,16);this.wallRight.set_y(123*
c);this.wallRight.shader=d;this.add(this.wallRight)};h.WallLayer=qa;qa.__name__="WallLayer";qa.__super__=Ia;qa.prototype=x(Ia.prototype,{wallLeft:null,wallRight:null,xOffset:null,setCaveWidth:function(a){this.wallLeft.set_x(-a/2+32+this.xOffset);this.wallRight.set_x(a/2-128-this.xOffset)},__class__:qa});var Oa={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"}}},
X=function(a){this.nodeType=a;this.children=[];this.attributeMap=new Ba};h.Xml=X;X.__name__="Xml";X.parse=function(a){return Jg.parse(a)};X.createElement=function(a){var b=new X(X.Element);if(b.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==b.nodeType?"null":Oa.toString(b.nodeType)));b.nodeName=a;return b};X.createPCData=function(a){var b=new X(X.PCData);if(b.nodeType==X.Document||b.nodeType==X.Element)throw J.thrown("Bad node type, unexpected "+(null==b.nodeType?
"null":Oa.toString(b.nodeType)));b.nodeValue=a;return b};X.createCData=function(a){var b=new X(X.CData);if(b.nodeType==X.Document||b.nodeType==X.Element)throw J.thrown("Bad node type, unexpected "+(null==b.nodeType?"null":Oa.toString(b.nodeType)));b.nodeValue=a;return b};X.createComment=function(a){var b=new X(X.Comment);if(b.nodeType==X.Document||b.nodeType==X.Element)throw J.thrown("Bad node type, unexpected "+(null==b.nodeType?"null":Oa.toString(b.nodeType)));b.nodeValue=a;return b};X.createDocType=
function(a){var b=new X(X.DocType);if(b.nodeType==X.Document||b.nodeType==X.Element)throw J.thrown("Bad node type, unexpected "+(null==b.nodeType?"null":Oa.toString(b.nodeType)));b.nodeValue=a;return b};X.createProcessingInstruction=function(a){var b=new X(X.ProcessingInstruction);if(b.nodeType==X.Document||b.nodeType==X.Element)throw J.thrown("Bad node type, unexpected "+(null==b.nodeType?"null":Oa.toString(b.nodeType)));b.nodeValue=a;return b};X.createDocument=function(){return new X(X.Document)};
X.prototype={nodeType:null,nodeName:null,nodeValue:null,parent:null,children:null,attributeMap:null,get:function(a){if(this.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==this.nodeType?"null":Oa.toString(this.nodeType)));return this.attributeMap.h[a]},set:function(a,b){if(this.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==this.nodeType?"null":Oa.toString(this.nodeType)));this.attributeMap.h[a]=b},exists:function(a){if(this.nodeType!=
X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==this.nodeType?"null":Oa.toString(this.nodeType)));return Object.prototype.hasOwnProperty.call(this.attributeMap.h,a)},attributes:function(){if(this.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==this.nodeType?"null":Oa.toString(this.nodeType)));return new Sh(this.attributeMap.h)},elements:function(){if(this.nodeType!=X.Document&&this.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element or Document but found "+
(null==this.nodeType?"null":Oa.toString(this.nodeType)));for(var a=[],b=0,c=this.children;b<c.length;){var d=c[b];++b;d.nodeType==X.Element&&a.push(d)}return new Ld(a)},elementsNamed:function(a){if(this.nodeType!=X.Document&&this.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element or Document but found "+(null==this.nodeType?"null":Oa.toString(this.nodeType)));for(var b=[],c=0,d=this.children;c<d.length;){var f=d[c];++c;if(f.nodeType==X.Element){if(f.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+
(null==f.nodeType?"null":Oa.toString(f.nodeType)));var g=f.nodeName==a}else g=!1;g&&b.push(f)}return new Ld(b)},firstElement:function(){if(this.nodeType!=X.Document&&this.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element or Document but found "+(null==this.nodeType?"null":Oa.toString(this.nodeType)));for(var a=0,b=this.children;a<b.length;){var c=b[a];++a;if(c.nodeType==X.Element)return c}return null},addChild:function(a){if(this.nodeType!=X.Document&&this.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element or Document but found "+
(null==this.nodeType?"null":Oa.toString(this.nodeType)));null!=a.parent&&a.parent.removeChild(a);this.children.push(a);a.parent=this},removeChild:function(a){if(this.nodeType!=X.Document&&this.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element or Document but found "+(null==this.nodeType?"null":Oa.toString(this.nodeType)));return y.remove(this.children,a)?(a.parent=null,!0):!1},toString:function(){return Th.print(this)},__class__:X};var ph=function(){};h.ZoneTitle=ph;ph.__name__=
"ZoneTitle";ph.create=function(a,b,c){null==c&&(c=!0);var d=rc.fromAngelCode("assets/fonts/notjamuicondensed19.png","assets/fonts/notjamuicondensed19.fnt");b=new ih(0,0,b,d);b.set_color(15327194);b.set_borderStyle(ue.OUTLINE);b.drawFrame(!0);var f=new R(0,a);f.loadGraphic(b.framePixels);c&&Sc.delay(function(){Ma.tween(f,{alpha:0},4,{ease:Za.quadInOut,onComplete:function(a){f.destroy()}})},4E3);return f};var Hg=function(){this.currentZone=0;hb.call(this,void 0,void 0,void 0);this.sound=u.sound.load("assets/sounds/newzone.mp3");
this.sound.set_volume(10);this.newTitle(0)};h.ZoneTitleManager=Hg;Hg.__name__="ZoneTitleManager";Hg.__super__=Ia;Hg.prototype=x(Ia.prototype,{currentZone:null,sound:null,newTitle:function(a){var b=this,c=ph.create(a+96,Rb.Zones[this.currentZone].title);a=1;null==a&&(a=17);1!=a&&17!=a||c.set_x((u.width-c.get_width())/2);16!=a&&17!=a||c.set_y((u.height-c.get_height())/2);c.set_x(c.x-160+32);a=c.scale;var d=2,f=2;null==f&&(f=0);null==d&&(d=0);a.set_x(d);a.set_y(f);this.sound.play(!0);Sc.delay(function(){b.add(c)},
2E3)},setDepth:function(a,b){a=Rb.getZoneIndex(a);a!=this.currentZone&&(this.currentZone=a,this.newTitle(b))},__class__:Hg});var Rf=function(){};h["flixel.IFlxBasic"]=Rf;Rf.__name__="flixel.IFlxBasic";Rf.__isInterface__=!0;Rf.prototype={set_active:null,set_visible:null,set_alive:null,set_exists:null,ID:null,active:null,visible:null,alive:null,exists:null,draw:null,update:null,destroy:null,kill:null,revive:null,toString:null,__class__:Rf,__properties__:{set_exists:"set_exists",set_alive:"set_alive",
set_visible:"set_visible",set_active:"set_active"}};var Kg=function(){};h["flixel.util.IFlxPooled"]=Kg;Kg.__name__="flixel.util.IFlxPooled";Kg.__isInterface__=!0;Kg.__interfaces__=[D];Kg.prototype={put:null,__class__:Kg};var ve=function(){};h["flixel.util.IFlxPool"]=ve;ve.__name__="flixel.util.IFlxPool";ve.__isInterface__=!0;ve.prototype={preAllocate:null,clear:null,__class__:ve};var hg=function(a){this._count=0;this._pool=[];this._constructor=a};h["flixel.util.FlxPool"]=hg;hg.__name__="flixel.util.FlxPool";
hg.__interfaces__=[ve];hg.prototype={_pool:null,_constructor:null,_count:null,get:function(){return 0==this._count?this._constructor():this._pool[--this._count]},put:function(a){if(null!=a){var b=this._pool.indexOf(a);(-1==b||b>=this._count)&&this.putHelper(a)}},putUnsafe:function(a){null!=a&&this.putHelper(a)},putHelper:function(a){a.destroy();this._pool[this._count++]=a},preAllocate:function(a){for(;0<a--;)this._pool[this._count++]=this._constructor()},clear:function(){this._count=0;var a=this._pool;
this._pool=[];return a},get_length:function(){return this._count},__class__:hg,__properties__:{get_length:"get_length"}};var N=function(a,b){null==b&&(b=0);null==a&&(a=0);this._weak=this._inPool=!1;this.x=this.y=0;this.set(a,b)};h["flixel.math.FlxBasePoint"]=N;N.__name__="flixel.math.FlxBasePoint";N.__interfaces__=[Kg];N.get=function(a,b){null==b&&(b=0);null==a&&(a=0);a=N.pool.get().set(a,b);a._inPool=!1;return a};N.weak=function(a,b){null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);b=
N.pool.get().set(a,b);b._inPool=!1;b._weak=!0;return b};N.prototype={x:null,y:null,_weak:null,_inPool:null,set:function(a,b){null==b&&(b=0);null==a&&(a=0);this.set_x(a);this.set_y(b);return this},put:function(){this._inPool||(this._inPool=!0,this._weak=!1,N.pool.putUnsafe(this))},putWeak:function(){this._weak&&this.put()},equals:function(a){var b=1E-7>=Math.abs(this.x-a.x)&&1E-7>=Math.abs(this.y-a.y);a._weak&&a.put();return b},destroy:function(){},toString:function(){var a=this.x,b=Ua._pool.get();
b.label="x";b.value=a;a=this.y;var c=Ua._pool.get();c.label="y";c.value=a;return ab.getDebugString([b,c])},set_x:function(a){return this.x=a},set_y:function(a){return this.y=a},__class__:N,__properties__:{set_y:"set_y",set_x:"set_x"}};var V=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this._weak=this._inPool=!1;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["flixel.math.FlxRect"]=V;V.__name__="flixel.math.FlxRect";
V.__interfaces__=[Kg];V.__properties__={get_pool:"get_pool"};V.get=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);var f=V._pool.get();null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);f.x=a;f.y=b;f.width=c;f.height=d;f._inPool=!1;return f};V.weak=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);var f=V._pool.get();null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);null==a&&(a=
0);f.x=a;f.y=b;f.width=c;f.height=d;f._inPool=!1;f._weak=!0;return f};V.get_pool=function(){return V._pool};V.prototype={x:null,y:null,width:null,height:null,_weak:null,_inPool:null,put:function(){this._inPool||(this._inPool=!0,this._weak=!1,V._pool.putUnsafe(this))},putWeak:function(){this._weak&&!this._inPool&&(this._inPool=!0,this._weak=!1,V._pool.putUnsafe(this))},setSize:function(a,b){this.width=a;this.height=b;return this},setPosition:function(a,b){this.x=a;this.y=b;return this},set: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;return this},copyFrom:function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height;a._weak&&!a._inPool&&(a._inPool=!0,a._weak=!1,V._pool.putUnsafe(a));return this},copyTo:function(a){a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;a._weak&&!a._inPool&&(a._inPool=!0,a._weak=!1,V._pool.putUnsafe(a));return a},copyFromFlash:function(a){this.x=a.x;this.y=a.y;this.width=
a.width;this.height=a.height;return this},copyToFlash:function(a){null==a&&(a=new ea);a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;return a},overlaps:function(a){var b=a.x+a.width>this.x&&a.x<this.x+this.width&&a.y+a.height>this.y&&a.y<this.y+this.height;a._weak&&!a._inPool&&(a._inPool=!0,a._weak=!1,V._pool.putUnsafe(a));return b},containsPoint:function(a){var b=a.x,c=a.y;b=b>=this.x&&b<=this.x+this.width&&c>=this.y&&c<=this.y+this.height;a._weak&&a.put();return b},containsXY:function(a,
b){return a>=this.x&&a<=this.x+this.width&&b>=this.y?b<=this.y+this.height:!1},union:function(a){var b=Math.min(this.x,a.x),c=Math.min(this.y,a.y),d=Math.max(this.x+this.width,a.x+a.width),f=Math.max(this.y+this.height,a.y+a.height);a._weak&&!a._inPool&&(a._inPool=!0,a._weak=!1,V._pool.putUnsafe(a));a=b;var g=c;b=d-b;c=f-c;null==c&&(c=0);null==b&&(b=0);null==g&&(g=0);null==a&&(a=0);this.x=a;this.y=g;this.width=b;this.height=c;return this},floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);
this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this},ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this},round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);this.width=Math.round(this.width);this.height=Math.round(this.height);return this},fromTwoPoints:function(a,b){var c=Math.min(a.x,b.x),d=Math.min(a.y,b.y),f=Math.max(a.x,b.x),g=Math.max(a.y,b.y);a._weak&&
a.put();a=b;a._weak&&a.put();b=c;a=d;c=f-c;d=g-d;null==d&&(d=0);null==c&&(c=0);null==a&&(a=0);null==b&&(b=0);this.x=b;this.y=a;this.width=c;this.height=d;return this},unionWithPoint:function(a){var b=Math.min(this.x,a.x),c=Math.min(this.y,a.y),d=Math.max(this.x+this.width,a.x),f=Math.max(this.y+this.height,a.y);a._weak&&a.put();a=b;var g=c;b=d-b;c=f-c;null==c&&(c=0);null==b&&(b=0);null==g&&(g=0);null==a&&(a=0);this.x=a;this.y=g;this.width=b;this.height=c;return this},offset:function(a,b){this.x+=
a;this.y+=b;return this},getRotatedBounds:function(a,b,c){if(null==b){var d=b=0;null==d&&(d=0);null==b&&(b=0);null==d&&(d=0);null==b&&(b=0);null==d&&(d=0);null==b&&(b=0);b=N.pool.get().set(b,d);b._inPool=!1;b._weak=!0}if(null==c){d=V._pool.get();var f=0,g=0,k=0,l=0;null==l&&(l=0);null==k&&(k=0);null==g&&(g=0);null==f&&(f=0);d.x=f;d.y=g;d.width=k;d.height=l;c=d;c._inPool=!1}a%=360;if(0==a)return d=b,d._weak&&d.put(),f=this.x,g=this.y,k=this.width,l=this.height,null==l&&(l=0),null==k&&(k=0),null==g&&
(g=0),null==f&&(f=0),c.x=f,c.y=g,c.width=k,c.height=l,c;0>a&&(a+=360);f=Math.PI/180*a;d=Math.cos(f);f=Math.sin(f);g=-b.x;k=-b.y;l=-b.x+this.width;var m=-b.y+this.height;90>a?(c.x=this.x+b.x+d*g-f*m,c.y=this.y+b.y+f*g+d*k):180>a?(c.x=this.x+b.x+d*l-f*m,c.y=this.y+b.y+f*g+d*m):270>a?(c.x=this.x+b.x+d*l-f*k,c.y=this.y+b.y+f*l+d*m):(c.x=this.x+b.x+d*g-f*k,c.y=this.y+b.y+f*l+d*k);a=Math.abs(d*this.height)+Math.abs(f*this.width);c.width=Math.abs(d*this.width)+Math.abs(f*this.height);c.height=a;d=b;d._weak&&
d.put();return c},destroy:function(){},equals:function(a){var b=1E-7>=Math.abs(this.x-a.x)&&1E-7>=Math.abs(this.y-a.y)&&1E-7>=Math.abs(this.width-a.width)&&1E-7>=Math.abs(this.height-a.height);a._weak&&!a._inPool&&(a._inPool=!0,a._weak=!1,V._pool.putUnsafe(a));return b},intersection:function(a,b){if(null==b){b=V._pool.get();var c=0,d=0,f=0,g=0;null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);b.x=c;b.y=d;b.width=f;b.height=g;b._inPool=!1}f=this.x<a.x?a.x:this.x;var k=this.x+this.width>a.x+
a.width?a.x+a.width:this.x+this.width;g=this.y<a.y?a.y:this.y;var l=this.y+this.height>a.y+a.height?a.y+a.height:this.y+this.height;a._weak&&!a._inPool&&(a._inPool=!0,a._weak=!1,V._pool.putUnsafe(a));if(k<=f||l<=g)return g=f=d=c=0,null==g&&(g=0),null==f&&(f=0),null==d&&(d=0),null==c&&(c=0),b.x=c,b.y=d,b.width=f,b.height=g,b;c=f;d=g;f=k-f;g=l-g;null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);b.x=c;b.y=d;b.width=f;b.height=g;return b},clipTo:function(a){return a.intersection(this,this)},
getMidpoint:function(a){if(null==a){var b=0,c=0;null==c&&(c=0);null==b&&(b=0);a=N.pool.get().set(b,c);a._inPool=!1}b=this.x+.5*this.width;c=this.y+.5*this.height;null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c);return a},toString:function(){var a=this.x,b=Ua._pool.get();b.label="x";b.value=a;a=this.y;var c=Ua._pool.get();c.label="y";c.value=a;a=this.width;var d=Ua._pool.get();d.label="w";d.value=a;a=this.height;var f=Ua._pool.get();f.label="h";f.value=a;return ab.getDebugString([b,c,d,f])},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_top:function(){return this.y},set_top:function(a){this.height-=a-this.y;return this.y=a},get_bottom:function(){return this.y+this.height},set_bottom:function(a){this.height=a-this.y;return a},get_isEmpty:function(){return 0!=this.width?0==this.height:!0},__class__:V,__properties__:{get_isEmpty:"get_isEmpty",set_bottom:"set_bottom",get_bottom:"get_bottom",
set_top:"set_top",get_top:"get_top",set_right:"set_right",get_right:"get_right",set_left:"set_left",get_left:"get_left"}};var em={__properties__:{set_ty:"set_ty",get_ty:"get_ty",set_tx:"set_tx",get_tx:"get_tx",set_d:"set_d",get_d:"get_d",set_c:"set_c",get_c:"get_c",set_b:"set_b",get_b:"get_b",set_a:"set_a",get_a:"get_a"},_new:function(a,b,c,d,f,g){null==g&&(g=0);null==f&&(f=0);null==d&&(d=1);null==c&&(c=0);null==b&&(b=0);null==a&&(a=1);a=[a,b,0,c,d,0,f,g,1];return null!=a?new Float32Array(a):null},
clone:function(a){return em._new(a[0],a[1],a[3],a[4],a[6],a[7])},concat:function(a,b){var c=a[0]*b[0]+a[1]*b[3];a[1]=a[0]*b[1]+a[1]*b[4];a[0]=c;c=a[3]*b[0]+a[4]*b[3];a[4]=a[3]*b[1]+a[4]*b[4];a[3]=c;c=a[6]*b[0]+a[7]*b[3]+b[6];a[7]=a[6]*b[1]+a[7]*b[4]+b[7];a[6]=c},copyColumnFrom:function(a,b,c){if(2<b)throw J.thrown("Column "+b+" out of bounds (2)");0==b?(a[0]=c.x,a[1]=c.y):1==b?(a[3]=c.x,a[4]=c.y):(a[6]=c.x,a[7]=c.y)},copyColumnTo:function(a,b,c){if(2<b)throw J.thrown("Column "+b+" out of bounds (2)");
0==b?(c.x=a[0],c.y=a[1],c.z=0):1==b?(c.x=a[3],c.y=a[4],c.z=0):(c.x=a[6],c.y=a[7],c.z=1)},copyFrom:function(a,b){a[0]=b[0];a[1]=b[1];a[3]=b[3];a[4]=b[4];a[6]=b[6];a[7]=b[7]},copyRowFrom:function(a,b,c){if(2<b)throw J.thrown("Row "+b+" out of bounds (2)");0==b?(a[0]=c.x,a[3]=c.y,a[6]=c.z):1==b&&(a[1]=c.x,a[4]=c.y,a[7]=c.z)},copyRowTo:function(a,b,c){if(2<b)throw J.thrown("Row "+b+" out of bounds (2)");0==b?(c.x=a[0],c.y=a[3],c.z=a[6]):1==b?(c.x=a[1],c.y=a[4],c.z=a[7]):(c.x=0,c.y=0,c.z=1)},createBox:function(a,
b,c,d,f,g){null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);if(0!=d){var k=Math.cos(d);d=Math.sin(d);a[0]=k*b;a[1]=d*c;a[3]=-d*b;a[4]=k*c}else a[0]=b,a[1]=0,a[3]=0,a[4]=c;a[6]=f;a[7]=g},createGradientBox:function(a,b,c,d,f,g){null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);a[0]=b/1638.4;a[4]=c/1638.4;if(0!=d){var k=Math.cos(d);d=Math.sin(d);a[1]=d*a[4];a[3]=-d*a[0];a[0]*=k;a[4]*=k}else a[1]=0,a[3]=0;a[6]=f+b/2;a[7]=g+c/2},equals:function(a,b){return null!=b&&a[6]==b[6]&&a[7]==b[7]&&a[0]==b[0]&&a[1]==b[1]&&
a[3]==b[3]?a[4]==b[4]:!1},deltaTransformVector:function(a,b,c){null==c&&(c=new yd);c.x=b.x*a[0]+b.y*a[3];c.y=b.x*a[1]+b.y*a[4];return c},fromCairoMatrix3:function(a){return em._new(a.a,a.b,a.c,a.d,a.tx,a.ty)},fromFloat32Array:function(a){if(9!=a.length)throw J.thrown("Expected array of length 9, got "+a.length);return a},identity:function(a){a[0]=1;a[1]=0;a[3]=0;a[4]=1;a[6]=0;a[7]=0},invert:function(a){var b=a[0]*a[4]-a[1]*a[3];if(0==b)a[0]=a[1]=a[3]=a[4]=0,a[6]=-a[6],a[7]=-a[7];else{b=1/b;var c=
a[4]*b;a[4]=a[0]*b;a[0]=c;a[1]*=-b;a[3]*=-b;b=-a[0]*a[6]-a[3]*a[7];a[7]=-a[1]*a[6]-a[4]*a[7];a[6]=b}if(9!=a.length)throw J.thrown("Expected array of length 9, got "+a.length);return a},rotate:function(a,b){var c=Math.cos(b);b=Math.sin(b);var d=a[0]*c-a[1]*b;a[1]=a[0]*b+a[1]*c;a[0]=d;d=a[3]*c-a[4]*b;a[4]=a[3]*b+a[4]*c;a[3]=d;d=a[6]*c-a[7]*b;a[7]=a[6]*b+a[7]*c;a[6]=d},scale:function(a,b,c){a[0]*=b;a[1]*=c;a[3]*=b;a[4]*=c;a[6]*=b;a[7]*=c},setRotation:function(a,b,c){null==c&&(c=1);a[0]=Math.cos(b)*c;
a[3]=Math.sin(b)*c;a[1]=-a[3];a[4]=a[0]},setTo:function(a,b,c,d,f,g,k){a[0]=b;a[1]=c;a[3]=d;a[4]=f;a[6]=g;a[7]=k},toCairoMatrix3:function(a){return new fm(a[0],a[1],a[3],a[4],a[6],a[7])},toString:function(a){return"matrix("+a[0]+", "+a[1]+", "+a[3]+", "+a[4]+", "+a[6]+", "+a[7]+")"},transformRect:function(a,b,c){null==c&&(c=new Uc);var d=a[0]*b.x+a[3]*b.y,f=d,g=a[1]*b.x+a[4]*b.y,k=g,l=a[0]*(b.x+b.width)+a[3]*b.y,m=a[1]*(b.x+b.width)+a[4]*b.y;l<d&&(d=l);m<g&&(g=m);l>f&&(f=l);m>k&&(k=m);l=a[0]*(b.x+
b.width)+a[3]*(b.y+b.height);m=a[1]*(b.x+b.width)+a[4]*(b.y+b.height);l<d&&(d=l);m<g&&(g=m);l>f&&(f=l);m>k&&(k=m);l=a[0]*b.x+a[3]*(b.y+b.height);m=a[1]*b.x+a[4]*(b.y+b.height);l<d&&(d=l);m<g&&(g=m);l>f&&(f=l);m>k&&(k=m);c.setTo(d+l,g+m,f-d,k-g);return c},transformVector:function(a,b,c){null==c&&(c=new yd);c.x=b.x*a[0]+b.y*a[3]+a[6];c.y=b.x*a[1]+b.y*a[4]+a[7];return c},translate:function(a,b,c){a[6]+=b;a[7]+=c},get_a:function(a){return a[0]},set_a:function(a,b){return a[0]=b},get_b:function(a){return a[1]},
set_b:function(a,b){return a[1]=b},get_c:function(a){return a[3]},set_c:function(a,b){return a[3]=b},get_d:function(a){return a[4]},set_d:function(a,b){return a[4]=b},get_tx:function(a){return a[6]},set_tx:function(a,b){return a[6]=b},get_ty:function(a){return a[7]},set_ty:function(a,b){return a[7]=b},get:function(a,b){return a[b]},set:function(a,b,c){return a[b]=c}},wa=function(a,b,c,d,f,g){null==g&&(g=0);null==f&&(f=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=f;this.ty=g};h["openfl.geom.Matrix"]=wa;wa.__name__="openfl.geom.Matrix";wa.prototype={a:null,b:null,c:null,d:null,tx:null,ty:null,__array:null,clone:function(){return new wa(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 J.thrown("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 J.thrown("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 J.thrown("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 J.thrown("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,f){null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);if(0!=c){var g=Math.cos(c);c=Math.sin(c);this.a=g*a;this.b=c*b;this.c=-c*a;this.d=g*b}else this.a=a,this.c=this.b=0,this.d=b;this.tx=d;this.ty=f},createGradientBox:function(a,
b,c,d,f){null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);this.a=a/1638.4;this.d=b/1638.4;if(0!=c){var g=Math.cos(c);c=Math.sin(c);this.b=c*this.d;this.c=-c*this.a;this.a*=g;this.d*=g}else this.c=this.b=0;this.tx=d+a/2;this.ty=f+b/2},deltaTransformPoint:function(a){return new Ya(a.x*this.a+a.y*this.c,a.x*this.b+a.y*this.d)},deltaTransformPointToOutput:function(a,b){return null!=b?(b.setTo(a.x*this.a+a.y*this.c,a.x*this.b+a.y*this.d),b):new Ya(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,f,g){this.a=a;this.b=b;this.c=c;this.d=d;this.tx=f;this.ty=g},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 Ya(a.x*
this.a+a.y*this.c+this.tx,a.x*this.b+a.y*this.d+this.ty)},transformPointToOutput:function(a,b){return null!=b?(b.setTo(a.x*this.a+a.y*this.c+this.tx,a.x*this.b+a.y*this.d+this.ty),b):new Ya(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(){em.setTo(wa.__matrix3,this.a,this.b,this.c,this.d,this.tx,this.ty);return wa.__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__:wa};var Ub=function(a,b,c,d,f,g,k,l){null==l&&(l=0);null==
k&&(k=0);null==g&&(g=0);null==f&&(f=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=f;this.greenOffset=g;this.blueOffset=k;this.alphaOffset=l};h["openfl.geom.ColorTransform"]=Ub;Ub.__name__="openfl.geom.ColorTransform";Ub.__limeColorMatrix=null;Ub.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 Ub(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(){null==Ub.__limeColorMatrix&&(Ub.__limeColorMatrix=new Float32Array(20));Ub.__limeColorMatrix[0]=this.redMultiplier;Ub.__limeColorMatrix[4]=this.redOffset/255;Ub.__limeColorMatrix[6]=this.greenMultiplier;Ub.__limeColorMatrix[9]=this.greenOffset/
255;Ub.__limeColorMatrix[12]=this.blueMultiplier;Ub.__limeColorMatrix[14]=this.blueOffset/255;Ub.__limeColorMatrix[18]=this.alphaMultiplier;Ub.__limeColorMatrix[19]=this.alphaOffset/255;return Ub.__limeColorMatrix},__class__:Ub,__properties__:{set_color:"set_color",get_color:"get_color"}};var jb=function(a,b,c,d,f){null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this._helperPoint=new Ya;this._helperMatrix=new Ze;var g=V._pool.get(),k=0,l=0,m=0,z=0;null==z&&(z=0);null==m&&
(m=0);null==l&&(l=0);null==k&&(k=0);g.x=k;g.y=l;g.width=m;g.height=z;g._inPool=!1;this._bounds=g;this._scrollRect=new Ka;this.initialZoom=1;this.filters=null;k=g=0;null==k&&(k=0);null==g&&(g=0);g=N.pool.get().set(g,k);g._inPool=!1;this._point=g;this._fxShakeAxes=17;this._fxFadeAlpha=this._fxShakeIntensity=this._fxShakeDuration=0;this._fxFadeComplete=null;this._fxFadeIn=!1;k=g=this._fxFadeDuration=0;null==k&&(k=0);null==g&&(g=0);g=N.pool.get().set(g,k);g._inPool=!1;this._scrollTarget=g;this._fxFlashAlpha=
this._fxFadeColor=0;this._fxFlashComplete=null;k=g=this._fxFlashColor=this._fxFlashDuration=0;null==k&&(k=0);null==g&&(g=0);g=N.pool.get().set(g,k);g._inPool=!1;this._flashOffset=g;this._flashPoint=new Ya;this.filtersEnabled=!0;k=g=0;null==k&&(k=0);null==g&&(g=0);g=N.pool.get().set(g,k);g._inPool=!1;this.followLead=g;this.antialiasing=!1;this.color=-1;this.angle=0;this.alpha=1;this._useBlitMatrix=!1;this._blitMatrix=new Ze;this.width=this.height=0;this.pixelPerfectShake=null;this.flashSprite=new Ka;
this.useBgAlphaBlending=!1;k=g=0;null==k&&(k=0);null==g&&(g=0);g=N.pool.get().set(g,k);g._inPool=!1;this.scroll=g;this.followLerp=60/u.updateFramerate;k=g=0;null==k&&(k=0);null==g&&(g=0);g=N.pool.get().set(g,k);g._inPool=!1;this.targetOffset=g;this.x=this.y=this.scaleX=this.scaleY=0;Na.call(this);this.set_x(a);this.set_y(b);this.set_width(0>=c?u.width:c);this.set_height(0>=d?u.height:d);this._flashRect=new ea(0,0,this.width,this.height);this.flashSprite.addChild(this._scrollRect);this._scrollRect.set_scrollRect(new ea);
(this.pixelPerfectRender=u.renderBlit)?(this.screen=new R,this.buffer=new ma(this.width,this.height,!0,0),this.screen.set_pixels(this.buffer),a=this.screen.origin,a.set_x(0),a.set_y(0),this._flashBitmap=new dd(this.buffer),this._scrollRect.addChild(this._flashBitmap),this._fill=new ma(this.width,this.height,!0,0)):(this.canvas=new Ka,this._scrollRect.addChild(this.canvas));this.set_color(-1);this.initialZoom=0==f?jb.defaultZoom:f;this.set_zoom(f);this.updateScrollRect();this.updateFlashOffset();this.updateFlashSpritePosition();
this.updateInternalSpritePositions();this.bgColor=u.cameras.get_bgColor()};h["flixel.FlxCamera"]=jb;jb.__name__="flixel.FlxCamera";jb.__properties__={set_defaultCameras:"set_defaultCameras",get_defaultCameras:"get_defaultCameras"};jb._defaultCameras=null;jb._storageTilesHead=null;jb._storageTrianglesHead=null;jb.get_defaultCameras=function(){return jb._defaultCameras};jb.set_defaultCameras=function(a){return jb._defaultCameras=a};jb.__super__=Na;jb.prototype=x(Na.prototype,{x:null,y:null,scaleX:null,
scaleY:null,totalScaleX:null,totalScaleY:null,style:null,target:null,targetOffset:null,followLerp:null,deadzone:null,minScrollX:null,maxScrollX:null,minScrollY:null,maxScrollY:null,scroll:null,buffer:null,bgColor:null,screen:null,useBgAlphaBlending:null,flashSprite:null,pixelPerfectRender:null,pixelPerfectShake:null,width:null,height:null,zoom:null,viewMarginX:null,viewMarginY:null,_blitMatrix:null,_useBlitMatrix:null,alpha:null,angle:null,color:null,antialiasing:null,followLead:null,filtersEnabled:null,
_flashRect:null,_flashPoint:null,_flashOffset:null,_fxFlashColor:null,_fxFlashDuration:null,_fxFlashComplete:null,_fxFlashAlpha:null,_fxFadeColor:null,_lastTargetPosition:null,_scrollTarget:null,_fxFadeDuration:null,_fxFadeIn:null,_fxFadeComplete:null,_fxFadeAlpha:null,_fxShakeIntensity:null,_fxShakeDuration:null,_fxShakeComplete:null,_fxShakeAxes:null,_point:null,filters:null,initialZoom:null,_fill:null,_flashBitmap:null,_scrollRect:null,_bounds:null,canvas:null,_helperMatrix:null,_helperPoint:null,
_currentDrawItem:null,_headOfDrawStack:null,_headTiles:null,_headTriangles:null,startQuadBatch:function(a,b,c,d,f,g){null==f&&(f=!1);null==c&&(c=!1);var k=Dd.blendToInt(d);if(null!=this._currentDrawItem&&this._currentDrawItem.type==Ki.TILES&&this._headTiles.graphics==a&&this._headTiles.colored==b&&this._headTiles.hasColorOffsets==c&&this._headTiles.blending==k&&this._headTiles.blend==d&&this._headTiles.antialiasing==f&&this._headTiles.shader==g)return this._headTiles;if(null!=jb._storageTilesHead){var l=
jb._storageTilesHead;var m=jb._storageTilesHead.nextTyped;l.reset();jb._storageTilesHead=m}else l=new Li;if(null==a.shader)throw J.thrown("Attempted to queue an invalid FlxDrawItem, did you destroy a cached sprite?");l.graphics=a;l.antialiasing=f;l.colored=b;l.hasColorOffsets=c;l.blending=k;l.blend=d;l.shader=g;l.nextTyped=this._headTiles;this._headTiles=l;null==this._headOfDrawStack&&(this._headOfDrawStack=l);null!=this._currentDrawItem&&(this._currentDrawItem.next=l);return this._currentDrawItem=
l},startTrianglesBatch:function(a,b,c,d,f,g){null==c&&(c=!1);null==b&&(b=!1);var k=Dd.blendToInt(d);return null!=this._currentDrawItem&&this._currentDrawItem.type==Ki.TRIANGLES&&this._headTriangles.graphics==a&&this._headTriangles.antialiasing==b&&this._headTriangles.colored==c&&this._headTriangles.blending==k&&this._headTriangles.blend==d&&this._headTriangles.hasColorOffsets==f&&this._headTriangles.shader==g?this._headTriangles:this.getNewDrawTrianglesItem(a,b,c,d,f,g)},getNewDrawTrianglesItem:function(a,
b,c,d,f,g){null==c&&(c=!1);null==b&&(b=!1);var k=Dd.blendToInt(d);if(null!=jb._storageTrianglesHead){var l=jb._storageTrianglesHead;var m=jb._storageTrianglesHead.nextTyped;l.reset();jb._storageTrianglesHead=m}else l=new ig;l.graphics=a;l.antialiasing=b;l.colored=c;l.blending=k;l.blend=d;l.hasColorOffsets=f;l.shader=g;l.nextTyped=this._headTriangles;this._headTriangles=l;null==this._headOfDrawStack&&(this._headOfDrawStack=l);null!=this._currentDrawItem&&(this._currentDrawItem.next=l);return this._currentDrawItem=
l},clearDrawStack:function(){for(var a=this._headTiles,b;null!=a;)b=a.nextTyped,a.reset(),a.nextTyped=jb._storageTilesHead,jb._storageTilesHead=a,a=b;for(a=this._headTriangles;null!=a;)b=a.nextTyped,a.reset(),a.nextTyped=jb._storageTrianglesHead,jb._storageTrianglesHead=a,a=b;this._headTriangles=this._headTiles=this._headOfDrawStack=this._currentDrawItem=null},render:function(){for(var a=this._headOfDrawStack;null!=a;)a.render(this),a=a.next},drawPixels:function(a,b,c,d,f,g,k){null==g&&(g=!1);if(u.renderBlit)this._helperMatrix.copyFrom(c),
this._useBlitMatrix?(this._helperMatrix.concat(this._blitMatrix),this.buffer.draw(b,this._helperMatrix,null,null,null,g||this.antialiasing)):(this._helperMatrix.translate(-this.viewMarginX,-this.viewMarginY),this.buffer.draw(b,this._helperMatrix,null,f,null,g||this.antialiasing));else{b=null!=d&&Rc.hasRGBMultipliers(d);var l=null!=d&&Rc.hasRGBAOffsets(d);this.startQuadBatch(a.parent,b,l,f,g,k).addQuad(a,c,d)}},copyPixels:function(a,b,c,d,f,g,k,l){null==k&&(k=!1);u.renderBlit?null!=b?this._useBlitMatrix?
(this._helperMatrix.identity(),this._helperMatrix.translate(d.x,d.y),this._helperMatrix.concat(this._blitMatrix),this.buffer.draw(b,this._helperMatrix,null,null,null,k||this.antialiasing)):(this._helperPoint.x=d.x-(this.viewMarginX|0),this._helperPoint.y=d.y-(this.viewMarginY|0),this.buffer.copyPixels(b,c,this._helperPoint,null,null,!0)):null!=a&&a.paint(this.buffer,d,!0):(this._helperMatrix.identity(),this._helperMatrix.translate(d.x+a.offset.x,d.y+a.offset.y),b=null!=f&&Rc.hasRGBMultipliers(f),
c=null!=f&&Rc.hasRGBAOffsets(f),this.startQuadBatch(a.parent,b,c,g,k,l).addQuad(a,this._helperMatrix,f))},drawTriangles:function(a,b,c,d,f,g,k,l,m,z,h){null==m&&(m=!1);null==l&&(l=!1);if(u.renderBlit){if(null==g){var p=jb.renderPoint;p.set_x(0);p.set_y(0);g=p}var Pb=this._bounds,r=p=0,w=this.width,n=this.height;null==n&&(n=0);null==w&&(w=0);null==r&&(r=0);null==p&&(p=0);Pb.x=p;Pb.y=r;Pb.width=w;Pb.height=n;f=b.get_length();h=z=0;Pb=jb.renderRect;Pb.x=0;Pb.y=0;Pb.width=0;Pb.height=0;k=Pb;p=jb.drawVertices;
Pb=jb.drawVertices.get_length();r=p.__tempIndex=0;for(w=[];r<w.length;)n=w[r++],p.insertAt(p.__tempIndex,n),p.__tempIndex++;for(p.splice(p.__tempIndex,Pb);h<f;)p=g.x+b.get(h),Pb=g.y+b.get(h+1),jb.drawVertices.set(z++,p),jb.drawVertices.set(z++,Pb),0==h?(r=Pb,n=w=0,null==n&&(n=0),null==w&&(w=0),null==r&&(r=0),null==p&&(p=0),k.x=p,k.y=r,k.width=w,k.height=n):(p<k.x&&(k.width+=k.x-p,k.x=p),Pb<k.y&&(k.height+=k.y-Pb,k.y=Pb),p>k.x+k.width&&(k.width=p-k.x),Pb>k.y+k.height&&(k.height=Pb-k.y)),h+=2;Pb=g;
Pb._weak&&Pb.put();Pb=this._bounds;b=k.x+k.width>Pb.x&&k.x<Pb.x+Pb.width&&k.y+k.height>Pb.y&&k.y<Pb.y+Pb.height;k._weak&&!k._inPool&&(k._inPool=!0,k._weak=!1,V._pool.putUnsafe(k));if(b)jb.trianglesSprite.get_graphics().clear(),jb.trianglesSprite.get_graphics().beginBitmapFill(a.bitmap,null,l,m),jb.trianglesSprite.get_graphics().drawTriangles(jb.drawVertices,c,d),jb.trianglesSprite.get_graphics().endFill(),this._useBlitMatrix?this._helperMatrix.copyFrom(this._blitMatrix):(this._helperMatrix.identity(),
this._helperMatrix.translate(-this.viewMarginX,-this.viewMarginY)),this.buffer.draw(jb.trianglesSprite,this._helperMatrix);else{p=jb.drawVertices;p.__tempIndex=jb.drawVertices.get_length()-f;r=0;for(w=[];r<w.length;)n=w[r++],p.insertAt(p.__tempIndex,n),p.__tempIndex++;p.splice(p.__tempIndex,f)}k._inPool||(k._inPool=!0,k._weak=!1,V._pool.putUnsafe(k))}else Pb=this._bounds,r=p=0,w=this.width,n=this.height,null==n&&(n=0),null==w&&(w=0),null==r&&(r=0),null==p&&(p=0),Pb.x=p,Pb.y=r,Pb.width=w,Pb.height=
n,l=null!=f&&0!=f.get_length(),p=null!=z&&Rc.hasRGBAOffsets(z),l=l||null!=z&&Rc.hasRGBMultipliers(z),this.startTrianglesBatch(a,m,l,k,p,h).addTriangles(b,c,d,f,g,this._bounds,z)},transformRect:function(a){u.renderBlit&&(a.x+=-this.viewMarginX,a.y+=-this.viewMarginY,this._useBlitMatrix&&(a.x*=this.zoom,a.y*=this.zoom,a.width*=this.zoom,a.height*=this.zoom));return a},transformPoint:function(a){if(u.renderBlit){var b=this.viewMarginX,c=this.viewMarginY;null==c&&(c=0);null==b&&(b=0);a.set_x(a.x-b);a.set_y(a.y-
c);this._useBlitMatrix&&(b=this.zoom,c=null,null==c&&(c=b),a.set_x(a.x*b),a.set_y(a.y*c))}return a},transformVector:function(a){if(u.renderBlit&&this._useBlitMatrix){var b=this.zoom,c=null;null==c&&(c=b);a.set_x(a.x*b);a.set_y(a.y*c)}return a},transformObject:function(a){a.set_scaleX(a.get_scaleX()*this.totalScaleX);a.set_scaleY(a.get_scaleY()*this.totalScaleY);a.set_x(a.get_x()-this.scroll.x*this.totalScaleX);a.set_y(a.get_y()-this.scroll.y*this.totalScaleY);a.set_x(a.get_x()-.5*this.width*(this.scaleX-
this.initialZoom)*u.scaleMode.scale.x);a.set_y(a.get_y()-.5*this.height*(this.scaleY-this.initialZoom)*u.scaleMode.scale.y);return a},destroy:function(){ba.removeChild(this.flashSprite,this._scrollRect);if(u.renderBlit)ba.removeChild(this._scrollRect,this._flashBitmap),this.screen=ba.destroy(this.screen),this._flashBitmap=this.buffer=null,this._fill=ba.dispose(this._fill);else{ba.removeChild(this._scrollRect,this.canvas);if(null!=this.canvas){for(var a=0,b=this.canvas.get_numChildren();a<b;)a++,this.canvas.removeChildAt(0);
this.canvas=null}null!=this._headOfDrawStack&&this.clearDrawStack();this._helperPoint=this._helperMatrix=this._blitMatrix=null}this._bounds=null;this.scroll=ba.put(this.scroll);this.targetOffset=ba.put(this.targetOffset);this.deadzone=ba.put(this.deadzone);this._fxShakeComplete=this._fxFadeComplete=this._fxFlashComplete=this._flashPoint=this._flashRect=this._scrollRect=this.flashSprite=this.target=null;Na.prototype.destroy.call(this)},update:function(a){null!=this.target&&this.updateFollow();this.updateScroll();
this.updateFlash(a);this.updateFade(a);this.flashSprite.set_filters(this.filtersEnabled?this.filters:null);this.updateFlashSpritePosition();this.updateShake(a)},updateScroll:function(){this.bindScrollPos(this.scroll)},bindScrollPos:function(a){var b=null==this.minScrollX?null:this.minScrollX-(this.zoom-1)*this.width/(2*this.zoom),c=null==this.maxScrollX?null:this.maxScrollX+(this.zoom-1)*this.width/(2*this.zoom),d=null==this.minScrollY?null:this.minScrollY-(this.zoom-1)*this.height/(2*this.zoom),
f=null==this.maxScrollY?null:this.maxScrollY+(this.zoom-1)*this.height/(2*this.zoom),g=a.x;c=null!=c?c-this.width:null;b=null!=b&&g<b?b:g;a.set_x(null!=c&&b>c?c:b);g=a.y;c=null!=f?f-this.height:null;b=null!=d&&g<d?d:g;a.set_y(null!=c&&b>c?c:b);return a},updateFollow:function(){if(null==this.deadzone){this.target.getMidpoint(this._point);var a=this._point,b=this.targetOffset,c=b.x,d=b.y;null==d&&(d=0);null==c&&(c=0);a.set_x(a.x+c);a.set_y(a.y+d);d=b;d._weak&&d.put();a=this._scrollTarget;c=this._point.x-
.5*this.width;d=this._point.y-.5*this.height;null==d&&(d=0);null==c&&(c=0);a.set_x(c);a.set_y(d)}else a=this.target.x+this.targetOffset.x,c=this.target.y+this.targetOffset.y,this.style==Ig.SCREEN_BY_SCREEN?(a>=this.scroll.x+(this.width-this.viewMarginX)?this._scrollTarget.set_x(this._scrollTarget.x+(this.width-2*this.viewMarginX)):a+this.target.get_width()<this.scroll.x+this.viewMarginX&&this._scrollTarget.set_x(this._scrollTarget.x-(this.width-2*this.viewMarginX)),c>=this.scroll.y+(this.height-this.viewMarginY)?
this._scrollTarget.set_y(this._scrollTarget.y+(this.height-2*this.viewMarginY)):c+this.target.get_height()<this.scroll.y+this.viewMarginY&&this._scrollTarget.set_y(this._scrollTarget.y-(this.height-2*this.viewMarginY)),this.bindScrollPos(this._scrollTarget)):(d=a-this.deadzone.x,this._scrollTarget.x>d&&this._scrollTarget.set_x(d),d=a+this.target.get_width()-this.deadzone.x-this.deadzone.width,this._scrollTarget.x<d&&this._scrollTarget.set_x(d),d=c-this.deadzone.y,this._scrollTarget.y>d&&this._scrollTarget.set_y(d),
d=c+this.target.get_height()-this.deadzone.y-this.deadzone.height,this._scrollTarget.y<d&&this._scrollTarget.set_y(d)),this.target instanceof R&&(null==this._lastTargetPosition&&(c=this.target.x,d=this.target.y,null==d&&(d=0),null==c&&(c=0),a=c,null==d&&(d=0),null==a&&(a=0),b=N.pool.get().set(a,d),b._inPool=!1,this._lastTargetPosition=b),this._scrollTarget.set_x(this._scrollTarget.x+(this.target.x-this._lastTargetPosition.x)*this.followLead.x),this._scrollTarget.set_y(this._scrollTarget.y+(this.target.y-
this._lastTargetPosition.y)*this.followLead.y),this._lastTargetPosition.set_x(this.target.x),this._lastTargetPosition.set_y(this.target.y));this.followLerp>=60/u.updateFramerate?(a=this.scroll,b=this._scrollTarget,c=b.x,d=b.y,null==d&&(d=0),null==c&&(c=0),a.set_x(c),a.set_y(d),d=b,d._weak&&d.put()):(this.scroll.set_x(this.scroll.x+60/u.updateFramerate*this.followLerp*(this._scrollTarget.x-this.scroll.x)),this.scroll.set_y(this.scroll.y+60/u.updateFramerate*this.followLerp*(this._scrollTarget.y-this.scroll.y)))},
updateFlash:function(a){0<this._fxFlashAlpha&&(this._fxFlashAlpha-=a/this._fxFlashDuration,0>=this._fxFlashAlpha&&null!=this._fxFlashComplete&&this._fxFlashComplete())},updateFade:function(a){0!=this._fxFadeDuration&&(this._fxFadeIn?(this._fxFadeAlpha-=a/this._fxFadeDuration,0>=this._fxFadeAlpha&&(this._fxFadeAlpha=0,this.completeFade())):(this._fxFadeAlpha+=a/this._fxFadeDuration,1<=this._fxFadeAlpha&&(this._fxFadeAlpha=1,this.completeFade())))},completeFade:function(){this._fxFadeDuration=0;null!=
this._fxFadeComplete&&this._fxFadeComplete()},updateShake:function(a){if(0<this._fxShakeDuration)if(this._fxShakeDuration-=a,0>=this._fxShakeDuration)null!=this._fxShakeComplete&&this._fxShakeComplete();else{a=null==this.pixelPerfectShake?this.pixelPerfectRender:this.pixelPerfectShake;var b=this._fxShakeAxes;if(1==b||17==b){b=u.random.float(-1,1)*this._fxShakeIntensity*this.width;a&&(b=Math.round(b));var c=this.flashSprite;c.set_x(c.get_x()+b*this.zoom*u.scaleMode.scale.x)}b=this._fxShakeAxes;if(16==
b||17==b)b=u.random.float(-1,1)*this._fxShakeIntensity*this.height,a&&(b=Math.round(b)),c=this.flashSprite,c.set_y(c.get_y()+b*this.zoom*u.scaleMode.scale.y)}},updateFlashSpritePosition:function(){null!=this.flashSprite&&(this.flashSprite.set_x(this.x*u.scaleMode.scale.x+this._flashOffset.x),this.flashSprite.set_y(this.y*u.scaleMode.scale.y+this._flashOffset.y))},updateFlashOffset:function(){this._flashOffset.set_x(.5*this.width*u.scaleMode.scale.x*this.initialZoom);this._flashOffset.set_y(.5*this.height*
u.scaleMode.scale.y*this.initialZoom)},updateScrollRect:function(){var a=null!=this._scrollRect?this._scrollRect.get_scrollRect():null;null!=a&&(a.x=a.y=0,a.width=this.width*this.initialZoom*u.scaleMode.scale.x,a.height=this.height*this.initialZoom*u.scaleMode.scale.y,this._scrollRect.set_scrollRect(a),this._scrollRect.set_x(-.5*a.width),this._scrollRect.set_y(-.5*a.height))},updateInternalSpritePositions:function(){u.renderBlit?null!=this._flashBitmap&&(this._flashBitmap.set_x(0),this._flashBitmap.set_y(0)):
null!=this.canvas&&(this.canvas.set_x(-.5*this.width*(this.scaleX-this.initialZoom)*u.scaleMode.scale.x),this.canvas.set_y(-.5*this.height*(this.scaleY-this.initialZoom)*u.scaleMode.scale.y),this.canvas.set_scaleX(this.totalScaleX),this.canvas.set_scaleY(this.totalScaleY))},follow:function(a,b,c){null==b&&(b=Ig.LOCKON);null==c&&(c=60/u.updateFramerate);this.style=b;this.target=a;this.set_followLerp(c);this._lastTargetPosition=ba.put(this._lastTargetPosition);this.deadzone=ba.put(this.deadzone);switch(b._hx_index){case 0:c=
b=0;null!=this.target&&(b=this.target.get_width(),c=this.target.get_height());var d=(this.width-b)/2;a=(this.height-c)/2-.25*c;var f=c;null==f&&(f=0);null==b&&(b=0);null==a&&(a=0);null==d&&(d=0);c=V._pool.get();null==f&&(f=0);null==b&&(b=0);null==a&&(a=0);null==d&&(d=0);c.x=d;c.y=a;c.width=b;c.height=f;a=c;a._inPool=!1;this.deadzone=a;break;case 1:b=this.width/8;c=this.height/3;d=(this.width-b)/2;a=(this.height-c)/2-.25*c;f=c;null==f&&(f=0);null==b&&(b=0);null==a&&(a=0);null==d&&(d=0);c=V._pool.get();
null==f&&(f=0);null==b&&(b=0);null==a&&(a=0);null==d&&(d=0);c.x=d;c.y=a;c.width=b;c.height=f;a=c;a._inPool=!1;this.deadzone=a;break;case 2:c=Math.max(this.width,this.height)/4;d=(this.width-c)/2;a=(this.height-c)/2;f=b=c;null==f&&(f=0);null==b&&(b=0);null==a&&(a=0);null==d&&(d=0);c=V._pool.get();null==f&&(f=0);null==b&&(b=0);null==a&&(a=0);null==d&&(d=0);c.x=d;c.y=a;c.width=b;c.height=f;a=c;a._inPool=!1;this.deadzone=a;break;case 3:c=Math.max(this.width,this.height)/8;d=(this.width-c)/2;a=(this.height-
c)/2;f=b=c;null==f&&(f=0);null==b&&(b=0);null==a&&(a=0);null==d&&(d=0);c=V._pool.get();null==f&&(f=0);null==b&&(b=0);null==a&&(a=0);null==d&&(d=0);c.x=d;c.y=a;c.width=b;c.height=f;a=c;a._inPool=!1;this.deadzone=a;break;case 4:a=d=0;b=this.width;f=this.height;null==f&&(f=0);null==b&&(b=0);null==a&&(a=0);null==d&&(d=0);c=V._pool.get();null==f&&(f=0);null==b&&(b=0);null==a&&(a=0);null==d&&(d=0);c.x=d;c.y=a;c.width=b;c.height=f;a=c;a._inPool=!1;this.deadzone=a;break;case 5:this.deadzone=null}},snapToTarget:function(){this.updateFollow();
var a=this.scroll,b=this._scrollTarget,c=b.x,d=b.y;null==d&&(d=0);null==c&&(c=0);a.set_x(c);a.set_y(d);b._weak&&b.put()},focusOn:function(a){var b=this.scroll,c=a.x-.5*this.width,d=a.y-.5*this.height;null==d&&(d=0);null==c&&(c=0);b.set_x(c);b.set_y(d);a._weak&&a.put()},flash:function(a,b,c,d){null==d&&(d=!1);null==b&&(b=1);null==a&&(a=-1);!d&&0<this._fxFlashAlpha||(this._fxFlashColor=a,0>=b&&(b=1E-6),this._fxFlashDuration=b,this._fxFlashComplete=c,this._fxFlashAlpha=1)},fade:function(a,b,c,d,f){null==
f&&(f=!1);null==c&&(c=!1);null==b&&(b=1);null==a&&(a=-16777216);0<this._fxFadeDuration&&!f||(this._fxFadeColor=a,0>=b&&(b=1E-6),this._fxFadeIn=c,this._fxFadeDuration=b,this._fxFadeComplete=d,this._fxFadeAlpha=this._fxFadeIn?.999999:1E-6)},shake:function(a,b,c,d,f){null==d&&(d=!0);null==b&&(b=.5);null==a&&(a=.05);null==f&&(f=17);!d&&0<this._fxShakeDuration||(this._fxShakeIntensity=a,this._fxShakeDuration=b,this._fxShakeComplete=c,this._fxShakeAxes=f)},stopFade:function(){this._fxFadeDuration=this._fxFadeAlpha=
0},stopFlash:function(){this._fxFlashAlpha=0;this.updateFlashSpritePosition()},stopShake:function(){this._fxShakeDuration=0},stopFX:function(){this._fxFlashAlpha=this._fxFadeDuration=this._fxFadeAlpha=0;this.updateFlashSpritePosition();this._fxShakeDuration=0},setFilters:function(a){this.filters=a},copyFrom:function(a){this.setScrollBounds(a.minScrollX,a.maxScrollX,a.minScrollY,a.maxScrollY);this.target=a.target;if(null!=this.target)if(null==a.deadzone)this.deadzone=null;else{if(null==this.deadzone){var b=
V._pool.get(),c=0,d=0,f=0,g=0;null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);b.x=c;b.y=d;b.width=f;b.height=g;b._inPool=!1;this.deadzone=b}b=this.deadzone;a=a.deadzone;b.x=a.x;b.y=a.y;b.width=a.width;b.height=a.height;a._weak&&!a._inPool&&(a._inPool=!0,a._weak=!1,V._pool.putUnsafe(a))}return this},fill:function(a,b,c,d){null==c&&(c=1);null==b&&(b=!0);u.renderBlit?b?(this._fill.fillRect(this._flashRect,a),this.buffer.copyPixels(this._fill,this._flashRect,this._flashPoint,null,null,b)):
this.buffer.fillRect(this._flashRect,a):0!=c&&(b=null==d?this.canvas.get_graphics():d,b.overrideBlendMode(null),b.beginFill(a,c),b.drawRect(this.viewMarginX-1,this.viewMarginY-1,this.width-2*this.viewMarginX+2,this.height-2*this.viewMarginY+2),b.endFill())},drawFX:function(){if(0<this._fxFlashAlpha)if(u.renderBlit){var a=this._fxFlashColor,b=(a>>24&255)/255*this._fxFlashAlpha;b=Math.round(255*b);this.fill(a&16777215|(255<b?255:0>b?0:b)<<24)}else a=(this.color>>24&255)/255*this._fxFlashAlpha,this.fill(this._fxFlashColor&
16777215,!0,a,this.canvas.get_graphics());0<this._fxFadeAlpha&&(u.renderBlit?(a=this._fxFadeColor,b=(a>>24&255)/255*this._fxFadeAlpha,b=Math.round(255*b),this.fill(a&16777215|(255<b?255:0>b?0:b)<<24)):(a=(this._fxFadeColor>>24&255)/255*this._fxFadeAlpha,this.fill(this._fxFadeColor&16777215,!0,a,this.canvas.get_graphics())))},checkResize:function(){if(u.renderBlit){if(this.width!=this.buffer.width||this.height!=this.buffer.height){var a=this.screen.graphic;this.buffer=new ma(this.width,this.height,
!0,0);this.screen.set_pixels(this.buffer);var b=this.screen.origin;b.set_x(0);b.set_y(0);this._flashBitmap.set_bitmapData(this.buffer);this._flashRect.width=this.width;this._flashRect.height=this.height;this._fill=ba.dispose(this._fill);this._fill=new ma(this.width,this.height,!0,0);u.bitmap.removeIfNoUse(a)}this._blitMatrix.identity();this._blitMatrix.translate(-this.viewMarginX,-this.viewMarginY);this._blitMatrix.scale(this.scaleX,this.scaleY);this._useBlitMatrix=this.scaleX<this.initialZoom||this.scaleY<
this.initialZoom}},updateBlitMatrix:function(){this._blitMatrix.identity();this._blitMatrix.translate(-this.viewMarginX,-this.viewMarginY);this._blitMatrix.scale(this.scaleX,this.scaleY);this._useBlitMatrix=this.scaleX<this.initialZoom||this.scaleY<this.initialZoom},setSize:function(a,b){this.set_width(a);this.set_height(b)},setPosition:function(a,b){null==b&&(b=0);null==a&&(a=0);this.set_x(a);this.set_y(b)},setScrollBoundsRect:function(a,b,c,d,f){null==f&&(f=!1);null==d&&(d=0);null==c&&(c=0);null==
b&&(b=0);null==a&&(a=0);if(f){f=u.worldBounds;var g=a,k=b,l=c,m=d;null==m&&(m=0);null==l&&(l=0);null==k&&(k=0);null==g&&(g=0);f.x=g;f.y=k;f.width=l;f.height=m}this.setScrollBounds(a,a+c,b,b+d)},setScrollBounds:function(a,b,c,d){this.minScrollX=a;this.maxScrollX=b;this.minScrollY=c;this.maxScrollY=d;this.updateScroll()},setScale:function(a,b){this.scaleX=a;this.scaleY=b;this.totalScaleX=this.scaleX*u.scaleMode.scale.x;this.totalScaleY=this.scaleY*u.scaleMode.scale.y;u.renderBlit&&(this._blitMatrix.identity(),
this._blitMatrix.translate(-this.viewMarginX,-this.viewMarginY),this._blitMatrix.scale(this.scaleX,this.scaleY),(this._useBlitMatrix=this.scaleX<this.initialZoom||this.scaleY<this.initialZoom)?(this._flashBitmap.set_scaleX(this.initialZoom*u.scaleMode.scale.x),this._flashBitmap.set_scaleY(this.initialZoom*u.scaleMode.scale.y)):(this._flashBitmap.set_scaleX(this.totalScaleX),this._flashBitmap.set_scaleY(this.totalScaleY)));this.viewMarginX=.5*this.width*(this.scaleX-this.initialZoom)/this.scaleX;this.viewMarginY=
.5*this.height*(this.scaleY-this.initialZoom)/this.scaleY;this.updateScrollRect();this.updateInternalSpritePositions();u.cameras.cameraResized.dispatch(this)},onResize:function(){this.updateFlashOffset();this.setScale(this.scaleX,this.scaleY)},getViewRect:function(a){if(null==a){a=V._pool.get();var b=0,c=0,d=0,f=0;null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a.width=d;a.height=f;a._inPool=!1}b=this.viewMarginX;c=this.viewMarginY;d=this.width-2*this.viewMarginX;f=this.height-
2*this.viewMarginY;null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a.width=d;a.height=f;return a},getViewMarginRect:function(a){if(null==a){a=V._pool.get();var b=0,c=0,d=0,f=0;null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a.width=d;a.height=f;a._inPool=!1}b=this.viewMarginX;c=this.viewMarginY;d=this.width-2*this.viewMarginX;f=this.height-2*this.viewMarginY;null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a.width=d;a.height=f;
return a},containsPoint:function(a,b,c){null==c&&(c=0);null==b&&(b=0);b=a.x+b>this.viewMarginX&&a.x<this.width-this.viewMarginX&&a.y+c>this.viewMarginY&&a.y<this.height-this.viewMarginY;a._weak&&a.put();return b},containsRect:function(a){var b=a.x+a.width>this.viewMarginX&&a.x<this.width-this.viewMarginX&&a.y+a.height>this.viewMarginY&&a.y<this.height-this.viewMarginY;a._weak&&!a._inPool&&(a._inPool=!0,a._weak=!1,V._pool.putUnsafe(a));return b},set_followLerp:function(a){var b=60/u.updateFramerate;
a=0>a?0:a;return this.followLerp=null!=b&&a>b?b:a},set_width:function(a){this.width!=a&&0<a&&(this.width=a,this.viewMarginX=.5*this.width*(this.scaleX-this.initialZoom)/this.scaleX,this.updateFlashOffset(),this.updateScrollRect(),this.updateInternalSpritePositions(),u.cameras.cameraResized.dispatch(this));return a},set_height:function(a){this.height!=a&&0<a&&(this.height=a,this.viewMarginY=.5*this.height*(this.scaleY-this.initialZoom)/this.scaleY,this.updateFlashOffset(),this.updateScrollRect(),this.updateInternalSpritePositions(),
u.cameras.cameraResized.dispatch(this));return a},set_zoom:function(a){this.zoom=0==a?jb.defaultZoom:a;this.setScale(this.zoom,this.zoom);return this.zoom},set_alpha:function(a){var b=0>a?0:a;this.alpha=1<b?1:b;u.renderBlit?this._flashBitmap.set_alpha(a):this.canvas.set_alpha(a);return a},set_angle:function(a){this.angle=a;this.flashSprite.set_rotation(a);return a},set_color:function(a){this.color=a;if(u.renderBlit){if(null==this._flashBitmap)return a;var b=this._flashBitmap.get_transform().get_colorTransform()}else b=
this.canvas.get_transform().get_colorTransform();b.redMultiplier=(this.color>>16&255)/255;b.greenMultiplier=(this.color>>8&255)/255;b.blueMultiplier=(this.color&255)/255;u.renderBlit?this._flashBitmap.get_transform().set_colorTransform(b):this.canvas.get_transform().set_colorTransform(b);return a},set_antialiasing:function(a){this.antialiasing=a;u.renderBlit&&(this._flashBitmap.smoothing=a);return a},set_x:function(a){this.x=a;this.updateFlashSpritePosition();return a},set_y:function(a){this.y=a;
this.updateFlashSpritePosition();return a},set_visible:function(a){null!=this.flashSprite&&this.flashSprite.set_visible(a);return this.visible=a},calcOffsetX:function(){this.viewMarginX=.5*this.width*(this.scaleX-this.initialZoom)/this.scaleX},calcOffsetY:function(){this.viewMarginY=.5*this.height*(this.scaleY-this.initialZoom)/this.scaleY},calcMarginX:function(){this.viewMarginX=.5*this.width*(this.scaleX-this.initialZoom)/this.scaleX},calcMarginY:function(){this.viewMarginY=.5*this.height*(this.scaleY-
this.initialZoom)/this.scaleY},get_viewMarginLeft:function(){return this.viewMarginX},get_viewMarginTop:function(){return this.viewMarginY},get_viewMarginRight:function(){return this.width-this.viewMarginX},get_viewMarginBottom:function(){return this.height-this.viewMarginY},get_viewWidth:function(){return this.width-2*this.viewMarginX},get_viewHeight:function(){return this.height-2*this.viewMarginY},get_viewX:function(){return this.scroll.x+this.viewMarginX},get_viewY:function(){return this.scroll.y+
this.viewMarginY},get_viewLeft:function(){return this.scroll.x+this.viewMarginX},get_viewTop:function(){return this.scroll.y+this.viewMarginY},get_viewRight:function(){return this.scroll.x+(this.width-this.viewMarginX)},get_viewBottom:function(){return this.scroll.y+(this.height-this.viewMarginY)},get_viewOffsetX:function(){return this.viewMarginX},set_viewOffsetX:function(a){return this.viewMarginX=a},get_viewOffsetY:function(){return this.viewMarginY},set_viewOffsetY:function(a){return this.viewMarginY=
a},get_viewOffsetWidth:function(){return this.width-this.viewMarginX},get_viewOffsetHeight:function(){return this.height-this.viewMarginY},get__filters:function(){return this.filters},set__filters:function(a){return this.filters=a},get_camera:function(){throw J.thrown("don't reference camera.camera");},set_camera:function(a){throw J.thrown("don't reference camera.camera");},get_cameras:function(){throw J.thrown("don't reference camera.cameras");},set_cameras:function(a){throw J.thrown("don't reference camera.cameras");
},__class__:jb,__properties__:x(Na.prototype.__properties__,{set__filters:"set__filters",get__filters:"get__filters",set_antialiasing:"set_antialiasing",set_color:"set_color",set_angle:"set_angle",set_alpha:"set_alpha",get_viewBottom:"get_viewBottom",get_viewRight:"get_viewRight",get_viewTop:"get_viewTop",get_viewLeft:"get_viewLeft",get_viewY:"get_viewY",get_viewX:"get_viewX",get_viewHeight:"get_viewHeight",get_viewWidth:"get_viewWidth",get_viewMarginBottom:"get_viewMarginBottom",get_viewMarginRight:"get_viewMarginRight",
get_viewMarginTop:"get_viewMarginTop",get_viewMarginLeft:"get_viewMarginLeft",get_viewOffsetHeight:"get_viewOffsetHeight",get_viewOffsetWidth:"get_viewOffsetWidth",set_viewOffsetY:"set_viewOffsetY",get_viewOffsetY:"get_viewOffsetY",set_viewOffsetX:"set_viewOffsetX",get_viewOffsetX:"get_viewOffsetX",set_zoom:"set_zoom",set_height:"set_height",set_width:"set_width",set_followLerp:"set_followLerp",set_y:"set_y",set_x:"set_x"})});var Ig=G["flixel.FlxCameraFollowStyle"]={__ename__:"flixel.FlxCameraFollowStyle",
__constructs__:null,LOCKON:{_hx_name:"LOCKON",_hx_index:0,__enum__:"flixel.FlxCameraFollowStyle",toString:t},PLATFORMER:{_hx_name:"PLATFORMER",_hx_index:1,__enum__:"flixel.FlxCameraFollowStyle",toString:t},TOPDOWN:{_hx_name:"TOPDOWN",_hx_index:2,__enum__:"flixel.FlxCameraFollowStyle",toString:t},TOPDOWN_TIGHT:{_hx_name:"TOPDOWN_TIGHT",_hx_index:3,__enum__:"flixel.FlxCameraFollowStyle",toString:t},SCREEN_BY_SCREEN:{_hx_name:"SCREEN_BY_SCREEN",_hx_index:4,__enum__:"flixel.FlxCameraFollowStyle",toString:t},
NO_DEAD_ZONE:{_hx_name:"NO_DEAD_ZONE",_hx_index:5,__enum__:"flixel.FlxCameraFollowStyle",toString:t}};Ig.__constructs__=[Ig.LOCKON,Ig.PLATFORMER,Ig.TOPDOWN,Ig.TOPDOWN_TIGHT,Ig.SCREEN_BY_SCREEN,Ig.NO_DEAD_ZONE];var Mi=function(a,b,c){this.major=a;this.minor=b;this.patch=c};h["flixel.system.FlxVersion"]=Mi;Mi.__name__="flixel.system.FlxVersion";Mi.prototype={major:null,minor:null,patch:null,toString:function(){var a=Mi.sha;""!=a&&(a="@"+a.substring(0,7));return"HaxeFlixel "+this.major+"."+this.minor+
"."+this.patch+a},__class__:Mi};var gm=function(){this.defaultSoundExtension=".ogg"};h["flixel.system.frontEnds.AssetFrontEnd"]=gm;gm.__name__="flixel.system.frontEnds.AssetFrontEnd";gm.prototype={defaultSoundExtension:null,getAssetUnsafe:function(a,b,c){null==c&&(c=!0);return this.getOpenflAssetUnsafe(a,b,c)},getOpenflAssetUnsafe:function(a,b,c){null==c&&(c=!0);switch(b){case "binary":return xa.getBytes(a);case "font":return xa.getFont(a,c);case "image":return xa.getBitmapData(a,c);case "sound":return xa.getSound(a,
c);case "text":return xa.getText(a)}},getAsset:function(a,b,c,d){null==c&&(c=!0);if(this.exists(a,b)){if(this.isLocal(a,b))return this.getAssetUnsafe(a,b,c);null==d&&(d=La.ERROR);u.log.advanced(""+b+' asset "'+a+'" exists, but only asynchronously',d);return null}null==d&&(d=La.ERROR);u.log.advanced("Could not find a "+b+" asset with ID '"+a+"'.",d);return null},loadAsset:function(a,b,c){null==c&&(c=!0);return this.loadOpenflAsset(a,b,c)},loadOpenflAsset:function(a,b,c){null==c&&(c=!0);switch(b){case "binary":return xa.loadBytes(a);
case "font":return xa.loadFont(a,c);case "image":return xa.loadBitmapData(a,c);case "sound":return xa.loadSound(a,c);case "text":return xa.loadText(a)}},exists:function(a,b){return xa.exists(a,Uh.toOpenFlType(b))},isLocal:function(a,b,c){null==c&&(c=!0);return xa.isLocal(a,Uh.toOpenFlType(b),c)},list:function(a){return xa.list(Uh.toOpenFlType(a))},getBitmapDataUnsafe:function(a,b){null==b&&(b=!1);return this.getAssetUnsafe(a,"image",b)},getBitmapData:function(a,b,c){null==b&&(b=!1);return this.getAsset(a,
"image",b,c)},getSoundUnsafe:function(a,b){null==b&&(b=!0);return this.getAssetUnsafe(a,"sound",b)},getSound:function(a,b,c){null==b&&(b=!0);return this.getAsset(a,"sound",b,c)},getSoundAddExt:function(a,b,c){null==b&&(b=!0);a=O.endsWith(a,".mp3")||O.endsWith(a,".ogg")||O.endsWith(a,".wav")?a:a+this.defaultSoundExtension;null==b&&(b=!0);return this.getAsset(a,"sound",b,c)},addSoundExtIf:function(a){return a},addSoundExt:function(a){return O.endsWith(a,".mp3")||O.endsWith(a,".ogg")||O.endsWith(a,".wav")?
a:a+this.defaultSoundExtension},getTextUnsafe:function(a,b){null==b&&(b=!0);return this.getAssetUnsafe(a,"text",b)},getText:function(a,b,c){null==b&&(b=!0);return this.getAsset(a,"text",b,c)},getXmlUnsafe:function(a,b){null==b&&(b=!0);null==b&&(b=!0);a=this.getAssetUnsafe(a,"text",b);return null!=a?X.parse(a):null},getXml:function(a,b,c){null==b&&(b=!0);null==b&&(b=!0);a=this.getAsset(a,"text",b,c);return null!=a?X.parse(a):null},getJsonUnsafe:function(a,b){null==b&&(b=!0);null==b&&(b=!0);a=this.getAssetUnsafe(a,
"text",b);return null!=a?JSON.parse(a):null},getJson:function(a,b,c){null==b&&(b=!0);null==b&&(b=!0);a=this.getAsset(a,"text",b,c);return null!=a?JSON.parse(a):null},getBytesUnsafe:function(a,b){null==b&&(b=!0);return this.getAssetUnsafe(a,"binary",b)},getBytes:function(a,b,c){null==b&&(b=!0);return this.getAsset(a,"binary",b)},getFontUnsafe:function(a,b){null==b&&(b=!0);return this.getAssetUnsafe(a,"font",b)},getFont:function(a,b,c){null==b&&(b=!0);return this.getAsset(a,"font",b,c)},loadBitmapData:function(a,
b){null==b&&(b=!1);return this.loadAsset(a,"image",b)},loadSound:function(a,b){null==b&&(b=!0);return this.loadAsset(a,"sound",b)},loadText:function(a,b){null==b&&(b=!0);return this.loadAsset(a,"text",b)},loadXml:function(a,b){null==b&&(b=!0);null==b&&(b=!0);a=this.loadAsset(a,"text",b);var c=q(this,this.parseXml),d=new od;a.onComplete(function(a){d.complete(c(a))});a.onError(function(a){d.error(a)});a.onProgress(function(a,b){d.progress(a,b)});return d.future},loadJson:function(a,b){null==b&&(b=
!0);null==b&&(b=!0);a=this.loadAsset(a,"text",b);var c=q(this,this.parseJson),d=new od;a.onComplete(function(a){d.complete(c(a))});a.onError(function(a){d.error(a)});a.onProgress(function(a,b){d.progress(a,b)});return d.future},loadBytes:function(a,b){null==b&&(b=!0);return this.loadAsset(a,"binary",b)},loadFont:function(a,b){null==b&&(b=!0);return this.loadAsset(a,"font",b)},parseJson:function(a){return JSON.parse(a)},parseXml:function(a){return X.parse(a)},wrapFuture:function(a,b){var c=new od;
a.onComplete(function(a){c.complete(b(a))});a.onError(function(a){c.error(a)});a.onProgress(function(a,b){c.progress(a,b)});return c.future},__class__:gm};var hm=function(){this._lastUniqueKeyIndex=0;this.reset()};h["flixel.system.frontEnds.BitmapFrontEnd"]=hm;hm.__name__="flixel.system.frontEnds.BitmapFrontEnd";hm.prototype={_cache:null,_whitePixel:null,_lastUniqueKeyIndex:null,onAssetsReload:function(a){a=Object.keys(this._cache.h);for(var b=a.length,c=0;c<b;){var d=a[c++];d=this._cache.h[d];if(null!=
d&&(null!=d.assetsClass||null!=d.assetsKey))d.onAssetsReload()}},onContext:function(){for(var a=Object.keys(this._cache.h),b=a.length,c=0;c<b;){var d=a[c++];d=this._cache.h[d];if(null!=d&&d.isDumped)d.onContext()}},dumpCache:function(){},undumpCache:function(){},checkCache:function(a){return null!=this._cache.h[a]},create:function(a,b,c,d,f){null==d&&(d=!1);return lc.fromRectangle(a,b,c,d,f)},add:function(a,b,c){null==b&&(b=!1);return a instanceof lc?lc.fromGraphic(a,b,c):a instanceof ma?lc.fromBitmapData(a,
b,c):lc.fromAssetKey(M.string(a),b,c)},addGraphic:function(a){return this._cache.h[a.key]=a},get:function(a){return this._cache.h[a]},findKeyForBitmap:function(a){for(var b=Object.keys(this._cache.h),c=b.length,d=0;d<c;){var f=b[d++],g=this._cache.h[f];if(null!=g&&g.bitmap==a)return f}return null},getKeyForClass:function(a){return a.__name__},generateKey:function(a,b,c){null==c&&(c=!1);null==b&&(b=a);if(c||null==b)b=this.getUniqueKey(b);return b},getUniqueKey:function(a){null==a&&(a="pixels");if(null==
this._cache.h[a])return a;var b=this._lastUniqueKeyIndex;do{++b;var c=a+b}while(null!=this._cache.h[c]);this._lastUniqueKeyIndex=b;return c},getKeyWithSpacesAndBorders:function(a,b,c,d,f){null!=f&&(a+="_Region:"+f.x+"_"+f.y+"_"+f.width+"_"+f.height);null!=b&&(a+="_FrameSize:"+b.x+"_"+b.y);null!=c&&(a+="_Spaces:"+c.x+"_"+c.y);null!=d&&(a+="_Border:"+d.x+"_"+d.y);return a},remove:function(a){if(null!=a){var b=a.key;if(null!=b){xa.cache.removeBitmapData(b);var c=this._cache;Object.prototype.hasOwnProperty.call(c.h,
b)&&delete c.h[b]}null!=a.shader&&a.destroy()}},removeByKey:function(a){if(null!=a){var b=this._cache.h[a];if(null!=a){xa.cache.removeBitmapData(a);var c=this._cache;Object.prototype.hasOwnProperty.call(c.h,a)&&delete c.h[a]}null!=b&&b.destroy()}},removeIfNoUse:function(a){null==a||0!=a.useCount||a.persist||this.remove(a)},clearCache:function(){if(null==this._cache)this._cache=new Ba;else for(var a=Object.keys(this._cache.h),b=a.length,c=0;c<b;){var d=a[c++],f=this._cache.h[d];if(null!=f&&!f.persist&&
0>=f.useCount){if(null!=d){xa.cache.removeBitmapData(d);var g=this._cache;Object.prototype.hasOwnProperty.call(g.h,d)&&delete g.h[d]}f.destroy()}}},removeKey:function(a){if(null!=a){xa.cache.removeBitmapData(a);var b=this._cache;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]}},reset:function(){if(null==this._cache)this._cache=new Ba;else for(var a=Object.keys(this._cache.h),b=a.length,c=0;c<b;){var d=a[c++],f=this._cache.h[d];if(null!=d){xa.cache.removeBitmapData(d);var g=this._cache;
Object.prototype.hasOwnProperty.call(g.h,d)&&delete g.h[d]}null!=f&&f.destroy()}},clearUnused:function(){for(var a=Object.keys(this._cache.h),b=a.length,c=0;c<b;){var d=a[c++],f=this._cache.h[d];null!=f&&0>=f.useCount&&!f.persist&&f.destroyOnNoUse&&this.removeByKey(d)}},get_maxTextureSize:function(){return ha.get_current().stage.window.context.attributes.hardware?r.context.getParameter(3379):-1},get_whitePixel:function(){if(null==this._whitePixel){var a=new ma(10,10,!0,-1);a=u.bitmap.add(a,!0,"whitePixels");
a.persist=!0;this._whitePixel=a.get_imageFrame().get_frame()}return this._whitePixel},__class__:hm,__properties__:{get_whitePixel:"get_whitePixel",get_maxTextureSize:"get_maxTextureSize"}};var im=function(){};h["flixel.system.frontEnds.BitmapLogFrontEnd"]=im;im.__name__="flixel.system.frontEnds.BitmapLogFrontEnd";im.prototype={add:function(a,b){},clear:function(){},clearAt:function(a){},viewCache:function(){},__class__:im};var jm=function(){this._cameraRect=new ea;this.useBufferLocking=!1;this.cameraResized=
new md;this.cameraRemoved=new md;this.cameraAdded=new md;this.defaults=[];this.list=[];jb._defaultCameras=this.defaults};h["flixel.system.frontEnds.CameraFrontEnd"]=jm;jm.__name__="flixel.system.frontEnds.CameraFrontEnd";jm.prototype={list:null,defaults:null,cameraAdded:null,cameraRemoved:null,cameraResized:null,useBufferLocking:null,_cameraRect:null,add:function(a,b){null==b&&(b=!0);u.game.addChildAt(a.flashSprite,u.game.getChildIndex(u.game._inputContainer));this.list.push(a);b&&this.defaults.push(a);
a.ID=this.list.length-1;this.cameraAdded.dispatch(a);return a},insert:function(a,b,c){null==c&&(c=!0);0>b&&(b+=this.list.length);if(b>=this.list.length)return this.add(a);var d=u.game.getChildIndex(this.list[b].flashSprite);u.game.addChildAt(a.flashSprite,d);this.list.splice(b,0,a);c&&this.defaults.push(a);for(c=this.list.length;b<c;)d=b++,this.list[d].ID=d;this.cameraAdded.dispatch(a);return a},remove:function(a,b){null==b&&(b=!0);var c=this.list.indexOf(a);if(null!=a&&-1!=c){u.game.removeChild(a.flashSprite);
this.list.splice(c,1);y.remove(this.defaults,a);if(u.renderTile){c=0;for(var d=this.list.length;c<d;){var f=c++;this.list[f].ID=f}}b&&a.destroy();this.cameraRemoved.dispatch(a)}else u.log.advanced("FlxG.cameras.remove(): The camera you attempted to remove is not a part of the game.",La.WARNING,!0)},setDefaultDrawTarget:function(a,b){if(-1==this.list.indexOf(a))u.log.advanced("FlxG.cameras.setDefaultDrawTarget(): The specified camera is not a part of the game.",La.WARNING,!0);else{var c=this.defaults.indexOf(a);
b&&-1==c?this.defaults.push(a):b||this.defaults.splice(c,1)}},reset:function(a){for(;0<this.list.length;)this.remove(this.list[0]);null==a&&(a=new jb(0,0,u.width,u.height));u.camera=this.add(a);a.ID=0;jb._defaultCameras=this.defaults},flash:function(a,b,c,d){null==d&&(d=!1);null==b&&(b=1);null==a&&(a=-1);for(var f=0,g=this.list;f<g.length;){var k=g[f];++f;k.flash(a,b,c,d)}},fade:function(a,b,c,d,f){null==f&&(f=!1);null==c&&(c=!1);null==b&&(b=1);null==a&&(a=-16777216);for(var g=0,k=this.list;g<k.length;){var l=
k[g];++g;l.fade(a,b,c,d,f)}},shake:function(a,b,c,d,f){null==d&&(d=!0);null==b&&(b=.5);null==a&&(a=.05);for(var g=0,k=this.list;g<k.length;){var l=k[g];++g;l.shake(a,b,c,d,f)}},lock:function(){for(var a=0,b=this.list;a<b.length;){var c=b[a];++a;null!=c&&c.exists&&c.visible&&(u.renderBlit&&(c.checkResize(),this.useBufferLocking&&c.buffer.lock()),u.renderTile&&(c.clearDrawStack(),c.canvas.get_graphics().clear()),u.renderBlit?(c.fill(c.bgColor,c.useBgAlphaBlending),c.screen.dirty=!0):c.fill(c.bgColor&
16777215,c.useBgAlphaBlending,(c.bgColor>>24&255)/255))}},render:function(){if(u.renderTile)for(var a=0,b=this.list;a<b.length;){var c=b[a];++a;null!=c&&c.exists&&c.visible&&c.render()}},unlock:function(){for(var a=0,b=this.list;a<b.length;){var c=b[a];++a;null!=c&&c.exists&&c.visible&&(c.drawFX(),u.renderBlit&&(this.useBufferLocking&&c.buffer.unlock(),c.screen.dirty=!0))}},update:function(a){for(var b=0,c=this.list;b<c.length;){var d=c[b];++b;null!=d&&d.exists&&d.active&&d.update(a)}},resize:function(){for(var a=
0,b=this.list;a<b.length;){var c=b[a];++a;c.onResize()}},get_bgColor:function(){return null==u.camera?-16777216:u.camera.bgColor},set_bgColor:function(a){for(var b=0,c=this.list;b<c.length;){var d=c[b];++b;d.bgColor=a}return a},__class__:jm,__properties__:{set_bgColor:"set_bgColor",get_bgColor:"get_bgColor"}};var km=function(){this.autoPause=this.stepAfterCommand=!0};h["flixel.system.frontEnds.ConsoleFrontEnd"]=km;km.__name__="flixel.system.frontEnds.ConsoleFrontEnd";km.prototype={autoPause:null,
stepAfterCommand:null,registerFunction:function(a,b){},registerObject:function(a,b){},removeObject:function(a){},removeFunction:function(a){},removeByAlias:function(a){},registerClass:function(a){},removeClass:function(a){},registerEnum:function(a){},removeEnum:function(a){},__class__:km};var lm=function(){this.visible=!1;this.visibilityChanged=new Xd;this.drawDebugChanged=new Xd;this.drawDebug=!1;this.toggleKeys=[113,192,220];this.precision=3};h["flixel.system.frontEnds.DebuggerFrontEnd"]=lm;lm.__name__=
"flixel.system.frontEnds.DebuggerFrontEnd";lm.prototype={precision:null,toggleKeys:null,drawDebug:null,drawDebugChanged:null,visibilityChanged:null,visible:null,setLayout:function(a){},resetLayout:function(){},addButton:function(a,b,c,d,f){return null},track:function(a,b){return null},addTrackerProfile:function(a){},removeButton:function(a,b){},set_drawDebug:function(a){return this.drawDebug==a?this.drawDebug:this.drawDebug=a},set_visible:function(a){return this.visible==a?this.visible:this.visible=
a},__class__:lm,__properties__:{set_visible:"set_visible",set_drawDebug:"set_drawDebug"}};var mm=function(){this.browser=this.getBrowser();this.platform=this.getPlatform();this.onMobile=this.getOnMobile()};h["flixel.system.frontEnds.HTML5FrontEnd"]=mm;mm.__name__="flixel.system.frontEnds.HTML5FrontEnd";mm.prototype={browser:null,platform:null,onMobile:null,browserPosition:null,getBrowser:function(){return this.userAgentContains(" OPR/")?xf.OPERA:this.userAgentContains("chrome",!0)?xf.CHROME:"Netscape"==
B.navigator.appName?xf.FIREFOX:document.documentMode?xf.INTERNET_EXPLORER:0<Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")?xf.SAFARI:xf.UNKNOWN},getPlatform:function(){return this.userAgentContains("Win")?Yd.WINDOWS:this.userAgentContains("IEMobile")?Yd.WINDOWS_PHONE:this.userAgentContains("Android")?Yd.ANDROID:this.userAgentContains("Linux")?Yd.LINUX:this.userAgentContains("BlackBerry")?Yd.BLACKBERRY:this.userAgentContains("iPhone")?Yd.IOS(Ni.IPHONE):this.userAgentContains("iPad")?
Yd.IOS(Ni.IPAD):this.userAgentContains("iPod")?Yd.IOS(Ni.IPOD):this.userAgentContains("Mac")?Yd.MAC:Yd.UNKNOWN},getOnMobile:function(){switch(this.platform._hx_index){case 3:case 4:case 5:return!0;case 6:return!0;default:return!1}},userAgentContains:function(a,b){null==b&&(b=!1);var c=B.navigator.userAgent;b&&(c=c.toLowerCase());return-1!=c.indexOf(a)},get_browserPosition:function(){if(null==this.browserPosition){var a=0,b=0;null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);b=N.pool.get().set(a,
b);b._inPool=!1;this.browserPosition=b}var c=this.browserPosition;a=window.screenX;b=window.screenY;null==b&&(b=0);null==a&&(a=0);c.set_x(a);c.set_y(b);return this.browserPosition},get_browserWidth:function(){return window.innerWidth},get_browserHeight:function(){return window.innerHeight},__class__:mm,__properties__:{get_browserPosition:"get_browserPosition",get_browserHeight:"get_browserHeight",get_browserWidth:"get_browserWidth"}};var nm=function(){this.resetOnStateSwitch=!0;this.list=[]};h["flixel.system.frontEnds.InputFrontEnd"]=
nm;nm.__name__="flixel.system.frontEnds.InputFrontEnd";nm.prototype={addUniqueType_add_T:function(a){for(var b=0,c=this.list;b<c.length;){var d=c[b];++b;var f=!1;null==f&&(f=!0);if(ab.getClassName(a,f)==ab.getClassName(d,f))return a}this.list.push(a);return a},addInput_flixel_input_gamepad_FlxGamepadManager:function(a){-1==this.list.indexOf(a)&&this.list.push(a);return a},addInput_flixel_input_touch_FlxTouchManager:function(a){-1==this.list.indexOf(a)&&this.list.push(a);return a},addInput_flixel_input_mouse_FlxMouse:function(a){-1==
this.list.indexOf(a)&&this.list.push(a);return a},replace_flixel_input_mouse_FlxMouse:function(a,b,c){null==c&&(c=!1);var d=this.list.indexOf(a);if(-1==d)return null;c&&a.destroy();return this.list[d]=b},addUniqueType_flixel_input_mouse_FlxMouse:function(a){for(var b=0,c=this.list;b<c.length;){var d=c[b];++b;var f=!1;null==f&&(f=!0);if(ab.getClassName(a,f)==ab.getClassName(d,f))return a}this.list.push(a);return a},addInput_flixel_input_keyboard_FlxKeyboard:function(a){-1==this.list.indexOf(a)&&this.list.push(a);
return a},list:null,resetOnStateSwitch:null,reset:function(){for(var a=0,b=this.list;a<b.length;){var c=b[a];++a;c.reset()}},update:function(){for(var a=0,b=this.list;a<b.length;){var c=b[a];++a;c.update()}},onFocus:function(){for(var a=0,b=this.list;a<b.length;){var c=b[a];++a;c.onFocus()}},onFocusLost:function(){for(var a=0,b=this.list;a<b.length;){var c=b[a];++a;c.onFocusLost()}},onStateSwitch:function(){this.resetOnStateSwitch&&this.reset()},destroy:function(){for(var a=0,b=this.list;a<b.length;){var c=
b[a];++a;ba.destroy(c)}},__class__:nm};var om=function(){this.redirectTraces=!1;this._standardTraceFunction=gg.trace};h["flixel.system.frontEnds.LogFrontEnd"]=om;om.__name__="flixel.system.frontEnds.LogFrontEnd";om.prototype={redirectTraces:null,_standardTraceFunction:null,add:function(a){this.advanced(a,La.NORMAL)},warn:function(a){this.advanced(a,La.WARNING,!0)},error:function(a){this.advanced(a,La.ERROR,!0)},notice:function(a){this.advanced(a,La.NOTICE)},advanced:function(a,b,c){null==b&&(b=La.NORMAL);
c=a instanceof Array?a:[a];b.onLog.dispatch(a);if(b.throwException)throw J.thrown(b.toLogString(c));},clear:function(){},set_redirectTraces:function(a){gg.trace=a?q(this,this.processTraceData):this._standardTraceFunction;return this.redirectTraces=a},processTraceData:function(a,b){a=[a];if(null!=b.customParams){var c=0;for(b=b.customParams;c<b.length;){var d=b[c];++c;a.push(d)}}this.advanced(a,La.NORMAL)},__class__:om,__properties__:{set_redirectTraces:"set_redirectTraces"}};var gg=function(){};h["haxe.Log"]=
gg;gg.__name__="haxe.Log";gg.formatOutput=function(a,b){var c=M.string(a);if(null==b)return c;var d=b.fileName+":"+b.lineNumber;if(null!=b.customParams){var f=0;for(b=b.customParams;f<b.length;)a=b[f],++f,c+=", "+M.string(a)}return d+": "+c};gg.trace=function(a,b){a=gg.formatOutput(a,b);"undefined"!=typeof console&&null!=console.log&&console.log(a)};var na=function(){};h["js.Boot"]=na;na.__name__="js.Boot";na.getClass=function(a){if(null==a)return null;if(a instanceof Array)return Array;var b=a.__class__;
if(null!=b)return b;a=na.__nativeClassName(a);return null!=a?na.__resolveNativeClass(a):null};na.__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=G[a.__enum__].__constructs__[a._hx_index];c=d._hx_name;if(d.__params__){b+="\t";var f=[],g=0;for(d=d.__params__;g<d.length;){var k=d[g];g+=1;f.push(na.__string_rec(a[k],b))}return c+
"("+f.join(",")+")"}return c}if(a instanceof Array){c="[";b+="\t";f=0;for(g=a.length;f<g;)d=f++,c+=(0<d?",":"")+na.__string_rec(a[d],b);return c+"]"}try{f=a.toString}catch(l){return db.lastError=l,"???"}if(null!=f&&f!=Object.toString&&"function"==typeof f&&(c=a.toString(),"[object Object]"!=c))return c;c="{\n";b+="\t";f=null!=a.hasOwnProperty;g=null;for(g in a)f&&!a.hasOwnProperty(g)||"prototype"==g||"__class__"==g||"__super__"==g||"__interfaces__"==g||"__properties__"==g||(2!=c.length&&(c+=", \n"),
c+=b+g+" : "+na.__string_rec(a[g],b));b=b.substring(1);return c+("\n"+b+"}");case "string":return a;default:return String(a)}};na.__interfLoop=function(a,b){if(null==a)return!1;if(a==b)return!0;var c=a.__interfaces__;if(null!=c)for(var d=0,f=c.length;d<f;){var g=d++;g=c[g];if(g==b||na.__interfLoop(g,b))return!0}return na.__interfLoop(a.__super__,b)};na.__instanceof=function(a,b){if(null==b)return!1;switch(b){case Array:return a instanceof Array;case Po:return"boolean"==typeof a;case bp:return null!=
a;case Qo:return"number"==typeof a;case pm:return"number"==typeof a?(a|0)===a:!1;case String:return"string"==typeof a;default:if(null!=a)if("function"==typeof b){if(na.__downcastCheck(a,b))return!0}else{if("object"==typeof b&&na.__isNativeObj(b)&&a instanceof b)return!0}else return!1;return b==$e&&null!=a.__name__||b==Xn&&null!=a.__ename__?!0:null!=a.__enum__?G[a.__enum__]==b:!1}};na.__downcastCheck=function(a,b){return a instanceof b?!0:b.__isInterface__?na.__interfLoop(na.getClass(a),b):!1};na.__implements=
function(a,b){return na.__interfLoop(na.getClass(a),b)};na.__cast=function(a,b){if(null==a||na.__instanceof(a,b))return a;throw J.thrown("Cannot cast "+M.string(a)+" to "+M.string(b));};na.__toStr=null;na.__nativeClassName=function(a){a=na.__toStr.call(a).slice(8,-1);return"Object"==a||"Function"==a||"Math"==a||"JSON"==a?null:a};na.__isNativeObj=function(a){return null!=na.__nativeClassName(a)};na.__resolveNativeClass=function(a){return B[a]};var jg=function(a){this.internalSeed=1;this._floatNormalRho=
0;this._twoPI=2*Math.PI;this._floatNormalRand1=this._floatNormalRand2=0;this._hasFloatNormalSpare=!1;this.initialSeed=1;null!=a?(a=1>a?1:a,a=(2147483646<a?2147483646:a)|0):(a=2147483647*Math.random()|0,a=1>a?1:a,a=(2147483646<a?2147483646:a)|0,a=1>a?1:a,a=(2147483646<a?2147483646:a)|0);a=1>a?1:a;this.initialSeed=(this.internalSeed=(2147483646<a?2147483646:a)|0)|0};h["flixel.math.FlxRandom"]=jg;jg.__name__="flixel.math.FlxRandom";jg.rangeBound=function(a){a=1>a?1:a;return(2147483646<a?2147483646:a)|
0};jg.prototype={getObject_flixel_group_FlxTypedGroup_T:function(a,b,c,d){null==c&&(c=0);var f=null;if(0!=a.length){if(null==b){f=[];for(var g=0,k=a.length;g<k;)g++,f.push(1);b=f}null==d&&(d=a.length-1);f=a.length-1;g=0>c?0:c;c=(null!=f&&g>f?f:g)|0;f=a.length-1;g=0>d?0:d;d=(null!=f&&g>f?f:g)|0;d<c&&(c+=d,d=c-d,c-=d);d>b.length-1&&(d=b.length-1);f=[];g=c;for(k=d+1;g<k;)d=g++,f.push(b[d]);jg._arrayFloatHelper=f;f=a[c+this.weightedPick(jg._arrayFloatHelper)]}return f},initialSeed:null,resetInitialSeed:function(){var a=
2147483647*Math.random()|0;a=1>a?1:a;a=(2147483646<a?2147483646:a)|0;a=1>a?1:a;a=(2147483646<a?2147483646:a)|0;a=1>a?1:a;return this.initialSeed=(this.internalSeed=(2147483646<a?2147483646:a)|0)|0},int:function(a,b,c){null==b&&(b=2147483647);null==a&&(a=0);if(0==a&&2147483647==b&&null==c)return(this.internalSeed=48271*this.internalSeed%2147483647)|0;if(a==b)return a;a>b&&(a+=b,b=a-b,a-=b);if(null==c)return Math.floor(a+(this.internalSeed=48271*this.internalSeed%2147483647)/2147483647*(b-a+1));do var d=
Math.floor(a+(this.internalSeed=48271*this.internalSeed%2147483647)/2147483647*(b-a+1));while(0<=c.indexOf(d));return d},float:function(a,b,c){null==b&&(b=1);null==a&&(a=0);if(0==a&&1==b&&null==c)return(this.internalSeed=48271*this.internalSeed%2147483647)/2147483647;if(a==b)var d=a;else if(a>b&&(a+=b,b=a-b,a-=b),null==c)d=a+(this.internalSeed=48271*this.internalSeed%2147483647)/2147483647*(b-a);else{do d=a+(this.internalSeed=48271*this.internalSeed%2147483647)/2147483647*(b-a);while(0<=c.indexOf(d))
}return d},_hasFloatNormalSpare:null,_floatNormalRand1:null,_floatNormalRand2:null,_twoPI:null,_floatNormalRho:null,floatNormal:function(a,b){null==b&&(b=1);null==a&&(a=0);if(this._hasFloatNormalSpare)return this._hasFloatNormalSpare=!1,b*=this._floatNormalRho,a+b*this._floatNormalRand2;this._hasFloatNormalSpare=!0;var c=this._twoPI*((this.internalSeed=48271*this.internalSeed%2147483647)/2147483647);this._floatNormalRho=Math.sqrt(-2*Math.log(1-(this.internalSeed=48271*this.internalSeed%2147483647)/
2147483647));b*=this._floatNormalRho;this._floatNormalRand1=Math.cos(c);this._floatNormalRand2=Math.sin(c);return a+b*this._floatNormalRand1},bool:function(a){null==a&&(a=50);return this.float(0,100)<a},sign:function(a){null==a&&(a=50);null==a&&(a=50);return this.float(0,100)<a?1:-1},weightedPick:function(a){for(var b=0,c=0,d=0;d<a.length;){var f=a[d];++d;b+=f}b=this.float(0,b);d=0;for(var g=a.length;d<g;){f=d++;if(b<a[f]){c=f;break}b-=a[f]}return c},color:function(a,b,c,d){null==d&&(d=!1);if(null==
a&&null==b){var f=this.int(0,255);var g=this.int(0,255);d=this.int(0,255);c=null==c?this.int(0,255):c}else null==b?(f=this.int(a>>16&255,255),g=d?f:this.int(a>>8&255,255),d=d?f:this.int(a&255,255),c=null==c?this.int(a>>24&255,255):c):null==a?(f=this.int(0,b>>16&255),g=d?f:this.int(0,b>>8&255),d=d?f:this.int(0,b&255),c=null==c?this.int(0,b>>24&255):c):(f=this.int(a>>16&255,b>>16&255),g=d?f:this.int(a>>8&255,b>>8&255),d=d?f:this.int(a&255,b&255),c=null==c?this.int(a>>24&255,b>>24&255):c);null==c&&(c=
255);a=mb._new();null==c&&(c=255);a=(a&-16711681|(255<f?255:0>f?0:f)<<16)&-65281|(255<g?255:0>g?0:g)<<8;a&=-256;a|=255<d?255:0>d?0:d;a&=16777215;return a|=(255<c?255:0>c?0:c)<<24},generate:function(){return this.internalSeed=48271*this.internalSeed%2147483647},internalSeed:null,set_initialSeed:function(a){a=1>a?1:a;a=(2147483646<a?2147483646:a)|0;a=1>a?1:a;return this.initialSeed=(this.internalSeed=(2147483646<a?2147483646:a)|0)|0},get_currentSeed:function(){return this.internalSeed|0},set_currentSeed:function(a){a=
1>a?1:a;return(this.internalSeed=(2147483646<a?2147483646:a)|0)|0},__class__:jg,__properties__:{set_currentSeed:"set_currentSeed",get_currentSeed:"get_currentSeed",set_initialSeed:"set_initialSeed"}};var ee=function(){this.status=af.EMPTY};h["flixel.util.FlxSave"]=ee;ee.__name__="flixel.util.FlxSave";ee.__interfaces__=[D];ee.hasInvalidChars=function(a){return!0};ee.validate=function(a){return a};ee.validateAndWarn=function(a,b){return ee.validate(a)};ee.resolveFlixelClasses=function(a){return Vc.__resolveClass(a)};
ee.prototype={data:null,status:null,_sharedObject:null,destroy:function(){this._sharedObject=null;this.status=af.EMPTY;this.data=null},bind:function(a,b,c){this.destroy();a=ee.validateAndWarn(a,"name");null!=b&&(b=ee.validateAndWarn(b,"path"));try{var d=Wc.getLocal(a,b);switch(d._hx_index){case 0:var f=d.obj;this._sharedObject=f;this.data=this._sharedObject.data;this.status=af.BOUND(a,b);return!0;case 1:var g=d.type,k=d.obj;if(3==g._hx_index){var l=g.rawData,m=g.exception;f=k;if(null!=c){var z=c(l,
m);if(null==z)return this.status=af.LOAD_ERROR(Lg.PARSING(l,m)),!1;this._sharedObject=f;this.data=z;f.data=z;this.status=af.BOUND(a,b);return!0}var h=g;this._sharedObject=k;this.status=af.LOAD_ERROR(h);return!1}h=g;this._sharedObject=k;this.status=af.LOAD_ERROR(h);return!1}}catch(p){g=J.caught(p);if(g instanceof sc)return u.log.advanced("Error:"+g.get_message()+' name:"'+a+'", path:"'+b+'".',La.ERROR,!0),this.destroy(),!1;throw p;}},mergeDataFrom:function(a,b,c,d,f){null==f&&(f=0);null==d&&(d=!0);
null==c&&(c=!1);if(!this.checkStatus())return!1;var g=new ee;if(g.bind(a,b))return a=this.mergeData(g.data,c,f),d&&g.erase(),g.destroy(),a;g.destroy();return!1},mergeData:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=!1,f=0,g=la.fields(a);f<g.length;){var k=g[f];++f;d=!0;if(b||!Object.prototype.hasOwnProperty.call(this.data,k))this.data[k]=la.field(a,k)}return d?this.flush(c):!0},close:function(a){null==a&&(a=0);a=this.flush(a);this.destroy();return a},flush:function(a){null==a&&(a=0);
if(!this.checkStatus())return!1;try{0!=this._sharedObject.flush(a)&&(this.status=af.ERROR("FlxSave is requesting extra storage space."))}catch(b){if(J.caught(b)instanceof sc)this.status=af.ERROR("There was an problem flushing the save data.");else throw b;}this.checkStatus();return 1==this.status._hx_index?!0:!1},erase:function(){if(!this.checkStatus())return!1;this._sharedObject.clear();this.data={};return!0},checkStatus:function(){var a=this.status;switch(a._hx_index){case 0:u.log.advanced("You must call save.bind() before you can read or write data.",
La.WARNING,!0);break;case 1:return!0;case 2:u.log.advanced(a.msg,La.ERROR,!0);break;case 3:switch(a=a.type,a._hx_index){case 0:var b=a.name;a=a.message;u.log.advanced('Invalid name:"'+b+'", '+(null==a?"":a)+".",La.ERROR,!0);break;case 1:b=a.path;a=a.message;u.log.advanced('Invalid path:"'+b+'", '+(null==a?"":a)+".",La.ERROR,!0);break;case 2:a=a.exception;u.log.advanced("IO ERROR: "+a.get_message(),La.ERROR,!0);break;case 3:b=a.rawData,a=a.exception,u.log.advanced('Error parsing "'+b+'", '+a.get_message()+
".",La.ERROR,!0)}}return!1},get_name:function(){var a=this.status;return 1==a._hx_index?a.name:null},get_path:function(){var a=this.status;return 1==a._hx_index?a.path:null},get_isBound:function(){return 1==this.status._hx_index?!0:!1},isEmpty:function(){return null!=this.data?0==la.fields(this.data).length:!0},__class__:ee,__properties__:{get_isBound:"get_isBound",get_path:"get_path",get_name:"get_name"}};var Mg=function(){this.verticalAlign=qm.CENTER;this.horizontalAlign=rm.CENTER;var a=0,b=0;null==
b&&(b=0);null==a&&(a=0);a=N.pool.get().set(a,b);a._inPool=!1;this.deviceSize=a;b=a=0;null==b&&(b=0);null==a&&(a=0);a=N.pool.get().set(a,b);a._inPool=!1;this.gameSize=a;b=a=0;null==b&&(b=0);null==a&&(a=0);a=N.pool.get().set(a,b);a._inPool=!1;this.scale=a;b=a=0;null==b&&(b=0);null==a&&(a=0);a=N.pool.get().set(a,b);a._inPool=!1;this.offset=a};h["flixel.system.scaleModes.BaseScaleMode"]=Mg;Mg.__name__="flixel.system.scaleModes.BaseScaleMode";Mg.prototype={deviceSize:null,gameSize:null,scale:null,offset:null,
horizontalAlign:null,verticalAlign:null,onMeasure:function(a,b){u.width=u.initialWidth;u.height=u.initialHeight;this.updateGameSize(a,b);this.updateDeviceSize(a,b);this.updateScaleOffset();this.updateGamePosition()},updateGameSize:function(a,b){var c=this.gameSize;null==b&&(b=0);null==a&&(a=0);c.set_x(a);c.set_y(b)},updateDeviceSize:function(a,b){var c=this.deviceSize;null==b&&(b=0);null==a&&(a=0);c.set_x(a);c.set_y(b)},updateScaleOffset:function(){this.scale.set_x(this.gameSize.x/u.width);this.scale.set_y(this.gameSize.y/
u.height);this.updateOffsetX();this.updateOffsetY()},updateOffsetX:function(){var a=this.offset;switch(this.horizontalAlign._hx_index){case 0:var b=0;break;case 1:b=Math.ceil(.5*(this.deviceSize.x-this.gameSize.x));break;case 2:b=this.deviceSize.x-this.gameSize.x}a.set_x(b)},updateOffsetY:function(){var a=this.offset;switch(this.verticalAlign._hx_index){case 0:var b=0;break;case 1:b=Math.ceil(.5*(this.deviceSize.y-this.gameSize.y));break;case 2:b=this.deviceSize.y-this.gameSize.y}a.set_y(b)},updateGamePosition:function(){null!=
u.game&&(u.game.set_x(this.offset.x),u.game.set_y(this.offset.y))},set_horizontalAlign:function(a){this.horizontalAlign=a;null!=this.offset&&(this.updateOffsetX(),this.updateGamePosition());return a},set_verticalAlign:function(a){this.verticalAlign=a;null!=this.offset&&(this.updateOffsetY(),this.updateGamePosition());return a},__class__:Mg,__properties__:{set_verticalAlign:"set_verticalAlign",set_horizontalAlign:"set_horizontalAlign"}};var Va=function(a){null==a&&(a=!1);Mg.call(this);this.fillScreen=
a};h["flixel.system.scaleModes.RatioScaleMode"]=Va;Va.__name__="flixel.system.scaleModes.RatioScaleMode";Va.__super__=Mg;Va.prototype=x(Mg.prototype,{fillScreen:null,updateGameSize:function(a,b){var c=u.width/u.height,d=a/b<c;this.fillScreen&&(d=!d);d?(this.gameSize.set_x(a),this.gameSize.set_y(Math.floor(this.gameSize.x/c))):(this.gameSize.set_y(b),this.gameSize.set_x(Math.floor(this.gameSize.y*c)))},__class__:Va});var sm=function(){this.focusLost=new Xd;this.focusGained=new Xd;this.postDraw=new Xd;
this.preDraw=new Xd;this.postUpdate=new Xd;this.preUpdate=new Xd;this.postGameStart=new Xd;this.preGameStart=new Xd;this.postGameReset=new Xd;this.preGameReset=new Xd;this.gameResized=new Vh;this.preStateCreate=new md;this.postStateSwitch=new Xd;this.preStateSwitch=new Xd};h["flixel.system.frontEnds.SignalFrontEnd"]=sm;sm.__name__="flixel.system.frontEnds.SignalFrontEnd";sm.prototype={preStateSwitch:null,postStateSwitch:null,preStateCreate:null,gameResized:null,preGameReset:null,postGameReset:null,
preGameStart:null,postGameStart:null,preUpdate:null,postUpdate:null,preDraw:null,postDraw:null,focusGained:null,focusLost:null,get_stateSwitched:function(){return this.preStateSwitch},get_gameStarted:function(){return this.postGameStart},__class__:sm,__properties__:{get_gameStarted:"get_gameStarted",get_stateSwitched:"get_stateSwitched"}};var tm=function(){};h["flixel.system.frontEnds.WatchFrontEnd"]=tm;tm.__name__="flixel.system.frontEnds.WatchFrontEnd";tm.prototype={add:function(a,b,c){},remove:function(a,
b){},addQuick:function(a,b){},removeQuick:function(a){},addExpression:function(a,b){},removeExpression:function(a){},addFunction:function(a,b){},removeFunction:function(a){},addMouse:function(){},removeMouse:function(){},__class__:tm};var u=function(){};h["flixel.FlxG"]=u;u.__name__="flixel.FlxG";u.__properties__={set_mouse:"set_mouse",set_fullscreen:"set_fullscreen",get_fullscreen:"get_fullscreen",set_scaleMode:"set_scaleMode",get_onMobile:"get_onMobile",set_drawFramerate:"set_drawFramerate",set_updateFramerate:"set_updateFramerate",
get_state:"get_state",get_stage:"get_stage"};u.camera=null;u.game=null;u.updateFramerate=null;u.drawFramerate=null;u.renderMethod=null;u.renderBlit=null;u.renderTile=null;u.width=null;u.height=null;u.mouse=null;u.touches=null;u.keys=null;u.gamepads=null;u.accelerometer=null;u.vcr=null;u.plugins=null;u.sound=null;u.resizeGame=function(a,b){u.scaleMode.onMeasure(a,b)};u.resizeWindow=function(a,b){};u.resetGame=function(){u.game._resetGame=!0};u.switchState=function(a){var b=u.game._state;a instanceof
wb&&!u.canSwitchTo(a)||u.game._state.startOutro(function(){u.game._state==b?u.game._nextState=a:u.log.advanced("`onOutroComplete` was called after the state was switched. This will be ignored",La.WARNING,!0)})};u.canSwitchTo=function(a){return u.game._state.switchTo(a)};u.resetState=function(){if(null==u.game._state||null==u.game._state._constructor)u.log.advanced("FlxG.resetState was called while switching states",La.ERROR,!0);else if(u.game._state._constructor instanceof wb){var a=fg.fromState(w.createInstance(na.getClass(u.game._state),
[])),b=u.game._state;a instanceof wb&&!u.canSwitchTo(a)||u.game._state.startOutro(function(){u.game._state==b?u.game._nextState=a:u.log.advanced("`onOutroComplete` was called after the state was switched. This will be ignored",La.WARNING,!0)})}else{var c=u.game._state._constructor,d=u.game._state;c instanceof wb&&!u.canSwitchTo(c)||u.game._state.startOutro(function(){u.game._state==d?u.game._nextState=c:u.log.advanced("`onOutroComplete` was called after the state was switched. This will be ignored",
La.WARNING,!0)})}};u.overlap=function(a,b,c,d){null==a&&(a=u.game._state);b==a&&(b=null);W.divisions=u.worldDivisions;var f=W.recycle(u.worldBounds.x,u.worldBounds.y,u.worldBounds.width,u.worldBounds.height);f.load(a,b,c,d);a=f.execute();f.destroy();return a};u.pixelPerfectOverlap=function(a,b,c,d){null==c&&(c=255);return Wa.pixelPerfectCheck(a,b,c,d)};u.collide=function(a,b,c){return u.overlap(a,b,c,Ha.separate)};u.addChildBelowMouse=function(a,b){null==b&&(b=0);var c=u.game.getChildIndex(u.game._inputContainer),
d=u.game.get_numChildren();c=xb.maxAdd(c,b,d);u.game.addChildAt(a,c);return a};u.removeChild=function(a){u.game.contains(a)&&u.game.removeChild(a);return a};u.addPostProcess=function(a){return a};u.removePostProcess=function(a){};u.openURL=function(a,b){null==b&&(b="_blank");(new E("^.\\w+?:/*","")).match(a)||(a="https://"+a);ha.getURL(new qh(a),b)};u.init=function(a,b,c){0>b&&(b=-b);0>c&&(c=-c);u.game=a;u.width=b;u.height=c;u.initRenderMethod();u.initialWidth=b;u.initialHeight=c;b=ha.get_current().stage.stageWidth;
c=ha.get_current().stage.stageHeight;u.scaleMode.onMeasure(b,c);u.keys=u.inputs.addInput_flixel_input_keyboard_FlxKeyboard(new Tj);u.set_mouse(u.inputs.addInput_flixel_input_mouse_FlxMouse(new Oi(a._inputContainer)));u.touches=u.inputs.addInput_flixel_input_touch_FlxTouchManager(new Wh);u.gamepads=u.inputs.addInput_flixel_input_gamepad_FlxGamepadManager(new kg);u.accelerometer=new um;u.initSave();u.plugins=new vm;u.vcr=new wm;u.sound=new xm};u.initRenderMethod=function(){u.renderMethod=Xh.BLITTING;
switch(ha.get_current().stage.window.context.type){case "opengl":case "opengles":case "webgl":var a=Xh.DRAW_TILES;break;default:a=Xh.BLITTING}u.renderMethod=a;u.renderBlit=u.renderMethod==Xh.BLITTING;u.renderTile=u.renderMethod==Xh.DRAW_TILES;Ha.defaultPixelPerfectPosition=u.renderBlit};u.initSave=function(){if(1!=u.save.status._hx_index){var a=ha.get_current().stage.application.meta.h.file;u.save.bind(ee.validate(a));u.save.isEmpty()&&u.save.mergeDataFrom("flixel",null,!1,!1)}};u.reset=function(){var a=
u.random,b=2147483647*Math.random()|0;b=1>b?1:b;b=(2147483646<b?2147483646:b)|0;b=1>b?1:b;b=(2147483646<b?2147483646:b)|0;b=1>b?1:b;a.initialSeed=(a.internalSeed=(2147483646<b?2147483646:b)|0)|0;u.bitmap.reset();u.inputs.reset();u.sound.destroy(!0);u.autoPause=!0;u.fixedTimestep=!0;u.timeScale=1;u.animationTimeScale=1;u.elapsed=0;u.maxElapsed=.1;a=u.worldBounds;var c=b=-10,d=u.width+20,f=u.height+20;null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a.width=d;a.height=f;u.worldDivisions=
6};u.set_scaleMode=function(a){u.scaleMode=a;u.game.onResize(null);return a};u.set_mouse=function(a){if(null==u.mouse)return u.mouse=u.inputs.addUniqueType_flixel_input_mouse_FlxMouse(a),u.mouse;var b=u.mouse,c=u.inputs.replace_flixel_input_mouse_FlxMouse(b,a,!0);return null!=c?(u.mouse=c,a):b};u.set_updateFramerate=function(a){a<u.drawFramerate&&u.log.advanced("FlxG.framerate: the game's framerate shouldn't be smaller than the flash framerate, since it can stop your game from updating.",La.WARNING,
!0);u.updateFramerate=a;u.game._stepMS=Math.abs(1E3/a);u.game._stepSeconds=u.game._stepMS/1E3;u.game._maxAccumulation<u.game._stepMS&&(u.game._maxAccumulation=u.game._stepMS);return a};u.set_drawFramerate=function(a){a>u.updateFramerate&&u.log.advanced("FlxG.drawFramerate: the update framerate shouldn't be smaller than the draw framerate, since it can stop your game from updating.",La.WARNING,!0);u.drawFramerate=Math.abs(a)|0;null!=u.game.stage&&u.game.stage.set_frameRate(u.drawFramerate);u.game._maxAccumulation=
2E3/u.drawFramerate-1;u.game._maxAccumulation<u.game._stepMS&&(u.game._maxAccumulation=u.game._stepMS);return a};u.get_fullscreen=function(){return 0!=ha.get_current().stage.get_displayState()?1==ha.get_current().stage.get_displayState():!0};u.set_fullscreen=function(a){ha.get_current().stage.set_displayState(a?0:2);return a};u.get_stage=function(){return ha.get_current().stage};u.get_state=function(){return u.game._state};u.get_onMobile=function(){return u.html5.onMobile};var Xh=G["flixel.FlxRenderMethod"]=
{__ename__:"flixel.FlxRenderMethod",__constructs__:null,DRAW_TILES:{_hx_name:"DRAW_TILES",_hx_index:0,__enum__:"flixel.FlxRenderMethod",toString:t},BLITTING:{_hx_name:"BLITTING",_hx_index:1,__enum__:"flixel.FlxRenderMethod",toString:t}};Xh.__constructs__=[Xh.DRAW_TILES,Xh.BLITTING];var Kj=function(a,b,c,d,f,g,k){null==k&&(k=!1);null==g&&(g=!1);null==f&&(f=60);null==d&&(d=60);null==b&&(b=0);null==a&&(a=0);this._skipSplash=this._resetGame=!1;this._customFocusLostScreen=Uj;this._customSoundTray=Vj;this._lostFocus=
!1;this._total=this._startTime=0;this._gameJustStarted=!1;this.filtersEnabled=!0;this.ticks=0;this.focusLostFramerate=10;Ka.call(this);this._inputContainer=new Ka;0==a&&(a=ha.get_current().stage.stageWidth);0==b&&(b=ha.get_current().stage.stageHeight);u.init(this,a,b);u.set_updateFramerate(d);u.set_drawFramerate(f);this._accumulator=this._stepMS;this._skipSplash=g;this._initialState=null==c?fg.fromMaker(function(){return new wb}):No.toNextState(c);this.addEventListener("addedToStage",q(this,this.create))};
h["flixel.FlxGame"]=Kj;Kj.__name__="flixel.FlxGame";Kj.__super__=Ka;Kj.prototype=x(Ka.prototype,{focusLostFramerate:null,soundTray:null,ticks:null,filtersEnabled:null,_gameJustStarted:null,_initialState:null,_state:null,_total:null,_startTime:null,_accumulator:null,_elapsedMS:null,_stepMS:null,_stepSeconds:null,_maxAccumulation:null,_lostFocus:null,_filters:null,_focusLostScreen:null,_inputContainer:null,_customSoundTray:null,_customFocusLostScreen:null,_skipSplash:null,_nextState:null,_resetGame:null,
setFilters:function(a){this._filters=a},create:function(a){if(null!=this.stage){this.removeEventListener("addedToStage",q(this,this.create));this._startTime=this.getTimer();this._total=this.getTimer()-this._startTime;this.stage.set_scaleMode(2);this.stage.align=6;this.stage.set_frameRate(u.drawFramerate);this.addChild(this._inputContainer);this.soundTray=w.createInstance(this._customSoundTray,[]);this.addChild(this.soundTray);this._focusLostScreen=w.createInstance(this._customFocusLostScreen,[]);
this.addChild(this._focusLostScreen);this.stage.addEventListener("deactivate",q(this,this.onFocusLost));this.stage.addEventListener("activate",q(this,this.onFocus));var b=this;u.signals.preGameReset.dispatch();this._skipSplash?(this._nextState=this._initialState,this._gameJustStarted=!0):(this._nextState=fg.fromMaker(function(){return new Yh(b._initialState)}),this._skipSplash=!0);u.reset();u.signals.postGameReset.dispatch();this.switchState();u.updateFramerate<u.drawFramerate&&u.log.advanced("FlxG.updateFramerate: The update framerate shouldn't be smaller than the draw framerate, since it can slow down your game.",
La.WARNING,!0);this.stage.addEventListener("enterFrame",q(this,this.onEnterFrame));this.stage.addEventListener("resize",q(this,this.onResize));this.resizeGame(ha.get_current().stage.stageWidth,ha.get_current().stage.stageHeight);xa.addEventListener("change",(n=u.bitmap,q(n,n.onAssetsReload)))}},onFocus:function(a){this._lostFocus=!1;u.signals.focusGained.dispatch();this._state.onFocus();if(u.autoPause){null!=this._focusLostScreen&&this._focusLostScreen.set_visible(!1);this.stage.set_frameRate(u.drawFramerate);
u.sound.onFocus();a=0;for(var b=u.inputs.list;a<b.length;){var c=b[a];++a;c.onFocus()}}},onFocusLost:function(a){this._lostFocus=!0;u.signals.focusLost.dispatch();this._state.onFocusLost();if(u.autoPause){null!=this._focusLostScreen&&this._focusLostScreen.set_visible(!0);this.stage.set_frameRate(this.focusLostFramerate);u.sound.onFocusLost();a=0;for(var b=u.inputs.list;a<b.length;){var c=b[a];++a;c.onFocusLost()}}},onResize:function(a){a=ha.get_current().stage.stageWidth;var b=ha.get_current().stage.stageHeight;
if(u.renderTile)u.bitmap.onContext();this.resizeGame(a,b)},resizeGame:function(a,b){u.scaleMode.onMeasure(a,b);this._state.onResize(a,b);u.cameras.resize();u.signals.gameResized.dispatch(a,b);null!=this._focusLostScreen&&this._focusLostScreen.draw();null!=this.soundTray&&this.soundTray.screenCenter()},onEnterFrame:function(a){this.ticks=this.getTimer()-this._startTime;this._elapsedMS=this.ticks-this._total;this._total=this.ticks;null!=this.soundTray&&this.soundTray.active&&this.soundTray.update(this._elapsedMS);
if(!this._lostFocus||!u.autoPause){if(u.vcr.paused)if(u.vcr.stepRequested)u.vcr.stepRequested=!1;else if(null==this._nextState)return;if(u.fixedTimestep)for(this._accumulator+=this._elapsedMS,this._accumulator=this._accumulator>this._maxAccumulation?this._maxAccumulation:this._accumulator;this._accumulator>=this._stepMS;)this.step(),this._accumulator-=this._stepMS;else this.step();this.draw()}},resetGame:function(){var a=this;u.signals.preGameReset.dispatch();this._skipSplash?(this._nextState=this._initialState,
this._gameJustStarted=!0):(this._nextState=fg.fromMaker(function(){return new Yh(a._initialState)}),this._skipSplash=!0);u.reset();u.signals.postGameReset.dispatch()},switchState:function(){u.cameras.reset();u.inputs.onStateSwitch();u.sound.destroy();u.signals.preStateSwitch.dispatch();null!=this._state&&this._state.destroy();u.bitmap.clearCache();this._state=fg.createInstance(this._nextState);this._state._constructor=this._nextState;this._nextState=null;this._gameJustStarted&&u.signals.preGameStart.dispatch();
u.signals.preStateCreate.dispatch(this._state);this._state.create();this._gameJustStarted&&this.gameStart();u.signals.postStateSwitch.dispatch()},gameStart:function(){u.signals.postGameStart.dispatch();this._gameJustStarted=!1},step:function(){if(this._resetGame){var a=this;u.signals.preGameReset.dispatch();this._skipSplash?(this._nextState=this._initialState,this._gameJustStarted=!0):(this._nextState=fg.fromMaker(function(){return new Yh(a._initialState)}),this._skipSplash=!0);u.reset();u.signals.postGameReset.dispatch();
this._resetGame=!1}this.handleReplayRequests();this.update()},handleReplayRequests:function(){},update:function(){if(this._state.active&&this._state.exists){null!=this._nextState&&this.switchState();this.updateElapsed();u.signals.preUpdate.dispatch();this.updateInput();u.sound.update(u.elapsed);for(var a=u.elapsed,b=0,c=u.plugins.list;b<c.length;){var d=c[b];++b;d.exists&&d.active&&d.update(a)}this._state.tryUpdate(u.elapsed);a=u.elapsed;b=0;for(c=u.cameras.list;b<c.length;)d=c[b],++b,null!=d&&d.exists&&
d.active&&d.update(a);u.signals.postUpdate.dispatch();for(a=u.swipes.length;0<a--;)b=u.swipes.pop(),null!=b&&b.destroy();this.set_filters(this.filtersEnabled?this._filters:null)}},updateElapsed:function(){if(u.fixedTimestep)u.elapsed=u.timeScale*this._stepSeconds;else{u.elapsed=this._elapsedMS/1E3*u.timeScale;var a=u.maxElapsed*u.timeScale;u.elapsed>a&&(u.elapsed=a)}},updateInput:function(){for(var a=0,b=u.inputs.list;a<b.length;){var c=b[a];++a;c.update()}},draw:function(){if(this._state.visible&&
this._state.exists){u.signals.preDraw.dispatch();u.renderTile&&(Dd.drawCalls=0);for(var a=u.cameras,b=0,c=a.list;b<c.length;){var d=c[b];++b;null!=d&&d.exists&&d.visible&&(u.renderBlit&&(d.checkResize(),a.useBufferLocking&&d.buffer.lock()),u.renderTile&&(d.clearDrawStack(),d.canvas.get_graphics().clear()),u.renderBlit?(d.fill(d.bgColor,d.useBgAlphaBlending),d.screen.dirty=!0):d.fill(d.bgColor&16777215,d.useBgAlphaBlending,(d.bgColor>>24&255)/255))}if(u.plugins.drawOnTop)for(this._state.draw(),b=0,
c=u.plugins.list;b<c.length;)a=c[b],++b,a.exists&&a.visible&&a.draw();else{b=0;for(c=u.plugins.list;b<c.length;)a=c[b],++b,a.exists&&a.visible&&a.draw();this._state.draw()}if(u.renderTile&&u.renderTile)for(b=0,c=u.cameras.list;b<c.length;)d=c[b],++b,null!=d&&d.exists&&d.visible&&d.render();a=u.cameras;b=0;for(c=a.list;b<c.length;)d=c[b],++b,null!=d&&d.exists&&d.visible&&(d.drawFX(),u.renderBlit&&(a.useBufferLocking&&d.buffer.unlock(),d.screen.dirty=!0));u.signals.postDraw.dispatch()}},getTicks:function(){return this.getTimer()-
this._startTime},getTimer:function(){return ha.getTimer()},__class__:Kj});var lg=function(a){this._curPart=0;wb.call(this);this.nextState=a};h["flixel.system.FlxSplash"]=lg;lg.__name__="flixel.system.FlxSplash";lg.__super__=wb;lg.prototype=x(wb.prototype,{_sprite:null,_gfx:null,_text:null,_times:null,_colors:null,_functions:null,_curPart:null,_cachedBgColor:null,_cachedTimestep:null,_cachedAutoPause:null,nextState:null,create:function(){this._cachedBgColor=u.cameras.get_bgColor();u.cameras.set_bgColor(-16777216);
this._cachedTimestep=u.fixedTimestep;u.fixedTimestep=!1;this._cachedAutoPause=u.autoPause;u.autoPause=!1;u.keys.enabled=!1;this._times=[.041,.184,.334,.495,.636];this._colors=[47394,16761138,16066382,3555839,314875];this._functions=[q(this,this.drawGreen),q(this,this.drawYellow),q(this,this.drawRed),q(this,this.drawBlue),q(this,this.drawLightBlue)];for(var a=0,b=this._times;a<b.length;){var c=b[a];++a;(new bf).start(c,q(this,this.timerCallback))}a=ha.get_current().stage.stageWidth;b=ha.get_current().stage.stageHeight;
this._sprite=new Ka;ha.get_current().stage.addChild(this._sprite);this._gfx=this._sprite.get_graphics();this._text=new zd;this._text.set_selectable(!1);this._text.set_embedFonts(!0);c=new Id(Ec.FONT_DEFAULT,16,16777215);c.align=0;this._text.set_defaultTextFormat(c);this._text.set_text("HaxeFlixel");ha.get_current().stage.addChild(this._text);this.onResize(a,b);lg.muted||u.sound.load(Ec.getSoundAddExtension("flixel/sounds/flixel")).play()},destroy:function(){this._functions=this._colors=this._times=
this._text=this._gfx=this._sprite=null;wb.prototype.destroy.call(this)},complete:function(){var a=this.nextState,b=u.game._state;a instanceof wb&&!u.canSwitchTo(a)||u.game._state.startOutro(function(){u.game._state==b?u.game._nextState=a:u.log.advanced("`onOutroComplete` was called after the state was switched. This will be ignored",La.WARNING,!0)})},onResize:function(a,b){wb.prototype.onResize.call(this,a,b);this._sprite.set_x(a/2);this._sprite.set_y(b/2-20*u.game.get_scaleY());this._text.set_width(a/
u.game.get_scaleX());this._text.set_x(0);this._text.set_y(this._sprite.get_y()+80*u.game.get_scaleY());this._sprite.set_scaleX(this._text.set_scaleX(u.game.get_scaleX()));this._sprite.set_scaleY(this._text.set_scaleY(u.game.get_scaleY()))},timerCallback:function(a){var b=this;this._functions[this._curPart]();this._text.set_textColor(this._colors[this._curPart]);this._text.set_text("HaxeFlixel");this._curPart++;5==this._curPart&&(Ma.tween(this._sprite,{alpha:0},3,{ease:Za.quadOut,onComplete:function(a){b.complete()}}),
Ma.tween(this._text,{alpha:0},3,{ease:Za.quadOut}))},drawGreen:function(){this._gfx.beginFill(47394);this._gfx.moveTo(0,-37);this._gfx.lineTo(1,-37);this._gfx.lineTo(37,0);this._gfx.lineTo(37,1);this._gfx.lineTo(1,37);this._gfx.lineTo(0,37);this._gfx.lineTo(-37,1);this._gfx.lineTo(-37,0);this._gfx.lineTo(0,-37);this._gfx.endFill()},drawYellow:function(){this._gfx.beginFill(16761138);this._gfx.moveTo(-50,-50);this._gfx.lineTo(-25,-50);this._gfx.lineTo(0,-37);this._gfx.lineTo(-37,0);this._gfx.lineTo(-50,
-25);this._gfx.lineTo(-50,-50);this._gfx.endFill()},drawRed:function(){this._gfx.beginFill(16066382);this._gfx.moveTo(50,-50);this._gfx.lineTo(25,-50);this._gfx.lineTo(1,-37);this._gfx.lineTo(37,0);this._gfx.lineTo(50,-25);this._gfx.lineTo(50,-50);this._gfx.endFill()},drawBlue:function(){this._gfx.beginFill(3555839);this._gfx.moveTo(-50,50);this._gfx.lineTo(-25,50);this._gfx.lineTo(0,37);this._gfx.lineTo(-37,1);this._gfx.lineTo(-50,25);this._gfx.lineTo(-50,50);this._gfx.endFill()},drawLightBlue:function(){this._gfx.beginFill(314875);
this._gfx.moveTo(50,50);this._gfx.lineTo(25,50);this._gfx.lineTo(1,37);this._gfx.lineTo(37,1);this._gfx.lineTo(50,25);this._gfx.lineTo(50,50);this._gfx.endFill()},startOutro:function(a){u.cameras.set_bgColor(this._cachedBgColor);u.fixedTimestep=this._cachedTimestep;u.autoPause=this._cachedAutoPause;u.keys.enabled=!0;ha.get_current().stage.removeChild(this._sprite);ha.get_current().stage.removeChild(this._text);wb.prototype.startOutro.call(this,a)},__class__:lg});var Yh=function(a){lg.call(this,a)};
h["flixel._FlxGame.FlxIntroSplash"]=Yh;Yh.__name__="flixel._FlxGame.FlxIntroSplash";Yh.__super__=lg;Yh.prototype=x(lg.prototype,{startOutro:function(a){u.game._gameJustStarted=!0;lg.prototype.startOutro.call(this,a)},__class__:Yh});var Pi=function(){};h["flixel.IFlxSprite"]=Pi;Pi.__name__="flixel.IFlxSprite";Pi.__isInterface__=!0;Pi.__interfaces__=[Rf];Pi.prototype={set_x:null,set_y:null,set_alpha:null,set_angle:null,set_facing:null,set_moves:null,set_immovable:null,x:null,y:null,alpha:null,angle:null,
facing:null,moves:null,immovable:null,offset:null,origin:null,scale:null,velocity:null,maxVelocity:null,acceleration:null,drag:null,scrollFactor:null,reset:null,setPosition:null,__class__:Pi,__properties__:{set_immovable:"set_immovable",set_moves:"set_moves",set_facing:"set_facing",set_angle:"set_angle",set_alpha:"set_alpha",set_y:"set_y",set_x:"set_x"}};var Ji=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);null==b&&(b=17);this._prevDrawParams={graphicKey:null,tilesX:-1,tilesY:-1,scaleX:0,scaleY:0,
spacingX:0,spacingY:0,repeatAxes:17,angle:0};this._tileMatrix=new Ze;this._blitGraphic=null;var f=0,g=0;null==g&&(g=0);null==f&&(f=0);f=N.pool.get().set(f,g);f._inPool=!1;this._blitOffset=f;this.blitMode=Wj.AUTO;this.drawBlit=u.renderBlit;g=f=0;null==g&&(g=0);null==f&&(f=0);f=N.pool.get().set(f,g);f._inPool=!1;this.spacing=f;this.repeatAxes=17;R.call(this,0,0,a);this.repeatAxes=b;a=this.spacing;f=c;g=d;null==g&&(g=0);null==f&&(f=0);a.set_x(f);a.set_y(g)};h["flixel.addons.display.FlxBackdrop"]=Ji;
Ji.__name__="flixel.addons.display.FlxBackdrop";Ji.__super__=R;Ji.prototype=x(R.prototype,{repeatAxes:null,spacing:null,drawBlit:null,blitMode:null,_blitOffset:null,_blitGraphic:null,_tileMatrix:null,_prevDrawParams:null,destroy:function(){this.spacing=ba.put(this.spacing);this._blitOffset=ba.put(this._blitOffset);this._blitGraphic=ba.destroy(this._blitGraphic);this._tileMatrix=null;R.prototype.destroy.call(this)},draw:function(){if(0==this.repeatAxes)R.prototype.draw.call(this);else if(this.checkEmptyFrame(),
0!=this.alpha&&2!=this._frame.type&&!(0>=this.scale.x||0>=this.scale.y)){this.dirty&&this.calcFrame(this.useFramePixels);this.drawBlit&&this.drawToLargestCamera();for(var a=this.getCamerasLegacy(),b=0;b<a.length;){var c=a[b];++b;c.visible&&c.exists&&this.isOnScreen(c)&&(this.isSimpleRender(c)?this.drawSimple(c):this.drawComplex(c))}}},isOnScreen:function(a){if(17==this.repeatAxes)return!0;if(0==this.repeatAxes)return R.prototype.isOnScreen.call(this,a);null==a&&(a=u.camera);var b=this.getScreenBounds(this._rect,
a),c=this.repeatAxes;if(1==c||17==c)b.x=a.viewMarginX;c=this.repeatAxes;if(16==c||17==c)b.y=a.viewMarginY;a=b.x+b.width>a.viewMarginX&&b.x<a.width-a.viewMarginX&&b.y+b.height>a.viewMarginY&&b.y<a.height-a.viewMarginY;b._weak&&!b._inPool&&(b._inPool=!0,b._weak=!1,V._pool.putUnsafe(b));return a},drawToLargestCamera:function(){for(var a=null,b=0,c=this.getCamerasLegacy(),d=0;d<c.length;){var f=c[d];++d;f.visible&&f.exists&&this.isOnScreen(f)&&(f.width-2*f.viewMarginX)*(f.height-2*f.viewMarginY)>b&&(a=
f,b=(f.width-2*f.viewMarginX)*(f.height-2*f.viewMarginY))}null!=a&&this.regenGraphic(a)},isSimpleRenderBlit:function(a){return 0==this.repeatAxes?R.prototype.isSimpleRenderBlit.call(this,a):R.prototype.isSimpleRenderBlit.call(this,a)||this.drawBlit?null!=a?this.isPixelPerfectRender(a):this.pixelPerfectRender:!1},drawSimple:function(a){if(0==this.repeatAxes)R.prototype.drawSimple.call(this,a);else{var b=!this.drawBlit,c=this.drawBlit?this._blitGraphic.get_imageFrame().get_frame():this._frame,d=c.frame.width,
f=c.frame.height;null==f&&(f=0);null==d&&(d=0);var g=d,k=f;null==k&&(k=0);null==g&&(g=0);var l=N.pool.get().set(g,k);l._inPool=!1;g=l;b&&(l=this.spacing,d=l.x,f=l.y,null==f&&(f=0),null==d&&(d=0),g.set_x(g.x+d),g.set_y(g.y+f),f=l,f._weak&&f.put());var m=this.getScreenPosition(this._point,a);l=this.offset;d=l.x;f=l.y;null==f&&(f=0);null==d&&(d=0);m.set_x(m.x-d);m.set_y(m.y-f);f=l;f._weak&&f.put();b=k=1;if(0!=this.repeatAxes){f=a.getViewMarginRect();m=this.repeatAxes;if(1==m||17==m)k=this.modMin(this._point.x+
this.frameWidth,g.x,f.x)-this.frameWidth,d=this.modMax(this._point.x,g.x,f.x+f.width)+g.x,k=Math.round((d-k)/g.x),this._point.set_x(this.modMin(this._point.x+this.frameWidth,this.frameWidth+this.spacing.x,f.x)-this.frameWidth);m=this.repeatAxes;if(16==m||17==m)b=this.modMin(this._point.y+this.frameHeight,g.y,f.y)-this.frameHeight,d=this.modMax(this._point.y,g.y,f.y+f.height)+g.y,b=Math.round((d-b)/g.y),this._point.set_y(this.modMin(this._point.y+this.frameHeight,this.frameHeight+this.spacing.y,f.y)-
this.frameHeight);f._inPool||(f._inPool=!0,f._weak=!1,V._pool.putUnsafe(f))}this.drawBlit&&(m=this._point,l=this._blitOffset,d=l.x,f=l.y,null==f&&(f=0),null==d&&(d=0),m.set_x(m.x+d),m.set_y(m.y+f),f=l,f._weak&&f.put());u.renderBlit&&this.calcFrame(!0);a.buffer.lock();for(f=0;f<k;)for(d=f++,l=0,m=b;l<m;){var z=l++;this._flashPoint.setTo(this._point.x+g.x*d,this._point.y+g.y*z);this.isPixelPerfectRender(a)&&(this._flashPoint.x=Math.floor(this._flashPoint.x),this._flashPoint.y=Math.floor(this._flashPoint.y));
z=this.drawBlit?this._blitGraphic.bitmap:this.framePixels;a.copyPixels(c,z,z.rect,this._flashPoint,this.colorTransform,this.blend,this.antialiasing)}g.put();a.buffer.unlock()}},drawComplex:function(a){if(0==this.repeatAxes)R.prototype.drawComplex.call(this,a);else{var b=!this.drawBlit,c=this.drawBlit?this._blitGraphic:this.graphic,d=this.drawBlit?this._blitGraphic.get_imageFrame().get_frame():this._frame,f=this.flipX!=this._frame.flipX,g=this.flipY!=this._frame.flipY;d.prepareMatrix(this._matrix,
0,null!=this.animation._curAnim?f!=this.animation._curAnim.flipX:f,null!=this.animation._curAnim?g!=this.animation._curAnim.flipY:g);this._matrix.translate(-this.origin.x,-this.origin.y);var k=d.frame.width,l=d.frame.height;null==l&&(l=0);null==k&&(k=0);f=k;g=l;null==g&&(g=0);null==f&&(f=0);var m=N.pool.get().set(f,g);m._inPool=!1;f=m;b&&(k=(d.frame.width+this.spacing.x)*this.scale.x,l=(d.frame.height+this.spacing.y)*this.scale.y,null==l&&(l=0),null==k&&(k=0),f.set_x(k),f.set_y(l),this._matrix.scale(this.scale.x,
this.scale.y),0>=this.bakedRotationAngle&&(this._angleChanged&&(b=Math.PI/180*this.angle,this._sinAngle=Math.sin(b),this._cosAngle=Math.cos(b),this._angleChanged=!1),0!=this.angle&&(l=this._matrix,b=this._cosAngle,g=this._sinAngle,k=l.a*b-l.b*g,l.b=l.a*g+l.b*b,l.a=k,k=l.c*b-l.d*g,l.d=l.c*g+l.d*b,l.c=k,k=l.tx*b-l.ty*g,l.ty=l.tx*g+l.ty*b,l.tx=k)));b=null;u.renderTile?(b=1!=this.alpha||16777215!=this.color,g=null!=this.colorTransform&&Rc.hasRGBAOffsets(this.colorTransform),b=a.startQuadBatch(c,b,g,this.blend,
this.antialiasing,this.shader)):a.buffer.lock();var z=this.getScreenPosition(this._point,a);m=this.offset;k=m.x;l=m.y;null==l&&(l=0);null==k&&(k=0);z.set_x(z.x-k);z.set_y(z.y-l);l=m;l._weak&&l.put();c=g=1;if(0!=this.repeatAxes){l=a.getViewMarginRect();k=this.getScreenBounds(null,a);z=this.repeatAxes;if(1==z||17==z)g=(this.frameWidth+this.spacing.x)*this.scale.x,m=this.modMin(k.x+k.width,g,l.x)-k.width,g=this.modMax(k.x,g,l.x+l.width)+g,g=Math.round((g-m)/f.x),this._point.set_x(m+this._point.x-k.x);
z=this.repeatAxes;if(16==z||17==z)c=(this.frameHeight+this.spacing.y)*this.scale.y,m=this.modMin(k.y+k.height,c,l.y)-k.height,c=this.modMax(k.y,c,l.y+l.height)+c,c=Math.round((c-m)/f.y),this._point.set_y(m+this._point.y-k.y);l._inPool||(l._inPool=!0,l._weak=!1,V._pool.putUnsafe(l));k._inPool||(k._inPool=!0,k._weak=!1,V._pool.putUnsafe(k))}z=this._point;m=this.origin;k=m.x;l=m.y;null==l&&(l=0);null==k&&(k=0);z.set_x(z.x+k);z.set_y(z.y+l);l=m;l._weak&&l.put();this.drawBlit&&(z=this._point,m=this._blitOffset,
k=m.x,l=m.y,null==l&&(l=0),null==k&&(k=0),z.set_x(z.x+k),z.set_y(z.y+l),l=m,l._weak&&l.put());for(l=0;l<g;)for(k=l++,m=0,z=c;m<z;){var h=m++;this._tileMatrix.copyFrom(this._matrix);this._tileMatrix.translate(this._point.x+f.x*k,this._point.y+f.y*h);this.isPixelPerfectRender(a)&&(this._tileMatrix.tx=Math.floor(this._tileMatrix.tx),this._tileMatrix.ty=Math.floor(this._tileMatrix.ty));u.renderBlit?a.drawPixels(d,this.drawBlit?this._blitGraphic.bitmap:this.framePixels,this._tileMatrix,this.colorTransform,
this.blend,this.antialiasing,this.shader):b.addQuad(d,this._tileMatrix,this.colorTransform)}f.put();u.renderBlit&&a.buffer.unlock()}},getFrameScreenBounds:function(a){if(this.drawBlit){a=this._blitGraphic.get_imageFrame().get_frame().frame;var b=this.x,c=this.y,d=a.width,f=a.height;null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);var g=V._pool.get();a=d;null==f&&(f=0);null==a&&(a=0);null==c&&(c=0);null==b&&(b=0);g.x=b;g.y=c;g.width=a;g.height=f;f=g;f._inPool=!1;return f}b=this.x;c=this.y;
null==c&&(c=0);null==b&&(b=0);g=V._pool.get();f=d=0;null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);g.x=b;g.y=c;g.width=d;g.height=f;f=g;f._inPool=!1;g=f;this.pixelPerfectPosition&&(g.x=Math.floor(g.x),g.y=Math.floor(g.y),g.width=Math.floor(g.width),g.height=Math.floor(g.height));f=this.origin.x*this.scale.x;d=this.origin.y*this.scale.y;null==d&&(d=0);null==f&&(f=0);null==d&&(d=0);null==f&&(f=0);null==d&&(d=0);null==f&&(f=0);d=N.pool.get().set(f,d);d._inPool=!1;d._weak=!0;g.x+=-(a.scroll.x*
this.scrollFactor.x|0)-this.offset.x+this.origin.x-d.x;g.y+=-(a.scroll.y*this.scrollFactor.y|0)-this.offset.y+this.origin.y-d.y;this.isPixelPerfectRender(a)&&(g.x=Math.floor(g.x),g.y=Math.floor(g.y),g.width=Math.floor(g.width),g.height=Math.floor(g.height));f=this.frameHeight*Math.abs(this.scale.y);g.width=this.frameWidth*Math.abs(this.scale.x);g.height=f;return g.getRotatedBounds(this.angle,d,g)},modMin:function(a,b,c){return a-Math.floor((a-c)/b)*b},modMax:function(a,b,c){return a-Math.ceil((a-
c)/b)*b},regenGraphic:function(a){var b=(this.frameWidth+this.spacing.x)*this.scale.x,c=(this.frameHeight+this.spacing.y)*this.scale.y;null==c&&(c=0);null==b&&(b=0);var d=b,f=c;null==f&&(f=0);null==d&&(d=0);d=N.pool.get().set(d,f);d._inPool=!1;var g=a.getViewMarginRect();a=f=1;if(0!=this.repeatAxes){var k=this.blitMode;switch(k._hx_index){case 0:k=this.repeatAxes;if(1==k||17==k)f=Math.ceil(g.width/d.x)+1;k=this.repeatAxes;if(16==k||17==k)a=Math.ceil(g.height/d.y)+1;break;case 1:b=k.x;c=k.y;if(1==
b){if(1!=c){k=this.repeatAxes;if(1==k||17==k)k=Math.ceil(g.width/d.x)+1,f=b<k?b:k;k=this.repeatAxes;if(16==k||17==k)k=Math.ceil(g.height/d.y)+1,a=c<k?c:k}}else{k=this.repeatAxes;if(1==k||17==k)k=Math.ceil(g.width/d.x)+1,f=b<k?b:k;k=this.repeatAxes;if(16==k||17==k)k=Math.ceil(g.height/d.y)+1,a=c<k?c:k}break;case 2:b=k.tiles;if(1!=b){c=b;k=this.repeatAxes;if(1==k||17==k)k=Math.ceil(g.width/d.x)+1,f=c<k?c:k;k=this.repeatAxes;if(16==k||17==k)k=Math.ceil(g.height/d.y)+1,a=c<k?c:k}break;case 3:if(b=k.portions,
1==b){k=this.repeatAxes;if(1==k||17==k)f=Math.ceil(g.width/d.x)+1;k=this.repeatAxes;if(16==k||17==k)a=Math.ceil(g.height/d.y)+1}else{c=b;k=this.repeatAxes;if(1==k||17==k)k=this.repeatAxes,f=1==k||17==k?Math.ceil(g.width/d.x/c+1):1;k=this.repeatAxes;if(16==k||17==k)k=this.repeatAxes,a=16==k||17==k?Math.ceil(g.height/d.y/c+1):1}}}g._inPool||(g._inPool=!0,g._weak=!1,V._pool.putUnsafe(g));if(this._prevDrawParams.graphicKey!=this.graphic.key||this._prevDrawParams.tilesX!=f||this._prevDrawParams.tilesY!=
a||this._prevDrawParams.scaleX!=this.scale.x||this._prevDrawParams.scaleY!=this.scale.y||this._prevDrawParams.spacingX!=this.spacing.x||this._prevDrawParams.spacingY!=this.spacing.y||this._prevDrawParams.repeatAxes!=this.repeatAxes||this._prevDrawParams.angle!=this.angle){this._prevDrawParams.graphicKey=this.graphic.key;this._prevDrawParams.tilesX=f;this._prevDrawParams.tilesY=a;this._prevDrawParams.scaleX=this.scale.x;this._prevDrawParams.scaleY=this.scale.y;this._prevDrawParams.spacingX=this.spacing.x;
this._prevDrawParams.spacingY=this.spacing.y;this._prevDrawParams.repeatAxes=this.repeatAxes;this._prevDrawParams.angle=this.angle;k=this._blitOffset;c=b=0;null==c&&(c=0);null==b&&(b=0);k.set_x(b);k.set_y(c);g=Math.ceil(f*d.x);c=Math.ceil(a*d.y);if(17!=this.repeatAxes){b=this.getScreenBounds();var l=this.getScreenPosition();k=this.repeatAxes;1!=k&&17!=k&&(g=Math.ceil(b.width),this._blitOffset.set_x(b.x-l.x));k=this.repeatAxes;16!=k&&17!=k&&(c=Math.ceil(b.height),this._blitOffset.set_y(b.y-l.y));b._inPool||
(b._inPool=!0,b._weak=!1,V._pool.putUnsafe(b));l.put()}if(null==this._blitGraphic||this._blitGraphic.width!=g||this._blitGraphic.height!=c)this._blitGraphic=u.bitmap.create(g,c,0,!0);g=this._blitGraphic.bitmap;g.lock();g.fillRect(g.rect,0);this.animation.set_frameIndex(0);this.calcFrame(!0);this._matrix.identity();this._matrix.translate(-this.origin.x,-this.origin.y);this._matrix.scale(this.scale.x,this.scale.y);0>=this.bakedRotationAngle&&(this._angleChanged&&(k=Math.PI/180*this.angle,this._sinAngle=
Math.sin(k),this._cosAngle=Math.cos(k),this._angleChanged=!1),0!=this.angle&&(k=this._matrix,c=this._cosAngle,b=this._sinAngle,l=k.a*c-k.b*b,k.b=k.a*b+k.b*c,k.a=l,l=k.c*c-k.d*b,k.d=k.c*b+k.d*c,k.c=l,l=k.tx*c-k.ty*b,k.ty=k.tx*b+k.ty*c,k.tx=l));this._matrix.translate(this.origin.x,this.origin.y);this._matrix.translate(-this._blitOffset.x,-this._blitOffset.y);k=this._point;b=this._matrix.tx;c=this._matrix.ty;null==c&&(c=0);null==b&&(b=0);k.set_x(b);k.set_y(c);k=this.repeatAxes;c=1!=k&&17!=k||0==this.angle?
0:1;k=this.repeatAxes;l=16!=k&&17!=k||0==this.angle?0:1;k=-c;for(b=f+c;k<b;){f=k++;c=-l;for(var m=a+l;c<m;){var z=c++;this._matrix.tx=this._point.x+f*d.x;this._matrix.ty=this._point.y+z*d.y;g.draw(this.framePixels,this._matrix)}}g.unlock()}d.put()},matchPrevDrawParams:function(a,b){return this._prevDrawParams.graphicKey==this.graphic.key&&this._prevDrawParams.tilesX==a&&this._prevDrawParams.tilesY==b&&this._prevDrawParams.scaleX==this.scale.x&&this._prevDrawParams.scaleY==this.scale.y&&this._prevDrawParams.spacingX==
this.spacing.x&&this._prevDrawParams.spacingY==this.spacing.y&&this._prevDrawParams.repeatAxes==this.repeatAxes?this._prevDrawParams.angle==this.angle:!1},setDrawParams:function(a,b){this._prevDrawParams.graphicKey=this.graphic.key;this._prevDrawParams.tilesX=a;this._prevDrawParams.tilesY=b;this._prevDrawParams.scaleX=this.scale.x;this._prevDrawParams.scaleY=this.scale.y;this._prevDrawParams.spacingX=this.spacing.x;this._prevDrawParams.spacingY=this.spacing.y;this._prevDrawParams.repeatAxes=this.repeatAxes;
this._prevDrawParams.angle=this.angle},__class__:Ji});var Wj=G["flixel.addons.display.BackdropBlitMode"]={__ename__:"flixel.addons.display.BackdropBlitMode",__constructs__:null,AUTO:{_hx_name:"AUTO",_hx_index:0,__enum__:"flixel.addons.display.BackdropBlitMode",toString:t},MAX_TILES_XY:(n=function(a,b){return{_hx_index:1,x:a,y:b,__enum__:"flixel.addons.display.BackdropBlitMode",toString:t}},n._hx_name="MAX_TILES_XY",n.__params__=["x","y"],n),MAX_TILES:(n=function(a){return{_hx_index:2,tiles:a,__enum__:"flixel.addons.display.BackdropBlitMode",
toString:t}},n._hx_name="MAX_TILES",n.__params__=["tiles"],n),SPLIT:(n=function(a){return{_hx_index:3,portions:a,__enum__:"flixel.addons.display.BackdropBlitMode",toString:t}},n._hx_name="SPLIT",n.__params__=["portions"],n)};Wj.__constructs__=[Wj.AUTO,Wj.MAX_TILES_XY,Wj.MAX_TILES,Wj.SPLIT];var cf=function(a,b){this.curIndex=0;this.parent=a;this.name=b};h["flixel.animation.FlxBaseAnimation"]=cf;cf.__name__="flixel.animation.FlxBaseAnimation";cf.__interfaces__=[D];cf.prototype={parent:null,name:null,
curIndex:null,set_curIndex:function(a){this.curIndex=a;null!=this.parent&&this.parent._curAnim==this&&this.parent.set_frameIndex(a);return a},destroy:function(){this.name=this.parent=null},update:function(a){},clone:function(a){return null},__class__:cf,__properties__:{set_curIndex:"set_curIndex"}};var mg=function(a,b,c,d,f,g,k){null==k&&(k=!1);null==g&&(g=!1);null==f&&(f=!0);null==d&&(d=0);this._frameTimer=0;this.timeScale=1;this.reversed=this.flipX=this.flipY=!1;this.loopPoint=0;this.finished=this.paused=
this.looped=!0;this.curFrame=this.frameDuration=0;cf.call(this,a,b);this.set_frameRate(d);this.frames=c;this.looped=f;this.flipX=g;this.flipY=k};h["flixel.animation.FlxAnimation"]=mg;mg.__name__="flixel.animation.FlxAnimation";mg.__super__=cf;mg.prototype=x(cf.prototype,{frameRate:null,curFrame:null,frameDuration:null,finished:null,paused:null,looped:null,loopPoint:null,reversed:null,flipX:null,flipY:null,frames:null,timeScale:null,_frameTimer:null,destroy:function(){this.name=this.frames=null;cf.prototype.destroy.call(this)},
play:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);null==a&&(a=!1);a||this.finished||this.reversed!=b?(this.reversed=b,this.paused=!1,this._frameTimer=0,this.finished=0==this.frameDuration,a=this.frames.length-1,0>c?this.set_curFrame(u.random.int(0,a)):(c>a&&(c=a),this.reversed&&(c=a-c),this.set_curFrame(c)),this.finished&&this.parent.fireFinishCallback(this.name)):this.paused=!1},restart:function(){this.play(!0,this.reversed)},stop:function(){this.paused=this.finished=!0},reset:function(){this.stop();
this.set_curFrame(this.reversed?this.frames.length-1:0)},finish:function(){this.stop();this.set_curFrame(this.reversed?0:this.frames.length-1)},pause:function(){this.paused=!0},resume:function(){this.paused=!1},reverse:function(){this.reversed=!this.reversed;this.finished&&this.play(!1,this.reversed)},update:function(a){var b=this.getCurrentFrameDuration();if(0!=b&&!this.finished&&!this.paused)for(this._frameTimer+=a*this.timeScale;this._frameTimer>b&&!this.finished;){this._frameTimer-=b;this.reversed?
this.looped&&this.curFrame==this.loopPoint?(this.set_curFrame(this.frames.length-1),this.parent.fireLoopCallback(this.name)):this.set_curFrame(this.curFrame-1):this.looped&&this.curFrame==this.frames.length-1?(this.set_curFrame(this.loopPoint),this.parent.fireLoopCallback(this.name)):this.set_curFrame(this.curFrame+1);if(this.finished)break;b=this.getCurrentFrameDuration()}},getCurrentFrameDuration:function(){var a=this.parent.getFrameDuration(this.frames[this.curFrame]);return 0<a?a:this.frameDuration},
clone:function(a){return new mg(a,this.name,this.frames,this.frameRate,this.looped,this.flipX,this.flipY)},set_frameRate:function(a){this.frameRate=a;this.frameDuration=0<a?1/a:0;return a},set_curFrame:function(a){var b=this.frames.length-1,c=this.reversed?b-a:a;0<=c?!this.looped&&c>b?(this.finished=!0,this.curFrame=this.reversed?0:b):this.curFrame=a:this.curFrame=u.random.int(0,b);this.set_curIndex(this.frames[this.curFrame]);this.finished&&null!=this.parent&&this.parent.fireFinishCallback(this.name);
return a},get_numFrames:function(){return this.frames.length},get_delay:function(){return this.frameDuration},set_delay:function(a){return this.frameDuration=a},__class__:mg,__properties__:x(cf.prototype.__properties__,{set_delay:"set_delay",get_delay:"get_delay",get_numFrames:"get_numFrames",set_curFrame:"set_curFrame",set_frameRate:"set_frameRate"})});var Lj=function(a){this._animations=new Ba;this.timeScale=1;this.onLoop=new md;this.onFinish=new md;this.onFrameChange=new Xj;this.frameIndex=-1;
this._sprite=a};h["flixel.animation.FlxAnimationController"]=Lj;Lj.__name__="flixel.animation.FlxAnimationController";Lj.__interfaces__=[D];Lj.prototype={frameIndex:null,callback:null,finishCallback:null,onFrameChange:null,onFinish:null,onLoop:null,timeScale:null,_sprite:null,_curAnim:null,_animations:null,_prerotated:null,update:function(a){null!=this._curAnim?this._curAnim.update(a*this.timeScale*u.animationTimeScale):null!=this._prerotated&&this._prerotated.set_angle(this._sprite.angle)},copyFrom:function(a){this.destroyAnimations();
for(var b=a._animations.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];this.add(g.name,g.frames,g.frameRate,g.looped,g.flipX,g.flipY)}null!=a._prerotated&&this.createPrerotated();null!=a.get_name()&&this.set_name(a.get_name());this.set_frameIndex(a.frameIndex);return this},createPrerotated:function(a){this.destroyAnimations();null==a&&(a=this);this._prerotated=new Zh(a,a._sprite.bakedRotationAngle);this._prerotated.set_angle(this._sprite.angle)},destroyAnimations:function(){this.clearAnimations();
this.clearPrerotated()},destroy:function(){ba.destroy(this.onFrameChange);ba.destroy(this.onFinish);ba.destroy(this.onLoop);this.destroyAnimations();this._sprite=this.finishCallback=this.callback=this._animations=null},getFrameDuration:function(a){return this._sprite.frames.frames[a].duration},clearPrerotated:function(){null!=this._prerotated&&this._prerotated.destroy();this._prerotated=null},clearAnimations:function(){if(null!=this._animations)for(var a,b=Object.keys(this._animations.h),c=b.length,
d=0;d<c;)a=b[d++],a=this._animations.h[a],null!=a&&a.destroy();this._animations=new Ba;this._curAnim=null},add:function(a,b,c,d,f,g){null==g&&(g=!1);null==f&&(f=!1);null==d&&(d=!0);null==c&&(c=30);if(0==this._sprite.get_numFrames())u.log.advanced('Could not create animation: "'+a+'", this sprite has no frames',La.WARNING,!0);else{for(var k=b,l=!1,m=k.length;0<=m--;)k[m]>=this._sprite.get_numFrames()&&(l=!0,k==b&&(k=b.slice()),k.splice(m,1));0<k.length?(b=new mg(this,a,k,c,d,f,g),this._animations.h[a]=
b,l&&u.log.advanced("Could not add frames above "+(this._sprite.get_numFrames()-1)+' to animation: "'+a+'"',La.WARNING,!0)):u.log.advanced('Could not create animation: "'+a+'", no valid frames were given',La.WARNING,!0)}},remove:function(a){var b=this._animations.h[a];if(null!=b){var c=this._animations;Object.prototype.hasOwnProperty.call(c.h,a)&&delete c.h[a];b.destroy()}},append:function(a,b){var c=this._animations.h[a];if(null==c)u.log.advanced('No animation called "'+a+'"',La.WARNING,!0);else{for(var d=
!1,f=0;f<b.length;){var g=b[f];++f;g<this._sprite.get_numFrames()?c.frames.push(g):d=!0}d&&u.log.advanced("Could not append frames above "+(this._sprite.get_numFrames()-1)+' to animation: "'+a+'"',La.WARNING,!0)}},addByNames:function(a,b,c,d,f,g){null==g&&(g=!1);null==f&&(f=!1);null==d&&(d=!0);null==c&&(c=30);if(null!=this._sprite.frames){var k=[];this.byNamesHelper(k,b);0<k.length&&(b=new mg(this,a,k,c,d,f,g),this._animations.h[a]=b)}},appendByNames:function(a,b){var c=this._animations.h[a];null==
c?u.log.advanced('No animation called "'+a+'"',La.WARNING,!0):null!=this._sprite.frames&&this.byNamesHelper(c.frames,b)},addByStringIndices:function(a,b,c,d,f,g,k,l){null==l&&(l=!1);null==k&&(k=!1);null==g&&(g=!0);null==f&&(f=30);if(null!=this._sprite.frames){var m=[];this.byStringIndicesHelper(m,b,c,d);0<m.length&&(b=new mg(this,a,m,f,g,k,l),this._animations.h[a]=b)}},appendByStringIndices:function(a,b,c,d){var f=this._animations.h[a];null==f?u.log.advanced('No animation called "'+a+'"',La.WARNING,
!0):null!=this._sprite.frames&&this.byStringIndicesHelper(f.frames,b,c,d)},addByIndices:function(a,b,c,d,f,g,k,l){null==l&&(l=!1);null==k&&(k=!1);null==g&&(g=!0);null==f&&(f=30);if(null!=this._sprite.frames){var m=[];this.byIndicesHelper(m,b,c,d);0<m.length&&(b=new mg(this,a,m,f,g,k,l),this._animations.h[a]=b)}},appendByIndices:function(a,b,c,d){var f=this._animations.h[a];null==f?u.log.advanced('No animation called "'+a+'"',La.WARNING,!0):null!=this._sprite.frames&&this.byIndicesHelper(f.frames,
b,c,d)},findSpriteFrame:function(a,b,c){for(var d=this._sprite.frames.frames,f=0,g=d.length;f<g;){var k=f++,l=d[k].name;if(O.startsWith(l,a)&&O.endsWith(l,c)&&M.parseInt(l.substring(a.length,l.length-c.length))==b)return k}return-1},addByPrefix:function(a,b,c,d,f,g){null==g&&(g=!1);null==f&&(f=!1);null==d&&(d=!0);null==c&&(c=30);if(null!=this._sprite.frames){var k=[];this.findByPrefix(k,b);if(0<k.length){var l=[];this.byPrefixHelper(l,k,b);b=new mg(this,a,l,c,d,f,g);this._animations.h[a]=b}else u.log.advanced('Could not create animation: "'+
a+'", no frames were found with the prefix "'+b+'" ',La.WARNING,!0)}},appendByPrefix:function(a,b){var c=this._animations.h[a];if(null==c)u.log.advanced('No animation called "'+a+'"',La.WARNING,!0);else if(null!=this._sprite.frames){var d=[];this.findByPrefix(d,b);0<d.length?this.byPrefixHelper(c.frames,d,b):u.log.advanced('Could not append to animation: "'+a+'", no frames were found with the prefix: "'+b+'"',La.WARNING,!0)}},play:function(a,b,c,d){null==d&&(d=0);null==c&&(c=!1);null==b&&(b=!1);null==
a&&(null!=this._curAnim&&this._curAnim.stop(),this._curAnim=null);if(null==a||null==this._animations.h[a])u.log.advanced('No animation called "'+a+'"',La.WARNING,!0);else{var f=!1,g=!1;null!=this._curAnim&&a!=this._curAnim.name&&(f=this._curAnim.flipX,g=this._curAnim.flipY,this._curAnim.stop());this._curAnim=this._animations.h[a];this._curAnim.play(b,c,d);if(f!=this._curAnim.flipX||g!=this._curAnim.flipY)this._sprite.dirty=!0}},reset:function(){null!=this._curAnim&&this._curAnim.reset()},finish:function(){null!=
this._curAnim&&this._curAnim.finish()},stop:function(){null!=this._curAnim&&this._curAnim.stop()},pause:function(){null!=this._curAnim&&this._curAnim.pause()},resume:function(){null!=this._curAnim&&(this._curAnim.paused=!1)},reverse:function(){null!=this._curAnim&&this._curAnim.reverse()},getByName:function(a){return this._animations.h[a]},randomFrame:function(){null!=this._curAnim&&(this._curAnim.stop(),this._curAnim=null);this.set_frameIndex(u.random.int(0,this._sprite.get_numFrames()-1))},fireCallback:function(){var a=
null!=this._curAnim?this._curAnim.name:null,b=null!=this._curAnim?this._curAnim.curFrame:this.frameIndex;null!=this.callback&&this.callback(a,b,this.frameIndex);this.onFrameChange.dispatch(a,b,this.frameIndex)},fireFinishCallback:function(a){null!=this.finishCallback&&this.finishCallback(a);this.onFinish.dispatch(a)},fireLoopCallback:function(a){this.onLoop.dispatch(a)},byNamesHelper:function(a,b){for(var c=0;c<b.length;){var d=b[c];++c;Object.prototype.hasOwnProperty.call(this._sprite.frames.framesByName.h,
d)&&a.push(this._sprite.frames.frames.indexOf(this._sprite.frames.framesByName.h[d]))}},byStringIndicesHelper:function(a,b,c,d){for(var f=0;f<c.length;){var g=c[f];++f;g=b+g+d;Object.prototype.hasOwnProperty.call(this._sprite.frames.framesByName.h,g)&&a.push(this._sprite.frames.frames.indexOf(this._sprite.frames.framesByName.h[g]))}},byIndicesHelper:function(a,b,c,d){for(var f=0;f<c.length;){var g=c[f];++f;g=this.findSpriteFrame(b,g,d);-1!=g&&a.push(g)}},byPrefixHelper:function(a,b,c){var d=b[0].name,
f=d.indexOf(".",c.length);d=d.substring(-1==f?d.length:f,d.length);cb.sortHelper(b,c.length,null==d?0:d.length,!0);for(c=0;c<b.length;)d=b[c],++c,a.push(this._sprite.frames.frames.indexOf(d))},findByPrefix:function(a,b,c){c=0;for(var d=this._sprite.frames.frames;c<d.length;){var f=d[c];++c;null!=f.name&&O.startsWith(f.name,b)&&a.push(f)}this.removeInvalidFrames(a)},removeInvalidFrames:function(a){for(var b=[],c=a.length;0<c--;)null==a[c].parent.shader&&b.unshift(a.splice(c,1)[0]);return b},set_frameIndex:function(a){null!=
this._sprite.frames&&0<this._sprite.get_numFrames()&&(a%=this._sprite.get_numFrames(),this._sprite.set_frame(this._sprite.frames.frames[a]),this.frameIndex=a,this.fireCallback());return this.frameIndex},get_frameName:function(){return this._sprite.frame.name},set_frameName:function(a){if(null!=this._sprite.frames&&Object.prototype.hasOwnProperty.call(this._sprite.frames.framesByName.h,a)){null!=this._curAnim&&(this._curAnim.stop(),this._curAnim=null);var b=this._sprite.frames.framesByName.h[a];null!=
b&&this.set_frameIndex(this._sprite.frames.frames.indexOf(b))}return a},get_name:function(){var a=null;null!=this._curAnim&&(a=this._curAnim.name);return a},set_name:function(a){this.play(a);return a},getAnimationList:function(){for(var a=[],b=this._animations.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];a.push(g)}return a},getNameList:function(){for(var a=[],b=Object.keys(this._animations.h),c=b.length,d=0;d<c;){var f=b[d++];a.push(f)}return a},exists:function(a){return Object.prototype.hasOwnProperty.call(this._animations.h,
a)},rename:function(a,b){var c=this._animations.h[a];null==c?u.log.advanced('No animation called "'+a+'"',La.WARNING,!0):(this._animations.h[b]=c,c.name=b,b=this._animations,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a])},get_curAnim:function(){return this._curAnim},set_curAnim:function(a){a!=this._curAnim&&(null!=this._curAnim&&this._curAnim.stop(),null!=a&&a.play());return this._curAnim=a},get_paused:function(){var a=!1;null!=this._curAnim&&(a=this._curAnim.paused);return a},set_paused:function(a){null!=
this._curAnim&&(a?this._curAnim.pause():this._curAnim.paused=!1);return a},get_finished:function(){var a=!0;null!=this._curAnim&&(a=this._curAnim.finished);return a},set_finished:function(a){a&&null!=this._curAnim&&this._curAnim.finish();return a},get_frames:function(){return this._sprite.get_numFrames()},get_numFrames:function(){return this._sprite.get_numFrames()},getFrameIndex:function(a){return this._sprite.frames.frames.indexOf(a)},__class__:Lj,__properties__:{get_frames:"get_frames",get_numFrames:"get_numFrames",
set_finished:"set_finished",get_finished:"get_finished",set_paused:"set_paused",get_paused:"get_paused",set_name:"set_name",get_name:"get_name",set_frameName:"set_frameName",get_frameName:"get_frameName",set_frameIndex:"set_frameIndex",set_curAnim:"set_curAnim",get_curAnim:"get_curAnim"}};var Zh=function(a,b){this.angle=0;cf.call(this,a,"prerotated_animation");this.baked=b;this.rotations=Math.round(360/b)};h["flixel.animation.FlxPrerotatedAnimation"]=Zh;Zh.__name__="flixel.animation.FlxPrerotatedAnimation";
Zh.__super__=cf;Zh.prototype=x(cf.prototype,{rotations:null,baked:null,angle:null,set_angle:function(a){if(isNaN(a))throw J.thrown("angle must not be NaN");for(var b=this.curIndex,c=Math.floor(a%360);0>c;)c+=360;c=Math.floor(c/this.baked+.5);c=c%this.rotations|0;b!=c&&this.set_curIndex(c);return this.angle=a},set_curIndex:function(a){this.curIndex=a;null!=this.parent&&this.parent.set_frameIndex(a);return a},clone:function(a){return new Zh(a,this.baked)},__class__:Zh,__properties__:x(cf.prototype.__properties__,
{set_angle:"set_angle"})});var Ed=function(){};h["flixel.effects.FlxFlicker"]=Ed;Ed.__name__="flixel.effects.FlxFlicker";Ed.__interfaces__=[D];Ed.flicker=function(a,b,c,d,f,g,k){null==f&&(f=!0);null==d&&(d=!0);null==c&&(c=.04);null==b&&(b=1);if(Ed.isFlickering(a))if(f)Ed.stopFlickering(a);else return Ed._boundObjects.h[a.__id__];0>=c&&(c=u.elapsed);f=Ed._pool.get();f.start(a,b,c,d,g,k);Ed._boundObjects.set(a,f);return f};Ed.isFlickering=function(a){return null!=Ed._boundObjects.h.__keys__[a.__id__]};
Ed.stopFlickering=function(a){a=Ed._boundObjects.h[a.__id__];null!=a&&a.stop()};Ed.prototype={object:null,endVisibility:null,timer:null,completionCallback:null,progressCallback:null,duration:null,interval:null,destroy:function(){this.progressCallback=this.completionCallback=this.timer=this.object=null},start:function(a,b,c,d,f,g){this.object=a;this.duration=b;this.interval=c;this.completionCallback=f;this.progressCallback=g;this.endVisibility=d;this.timer=(new bf).start(this.interval,q(this,this.flickerProgress),
this.duration/this.interval|0)},pause:function(){null!=this.timer&&(this.timer.active=!1)},resume:function(){null!=this.timer&&(this.timer.active=!0)},stop:function(){this.timer.cancel();this.object.set_visible(!0);this.release()},release:function(){Ed._boundObjects.remove(this.object);Ed._pool.put(this)},flickerProgress:function(a){this.object.set_visible(!this.object.visible);null!=this.progressCallback&&this.progressCallback(this);0<a.loops&&0==a.loops-a._loopsCounter&&(this.object.set_visible(this.endVisibility),
null!=this.completionCallback&&this.completionCallback(this),this.timer==a&&this.release())},__class__:Ed};var Sj=function(a,b,c){null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this._waitForKill=!1;var d=0,f=0;null==f&&(f=0);null==d&&(d=0);d=N.pool.get().set(d,f);d._inPool=!1;this._point=d;this._timer=this._counter=0;this._explode=!0;this.allowCollisions=this._quantity=0;this.immovable=this.autoUpdateHitbox=!1;this.elasticity=new Sf(0);this.acceleration=new rh(0,0);this.drag=new rh(0,0);this.color=
new Sf(-1,-1);this.alpha=new Sf(1);this.scale=new rh(1,1);this.lifespan=new Ng(3);this.launchAngle=new Ng(-180,180);this.ignoreAngularVelocity=!1;this.angle=new Sf(0);this.angularVelocity=new Sf(0,0);this.angularDrag=new Sf(0,0);this.angularAcceleration=new Sf(0,0);this.speed=new Sf(0,100);this.velocity=new rh(-100,-100,100,100);this.keepScaleRatio=!1;this.launchMode=ym.CIRCLE;this.x=this.y=this.width=this.height=0;this.frequency=.1;this.emitting=!1;this.particleClass=Qi;yb.call(this,c);null==b&&
(b=0);null==a&&(a=0);this.x=a;this.y=b;this.set_exists(!1)};h["flixel.effects.particles.FlxTypedEmitter"]=Sj;Sj.__name__="flixel.effects.particles.FlxTypedEmitter";Sj.__super__=yb;Sj.prototype=x(yb.prototype,{particleClass:null,emitting:null,frequency:null,blend:null,x:null,y:null,width:null,height:null,launchMode:null,keepScaleRatio:null,velocity:null,speed:null,angularAcceleration:null,angularDrag:null,angularVelocity:null,angle:null,ignoreAngularVelocity:null,launchAngle:null,lifespan:null,scale:null,
alpha:null,color:null,drag:null,acceleration:null,elasticity:null,immovable:null,autoUpdateHitbox:null,allowCollisions:null,_quantity:null,_explode:null,_timer:null,_counter:null,_point:null,_waitForKill:null,destroy:function(){this.velocity=ba.destroy(this.velocity);this.scale=ba.destroy(this.scale);this.drag=ba.destroy(this.drag);this.acceleration=ba.destroy(this.acceleration);this._point=ba.put(this._point);this.elasticity=this.color=this.alpha=this.lifespan=this.launchAngle=this.speed=this.angle=
this.angularVelocity=this.angularDrag=this.angularAcceleration=this.blend=null;yb.prototype.destroy.call(this)},loadParticles:function(a,b,c,d,f){null==f&&(f=!1);null==d&&(d=!1);null==c&&(c=16);null==b&&(b=50);this.set_maxSize(b);var g=1;if(d){var k=new R;k.loadGraphic(a,!0);g=k.get_numFrames();k.destroy()}k=0;for(var l=b;k<l;)k++,this.add(this.loadParticle(a,b,c,d,f,g));return this},loadParticle:function(a,b,c,d,f,g){null==f&&(f=!1);null==d&&(d=!1);b=w.createInstance(this.particleClass,[]);g=d?u.random.int(0,
g-1):-1;u.renderBlit&&0<c?b.loadRotatedGraphic(a,c,g,!1,f):b.loadGraphic(a,d);d&&b.animation.set_frameIndex(g);return b},makeParticles:function(a,b,c,d){null==d&&(d=50);null==c&&(c=-1);null==b&&(b=2);null==a&&(a=2);this.set_maxSize(d);for(var f=0;f<d;){f++;var g=w.createInstance(this.particleClass,[]);g.makeGraphic(a,b,c);this.add(g)}return this},update:function(a){if(this.emitting)this._explode?this.explode():this.emitContinuously(a);else if(this._waitForKill&&(this._timer+=a,0<this.lifespan.max&&
this._timer>this.lifespan.max)){this.kill();return}yb.prototype.update.call(this,a)},explode:function(){var a=this._quantity;if(0>=a||a>this.length)a=this.length;for(var b=0;b<a;)b++,this.emitParticle();this.onFinished()},emitContinuously:function(a){if(0>=this.frequency)this.emitParticleContinuously();else for(this._timer+=a;this._timer>this.frequency;)this._timer-=this.frequency,this.emitParticleContinuously()},emitParticleContinuously:function(){this.emitParticle();this._counter++;if(0<this._quantity&&
this._counter>=this._quantity)this.onFinished()},onFinished:function(){this.emitting=!1;this._waitForKill=!0;this._quantity=0},kill:function(){this._waitForKill=this.emitting=!1;yb.prototype.kill.call(this)},start:function(a,b,c){null==c&&(c=0);null==b&&(b=.1);null==a&&(a=!0);this.set_exists(!0);this.set_visible(!0);this.emitting=!0;this._explode=a;this.frequency=b;this._quantity+=c;this._timer=this._counter=0;this._waitForKill=!1;return this},emitParticle:function(){var a=this.recycle(this.particleClass);
a.reset(0,0);a.set_blend(this.blend);a.set_immovable(this.immovable);a.set_solid(4369==(this.allowCollisions&4369));a.set_allowCollisions(this.allowCollisions);a.autoUpdateHitbox=this.autoUpdateHitbox;this.lifespan.active&&(a.lifespan=u.random.float(this.lifespan.min,this.lifespan.max));if(this.velocity.active){if(0<a.lifespan){var b=a.velocityRange.start;var c=a.velocityRange.end;b=1E-7>=Math.abs(b.x-c.x)&&1E-7>=Math.abs(b.y-c.y);c._weak&&c.put();b=!b}else b=!1;a.velocityRange.active=b;if(this.launchMode==
ym.CIRCLE){b=0;this.launchAngle.active&&(b=u.random.float(this.launchAngle.min,this.launchAngle.max));var d=u.random.float(this.speed.start.min,this.speed.start.max),f=Math.PI/180*b;c=Math.cos(f)*d;d*=Math.sin(f);null==d&&(d=0);null==c&&(c=0);null==d&&(d=0);null==c&&(c=0);c=N.pool.get().set(c,d);c._inPool=!1;this._point=c;a.velocity.set_x(this._point.x);a.velocity.set_y(this._point.y);f=a.velocityRange.start;c=this._point.x;d=this._point.y;null==d&&(d=0);null==c&&(c=0);f.set_x(c);f.set_y(d);d=u.random.float(this.speed.end.min,
this.speed.end.max);f=Math.PI/180*b;c=Math.cos(f)*d;d*=Math.sin(f);null==d&&(d=0);null==c&&(c=0);null==d&&(d=0);null==c&&(c=0);c=N.pool.get().set(c,d);c._inPool=!1;this._point=c;f=a.velocityRange.end;c=this._point.x;d=this._point.y;null==d&&(d=0);null==c&&(c=0);f.set_x(c);f.set_y(d)}else a.velocityRange.start.set_x(u.random.float(this.velocity.start.min.x,this.velocity.start.max.x)),a.velocityRange.start.set_y(u.random.float(this.velocity.start.min.y,this.velocity.start.max.y)),a.velocityRange.end.set_x(u.random.float(this.velocity.end.min.x,
this.velocity.end.max.x)),a.velocityRange.end.set_y(u.random.float(this.velocity.end.min.y,this.velocity.end.max.y)),a.velocity.set_x(a.velocityRange.start.x),a.velocity.set_y(a.velocityRange.start.y)}else a.velocityRange.active=!1;a.angularVelocityRange.active=0<a.lifespan&&this.angularVelocity.start!=this.angularVelocity.end;this.ignoreAngularVelocity?this.angularVelocity.active&&(a.angularVelocity=(u.random.float(this.angle.end.min,this.angle.end.max)-u.random.float(this.angle.start.min,this.angle.start.max))/
u.random.float(this.lifespan.min,this.lifespan.max),a.angularVelocityRange.active=!1):(this.angularAcceleration.active&&(a.angularAcceleration=u.random.float(this.angularAcceleration.start.min,this.angularAcceleration.start.max)),this.angularVelocity.active&&(a.angularVelocityRange.start=u.random.float(this.angularVelocity.start.min,this.angularVelocity.start.max),a.angularVelocityRange.end=u.random.float(this.angularVelocity.end.min,this.angularVelocity.end.max),a.angularVelocity=a.angularVelocityRange.start),
this.angularDrag.active&&(a.angularDrag=u.random.float(this.angularDrag.start.min,this.angularDrag.start.max)));this.angle.active&&a.set_angle(u.random.float(this.angle.start.min,this.angle.start.max));this.scale.active?(a.scaleRange.start.set_x(u.random.float(this.scale.start.min.x,this.scale.start.max.x)),a.scaleRange.start.set_y(this.keepScaleRatio?a.scaleRange.start.x:u.random.float(this.scale.start.min.y,this.scale.start.max.y)),a.scaleRange.end.set_x(u.random.float(this.scale.end.min.x,this.scale.end.max.x)),
a.scaleRange.end.set_y(this.keepScaleRatio?a.scaleRange.end.x:u.random.float(this.scale.end.min.y,this.scale.end.max.y)),0<a.lifespan?(b=a.scaleRange.start,c=a.scaleRange.end,b=1E-7>=Math.abs(b.x-c.x)&&1E-7>=Math.abs(b.y-c.y),c._weak&&c.put(),b=!b):b=!1,a.scaleRange.active=b,a.scale.set_x(a.scaleRange.start.x),a.scale.set_y(a.scaleRange.start.y),a.autoUpdateHitbox&&a.updateHitbox()):a.scaleRange.active=!1;this.alpha.active?(a.alphaRange.start=u.random.float(this.alpha.start.min,this.alpha.start.max),
a.alphaRange.end=u.random.float(this.alpha.end.min,this.alpha.end.max),a.alphaRange.active=0<a.lifespan&&a.alphaRange.start!=a.alphaRange.end,a.set_alpha(a.alphaRange.start)):a.alphaRange.active=!1;this.color.active?(a.colorRange.start=u.random.color(this.color.start.min,this.color.start.max),a.colorRange.end=u.random.color(this.color.end.min,this.color.end.max),a.colorRange.active=0<a.lifespan&&a.colorRange.start!=a.colorRange.end,a.set_color(a.colorRange.start)):a.colorRange.active=!1;this.drag.active?
(a.dragRange.start.set_x(u.random.float(this.drag.start.min.x,this.drag.start.max.x)),a.dragRange.start.set_y(u.random.float(this.drag.start.min.y,this.drag.start.max.y)),a.dragRange.end.set_x(u.random.float(this.drag.end.min.x,this.drag.end.max.x)),a.dragRange.end.set_y(u.random.float(this.drag.end.min.y,this.drag.end.max.y)),0<a.lifespan?(b=a.dragRange.start,c=a.dragRange.end,b=1E-7>=Math.abs(b.x-c.x)&&1E-7>=Math.abs(b.y-c.y),c._weak&&c.put(),b=!b):b=!1,a.dragRange.active=b,a.drag.set_x(a.dragRange.start.x),
a.drag.set_y(a.dragRange.start.y)):a.dragRange.active=!1;this.acceleration.active?(a.accelerationRange.start.set_x(u.random.float(this.acceleration.start.min.x,this.acceleration.start.max.x)),a.accelerationRange.start.set_y(u.random.float(this.acceleration.start.min.y,this.acceleration.start.max.y)),a.accelerationRange.end.set_x(u.random.float(this.acceleration.end.min.x,this.acceleration.end.max.x)),a.accelerationRange.end.set_y(u.random.float(this.acceleration.end.min.y,this.acceleration.end.max.y)),
0<a.lifespan?(b=a.accelerationRange.start,c=a.accelerationRange.end,b=1E-7>=Math.abs(b.x-c.x)&&1E-7>=Math.abs(b.y-c.y),c._weak&&c.put(),b=!b):b=!1,a.accelerationRange.active=b,a.acceleration.set_x(a.accelerationRange.start.x),a.acceleration.set_y(a.accelerationRange.start.y)):a.accelerationRange.active=!1;this.elasticity.active?(a.elasticityRange.start=u.random.float(this.elasticity.start.min,this.elasticity.start.max),a.elasticityRange.end=u.random.float(this.elasticity.end.min,this.elasticity.end.max),
a.elasticityRange.active=0<a.lifespan&&a.elasticityRange.start!=a.elasticityRange.end,a.elasticity=a.elasticityRange.start):a.elasticityRange.active=!1;a.set_x(u.random.float(this.x,this.x+this.width)-a.get_width()/2);a.set_y(u.random.float(this.y,this.y+this.height)-a.get_height()/2);null!=a.animation._curAnim&&a.animation._curAnim.restart();a.onEmit();return a},focusOn:function(a){a.getMidpoint(this._point);this.x=this._point.x-((this.width|0)>>1);this.y=this._point.y-((this.height|0)>>1)},setPosition:function(a,
b){null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b},setSize:function(a,b){this.width=a;this.height=b},get_solid:function(){return 4369==(this.allowCollisions&4369)},set_solid:function(a){this.allowCollisions=a?4369:0;return a},__class__:Sj,__properties__:x(yb.prototype.__properties__,{set_solid:"set_solid",get_solid:"get_solid"})});var ym=G["flixel.effects.particles.FlxEmitterMode"]={__ename__:"flixel.effects.particles.FlxEmitterMode",__constructs__:null,SQUARE:{_hx_name:"SQUARE",_hx_index:0,__enum__:"flixel.effects.particles.FlxEmitterMode",
toString:t},CIRCLE:{_hx_name:"CIRCLE",_hx_index:1,__enum__:"flixel.effects.particles.FlxEmitterMode",toString:t}};ym.__constructs__=[ym.SQUARE,ym.CIRCLE];var Ri=function(){};h["flixel.effects.particles.IFlxParticle"]=Ri;Ri.__name__="flixel.effects.particles.IFlxParticle";Ri.__isInterface__=!0;Ri.__interfaces__=[Pi];Ri.prototype={lifespan:null,age:null,percent:null,autoUpdateHitbox:null,velocityRange:null,angularVelocityRange:null,scaleRange:null,alphaRange:null,colorRange:null,dragRange:null,accelerationRange:null,
elasticityRange:null,onEmit:null,__class__:Ri};var Qi=function(){this._delta=0;this.autoUpdateHitbox=!1;this.lifespan=this.age=this.percent=0;R.call(this);var a=0,b=0;null==b&&(b=0);null==a&&(a=0);var c=N.pool.get().set(a,b);c._inPool=!1;b=a=0;null==b&&(b=0);null==a&&(a=0);b=N.pool.get().set(a,b);b._inPool=!1;this.velocityRange=new yf(c,b);this.angularVelocityRange=new yf(0);b=a=1;null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);c=N.pool.get().set(a,b);c._inPool=!1;b=a=1;null==b&&(b=0);
null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);b=N.pool.get().set(a,b);b._inPool=!1;this.scaleRange=new yf(c,b);this.alphaRange=new yf(1,1);this.colorRange=new yf(-1);b=a=0;null==b&&(b=0);null==a&&(a=0);c=N.pool.get().set(a,b);c._inPool=!1;b=a=0;null==b&&(b=0);null==a&&(a=0);b=N.pool.get().set(a,b);b._inPool=!1;this.dragRange=new yf(c,b);b=a=0;null==b&&(b=0);null==a&&(a=0);c=N.pool.get().set(a,b);c._inPool=!1;b=a=0;null==b&&(b=0);null==a&&(a=0);b=N.pool.get().set(a,b);b._inPool=!1;this.accelerationRange=
new yf(c,b);this.elasticityRange=new yf(0);this.set_exists(!1)};h["flixel.effects.particles.FlxParticle"]=Qi;Qi.__name__="flixel.effects.particles.FlxParticle";Qi.__interfaces__=[Ri];Qi.__super__=R;Qi.prototype=x(R.prototype,{lifespan:null,age:null,percent:null,autoUpdateHitbox:null,velocityRange:null,angularVelocityRange:null,scaleRange:null,alphaRange:null,colorRange:null,dragRange:null,accelerationRange:null,elasticityRange:null,_delta:null,destroy:function(){null!=this.velocityRange&&(this.velocityRange.start=
ba.put(this.velocityRange.start),this.velocityRange.end=ba.put(this.velocityRange.end),this.velocityRange=null);null!=this.scaleRange&&(this.scaleRange.start=ba.put(this.scaleRange.start),this.scaleRange.end=ba.put(this.scaleRange.end),this.scaleRange=null);null!=this.dragRange&&(this.dragRange.start=ba.put(this.dragRange.start),this.dragRange.end=ba.put(this.dragRange.end),this.dragRange=null);null!=this.accelerationRange&&(this.accelerationRange.start=ba.put(this.accelerationRange.start),this.accelerationRange.end=
ba.put(this.accelerationRange.end),this.angularVelocityRange=null);this.elasticityRange=this.accelerationRange=this.colorRange=this.alphaRange=null;R.prototype.destroy.call(this)},update:function(a){this.age<this.lifespan&&(this.age+=a);if(this.age>=this.lifespan&&0!=this.lifespan)this.kill();else{this._delta=a/this.lifespan;this.percent=this.age/this.lifespan;this.velocityRange.active&&(this.velocity.set_x(this.velocity.x+(this.velocityRange.end.x-this.velocityRange.start.x)*this._delta),this.velocity.set_y(this.velocity.y+
(this.velocityRange.end.y-this.velocityRange.start.y)*this._delta));this.angularVelocityRange.active&&(this.angularVelocity+=(this.angularVelocityRange.end-this.angularVelocityRange.start)*this._delta);this.scaleRange.active&&(this.scale.set_x(this.scale.x+(this.scaleRange.end.x-this.scaleRange.start.x)*this._delta),this.scale.set_y(this.scale.y+(this.scaleRange.end.y-this.scaleRange.start.y)*this._delta),this.autoUpdateHitbox&&this.updateHitbox());this.alphaRange.active&&this.set_alpha(this.alpha+
(this.alphaRange.end-this.alphaRange.start)*this._delta);if(this.colorRange.active){var b=this.colorRange.start,c=this.colorRange.end,d=this.percent;null==d&&(d=.5);var f=((c>>16&255)-(b>>16&255))*d+(b>>16&255)|0,g=((c>>8&255)-(b>>8&255))*d+(b>>8&255)|0,k=((c&255)-(b&255))*d+(b&255)|0;c=((c>>24&255)-(b>>24&255))*d+(b>>24&255)|0;null==c&&(c=255);b=mb._new();null==c&&(c=255);b=(b&-16711681|(255<f?255:0>f?0:f)<<16)&-65281|(255<g?255:0>g?0:g)<<8;b&=-256;b|=255<k?255:0>k?0:k;b&=16777215;b|=(255<c?255:
0>c?0:c)<<24;this.set_color(b)}this.dragRange.active&&(this.drag.set_x(this.drag.x+(this.dragRange.end.x-this.dragRange.start.x)*this._delta),this.drag.set_y(this.drag.y+(this.dragRange.end.y-this.dragRange.start.y)*this._delta));this.accelerationRange.active&&(this.acceleration.set_x(this.acceleration.x+(this.accelerationRange.end.x-this.accelerationRange.start.x)*this._delta),this.acceleration.set_y(this.acceleration.y+(this.accelerationRange.end.y-this.accelerationRange.start.y)*this._delta));
this.elasticityRange.active&&(this.elasticity+=(this.elasticityRange.end-this.elasticityRange.start)*this._delta)}R.prototype.update.call(this,a)},reset:function(a,b){R.prototype.reset.call(this,a,b);this.age=0;this.set_visible(!0)},onEmit:function(){},__class__:Qi});var Yn=function(a){u.log.advanced("Post processing is only supported on the CPP and Neko targets of OpenFL legacy - for newer OpenFL versions, please use shader filters.",La.ERROR,!0)};h["flixel.effects.postprocess.PostProcess"]=Yn;Yn.__name__=
"flixel.effects.postprocess.PostProcess";Yn.prototype={enable:function(a){},capture:function(){},rebuild:function(){},update:function(a){},render:function(a){},setUniform:function(a,b){},set_to:function(a){return null},__class__:Yn,__properties__:{set_to:"set_to"}};var lc=function(a,b,c){this.unique=!1;this.useCount=0;this.isDumped=!1;this.destroyOnNoUse=!0;this.persist=!1;this.width=this.height=0;this.key=a;this.persist=null!=c?c:lc.defaultPersist;this.frameCollections=new ng;this.frameCollectionTypes=
[];this.set_bitmap(b);this.shader=new wc};h["flixel.graphics.FlxGraphic"]=lc;lc.__name__="flixel.graphics.FlxGraphic";lc.__interfaces__=[D];lc.fromAssetKey=function(a,b,c,d){null==d&&(d=!0);null==b&&(b=!1);if(!d){var f=u.assets.getAsset(a,"image",!1,null);return null==f?null:lc.createGraphic(f,c,b,d)}c=u.bitmap.generateKey(a,c,b);f=u.bitmap._cache.h[c];if(null!=f)return f;f=u.assets.getAsset(a,"image",!1,null);if(null==f)return null;f=lc.createGraphic(f,c,b);f.assetsKey=a;return f};lc.fromClass=function(a,
b,c,d){null==d&&(d=!0);null==b&&(b=!1);if(!d){var f=w.createInstance(a,[]);return lc.createGraphic(f,c,b,d)}d=a.__name__;d=u.bitmap.generateKey(d,c,b);c=u.bitmap._cache.h[d];if(null!=c)return c;f=w.createInstance(a,[]);c=lc.createGraphic(f,d,b);c.assetsClass=a;return c};lc.fromBitmapData=function(a,b,c,d){null==d&&(d=!0);null==b&&(b=!1);if(!d)return lc.createGraphic(a,c,b,d);d=u.bitmap.findKeyForBitmap(a);var f=null,g=null;if(null!=d){var k=u.bitmap._cache.h[d];f=k.assetsKey;g=k.assetsClass}d=u.bitmap.generateKey(d,
c,b);k=u.bitmap._cache.h[d];if(null!=k)return k;k=lc.createGraphic(a,d,b);k.assetsKey=f;k.assetsClass=g;return k};lc.fromFrame=function(a,b,c,d){null==d&&(d=!0);null==b&&(b=!1);var f=a.name;if(null==f){f=a.frame;var g=f.x,k=Ua._pool.get();k.label="x";k.value=g;g=f.y;var l=Ua._pool.get();l.label="y";l.value=g;g=f.width;var m=Ua._pool.get();m.label="w";m.value=g;g=f.height;f=Ua._pool.get();f.label="h";f.value=g;f=ab.getDebugString([k,l,m,f])}f=a.parent.key+":"+f;f=u.bitmap.generateKey(f,c,b);c=u.bitmap._cache.h[f];
if(null!=c)return c;c=a.paint();c=lc.createGraphic(c,f,b,d);Oc.fromGraphic(c).frames[0].name=a.name;return c};lc.fromFrames=function(a,b,c){null==b&&(b=!1);return lc.fromGraphic(a.parent,b,c)};lc.fromGraphic=function(a,b,c){null==b&&(b=!1);if(!b)return a;c=u.bitmap.generateKey(a.key,c,b);c=lc.createGraphic(a.bitmap,c,b);c.unique=b;c.assetsClass=a.assetsClass;c.assetsKey=a.assetsKey;return u.bitmap._cache.h[c.key]=c};lc.fromRectangle=function(a,b,c,d,f){null==d&&(d=!1);d=u.bitmap.generateKey(a+"x"+
b+":"+c,f,d);f=u.bitmap._cache.h[d];if(null!=f)return f;a=new ma(a,b,!0,c);return lc.createGraphic(a,d)};lc.getBitmap=function(a,b){null==b&&(b=!1);return b?a.clone():a};lc.createGraphic=function(a,b,c,d){null==d&&(d=!0);null==c&&(c=!1);var f=c;null==f&&(f=!1);f&&(a=a.clone());d?(a=new lc(b,a),a.unique=c,u.bitmap._cache.h[a.key]=a):a=new lc(null,a);return a};lc.prototype={key:null,bitmap:null,width:null,height:null,assetsKey:null,assetsClass:null,persist:null,destroyOnNoUse:null,isDumped:null,shader:null,
useCount:null,imageFrame:null,frameCollections:null,frameCollectionTypes:null,unique:null,get__imageFrame:function(){return this.get_imageFrame()},set__imageFrame:function(a){return this.imageFrame=a},get__useCount:function(){return this.useCount},set__useCount:function(a){return this.useCount=a},get__destroyOnNoUse:function(){return this.destroyOnNoUse},set__destroyOnNoUse:function(a){return this.set_destroyOnNoUse(a)},dump:function(){},undump:function(){var a=this.getBitmapFromSystem();null!=a&&
this.set_bitmap(a);this.isDumped=!1},onContext:function(){this.isDumped&&(this.undump(),this.dump())},onAssetsReload:function(){if(null!=this.assetsClass||null!=this.assetsKey){var a=this.isDumped;this.undump();a&&this.dump()}},destroy:function(){this.set_bitmap(ba.dispose(this.bitmap));this.assetsClass=this.assetsKey=this.key=this.shader=null;this.imageFrame=ba.destroy(this.get_imageFrame());if(null!=this.frameCollections){for(var a,b=0,c=this.frameCollectionTypes;b<c.length;)a=c[b],++b,a=this.frameCollections.get(a),
ba.destroyArray(a);this.frameCollectionTypes=this.frameCollections=null}},addFrameCollection:function(a){if(null!=a.type){var b=a.type;if(null==this.shader)u.log.advanced("Invalid call to getFramesCollections on a destroyed graphic",La.WARNING,!0),b=[];else{var c=this.frameCollections.get(b);null==c&&(c=[],this.frameCollections.set(b,c));b=c}-1!=b.indexOf(a)?u.log.advanced("Attempting to add already added collection",La.WARNING,!0):b.push(a)}},getFramesCollections:function(a){if(null==this.shader)return u.log.advanced("Invalid call to getFramesCollections on a destroyed graphic",
La.WARNING,!0),[];var b=this.frameCollections.get(a);null==b&&(b=[],this.frameCollections.set(a,b));return b},getEmptyFrame:function(a){var b=new cb(this);b.type=2;var c=V._pool.get(),d=0,f=0,g=0,k=0;null==k&&(k=0);null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);c.x=d;c.y=f;c.width=g;c.height=k;c._inPool=!1;b.set_frame(c);c=b.sourceSize;d=a.x;f=a.y;null==f&&(f=0);null==d&&(d=0);c.set_x(d);c.set_y(f);c=a;c._weak&&c.put();return b},getBitmapFromSystem:function(){var a=null;null!=this.assetsClass?a=w.createInstance(this.assetsClass,
[]):null!=this.assetsKey&&(a=u.assets.getAsset(this.assetsKey,"image",!1,null));if(null!=a){var b=this.unique;null==b&&(b=!1);return b?a.clone():a}return null},get_isLoaded:function(){return null!=this.bitmap?!this.bitmap.rect.isEmpty():!1},get_isDestroyed:function(){return null==this.shader},get_canBeDumped:function(){return null==this.assetsClass?null!=this.assetsKey:!0},incrementUseCount:function(){this.useCount++},decrementUseCount:function(){this.useCount--;this.checkUseCount()},checkUseCount:function(){0>=
this.useCount&&this.destroyOnNoUse&&!this.persist&&u.bitmap.remove(this)},set_destroyOnNoUse:function(a){this.destroyOnNoUse=a;this.checkUseCount();return a},get_imageFrame:function(){null==this.imageFrame&&(this.imageFrame=Oc.fromRectangle(this));return this.imageFrame},get_atlasFrames:function(){return mc.findFrame(this,null)},set_bitmap:function(a){if(null!=a){this.bitmap=a;this.width=this.bitmap.width;this.height=this.bitmap.height;var b=u.bitmap.get_maxTextureSize();0<b&&(this.width>b||this.height>
b)&&u.log.advanced("Graphic dimensions ("+this.width+"x"+this.height+") exceed the maximum allowed size ("+b+"x"+b+"), which may cause rendering issues.",La.WARNING,!0)}return a},__class__:lc,__properties__:{set__destroyOnNoUse:"set__destroyOnNoUse",get__destroyOnNoUse:"get__destroyOnNoUse",set__useCount:"set__useCount",get__useCount:"get__useCount",set__imageFrame:"set__imageFrame",get__imageFrame:"get__imageFrame",get_atlasFrames:"get_atlasFrames",get_imageFrame:"get_imageFrame",get_canBeDumped:"get_canBeDumped",
get_isDestroyed:"get_isDestroyed",get_isLoaded:"get_isLoaded",set_destroyOnNoUse:"set_destroyOnNoUse",set_bitmap:"set_bitmap"}};var Ya=function(a,b){null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b};h["openfl.geom.Point"]=Ya;Ya.__name__="openfl.geom.Point";Ya.__limeVector2=null;Ya.distance=function(a,b){var c=a.x-b.x;a=a.y-b.y;return Math.sqrt(c*c+a*a)};Ya.interpolate=function(a,b,c){return new Ya(b.x+c*(a.x-b.x),b.y+c*(a.y-b.y))};Ya.interpolateToOutput=function(a,b,c,d){return null!=d?(d.setTo(b.x+
c*(a.x-b.x),b.y+c*(a.y-b.y)),d):new Ya(b.x+c*(a.x-b.x),b.y+c*(a.y-b.y))};Ya.polar=function(a,b){return new Ya(a*Math.cos(b),a*Math.sin(b))};Ya.polarToOutput=function(a,b,c){return null!=c?(c.setTo(a*Math.cos(b),a*Math.sin(b)),c):new Ya(a*Math.cos(b),a*Math.sin(b))};Ya.prototype={x:null,y:null,add:function(a){return new Ya(a.x+this.x,a.y+this.y)},addToOutput:function(a,b){return null!=b?(b.setTo(a.x+this.x,a.y+this.y),b):new Ya(a.x+this.x,a.y+this.y)},clone:function(){return new Ya(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 Ya(this.x-a.x,this.y-a.y)},subtractToOutput:function(a,b){return null!=b?(b.setTo(this.x-a.x,this.y-a.y),b):new Ya(this.x-a.x,this.y-a.y)},toString:function(){return"(x="+this.x+
", y="+this.y+")"},__toLimeVector2:function(){null==Ya.__limeVector2&&(Ya.__limeVector2=new yd);var a=Ya.__limeVector2;a.x=this.x;a.y=this.y;return Ya.__limeVector2},get_length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},__class__:Ya,__properties__:{get_length:"get_length"}};var Zd=function(a,b,c,d,f,g){null==d&&(d=!1);null==c&&(c=1);null==b&&(b=!1);this.allowRotation=this.powerOfTwo=!1;this.maxWidth=this.maxHeight=1024;this.minWidth=this.minHeight=128;this.border=1;this.persist=!1;
this.nodes=new Ba;this.name=a;this.set_powerOfTwo(b);this.border=c;null==f&&(f=Zd.defaultMinSize);null==g&&(g=Zd.defaultMaxSize);this.set_minWidth(f.x|0);this.set_minHeight(f.y|0);this.set_maxWidth(g.x>f.x?g.x|0:this.minWidth);this.set_maxHeight(g.y>f.x?g.y|0:this.minHeight);this.allowRotation=d;this.initRoot();u.signals.preStateCreate.add(q(this,this.onClear))};h["flixel.graphics.atlas.FlxAtlas"]=Zd;Zd.__name__="flixel.graphics.atlas.FlxAtlas";Zd.__interfaces__=[D];Zd.prototype={root:null,name:null,
nodes:null,bitmapData:null,persist:null,border:null,width:null,height:null,minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,allowRotation:null,powerOfTwo:null,_graphic:null,_tempStorage:null,initRoot:function(){var a=this.minWidth,b=this.minHeight;this.powerOfTwo&&(a=this.getNextPowerOfTwo(a),b=this.getNextPowerOfTwo(b));var c=0,d=0,f=b;null==f&&(f=0);null==a&&(a=0);null==d&&(d=0);null==c&&(c=0);b=V._pool.get();null==f&&(f=0);null==a&&(a=0);null==d&&(d=0);null==c&&(c=0);b.x=c;b.y=d;b.width=
a;b.height=f;b._inPool=!1;this.root=new me(b,this)},addNode:function(a,b){b=Ec.resolveKey(a,b);if(null==b)return null;if(this.hasNodeWithName(b))return this.nodes.h[b];a=Ec.resolveBitmapData(a);if(null==a)return null;if(null==this.root.left)return this.insertFirstNodeInRoot(a,b);if(null==this.root.right)return this.expand(a,b);var c=this.tryInsert(a,b);if(null!=c)return c;this.wrapRoot();return this.expand(a,b)},wrapRoot:function(){var a=this.root,b=0,c=0,d=a.rect.width|0,f=a.rect.height|0;null==
f&&(f=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);var g=V._pool.get();null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);g.x=b;g.y=c;g.width=d;g.height=f;g._inPool=!1;this.root=new me(g,this);this.root.left=a},tryInsert:function(a,b){var c=a.width+this.border,d=a.height+this.border,f=!1,g=this.findNodeToInsert(c,d);if(this.allowRotation){var k=this.findNodeToInsert(d,c);if(null!=k){var l=(k.rect.width|0)*(k.rect.height|0);if(null==g||null!=g&&(g.rect.width|0)*(g.rect.height|0)>l)g=k,
f=!0,k=c,c=d,d=k}}return null!=g?(k=this.needToDivideHorizontally(g,c,d),this.divideNode(g,c,d,k,a,b,f)):null},needToDivideHorizontally:function(a,b,c){return(a.rect.width|0)-b>(a.rect.height|0)-c},divideNode:function(a,b,c,d,f,g,k){null==k&&(k=!1);if(null!=a){var l=null,m=null;var z=null!=g;if(d){var h=a.rect.x|0,p=a.rect.y|0,r=b,w=a.rect.height|0;null==w&&(w=0);null==r&&(r=0);null==p&&(p=0);null==h&&(h=0);var u=V._pool.get();null==w&&(w=0);null==r&&(r=0);null==p&&(p=0);null==h&&(h=0);u.x=h;u.y=
p;u.width=r;u.height=w;u._inPool=!1;d=new me(u,this);0<(a.rect.width|0)-b&&(h=(a.rect.x|0)+b,p=a.rect.y|0,r=(a.rect.width|0)-b,w=a.rect.height|0,null==w&&(w=0),null==r&&(r=0),null==p&&(p=0),null==h&&(h=0),u=V._pool.get(),null==w&&(w=0),null==r&&(r=0),null==p&&(p=0),null==h&&(h=0),u.x=h,u.y=p,u.width=r,u.height=w,u._inPool=!1,l=new me(u,this));h=d.rect.x|0;p=d.rect.y|0;r=b;w=c;null==w&&(w=0);null==r&&(r=0);null==p&&(p=0);null==h&&(h=0);u=V._pool.get();null==w&&(w=0);null==r&&(r=0);null==p&&(p=0);null==
h&&(h=0);u.x=h;u.y=p;u.width=r;u.height=w;u._inPool=!1;z=new me(u,this,z,g,k);0<(d.rect.height|0)-c&&(h=d.rect.x|0,p=(d.rect.y|0)+c,r=b,w=(d.rect.height|0)-c,null==w&&(w=0),null==r&&(r=0),null==p&&(p=0),null==h&&(h=0),u=V._pool.get(),null==w&&(w=0),null==r&&(r=0),null==p&&(p=0),null==h&&(h=0),u.x=h,u.y=p,u.width=r,u.height=w,u._inPool=!1,m=new me(u,this))}else h=a.rect.x|0,p=a.rect.y|0,r=a.rect.width|0,w=c,null==w&&(w=0),null==r&&(r=0),null==p&&(p=0),null==h&&(h=0),u=V._pool.get(),null==w&&(w=0),
null==r&&(r=0),null==p&&(p=0),null==h&&(h=0),u.x=h,u.y=p,u.width=r,u.height=w,u._inPool=!1,d=new me(u,this),0<(a.rect.height|0)-c&&(h=a.rect.x|0,p=(a.rect.y|0)+c,r=a.rect.width|0,w=(a.rect.height|0)-c,null==w&&(w=0),null==r&&(r=0),null==p&&(p=0),null==h&&(h=0),u=V._pool.get(),null==w&&(w=0),null==r&&(r=0),null==p&&(p=0),null==h&&(h=0),u.x=h,u.y=p,u.width=r,u.height=w,u._inPool=!1,l=new me(u,this)),h=d.rect.x|0,p=d.rect.y|0,r=b,w=c,null==w&&(w=0),null==r&&(r=0),null==p&&(p=0),null==h&&(h=0),u=V._pool.get(),
null==w&&(w=0),null==r&&(r=0),null==p&&(p=0),null==h&&(h=0),u.x=h,u.y=p,u.width=r,u.height=w,u._inPool=!1,z=new me(u,this,z,g,k),0<(d.rect.width|0)-b&&(h=(d.rect.x|0)+b,p=d.rect.y|0,r=(d.rect.width|0)-b,w=c,null==w&&(w=0),null==r&&(r=0),null==p&&(p=0),null==h&&(h=0),u=V._pool.get(),null==w&&(w=0),null==r&&(r=0),null==p&&(p=0),null==h&&(h=0),u.x=h,u.y=p,u.width=r,u.height=w,u._inPool=!1,m=new me(u,this));d.left=z;d.right=m;a.left=d;a.right=l;null!=g&&null!=f&&(this.expandBitmapData(),k?(Zd.matrix.identity(),
Zd.matrix.rotate(Math.PI/2),Zd.matrix.translate(f.height+(z.rect.x|0),z.rect.y|0),this.bitmapData.draw(f,Zd.matrix)):(Zd.point.setTo(z.rect.x|0,z.rect.y|0),this.bitmapData.copyPixels(f,f.rect,Zd.point)),this.addNodeToAtlasFrames(z),this.nodes.h[g]=z);return z}return null},insertFirstNodeInRoot:function(a,b){if(null==this.root.left){var c=a.width+this.border,d=a.height+this.border,f=c,g=d;this.powerOfTwo&&(f=this.getNextPowerOfTwo(f),g=this.getNextPowerOfTwo(g));this.minWidth>f&&(f=this.minWidth);
this.minHeight>g&&(g=this.minHeight);this.powerOfTwo&&(f=this.getNextPowerOfTwo(f),g=this.getNextPowerOfTwo(g));if(0<this.maxWidth&&f>this.maxWidth||0<this.maxHeight&&g>this.maxHeight)return null;this.root.set_width(f);this.root.set_height(g);f=this.needToDivideHorizontally(this.root,c,d);return this.divideNode(this.root,c,d,f,a,b)}return null},expand:function(a,b){if(null==this.root.right){var c=a.width+this.border,d=a.height+this.border,f=(this.root.rect.width|0)+c,g=Math.max(this.root.rect.height|
0,d)|0,k=Math.max(this.root.rect.width|0,c)|0,l=(this.root.rect.height|0)+d,m=f,z=g,h=k,p=l;this.allowRotation&&(m=(this.root.rect.width|0)+d,z=Math.max(this.root.rect.height|0,c)|0,h=Math.max(this.root.rect.width|0,d)|0,p=(this.root.rect.height|0)+c);this.powerOfTwo&&(m=f=this.getNextPowerOfTwo(f),z=g=this.getNextPowerOfTwo(g),h=k=this.getNextPowerOfTwo(k),p=l=this.getNextPowerOfTwo(l),this.allowRotation&&(m=this.getNextPowerOfTwo(m),z=this.getNextPowerOfTwo(z),h=this.getNextPowerOfTwo(h),p=this.getNextPowerOfTwo(p)));
var r=!0,w=!0,u=this.allowRotation,n=this.allowRotation;if(0<this.maxWidth&&f>this.maxWidth||0<this.maxHeight&&g>this.maxHeight)r=!1;if(0<this.maxWidth&&k>this.maxWidth||0<this.maxHeight&&l>this.maxHeight)w=!1;if(0<this.maxWidth&&m>this.maxWidth||0<this.maxHeight&&z>this.maxHeight)u=!1;if(0<this.maxWidth&&h>this.maxWidth||0<this.maxHeight&&p>this.maxHeight)n=!1;if(!(r||w||u||n))return null;var t=f*g,A=k*l,q=h*p,y=!1,E=!1;if(r&&u&&t>m*z||!r&&u)t=q,f=m,g=z,y=r=!0;if(w&&n&&A>q||!w&&n)A=q,k=h,l=p,E=w=
!0;!r&&w?t=A+1:r&&!w&&(A=t+1);m=this.root;z=c;h=d;A>=t?(y&&(z=d,h=c),this.expandRoot((m.rect.width|0)+z,Math.max(m.rect.height|0,h),!0),a=this.divideNode(this.root.right,z,h,!0,a,b,y),this.expandRoot(f,g,!1,!0)):(E&&(z=d,h=c),this.expandRoot(Math.max(m.rect.width|0,z),(m.rect.height|0)+h,!1),a=this.divideNode(this.root.right,z,h,!0,a,b,E),this.expandRoot(k,l,!1,!0));return a}return null},expandRoot:function(a,b,c,d){null==d&&(d=!1);if(a>(this.root.rect.width|0)||b>(this.root.rect.height|0)){var f=
this.root,g=0,k=0,l=b;null==l&&(l=0);null==a&&(a=0);null==k&&(k=0);null==g&&(g=0);b=V._pool.get();null==l&&(l=0);null==a&&(a=0);null==k&&(k=0);null==g&&(g=0);b.x=g;b.y=k;b.width=a;b.height=l;b._inPool=!1;this.root=new me(b,this);d&&(c=this.needToDivideHorizontally(this.root,f.rect.width|0,f.rect.height|0));this.divideNode(this.root,f.rect.width|0,f.rect.height|0,c);this.root.left.left=f}},expandBitmapData:function(){if(null==this.bitmapData||this.bitmapData.width!=(this.root.rect.width|0)||this.bitmapData.height!=
(this.root.rect.height|0)){var a=new ma(this.root.rect.width|0,this.root.rect.height|0,!0,0);null!=this.bitmapData&&(Zd.point.setTo(0,0),a.copyPixels(this.bitmapData,this.bitmapData.rect,Zd.point));this.set_bitmapData(ba.dispose(this.bitmapData));this.set_bitmapData(a)}},getNextPowerOfTwo:function(a){a|=0;if(0<a&&0==(a&a-1))return a;for(var b=1;b<a;)b<<=1;return b},addNodeWithSpacesAndBorders:function(a,b,c,d,f,g){b=Ec.resolveKey(a,b);if(null==b)return null;b=u.bitmap.getKeyWithSpacesAndBorders(b,
c,d,f,g);if(this.hasNodeWithName(b))return this.nodes.h[b].getTileFrames(c,d,f);a=Ec.resolveBitmapData(a);if(null==a)return null;g=xd.addSpacesAndBorders(a,c,d,f,g);g=this.addNode(g,b);if(null==g)return null;null!=f&&(b=2*f.x,a=2*f.y,null==a&&(a=0),null==b&&(b=0),c.set_x(c.x+b),c.set_y(c.y+a));return g.getTileFrames(c,d,f)},getAtlasFrames:function(){var a=this.get_graphic(),b=a.get_atlasFrames();null==a.get_atlasFrames()&&(b=new mc(a));a=this.nodes.h;for(var c=Object.keys(a),d=c.length,f=0;f<d;){var g=
a[c[f++]];this.addNodeToAtlasFrames(g)}return b},addNodeToAtlasFrames:function(a){if(null!=this._graphic&&null!=this._graphic.get_atlasFrames()&&null!=a){var b=this._graphic.get_atlasFrames();if(a.filled&&!Object.prototype.hasOwnProperty.call(b.framesByName.h,a.key)){var c=a.rect.x|0,d=a.rect.y|0,f=(a.rect.width|0)-this.border,g=(a.rect.height|0)-this.border;null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);var k=V._pool.get();null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);
k.x=c;k.y=d;k.width=f;k.height=g;k._inPool=!1;a.rotated?(f=(a.rect.height|0)-this.border,c=(a.rect.width|0)-this.border,null==c&&(c=0),null==f&&(f=0),null==c&&(c=0),null==f&&(f=0),c=N.pool.get().set(f,c)):(f=(a.rect.width|0)-this.border,c=(a.rect.height|0)-this.border,null==c&&(c=0),null==f&&(f=0),null==c&&(c=0),null==f&&(f=0),c=N.pool.get().set(f,c));c._inPool=!1;g=c;c=f=0;null==c&&(c=0);null==f&&(f=0);null==c&&(c=0);null==f&&(f=0);c=N.pool.get().set(f,c);c._inPool=!1;b.addAtlasFrame(k,g,c,a.key,
a.rotated?-90:0)}}},hasNodeWithName:function(a){return Object.prototype.hasOwnProperty.call(this.nodes.h,a)},getNode:function(a){return this.nodes.h[a]},addNodes:function(a,b){var c=a.length;if(c!=b.length)return null;this._tempStorage=[];for(var d=0;d<c;){var f=d++;this._tempStorage.push({bmd:a[f],keyStr:b[f]})}this.addFromAtlasObjects(this._tempStorage);return this},addFromAtlasObjects:function(a){a.sort(q(this,this.bitmapSorter));for(var b=0,c=a.length;b<c;){var d=b++;this.addNode(a[d].bmd,a[d].keyStr)}this._tempStorage=
null},bitmapSorter:function(a,b){return this.allowRotation?b.bmd.width*b.bmd.height-a.bmd.width*a.bmd.height:b.bmd.width==a.bmd.width?b.bmd.height-a.bmd.height:b.bmd.width-a.bmd.width},createQueue:function(){this._tempStorage=[];return this},addToQueue:function(a,b){null==this._tempStorage&&(this._tempStorage=[]);this._tempStorage.push({bmd:a,keyStr:b});return this},generateFromQueue:function(){null!=this._tempStorage&&this.addFromAtlasObjects(this._tempStorage);return this},onClear:function(a){(!this.persist||
null!=this._graphic&&0>=this._graphic.useCount)&&this.destroy()},destroy:function(){this._tempStorage=null;this.deleteSubtree(this.root);this.root=null;u.bitmap.removeByKey(this.name);this.set_bitmapData(null);this._graphic=this.nodes=null;u.signals.preStateCreate.remove(q(this,this.onClear))},clear:function(){this.deleteSubtree(this.root);this.initRoot();u.bitmap.removeByKey(this.name);this.set_bitmapData(null);this.nodes=new Ba;this._graphic=null},getLibGdxData:function(){var a="\n"+(this.name+
"\n");a+="format: RGBA8888\nfilter: Linear,Linear\nrepeat: none\n";for(var b=this.nodes.h,c=Object.keys(b),d=c.length,f=0;f<d;){var g=b[c[f++]];a+=g.key+"\n";a+="  rotate: "+(null==g.rotated?"null":""+g.rotated)+"\n";a+="  xy: "+(g.rect.x|0)+", "+(g.rect.y|0)+"\n";this.allowRotation?(a+="size: "+(g.rect.height|0)+", "+(g.rect.width|0)+"\n",a+="orig: "+(g.rect.height|0)+", "+(g.rect.width|0)+"\n"):(a+="size: "+(g.rect.width|0)+", "+(g.rect.height|0)+"\n",a+="orig: "+(g.rect.width|0)+", "+(g.rect.height|
0)+"\n");a+="  offset: 0, 0\n";a+="  index: -1\n"}return a},deleteSubtree:function(a){null!=a&&(null!=a.left&&this.deleteSubtree(a.left),null!=a.right&&this.deleteSubtree(a.right),a.key=null,a.left=null,a.right=null,a.rect=null,a.atlas=null)},findNodeToInsert:function(a,b){for(var c=[],d=this.root,f,g,k=!0,l=null,m=this.maxWidth*this.maxHeight+1;k;)!d.filled&&null==d.left&&null==d.right&&d.rect.width>=a&&d.rect.height>=b&&(f=(d.rect.width|0)*(d.rect.height|0),f<m&&(m=f,l=d)),null!=d.right?(f=d.right,
f=f.rect.width>=a&&f.rect.height>=b):f=!1,null!=d.left?(g=d.left,g=g.rect.width>=a&&g.rect.height>=b):g=!1,f&&g?(c.push(d.right),d=d.left):g?d=d.left:f?d=d.right:0<c.length?d=c.pop():k=!1;return l},set_bitmapData:function(a){null!=a&&null!=this._graphic&&this._graphic.set_bitmap(a);return this.bitmapData=a},get_graphic:function(){if(null!=this._graphic)return this._graphic;this._graphic=u.bitmap.add(this.bitmapData,!1,this.name);this._graphic.persist=this.persist;return this._graphic},set_persist:function(a){null!=
this._graphic&&(this._graphic.persist=a);return this.persist=a},set_minWidth:function(a){a<=this.maxWidth&&(this.minWidth=a,a>this.get_width()&&this.set_width(a));return this.minWidth},set_minHeight:function(a){a<=this.maxHeight&&(this.minHeight=a,a>this.get_height()&&this.set_height(a));return this.minHeight},get_width:function(){return null!=this.root?this.root.rect.width|0:0},set_width:function(a){a>this.get_width()&&(this.powerOfTwo&&(a=this.getNextPowerOfTwo(a)),a<=this.maxWidth&&null!=this.root&&
(this.root.rect.width|0)<a&&this.expandRoot(a,this.root.rect.height|0,this.needToDivideHorizontally(this.root,this.root.rect.width|0,this.root.rect.height|0)));return a},get_height:function(){return null!=this.root?this.root.rect.height|0:0},set_height:function(a){a>this.get_height()&&(this.powerOfTwo&&(a=this.getNextPowerOfTwo(a)),a<=this.maxHeight&&null!=this.root&&(this.root.rect.height|0)<a&&this.expandRoot(this.root.rect.width|0,a,this.needToDivideHorizontally(this.root,this.root.rect.width|
0,this.root.rect.height|0)));return a},set_maxWidth:function(a){a>=this.minWidth&&(null==this.root||a>=this.get_width())&&(this.maxWidth=a);return this.maxWidth},set_maxHeight:function(a){a>=this.minHeight&&(null==this.root||a>=this.get_height())&&(this.maxHeight=a);return this.maxHeight},set_powerOfTwo:function(a){if(a!=this.powerOfTwo&&a&&null!=this.root){var b=this.getNextPowerOfTwo(this.root.rect.width|0),c=this.getNextPowerOfTwo(this.root.rect.height|0);if(b!=(this.root.rect.width|0)||c!=(this.root.rect.height|
0)){if(0<this.maxWidth&&b>this.maxWidth||0<this.maxHeight&&c>this.maxHeight)return!1;var d=this.root,f=0,g=0,k=c;null==k&&(k=0);null==b&&(b=0);null==g&&(g=0);null==f&&(f=0);c=V._pool.get();null==k&&(k=0);null==b&&(b=0);null==g&&(g=0);null==f&&(f=0);c.x=f;c.y=g;c.width=b;c.height=k;c._inPool=!1;this.root=new me(c,this);null!=d.left&&(this.divideNode(this.root,d.rect.width|0,d.rect.height|0,this.needToDivideHorizontally(this.root,d.rect.width|0,d.rect.height|0)),this.root.left.left=d)}}return this.powerOfTwo=
a},__class__:Zd,__properties__:{set_powerOfTwo:"set_powerOfTwo",set_maxHeight:"set_maxHeight",set_maxWidth:"set_maxWidth",set_minHeight:"set_minHeight",set_minWidth:"set_minWidth",set_height:"set_height",get_height:"get_height",set_width:"set_width",get_width:"get_width",set_persist:"set_persist",get_graphic:"get_graphic",set_bitmapData:"set_bitmapData"}};var me=function(a,b,c,d,f){null==f&&(f=!1);null==d&&(d="");null==c&&(c=!1);this.filled=c;this.right=this.left=null;this.rect=a;this.key=d;this.atlas=
b;this.rotated=f};h["flixel.graphics.atlas.FlxNode"]=me;me.__name__="flixel.graphics.atlas.FlxNode";me.__interfaces__=[D];me.prototype={left:null,right:null,rect:null,key:null,filled:null,atlas:null,rotated:null,destroy:function(){this.atlas=this.rect=this.right=this.left=this.key=null},canPlace:function(a,b){return this.rect.width>=a?this.rect.height>=b:!1},getTileFrames:function(a,b,c){u.bitmap.add(this.atlas.bitmapData,!1,this.atlas.name);var d=this.atlas.getAtlasFrames().framesByName.h[this.key];
return null!=d?(a=Cc.fromFrame(d,a,b),null!=c&&(a=a.addBorder(c)),a):null},getImageFrame:function(){u.bitmap.add(this.atlas.bitmapData,!1,this.atlas.name);var a=this.atlas.getAtlasFrames().framesByName.h[this.key];return null!=a?Oc.fromFrame(a):null},get_isEmpty:function(){return this.filled||null!=this.left?!1:null==this.right},get_x:function(){return this.rect.x|0},get_y:function(){return this.rect.y|0},get_width:function(){return this.rect.width|0},set_width:function(a){return this.rect.width=
a},get_height:function(){return this.rect.height|0},set_height:function(a){return this.rect.height=a},__class__:me,__properties__:{get_isEmpty:"get_isEmpty",set_height:"set_height",get_height:"get_height",set_width:"set_width",get_width:"get_width",get_y:"get_y",get_x:"get_x"}};var Md=function(a,b,c){this.parent=a;this.type=b;null==c?(c=b=0,null==c&&(c=0),null==b&&(b=0),b=N.pool.get().set(b,c),b._inPool=!1):b=c;this.border=b;this.frames=[];this.framesByName=new Ba;null!=a&&a.addFrameCollection(this)};
h["flixel.graphics.frames.FlxFramesCollection"]=Md;Md.__name__="flixel.graphics.frames.FlxFramesCollection";Md.__interfaces__=[D];Md.prototype={frames:null,framesByName:null,parent:null,type:null,border:null,getByName:function(a){return this.framesByName.h[a]},exists:function(a){return Object.prototype.hasOwnProperty.call(this.framesByName.h,a)},getByIndex:function(a){return this.frames[a]},getIndexByName:function(a){for(var b=0,c=this.frames.length;b<c;){var d=b++;if(this.frames[d].name==a)return d}return-1},
getFrameIndex:function(a){return this.frames.indexOf(a)},destroy:function(){this.frames=ba.destroyArray(this.frames);this.border=ba.put(this.border);this.type=this.parent=this.framesByName=null},addEmptyFrame:function(a){var b=new cb(this.parent);b.type=2;var c=V._pool.get(),d=0,f=0,g=0,k=0;null==k&&(k=0);null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);c.x=d;c.y=f;c.width=g;c.height=k;c._inPool=!1;b.set_frame(c);c=b.sourceSize;d=a.width;a=a.height;null==a&&(a=0);null==d&&(d=0);c.set_x(d);c.set_y(a);
this.frames.push(b);return b},addSpriteSheetFrame:function(a){var b=V._pool.get(),c=0,d=0,f=0,g=0;null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);b.x=c;b.y=d;b.width=f;b.height=g;b._inPool=!1;b.x=a.x;b.y=a.y;b.width=a.width;b.height=a.height;a._weak&&!a._inPool&&(a._inPool=!0,a._weak=!1,V._pool.putUnsafe(a));a=b;b=new cb(this.parent);b.set_frame(this.checkFrame(a));c=b.sourceSize;d=a.width;a=a.height;null==a&&(a=0);null==d&&(d=0);c.set_x(d);c.set_y(a);c=b.offset;a=d=0;null==a&&(a=0);null==
d&&(d=0);c.set_x(d);c.set_y(a);return this.pushFrame(b)},addAtlasFrame:function(a,b,c,d,f,g,k,l){null==l&&(l=0);null==k&&(k=!1);null==g&&(g=!1);null==f&&(f=0);if(null!=d&&Object.prototype.hasOwnProperty.call(this.framesByName.h,d))return this.framesByName.h[d];f=new cb(this.parent,f,g,k,l);f.name=d;g=f.sourceSize;k=b.x;l=b.y;null==l&&(l=0);null==k&&(k=0);g.set_x(k);g.set_y(l);g=f.offset;k=c.x;l=c.y;null==l&&(l=0);null==k&&(k=0);g.set_x(k);g.set_y(l);f.set_frame(this.checkFrame(a,d));ba.put(b);ba.put(c);
return this.pushFrame(f)},getAllByPrefix:function(a){var b=[],c=!1;null==c&&(c=!0);for(var d=this.framesByName.h,f=Object.keys(d),g=f.length,k=0;k<g;){var l=f[k++],m=d[l];0==l.indexOf(a)&&(c=!1,b.push(m))}c&&u.log.advanced('no frames found with the prefix "'+a+'"',La.WARNING,!0);return b},forEachByPrefix:function(a,b,c,d){null==c&&(c=!0);for(var f=this.framesByName.h,g=Object.keys(f),k=g.length,l=0;l<k;){var m=g[l++],z=f[m];0==m.indexOf(a)&&(c=!1,b(z))}c&&u.log.advanced(null!=d?d:'no frames found with the prefix "'+
a+'"',La.WARNING,!0)},setFrameOffset:function(a,b,c){Object.prototype.hasOwnProperty.call(this.framesByName.h,a)?(a=this.framesByName.h[a].offset,null==c&&(c=0),null==b&&(b=0),a.set_x(b),a.set_y(c)):u.log.advanced("No frame called "+a,La.WARNING,!0)},addFrameOffset:function(a,b,c){Object.prototype.hasOwnProperty.call(this.framesByName.h,a)?(a=this.framesByName.h[a].offset,null==c&&(c=0),null==b&&(b=0),a.set_x(a.x+b),a.set_y(a.y+c)):u.log.advanced("No frame called "+a,La.WARNING,!0)},setFramesOffsetByPrefix:function(a,
b,c,d){null==d&&(d=!0);null==d&&(d=!0);for(var f=this.framesByName.h,g=Object.keys(f),k=g.length,l=0;l<k;){var m=g[l++],z=f[m];if(0==m.indexOf(a)){d=!1;m=z.offset;z=b;var h=c;null==h&&(h=0);null==z&&(z=0);m.set_x(z);m.set_y(h)}}d&&u.log.advanced('no frames found with the prefix "'+a+'"',La.WARNING,!0)},addFramesOffsetByPrefix:function(a,b,c,d){null==d&&(d=!0);null==d&&(d=!0);for(var f=this.framesByName.h,g=Object.keys(f),k=g.length,l=0;l<k;){var m=g[l++],z=f[m];if(0==m.indexOf(a)){d=!1;m=z.offset;
z=b;var h=c;null==h&&(h=0);null==z&&(z=0);m.set_x(m.x+z);m.set_y(m.y+h)}}d&&u.log.advanced('no frames found with the prefix "'+a+'"',La.WARNING,!0)},setFrameDuration:function(a,b){Object.prototype.hasOwnProperty.call(this.framesByName.h,a)?this.framesByName.h[a].duration=b:u.log.advanced("No frame called "+a,La.WARNING,!0)},checkFrame:function(a,b){var c=a.x,d=this.parent.width,f=0>c?0:c,g=null!=d&&f>d?d:f;c=a.y;d=this.parent.height;f=0>c?0:c;var k=null!=d&&f>d?d:f;c=a.x+a.width;d=this.parent.width;
f=0>c?0:c;var l=null!=d&&f>d?d:f;c=a.y+a.height;d=this.parent.height;f=0>c?0:c;c=g;var m=k;g=l-g;d=(null!=d&&f>d?d:f)-k;null==d&&(d=0);null==g&&(g=0);null==m&&(m=0);null==c&&(c=0);a.x=c;a.y=m;a.width=g;a.height=d;(0>=a.width||0>=a.height)&&u.log.advanced("The frame "+b+" has incorrect data and results in an image with the size of (0, 0)",La.WARNING,!0);return a},pushFrame:function(a,b){null==b&&(b=!1);var c=a.name;if(null!=c&&Object.prototype.hasOwnProperty.call(this.framesByName.h,c)&&!b)return this.framesByName.h[c];
this.frames.push(a);a.cacheFrameMatrix();null!=c&&(this.framesByName.h[c]=a);return a},addBorder:function(a){throw J.thrown("To be overriden in subclasses");},toString:function(){var a=this.frames,b=Ua._pool.get();b.label="frames";b.value=a;a=this.type;var c=Ua._pool.get();c.label="type";c.value=a;return ab.getDebugString([b,c])},get_numFrames:function(){return this.frames.length},get_framesHash:function(){return this.framesByName},set_framesHash:function(a){return this.framesByName=a},__class__:Md,
__properties__:{set_framesHash:"set_framesHash",get_framesHash:"get_framesHash",get_numFrames:"get_numFrames"}};var mc=function(a,b){this.usedGraphics=[];Md.call(this,a,we.ATLAS,b)};h["flixel.graphics.frames.FlxAtlasFrames"]=mc;mc.__name__="flixel.graphics.frames.FlxAtlasFrames";mc.fromAseprite=function(a,b){return mc.fromTexturePackerJson(a,b,!0)};mc.fromTexturePackerJson=function(a,b,c){null==c&&(c=!1);var d=u.bitmap.add(a,!1);if(null==d)return null;a=mc.findFrame(d);if(null!=a)return a;if(null==
d||null==b)return null;a=new mc(d);b=cp.getData(b);if(b.frames instanceof Array){d=0;for(var f=b.frames;d<f.length;)b=f[d],++d,mc.texturePackerHelper(b.filename,b,a,c)}else{d=b.frames;f=la.fields(d);for(var g=0;g<f.length;){var k=b=f[g++];b=d[b];mc.texturePackerHelper(k,b,a,c)}}return a};mc.texturePackerHelper=function(a,b,c,d){null==d&&(d=!1);var f=0;var g=b.frame;if(b.rotated){var k=g.x,l=g.y,m=g.h,z=g.w;null==z&&(z=0);null==m&&(m=0);null==l&&(l=0);null==k&&(k=0);g=V._pool.get();null==z&&(z=0);
null==m&&(m=0);null==l&&(l=0);null==k&&(k=0);g.x=k;g.y=l;g.width=m;g.height=z;g._inPool=!1;f=-90}else k=g.x,l=g.y,m=g.w,z=g.h,null==z&&(z=0),null==m&&(m=0),null==l&&(l=0),null==k&&(k=0),g=V._pool.get(),null==z&&(z=0),null==m&&(m=0),null==l&&(l=0),null==k&&(k=0),g.x=k,g.y=l,g.width=m,g.height=z,g._inPool=!1;k=b.sourceSize.w;z=b.sourceSize.h;null==z&&(z=0);null==k&&(k=0);null==z&&(z=0);null==k&&(k=0);z=N.pool.get().set(k,z);z._inPool=!1;m=z;k=b.spriteSourceSize.x;z=b.spriteSourceSize.y;null==z&&(z=
0);null==k&&(k=0);null==z&&(z=0);null==k&&(k=0);z=N.pool.get().set(k,z);z._inPool=!1;c.addAtlasFrame(g,m,z,a,f,!1,!1,d&&null!=b.duration?b.duration/1E3:0)};mc.fromLibGdx=function(a,b){var c=u.bitmap.add(a);if(null==c)return null;a=mc.findFrame(c);if(null!=a)return a;if(null==c||null==b)return null;a=new mc(c);u.assets.exists(b)&&(b=u.assets.getAssetUnsafe(b,"text",!0));b=O.trim(b).split("\n");c=-1<b[3].indexOf("repeat:")?3:4;b.splice(0,c+1);c=0;for(var d=b.length/7|0;c<d;){var f=7*c++,g=b[f++],k=
0<=b[f++].indexOf("true")?90:0,l=b[f++],m=mc.getDimensions(l),z=m.x,h=m.y;l=b[f++];m=mc.getDimensions(l);var p=m.y;l=h;var r=m.x;m=p;null==m&&(m=0);null==r&&(r=0);null==l&&(l=0);null==z&&(z=0);h=V._pool.get();null==m&&(m=0);null==r&&(r=0);null==l&&(l=0);null==z&&(z=0);h.x=z;h.y=l;h.width=r;h.height=m;h._inPool=!1;l=b[f++];m=mc.getDimensions(l);z=m.x;m=m.y;null==m&&(m=0);null==z&&(z=0);null==m&&(m=0);null==z&&(z=0);m=N.pool.get().set(z,m);m._inPool=!1;z=m;l=b[f++];m=mc.getDimensions(l);l=b[f++];f=
M.parseInt(l.split(":")[1]);-1!=f&&(g+="_"+f);f=m.x;p=z.y-m.y-p;null==p&&(p=0);null==f&&(f=0);null==p&&(p=0);null==f&&(f=0);p=N.pool.get().set(f,p);p._inPool=!1;a.addAtlasFrame(h,z,p,g,k)}return a};mc.getDimensions=function(a){var b=a.indexOf(":"),c=a.indexOf(",");return{x:M.parseInt(a.substring(b+1,c)),y:M.parseInt(a.substring(c+1,a.length))}};mc.fromSparrow=function(a,b){var c=u.bitmap.add(a);if(null==c)return null;a=mc.findFrame(c);if(null!=a)return a;if(null==c||null==b)return null;a=new mc(c);
var d=Ro.getXml(b).firstElement();if(d.nodeType!=X.Document&&d.nodeType!=X.Element)throw J.thrown("Invalid nodeType "+(null==d.nodeType?"null":Oa.toString(d.nodeType)));b=0;for(c=dp.resolve(d,"SubTexture");b<c.length;){var f=c[b];++b;if(!Yj.resolve(f,"width")&&Yj.resolve(f,"w"))throw J.thrown("Sparrow v1 is not supported, use Sparrow v2");var g=Tf.resolve(f,"name"),k=Yj.resolve(f,"frameX"),l=Yj.resolve(f,"rotated")&&"true"==Tf.resolve(f,"rotated"),m=Yj.resolve(f,"flipX")&&"true"==Tf.resolve(f,"flipX"),
z=Yj.resolve(f,"flipY")&&"true"==Tf.resolve(f,"flipY"),h=parseFloat(Tf.resolve(f,"x")),p=parseFloat(Tf.resolve(f,"y"));d=parseFloat(Tf.resolve(f,"width"));var r=parseFloat(Tf.resolve(f,"height"));null==r&&(r=0);null==d&&(d=0);null==p&&(p=0);null==h&&(h=0);var w=V._pool.get();null==r&&(r=0);null==d&&(d=0);null==p&&(p=0);null==h&&(h=0);w.x=h;w.y=p;w.width=d;w.height=r;w._inPool=!1;k?(d=M.parseInt(Tf.resolve(f,"frameX")),p=M.parseInt(Tf.resolve(f,"frameY")),r=M.parseInt(Tf.resolve(f,"frameWidth")),h=
M.parseInt(Tf.resolve(f,"frameHeight")),null==h&&(h=0),null==r&&(r=0),null==p&&(p=0),null==d&&(d=0),f=V._pool.get(),null==h&&(h=0),null==r&&(r=0),null==p&&(p=0),null==d&&(d=0),f.x=d,f.y=p,f.width=r,f.height=h,f._inPool=!1):(p=h=0,d=w.width,r=w.height,null==r&&(r=0),null==d&&(d=0),null==p&&(p=0),null==h&&(h=0),f=V._pool.get(),null==r&&(r=0),null==d&&(d=0),null==p&&(p=0),null==h&&(h=0),f.x=h,f.y=p,f.width=d,f.height=r,f._inPool=!1);r=l?-90:0;d=-f.x;h=-f.y;null==h&&(h=0);null==d&&(d=0);null==h&&(h=0);
null==d&&(d=0);h=N.pool.get().set(d,h);h._inPool=!1;p=f.width;d=f.height;null==d&&(d=0);null==p&&(p=0);null==d&&(d=0);null==p&&(p=0);d=N.pool.get().set(p,d);d._inPool=!1;l&&!k&&(l=f.height,p=f.width,null==p&&(p=0),null==l&&(l=0),d.set_x(l),d.set_y(p));0==w.width||0==w.height?(k||(f.width=1,f.height=1),k=a.addEmptyFrame(f),k.name=g,g=k.offset,k=h.x,m=h.y,null==m&&(m=0),null==k&&(k=0),g.set_x(k),g.set_y(m),g=h,g._weak&&g.put()):a.addAtlasFrame(w,d,h,g,r,m,z)}return a};mc.fromTexturePackerXml=function(a,
b){var c=u.bitmap.add(a,!1);if(null==c)return null;a=mc.findFrame(c);if(null!=a)return a;if(null==c||null==b)return null;a=new mc(c);for(b=Ro.getXml(b).firstElement().elements();b.hasNext();){var d=b.next(),f=d.exists("oX")||d.exists("oY");c=d.exists("r")&&"y"==d.get("r")?-90:0;var g=d.get("n"),k=0,l=0;null==l&&(l=0);null==k&&(k=0);null==l&&(l=0);null==k&&(k=0);l=N.pool.get().set(k,l);l._inPool=!1;var m=M.parseInt(d.get("x")),z=M.parseInt(d.get("y")),h=M.parseInt(d.get("w")),p=M.parseInt(d.get("h"));
null==p&&(p=0);null==h&&(h=0);null==z&&(z=0);null==m&&(m=0);k=V._pool.get();null==p&&(p=0);null==h&&(h=0);null==z&&(z=0);null==m&&(m=0);k.x=m;k.y=z;k.width=h;k.height=p;k._inPool=!1;m=k.width;p=k.height;null==p&&(p=0);null==m&&(m=0);null==p&&(p=0);null==m&&(m=0);p=N.pool.get().set(m,p);p._inPool=!1;f&&(f=M.parseInt(d.get("oX")),m=M.parseInt(d.get("oY")),null==m&&(m=0),null==f&&(f=0),l.set_x(f),l.set_y(m),f=M.parseInt(d.get("oW")),d=M.parseInt(d.get("oH")),null==d&&(d=0),null==f&&(f=0),p.set_x(f),
p.set_y(d));a.addAtlasFrame(k,p,l,g,c)}return a};mc.fromSpriteSheetPacker=function(a,b){var c=u.bitmap.add(a);if(null==c)return null;a=mc.findFrame(c);if(null!=a)return a;if(null==c||null==b)return null;a=new mc(c);u.assets.exists(b)&&(b=u.assets.getAssetUnsafe(b,"text",!0));b=O.trim(b).split("\n");c=0;for(var d=b.length;c<d;){var f=c++,g=b[f].split("=");f=O.trim(g[0]);g=O.trim(g[1]).split(" ");var k=M.parseInt(g[0]),l=M.parseInt(g[1]),m=M.parseInt(g[2]),z=M.parseInt(g[3]);null==z&&(z=0);null==m&&
(m=0);null==l&&(l=0);null==k&&(k=0);g=V._pool.get();null==z&&(z=0);null==m&&(m=0);null==l&&(l=0);null==k&&(k=0);g.x=k;g.y=l;g.width=m;g.height=z;g._inPool=!1;z=g.width;m=g.height;null==m&&(m=0);null==z&&(z=0);null==m&&(m=0);null==z&&(z=0);m=N.pool.get().set(z,m);m._inPool=!1;k=z=0;null==k&&(k=0);null==z&&(z=0);z=N.pool.get().set(z,k);z._inPool=!1;a.addAtlasFrame(g,m,z,f,0)}return a};mc.findFrame=function(a,b){if(null==b){var c=0;b=0;null==b&&(b=0);null==c&&(c=0);null==b&&(b=0);null==c&&(c=0);b=N.pool.get().set(c,
b);b._inPool=!1;b._weak=!0}c=we.ATLAS;if(null==a.shader)u.log.advanced("Invalid call to getFramesCollections on a destroyed graphic",La.WARNING,!0),a=[];else{var d=a.frameCollections.get(c);null==d&&(d=[],a.frameCollections.set(c,d));a=d}for(c=0;c<a.length;){d=a[c];++c;var f=d.border;f=1E-7>=Math.abs(f.x-b.x)&&1E-7>=Math.abs(f.y-b.y);b._weak&&b.put();if(f)return d}return null};mc.__super__=Md;mc.prototype=x(Md.prototype,{usedGraphics:null,destroy:function(){for(;0<this.usedGraphics.length;)this.usedGraphics.shift().decrementUseCount();
Md.prototype.destroy.call(this)},addBorder:function(a){var b=0,c=0;null==c&&(c=0);null==b&&(b=0);var d=b;null==c&&(c=0);null==d&&(d=0);var f=N.pool.get().set(d,c);f._inPool=!1;d=f;d._weak=!0;f=this.border;b=f.x;c=f.y;null==c&&(c=0);null==b&&(b=0);d.set_x(d.x+b);d.set_y(d.y+c);c=f;c._weak&&c.put();b=a.x;c=a.y;null==c&&(c=0);null==b&&(b=0);d.set_x(d.x+b);d.set_y(d.y+c);c=a;c._weak&&c.put();c=mc.findFrame(this.parent,d);if(null!=c)return c;c=new mc(this.parent,d);d=0;for(b=this.frames;d<b.length;)f=
b[d],++d,c.pushFrame(f.setBorderTo(a));return c},addAtlas:function(a,b){null==b&&(b=!1);for(var c=0,d=a.frames;c<d.length;){var f=d[c];++c;this.pushFrame(f,b)}-1==this.usedGraphics.indexOf(a.parent)&&(this.usedGraphics.push(a.parent),a.parent.incrementUseCount());return this},concat:function(a,b){null==b&&(b=!1);a=new mc(this.parent);a.addAtlas(this);a.addAtlas(this,b);return this},__class__:mc});var ea=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"]=ea;ea.__name__="openfl.geom.Rectangle";ea.__limeRectangle=null;ea.prototype={height:null,width:null,x:null,y:null,clone:function(){return new ea(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 ea;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 ea:new ea(b,d,c-b,a-d)},intersectionToOutput:function(a,b){null==b&&(b=new ea);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.setTo(0,0,0,0),b;var f=this.y<a.y?a.y:this.y;a=this.get_bottom()>a.get_bottom()?a.get_bottom():this.get_bottom();
if(a<=f)return b.setTo(0,0,0,0),b;b.setTo(c,f,d-c,a-f);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},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 ea(b,d,c-b,a-d)},
unionToOutput:function(a,b){null==b&&(b=new ea);if(0==this.width||0==this.height)return b.setTo(a.x,a.y,a.width,a.height),b;if(0==a.width||0==a.height)return b.setTo(this.x,this.y,this.width,this.height),b;var c=this.x>a.x?a.x:this.x,d=this.get_right()<a.get_right()?a.get_right():this.get_right(),f=this.y>a.y?a.y:this.y;a=this.get_bottom()<a.get_bottom()?a.get_bottom():this.get_bottom();b.setTo(c,f,d-c,a-f);return b},__contract:function(a,b,c,d){if(0!=this.width||0!=this.height){var f=0,g=0,k=0,l=
0;this.x<a&&(f=a-this.x);this.y<b&&(g=b-this.y);this.get_right()>a+c&&(k=a+c-this.get_right());this.get_bottom()>b+d&&(l=b+d-this.get_bottom());this.x+=f;this.y+=g;this.width+=k-f;this.height+=l-g}},__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 f=this.get_right(),g=this.get_bottom();this.x>a&&(this.x=a,this.width=f-a);this.y>b&&(this.y=b,this.height=g-b);f<a+c&&(this.width=a+c-this.x);g<b+d&&(this.height=b+d-this.y)}},__toLimeRectangle:function(){null==
ea.__limeRectangle&&(ea.__limeRectangle=new Uc);ea.__limeRectangle.setTo(this.x,this.y,this.width,this.height);return ea.__limeRectangle},__transform:function(a,b){var c=b.a*this.x+b.c*this.y,d=c,f=b.b*this.x+b.d*this.y,g=f,k=b.a*(this.x+this.width)+b.c*this.y,l=b.b*(this.x+this.width)+b.d*this.y;k<c&&(c=k);l<f&&(f=l);k>d&&(d=k);l>g&&(g=l);k=b.a*(this.x+this.width)+b.c*(this.y+this.height);l=b.b*(this.x+this.width)+b.d*(this.y+this.height);k<c&&(c=k);l<f&&(f=l);k>d&&(d=k);l>g&&(g=l);k=b.a*this.x+
b.c*(this.y+this.height);l=b.b*this.x+b.d*(this.y+this.height);k<c&&(c=k);l<f&&(f=l);k>d&&(d=k);l>g&&(g=l);a.setTo(c+b.tx,f+b.ty,d-c,g-f)},get_bottom:function(){return this.y+this.height},set_bottom:function(a){this.height=a-this.y;return a},get_bottomRight:function(){return new Ya(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 Ya(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 Ya(this.x,this.y)},set_topLeft:function(a){this.x=a.x;this.y=a.y;return a.clone()},__class__:ea,__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 rc=function(a,b){this.numLetters=this.minOffsetX=this.spaceWidth=0;this.bold=this.italic=!1;this.size=this.lineHeight=0;Md.call(this,a.parent,we.FONT,b);this.frame=a;this.parent.persist=!0;this.parent.set_destroyOnNoUse(!1);
this.charMap=new hc;this.charAdvance=new hc;this.kerning=new hc};h["flixel.graphics.frames.FlxBitmapFont"]=rc;rc.__name__="flixel.graphics.frames.FlxBitmapFont";rc.getDefaultFont=function(){var a=u.bitmap._cache.h.DEFAULT_FONT_KEY;if(null!=a&&(a=rc.findFont(a.get_imageFrame().get_frame()),null!=a))return a;var b="",c=new ma(700,9,!0,-7829368);a=u.bitmap.add(c,!1,"DEFAULT_FONT_KEY");for(var d=0,f=0;2867>f;){b+=y.substr(" 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",
f,1);for(var g=M.parseInt(y.substr(" 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",
++f,1)),k=0,l=M.parseInt(y.substr(" 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",
++f,1));k<l;)for(var m=k++,z=0,h=g;z<h;){var p=z++;++f;"1"==y.substr(" 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",
f,1)?c.setPixel32(1+7*d+p,1+m,-1):c.setPixel32(1+7*d+p,1+m,0)}++f;++d}return rc.fromXNA(a,b)};rc.fromAngelCode=function(a,b){a=a instanceof cb?a:u.bitmap.add(a).get_imageFrame().get_frame();var c=rc.findFont(a);if(null!=c)return c;c=new rc(a);return Xc.parse(b).initBitmapFont(c)};rc.fromXNA=function(a,b,c){null==c&&(c=0);if(a instanceof cb){var d=a;var f=d.parent}else f=u.bitmap.add(a),d=f.get_imageFrame().get_frame();a=rc.findFont(d);if(null!=a)return a;null==b&&(b=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
a=new rc(d);a.fontName=f.key;f=f.bitmap;var g=new Ya;g.setTo(0,0);var k=g.x,l=g.y;-90==d.angle?(g.x=d.frame.width-l,g.y=k):90==d.angle&&(g.x=l,g.y=d.frame.height-k);g.x+=d.frame.x;g.y+=d.frame.y;for(var m=f.getPixel(g.x|0,g.y|0),z=d.frame.width|0,h=d.frame.height|0,p=0,r=va.get_length(b),w=0;w<h&&p<r;){for(var n=0,t=0;t<z&&p<r;){g.setTo(t,w);k=g.x;l=g.y;-90==d.angle?(g.x=d.frame.width-l,g.y=k):90==d.angle&&(g.x=l,g.y=d.frame.height-k);g.x+=d.frame.x;g.y+=d.frame.y;if(f.getPixel(g.x|0,g.y|0)!=m){k=
t;l=w;g.setTo(k,l);var zb=g.x,A=g.y;-90==d.angle?(g.x=d.frame.width-A,g.y=zb):90==d.angle&&(g.x=A,g.y=d.frame.height-zb);g.x+=d.frame.x;for(g.y+=d.frame.y;k<z&&f.getPixel(g.x|0,g.y|0)!=m;)++k,g.setTo(k,w),zb=g.x,A=g.y,-90==d.angle?(g.x=d.frame.width-A,g.y=zb):90==d.angle&&(g.x=A,g.y=d.frame.height-zb),g.x+=d.frame.x,g.y+=d.frame.y;g.setTo(k-1,l);zb=g.x;A=g.y;-90==d.angle?(g.x=d.frame.width-A,g.y=zb):90==d.angle&&(g.x=A,g.y=d.frame.height-zb);g.x+=d.frame.x;for(g.y+=d.frame.y;l<h&&f.getPixel(g.x|0,
g.y|0)!=m;)++l,g.setTo(t,l),zb=g.x,A=g.y,-90==d.angle?(g.x=d.frame.width-A,g.y=zb):90==d.angle&&(g.x=A,g.y=d.frame.height-zb),g.x+=d.frame.x,g.y+=d.frame.y;k-=t;l-=w;zb=va.charCodeAt(b,p);var q=t,y=w,E=k,L=l;null==L&&(L=0);null==E&&(E=0);null==y&&(y=0);null==q&&(q=0);A=V._pool.get();null==L&&(L=0);null==E&&(E=0);null==y&&(y=0);null==q&&(q=0);A.x=q;A.y=y;A.width=E;A.height=L;A._inPool=!1;L=k;a.addCharFrame(zb,A,null,L);32==zb&&(a.spaceWidth=L);l>n&&(n=l);l>a.size&&(a.size=l);t+=k;++p}++t}w+=n+1}a.lineHeight=
a.size;a.updateSourceHeight();rc.point.setTo(d.frame.x|0,d.frame.y|0);b=rc.flashRect;A=d.frame;g=b;null==g&&(g=new ea);g.x=A.x;g.y=A.y;g.width=A.width;g.height=A.height;d=f.getPixel32(d.frame.x|0,d.frame.y|0);f.threshold(f,b,rc.point,"==",d,0,-1,!0);0!=c&&f.threshold(f,b,rc.point,"==",c,0,-1,!0);return a};rc.transformPoint=function(a,b){var c=a.x,d=a.y;-90==b.angle?(a.x=b.frame.width-d,a.y=c):90==b.angle&&(a.x=d,a.y=b.frame.height-c);a.x+=b.frame.x;a.y+=b.frame.y;return a};rc.fromMonospace=function(a,
b,c,d,f){if(a instanceof cb){var g=a;var k=g.parent}else k=u.bitmap.add(a),g=k.get_imageFrame().get_frame();var l=rc.findFont(g);if(null!=l)return l;null==b&&(b=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");if(null==d){var m=0,z=0,h=g.sourceSize.x,p=g.sourceSize.y;null==p&&(p=0);null==h&&(h=0);null==z&&(z=0);null==m&&(m=0);null==p&&(p=0);null==h&&(h=0);null==z&&(z=0);null==m&&(m=0);var r=V._pool.get();null==p&&(p=0);null==h&&(h=0);null==z&&(z=
0);null==m&&(m=0);r.x=m;r.y=z;r.width=h;r.height=p;r._inPool=!1;a=r;a._weak=!0;d=a}if(null==f){var w=0;a=0;null==a&&(a=0);null==w&&(w=0);null==a&&(a=0);null==w&&(w=0);a=N.pool.get().set(w,a);a._inPool=!1;f=a}l=d.width|0;var n=d.height|0;a=d.x|0;w=d.y|0;d._weak&&!d._inPool&&(d._inPool=!0,d._weak=!1,V._pool.putUnsafe(d));var t=f.x|0;r=f.y|0;f=c.x|0;c=c.y|0;d=f+t;var zb=c+r;n=0==c?1:(n+r)/zb|0;t=0==f?1:(l+t)/d|0;l=new rc(g);l.fontName=k.key;l.lineHeight=l.size=c;l.spaceWidth=f;k=0;g=va.get_length(b);
for(var A=0;A<n;)for(var q=A++,y=0,E=t;y<E;)if(r=y++,m=a+r*d,z=w+q*zb,h=f,p=c,null==p&&(p=0),null==h&&(h=0),null==z&&(z=0),null==m&&(m=0),r=V._pool.get(),null==p&&(p=0),null==h&&(h=0),null==z&&(z=0),null==m&&(m=0),r.x=m,r.y=z,r.width=h,r.height=p,r._inPool=!1,l.addCharFrame(va.charCodeAt(b,k),r,null,f),++k,k>=g)return l;l.updateSourceHeight();return l};rc.findFont=function(a,b){if(null==b){var c=0;b=0;null==b&&(b=0);null==c&&(c=0);null==b&&(b=0);null==c&&(c=0);b=N.pool.get().set(c,b);b._inPool=!1;
b._weak=!0}c=a.parent;var d=we.FONT;if(null==c.shader)u.log.advanced("Invalid call to getFramesCollections on a destroyed graphic",La.WARNING,!0),c=[];else{var f=c.frameCollections.get(d);null==f&&(f=[],c.frameCollections.set(d,f));c=f}d=c;for(f=0;f<d.length;){var g=d[f];++f;g.frame==a?(c=g.border,c=1E-7>=Math.abs(c.x-b.x)&&1E-7>=Math.abs(c.y-b.y),b._weak&&b.put()):c=!1;if(c)return g}return null};rc.__super__=Md;rc.prototype=x(Md.prototype,{size:null,lineHeight:null,bold:null,italic:null,fontName:null,
numLetters:null,minOffsetX:null,spaceWidth:null,charMap:null,charAdvance:null,kerning:null,frame:null,destroy:function(){Md.prototype.destroy.call(this);this.charAdvance=this.charMap=this.fontName=this.frame=null},addCharFrame:function(a,b,c,d){var f=String.fromCodePoint(a);0!=b.width&&0!=b.height&&null==this.framesByName.h[f]&&this.setCharFrame(a,b,d,c)},setCharFrame:function(a,b,c,d){var f=String.fromCodePoint(a);0!=b.width&&0!=b.height||u.log.advanced("Invalid frame size: "+M.string(b)+' for char "'+
f+'" in font "'+this.fontName+'"',La.ERROR,!0);b=this.frame.subFrameTo(b);var g=b.sourceSize,k=b.sourceSize.x+(null!=d&&0<d.x?d.x:0),l=b.sourceSize.y+(null!=d&&0<d.y?d.y:0);null==l&&(l=0);null==k&&(k=0);g.set_x(k);g.set_y(l);null!=d&&(g=b.offset,k=d.x,l=d.y,null==l&&(l=0),null==k&&(k=0),g.set_x(g.x+k),g.set_y(g.y+l),d._weak&&d.put());b.name=f;this.pushFrame(b,!0);this.charMap.h[a]=b;this.charAdvance.h[a]=c},updateSourceHeight:function(){for(var a=0,b=this.frames;a<b.length;){var c=b[a];++a;c.sourceSize.set_y(this.lineHeight);
c.cacheFrameMatrix()}},charExists:function(a){return this.charMap.h.hasOwnProperty(a)},getCharFrame:function(a){return this.charMap.h[a]},getCharAdvance:function(a){return this.charAdvance.h.hasOwnProperty(a)?this.charAdvance.h[a]:0},getKerning:function(a,b){return this.kerning.h.hasOwnProperty(a)&&this.kerning.h[a].h.hasOwnProperty(b)?this.kerning.h[a].h[b]:0},addKerningPair:function(a,b,c){if(!this.kerning.h.hasOwnProperty(a)){var d=this.kerning,f=new hc;d.h[a]=f}this.kerning.h[a].h[b]=c},getCharWidth:function(a){return this.charMap.h.hasOwnProperty(a)?
this.charMap.h[a].sourceSize.x:0},addBorder:function(a){var b=0,c=0;null==c&&(c=0);null==b&&(b=0);var d=b;null==c&&(c=0);null==d&&(d=0);var f=N.pool.get().set(d,c);f._inPool=!1;d=f;d._weak=!0;f=this.border;b=f.x;c=f.y;null==c&&(c=0);null==b&&(b=0);d.set_x(d.x+b);d.set_y(d.y+c);c=f;c._weak&&c.put();b=a.x;c=a.y;null==c&&(c=0);null==b&&(b=0);d.set_x(d.x+b);d.set_y(d.y+c);c=a;c._weak&&c.put();c=rc.findFont(this.frame,d);if(null!=c)return c;c=new rc(this.frame,a);c.spaceWidth=this.spaceWidth;c.fontName=
this.fontName;c.numLetters=this.numLetters;c.minOffsetX=this.minOffsetX;c.size=this.size;c.lineHeight=this.lineHeight;c.italic=this.italic;c.bold=this.bold;b=0;for(f=this.frames;b<f.length;){var g=f[b];++b;d=g.setBorderTo(a);c.pushFrame(d);g=va.charCodeAt(g.name,0);c.charMap.h[g]=d;c.charAdvance.h[g]=this.charAdvance.h[g]}c.updateSourceHeight();return c},__class__:rc});var Ze=function(a,b,c,d,f,g){wa.call(this,a,b,c,d,f,g)};h["flixel.math.FlxMatrix"]=Ze;Ze.__name__="flixel.math.FlxMatrix";Ze.__super__=
wa;Ze.prototype=x(wa.prototype,{rotateWithTrig:function(a,b){var c=this.a*a-this.b*b;this.b=this.a*b+this.b*a;this.a=c;c=this.c*a-this.d*b;this.d=this.c*b+this.d*a;this.c=c;c=this.tx*a-this.ty*b;this.ty=this.tx*b+this.ty*a;this.tx=c;return this},rotateBy180:function(){this.setTo(-this.a,-this.b,-this.c,-this.d,-this.tx,-this.ty);return this},rotateByPositive90:function(){this.setTo(-this.b,this.a,-this.d,this.c,-this.ty,this.tx);return this},rotateByNegative90:function(){this.setTo(this.b,-this.a,
this.d,-this.c,this.ty,-this.tx);return this},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},__class__:Ze});var cb=function(a,b,c,d,f){null==f&&(f=0);null==d&&(d=!1);null==c&&(c=!1);null==b&&(b=0);this.parent=a;this.angle=b;this.flipX=c;this.flipY=d;this.duration=f;b=a=this.type=0;null==b&&(b=0);null==a&&(a=0);a=N.pool.get().set(a,b);a._inPool=!1;this.sourceSize=a;b=a=0;null==b&&(b=0);null==a&&(a=0);a=N.pool.get().set(a,b);a._inPool=
!1;this.offset=a;this.blitMatrix=Array(6);u.renderTile&&(this.tileMatrix=Array(6))};h["flixel.graphics.frames.FlxFrame"]=cb;cb.__name__="flixel.graphics.frames.FlxFrame";cb.__interfaces__=[D];cb.sortFrames=function(a,b,c,d){null==d&&(d=!0);cb.sortHelper(a,b.length,null==c?0:c.length,d)};cb.sort=function(a,b,c,d){null==d&&(d=!0);cb.sortHelper(a,b,c,d)};cb.sortHelper=function(a,b,c,d){null==d&&(d=!0);if(d)for(d=0;d<a.length;){var f=a[d];++d;f=f.name;var g=f.substring(b,f.length-c),k=M.parseInt(g);null==
k?u.log.advanced('Could not parse frame number of "'+g+'" in frame named "'+f+'"',La.WARNING,!0):0>k&&u.log.advanced('Found negative frame number "'+g+'" in frame named "'+f+'"',La.WARNING,!0)}pd.sort(a,function(a,d){return cb.sortByName(a,d,b,c)})};cb.checkValidName=function(a,b,c){b=a.substring(b,a.length-c);c=M.parseInt(b);null==c?u.log.advanced('Could not parse frame number of "'+b+'" in frame named "'+a+'"',La.WARNING,!0):0>c&&u.log.advanced('Found negative frame number "'+b+'" in frame named "'+
a+'"',La.WARNING,!0)};cb.sortByName=function(a,b,c,d){var f=a.name;a=M.parseInt(f.substring(c,f.length-d));f=b.name;b=M.parseInt(f.substring(c,f.length-d));return(null==a?0:0<a?a:-a)-(null==b?0:0<b?b:-b)};cb.prototype={name:null,frame:null,uv:null,parent:null,angle:null,flipX:null,flipY:null,sourceSize:null,offset:null,duration:null,type:null,tileMatrix:null,blitMatrix:null,cacheFrameMatrix:function(){var a=cb._matrix,b=!0;null==b&&(b=!0);a.identity();b&&a.translate(-this.frame.x,-this.frame.y);90==
this.angle?(a.setTo(-a.b,a.a,-a.d,a.c,-a.ty,a.tx),a.translate(this.frame.height,0)):-90==this.angle&&(a.setTo(a.b,-a.a,a.d,-a.c,a.ty,-a.tx),a.translate(0,this.frame.width));a.translate(this.offset.x,this.offset.y);this.blitMatrix[0]=cb._matrix.a;this.blitMatrix[1]=cb._matrix.b;this.blitMatrix[2]=cb._matrix.c;this.blitMatrix[3]=cb._matrix.d;this.blitMatrix[4]=cb._matrix.tx;this.blitMatrix[5]=cb._matrix.ty;u.renderTile&&(a=cb._matrix,b=!1,null==b&&(b=!0),a.identity(),b&&a.translate(-this.frame.x,-this.frame.y),
90==this.angle?(a.setTo(-a.b,a.a,-a.d,a.c,-a.ty,a.tx),a.translate(this.frame.height,0)):-90==this.angle&&(a.setTo(a.b,-a.a,a.d,-a.c,a.ty,-a.tx),a.translate(0,this.frame.width)),a.translate(this.offset.x,this.offset.y),this.tileMatrix[0]=cb._matrix.a,this.tileMatrix[1]=cb._matrix.b,this.tileMatrix[2]=cb._matrix.c,this.tileMatrix[3]=cb._matrix.d,this.tileMatrix[4]=cb._matrix.tx,this.tileMatrix[5]=cb._matrix.ty)},prepareBlitMatrix:function(a,b){null==b&&(b=!0);a.identity();b&&a.translate(-this.frame.x,
-this.frame.y);90==this.angle?(a.setTo(-a.b,a.a,-a.d,a.c,-a.ty,a.tx),a.translate(this.frame.height,0)):-90==this.angle&&(a.setTo(a.b,-a.a,a.d,-a.c,a.ty,-a.tx),a.translate(0,this.frame.width));a.translate(this.offset.x,this.offset.y);return a},rotateAndFlip:function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!1);null==b&&(b=0);var f=this.sourceSize.x|0,g=this.sourceSize.y|0;if(0!=b){var k=f;f=g;g=k;if(90==b)a.setTo(-a.b,a.a,-a.d,a.c,-a.ty,a.tx),a.translate(this.sourceSize.y,0);else if(-90==b||-90==b)a.setTo(a.b,
-a.a,a.d,-a.c,a.ty,-a.tx),a.translate(0,this.sourceSize.x)}c&&(a.scale(-1,1),a.translate(f,0));d&&(a.scale(1,-1),a.translate(0,g));return a},prepareTransformedBlitMatrix:function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!1);null==b&&(b=0);a.a=this.blitMatrix[0];a.b=this.blitMatrix[1];a.c=this.blitMatrix[2];a.d=this.blitMatrix[3];a.tx=this.blitMatrix[4];a.ty=this.blitMatrix[5];null==d&&(d=!1);null==c&&(c=!1);null==b&&(b=0);var f=this.sourceSize.x|0,g=this.sourceSize.y|0;if(0!=b){var k=f;f=g;g=k;if(90==
b)a.setTo(-a.b,a.a,-a.d,a.c,-a.ty,a.tx),a.translate(this.sourceSize.y,0);else if(-90==b||-90==b)a.setTo(a.b,-a.a,a.d,-a.c,a.ty,-a.tx),a.translate(0,this.sourceSize.x)}c&&(a.scale(-1,1),a.translate(f,0));d&&(a.scale(1,-1),a.translate(0,g));return a},prepareMatrix:function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!1);null==b&&(b=0);if(u.renderBlit)return a.identity(),a;a.a=this.tileMatrix[0];a.b=this.tileMatrix[1];a.c=this.tileMatrix[2];a.d=this.tileMatrix[3];a.tx=this.tileMatrix[4];a.ty=this.tileMatrix[5];
c=c!=this.flipX;d=d!=this.flipY;if(0==b&&!c&&!d)return a;null==d&&(d=!1);null==c&&(c=!1);null==b&&(b=0);var f=this.sourceSize.x|0,g=this.sourceSize.y|0;if(0!=b){var k=f;f=g;g=k;if(90==b)a.setTo(-a.b,a.a,-a.d,a.c,-a.ty,a.tx),a.translate(this.sourceSize.y,0);else if(-90==b||-90==b)a.setTo(a.b,-a.a,a.d,-a.c,a.ty,-a.tx),a.translate(0,this.sourceSize.x)}c&&(a.scale(-1,1),a.translate(f,0));d&&(a.scale(1,-1),a.translate(0,g));return a},fillBlitMatrix:function(a){a.a=this.blitMatrix[0];a.b=this.blitMatrix[1];
a.c=this.blitMatrix[2];a.d=this.blitMatrix[3];a.tx=this.blitMatrix[4];a.ty=this.blitMatrix[5];return a},paint:function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!1);var f=0,g=c;null==d&&(d=!1);null==g&&(g=!1);null==f&&(f=0);var k=0!=f;f=(k?this.sourceSize.y:this.sourceSize.x)|0;k=(k?this.sourceSize.x:this.sourceSize.y)|0;null!=a&&d&&(a=ba.disposeIfNotEqual(a,f,k));null==a||g?null==a&&(a=new ma(f,k,!0,0)):(null!=b?cb._rect.setTo(b.x,b.y,f,k):cb._rect.setTo(0,0,f,k),a.fillRect(cb._rect,0));if(2==this.type)return a;
if(0==this.angle)g=this.offset,d=cb._point,null==d&&(d=new Ya),d.x=g.x,d.y=g.y,null!=b&&cb._point.offset(b.x,b.y),g=this.parent.bitmap,k=this.frame,f=cb._rect,null==f&&(f=new ea),f.x=k.x,f.y=k.y,f.width=k.width,f.height=k.height,a.copyPixels(g,f,cb._point,null,null,c);else{var l=cb._matrix;l.a=this.blitMatrix[0];l.b=this.blitMatrix[1];l.c=this.blitMatrix[2];l.d=this.blitMatrix[3];l.tx=this.blitMatrix[4];l.ty=this.blitMatrix[5];null!=b&&cb._matrix.translate(b.x,b.y);g=this.parent.bitmap;l=c=cb._matrix;
d=cb._rect;var m=this.frame.x;k=this.frame.y;null==k&&(k=0);null==m&&(m=0);null==k&&(k=0);null==m&&(m=0);null==k&&(k=0);null==m&&(m=0);b=N.pool.get().set(m,k);b._inPool=!1;b._weak=!0;f=b;k=this.frame;m=k.x+k.width;k=this.frame;k=k.y+k.height;null==k&&(k=0);null==m&&(m=0);null==k&&(k=0);null==m&&(m=0);null==k&&(k=0);null==m&&(m=0);b=N.pool.get().set(m,k);b._inPool=!1;b._weak=!0;m=f.x*l.a+f.y*l.c+l.tx;k=f.x*l.b+f.y*l.d+l.ty;null==k&&(k=0);null==m&&(m=0);f.set_x(m);f.set_y(k);m=b.x*l.a+b.y*l.c+l.tx;
k=b.x*l.b+b.y*l.d+l.ty;null==k&&(k=0);null==m&&(m=0);b.set_x(m);b.set_y(k);k=V._pool.get();var z=m=l=0,h=0;null==h&&(h=0);null==z&&(z=0);null==m&&(m=0);null==l&&(l=0);k.x=l;k.y=m;k.width=z;k.height=h;k._inPool=!1;z=Math.min(f.x,b.x);h=Math.min(f.y,b.y);var p=Math.max(f.x,b.x),r=Math.max(f.y,b.y);f._weak&&f.put();f=b;f._weak&&f.put();l=z;m=h;z=p-z;h=r-h;null==h&&(h=0);null==z&&(z=0);null==m&&(m=0);null==l&&(l=0);k.x=l;k.y=m;k.width=z;k.height=h;b=k;f=d;null==f&&(f=new ea);f.x=b.x;f.y=b.y;f.width=b.width;
f.height=b.height;b._inPool||(b._inPool=!0,b._weak=!1,V._pool.putUnsafe(b));a.draw(g,c,null,null,d)}return a},paintRotatedAndFlipped:function(a,b,c,d,f,g,k){null==k&&(k=!1);null==g&&(g=!1);null==f&&(f=!1);null==d&&(d=!1);null==c&&(c=0);if(2==this.type&&0==c)return this.paint(a,b,g,k);var l=c;null==k&&(k=!1);null==g&&(g=!1);null==l&&(l=0);var m=0!=l;l=(m?this.sourceSize.y:this.sourceSize.x)|0;m=(m?this.sourceSize.x:this.sourceSize.y)|0;null!=a&&k&&(a=ba.disposeIfNotEqual(a,l,m));null==a||g?null==a&&
(a=new ma(l,m,!0,0)):(null!=b?cb._rect.setTo(b.x,b.y,l,m):cb._rect.setTo(0,0,l,m),a.fillRect(cb._rect,0));if(2==this.type)return a;this.prepareTransformedBlitMatrix(cb._matrix,c,d!=this.flipX,f!=this.flipY);null!=b&&cb._matrix.translate(b.x,b.y);c=this.parent.bitmap;l=d=cb._matrix;f=cb._rect;m=this.frame.x;k=this.frame.y;null==k&&(k=0);null==m&&(m=0);null==k&&(k=0);null==m&&(m=0);null==k&&(k=0);null==m&&(m=0);b=N.pool.get().set(m,k);b._inPool=!1;b._weak=!0;g=b;k=this.frame;m=k.x+k.width;k=this.frame;
k=k.y+k.height;null==k&&(k=0);null==m&&(m=0);null==k&&(k=0);null==m&&(m=0);null==k&&(k=0);null==m&&(m=0);b=N.pool.get().set(m,k);b._inPool=!1;b._weak=!0;m=g.x*l.a+g.y*l.c+l.tx;k=g.x*l.b+g.y*l.d+l.ty;null==k&&(k=0);null==m&&(m=0);g.set_x(m);g.set_y(k);m=b.x*l.a+b.y*l.c+l.tx;k=b.x*l.b+b.y*l.d+l.ty;null==k&&(k=0);null==m&&(m=0);b.set_x(m);b.set_y(k);k=V._pool.get();var z=m=l=0,h=0;null==h&&(h=0);null==z&&(z=0);null==m&&(m=0);null==l&&(l=0);k.x=l;k.y=m;k.width=z;k.height=h;k._inPool=!1;z=Math.min(g.x,
b.x);h=Math.min(g.y,b.y);var p=Math.max(g.x,b.x),r=Math.max(g.y,b.y);g._weak&&g.put();g=b;g._weak&&g.put();l=z;m=h;z=p-z;h=r-h;null==h&&(h=0);null==z&&(z=0);null==m&&(m=0);null==l&&(l=0);k.x=l;k.y=m;k.width=z;k.height=h;g=k;b=f;null==b&&(b=new ea);b.x=g.x;b.y=g.y;b.width=g.width;b.height=g.height;g._inPool||(g._inPool=!0,g._weak=!1,V._pool.putUnsafe(g));a.draw(c,d,null,null,f);return a},checkInputBitmap:function(a,b,c,d,f){null==f&&(f=!1);null==d&&(d=!1);null==c&&(c=0);var g=0!=c;c=(g?this.sourceSize.y:
this.sourceSize.x)|0;g=(g?this.sourceSize.x:this.sourceSize.y)|0;null!=a&&f&&(a=ba.disposeIfNotEqual(a,c,g));null==a||d?null==a&&(a=new ma(c,g,!0,0)):(null!=b?cb._rect.setTo(b.x,b.y,c,g):cb._rect.setTo(0,0,c,g),a.fillRect(cb._rect,0));return a},getDrawFrameRect:function(a,b){var c=this.frame.x,d=this.frame.y;null==d&&(d=0);null==c&&(c=0);null==d&&(d=0);null==c&&(c=0);null==d&&(d=0);null==c&&(c=0);var f=N.pool.get().set(c,d);f._inPool=!1;f._weak=!0;var g=f;d=this.frame;c=d.x+d.width;d=this.frame;d=
d.y+d.height;null==d&&(d=0);null==c&&(c=0);null==d&&(d=0);null==c&&(c=0);null==d&&(d=0);null==c&&(c=0);f=N.pool.get().set(c,d);f._inPool=!1;f._weak=!0;c=g.x*a.a+g.y*a.c+a.tx;d=g.x*a.b+g.y*a.d+a.ty;null==d&&(d=0);null==c&&(c=0);g.set_x(c);g.set_y(d);c=f.x*a.a+f.y*a.c+a.tx;d=f.x*a.b+f.y*a.d+a.ty;null==d&&(d=0);null==c&&(c=0);f.set_x(c);f.set_y(d);d=V._pool.get();var k=c=a=0,l=0;null==l&&(l=0);null==k&&(k=0);null==c&&(c=0);null==a&&(a=0);d.x=a;d.y=c;d.width=k;d.height=l;d._inPool=!1;k=Math.min(g.x,f.x);
l=Math.min(g.y,f.y);var m=Math.max(g.x,f.x),z=Math.max(g.y,f.y);g._weak&&g.put();g=f;g._weak&&g.put();a=k;c=l;k=m-k;l=z-l;null==l&&(l=0);null==k&&(k=0);null==c&&(c=0);null==a&&(a=0);d.x=a;d.y=c;d.width=k;d.height=l;g=d;f=b;null==f&&(f=new ea);f.x=g.x;f.y=g.y;f.width=g.width;f.height=g.height;g._inPool||(g._inPool=!0,g._weak=!1,V._pool.putUnsafe(g));return b},subFrameTo:function(a,b){null==b?b=new cb(this.parent,this.angle):(b.parent=this.parent,b.angle=this.angle,b.set_frame(ba.put(b.frame)));var c=
b.sourceSize,d=a.width,f=a.height;null==f&&(f=0);null==d&&(d=0);c.set_x(d);c.set_y(f);if(2==this.type)return b.type=2,c=b.offset,f=d=0,null==f&&(f=0),null==d&&(d=0),c.set_x(d),c.set_y(f),b;d=V._pool.get();var g=f=c=0,k=0;null==k&&(k=0);null==g&&(g=0);null==f&&(f=0);null==c&&(c=0);d.x=c;d.y=f;d.width=g;d.height=k;var l=d;l._inPool=!1;d=l;d.width=this.frame.width;d.height=this.frame.height;0!=this.angle&&(d.width=this.frame.height,d.height=this.frame.width);c=Math.max(this.offset.x,0);f=Math.max(this.offset.y,
0);a.x+=-c;a.y+=-f;l=d.intersection(a);ba.put(d);a.x+=c;a.y+=f;if(0==l.width||0==l.height)b.type=2,k=g=f=c=0,null==k&&(k=0),null==g&&(g=0),null==f&&(f=0),null==c&&(c=0),l.x=c,l.y=f,l.width=g,l.height=k,b.set_frame(l),c=b.offset,f=d=0,null==f&&(f=0),null==d&&(d=0),c.set_x(d),c.set_y(f);else{b.type=0;c=b.offset;d=l.x;f=l.y;null==f&&(f=0);null==d&&(d=0);c.set_x(d);c.set_y(f);d=a.x;f=a.y;null==f&&(f=0);null==d&&(d=0);c.set_x(c.x-d);c.set_y(c.y-f);k=this.offset;d=k.x;f=k.y;null==f&&(f=0);null==d&&(d=0);
c.set_x(c.x+d);c.set_y(c.y+f);d=k;d._weak&&d.put();d=l.x;f=l.y;null==f&&(f=0);null==d&&(d=0);null==f&&(f=0);null==d&&(d=0);null==f&&(f=0);null==d&&(d=0);k=N.pool.get().set(d,f);k._inPool=!1;d=k;d._weak=!0;a=d;d=l.x+l.width;f=l.y+l.height;null==f&&(f=0);null==d&&(d=0);null==f&&(f=0);null==d&&(d=0);null==f&&(f=0);null==d&&(d=0);k=N.pool.get().set(d,f);k._inPool=!1;d=k;d._weak=!0;c=d;cb._matrix.identity();-90==this.angle?(d=cb._matrix,d.setTo(-d.b,d.a,-d.d,d.c,-d.ty,d.tx),cb._matrix.translate(this.frame.width,
0)):90==this.angle&&(d=cb._matrix,d.setTo(d.b,-d.a,d.d,-d.c,d.ty,-d.tx),cb._matrix.translate(0,this.frame.height));0!=this.angle&&(f=cb._matrix,d=a.x*f.a+a.y*f.c+f.tx,f=a.x*f.b+a.y*f.d+f.ty,null==f&&(f=0),null==d&&(d=0),a.set_x(d),a.set_y(f),f=cb._matrix,d=c.x*f.a+c.y*f.c+f.tx,f=c.x*f.b+c.y*f.d+f.ty,null==f&&(f=0),null==d&&(d=0),c.set_x(d),c.set_y(f));g=Math.min(a.x,c.x);k=Math.min(a.y,c.y);var m=Math.max(a.x,c.x),z=Math.max(a.y,c.y);d=a;d._weak&&d.put();d=c;d._weak&&d.put();c=g;f=k;g=m-g;k=z-k;null==
k&&(k=0);null==g&&(g=0);null==f&&(f=0);null==c&&(c=0);l.x=c;l.y=f;l.width=g;l.height=k;l.x+=this.frame.x;l.y+=this.frame.y;b.set_frame(l);b.cacheFrameMatrix()}return b},setBorderTo:function(a,b){var c=a.x,d=a.y,f=this.sourceSize.x-2*a.x,g=this.sourceSize.y-2*a.y;null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);a=V._pool.get();null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);a.x=c;a.y=d;a.width=f;a.height=g;a._inPool=!1;b=this.subFrameTo(a,b);b.name=this.name;ba.put(a);return b},
clipTo:function(a,b){null==b?b=new cb(this.parent,this.angle):(b.parent=this.parent,b.angle=this.angle,b.set_frame(ba.put(b.frame)));var c=b.sourceSize,d=this.sourceSize,f=d.x,g=d.y;null==g&&(g=0);null==f&&(f=0);c.set_x(f);c.set_y(g);f=d;f._weak&&f.put();b.name=this.name;if(2==this.type)return b.type=2,c=b.offset,g=f=0,null==g&&(g=0),null==f&&(f=0),c.set_x(f),c.set_y(g),b;var k=0;c=0;null==c&&(c=0);null==k&&(k=0);f=V._pool.get();d=k;var l=0;g=0;null==g&&(g=0);null==l&&(l=0);null==c&&(c=0);null==d&&
(d=0);f.x=d;f.y=c;f.width=l;f.height=g;d=f;d._inPool=!1;f=d;f.width=this.frame.width;f.height=this.frame.height;c=f;0!=this.angle&&(c.width=this.frame.height,c.height=this.frame.width);a.x+=-this.offset.x;a.y+=-this.offset.y;d=c.intersection(a);c._inPool||(c._inPool=!0,c._weak=!1,V._pool.putUnsafe(c));if(0==d.width||0==d.height)b.type=2,g=l=c=k=0,null==g&&(g=0),null==l&&(l=0),null==c&&(c=0),null==k&&(k=0),d.x=k,d.y=c,d.width=l,d.height=g,b.set_frame(d),c=b.offset,g=f=0,null==g&&(g=0),null==f&&(f=
0),c.set_x(f),c.set_y(g);else{b.type=0;c=b.offset;f=d.x;g=d.y;null==g&&(g=0);null==f&&(f=0);c.set_x(f);c.set_y(g);k=this.offset;f=k.x;g=k.y;null==g&&(g=0);null==f&&(f=0);c.set_x(c.x+f);c.set_y(c.y+g);f=k;f._weak&&f.put();f=d.x;g=d.y;null==g&&(g=0);null==f&&(f=0);null==g&&(g=0);null==f&&(f=0);null==g&&(g=0);null==f&&(f=0);k=N.pool.get().set(f,g);k._inPool=!1;f=k;f._weak=!0;c=f;f=d.x+d.width;g=d.y+d.height;null==g&&(g=0);null==f&&(f=0);null==g&&(g=0);null==f&&(f=0);null==g&&(g=0);null==f&&(f=0);k=N.pool.get().set(f,
g);k._inPool=!1;f=k;f._weak=!0;k=f;cb._matrix.identity();-90==this.angle?(f=cb._matrix,f.setTo(-f.b,f.a,-f.d,f.c,-f.ty,f.tx),cb._matrix.translate(this.frame.width,0)):90==this.angle&&(f=cb._matrix,f.setTo(f.b,-f.a,f.d,-f.c,f.ty,-f.tx),cb._matrix.translate(0,this.frame.height));0!=this.angle&&(g=cb._matrix,f=c.x*g.a+c.y*g.c+g.tx,g=c.x*g.b+c.y*g.d+g.ty,null==g&&(g=0),null==f&&(f=0),c.set_x(f),c.set_y(g),g=cb._matrix,f=k.x*g.a+k.y*g.c+g.tx,g=k.x*g.b+k.y*g.d+g.ty,null==g&&(g=0),null==f&&(f=0),k.set_x(f),
k.set_y(g));l=Math.min(c.x,k.x);g=Math.min(c.y,k.y);var m=Math.max(c.x,k.x),z=Math.max(c.y,k.y);f=c;f._weak&&f.put();f=k;f._weak&&f.put();k=l;c=g;l=m-l;g=z-g;null==g&&(g=0);null==l&&(l=0);null==c&&(c=0);null==k&&(k=0);d.x=k;d.y=c;d.width=l;d.height=g;d.x+=this.frame.x;d.y+=this.frame.y;b.set_frame(d);b.cacheFrameMatrix()}a.x+=this.offset.x;a.y+=this.offset.y;return b},copyTo:function(a){null==a?a=new cb(this.parent,this.angle):(a.parent=this.parent,a.angle=this.angle,a.set_frame(ba.put(a.frame)));
var b=a.offset,c=this.offset,d=c.x,f=c.y;null==f&&(f=0);null==d&&(d=0);b.set_x(d);b.set_y(f);b=c;b._weak&&b.put();a.flipX=this.flipX;a.flipY=this.flipY;b=a.sourceSize;c=this.sourceSize;d=c.x;f=c.y;null==f&&(f=0);null==d&&(d=0);b.set_x(d);b.set_y(f);b=c;b._weak&&b.put();b=V._pool.get();var g=f=d=c=0;null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);b.x=c;b.y=d;b.width=f;b.height=g;b._inPool=!1;c=this.frame;b.x=c.x;b.y=c.y;b.width=c.width;b.height=c.height;c._weak&&!c._inPool&&(c._inPool=
!0,c._weak=!1,V._pool.putUnsafe(c));a.set_frame(b);a.type=this.type;a.name=this.name;a.cacheFrameMatrix();return a},destroy:function(){this.parent=this.name=null;this.sourceSize=ba.put(this.sourceSize);this.offset=ba.put(this.offset);this.set_frame(ba.put(this.frame));this.uv=ba.put(this.uv);this.tileMatrix=this.blitMatrix=null},toString:function(){var a=this.name,b=Ua._pool.get();b.label="name";b.value=a;return ab.getDebugString([b])},set_frame:function(a){if(null!=a){if(null==this.uv){var b=V._pool.get(),
c=0,d=0,f=0,g=0;null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);b.x=c;b.y=d;b.width=f;b.height=g;b._inPool=!1;this.uv=b}b=this.uv;c=a.x/this.parent.width;d=a.y/this.parent.height;f=(a.x+a.width)/this.parent.width;g=(a.y+a.height)/this.parent.height;null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);b.x=c;b.y=d;b.width=f;b.height=g}return this.frame=a},__class__:cb,__properties__:{set_frame:"set_frame"}};var we=G["flixel.graphics.frames.FlxFrameCollectionType"]={__ename__:"flixel.graphics.frames.FlxFrameCollectionType",
__constructs__:null,IMAGE:{_hx_name:"IMAGE",_hx_index:0,__enum__:"flixel.graphics.frames.FlxFrameCollectionType",toString:t},TILES:{_hx_name:"TILES",_hx_index:1,__enum__:"flixel.graphics.frames.FlxFrameCollectionType",toString:t},ATLAS:{_hx_name:"ATLAS",_hx_index:2,__enum__:"flixel.graphics.frames.FlxFrameCollectionType",toString:t},FONT:{_hx_name:"FONT",_hx_index:3,__enum__:"flixel.graphics.frames.FlxFrameCollectionType",toString:t},USER:(n=function(a){return{_hx_index:4,type:a,__enum__:"flixel.graphics.frames.FlxFrameCollectionType",
toString:t}},n._hx_name="USER",n.__params__=["type"],n),FILTER:{_hx_name:"FILTER",_hx_index:5,__enum__:"flixel.graphics.frames.FlxFrameCollectionType",toString:t}};we.__constructs__=[we.IMAGE,we.TILES,we.ATLAS,we.FONT,we.USER,we.FILTER];var Oc=function(a,b){Md.call(this,a,we.IMAGE,b)};h["flixel.graphics.frames.FlxImageFrame"]=Oc;Oc.__name__="flixel.graphics.frames.FlxImageFrame";Oc.fromEmptyFrame=function(a,b){if(null==a||null==b)return null;var c=Oc.findEmptyFrame(a,b);if(null!=c)return c;c=new Oc(a);
c.addEmptyFrame(b);return c};Oc.fromFrame=function(a){var b=a.parent;a=a.frame;var c=Oc.findFrame(b,a);if(null!=c)return c;c=new Oc(b);b=V._pool.get();var d=0,f=0,g=0,k=0;null==k&&(k=0);null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);b.x=d;b.y=f;b.width=g;b.height=k;b._inPool=!1;b.x=a.x;b.y=a.y;b.width=a.width;b.height=a.height;b._weak&&!b._inPool&&(b._inPool=!0,b._weak=!1,V._pool.putUnsafe(b));c.addSpriteSheetFrame(b);return c};Oc.fromImage=function(a){return Oc.fromRectangle(a,null)};Oc.fromGraphic=
function(a,b){if(null==a||null==a.shader)return null;var c=0,d=0,f=a.width,g=a.height;null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);var k=V._pool.get();null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);k.x=c;k.y=d;k.width=f;k.height=g;k._inPool=!1;null!=b&&(k.x=b.x,k.y=b.y,k.width=b.width,k.height=b.height,k._weak&&!k._inPool&&(k._inPool=!0,k._weak=!1,V._pool.putUnsafe(k)));var l=Oc.findFrame(a,k);k._inPool||(k._inPool=!0,k._weak=!1,V._pool.putUnsafe(k));if(null!=l)return null!=
b&&b._weak&&!b._inPool&&(b._inPool=!0,b._weak=!1,V._pool.putUnsafe(b)),l;l=new Oc(a);null==b?(d=c=0,f=a.width,g=a.height,null==g&&(g=0),null==f&&(f=0),null==d&&(d=0),null==c&&(c=0),null==g&&(g=0),null==f&&(f=0),null==d&&(d=0),null==c&&(c=0),k=V._pool.get(),null==g&&(g=0),null==f&&(f=0),null==d&&(d=0),null==c&&(c=0),k.x=c,k.y=d,k.width=f,k.height=g,k._inPool=!1,a=k,a._weak=!0,b=a):(0==b.width&&(b.width=a.width-b.x),0==b.height&&(b.height=a.height-b.y));l.addSpriteSheetFrame(b);return l};Oc.fromRectangle=
function(a,b){a=u.bitmap.add(a,!1);return Oc.fromGraphic(a,b)};Oc.fromBitmapAddSpacesAndBorders=function(a,b,c){a=u.bitmap.add(a,!1);if(null==a)return null;var d=u.bitmap.getKeyWithSpacesAndBorders(a.key,null,null,b,c);null==u.bitmap._cache.h[d]&&(c=xd.addSpacesAndBorders(a.bitmap,null,null,b,c),u.bitmap.add(c,!1,d));return Oc.fromGraphic(a).addBorder(b)};Oc.fromFrameAddSpacesAndBorders=function(a,b){a=a.paint();return Oc.fromBitmapAddSpacesAndBorders(a,b)};Oc.findFrame=function(a,b,c){if(null==c){var d=
0;c=0;null==c&&(c=0);null==d&&(d=0);null==c&&(c=0);null==d&&(d=0);var f=N.pool.get().set(d,c);f._inPool=!1;c=f;c._weak=!0}d=we.IMAGE;if(null==a.shader)u.log.advanced("Invalid call to getFramesCollections on a destroyed graphic",La.WARNING,!0),a=[];else{var g=a.frameCollections.get(d);null==g&&(g=[],a.frameCollections.set(d,g));a=g}for(d=0;d<a.length;){g=a[d];++d;f=g.get_frame().frame;var k=1E-7>=Math.abs(b.x-f.x)&&1E-7>=Math.abs(b.y-f.y)&&1E-7>=Math.abs(b.width-f.width)&&1E-7>=Math.abs(b.height-f.height);
f._weak&&!f._inPool&&(f._inPool=!0,f._weak=!1,V._pool.putUnsafe(f));k?(k=c,f=g.border,k=1E-7>=Math.abs(k.x-f.x)&&1E-7>=Math.abs(k.y-f.y),f._weak&&f.put(),f=k):f=!1;if(f&&2!=g.get_frame().type)return g}k=c;k._weak&&k.put();b._weak&&!b._inPool&&(b._inPool=!0,b._weak=!1,V._pool.putUnsafe(b));return null};Oc.findEmptyFrame=function(a,b){var c=we.IMAGE;if(null==a.shader)u.log.advanced("Invalid call to getFramesCollections on a destroyed graphic",La.WARNING,!0),a=[];else{var d=a.frameCollections.get(c);
null==d&&(d=[],a.frameCollections.set(c,d));a=d}for(c=0;c<a.length;){d=a[c];++c;var f=d.get_frame();if(f.sourceSize.x==b.width&&f.sourceSize.y==b.height&&2==f.type)return d}return null};Oc.__super__=Md;Oc.prototype=x(Md.prototype,{equals:function(a,b){var c=this.get_frame().frame;a=1E-7>=Math.abs(a.x-c.x)&&1E-7>=Math.abs(a.y-c.y)&&1E-7>=Math.abs(a.width-c.width)&&1E-7>=Math.abs(a.height-c.height);c._weak&&!c._inPool&&(c._inPool=!0,c._weak=!1,V._pool.putUnsafe(c));return a?(c=this.border,a=1E-7>=Math.abs(b.x-
c.x)&&1E-7>=Math.abs(b.y-c.y),c._weak&&c.put(),a):!1},addBorder:function(a){var b=0,c=0;null==c&&(c=0);null==b&&(b=0);var d=b;null==c&&(c=0);null==d&&(d=0);var f=N.pool.get().set(d,c);f._inPool=!1;d=f;d._weak=!0;f=this.border;b=f.x;c=f.y;null==c&&(c=0);null==b&&(b=0);d.set_x(d.x+b);d.set_y(d.y+c);c=f;c._weak&&c.put();b=a.x;c=a.y;null==c&&(c=0);null==b&&(b=0);d.set_x(d.x+b);d.set_y(d.y+c);c=a;c._weak&&c.put();c=Oc.findFrame(this.parent,this.get_frame().frame,d);if(null!=c)return c;c=new Oc(this.parent,
d);c.pushFrame(this.get_frame().setBorderTo(a));return c},get_frame:function(){return this.frames[0]},__class__:Oc,__properties__:x(Md.prototype.__properties__,{get_frame:"get_frame"})});var Cc=function(a,b){this.numRows=this.numCols=0;Md.call(this,a,we.TILES,b)};h["flixel.graphics.frames.FlxTileFrames"]=Cc;Cc.__name__="flixel.graphics.frames.FlxTileFrames";Cc.fromBitmapAddSpacesAndBorders=function(a,b,c,d,f){var g=u.bitmap.add(a,!1);if(null==g)return null;var k=u.bitmap.getKeyWithSpacesAndBorders(g.key,
b,c,d,f);a=u.bitmap._cache.h[k];null==a&&(a=xd.addSpacesAndBorders(g.bitmap,b,c,d,f),a=u.bitmap.add(a,!1,k));k=f=0;null!=d&&(f=d.x|0,k=d.y|0);var l=g=0;null==l&&(l=0);null==g&&(g=0);var m=N.pool.get().set(g,l);m._inPool=!1;g=b.x;l=b.y;null==l&&(l=0);null==g&&(g=0);m.set_x(m.x+g);m.set_y(m.y+l);b._weak&&b.put();g=2*f;l=2*k;null==l&&(l=0);null==g&&(g=0);m.set_x(m.x+g);m.set_y(m.y+l);b=Cc.fromGraphic(a,m,null,c);return null==d?b:b.addBorder(d)};Cc.fromFrameAddSpacesAndBorders=function(a,b,c,d){a=a.paint();
return Cc.fromBitmapAddSpacesAndBorders(a,b,c,d)};Cc.fromFrame=function(a,b,c){var d=a.parent,f=Cc.findFrame(d,b,null,a,c);if(null!=f)return f;if(null==c){var g=0;f=0;null==f&&(f=0);null==g&&(g=0);null==f&&(f=0);null==g&&(g=0);f=N.pool.get().set(g,f);f._inPool=!1;c=f}f=new Cc(d);f.atlasFrame=a;f.region=a.frame;f.tileSize=b;f.tileSpacing=c;c.set_x(Math.floor(c.x));c.set_y(Math.floor(c.y));b.set_x(Math.floor(b.x));b.set_y(Math.floor(b.y));d=b.x+c.x;g=b.y+c.y;var k=0==b.y?1:(a.sourceSize.y+c.y)/g|0;
c=0==b.x?1:(a.sourceSize.x+c.x)/d|0;var l=0,m=0,z=b.x,h=b.y;null==h&&(h=0);null==z&&(z=0);null==m&&(m=0);null==l&&(l=0);b=V._pool.get();null==h&&(h=0);null==z&&(z=0);null==m&&(m=0);null==l&&(l=0);b.x=l;b.y=m;b.width=z;b.height=h;b._inPool=!1;for(z=0;z<k;)for(h=z++,l=0,m=c;l<m;){var p=l++;b.x=d*p;b.y=g*h;f.pushFrame(a.subFrameTo(b))}ba.put(b);f.numCols=c;f.numRows=k;return f};Cc.fromFrames=function(a){for(var b=a[0],c=b.parent,d=0;d<a.length;){var f=a[d];++d;if(f.parent==b.parent){f=f.sourceSize;var g=
b.sourceSize;f=1E-7>=Math.abs(f.x-g.x)&&1E-7>=Math.abs(f.y-g.y);g._weak&&g.put();f=!f}else f=!0;if(f)return null}c=new Cc(c);c.region=null;c.atlasFrame=null;d=f=0;null==d&&(d=0);null==f&&(f=0);g=N.pool.get().set(f,d);g._inPool=!1;b=b.sourceSize;f=b.x;d=b.y;null==d&&(d=0);null==f&&(f=0);g.set_x(f);g.set_y(d);f=b;f._weak&&f.put();c.tileSize=g;d=f=0;null==d&&(d=0);null==f&&(f=0);b=f;null==d&&(d=0);null==b&&(b=0);g=N.pool.get().set(b,d);g._inPool=!1;c.tileSpacing=g;c.numCols=a.length;c.numRows=1;for(d=
0;d<a.length;)f=a[d],++d,c.frames.push(f),null!=f.name&&(c.framesByName.h[f.name]=f);return c};Cc.fromAtlasByPrefix=function(a,b){var c=[],d=0;for(a=a.frames;d<a.length;){var f=a[d];++d;O.startsWith(f.name,b)&&c.push(f)}return 0<c.length?(d=c[0].name,a=d.indexOf(".",b.length),d=d.substring(-1==a?d.length:a,d.length),cb.sortHelper(c,b.length,null==d?0:d.length,!0),Cc.fromFrames(c)):null};Cc.fromGraphic=function(a,b,c,d){var f=Cc.findFrame(a,b,c,null,d);if(null!=f)return f;if(null==c){var g=0,k=0,l=
a.width,m=a.height;null==m&&(m=0);null==l&&(l=0);null==k&&(k=0);null==g&&(g=0);var z=V._pool.get();null==m&&(m=0);null==l&&(l=0);null==k&&(k=0);null==g&&(g=0);z.x=g;z.y=k;z.width=l;z.height=m;z._inPool=!1;c=z}else 0==c.width&&(c.width=a.width-c.x),0==c.height&&(c.height=a.height-c.y);if(null==d){var h=0;f=0;null==f&&(f=0);null==h&&(h=0);null==f&&(f=0);null==h&&(h=0);f=N.pool.get().set(h,f);f._inPool=!1;d=f}f=new Cc(a);f.region=c;f.atlasFrame=null;f.tileSize=b;f.tileSpacing=d;c.x=Math.floor(c.x);c.y=
Math.floor(c.y);c.width=Math.floor(c.width);c.height=Math.floor(c.height);d.set_x(Math.floor(d.x));d.set_y(Math.floor(d.y));b.set_x(Math.floor(b.x));b.set_y(Math.floor(b.y));a=b.x+d.x;h=b.y+d.y;var p=0==b.y?1:(c.height+d.y)/h|0;d=0==b.x?1:(c.width+d.x)/a|0;for(var r=0;r<p;)for(var w=r++,u=0,n=d;u<n;)z=u++,g=c.x+z*a,k=c.y+w*h,l=b.x,m=b.y,null==m&&(m=0),null==l&&(l=0),null==k&&(k=0),null==g&&(g=0),z=V._pool.get(),null==m&&(m=0),null==l&&(l=0),null==k&&(k=0),null==g&&(g=0),z.x=g,z.y=k,z.width=l,z.height=
m,z._inPool=!1,f.addSpriteSheetFrame(z);f.numCols=d;f.numRows=p;return f};Cc.fromRectangle=function(a,b,c,d){a=u.bitmap.add(a,!1);return null==a?null:Cc.fromGraphic(a,b,c,d)};Cc.combineTileSets=function(a,b,c,d){for(var f=[],g=0;g<a.length;){var k=a[g];++g;f.push(Cc.fromRectangle(k,b))}return Cc.combineTileFrames(f,c,d)};Cc.combineTileFrames=function(a,b,c){var d=0,f=a[0].frames[0].sourceSize.x|0,g=a[0].frames[0].sourceSize.y|0,k=0,l=0;null!=b&&(k=b.x|0,l=b.y|0);var m=b=0;null!=c&&(b=c.x|0,m=c.y|
0);for(var z=0;z<a.length;){var h=a[z];++z;var p=h.numCols;c=h.numRows;d+=p*(f+2*b)*c*(g+2*m)|0}p=Math.sqrt(d)/(f+2*b)|0;c=Math.ceil(d/(p*(f+2*b)*(g+2*m)));var r=(p*(f+2*b)|0)+(p-1)*k;z=(c*(g+2*m)|0)+(c-1)*l;d=new ma(r,z,!0,0);var w=u.bitmap.add(d);w=new Cc(w);var n=new Ya(b,m),t=0,zb=0,A=r,q=z;null==q&&(q=0);null==A&&(A=0);null==zb&&(zb=0);null==t&&(t=0);var y=V._pool.get();null==q&&(q=0);null==A&&(A=0);null==zb&&(zb=0);null==t&&(t=0);y.x=t;y.y=zb;y.width=A;y.height=q;y._inPool=!1;w.region=y;w.atlasFrame=
null;A=f;zb=g;null==zb&&(zb=0);null==A&&(A=0);null==zb&&(zb=0);null==A&&(A=0);zb=N.pool.get().set(A,zb);zb._inPool=!1;w.tileSize=zb;A=k;zb=l;null==zb&&(zb=0);null==A&&(A=0);null==zb&&(zb=0);null==A&&(A=0);zb=N.pool.get().set(A,zb);zb._inPool=!1;w.tileSpacing=zb;w.numCols=p;w.numRows=c;for(z=0;z<a.length;)for(h=a[z],++z,r=0,h=h.frames;r<h.length;)y=h[r],++r,y.paint(d,n,!0),t=n.x,zb=n.y,A=f,q=g,null==q&&(q=0),null==A&&(A=0),null==zb&&(zb=0),null==t&&(t=0),y=V._pool.get(),null==q&&(q=0),null==A&&(A=
0),null==zb&&(zb=0),null==t&&(t=0),y.x=t,y.y=zb,y.width=A,y.height=q,y._inPool=!1,A=f,zb=g,null==zb&&(zb=0),null==A&&(A=0),null==zb&&(zb=0),null==A&&(A=0),zb=N.pool.get().set(A,zb),zb._inPool=!1,A=q=0,null==A&&(A=0),null==q&&(q=0),null==A&&(A=0),null==q&&(q=0),A=N.pool.get().set(q,A),A._inPool=!1,w.addAtlasFrame(y,zb,A),n.x+=f+2*b+k,n.x>=d.width&&(n.x=b,n.y+=g+2*m+l);xd.copyBorderPixels(d,f,g,k,l,b,m,p,c);return w};Cc.findFrame=function(a,b,c,d,f,g){d=we.TILES;if(null==a.shader)u.log.advanced("Invalid call to getFramesCollections on a destroyed graphic",
La.WARNING,!0),a=[];else{var k=a.frameCollections.get(d);null==k&&(k=[],a.frameCollections.set(d,k));a=k}for(d=0;d<a.length;)if(k=a[d],++d,k.equals(b,c,null,f,g))return k;return null};Cc.__super__=Md;Cc.prototype=x(Md.prototype,{atlasFrame:null,region:null,tileSize:null,tileSpacing:null,numRows:null,numCols:null,getByTilePosition:function(a,b){return this.frames[b*this.numCols+a]},equals:function(a,b,c,d,f){if(null==this.region&&null==this.atlasFrame)return!1;null!=c&&(b=c.frame);if(null==b){var g=
b=0,k=this.parent.width,l=this.parent.height;null==l&&(l=0);null==k&&(k=0);null==g&&(g=0);null==b&&(b=0);null==l&&(l=0);null==k&&(k=0);null==g&&(g=0);null==b&&(b=0);var m=V._pool.get();null==l&&(l=0);null==k&&(k=0);null==g&&(g=0);null==b&&(b=0);m.x=b;m.y=g;m.width=k;m.height=l;m._inPool=!1;m._weak=!0;b=m}null==d&&(m=g=0,null==m&&(m=0),null==g&&(g=0),null==m&&(m=0),null==g&&(g=0),m=N.pool.get().set(g,m),m._inPool=!1,m._weak=!0,d=m);null==f&&(m=g=0,null==m&&(m=0),null==g&&(g=0),null==m&&(m=0),null==
g&&(g=0),m=N.pool.get().set(g,m),m._inPool=!1,m._weak=!0,f=m);this.atlasFrame==c?(m=this.region,c=1E-7>=Math.abs(m.x-b.x)&&1E-7>=Math.abs(m.y-b.y)&&1E-7>=Math.abs(m.width-b.width)&&1E-7>=Math.abs(m.height-b.height),b._weak&&!b._inPool&&(b._inPool=!0,b._weak=!1,V._pool.putUnsafe(b))):c=!1;c?(m=this.tileSize,c=1E-7>=Math.abs(m.x-a.x)&&1E-7>=Math.abs(m.y-a.y),a._weak&&a.put(),a=c):a=!1;a?(m=this.tileSpacing,c=1E-7>=Math.abs(m.x-d.x)&&1E-7>=Math.abs(m.y-d.y),d._weak&&d.put(),d=c):d=!1;return d?(m=this.border,
c=1E-7>=Math.abs(m.x-f.x)&&1E-7>=Math.abs(m.y-f.y),f._weak&&f.put(),c):!1},addBorder:function(a){var b=0,c=0;null==c&&(c=0);null==b&&(b=0);var d=N.pool.get().set(b,c);d._inPool=!1;var f=d;d=this.border;b=d.x;c=d.y;null==c&&(c=0);null==b&&(b=0);f.set_x(f.x+b);f.set_y(f.y+c);b=d;b._weak&&b.put();var g=f;b=a.x;c=a.y;null==c&&(c=0);null==b&&(b=0);g.set_x(g.x+b);g.set_y(g.y+c);b=a;b._weak&&b.put();var k=g;c=b=0;null==c&&(c=0);null==b&&(b=0);d=N.pool.get().set(b,c);d._inPool=!1;f=d;d=this.tileSize;b=d.x;
c=d.y;null==c&&(c=0);null==b&&(b=0);f.set_x(b);f.set_y(c);b=d;b._weak&&b.put();g=f;b=2*a.x;c=2*a.y;null==c&&(c=0);null==b&&(b=0);g.set_x(g.x-b);g.set_y(g.y-c);c=g;g=Cc.findFrame(this.parent,c,this.region,this.atlasFrame,this.tileSpacing,k);if(null!=g)return ba.put(c),g;g=new Cc(this.parent,k);b=V._pool.get();var l=d=f=k=0;null==l&&(l=0);null==d&&(d=0);null==f&&(f=0);null==k&&(k=0);b.x=k;b.y=f;b.width=d;b.height=l;b._inPool=!1;k=this.region;b.x=k.x;b.y=k.y;b.width=k.width;b.height=k.height;k._weak&&
!k._inPool&&(k._inPool=!0,k._weak=!1,V._pool.putUnsafe(k));g.region=b;g.atlasFrame=this.atlasFrame;g.tileSize=c;c=b=0;null==c&&(c=0);null==b&&(b=0);d=N.pool.get().set(b,c);d._inPool=!1;f=d;d=this.tileSpacing;b=d.x;c=d.y;null==c&&(c=0);null==b&&(b=0);f.set_x(b);f.set_y(c);b=d;b._weak&&b.put();g.tileSpacing=f;b=0;for(k=this.frames;b<k.length;)c=k[b],++b,g.pushFrame(c.setBorderTo(a));return g},destroy:function(){Md.prototype.destroy.call(this);this.atlasFrame=null;this.region=ba.put(this.region);this.tileSize=
ba.put(this.tileSize);this.tileSpacing=ba.put(this.tileSpacing)},__class__:Cc});var Xc=function(a,b,c,d,f){this.kernings=null;this.info=a;this.common=b;this.pages=c;this.chars=d;this.kernings=f};h["flixel.graphics.frames.bmfont.BMFont"]=Xc;Xc.__name__="flixel.graphics.frames.bmfont.BMFont";Xc.fromXml=function(a){if(a.nodeType!=X.Document&&a.nodeType!=X.Element)throw J.thrown("Invalid nodeType "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));var b=zf.fromXml(zm.get(a,"info")),c=Af.fromXml(zm.get(a,
"common")),d=He.listFromXml(zm.get(a,"pages")),f=Ie.listFromXml(zm.get(a,"chars")),g=null;Zj.hasNode(a,"kernings")&&(g=Je.listFromXml(zm.get(a,"kernings")));return new Xc(b,c,d,f,g)};Xc.fromText=function(a){var b=null,c=null,d=[],f=[],g=[],k=[],l=0;for(a=O.replace(a,"\r\n","\n").split("\n");l<a.length;){var m=a[l];++l;0<m.length&&k.push(m)}l=k;for(k=0;k<l.length;)switch(m=l[k],++k,a=m.substring(0,m.indexOf(" ")),m=m.substring(m.indexOf(" ")+1),a){case "char":f.push(Ie.fromText(m));break;case "common":c=
Af.fromText(m);break;case "info":b=zf.fromText(m);break;case "kerning":g.push(Je.fromText(m));break;case "page":d.push(He.fromText(m))}return new Xc(b,c,d,f,0<g.length?g:null)};Xc.fromBytes=function(a){a=new og(a);for(var b=[66,77,70],c=0;c<b.length;){var d=b[c];++c;var f=a.readByte();if(f!=d)throw J.thrown("Invalid binary .fnt file. Found "+f+", expected "+d);}3>a.readByte()&&u.log.advanced("The BMFont parser is made to work on files with version 3. Using earlier versions can cause issues!",La.WARNING,
!0);for(var g=f=d=c=b=null;a.pos<a.totlen;)switch(a.readByte()){case 1:b=zf.fromBytes(a);break;case 2:c=Af.fromBytes(a);break;case 3:d=He.listFromBytes(a);break;case 4:f=Ie.listFromBytes(a);break;case 5:g=Je.listFromBytes(a)}return new Xc(b,c,d,f,g)};Xc.parse=function(a){a=Xc.guessType(a);switch(a._hx_index){case 0:return Xc.fromText(a.text);case 1:return Xc.fromXml(a.xml);case 2:return Xc.fromBytes(a.bytes)}};Xc.guessType=function(a){if(a instanceof X)return sh.XML(na.__cast(a,X).firstElement());
if(a instanceof bb){var b=a;return Xc.isValidBytes(b)?sh.BINARY(b):Xc.detectFromText(b.toString())}if("string"==typeof a)return xa.exists(a)?(b=xa.getBytes(a),null==b?Xc.detectFromText(xa.getText(a)):Xc.isValidBytes(kb.toBytes(b))?sh.BINARY(kb.toBytes(b)):Xc.detectFromText(b.toString())):Xc.detectFromText(a);throw J.thrown("Invalid FlxAngelCodeAsset: "+M.string(a));};Xc.safeParseXML=function(a){try{return X.parse(a)}catch(b){return db.lastError=b,null}};Xc.detectFromText=function(a){var b=Xc.safeParseXML(a);
return null!=b&&null!=b.firstElement()?sh.XML(b.firstElement()):sh.TEXT(a)};Xc.isValidBytes=function(a){for(var b=[66,77,70],c=0,d=b.length;c<d;){var f=c++;if(a.b[f]!=b[f])return!1}return!0};Xc.prototype={info:null,common:null,pages:null,chars:null,kernings:null,initBitmapFont:function(a){a.lineHeight=this.common.lineHeight;a.size=this.info.size;a.fontName=this.info.face;a.bold=this.info.bold;a.italic=this.info.italic;for(var b=0,c=this.chars;b<c.length;){var d=c[b];++b;var f=V._pool.get(),g=0,k=
0,l=0,m=0;null==m&&(m=0);null==l&&(l=0);null==k&&(k=0);null==g&&(g=0);f.x=g;f.y=k;f.width=l;f.height=m;f._inPool=!1;f.x=d.x;f.y=d.y;f.width=d.width;f.height=d.height;a.minOffsetX=a.minOffsetX<-d.xoffset?-d.xoffset:a.minOffsetX;if(-1==d.id)throw J.thrown("Invalid font data!");g=d.id;l=d.xoffset;k=d.yoffset;null==k&&(k=0);null==l&&(l=0);null==k&&(k=0);null==l&&(l=0);k=N.pool.get().set(l,k);k._inPool=!1;a.addCharFrame(g,f,k,d.xadvance);32==d.id?a.spaceWidth=d.xadvance:a.lineHeight=a.lineHeight>d.height+
d.yoffset?a.lineHeight:d.height+d.yoffset}if(null!=this.kernings)for(b=0,c=this.kernings;b<c.length;)d=c[b],++b,a.addKerningPair(d.first,d.second,d.amount);a.updateSourceHeight();return a},__class__:Xc};var sh=G["flixel.graphics.frames.bmfont._BMFont.BMFontFileType"]={__ename__:"flixel.graphics.frames.bmfont._BMFont.BMFontFileType",__constructs__:null,TEXT:(n=function(a){return{_hx_index:0,text:a,__enum__:"flixel.graphics.frames.bmfont._BMFont.BMFontFileType",toString:t}},n._hx_name="TEXT",n.__params__=
["text"],n),XML:(n=function(a){return{_hx_index:1,xml:a,__enum__:"flixel.graphics.frames.bmfont._BMFont.BMFontFileType",toString:t}},n._hx_name="XML",n.__params__=["xml"],n),BINARY:(n=function(a){return{_hx_index:2,bytes:a,__enum__:"flixel.graphics.frames.bmfont._BMFont.BMFontFileType",toString:t}},n._hx_name="BINARY",n.__params__=["bytes"],n)};sh.__constructs__=[sh.TEXT,sh.XML,sh.BINARY];var Ie=function(a,b,c,d,f,g,k,l,m,z,h){this.letter=null;this.id=a;this.x=b;this.y=c;this.width=d;this.height=
f;this.xoffset=g;this.yoffset=k;this.xadvance=l;this.page=m;this.chnl=z;null!=h&&(this.letter=h)};h["flixel.graphics.frames.bmfont.BMFontChar"]=Ie;Ie.__name__="flixel.graphics.frames.bmfont.BMFontChar";Ie.fromXml=function(a){return new Ie(Nb.int(a,"id"),Nb.int(a,"x"),Nb.int(a,"y"),Nb.int(a,"width"),Nb.int(a,"height"),Nb.intSafe(a,"xoffset",0),Nb.intSafe(a,"yoffset",0),Nb.intSafe(a,"xadvance",0),Nb.intSafe(a,"page",-1),Nb.intSafe(a,"chnl",-1),Nb.stringSafe(a,"letter"))};Ie.listFromXml=function(a){a=
Zj.nodes(a,"char");for(var b=[],c=0;c<a.length;){var d=a[c];++c;b.push(new Ie(Nb.int(d,"id"),Nb.int(d,"x"),Nb.int(d,"y"),Nb.int(d,"width"),Nb.int(d,"height"),Nb.intSafe(d,"xoffset",0),Nb.intSafe(d,"yoffset",0),Nb.intSafe(d,"xadvance",0),Nb.intSafe(d,"page",-1),Nb.intSafe(d,"chnl",-1),Nb.stringSafe(d,"letter")))}return b};Ie.fromText=function(a){var b=-1,c=-1,d=-1,f=0,g=0,k=0,l=0,m=0,z=-1,h=-1,p=null;Bf.forEachAttribute(a,function(a,r){switch(a){case "chnl":h=M.parseInt(r);break;case "height":g=M.parseInt(r);
break;case "id":b=M.parseInt(r);break;case "letter":p=r;break;case "page":z=M.parseInt(r);break;case "width":f=M.parseInt(r);break;case "x":c=M.parseInt(r);break;case "xadvance":m=M.parseInt(r);break;case "xoffset":k=M.parseInt(r);break;case "y":d=M.parseInt(r);break;case "yoffset":l=M.parseInt(r);break;default:u.log.advanced("Unexpected font char attribute: "+a+"="+r,La.WARNING,!0)}});return new Ie(b,c,d,f,g,k,l,m,z,h,p)};Ie.listFromBytes=function(a){for(var b=a.readInt32(),c=[];0<b;){var d=new Ie(a.readInt32(),
a.readInt16(),a.readInt16(),a.readInt16(),a.readInt16(),a.readInt16(),a.readInt16(),a.readInt16(),a.readByte(),a.readByte(),null);c.push(d);b-=20}return c};Ie.prototype={id:null,x:null,y:null,width:null,height:null,xoffset:null,yoffset:null,xadvance:null,page:null,chnl:null,letter:null,__class__:Ie};var Af=function(a,b,c,d,f,g,k,l,m,z){this.lineHeight=a;this.base=b;this.scaleW=c;this.scaleH=d;this.pages=f;this.packed=g;this.alphaChnl=k;this.redChnl=l;this.greenChnl=m;this.blueChnl=z};h["flixel.graphics.frames.bmfont.BMFontCommon"]=
Af;Af.__name__="flixel.graphics.frames.bmfont.BMFontCommon";Af.fromXml=function(a){return new Af(Nb.int(a,"lineHeight"),Nb.intSafe(a,"base",-1),Nb.intWarn(a,"scaleW",1),Nb.intWarn(a,"scaleH",1),Nb.intSafe(a,"pages",0),Nb.boolSafe(a,"packed",!1),Nb.intSafe(a,"alphaChnl",0),Nb.intSafe(a,"redChnl",0),Nb.intSafe(a,"greenChnl",0),Nb.intSafe(a,"blueChnl",0))};Af.fromText=function(a){var b=-1,c=-1,d=1,f=1,g=0,k=!1,l=0,m=0,z=0,h=0;Bf.forEachAttribute(a,function(a,r){switch(a){case "alphaChnl":l=M.parseInt(r);
break;case "base":c=M.parseInt(r);break;case "blueChnl":h=M.parseInt(r);break;case "greenChnl":z=M.parseInt(r);break;case "lineHeight":b=M.parseInt(r);break;case "packed":k="0"!=r;break;case "pages":g=M.parseInt(r);break;case "redChnl":m=M.parseInt(r);break;case "scaleH":f=M.parseInt(r);break;case "scaleW":d=M.parseInt(r)}});return new Af(b,c,d,f,g,k,l,m,z,h)};Af.fromBytes=function(a){var b=a.readInt32();if(15!=b)throw J.thrown("Invalid block size for common block. Expected 15 got "+b);return new Af(a.readInt16(),
a.readInt16(),a.readInt16(),a.readInt16(),a.readInt16(),0!=(a.readByte()&2),a.readByte(),a.readByte(),a.readByte(),a.readByte())};Af.prototype={lineHeight:null,base:null,scaleW:null,scaleH:null,pages:null,packed:null,alphaChnl:null,redChnl:null,greenChnl:null,blueChnl:null,__class__:Af};var zf=function(a,b,c,d,f,g,k,l,m,z,h,p,r){this.fixedHeight=!1;this.outline=0;this.spacing=new Cf(0,0);this.padding=new Df(0,0,0,0);this.face=a;this.size=b;this.bold=c;this.italic=d;this.charset=f;this.unicode=g;this.stretchH=
k;this.smooth=l;this.aa=m;null!=z&&(this.padding=z);null!=h&&(this.spacing=h);null!=p&&(this.outline=p);null!=r&&(this.fixedHeight=r)};h["flixel.graphics.frames.bmfont.BMFontInfo"]=zf;zf.__name__="flixel.graphics.frames.bmfont.BMFontInfo";zf.fromXml=function(a){var b=Nb.string(a,"face"),c=Nb.int(a,"size"),d=Nb.boolSafe(a,"bold",!1),f=Nb.boolSafe(a,"italic",!1),g=Nb.boolSafe(a,"smooth",!1);b=new zf(b,c,d,f,Nb.stringSafe(a,"charset"),Nb.boolSafe(a,"unicode",!1),Nb.intSafe(a,"stretchH",100),g,Nb.intSafe(a,
"aa",1),null,null,Nb.intSafe(a,"outline",0),Nb.boolSafe(a,"fixedHeight",!1));Zj.has(a,"padding")&&(c=Nb.string(a,"padding").split(","),b.padding=new Df(M.parseInt(c[0]),M.parseInt(c[1]),M.parseInt(c[2]),M.parseInt(c[3])));Zj.has(a,"spacing")&&(b.spacing=Cf.fromString(Nb.string(a,"spacing")));return b};zf.fromText=function(a){var b=null,c=-1,d=!1,f=!1,g=!1,k=null,l=!1,m=100,z=1,h=new Df,p=new Cf,r=0,w=!1;Bf.forEachAttribute(a,function(a,Pb){switch(a){case "aa":z=M.parseInt(Pb);break;case "bold":d=
"0"!=Pb;break;case "charset":k=Pb;break;case "face":b=Pb;break;case "fixedHeight":w="0"!=Pb;break;case "italic":f="0"!=Pb;break;case "outline":r=M.parseInt(Pb);break;case "padding":a=Pb.split(",");h=new Df(M.parseInt(a[0]),M.parseInt(a[1]),M.parseInt(a[2]),M.parseInt(a[3]));break;case "size":c=M.parseInt(Pb);break;case "smooth":g="0"!=Pb;break;case "spacing":p=Cf.fromString(Pb);break;case "stretchH":m=M.parseInt(Pb);break;case "unicode":l="0"!=Pb}});return new zf(b,c,d,f,k,l,m,g,z,h,p,r,w)};zf.fromBytes=
function(a){var b=a.readInt32(),c=a.readInt16(),d=a.readByte(),f=a.readByte();f=0<f?String.fromCodePoint(f):"";var g=a.readUInt16(),k=a.readByte(),l=new og(a.read(4)),m=new Df(l.readByte(),l.readByte(),l.readByte(),l.readByte());l=new og(a.read(2));l=new Cf(l.readByte(),l.readByte());var z=a.readByte();b=new zf(a.readString(b-14-1),c,0!=(d&16),0!=(d&32),f,0!=(d&64),g,0!=(d&128),k,m,l,z,0!=(d&8));a.readByte();return b};zf.prototype={face:null,size:null,bold:null,italic:null,charset:null,unicode:null,
stretchH:null,smooth:null,aa:null,padding:null,spacing:null,outline:null,fixedHeight:null,__class__:zf};var Df=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.up=this.right=this.down=this.left=0;this.up=a;this.right=b;this.down=c;this.left=d};h["flixel.graphics.frames.bmfont.BMFontPadding"]=Df;Df.__name__="flixel.graphics.frames.bmfont.BMFontPadding";Df.fromString=function(a){a=a.split(",");return new Df(M.parseInt(a[0]),M.parseInt(a[1]),M.parseInt(a[2]),M.parseInt(a[3]))};
Df.fromBytes=function(a){return new Df(a.readByte(),a.readByte(),a.readByte(),a.readByte())};Df.prototype={up:null,right:null,down:null,left:null,__class__:Df};var Cf=function(a,b){null==b&&(b=0);null==a&&(a=0);this.x=this.y=0;this.x=a;this.y=b};h["flixel.graphics.frames.bmfont.BMFontSpacing"]=Cf;Cf.__name__="flixel.graphics.frames.bmfont.BMFontSpacing";Cf.fromString=function(a){a=a.split(",");return new Cf(M.parseInt(a[0]),M.parseInt(a[1]))};Cf.fromBytes=function(a){return new Cf(a.readByte(),a.readByte())};
Cf.prototype={x:null,y:null,__class__:Cf};var Je=function(a,b,c){null==c&&(c=0);null==b&&(b=-1);null==a&&(a=-1);this.first=a;this.second=b;this.amount=c};h["flixel.graphics.frames.bmfont.BMFontKerning"]=Je;Je.__name__="flixel.graphics.frames.bmfont.BMFontKerning";Je.fromXml=function(a){return new Je(Nb.int(a,"first"),Nb.int(a,"second"),Nb.int(a,"amount"))};Je.listFromXml=function(a){a=Zj.nodes(a,"kerning");for(var b=[],c=0;c<a.length;){var d=a[c];++c;b.push(Je.fromXml(d))}return b};Je.fromText=function(a){var b=
-1,c=-1,d=-1;Bf.forEachAttribute(a,function(a,g){switch(a){case "amount":d=M.parseInt(g);break;case "first":b=M.parseInt(g);break;case "second":c=M.parseInt(g)}});return new Je(b,c,d)};Je.listFromBytes=function(a){for(var b=a.readInt32(),c=[];0<b;){var d=new Je(a.readInt32(),a.readInt32(),a.readInt16());c.push(d);b-=10}return c};Je.prototype={first:null,second:null,amount:null,__class__:Je};var He=function(a,b){this.id=a;this.file=b};h["flixel.graphics.frames.bmfont.BMFontPage"]=He;He.__name__="flixel.graphics.frames.bmfont.BMFontPage";
He.fromXml=function(a){return new He(Nb.int(a,"id"),Nb.string(a,"file"))};He.listFromXml=function(a){a=Zj.nodes(a,"page");for(var b=[],c=0;c<a.length;){var d=a[c];++c;b.push(He.fromXml(d))}return b};He.fromText=function(a){var b=-1,c=null;Bf.forEachAttribute(a,function(a,f){switch(a){case "file":c=f;break;case "id":b=M.parseInt(f);break;default:u.log.advanced("Unexpected font char attribute: "+a+"="+f,La.WARNING,!0)}});return new He(b,c)};He.listFromBytes=function(a){for(var b=a.readInt32(),c=[],
d=0;0<b;){for(var f=new $h,g=a.readByte();0!=g;)f.addByte(g),g=a.readByte();f=f.getBytes().toString();c.push(new He(d,f));b-=f.length+1;++d}return c};He.prototype={id:null,file:null,__class__:He};var Bf=function(){};h["flixel.graphics.frames.bmfont.BMFontUtil"]=Bf;Bf.__name__="flixel.graphics.frames.bmfont.BMFontUtil";Bf.forEachAttribute=function(a,b){for(var c=0;Bf.attFinder.match(va.substr(a,c));){var d=Bf.attFinder.matched(1),f=Bf.attFinder.matched(3);b(d,f);d=va.get_length(a)-Bf.attFinder.matchedRight().length;
if(d==c)throw J.thrown("Error parsing text: "+a);c=d}};var Zj={__properties__:{get_elements:"get_elements",get_att:"get_att",get_node:"get_node",get_name:"get_name",get_xml:"get_xml"},get_xml:function(a){return a},get_name:function(a){if(a.nodeType==X.Document)return"Document";if(a.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));return a.nodeName},get_node:function(a){return a},get_att:function(a){return a},get_elements:function(a){return a.elements()},
_new:function(a){if(a.nodeType!=X.Document&&a.nodeType!=X.Element)throw J.thrown("Invalid nodeType "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));return a},has:function(a,b){if(a.nodeType==X.Document)throw J.thrown("Cannot access document attribute "+b);return a.nodeType!=X.Document?a.exists(b):!1},hasNode:function(a,b){return a.elementsNamed(b).hasNext()},nodes:function(a,b){var c=[];for(a=a.elementsNamed(b);a.hasNext();){b=a.next();if(b.nodeType!=X.Document&&b.nodeType!=X.Element)throw J.thrown("Invalid nodeType "+
(null==b.nodeType?"null":Oa.toString(b.nodeType)));c.push(b)}return c}},zm={getHelper:function(a,b,c){var d=a.elementsNamed(b).next();if(null==d){if(a.nodeType==X.Document)a="Document";else{if(a.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));a=a.nodeName}c(""+a+" is missing element "+b)}return d},getSafe:function(a,b){var c=a.elementsNamed(b).next();if(null==c){if(a.nodeType==X.Document)a="Document";else{if(a.nodeType!=
X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));a=a.nodeName}null(""+a+" is missing element "+b)}return c},get:function(a,b){var c=a.elementsNamed(b).next();if(null==c){if(a.nodeType==X.Document)a="Document";else{if(a.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));a=a.nodeName}throw J.thrown(""+a+" is missing element "+b);}return c},getWarn:function(a,
b){var c=(n=u.log,q(n,n.warn)),d=a.elementsNamed(b).next();if(null==d){if(a.nodeType==X.Document)a="Document";else{if(a.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));a=a.nodeName}c(""+a+" is missing element "+b)}return d},getError:function(a,b){var c=(n=u.log,q(n,n.error)),d=a.elementsNamed(b).next();if(null==d){if(a.nodeType==X.Document)a="Document";else{if(a.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+
(null==a.nodeType?"null":Oa.toString(a.nodeType)));a=a.nodeName}c(""+a+" is missing element "+b)}return d}},Nb={stringHelper:function(a,b,c,d){if(a.nodeType==X.Document)null!=c&&c("Cannot access document attribute "+b);else{var f=a.get(b);if(null!=f)d=f;else if(null!=c){if(a.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));c(""+a.nodeName+" is missing attribute "+b)}}return d},stringSafe:function(a,b,c){a.nodeType!=
X.Document&&(a=a.get(b),null!=a&&(c=a));return c},string:function(a,b){var c=function(a){throw J.thrown(a);},d=null;if(a.nodeType==X.Document){if(null!=c)throw J.thrown("Cannot access document attribute "+b);}else{var f=a.get(b);if(null!=f)d=f;else if(null!=c){if(a.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));throw J.thrown(""+a.nodeName+" is missing attribute "+b);}}return d},stringWarn:function(a,b,c){var d=(n=
u.log,q(n,n.warn));if(a.nodeType==X.Document)null!=d&&d("Cannot access document attribute "+b);else{var f=a.get(b);if(null!=f)c=f;else if(null!=d){if(a.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));d(""+a.nodeName+" is missing attribute "+b)}}return c},stringError:function(a,b,c){var d=(n=u.log,q(n,n.error));if(a.nodeType==X.Document)null!=d&&d("Cannot access document attribute "+b);else{var f=a.get(b);if(null!=f)c=
f;else if(null!=d){if(a.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));d(""+a.nodeName+" is missing attribute "+b)}}return c},intHelper:function(a,b,c,d){if(a.nodeType==X.Document)null!=c&&c("Cannot access document attribute "+b);else{var f=a.get(b);if(null!=f)d=M.parseInt(f);else if(null!=c){if(a.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));
c(""+a.nodeName+" is missing attribute "+b)}}return d},intSafe:function(a,b,c){a.nodeType!=X.Document&&(a=a.get(b),null!=a&&(c=M.parseInt(a)));return c},int:function(a,b){var c=function(a){throw J.thrown(a);},d=0;if(a.nodeType==X.Document){if(null!=c)throw J.thrown("Cannot access document attribute "+b);}else{var f=a.get(b);if(null!=f)d=M.parseInt(f);else if(null!=c){if(a.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));
throw J.thrown(""+a.nodeName+" is missing attribute "+b);}}return d},intWarn:function(a,b,c){var d=(n=u.log,q(n,n.warn));if(a.nodeType==X.Document)null!=d&&d("Cannot access document attribute "+b);else{var f=a.get(b);if(null!=f)c=M.parseInt(f);else if(null!=d){if(a.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));d(""+a.nodeName+" is missing attribute "+b)}}return c},intError:function(a,b,c){var d=(n=u.log,q(n,n.error));
if(a.nodeType==X.Document)null!=d&&d("Cannot access document attribute "+b);else{var f=a.get(b);if(null!=f)c=M.parseInt(f);else if(null!=d){if(a.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));d(""+a.nodeName+" is missing attribute "+b)}}return c},boolHelper:function(a,b,c,d){if(a.nodeType==X.Document)null!=c&&c("Cannot access document attribute "+b);else{var f=a.get(b);if(null!=f)d="0"!=f;else if(null!=c){if(a.nodeType!=
X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));c(""+a.nodeName+" is missing attribute "+b)}}return d},boolSafe:function(a,b,c){a.nodeType!=X.Document&&(a=a.get(b),null!=a&&(c="0"!=a));return c},bool:function(a,b){var c=function(a){throw J.thrown(a);},d=!1;if(a.nodeType==X.Document){if(null!=c)throw J.thrown("Cannot access document attribute "+b);}else{var f=a.get(b);if(null!=f)d="0"!=f;else if(null!=c){if(a.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+
(null==a.nodeType?"null":Oa.toString(a.nodeType)));throw J.thrown(""+a.nodeName+" is missing attribute "+b);}}return d},boolWarn:function(a,b,c){var d=(n=u.log,q(n,n.warn));if(a.nodeType==X.Document)null!=d&&d("Cannot access document attribute "+b);else{var f=a.get(b);if(null!=f)c="0"!=f;else if(null!=d){if(a.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));d(""+a.nodeName+" is missing attribute "+b)}}return c},boolError:function(a,
b,c){var d=(n=u.log,q(n,n.error));if(a.nodeType==X.Document)null!=d&&d("Cannot access document attribute "+b);else{var f=a.get(b);if(null!=f)c="0"!=f;else if(null!=d){if(a.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));d(""+a.nodeName+" is missing attribute "+b)}}return c}},Dd=function(){this.blending=0;this.antialiasing=this.colored=this.hasColorOffsets=!1};h["flixel.graphics.tile.FlxDrawBaseItem"]=Dd;Dd.__name__=
"flixel.graphics.tile.FlxDrawBaseItem";Dd.blendToInt=function(a){return 0};Dd.prototype={nextTyped:null,next:null,graphics:null,antialiasing:null,colored:null,hasColorOffsets:null,blending:null,blend:null,type:null,reset:function(){this.graphics=null;this.antialiasing=!1;this.next=this.nextTyped=null},dispose:function(){this.nextTyped=this.type=this.next=this.graphics=null},render:function(a){Dd.drawCalls++},addQuad:function(a,b,c){},get_numVertices:function(){return 0},get_numTriangles:function(){return 0},
__class__:Dd,__properties__:{get_numTriangles:"get_numTriangles",get_numVertices:"get_numVertices"}};var Ki=G["flixel.graphics.tile.FlxDrawItemType"]={__ename__:"flixel.graphics.tile.FlxDrawItemType",__constructs__:null,TILES:{_hx_name:"TILES",_hx_index:0,__enum__:"flixel.graphics.tile.FlxDrawItemType",toString:t},TRIANGLES:{_hx_name:"TRIANGLES",_hx_index:1,__enum__:"flixel.graphics.tile.FlxDrawItemType",toString:t}};Ki.__constructs__=[Ki.TILES,Ki.TRIANGLES];var Li=function(){Dd.call(this);this.type=
Ki.TILES;this.rects=ia.toFloatVector(null);this.transforms=ia.toFloatVector(null);this.alphas=[]};h["flixel.graphics.tile.FlxDrawQuadsItem"]=Li;Li.__name__="flixel.graphics.tile.FlxDrawQuadsItem";Li.__super__=Dd;Li.prototype=x(Dd.prototype,{shader:null,rects:null,transforms:null,alphas:null,colorMultipliers:null,colorOffsets:null,reset:function(){Dd.prototype.reset.call(this);this.rects.set_length(0);this.transforms.set_length(0);this.alphas.splice(0,this.alphas.length);null!=this.colorMultipliers&&
this.colorMultipliers.splice(0,this.colorMultipliers.length);null!=this.colorOffsets&&this.colorOffsets.splice(0,this.colorOffsets.length)},dispose:function(){Dd.prototype.dispose.call(this);this.colorOffsets=this.colorMultipliers=this.alphas=this.transforms=this.rects=null},addQuad:function(a,b,c){a=a.frame;this.rects.push(a.x);this.rects.push(a.y);this.rects.push(a.width);this.rects.push(a.height);this.transforms.push(b.a);this.transforms.push(b.b);this.transforms.push(b.c);this.transforms.push(b.d);
this.transforms.push(b.tx);this.transforms.push(b.ty);b=null!=c?c.alphaMultiplier:1;this.alphas.push(b);this.alphas.push(b);this.alphas.push(b);this.alphas.push(b);if(this.colored||this.hasColorOffsets)for(null==this.colorMultipliers&&(this.colorMultipliers=[]),null==this.colorOffsets&&(this.colorOffsets=[]),b=0;4>b;)b++,null!=c?(this.colorMultipliers.push(c.redMultiplier),this.colorMultipliers.push(c.greenMultiplier),this.colorMultipliers.push(c.blueMultiplier),this.colorOffsets.push(c.redOffset),
this.colorOffsets.push(c.greenOffset),this.colorOffsets.push(c.blueOffset),this.colorOffsets.push(c.alphaOffset)):(this.colorMultipliers.push(1),this.colorMultipliers.push(1),this.colorMultipliers.push(1),this.colorOffsets.push(0),this.colorOffsets.push(0),this.colorOffsets.push(0),this.colorOffsets.push(0)),this.colorMultipliers.push(1)},render:function(a){if(0!=this.rects.get_length()){if(null==this.shader&&null==this.graphics.shader)throw J.thrown("Attempted to render an invalid FlxDrawItem, did you destroy a cached sprite?");
var b=null!=this.shader?this.shader:this.graphics.shader;b.bitmap.input=this.graphics.bitmap;b.bitmap.filter=a.antialiasing||this.antialiasing?4:5;b.alpha.value=this.alphas;if(this.colored||this.hasColorOffsets)b.colorMultiplier.value=this.colorMultipliers,b.colorOffset.value=this.colorOffsets;var c=b.hasTransform;null==c.value&&(c.value=[]);c.value[0]=!0;c=b.hasColorTransform;null==c.value&&(c.value=[]);c.value[0]=this.colored||this.hasColorOffsets;a.canvas.get_graphics().overrideBlendMode(this.blend);
a.canvas.get_graphics().beginShaderFill(b);a.canvas.get_graphics().drawQuads(this.rects,null,this.transforms);Dd.prototype.render.call(this,a)}},setParameterValue:function(a,b){null==a.value&&(a.value=[]);a.value[0]=b},__class__:Li});var ig=function(){var a=V._pool.get(),b=0,c=0,d=0,f=0;null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a.width=d;a.height=f;a._inPool=!1;this.bounds=a;this.verticesPosition=this.indicesPosition=this.colorsPosition=0;this.colors=ia.toIntVector(null);
this.uvtData=ia.toFloatVector(null);this.indices=ia.toIntVector(null);this.vertices=ia.toFloatVector(null);Dd.call(this);this.type=Ki.TRIANGLES;this.alphas=[]};h["flixel.graphics.tile.FlxDrawTrianglesItem"]=ig;ig.__name__="flixel.graphics.tile.FlxDrawTrianglesItem";ig.inflateBounds=function(a,b,c){b<a.x&&(a.width+=a.x-b,a.x=b);c<a.y&&(a.height+=a.y-c,a.y=c);b>a.x+a.width&&(a.width=b-a.x);c>a.y+a.height&&(a.height=c-a.y);return a};ig.__super__=Dd;ig.prototype=x(Dd.prototype,{shader:null,alphas:null,
colorMultipliers:null,colorOffsets:null,vertices:null,indices:null,uvtData:null,colors:null,verticesPosition:null,indicesPosition:null,colorsPosition:null,bounds:null,render:function(a){if(u.renderTile&&!(0>=this.get_numTriangles())){var b=null!=this.shader?this.shader:this.graphics.shader;b.bitmap.input=this.graphics.bitmap;b.bitmap.filter=a.antialiasing||this.antialiasing?4:5;b.bitmap.wrap=2;b.alpha.value=this.alphas;this.colored||this.hasColorOffsets?(b.colorMultiplier.value=this.colorMultipliers,
b.colorOffset.value=this.colorOffsets):(b.colorMultiplier.value=null,b.colorOffset.value=null);var c=b.hasTransform;null==c.value&&(c.value=[]);c.value[0]=!0;c=b.hasColorTransform;null==c.value&&(c.value=[]);c.value[0]=this.colored||this.hasColorOffsets;a.canvas.get_graphics().overrideBlendMode(this.blend);a.canvas.get_graphics().beginShaderFill(b);a.canvas.get_graphics().drawTriangles(this.vertices,this.indices,this.uvtData,1);a.canvas.get_graphics().endFill();Dd.prototype.render.call(this,a)}},
reset:function(){Dd.prototype.reset.call(this);this.vertices.set_length(0);this.indices.set_length(0);this.uvtData.set_length(0);this.colors.set_length(0);this.colorsPosition=this.indicesPosition=this.verticesPosition=0;this.alphas.splice(0,this.alphas.length);null!=this.colorMultipliers&&this.colorMultipliers.splice(0,this.colorMultipliers.length);null!=this.colorOffsets&&this.colorOffsets.splice(0,this.colorOffsets.length)},dispose:function(){Dd.prototype.dispose.call(this);this.colorOffsets=this.colorMultipliers=
this.alphas=this.bounds=this.colors=this.uvtData=this.indices=this.vertices=null},addTriangles:function(a,b,c,d,f,g,k){if(null==f){var l=ig.point;l.set_x(0);l.set_y(0);f=l}if(null==g){var m=ig.rect,z=0,h=0,p=u.width,r=u.height;null==r&&(r=0);null==p&&(p=0);null==h&&(h=0);null==z&&(z=0);m.x=z;m.y=h;m.width=p;m.height=r;g=m}var w=a.get_length();m=this.vertices.get_length();l=w/2|0;for(var n=this.indices.get_length(),t=this.uvtData.get_length(),A=this.colors.get_length(),q=this.get_numVertices(),y=0,
E=m;y<w;)z=f.x+a.get(y),h=f.y+a.get(y+1),this.vertices.set(E++,z),this.vertices.set(E++,h),0==y?(m=this.bounds,r=p=0,null==r&&(r=0),null==p&&(p=0),null==h&&(h=0),null==z&&(z=0),m.x=z,m.y=h,m.width=p,m.height=r):(m=this.bounds,z<m.x&&(m.width+=m.x-z,m.x=z),h<m.y&&(m.height+=m.y-h,m.y=h),z>m.x+m.width&&(m.width=z-m.x),h>m.y+m.height&&(m.height=h-m.y)),y+=2;a=b.get_length();y=this.bounds;m=y.x+y.width>g.x&&y.x<g.x+g.width&&y.y+y.height>g.y&&y.y<g.y+g.height;y._weak&&!y._inPool&&(y._inPool=!0,y._weak=
!1,V._pool.putUnsafe(y));if(m){m=0;for(E=c.get_length();m<E;)y=m++,this.uvtData.set(t+y,c.get(y));m=0;for(E=a;m<E;)y=m++,this.indices.set(n+y,b.get(y)+q);if(this.colored){m=0;for(E=l;m<E;)y=m++,this.colors.set(A+y,d.get(y));this.colorsPosition+=l}this.verticesPosition+=w;this.indicesPosition+=a}else{l=this.vertices;l.__tempIndex=this.vertices.get_length()-w;b=0;for(c=[];b<c.length;)d=c[b++],l.insertAt(l.__tempIndex,d),l.__tempIndex++;l.splice(l.__tempIndex,w)}m=f;m._weak&&m.put();g._weak&&!g._inPool&&
(g._inPool=!0,g._weak=!1,V._pool.putUnsafe(g));m=0;for(E=a;m<E;)m++,this.alphas.push(null!=k?k.alphaMultiplier:1);if(this.colored||this.hasColorOffsets)for(null==this.colorMultipliers&&(this.colorMultipliers=[]),null==this.colorOffsets&&(this.colorOffsets=[]),m=0,E=a;m<E;)m++,null!=k?(this.colorMultipliers.push(k.redMultiplier),this.colorMultipliers.push(k.greenMultiplier),this.colorMultipliers.push(k.blueMultiplier),this.colorOffsets.push(k.redOffset),this.colorOffsets.push(k.greenOffset),this.colorOffsets.push(k.blueOffset),
this.colorOffsets.push(k.alphaOffset)):(this.colorMultipliers.push(1),this.colorMultipliers.push(1),this.colorMultipliers.push(1),this.colorOffsets.push(0),this.colorOffsets.push(0),this.colorOffsets.push(0),this.colorOffsets.push(0)),this.colorMultipliers.push(1)},setParameterValue:function(a,b){null==a.value&&(a.value=[]);a.value[0]=b},addQuad:function(a,b,c){var d=this.verticesPosition,f=this.indicesPosition,g=this.colorsPosition,k=this.get_numVertices(),l=0,m=0;null==m&&(m=0);null==l&&(l=0);var z=
N.pool.get().set(l,m);z._inPool=!1;l=z.x*b.a+z.y*b.c+b.tx;m=z.x*b.b+z.y*b.d+b.ty;null==m&&(m=0);null==l&&(l=0);z.set_x(l);z.set_y(m);this.vertices.set(d,z.x);this.vertices.set(d+1,z.y);this.uvtData.set(d,a.uv.x);this.uvtData.set(d+1,a.uv.y);l=a.frame.width;m=0;null==m&&(m=0);null==l&&(l=0);z.set_x(l);z.set_y(m);l=z.x*b.a+z.y*b.c+b.tx;m=z.x*b.b+z.y*b.d+b.ty;null==m&&(m=0);null==l&&(l=0);z.set_x(l);z.set_y(m);this.vertices.set(d+2,z.x);this.vertices.set(d+3,z.y);this.uvtData.set(d+2,a.uv.width);this.uvtData.set(d+
3,a.uv.y);l=a.frame.width;m=a.frame.height;null==m&&(m=0);null==l&&(l=0);z.set_x(l);z.set_y(m);l=z.x*b.a+z.y*b.c+b.tx;m=z.x*b.b+z.y*b.d+b.ty;null==m&&(m=0);null==l&&(l=0);z.set_x(l);z.set_y(m);this.vertices.set(d+4,z.x);this.vertices.set(d+5,z.y);this.uvtData.set(d+4,a.uv.width);this.uvtData.set(d+5,a.uv.height);l=0;m=a.frame.height;null==m&&(m=0);null==l&&(l=0);z.set_x(l);z.set_y(m);l=z.x*b.a+z.y*b.c+b.tx;m=z.x*b.b+z.y*b.d+b.ty;null==m&&(m=0);null==l&&(l=0);z.set_x(l);z.set_y(m);this.vertices.set(d+
6,z.x);this.vertices.set(d+7,z.y);z.put();this.uvtData.set(d+6,a.uv.x);this.uvtData.set(d+7,a.uv.height);this.indices.set(f,k);this.indices.set(f+1,k+1);this.indices.set(f+2,k+2);this.indices.set(f+3,k+2);this.indices.set(f+4,k+3);this.indices.set(f+5,k);this.colored&&(f=b=a=d=1,null!=c&&(d=c.redMultiplier,a=c.greenMultiplier,b=c.blueMultiplier,f=c.alphaMultiplier),null==f&&(f=1),c=mb._new(),null==f&&(f=1),d=Math.round(255*d),c=c&-16711681|(255<d?255:0>d?0:d)<<16,d=Math.round(255*a),c=c&-65281|(255<
d?255:0>d?0:d)<<8,d=Math.round(255*b),c=c&-256|(255<d?255:0>d?0:d),d=Math.round(255*f),c=c&16777215|(255<d?255:0>d?0:d)<<24,this.colors.set(g,c),this.colors.set(g+1,c),this.colors.set(g+2,c),this.colors.set(g+3,c),this.colorsPosition+=4);this.verticesPosition+=8;this.indicesPosition+=6},get_numVertices:function(){return this.vertices.get_length()/2|0},get_numTriangles:function(){return this.indices.get_length()/3|0},__class__:ig});var Mj=function(a,b){this._groupMembers=a;this._filter=b;this._cursor=
0;this._length=this._groupMembers.length};h["flixel.group.FlxTypedGroupIterator"]=Mj;Mj.__name__="flixel.group.FlxTypedGroupIterator";Mj.prototype={_groupMembers:null,_filter:null,_cursor:null,_length:null,next:function(){return this.hasNext()?this._groupMembers[this._cursor++]:null},hasNext:function(){for(;this._cursor<this._length&&(null==this._groupMembers[this._cursor]||null!=this._filter&&!this._filter(this._groupMembers[this._cursor]));)this._cursor++;return this._cursor<this._length},__class__:Mj};
var Nj=function(a,b){this.parentSprite=a;Cd.call(this,b)};h["flixel.group._FlxSpriteContainer.SpriteContainer"]=Nj;Nj.__name__="flixel.group._FlxSpriteContainer.SpriteContainer";Nj.__super__=Cd;Nj.prototype=x(Cd.prototype,{parentSprite:null,get_container:function(){return this.parentSprite.get_container()},getCamerasLegacy:function(){return null!=this._cameras?this._cameras:this.parentSprite.getCamerasLegacy()},getCameras:function(){return null!=this._cameras?this._cameras:this.parentSprite.getCameras()},
__class__:Nj});var um=function(){this.x=this.y=this.z=0;xc.get_isSupported()&&(this._sensor=new xc,this._sensor.addEventListener("update",q(this,this.update)))};h["flixel.input.FlxAccelerometer"]=um;um.__name__="flixel.input.FlxAccelerometer";um.prototype={x:null,y:null,z:null,_sensor:null,get_isSupported:function(){return xc.get_isSupported()},update:function(a){this.x=a.accelerationX;this.y=a.accelerationY;this.z=a.accelerationZ;this.x/=10;this.y/=10;this.z/=10},__class__:um,__properties__:{get_isSupported:"get_isSupported"}};
var ai=function(a,b){this.status=a;this.keyManager=b};h["flixel.input.FlxBaseKeyList"]=ai;ai.__name__="flixel.input.FlxBaseKeyList";ai.prototype={status:null,keyManager:null,check:function(a){return this.keyManager.checkStatusUnsafe(a,this.status)},get_ANY:function(){for(var a=0,b=this.keyManager._keyListArray;a<b.length;){var c=b[a];++a;if(null!=c&&this.keyManager.checkStatusUnsafe(c.ID,this.status))return!0}return!1},get_NONE:function(){for(var a=0,b=this.keyManager._keyListArray;a<b.length;){var c=
b[a];++a;if(null!=c&&this.keyManager.checkStatusUnsafe(c.ID,this.status))return!1}return!0},__class__:ai,__properties__:{get_NONE:"get_NONE",get_ANY:"get_ANY"}};var th=function(){};h["flixel.input.IFlxInput"]=th;th.__name__="flixel.input.IFlxInput";th.__isInterface__=!0;th.prototype={get_justReleased:null,get_released:null,get_pressed:null,get_justPressed:null,__class__:th,__properties__:{get_justPressed:"get_justPressed",get_pressed:"get_pressed",get_released:"get_released",get_justReleased:"get_justReleased"}};
var xe=function(a){this.current=this.last=0;this.ID=a};h["flixel.input.FlxInput"]=xe;xe.__name__="flixel.input.FlxInput";xe.__interfaces__=[th];xe.prototype={ID:null,current:null,last:null,press:function(){this.last=this.current;this.current=1==this.current||2==this.current?1:2},release:function(){this.last=this.current;this.current=1==this.current||2==this.current?-1:0},update:function(){-1==this.last&&-1==this.current?this.current=0:2==this.last&&2==this.current&&(this.current=1);this.last=this.current},
reset:function(){this.last=this.current=0},hasState:function(a){switch(a){case -1:return-1==this.current;case 0:return 0!=this.current?-1==this.current:!0;case 1:return 1!=this.current?2==this.current:!0;case 2:return 2==this.current}},get_justReleased:function(){return-1==this.current},get_released:function(){return 0!=this.current?-1==this.current:!0},get_pressed:function(){return 1!=this.current?2==this.current:!0},get_justPressed:function(){return 2==this.current},__class__:xe,__properties__:{get_justPressed:"get_justPressed",
get_pressed:"get_pressed",get_released:"get_released",get_justReleased:"get_justReleased"}};var Og=function(){};h["flixel.input.IFlxInputManager"]=Og;Og.__name__="flixel.input.IFlxInputManager";Og.__isInterface__=!0;Og.__interfaces__=[D];Og.prototype={reset:null,update:null,onFocus:null,onFocusLost:null,__class__:Og};var Pg=function(a){this._keyListMap=new hc;this._keyListArray=[];this.preventDefaultKeys=[];this.enabled=!0;ha.get_current().stage.addEventListener("keyDown",q(this,this.onKeyDown));
ha.get_current().stage.addEventListener("keyUp",q(this,this.onKeyUp));this.pressed=a(1,this);this.released=a(0,this);this.justPressed=a(2,this);this.justReleased=a(-1,this)};h["flixel.input.FlxKeyManager"]=Pg;Pg.__name__="flixel.input.FlxKeyManager";Pg.__interfaces__=[Og];Pg.prototype={enabled:null,preventDefaultKeys:null,pressed:null,justPressed:null,released:null,justReleased:null,_keyListArray:null,_keyListMap:null,anyPressed:function(a){return this.checkKeyArrayState(a,1)},anyJustPressed:function(a){return this.checkKeyArrayState(a,
2)},anyJustReleased:function(a){return this.checkKeyArrayState(a,-1)},firstPressed:function(){for(var a=0,b=this._keyListArray;a<b.length;){var c=b[a];++a;if(null!=c&&(1==c.current||2==c.current))return c.ID}return-1},firstJustPressed:function(){for(var a=0,b=this._keyListArray;a<b.length;){var c=b[a];++a;if(null!=c&&2==c.current)return c.ID}return-1},firstJustReleased:function(){for(var a=0,b=this._keyListArray;a<b.length;){var c=b[a];++a;if(null!=c&&-1==c.current)return c.ID}return-1},checkStatus:function(a,
b){if(-2==a)switch(b){case -1:return this.justReleased.get_ANY();case 0:return this.released.get_ANY();case 1:return this.pressed.get_ANY();case 2:return this.justPressed.get_ANY()}if(-1==a)switch(b){case -1:return this.justReleased.get_NONE();case 0:return this.released.get_NONE();case 1:return this.pressed.get_NONE();case 2:return this.justPressed.get_NONE()}return this._keyListMap.h.hasOwnProperty(a)?this.checkStatusUnsafe(a,b):!1},checkStatusUnsafe:function(a,b){return this._keyListMap.h[a].hasState(b)},
getIsDown:function(){for(var a=[],b=0,c=this._keyListArray;b<c.length;){var d=c[b];++b;null==d||1!=d.current&&2!=d.current||a.push(d)}return a},destroy:function(){ha.get_current().stage.removeEventListener("keyDown",q(this,this.onKeyDown));ha.get_current().stage.removeEventListener("keyUp",q(this,this.onKeyUp));this._keyListMap=this._keyListArray=null},reset:function(){for(var a=0,b=this._keyListArray;a<b.length;){var c=b[a];++a;null!=c&&c.release()}},update:function(){for(var a=0,b=this._keyListArray;a<
b.length;){var c=b[a];++a;null!=c&&c.update()}},checkKeyArrayState:function(a,b){if(null==a)return!1;for(var c=0;c<a.length;){var d=a[c];++c;if(this.checkStatus(d,b))return!0}return!1},onKeyUp:function(a){var b=this.resolveKeyCode(a);this.handlePreventDefaultKeys(b,a);this.enabled&&(a=this._keyListMap.h[b],null!=a&&a.release())},onKeyDown:function(a){var b=this.resolveKeyCode(a);this.handlePreventDefaultKeys(b,a);this.enabled&&(a=this._keyListMap.h[b],null!=a&&a.press())},handlePreventDefaultKeys:function(a,
b){a=this._keyListMap.h[a];null!=a&&null!=this.preventDefaultKeys&&-1!=this.preventDefaultKeys.indexOf(a.ID)&&(b.stopImmediatePropagation(),b.stopPropagation(),b.preventDefault())},inKeyArray:function(a,b){if(null!=a){b=this.resolveKeyCode(b);for(var c=0;c<a.length;){var d=a[c];++c;if(d==b||-2==d)return!0}}return!1},resolveKeyCode:function(a){return a.keyCode},updateKeyStates:function(a,b){a=this._keyListMap.h[a];null!=a&&(b?a.press():a.release())},onFocus:function(){},onFocusLost:function(){this.reset()},
getKey:function(a){return this._keyListMap.h[a]},__class__:Pg};var Ad=function(){this.x=this.y=this.screenX=this.screenY=this.viewX=this.viewY=this.gameX=this.gameY=this._rawX=this._rawY=0};h["flixel.input.FlxPointer"]=Ad;Ad.__name__="flixel.input.FlxPointer";Ad.prototype={x:null,y:null,screenX:null,screenY:null,viewX:null,viewY:null,gameX:null,gameY:null,_rawX:null,_rawY:null,getWorldPosition:function(a,b){null==a&&(a=u.camera);b=this.getViewPosition(a,b);a=a.scroll;var c=a.x,d=a.y;null==d&&(d=0);
null==c&&(c=0);b.set_x(b.x+c);b.set_y(b.y+d);a._weak&&a.put();return b},getGamePosition:function(a){if(null==a){var b=0,c=0;null==c&&(c=0);null==b&&(b=0);a=N.pool.get().set(b,c);a._inPool=!1;return a}b=this._rawX|0;c=this._rawY|0;null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c);return a},getViewPosition:function(a,b){null==a&&(a=u.camera);if(null==b){var c=b=0;null==c&&(c=0);null==b&&(b=0);b=N.pool.get().set(b,c);b._inPool=!1}b.set_x((this.gameX-a.x)/a.zoom+a.viewMarginX|0);b.set_y((this.gameY-
a.y)/a.zoom+a.viewMarginY|0);return b},getScreenPosition:function(a,b){null==a&&(a=u.camera);if(null==b){var c=b=0;null==c&&(c=0);null==b&&(b=0);b=N.pool.get().set(b,c);b._inPool=!1}b.set_x((this.gameX-a.x+.5*a.width*(a.zoom-a.initialZoom))/a.zoom);b.set_y((this.gameY-a.y+.5*a.height*(a.zoom-a.initialZoom))/a.zoom);return b},getPositionInCameraView:function(a,b){null==a&&(a=u.camera);if(null==b){var c=b=0;null==c&&(c=0);null==b&&(b=0);b=N.pool.get().set(b,c);b._inPool=!1}b.set_x((this.gameX-a.x)/
a.zoom+a.viewMarginX);b.set_y((this.gameY-a.y)/a.zoom+a.viewMarginY);return b},getPosition:function(a){if(null==a){var b=this.x,c=this.y;null==c&&(c=0);null==b&&(b=0);a=b;null==c&&(c=0);null==a&&(a=0);c=N.pool.get().set(a,c);c._inPool=!1;return c}b=this.x;c=this.y;null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c);return a},overlaps:function(a,b){var c=yb.resolveGroup(a);if(null!=c){a=0;for(c=c.members;a<c.length;){var d=c[a];++a;if(null!=d&&this.overlaps(d,b))return!0}return!1}this.getWorldPosition(b,
Ad._cachedPoint);return na.__cast(a,Ha).overlapsPoint(Ad._cachedPoint,!0,b)},setGlobalScreenPositionUnsafe:function(a,b){this.setRawPositionUnsafe(a,b)},setRawPositionUnsafe:function(a,b){this._rawX=a/u.scaleMode.scale.x;this._rawY=b/u.scaleMode.scale.y;this.updatePositions()},updatePositions:function(){this.getGamePosition(Ad._cachedPoint);this.gameX=Ad._cachedPoint.x|0;this.gameY=Ad._cachedPoint.y|0;this.getViewPosition(u.camera,Ad._cachedPoint);this.viewX=Ad._cachedPoint.x|0;this.viewY=Ad._cachedPoint.y|
0;this.getWorldPosition(u.camera,Ad._cachedPoint);this.x=Ad._cachedPoint.x|0;this.y=Ad._cachedPoint.y|0},toString:function(){var a=this.x,b=Ua._pool.get();b.label="x";b.value=a;a=this.y;var c=Ua._pool.get();c.label="y";c.value=a;return ab.getDebugString([b,c])},get__globalScreenX:function(){return this.gameX},get__globalScreenY:function(){return this.gameY},set__globalScreenX:function(a){this._rawX=a*u.scaleMode.scale.x;return a},set__globalScreenY:function(a){this._rawY=a*u.scaleMode.scale.y;return a},
__class__:Ad,__properties__:{set__globalScreenY:"set__globalScreenY",get__globalScreenY:"get__globalScreenY",set__globalScreenX:"set__globalScreenX",get__globalScreenX:"get__globalScreenX"}};var Si=function(a,b,c,d){this.ID=a;this.startPosition=b;this.endPosition=c;this._startTimeInTicks=d;this._endTimeInTicks=u.game.ticks};h["flixel.input.FlxSwipe"]=Si;Si.__name__="flixel.input.FlxSwipe";Si.__interfaces__=[D];Si.prototype={ID:null,startPosition:null,endPosition:null,_startTimeInTicks:null,_endTimeInTicks:null,
destroy:function(){this.startPosition=ba.put(this.startPosition);this.endPosition=ba.put(this.endPosition)},toString:function(){var a=this.ID,b=Ua._pool.get();b.label="ID";b.value=a;a=this.startPosition;var c=Ua._pool.get();c.label="start";c.value=a;a=this.endPosition;var d=Ua._pool.get();d.label="end";d.value=a;var f=this.startPosition.x-this.endPosition.x;a=this.startPosition.y-this.endPosition.y;a=Math.sqrt(f*f+a*a);f=Ua._pool.get();f.label="distance";f.value=a;var g=this.startPosition,k=this.endPosition;
a=k.x-g.x;g=k.y-g.y;k=!0;null==k&&(k=!1);a=k?180/Math.PI*Math.atan2(g,a):Math.atan2(g,a);g=Ua._pool.get();g.label="degrees";g.value=a;a=(this._endTimeInTicks-this._startTimeInTicks)/1E3;k=Ua._pool.get();k.label="duration";k.value=a;return ab.getDebugString([b,c,d,f,g,k])},get_distance:function(){var a=this.startPosition.x-this.endPosition.x,b=this.startPosition.y-this.endPosition.y;return Math.sqrt(a*a+b*b)},get_angle:function(){var a=this.startPosition,b=this.endPosition,c=b.x-a.x;a=b.y-a.y;b=!0;
null==b&&(b=!1);return b?180/Math.PI*Math.atan2(a,c):Math.atan2(a,c)},get_degrees:function(){var a=this.startPosition,b=this.endPosition,c=b.x-a.x;a=b.y-a.y;b=!0;null==b&&(b=!1);return b?180/Math.PI*Math.atan2(a,c):Math.atan2(a,c)},get_radians:function(){var a=this.startPosition,b=this.endPosition,c=b.x-a.x;a=b.y-a.y;b=!1;null==b&&(b=!1);return b?180/Math.PI*Math.atan2(a,c):Math.atan2(a,c)},get_duration:function(){return(this._endTimeInTicks-this._startTimeInTicks)/1E3},__class__:Si,__properties__:{get_duration:"get_duration",
get_radians:"get_radians",get_degrees:"get_degrees",get_angle:"get_angle",get_distance:"get_distance"}};var bk=function(a,b,c,d){this.buttons=[];this._deadZone=.15;this.axisActive=!1;d=[];d.push(0);d.push(0);d.push(0);d.push(0);d.push(0);d.push(0);this.axis=d;this.deadZoneMode=ak.INDEPENDENT_AXES;this.connected=!0;this.id=a;this.manager=b;this.pressed=new uh(1,this);this.released=new uh(0,this);this.justPressed=new uh(2,this);this.justReleased=new uh(-1,this);this.analog=new Am(this);this.motion=
new Bm(this);this.pointer=new Cm(this);null==c&&(c=ic.XINPUT);this.set_model(c);this.detectedModel=c};h["flixel.input.gamepad.FlxGamepad"]=bk;bk.__name__="flixel.input.gamepad.FlxGamepad";bk.__interfaces__=[D];bk.prototype={id:null,model:null,detectedModel:null,mapping:null,connected:null,attachment:null,deadZoneMode:null,pressed:null,released:null,justPressed:null,justReleased:null,analog:null,motion:null,pointer:null,axis:null,axisActive:null,manager:null,_deadZone:null,_device:null,buttons:null,
getButton:function(a){if(-1==a)return null;var b=this.buttons[a];null==b&&(b=new ck(a),this.buttons[a]=b);return b},applyAxisFlip:function(a,b){this.mapping.isAxisFlipped(b)&&(a*=-1);return a},update:function(){if(null!=this._device){for(var a=0,b=this._device.get_numControls();a<b;){var c=a++;var d=this._device.getControlAt(c);var f=this.getButton(c);this.isAxisForAnalogStick(c)&&this.handleAxisMove(c,d.value,f.value);f.value=d.value;d=Math.abs(d.value);d<this.get_deadZone()?f.release():d>this.get_deadZone()&&
f.press()}a=0;for(b=this.buttons;a<b.length;)f=b[a],++a,null!=f&&f.update()}},reset:function(){for(var a=0,b=this.buttons;a<b.length;){var c=b[a];++a;null!=c&&c.reset()}b=this.axis.length;for(a=0;a<b;)c=a++,this.axis[c]=0},destroy:function(){this.connected=!1;this.manager=this.axis=this.buttons=null},checkStatus:function(a,b){switch(a){case -2:return this.anyButton(b);case -1:return!this.anyButton(b);default:return a=this.mapping.getRawID(a),a=this.buttons[a],null!=a?a.hasState(b):!1}},checkStatusRaw:function(a,
b){a=this.buttons[a];return null!=a?a.hasState(b):!1},checkButtonArrayState:function(a,b){if(null==a)return!1;for(var c=0;c<a.length;){var d=a[c];++c;switch(d){case -2:d=this.anyButton(b);break;case -1:d=!this.anyButton(b);break;default:d=this.mapping.getRawID(d),d=this.buttons[d],d=null!=d&&d.hasState(b)}if(d)return!0}return!1},checkButtonArrayStateRaw:function(a,b){if(null==a)return!1;for(var c=0;c<a.length;){var d=a[c];++c;d=this.buttons[d];if(null!=d&&d.hasState(b))return!0}return!1},anyPressed:function(a){return this.checkButtonArrayState(a,
1)},anyPressedRaw:function(a){return this.checkButtonArrayStateRaw(a,1)},anyJustPressed:function(a){return this.checkButtonArrayState(a,2)},anyJustPressedRaw:function(a){return this.checkButtonArrayStateRaw(a,2)},anyJustReleased:function(a){return this.checkButtonArrayState(a,-1)},anyJustReleasedRaw:function(a){return this.checkButtonArrayStateRaw(a,-1)},firstPressedID:function(){var a=this.firstPressedRawID();return 0>a?a:this.mapping.getID(a)},firstPressedRawID:function(){for(var a=0,b=this.buttons;a<
b.length;){var c=b[a];++a;if(null!=c&&(1==c.current||2==c.current))return c.ID}return-1},firstJustPressedID:function(){var a=this.firstJustPressedRawID();return 0>a?a:this.mapping.getID(a)},firstJustPressedRawID:function(){for(var a=0,b=this.buttons;a<b.length;){var c=b[a];++a;if(null!=c&&2==c.current)return c.ID}return-1},firstJustReleasedID:function(){var a=this.firstJustReleasedRawID();return 0>a?a:this.mapping.getID(a)},firstJustReleasedRawID:function(){for(var a=0,b=this.buttons;a<b.length;){var c=
b[a];++a;if(null!=c&&-1==c.current)return c.ID}return-1},getAxis:function(a){a=this.getAxisValue(this.mapping.getRawID(a));return Math.abs(a)>this.get_deadZone()?a:0},getAxisRaw:function(a){a=this.getAxisValue(a);return Math.abs(a)>this.get_deadZone()?a:0},isAxisForAnalogStick:function(a){var b=this.mapping.leftStick,c=this.mapping.rightStick;return null!=b&&(a==b.x||a==b.y)||null!=c&&(a==c.x||a==c.y)?!0:!1},getAnalogStickByAxis:function(a){var b=this.mapping.leftStick,c=this.mapping.rightStick;return null!=
b&&a==b.x||a==b.y?b:null!=c&&a==c.x||a==c.y?c:null},getXAxis:function(a){return this.getAnalogXAxisValue(this.mapping.getAnalogStick(a))},getXAxisRaw:function(a){return this.getAnalogXAxisValue(a)},getYAxis:function(a){return this.getYAxisRaw(this.mapping.getAnalogStick(a))},getYAxisRaw:function(a){return this.getAnalogYAxisValue(a)},getAnalogAxes:function(a){var b=this.getAnalogXAxisValue(this.mapping.getAnalogStick(a));a=this.getYAxisRaw(this.mapping.getAnalogStick(a));null==a&&(a=0);null==b&&(b=
0);null==a&&(a=0);null==b&&(b=0);b=N.pool.get().set(b,a);b._inPool=!1;return b},anyButton:function(a){null==a&&(a=1);for(var b=0,c=this.buttons;b<c.length;){var d=c[b];++b;if(null!=d&&d.hasState(a))return!0}return!1},anyInput:function(){if(this.anyButton())return!0;for(var a=0,b=this.axis.length;a<b;)if(a++,0!=this.axis[0])return!0;return!1},getAxisValue:function(a){var b=0;if(-1==a)return 0;if(null!=this._device&&this._device.enabled){var c=this._device.get_numControls()-1;c=0<=a&&(null==c||a<=c)}else c=
!1;c&&(b=this._device.getControlAt(a).value);this.isAxisForAnalogStick(a)&&this.mapping.isAxisFlipped(a)&&(b*=-1);return b},getAnalogXAxisValue:function(a){return null==a?0:this.deadZoneMode==ak.CIRCULAR?this.getAnalogAxisValueCircular(a,a.x):this.getAnalogAxisValueIndependent(a.x)},getAnalogYAxisValue:function(a){return null==a?0:this.deadZoneMode==ak.CIRCULAR?this.getAnalogAxisValueCircular(a,a.y):this.getAnalogAxisValueIndependent(a.y)},getAnalogAxisValueCircular:function(a,b){if(null==a)return 0;
var c=this.getAxisValue(a.x);a=this.getAxisValue(a.y);null==a&&(a=0);null==c&&(c=0);null==a&&(a=0);null==c&&(c=0);c=N.pool.get().set(c,a);c._inPool=!1;a=Math.sqrt(c.x*c.x+c.y*c.y);c.put();return a>this.get_deadZone()?this.getAxisValue(b):0},getAnalogAxisValueIndependent:function(a){a=this.getAxisValue(a);return Math.abs(a)>this.get_deadZone()?a:0},handleAxisMove:function(a,b,c){var d=b;this.mapping.isAxisFlipped(a)&&(d*=-1);b=d;d=c;this.mapping.isAxisFlipped(a)&&(d*=-1);c=d;d=this.mapping.leftStick;
var f=this.mapping.rightStick;d=null!=d&&a==d.x||a==d.y?d:null!=f&&a==f.x||a==f.y?f:null;if(d.mode==vh.ONLY_DIGITAL||d.mode==vh.BOTH)this.handleAxisMoveSub(d,a,b,c,1),this.handleAxisMoveSub(d,a,b,c,-1)},handleAxisMoveSub:function(a,b,c,d,f){null==f&&(f=1);var g=-1;b==a.x?g=0>f?a.rawLeft:a.rawRight:b==a.y&&(g=0>f?a.rawUp:a.rawDown);a=a.digitalThreshold;c*=f;d*=f;c>a&&d<=a?(g=this.getButton(g),null!=g&&g.press()):c<=a&&d>a&&(g=this.getButton(g),null!=g&&g.release())},createMappingForModel:function(a){switch(a._hx_index){case 0:return new dk(this.attachment);
case 1:return new ek(this.attachment);case 2:return new fk(this.attachment);case 3:return new gk(this.attachment);case 4:return new Ti(this.attachment);case 5:return new hk(this.attachment);case 6:return new Uf(this.attachment);case 7:return new ik(this.attachment);case 8:return new jk(this.attachment);case 9:return new kk(this.attachment);case 10:return new lk(this.attachment);default:return new Ti(this.attachment)}},get_name:function(){return null==this._device?null:this._device.name},set_model:function(a){this.model=
a;this.mapping=this.createMappingForModel(this.model);return this.model},set_attachment:function(a){this.attachment=a;this.mapping.set_attachment(a);return this.attachment},get_deadZone:function(){return null==this.manager||null==this.manager.globalDeadZone?this._deadZone:this.manager.globalDeadZone},set_deadZone:function(a){return this._deadZone=a},getInputLabel:function(a){return this.mapping.getInputLabel(a)},getMappedInput:function(a){return this.mapping.getMappedInput(a)},toString:function(){var a=
this.id,b=Ua._pool.get();b.label="id";b.value=a;a=this.model;var c=Ua._pool.get();c.label="model";c.value=a;a=this.get_deadZone();var d=Ua._pool.get();d.label="deadZone";d.value=a;return ab.getDebugString([b,c,d])},__class__:bk,__properties__:{set_deadZone:"set_deadZone",get_deadZone:"get_deadZone",set_attachment:"set_attachment",set_model:"set_model",get_name:"get_name"}};var ak=G["flixel.input.gamepad.FlxGamepadDeadZoneMode"]={__ename__:"flixel.input.gamepad.FlxGamepadDeadZoneMode",__constructs__:null,
INDEPENDENT_AXES:{_hx_name:"INDEPENDENT_AXES",_hx_index:0,__enum__:"flixel.input.gamepad.FlxGamepadDeadZoneMode",toString:t},CIRCULAR:{_hx_name:"CIRCULAR",_hx_index:1,__enum__:"flixel.input.gamepad.FlxGamepadDeadZoneMode",toString:t}};ak.__constructs__=[ak.INDEPENDENT_AXES,ak.CIRCULAR];var ic=G["flixel.input.gamepad.FlxGamepadModel"]={__ename__:"flixel.input.gamepad.FlxGamepadModel",__constructs__:null,LOGITECH:{_hx_name:"LOGITECH",_hx_index:0,__enum__:"flixel.input.gamepad.FlxGamepadModel",toString:t},
OUYA:{_hx_name:"OUYA",_hx_index:1,__enum__:"flixel.input.gamepad.FlxGamepadModel",toString:t},PS4:{_hx_name:"PS4",_hx_index:2,__enum__:"flixel.input.gamepad.FlxGamepadModel",toString:t},PSVITA:{_hx_name:"PSVITA",_hx_index:3,__enum__:"flixel.input.gamepad.FlxGamepadModel",toString:t},XINPUT:{_hx_name:"XINPUT",_hx_index:4,__enum__:"flixel.input.gamepad.FlxGamepadModel",toString:t},MAYFLASH_WII_REMOTE:{_hx_name:"MAYFLASH_WII_REMOTE",_hx_index:5,__enum__:"flixel.input.gamepad.FlxGamepadModel",toString:t},
WII_REMOTE:{_hx_name:"WII_REMOTE",_hx_index:6,__enum__:"flixel.input.gamepad.FlxGamepadModel",toString:t},MFI:{_hx_name:"MFI",_hx_index:7,__enum__:"flixel.input.gamepad.FlxGamepadModel",toString:t},SWITCH_PRO:{_hx_name:"SWITCH_PRO",_hx_index:8,__enum__:"flixel.input.gamepad.FlxGamepadModel",toString:t},SWITCH_JOYCON_LEFT:{_hx_name:"SWITCH_JOYCON_LEFT",_hx_index:9,__enum__:"flixel.input.gamepad.FlxGamepadModel",toString:t},SWITCH_JOYCON_RIGHT:{_hx_name:"SWITCH_JOYCON_RIGHT",_hx_index:10,__enum__:"flixel.input.gamepad.FlxGamepadModel",
toString:t},UNKNOWN:{_hx_name:"UNKNOWN",_hx_index:11,__enum__:"flixel.input.gamepad.FlxGamepadModel",toString:t}};ic.__constructs__=[ic.LOGITECH,ic.OUYA,ic.PS4,ic.PSVITA,ic.XINPUT,ic.MAYFLASH_WII_REMOTE,ic.WII_REMOTE,ic.MFI,ic.SWITCH_PRO,ic.SWITCH_JOYCON_LEFT,ic.SWITCH_JOYCON_RIGHT,ic.UNKNOWN];var Ui=G["flixel.input.gamepad.FlxGamepadAttachment"]={__ename__:"flixel.input.gamepad.FlxGamepadAttachment",__constructs__:null,WII_NUNCHUCK:{_hx_name:"WII_NUNCHUCK",_hx_index:0,__enum__:"flixel.input.gamepad.FlxGamepadAttachment",
toString:t},WII_CLASSIC_CONTROLLER:{_hx_name:"WII_CLASSIC_CONTROLLER",_hx_index:1,__enum__:"flixel.input.gamepad.FlxGamepadAttachment",toString:t},NONE:{_hx_name:"NONE",_hx_index:2,__enum__:"flixel.input.gamepad.FlxGamepadAttachment",toString:t}};Ui.__constructs__=[Ui.WII_NUNCHUCK,Ui.WII_CLASSIC_CONTROLLER,Ui.NONE];var ed=function(a,b,c){this.mode=vh.BOTH;this.digitalThreshold=.5;this.rawUp=this.rawDown=this.rawLeft=this.rawRight=-1;this.x=a;this.y=b;null!=c&&(null!=c.mode&&(this.mode=c.mode),null!=
c.up&&(this.rawUp=c.up),null!=c.down&&(this.rawDown=c.down),null!=c.left&&(this.rawLeft=c.left),null!=c.right&&(this.rawRight=c.right),null!=c.threshold&&(this.digitalThreshold=c.threshold))};h["flixel.input.gamepad.FlxTypedGamepadAnalogStick"]=ed;ed.__name__="flixel.input.gamepad.FlxTypedGamepadAnalogStick";ed.prototype={x:null,y:null,rawUp:null,rawDown:null,rawLeft:null,rawRight:null,digitalThreshold:null,mode:null,toString:function(){var a=this.x,b=Ua._pool.get();b.label="x";b.value=a;a=this.y;
var c=Ua._pool.get();c.label="y";c.value=a;a=this.rawUp;var d=Ua._pool.get();d.label="rawUp";d.value=a;a=this.rawDown;var f=Ua._pool.get();f.label="rawDown";f.value=a;a=this.rawLeft;var g=Ua._pool.get();g.label="rawLeft";g.value=a;a=this.rawRight;var k=Ua._pool.get();k.label="rawRight";k.value=a;a=this.digitalThreshold;var l=Ua._pool.get();l.label="digitalThreshold";l.value=a;a=this.mode;var m=Ua._pool.get();m.label="mode";m.value=a;return ab.getDebugString([b,c,d,f,g,k,l,m])},__class__:ed};var vh=
G["flixel.input.gamepad.FlxAnalogToDigitalMode"]={__ename__:"flixel.input.gamepad.FlxAnalogToDigitalMode",__constructs__:null,BOTH:{_hx_name:"BOTH",_hx_index:0,__enum__:"flixel.input.gamepad.FlxAnalogToDigitalMode",toString:t},ONLY_DIGITAL:{_hx_name:"ONLY_DIGITAL",_hx_index:1,__enum__:"flixel.input.gamepad.FlxAnalogToDigitalMode",toString:t},ONLY_ANALOG:{_hx_name:"ONLY_ANALOG",_hx_index:2,__enum__:"flixel.input.gamepad.FlxAnalogToDigitalMode",toString:t}};vh.__constructs__=[vh.BOTH,vh.ONLY_DIGITAL,
vh.ONLY_ANALOG];var ck=function(a){this.value=0;xe.call(this,a)};h["flixel.input.gamepad.FlxGamepadButton"]=ck;ck.__name__="flixel.input.gamepad.FlxGamepadButton";ck.__super__=xe;ck.prototype=x(xe.prototype,{value:null,__class__:ck});var Db=function(){Da.call(this);Db.__instances.push(this)};h["openfl.ui.GameInput"]=Db;Db.__name__="openfl.ui.GameInput";Db.getDeviceAt=function(a){return 0<=a&&a<Db.__deviceList.length?Db.__deviceList[a]:null};Db.__getDevice=function(a){if(null==a)return null;if(null==
Db.__devices.h.__keys__[a.__id__]){var b=Fc.__getDeviceData(),c=b[a.id].id;b=Fc.__getDeviceData();b=new mk(c,b[a.id].id);Db.__deviceList.push(b);Db.__devices.set(a,b);Db.numDevices=Db.__deviceList.length}return Db.__devices.h[a.__id__]};Db.__onGamepadAxisMove=function(a,b,c){a=Db.__getDevice(a);if(null!=a&&a.enabled){if(!a.__axis.h.hasOwnProperty(b)){if(null==b)var d="null";else switch(b){case 0:d="LEFT_X";break;case 1:d="LEFT_Y";break;case 2:d="RIGHT_X";break;case 3:d="RIGHT_Y";break;case 4:d="TRIGGER_LEFT";
break;case 5:d="TRIGGER_RIGHT";break;default:d="UNKNOWN ("+b+")"}d=new Ke(a,"AXIS_"+d,-1,1);a.__axis.h[b]=d;a.__controls.push(d)}d=a.__axis.h[b];d.value=c;d.dispatchEvent(new fa("change"))}};Db.__onGamepadButtonDown=function(a,b){a=Db.__getDevice(a);if(null!=a&&a.enabled){if(!a.__button.h.hasOwnProperty(b)){if(null==b)var c="null";else switch(b){case 0: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 Ke(a,"BUTTON_"+c,0,1);a.__button.h[b]=c;a.__controls.push(c)}c=a.__button.h[b];c.value=1;c.dispatchEvent(new fa("change"))}};Db.__onGamepadButtonUp=function(a,b){a=Db.__getDevice(a);if(null!=a&&a.enabled){if(!a.__button.h.hasOwnProperty(b)){if(null==
b)var c="null";else switch(b){case 0: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 Ke(a,"BUTTON_"+c,0,1);a.__button.h[b]=c;a.__controls.push(c)}c=
a.__button.h[b];c.value=0;c.dispatchEvent(new fa("change"))}};Db.__onGamepadConnect=function(a){a=Db.__getDevice(a);if(null!=a)for(var b=0,c=Db.__instances;b<c.length;){var d=c[b];++b;d.dispatchEvent(new Vf("deviceAdded",!0,!1,a))}};Db.__onGamepadDisconnect=function(a){var b=Db.__devices.h[a.__id__];if(null!=b){null!=Db.__devices.h.__keys__[a.__id__]&&(y.remove(Db.__deviceList,Db.__devices.h[a.__id__]),Db.__devices.remove(a));Db.numDevices=Db.__deviceList.length;a=0;for(var c=Db.__instances;a<c.length;){var d=
c[a];++a;d.dispatchEvent(new Vf("deviceRemoved",!0,!1,b))}}};Db.__super__=Da;Db.prototype=x(Da.prototype,{addEventListener:function(a,b,c,d,f){null==f&&(f=!1);null==d&&(d=0);null==c&&(c=!1);Da.prototype.addEventListener.call(this,a,b,c,d,f);if("deviceAdded"==a)for(a=0,b=Db.__deviceList;a<b.length;)c=b[a],++a,this.dispatchEvent(new Vf("deviceAdded",!0,!1,c))},__class__:Db});var kg=function(){this._activeGamepads=[];this._gamepads=[];this.acceptMode=Dm.BOTTOM;this.deviceConnected=new md;this.deviceDisconnected=
new md;kg._gameInput.addEventListener("deviceAdded",q(this,this.onDeviceAdded));kg._gameInput.addEventListener("deviceRemoved",q(this,this.onDeviceRemoved));for(var a=0,b=Db.numDevices;a<b;){var c=a++;this.addGamepad(Db.getDeviceAt(c))}};h["flixel.input.gamepad.FlxGamepadManager"]=kg;kg.__name__="flixel.input.gamepad.FlxGamepadManager";kg.__interfaces__=[Og];kg.prototype={firstActive:null,lastActive:null,globalDeadZone:null,deviceConnected:null,deviceDisconnected:null,acceptMode:null,_gamepads:null,
_activeGamepads:null,getByID:function(a){return this._activeGamepads[a]},removeByID:function(a){var b=this._gamepads[a];null!=b&&(this._gamepads[a]=null,a=this._activeGamepads.indexOf(b),-1!=a&&(this._activeGamepads[a]=null,this.deviceDisconnected.dispatch(b)),ba.destroy(b));this.lastActive==b&&(this.lastActive=null);this.firstActive==b&&(this.firstActive=null)},createByID:function(a,b){var c=this._gamepads[a];if(null==c){c=new bk(a,this,b);this._gamepads[a]=c;a=!1;b=0;for(var d=this._activeGamepads.length;b<
d;){var f=b++;if(null==this._activeGamepads[f]){this._activeGamepads[f]=c;a=!0;break}}a||this._activeGamepads.push(c)}this.lastActive=c;null==this.firstActive&&(this.firstActive=c);return c},getActiveGamepadIDs:function(a){null==a&&(a=[]);for(var b=0,c=this._gamepads;b<c.length;){var d=c[b];++b;null!=d&&d.anyInput()&&a.push(d.id)}return a},getActiveGamepads:function(a){null==a&&(a=[]);for(var b=0,c=this._gamepads;b<c.length;){var d=c[b];++b;null!=d&&d.anyInput()&&a.push(d)}return a},getFirstActiveGamepadID:function(){var a=
this.getFirstActiveGamepad();return null==a?-1:a.id},getFirstActiveGamepad:function(){for(var a=0,b=this._gamepads;a<b.length;){var c=b[a];++a;if(null!=c&&c.anyInput())return c}return null},anyButton:function(a){null==a&&(a=1);for(var b=0,c=this._gamepads;b<c.length;){var d=c[b];++b;if(null!=d&&d.anyButton(a))return!0}return!1},anyInput:function(){for(var a=0,b=this._gamepads;a<b.length;){var c=b[a];++a;if(null!=c&&c.anyInput())return!0}return!1},anyPressed:function(a){return this.anyHasState(a,1)},
anyJustPressed:function(a){return this.anyHasState(a,2)},anyJustReleased:function(a){return this.anyHasState(a,-1)},anyHasState:function(a,b){for(var c=0,d=this._gamepads;c<d.length;){var f=d[c];++c;if(null!=f)switch(a){case -2:f=f.anyButton(b);break;case -1:f=!f.anyButton(b);break;default:var g=f.mapping.getRawID(a);f=f.buttons[g];f=null!=f&&f.hasState(b)}else f=!1;if(f)return!0}return!1},anyMovedXAxis:function(a){for(var b=0,c=this._gamepads;b<c.length;){var d=c[b];++b;if(null!=d&&(d=d.getAnalogXAxisValue(a),
0!=d))return d}return 0},anyMovedYAxis:function(a){for(var b=0,c=this._gamepads;b<c.length;){var d=c[b];++b;if(null!=d&&(d=d.getYAxisRaw(a),0!=d))return d}return 0},destroy:function(){ba.destroyArray(this._gamepads);this._gamepads=this.lastActive=this.firstActive=null;kg._gameInput.removeEventListener("deviceAdded",q(this,this.onDeviceAdded));kg._gameInput.removeEventListener("deviceRemoved",q(this,this.onDeviceRemoved))},reset:function(){for(var a=0,b=this._gamepads;a<b.length;){var c=b[a];++a;null!=
c&&c.reset()}},onDeviceAdded:function(a){this.addGamepad(a.device)},onDeviceRemoved:function(a){this.removeGamepad(a.device)},findGamepadIndex:function(a){if(null==a)return-1;for(var b=0,c=Db.numDevices;b<c;){var d=b++;if(Db.getDeviceAt(d)==a)return d}return-1},addGamepad:function(a){if(null!=a){a.enabled=!0;var b=this.findGamepadIndex(a);0>b||(b=this.createByID(b,this.getModelFromDeviceName(a.name)),b._device=a,this.deviceConnected.dispatch(b))}},getModelFromDeviceName:function(a){if(null==a)return ic.UNKNOWN;
a=O.replace(O.replace(a.toLowerCase(),"-",""),"_","");return-1!=a.indexOf("ouya")?ic.OUYA:-1!=a.indexOf("wireless controller")||-1!=a.indexOf("ps4")?ic.PS4:-1!=a.indexOf("logitech")?ic.LOGITECH:-1!=a.indexOf("xbox")&&-1!=a.indexOf("360")||-1!=a.indexOf("xinput")?ic.XINPUT:-1!=a.indexOf("nintendo rvlcnt01tr")?ic.WII_REMOTE:-1!=a.indexOf("nintendo rvlcnt01")?ic.WII_REMOTE:-1!=a.indexOf("mayflash wiimote pc adapter")?ic.MAYFLASH_WII_REMOTE:-1!=a.indexOf("pro controller")||-1!=a.indexOf("joycon l+r")?
ic.SWITCH_PRO:-1!=a.indexOf("joycon (l)")?ic.SWITCH_JOYCON_LEFT:-1!=a.indexOf("joycon (r)")?ic.SWITCH_JOYCON_RIGHT:-1!=a.indexOf("mfi")?ic.MFI:ic.UNKNOWN},removeGamepad:function(a){if(null!=a)for(var b=0,c=this._gamepads.length;b<c;){var d=b++,f=this._gamepads[d];null!=f&&f._device==a&&this.removeByID(d)}},update:function(){for(var a=0,b=this._gamepads;a<b.length;){var c=b[a];++a;null!=c&&c.update()}},onFocus:function(){},onFocusLost:function(){this.reset()},get_numActiveGamepads:function(){for(var a=
0,b=0,c=this._gamepads;b<c.length;){var d=c[b];++b;null!=d&&++a}return a},__class__:kg,__properties__:{get_numActiveGamepads:"get_numActiveGamepads"}};var Dm=G["flixel.input.gamepad.FlxGamepadAcceptMode"]={__ename__:"flixel.input.gamepad.FlxGamepadAcceptMode",__constructs__:null,BOTTOM:{_hx_name:"BOTTOM",_hx_index:0,__enum__:"flixel.input.gamepad.FlxGamepadAcceptMode",toString:t},RIGHT:{_hx_name:"RIGHT",_hx_index:1,__enum__:"flixel.input.gamepad.FlxGamepadAcceptMode",toString:t},USE_MAPPING:{_hx_name:"USE_MAPPING",
_hx_index:2,__enum__:"flixel.input.gamepad.FlxGamepadAcceptMode",toString:t}};Dm.__constructs__=[Dm.BOTTOM,Dm.RIGHT,Dm.USE_MAPPING];var qd=G["flixel.input.gamepad.FlxGamepadMappedInput"]={__ename__:"flixel.input.gamepad.FlxGamepadMappedInput",__constructs__:null,LOGITECH:(n=function(a){return{_hx_index:0,id:a,__enum__:"flixel.input.gamepad.FlxGamepadMappedInput",toString:t}},n._hx_name="LOGITECH",n.__params__=["id"],n),MAYFLASH_WII:(n=function(a){return{_hx_index:1,id:a,__enum__:"flixel.input.gamepad.FlxGamepadMappedInput",
toString:t}},n._hx_name="MAYFLASH_WII",n.__params__=["id"],n),MFI:(n=function(a){return{_hx_index:2,id:a,__enum__:"flixel.input.gamepad.FlxGamepadMappedInput",toString:t}},n._hx_name="MFI",n.__params__=["id"],n),OUYA:(n=function(a){return{_hx_index:3,id:a,__enum__:"flixel.input.gamepad.FlxGamepadMappedInput",toString:t}},n._hx_name="OUYA",n.__params__=["id"],n),PS4:(n=function(a){return{_hx_index:4,id:a,__enum__:"flixel.input.gamepad.FlxGamepadMappedInput",toString:t}},n._hx_name="PS4",n.__params__=
["id"],n),PS_VITA:(n=function(a){return{_hx_index:5,id:a,__enum__:"flixel.input.gamepad.FlxGamepadMappedInput",toString:t}},n._hx_name="PS_VITA",n.__params__=["id"],n),SWITCH_JOYCON_LEFT:(n=function(a){return{_hx_index:6,id:a,__enum__:"flixel.input.gamepad.FlxGamepadMappedInput",toString:t}},n._hx_name="SWITCH_JOYCON_LEFT",n.__params__=["id"],n),SWITCH_JOYCON_RIGHT:(n=function(a){return{_hx_index:7,id:a,__enum__:"flixel.input.gamepad.FlxGamepadMappedInput",toString:t}},n._hx_name="SWITCH_JOYCON_RIGHT",
n.__params__=["id"],n),SWITCH_PRO:(n=function(a){return{_hx_index:8,id:a,__enum__:"flixel.input.gamepad.FlxGamepadMappedInput",toString:t}},n._hx_name="SWITCH_PRO",n.__params__=["id"],n),WII:(n=function(a){return{_hx_index:9,id:a,__enum__:"flixel.input.gamepad.FlxGamepadMappedInput",toString:t}},n._hx_name="WII",n.__params__=["id"],n),X_INPUT:(n=function(a){return{_hx_index:10,id:a,__enum__:"flixel.input.gamepad.FlxGamepadMappedInput",toString:t}},n._hx_name="X_INPUT",n.__params__=["id"],n),UNKNOWN:(n=
function(a){return{_hx_index:11,id:a,__enum__:"flixel.input.gamepad.FlxGamepadMappedInput",toString:t}},n._hx_name="UNKNOWN",n.__params__=["id"],n)};qd.__constructs__=[qd.LOGITECH,qd.MAYFLASH_WII,qd.MFI,qd.OUYA,qd.PS4,qd.PS_VITA,qd.SWITCH_JOYCON_LEFT,qd.SWITCH_JOYCON_RIGHT,qd.SWITCH_PRO,qd.WII,qd.X_INPUT,qd.UNKNOWN];var Jo=function(){};h["flixel.input.gamepad._FlxGamepadMappedInput.FlxGamepadMappedInputTools"]=Jo;Jo.__name__="flixel.input.gamepad._FlxGamepadMappedInput.FlxGamepadMappedInputTools";
Jo.toModel=function(a){switch(a._hx_index){case 0:return ic.LOGITECH;case 1:return ic.MAYFLASH_WII_REMOTE;case 2:return ic.MFI;case 3:return ic.OUYA;case 4:return ic.PS4;case 5:return ic.PSVITA;case 6:return ic.SWITCH_JOYCON_LEFT;case 7:return ic.SWITCH_JOYCON_RIGHT;case 8:return ic.SWITCH_PRO;case 9:return ic.WII_REMOTE;case 10:return ic.XINPUT;case 11:return ic.UNKNOWN}};var nc={},oc={},fb={},uc={},cc={},yc={},Nd={},Od={},jc={},Xa={},fc={},bi=function(a,b){this.status=a;this.gamepad=b};h["flixel.input.gamepad.lists.FlxBaseGamepadList"]=
bi;bi.__name__="flixel.input.gamepad.lists.FlxBaseGamepadList";bi.prototype={status:null,gamepad:null,check:function(a){var b=this.gamepad,c=this.status;switch(a){case -2:return b.anyButton(c);case -1:return!b.anyButton(c);default:return a=b.mapping.getRawID(a),b=b.buttons[a],null!=b?b.hasState(c):!1}},checkRaw:function(a){a=this.gamepad.buttons[a];return null!=a?a.hasState(this.status):!1},get_ANY:function(){for(var a=0,b=this.gamepad.buttons;a<b.length;){var c=b[a];++a;null!=c?(c=this.gamepad.buttons[c.ID],
c=null!=c&&c.hasState(this.status)):c=!1;if(c)return!0}return!1},get_ALL:function(){for(var a=0,b=this.gamepad.buttons;a<b.length;){var c=b[a];++a;null!=c?(c=this.gamepad.buttons[c.ID],c=!(null!=c&&c.hasState(this.status))):c=!1;if(c)return!1}return!0},get_NONE:function(){for(var a=0,b=this.gamepad.buttons;a<b.length;){var c=b[a];++a;null!=c?(c=this.gamepad.buttons[c.ID],c=null!=c&&c.hasState(this.status)):c=!1;if(c)return!1}return!0},__class__:bi,__properties__:{get_NONE:"get_NONE",get_ALL:"get_ALL",
get_ANY:"get_ANY"}};var Am=function(a){this.value=new Em(a);this.justMoved=new nk(2,a);this.justReleased=new nk(-1,a)};h["flixel.input.gamepad.lists.FlxGamepadAnalogList"]=Am;Am.__name__="flixel.input.gamepad.lists.FlxGamepadAnalogList";Am.prototype={value:null,justMoved:null,justReleased:null,__class__:Am};var nk=function(a,b){this.status=a;this.gamepad=b};h["flixel.input.gamepad.lists.FlxGamepadAnalogStateList"]=nk;nk.__name__="flixel.input.gamepad.lists.FlxGamepadAnalogStateList";nk.prototype=
{gamepad:null,status:null,get_LEFT_STICK:function(){return this.checkXY(19)},get_LEFT_STICK_X:function(){var a=this.gamepad.mapping.getAnalogStick(19);if(null==a)return!1;a=this.gamepad.buttons[a.x];return null!=a?a.hasState(this.status):!1},get_LEFT_STICK_Y:function(){var a=this.gamepad.mapping.getAnalogStick(19);if(null==a)return!1;a=this.gamepad.buttons[a.y];return null!=a?a.hasState(this.status):!1},get_RIGHT_STICK:function(){return this.checkXY(20)},get_RIGHT_STICK_X:function(){var a=this.gamepad.mapping.getAnalogStick(20);
if(null==a)return!1;a=this.gamepad.buttons[a.x];return null!=a?a.hasState(this.status):!1},get_RIGHT_STICK_Y:function(){var a=this.gamepad.mapping.getAnalogStick(20);if(null==a)return!1;a=this.gamepad.buttons[a.y];return null!=a?a.hasState(this.status):!1},checkXY:function(a){a=this.gamepad.mapping.getAnalogStick(a);if(null==a)return!1;var b=this.gamepad.buttons[a.x],c=null!=b&&b.hasState(this.status);b=this.gamepad.buttons[a.y];var d=null!=b&&b.hasState(this.status);return c&&d||c&&(b=this.gamepad.buttons[a.y],
c=null!=b&&b.hasState(0),b=this.gamepad.buttons[a.y],b=null!=b&&b.hasState(-1),c||b)||d&&(b=this.gamepad.buttons[a.x],d=null!=b&&b.hasState(0),b=this.gamepad.buttons[a.x],a=null!=b&&b.hasState(-1),d||a)?!0:!1},checkX:function(a){a=this.gamepad.mapping.getAnalogStick(a);if(null==a)return!1;a=this.gamepad.buttons[a.x];return null!=a?a.hasState(this.status):!1},checkY:function(a){a=this.gamepad.mapping.getAnalogStick(a);if(null==a)return!1;a=this.gamepad.buttons[a.y];return null!=a?a.hasState(this.status):
!1},checkRaw:function(a,b){a=this.gamepad.buttons[a];return null!=a?a.hasState(b):!1},__class__:nk,__properties__:{get_RIGHT_STICK_Y:"get_RIGHT_STICK_Y",get_RIGHT_STICK_X:"get_RIGHT_STICK_X",get_RIGHT_STICK:"get_RIGHT_STICK",get_LEFT_STICK_Y:"get_LEFT_STICK_Y",get_LEFT_STICK_X:"get_LEFT_STICK_X",get_LEFT_STICK:"get_LEFT_STICK"}};var Em=function(a){this.gamepad=a};h["flixel.input.gamepad.lists.FlxGamepadAnalogValueList"]=Em;Em.__name__="flixel.input.gamepad.lists.FlxGamepadAnalogValueList";Em.prototype=
{gamepad:null,get_LEFT_STICK_X:function(){var a=this.gamepad;return a.getAnalogXAxisValue(a.mapping.getAnalogStick(19))},get_LEFT_STICK_Y:function(){var a=this.gamepad;return a.getYAxisRaw(a.mapping.getAnalogStick(19))},get_RIGHT_STICK_X:function(){var a=this.gamepad;return a.getAnalogXAxisValue(a.mapping.getAnalogStick(20))},get_RIGHT_STICK_Y:function(){var a=this.gamepad;return a.getYAxisRaw(a.mapping.getAnalogStick(20))},get_LEFT_TRIGGER:function(){return this.gamepad.getAxis(17)},get_RIGHT_TRIGGER:function(){return this.gamepad.getAxis(18)},
get_POINTER_X:function(){return this.gamepad.getAxis(28)},get_POINTER_Y:function(){return this.gamepad.getAxis(29)},getAxis:function(a){return this.gamepad.getAxis(a)},getXAxis:function(a){var b=this.gamepad;return b.getAnalogXAxisValue(b.mapping.getAnalogStick(a))},getYAxis:function(a){var b=this.gamepad;return b.getYAxisRaw(b.mapping.getAnalogStick(a))},__class__:Em,__properties__:{get_POINTER_Y:"get_POINTER_Y",get_POINTER_X:"get_POINTER_X",get_RIGHT_TRIGGER:"get_RIGHT_TRIGGER",get_LEFT_TRIGGER:"get_LEFT_TRIGGER",
get_RIGHT_STICK_Y:"get_RIGHT_STICK_Y",get_RIGHT_STICK_X:"get_RIGHT_STICK_X",get_LEFT_STICK_Y:"get_LEFT_STICK_Y",get_LEFT_STICK_X:"get_LEFT_STICK_X"}};var uh=function(a,b){bi.call(this,a,b)};h["flixel.input.gamepad.lists.FlxGamepadButtonList"]=uh;uh.__name__="flixel.input.gamepad.lists.FlxGamepadButtonList";uh.__super__=bi;uh.prototype=x(bi.prototype,{get_A:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(0);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_B:function(){var a=this.gamepad,
b=this.status,c=a.mapping.getRawID(1);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_X:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(2);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_Y:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(3);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_LEFT_SHOULDER:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(4);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_RIGHT_SHOULDER:function(){var a=this.gamepad,
b=this.status,c=a.mapping.getRawID(5);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_BACK:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(6);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_START:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(7);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_LEFT_STICK_CLICK:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(8);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_RIGHT_STICK_CLICK:function(){var a=
this.gamepad,b=this.status,c=a.mapping.getRawID(9);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_GUIDE:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(10);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_DPAD_UP:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(11);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_DPAD_DOWN:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(12);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_DPAD_LEFT:function(){var a=
this.gamepad,b=this.status,c=a.mapping.getRawID(13);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_DPAD_RIGHT:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(14);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_LEFT_TRIGGER_BUTTON:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(15);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_RIGHT_TRIGGER_BUTTON:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(16);a=a.buttons[c];return null!=a?a.hasState(b):
!1},get_LEFT_TRIGGER:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(17);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_RIGHT_TRIGGER:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(18);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_LEFT_ANALOG_STICK:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(19);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_RIGHT_ANALOG_STICK:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(20);
a=a.buttons[c];return null!=a?a.hasState(b):!1},get_DPAD:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(21);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_TILT_PITCH:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(26);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_TILT_ROLL:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(27);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_POINTER_X:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(28);
a=a.buttons[c];return null!=a?a.hasState(b):!1},get_POINTER_Y:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(29);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_EXTRA_0:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(30);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_EXTRA_1:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(31);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_EXTRA_2:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(32);
a=a.buttons[c];return null!=a?a.hasState(b):!1},get_EXTRA_3:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(33);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_LEFT_STICK_DIGITAL_UP:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(34);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_LEFT_STICK_DIGITAL_RIGHT:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(35);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_LEFT_STICK_DIGITAL_DOWN:function(){var a=
this.gamepad,b=this.status,c=a.mapping.getRawID(36);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_LEFT_STICK_DIGITAL_LEFT:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(37);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_RIGHT_STICK_DIGITAL_UP:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(38);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_RIGHT_STICK_DIGITAL_RIGHT:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(39);a=a.buttons[c];
return null!=a?a.hasState(b):!1},get_RIGHT_STICK_DIGITAL_DOWN:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(40);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_RIGHT_STICK_DIGITAL_LEFT:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(41);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_ACCEPT:function(){var a=this.gamepad,b=this.status,c=a.mapping.getRawID(42);a=a.buttons[c];return null!=a?a.hasState(b):!1},get_CANCEL:function(){var a=this.gamepad,b=this.status,
c=a.mapping.getRawID(43);a=a.buttons[c];return null!=a?a.hasState(b):!1},__class__:uh,__properties__:x(bi.prototype.__properties__,{get_CANCEL:"get_CANCEL",get_ACCEPT:"get_ACCEPT",get_RIGHT_STICK_DIGITAL_LEFT:"get_RIGHT_STICK_DIGITAL_LEFT",get_RIGHT_STICK_DIGITAL_DOWN:"get_RIGHT_STICK_DIGITAL_DOWN",get_RIGHT_STICK_DIGITAL_RIGHT:"get_RIGHT_STICK_DIGITAL_RIGHT",get_RIGHT_STICK_DIGITAL_UP:"get_RIGHT_STICK_DIGITAL_UP",get_LEFT_STICK_DIGITAL_LEFT:"get_LEFT_STICK_DIGITAL_LEFT",get_LEFT_STICK_DIGITAL_DOWN:"get_LEFT_STICK_DIGITAL_DOWN",
get_LEFT_STICK_DIGITAL_RIGHT:"get_LEFT_STICK_DIGITAL_RIGHT",get_LEFT_STICK_DIGITAL_UP:"get_LEFT_STICK_DIGITAL_UP",get_EXTRA_3:"get_EXTRA_3",get_EXTRA_2:"get_EXTRA_2",get_EXTRA_1:"get_EXTRA_1",get_EXTRA_0:"get_EXTRA_0",get_POINTER_Y:"get_POINTER_Y",get_POINTER_X:"get_POINTER_X",get_TILT_ROLL:"get_TILT_ROLL",get_TILT_PITCH:"get_TILT_PITCH",get_DPAD:"get_DPAD",get_RIGHT_ANALOG_STICK:"get_RIGHT_ANALOG_STICK",get_LEFT_ANALOG_STICK:"get_LEFT_ANALOG_STICK",get_RIGHT_TRIGGER:"get_RIGHT_TRIGGER",get_LEFT_TRIGGER:"get_LEFT_TRIGGER",
get_RIGHT_TRIGGER_BUTTON:"get_RIGHT_TRIGGER_BUTTON",get_LEFT_TRIGGER_BUTTON:"get_LEFT_TRIGGER_BUTTON",get_DPAD_RIGHT:"get_DPAD_RIGHT",get_DPAD_LEFT:"get_DPAD_LEFT",get_DPAD_DOWN:"get_DPAD_DOWN",get_DPAD_UP:"get_DPAD_UP",get_GUIDE:"get_GUIDE",get_RIGHT_STICK_CLICK:"get_RIGHT_STICK_CLICK",get_LEFT_STICK_CLICK:"get_LEFT_STICK_CLICK",get_START:"get_START",get_BACK:"get_BACK",get_RIGHT_SHOULDER:"get_RIGHT_SHOULDER",get_LEFT_SHOULDER:"get_LEFT_SHOULDER",get_Y:"get_Y",get_X:"get_X",get_B:"get_B",get_A:"get_A"})});
var Bm=function(a){this.gamepad=a};h["flixel.input.gamepad.lists.FlxGamepadMotionValueList"]=Bm;Bm.__name__="flixel.input.gamepad.lists.FlxGamepadMotionValueList";Bm.prototype={gamepad:null,get_TILT_PITCH:function(){return this.gamepad.mapping.supportsMotion?this.gamepad.getAxis(26):0},get_TILT_ROLL:function(){return this.gamepad.mapping.supportsMotion?this.gamepad.getAxis(27):0},getAxis:function(a){return this.gamepad.mapping.supportsMotion?this.gamepad.getAxis(a):0},get_isSupported:function(){return this.gamepad.mapping.supportsMotion},
__class__:Bm,__properties__:{get_TILT_ROLL:"get_TILT_ROLL",get_TILT_PITCH:"get_TILT_PITCH",get_isSupported:"get_isSupported"}};var Cm=function(a){this.gamepad=a};h["flixel.input.gamepad.lists.FlxGamepadPointerValueList"]=Cm;Cm.__name__="flixel.input.gamepad.lists.FlxGamepadPointerValueList";Cm.prototype={gamepad:null,get_X:function(){return this.gamepad.mapping.supportsPointer?this.gamepad.getAxis(28):0},get_Y:function(){return this.gamepad.mapping.supportsPointer?this.gamepad.getAxis(29):0},getAxis:function(a){return this.gamepad.mapping.supportsPointer?
this.gamepad.getAxis(a):0},get_isSupported:function(){return this.gamepad.mapping.supportsPointer},__class__:Cm,__properties__:{get_Y:"get_Y",get_X:"get_X",get_isSupported:"get_isSupported"}};var pb=function(a){this.bottomIsAccept=!0;this.attachment=Ui.NONE;this.supportsMotion=this.supportsPointer=!1;null!=a&&this.set_attachment(a);this.initValues()};h["flixel.input.gamepad.mappings.FlxTypedGamepadMapping"]=pb;pb.__name__="flixel.input.gamepad.mappings.FlxTypedGamepadMapping";pb.prototype={supportsMotion:null,
supportsPointer:null,leftStick:null,rightStick:null,attachment:null,manufacturer:null,bottomIsAccept:null,initValues:function(){},getAnalogStick:function(a){switch(a){case 19:return this.leftStick;case 20:return this.rightStick;default:return null}},getID:function(a){return-1},getRawID:function(a){switch(a){case 42:return this.getGlobalBottomIsAccept()?this.getRawID(0):this.getRawID(1);case 43:return this.getGlobalBottomIsAccept()?this.getRawID(1):this.getRawID(0);default:return-1}},getGlobalBottomIsAccept:function(){if(null!=
u.gamepads)switch(u.gamepads.acceptMode._hx_index){case 0:return!0;case 1:return!1}return this.bottomIsAccept},isAxisFlipped:function(a){return!1},isAxisForMotion:function(a){return!1},set_attachment:function(a){return this.attachment=a},getMappedInput:function(a){return qd.UNKNOWN(a)},getInputLabel:function(a){if(-1==this.getRawID(a))return null;switch(a){case 0:return"a";case 1:return"b";case 2:return"x";case 3:return"y";case 4:return"lb";case 5:return"rb";case 6:return"back";case 7:return"start";
case 8:return"ls-click";case 9:return"rs-click";case 10:return"guide";case 11:return"up";case 12:return"down";case 13:return"left";case 14:return"right";case 15:return"l2-click";case 16:return"r2-click";case 17:return"lt";case 18:return"rt";case 19:return"ls";case 20:return"rs";case 21:return"dpad";case 34:return"ls-up";case 35:return"ls-right";case 36:return"ls-down";case 37:return"ls-left";case 38:return"rs-up";case 39:return"rs-right";case 40:return"rs-down";case 41:return"rs-left";case 42:return this.getGlobalBottomIsAccept()?
this.getInputLabel(0):this.getInputLabel(1);case 43:return this.getGlobalBottomIsAccept()?this.getInputLabel(1):this.getInputLabel(0);default:return null}},__class__:pb,__properties__:{set_attachment:"set_attachment"}};var Fm=G["flixel.input.gamepad.mappings.Manufacturer"]={__ename__:"flixel.input.gamepad.mappings.Manufacturer",__constructs__:null,GooglePepper:{_hx_name:"GooglePepper",_hx_index:0,__enum__:"flixel.input.gamepad.mappings.Manufacturer",toString:t},AdobeWindows:{_hx_name:"AdobeWindows",
_hx_index:1,__enum__:"flixel.input.gamepad.mappings.Manufacturer",toString:t},Unknown:{_hx_name:"Unknown",_hx_index:2,__enum__:"flixel.input.gamepad.mappings.Manufacturer",toString:t}};Fm.__constructs__=[Fm.GooglePepper,Fm.AdobeWindows,Fm.Unknown];Fm.__meta__={obj:{SuppressWarnings:["checkstyle:MemberName"]}};var dk=function(a){pb.call(this,a)};h["flixel.input.gamepad.mappings.LogitechMapping"]=dk;dk.__name__="flixel.input.gamepad.mappings.LogitechMapping";dk.__super__=pb;dk.prototype=x(pb.prototype,
{initValues:function(){this.leftStick=nc.LEFT_ANALOG_STICK;this.rightStick=nc.RIGHT_ANALOG_STICK},getID:function(a){switch(a){case -5:return 10;case 0:return 2;case 1:return 0;case 2:return 1;case 3:return 3;case 4:return 4;case 5:return 5;case 6:return 17;case 7:return 18;case 8:return 6;case 9:return 7;case 10:return 8;case 11:return 9;case 16:return 11;case 17:return 12;case 18:return 13;case 19:return 14;default:return a==this.leftStick.rawUp?34:a==this.leftStick.rawDown?36:a==this.leftStick.rawLeft?
37:a==this.leftStick.rawRight?35:a==this.rightStick.rawUp?38:a==this.rightStick.rawDown?40:a==this.rightStick.rawLeft?41:a==this.rightStick.rawRight?39:-1}},getRawID:function(a){switch(a){case 0:return 1;case 1:return 2;case 2:return 0;case 3:return 3;case 4:return 4;case 5:return 5;case 6:return 8;case 7:return 9;case 8:return 10;case 9:return 11;case 10:return-5;case 11:return 16;case 12:return 17;case 13:return 18;case 14:return 19;case 17:return 6;case 18:return 7;case 34:return nc.LEFT_ANALOG_STICK.rawUp;
case 35:return nc.LEFT_ANALOG_STICK.rawRight;case 36:return nc.LEFT_ANALOG_STICK.rawDown;case 37:return nc.LEFT_ANALOG_STICK.rawLeft;case 38:return nc.RIGHT_ANALOG_STICK.rawUp;case 39:return nc.RIGHT_ANALOG_STICK.rawRight;case 40:return nc.RIGHT_ANALOG_STICK.rawDown;case 41:return nc.RIGHT_ANALOG_STICK.rawLeft;default:return pb.prototype.getRawID.call(this,a)}},getMappedInput:function(a){return qd.LOGITECH(this.getRawID(a))},getInputLabel:function(a){switch(a){case 0:return"2";case 1:return"3";case 2:return"1";
case 3:return"4";case 4:return"5";case 5:return"6";case 6:return"9";case 7:return"10";case 10:return"logitech";case 17:return"7";case 18:return"8";default:return pb.prototype.getInputLabel.call(this,a)}},__class__:dk});var ik=function(a){pb.call(this,a)};h["flixel.input.gamepad.mappings.MFiMapping"]=ik;ik.__name__="flixel.input.gamepad.mappings.MFiMapping";ik.__super__=pb;ik.prototype=x(pb.prototype,{initValues:function(){this.leftStick=oc.LEFT_ANALOG_STICK;this.rightStick=oc.RIGHT_ANALOG_STICK},
getID:function(a){switch(a){case 6:return 0;case 7:return 1;case 8:return 2;case 9:return 3;case 10:return 6;case 11:return 10;case 12:return 7;case 13:return 8;case 14:return 9;case 15:return 4;case 16:return 5;case 17:return 11;case 18:return 12;case 19:return 13;case 20:return 14;default:return a==this.leftStick.rawUp?34:a==this.leftStick.rawDown?36:a==this.leftStick.rawLeft?37:a==this.leftStick.rawRight?35:a==this.rightStick.rawUp?38:a==this.rightStick.rawDown?40:a==this.rightStick.rawLeft?41:
a==this.rightStick.rawRight?39:-1}},getRawID:function(a){switch(a){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 15;case 5:return 16;case 6:return 10;case 7:return 12;case 8:return 13;case 9:return 14;case 10:return 11;case 11:return 17;case 12:return 18;case 13:return 19;case 14:return 20;case 17:return 4;case 18:return 5;case 34:return oc.LEFT_ANALOG_STICK.rawUp;case 35:return oc.LEFT_ANALOG_STICK.rawRight;case 36:return oc.LEFT_ANALOG_STICK.rawDown;case 37:return oc.LEFT_ANALOG_STICK.rawLeft;
case 38:return oc.RIGHT_ANALOG_STICK.rawUp;case 39:return oc.RIGHT_ANALOG_STICK.rawRight;case 40:return oc.RIGHT_ANALOG_STICK.rawDown;case 41:return oc.RIGHT_ANALOG_STICK.rawLeft;default:return pb.prototype.getRawID.call(this,a)}},getMappedInput:function(a){return qd.MFI(this.getRawID(a))},__class__:ik});var hk=function(a){pb.call(this,a)};h["flixel.input.gamepad.mappings.MayflashWiiRemoteMapping"]=hk;hk.__name__="flixel.input.gamepad.mappings.MayflashWiiRemoteMapping";hk.__super__=pb;hk.prototype=
x(pb.prototype,{initValues:function(){this.supportsPointer=!0},getID:function(a){switch(this.attachment._hx_index){case 0:return this.getIDNunchuk(a);case 1:return this.getIDClassicController(a);case 2:return this.getIDDefault(a)}},getIDClassicController:function(a){switch(a){case 4:return 11;case 5:return 12;case 6:return 13;case 7:return 14;case 8:return 2;case 9:return 3;case 10:return 0;case 11:return 1;case 12:return 17;case 13:return 18;case 14:return 4;case 15:return 5;case 16:return 6;case 17:return 7;
case 19:return 10;default:return a==this.leftStick.rawUp?34:a==this.leftStick.rawDown?36:a==this.leftStick.rawLeft?37:a==this.leftStick.rawRight?35:a==this.rightStick.rawUp?38:a==this.rightStick.rawDown?40:a==this.rightStick.rawLeft?41:a==this.rightStick.rawRight?39:-1}},getIDNunchuk:function(a){switch(a){case 4:return 11;case 5:return 12;case 6:return 13;case 7:return 14;case 8:return 2;case 9:return 3;case 10:return 0;case 11:return 1;case 12:return 6;case 13:return 7;case 14:return 17;case 15:return 4;
case 19:return 10;default:return a==fb.LEFT_ANALOG_STICK.rawUp?34:a==fb.LEFT_ANALOG_STICK.rawDown?36:a==fb.LEFT_ANALOG_STICK.rawLeft?37:a==fb.LEFT_ANALOG_STICK.rawRight?35:-1}},getIDDefault:function(a){switch(a){case 8:return 2;case 9:return 3;case 10:return 0;case 11:return 1;case 12:return 6;case 13:return 7;case 19:return 10;case 22:return 11;case 23:return 12;case 24:return 13;case 25:return 14;default:return-1}},getRawID:function(a){switch(this.attachment._hx_index){case 0:return this.getRawNunchuk(a);
case 1:return this.getRawClassicController(a);case 2:return this.getRawDefault(a)}},getRawClassicController:function(a){switch(a){case 0:return 10;case 1:return 11;case 2:return 8;case 3:return 9;case 4:return 14;case 5:return 15;case 6:return 16;case 7:return 17;case 10:return 19;case 11:return 4;case 12:return 5;case 13:return 6;case 14:return 7;case 17:return 12;case 18:return 13;case 30:return-1;case 31:return-1;case 34:return fb.LEFT_ANALOG_STICK.rawUp;case 35:return fb.LEFT_ANALOG_STICK.rawRight;
case 36:return fb.LEFT_ANALOG_STICK.rawDown;case 37:return fb.LEFT_ANALOG_STICK.rawLeft;case 38:return fb.RIGHT_ANALOG_STICK.rawUp;case 39:return fb.RIGHT_ANALOG_STICK.rawRight;case 40:return fb.RIGHT_ANALOG_STICK.rawDown;case 41:return fb.RIGHT_ANALOG_STICK.rawLeft;default:return this.getRawDefault(a)}},getRawNunchuk:function(a){switch(a){case 0:return 10;case 1:return 11;case 2:return 8;case 3:return 9;case 4:return 15;case 6:return 12;case 7:return 13;case 10:return 19;case 11:return 4;case 12:return 5;
case 13:return 6;case 14:return 7;case 17:return 14;case 28:return 2;case 29:return 3;case 34:return fb.LEFT_ANALOG_STICK.rawUp;case 35:return fb.LEFT_ANALOG_STICK.rawRight;case 36:return fb.LEFT_ANALOG_STICK.rawDown;case 37:return fb.LEFT_ANALOG_STICK.rawLeft;default:return pb.prototype.getRawID.call(this,a)}},getRawDefault:function(a){switch(a){case 0:return 10;case 1:return 11;case 2:return 8;case 3:return 9;case 6:return 12;case 7:return 13;case 10:return 19;case 11:return 22;case 12:return 23;
case 13:return 24;case 14:return 25;default:return pb.prototype.getRawID.call(this,a)}},set_attachment:function(a){switch(a._hx_index){case 0:case 1:var b=fb.LEFT_ANALOG_STICK;break;case 2:b=fb.REMOTE_DPAD}this.leftStick=b;this.rightStick=1==a._hx_index?fb.RIGHT_ANALOG_STICK:null;return pb.prototype.set_attachment.call(this,a)},getMappedInput:function(a){return qd.MAYFLASH_WII(this.getRawID(a))},getInputLabel:function(a){var b=Uf.getWiiInputLabel(a,this.attachment);return null==b?pb.prototype.getInputLabel.call(this,
a):b},__class__:hk});var ek=function(a){pb.call(this,a)};h["flixel.input.gamepad.mappings.OUYAMapping"]=ek;ek.__name__="flixel.input.gamepad.mappings.OUYAMapping";ek.__super__=pb;ek.prototype=x(pb.prototype,{initValues:function(){this.leftStick=uc.LEFT_ANALOG_STICK;this.rightStick=uc.RIGHT_ANALOG_STICK},getID:function(a){switch(a){case 4:return 17;case 5:return 18;case 6:return 0;case 7:return 1;case 8:return 2;case 9:return 3;case 13:return 8;case 14:return 9;case 15:return 4;case 16:return 5;case 17:return 11;
case 18:return 12;case 19:return 13;case 20:return 14;case 16777234:return 10;default:return a==this.leftStick.rawUp?34:a==this.leftStick.rawDown?36:a==this.leftStick.rawLeft?37:a==this.leftStick.rawRight?35:a==this.rightStick.rawUp?38:a==this.rightStick.rawDown?40:a==this.rightStick.rawLeft?41:a==this.rightStick.rawRight?39:-1}},getRawID:function(a){switch(a){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 15;case 5:return 16;case 8:return 13;case 9:return 14;case 10:return 16777234;
case 11:return 17;case 12:return 18;case 13:return 19;case 14:return 20;case 17:return 4;case 18:return 5;case 34:return uc.LEFT_ANALOG_STICK.rawUp;case 35:return uc.LEFT_ANALOG_STICK.rawRight;case 36:return uc.LEFT_ANALOG_STICK.rawDown;case 37:return uc.LEFT_ANALOG_STICK.rawLeft;case 38:return uc.RIGHT_ANALOG_STICK.rawUp;case 39:return uc.RIGHT_ANALOG_STICK.rawRight;case 40:return uc.RIGHT_ANALOG_STICK.rawDown;case 41:return uc.RIGHT_ANALOG_STICK.rawLeft;default:return pb.prototype.getRawID.call(this,
a)}},getInputLabel:function(a){switch(a){case 0:return"o";case 1:return"a";case 2:return"u";case 3:return"y";case 10:return"home";default:return pb.prototype.getInputLabel.call(this,a)}},getMappedInput:function(a){return qd.OUYA(this.getRawID(a))},__class__:ek});var fk=function(a){pb.call(this,a)};h["flixel.input.gamepad.mappings.PS4Mapping"]=fk;fk.__name__="flixel.input.gamepad.mappings.PS4Mapping";fk.__super__=pb;fk.prototype=x(pb.prototype,{initValues:function(){this.leftStick=cc.LEFT_ANALOG_STICK;
this.rightStick=cc.RIGHT_ANALOG_STICK;this.supportsPointer=this.supportsMotion=!0},getID:function(a){switch(a){case 6:return 0;case 7:return 1;case 8:return 2;case 9:return 3;case 10:return 6;case 11:return 10;case 12:return 7;case 13:return 8;case 14:return 9;case 15:return 4;case 16:return 5;case 17:return 11;case 18:return 12;case 19:return 13;case 20:return 14;default:return a==this.leftStick.rawUp?34:a==this.leftStick.rawDown?36:a==this.leftStick.rawLeft?37:a==this.leftStick.rawRight?35:a==this.rightStick.rawUp?
38:a==this.rightStick.rawDown?40:a==this.rightStick.rawLeft?41:a==this.rightStick.rawRight?39:-1}},getRawID:function(a){switch(a){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 15;case 5:return 16;case 6:return 10;case 7:return 12;case 8:return 13;case 9:return 14;case 10:return 11;case 11:return 17;case 12:return 18;case 13:return 19;case 14:return 20;case 17:return 4;case 18:return 5;case 34:return cc.LEFT_ANALOG_STICK.rawUp;case 35:return cc.LEFT_ANALOG_STICK.rawRight;
case 36:return cc.LEFT_ANALOG_STICK.rawDown;case 37:return cc.LEFT_ANALOG_STICK.rawLeft;case 38:return cc.RIGHT_ANALOG_STICK.rawUp;case 39:return cc.RIGHT_ANALOG_STICK.rawRight;case 40:return cc.RIGHT_ANALOG_STICK.rawDown;case 41:return cc.RIGHT_ANALOG_STICK.rawLeft;default:return pb.prototype.getRawID.call(this,a)}},getInputLabel:function(a){switch(a){case 0:return"x";case 1:return"circle";case 2:return"square";case 3:return"triangle";case 4:return"l1";case 5:return"r1";case 6:return"share";case 7:return"options";
case 10:return"ps";case 17:return"l2";case 18:return"r2";default:return pb.prototype.getInputLabel.call(this,a)}},getMappedInput:function(a){return qd.PS4(this.getRawID(a))},__class__:fk});var gk=function(a){pb.call(this,a)};h["flixel.input.gamepad.mappings.PSVitaMapping"]=gk;gk.__name__="flixel.input.gamepad.mappings.PSVitaMapping";gk.__super__=pb;gk.prototype=x(pb.prototype,{initValues:function(){this.leftStick=yc.LEFT_ANALOG_STICK;this.rightStick=yc.RIGHT_ANALOG_STICK},getID:function(a){switch(a){case 6:return 0;
case 7:return 1;case 8:return 2;case 9:return 3;case 10:return 6;case 12:return 7;case 15:return 4;case 16:return 5;case 17:return 11;case 18:return 12;case 19:return 13;case 20:return 14;default:return a==this.leftStick.rawUp?34:a==this.leftStick.rawDown?34:a==this.leftStick.rawLeft?37:a==this.leftStick.rawRight?35:a==this.rightStick.rawUp?38:a==this.rightStick.rawDown?40:a==this.rightStick.rawLeft?41:a==this.rightStick.rawRight?39:-1}},getRawID:function(a){switch(a){case 0:return 6;case 1:return 7;
case 2:return 8;case 3:return 9;case 4:return 15;case 5:return 16;case 6:return 10;case 7:return 12;case 11:return 17;case 12:return 18;case 13:return 19;case 14:return 20;case 34:return yc.LEFT_ANALOG_STICK.rawUp;case 35:return yc.LEFT_ANALOG_STICK.rawRight;case 36:return yc.LEFT_ANALOG_STICK.rawDown;case 37:return yc.LEFT_ANALOG_STICK.rawLeft;case 38:return yc.RIGHT_ANALOG_STICK.rawUp;case 39:return yc.RIGHT_ANALOG_STICK.rawRight;case 40:return yc.RIGHT_ANALOG_STICK.rawDown;case 41:return yc.RIGHT_ANALOG_STICK.rawLeft;
default:return pb.prototype.getRawID.call(this,a)}},getInputLabel:function(a){switch(a){case 0:return"x";case 1:return"circle";case 2:return"square";case 3:return"triangle";case 4:return"l1";case 5:return"r1";case 6:return"select";case 17:return"l2";case 18:return"r2";default:return pb.prototype.getInputLabel.call(this,a)}},getMappedInput:function(a){return qd.PS_VITA(this.getRawID(a))},isAxisFlipped:function(a){return a!=yc.LEFT_ANALOG_STICK.y?a==yc.RIGHT_ANALOG_STICK.y:!0},__class__:gk});var kk=
function(a){pb.call(this,a)};h["flixel.input.gamepad.mappings.SwitchJoyconLeftMapping"]=kk;kk.__name__="flixel.input.gamepad.mappings.SwitchJoyconLeftMapping";kk.__super__=pb;kk.prototype=x(pb.prototype,{initValues:function(){this.leftStick=Nd.LEFT_ANALOG_STICK;this.supportsMotion=!0;this.bottomIsAccept=this.supportsPointer=!1},getID:function(a){switch(a){case 4:return 17;case 6:return 0;case 7:return 1;case 8:return 2;case 9:return 3;case 10:return 30;case 12:return 7;case 13:return 8;case 15:return 4;
case 16:return 5;default:return a==this.leftStick.rawUp?34:a==this.leftStick.rawDown?36:a==this.leftStick.rawLeft?37:a==this.leftStick.rawRight?35:-1}},getRawID:function(a){switch(a){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 15;case 5:return 16;case 7:return 12;case 8:return 13;case 17:return 4;case 30:return 10;case 34:return Nd.LEFT_ANALOG_STICK.rawUp;case 35:return Nd.LEFT_ANALOG_STICK.rawRight;case 36:return Nd.LEFT_ANALOG_STICK.rawDown;case 37:return Nd.LEFT_ANALOG_STICK.rawLeft;
default:return pb.prototype.getRawID.call(this,a)}},getInputLabel:function(a){switch(a){case 0:return"down";case 1:return"right";case 2:return"left";case 3:return"up";case 4:return"sl";case 5:return"sr";case 7:return"minus";case 17:return"zl";case 30:return"l";default:return pb.prototype.getInputLabel.call(this,a)}},getMappedInput:function(a){return qd.SWITCH_JOYCON_LEFT(this.getRawID(a))},__class__:kk});var lk=function(a){pb.call(this,a)};h["flixel.input.gamepad.mappings.SwitchJoyconRightMapping"]=
lk;lk.__name__="flixel.input.gamepad.mappings.SwitchJoyconRightMapping";lk.__super__=pb;lk.prototype=x(pb.prototype,{initValues:function(){this.leftStick=Od.LEFT_ANALOG_STICK;this.supportsMotion=!0;this.bottomIsAccept=this.supportsPointer=!1},getID:function(a){switch(a){case 5:return 18;case 6:return 0;case 7:return 1;case 8:return 2;case 9:return 3;case 10:return 30;case 11:return 10;case 12:return 7;case 13:return 8;case 15:return 4;case 16:return 5;default:return a==this.leftStick.rawUp?34:a==
this.leftStick.rawDown?36:a==this.leftStick.rawLeft?37:a==this.leftStick.rawRight?35:-1}},getRawID:function(a){switch(a){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 15;case 5:return 16;case 7:return 12;case 8:return 13;case 10:return 11;case 18:return 5;case 30:return 10;case 34:return Od.LEFT_ANALOG_STICK.rawUp;case 35:return Od.LEFT_ANALOG_STICK.rawRight;case 36:return Od.LEFT_ANALOG_STICK.rawDown;case 37:return Od.LEFT_ANALOG_STICK.rawLeft;default:return pb.prototype.getRawID.call(this,
a)}},getInputLabel:function(a){switch(a){case 0:return"a";case 1:return"x";case 2:return"b";case 3:return"y";case 4:return"sl";case 5:return"sr";case 7:return"plus";case 10:return"home";case 18:return"zr";case 30:return"r";default:return pb.prototype.getInputLabel.call(this,a)}},getMappedInput:function(a){return qd.SWITCH_JOYCON_RIGHT(this.getRawID(a))},__class__:lk});var jk=function(a){pb.call(this,a)};h["flixel.input.gamepad.mappings.SwitchProMapping"]=jk;jk.__name__="flixel.input.gamepad.mappings.SwitchProMapping";
jk.__super__=pb;jk.prototype=x(pb.prototype,{initValues:function(){this.leftStick=jc.LEFT_ANALOG_STICK;this.rightStick=jc.RIGHT_ANALOG_STICK;this.supportsMotion=!0;this.bottomIsAccept=this.supportsPointer=!1},getID:function(a){switch(a){case 4:return 17;case 5:return 18;case 6:return 0;case 7:return 1;case 8:return 2;case 9:return 3;case 10:return 6;case 11:return 10;case 12:return 7;case 13:return 8;case 14:return 9;case 15:return 4;case 16:return 5;case 17:return 11;case 18:return 12;case 19:return 13;
case 20:return 14;case 21:return 30;default:return a==this.leftStick.rawUp?34:a==this.leftStick.rawDown?36:a==this.leftStick.rawLeft?37:a==this.leftStick.rawRight?35:a==this.rightStick.rawUp?38:a==this.rightStick.rawDown?40:a==this.rightStick.rawLeft?41:a==this.rightStick.rawRight?39:-1}},getRawID:function(a){switch(a){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 15;case 5:return 16;case 6:return 10;case 7:return 12;case 8:return 13;case 9:return 14;case 10:return 11;
case 11:return 17;case 12:return 18;case 13:return 19;case 14:return 20;case 17:return 4;case 18:return 5;case 30:return 21;case 34:return jc.LEFT_ANALOG_STICK.rawUp;case 35:return jc.LEFT_ANALOG_STICK.rawRight;case 36:return jc.LEFT_ANALOG_STICK.rawDown;case 37:return jc.LEFT_ANALOG_STICK.rawLeft;case 38:return jc.RIGHT_ANALOG_STICK.rawUp;case 39:return jc.RIGHT_ANALOG_STICK.rawRight;case 40:return jc.RIGHT_ANALOG_STICK.rawDown;case 41:return jc.RIGHT_ANALOG_STICK.rawLeft;default:return pb.prototype.getRawID.call(this,
a)}},getInputLabel:function(a){switch(a){case 0:return"b";case 1:return"a";case 2:return"y";case 3:return"x";case 4:return"l";case 5:return"r";case 6:return"minus";case 7:return"plus";case 10:return"home";case 17:return"zl";case 18:return"zr";case 30:return"capture";default:return pb.prototype.getInputLabel.call(this,a)}},getMappedInput:function(a){return qd.SWITCH_PRO(this.getRawID(a))},__class__:jk});var Uf=function(a){pb.call(this,a)};h["flixel.input.gamepad.mappings.WiiRemoteMapping"]=Uf;Uf.__name__=
"flixel.input.gamepad.mappings.WiiRemoteMapping";Uf.getWiiInputLabel=function(a,b){switch(a){case 6:return"minus";case 7:return"plus";case 10:return"home"}switch(b._hx_index){case 0:switch(a){case 2:return"1";case 3:return"2";case 4:return"c";case 17:return"z";default:return null}case 1:switch(a){case 0:return"b";case 1:return"a";case 2:return"y";case 3:return"x";case 4:return"zl";case 5:return"zr";case 17:return"l";case 18:return"r";case 30:return"1";case 31:return"2";default:return null}case 2:switch(a){case 2:return"1";
case 3:return"2";case 6:return"minus";case 7:return"plus";case 10:return"home";default:return null}}};Uf.getLabelClassicController=function(a){switch(a){case 0:return"b";case 1:return"a";case 2:return"y";case 3:return"x";case 4:return"zl";case 5:return"zr";case 17:return"l";case 18:return"r";case 30:return"1";case 31:return"2";default:return null}};Uf.getLabelNunchuk=function(a){switch(a){case 2:return"1";case 3:return"2";case 4:return"c";case 17:return"z";default:return null}};Uf.getLabelDefault=
function(a){switch(a){case 2:return"1";case 3:return"2";case 6:return"minus";case 7:return"plus";case 10:return"home";default:return null}};Uf.__super__=pb;Uf.prototype=x(pb.prototype,{initValues:function(){this.supportsMotion=!0;this.supportsPointer=!1},getID:function(a){switch(this.attachment._hx_index){case 0:return this.getIDNunchuk(a);case 1:return this.getIDClassicController(a);case 2:return this.getIDDefault(a)}},getIDClassicController:function(a){switch(a){case 5:return 11;case 6:return 12;
case 7:return 13;case 8:return 14;case 9:return 1;case 10:return 0;case 11:return 2;case 12:return 3;case 13:return 17;case 14:return 18;case 15:return 4;case 16:return 5;case 17:return 7;case 18:return 6;case 19:return 10;case 20:return 30;case 21:return 31;default:return a==this.leftStick.rawUp?34:a==this.leftStick.rawDown?36:a==this.leftStick.rawLeft?37:a==this.leftStick.rawRight?35:a==this.rightStick.rawUp?38:a==this.rightStick.rawDown?40:a==this.rightStick.rawLeft?41:a==this.rightStick.rawRight?
39:-1}},getIDNunchuk:function(a){switch(a){case 5:return 11;case 6:return 12;case 7:return 13;case 8:return 14;case 9:return 0;case 10:return 1;case 11:return 4;case 12:return 17;case 13:return 2;case 14:return 3;case 15:return 7;case 16:return 6;case 17:return 10;default:return a==Xa.LEFT_ANALOG_STICK.rawUp?34:a==Xa.LEFT_ANALOG_STICK.rawDown?36:a==Xa.LEFT_ANALOG_STICK.rawLeft?37:a==Xa.LEFT_ANALOG_STICK.rawRight?35:pb.prototype.getID.call(this,a)}},getIDDefault:function(a){switch(a){case 9:return 2;
case 10:return 3;case 11:return 0;case 12:return 1;case 13:return 7;case 14:return 6;case 15:return 10;case 22:return 11;case 23:return 12;case 24:return 13;case 25:return 14;default:return-1}},getRawID:function(a){switch(this.attachment._hx_index){case 0:return this.getRawNunchuk(a);case 1:return this.getRawClassicController(a);case 2:return this.getRawDefault(a)}},getRawClassicController:function(a){switch(a){case 0:return 10;case 1:return 9;case 2:return 11;case 3:return 12;case 4:return 15;case 5:return 16;
case 6:return 18;case 7:return 17;case 10:return 19;case 11:return 5;case 12:return 6;case 13:return 7;case 14:return 8;case 17:return 13;case 18:return 14;case 30:return 20;case 31:return 21;case 34:return Xa.LEFT_ANALOG_STICK.rawUp;case 35:return Xa.LEFT_ANALOG_STICK.rawRight;case 36:return Xa.LEFT_ANALOG_STICK.rawDown;case 37:return Xa.LEFT_ANALOG_STICK.rawLeft;case 38:return Xa.RIGHT_ANALOG_STICK.rawUp;case 39:return Xa.RIGHT_ANALOG_STICK.rawRight;case 40:return Xa.RIGHT_ANALOG_STICK.rawDown;
case 41:return Xa.RIGHT_ANALOG_STICK.rawLeft;default:return pb.prototype.getRawID.call(this,a)}},getRawNunchuk:function(a){switch(a){case 0:return 9;case 1:return 10;case 2:return 13;case 3:return 14;case 4:return 11;case 6:return 16;case 7:return 15;case 10:return 17;case 11:return 5;case 12:return 6;case 13:return 7;case 14:return 8;case 17:return 12;case 26:return 3;case 27:return 2;case 34:return Xa.LEFT_ANALOG_STICK.rawUp;case 35:return Xa.LEFT_ANALOG_STICK.rawRight;case 36:return Xa.LEFT_ANALOG_STICK.rawDown;
case 37:return Xa.LEFT_ANALOG_STICK.rawLeft;default:return pb.prototype.getRawID.call(this,a)}},getRawDefault:function(a){switch(a){case 0:return 11;case 1:return 12;case 2:return 9;case 3:return 10;case 6:return 14;case 7:return 13;case 10:return 15;case 11:return 22;case 12:return 23;case 13:return 24;case 14:return 25;case 26:return 2;case 27:return 3;default:return pb.prototype.getRawID.call(this,a)}},isAxisForMotion:function(a){if(this.attachment==Ui.NONE){if(2==a||3==a)return!0}else if(this.attachment==
Ui.WII_NUNCHUCK&&(3==a||2==a))return!0;return!1},isAxisFlipped:function(a){return 4==a},set_attachment:function(a){switch(a._hx_index){case 0:case 1:var b=Xa.LEFT_ANALOG_STICK;break;case 2:b=Xa.REMOTE_DPAD}this.leftStick=b;this.rightStick=1==a._hx_index?Xa.RIGHT_ANALOG_STICK:null;return pb.prototype.set_attachment.call(this,a)},getInputLabel:function(a){var b=Uf.getWiiInputLabel(a,this.attachment);return null==b?pb.prototype.getInputLabel.call(this,a):b},getMappedInput:function(a){return qd.WII(this.getRawID(a))},
__class__:Uf});var Ti=function(a){pb.call(this,a)};h["flixel.input.gamepad.mappings.XInputMapping"]=Ti;Ti.__name__="flixel.input.gamepad.mappings.XInputMapping";Ti.__super__=pb;Ti.prototype=x(pb.prototype,{initValues:function(){this.leftStick=fc.LEFT_ANALOG_STICK;this.rightStick=fc.RIGHT_ANALOG_STICK},getID:function(a){switch(a){case -1:return 10;case 4:return 17;case 5:return 18;case 6:return 0;case 7:return 1;case 8:return 2;case 9:return 3;case 10:return 6;case 12:return 7;case 13:return 8;case 14:return 9;
case 15:return 4;case 16:return 5;case 17:return 11;case 18:return 12;case 19:return 13;case 20:return 14;default:return a==this.leftStick.rawUp?34:a==this.leftStick.rawDown?36:a==this.leftStick.rawLeft?37:a==this.leftStick.rawRight?35:a==this.rightStick.rawUp?38:a==this.rightStick.rawDown?40:a==this.rightStick.rawLeft?41:a==this.rightStick.rawRight?39:-1}},getRawID:function(a){switch(a){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 15;case 5:return 16;case 6:return 10;
case 7:return 12;case 8:return 13;case 9:return 14;case 10:return-1;case 11:return 17;case 12:return 18;case 13:return 19;case 14:return 20;case 17:return 4;case 18:return 5;case 34:return fc.LEFT_ANALOG_STICK.rawUp;case 35:return fc.LEFT_ANALOG_STICK.rawRight;case 36:return fc.LEFT_ANALOG_STICK.rawDown;case 37:return fc.LEFT_ANALOG_STICK.rawLeft;case 38:return fc.RIGHT_ANALOG_STICK.rawUp;case 39:return fc.RIGHT_ANALOG_STICK.rawRight;case 40:return fc.RIGHT_ANALOG_STICK.rawDown;case 41:return fc.RIGHT_ANALOG_STICK.rawLeft;
default:return pb.prototype.getRawID.call(this,a)}},getMappedInput:function(a){return qd.X_INPUT(this.getRawID(a))},__class__:Ti});var Ca={fromString:function(a){a=a.toUpperCase();return Object.prototype.hasOwnProperty.call(Ca.fromStringMap.h,a)?Ca.fromStringMap.h[a]:-1},toString:function(a){return Ca.toStringMap.h[a]}},ok=function(a,b){ai.call(this,a,b)};h["flixel.input.keyboard.FlxKeyList"]=ok;ok.__name__="flixel.input.keyboard.FlxKeyList";ok.__super__=ai;ok.prototype=x(ai.prototype,{get_A:function(){return this.keyManager.checkStatusUnsafe(65,
this.status)},get_B:function(){return this.keyManager.checkStatusUnsafe(66,this.status)},get_C:function(){return this.keyManager.checkStatusUnsafe(67,this.status)},get_D:function(){return this.keyManager.checkStatusUnsafe(68,this.status)},get_E:function(){return this.keyManager.checkStatusUnsafe(69,this.status)},get_F:function(){return this.keyManager.checkStatusUnsafe(70,this.status)},get_G:function(){return this.keyManager.checkStatusUnsafe(71,this.status)},get_H:function(){return this.keyManager.checkStatusUnsafe(72,
this.status)},get_I:function(){return this.keyManager.checkStatusUnsafe(73,this.status)},get_J:function(){return this.keyManager.checkStatusUnsafe(74,this.status)},get_K:function(){return this.keyManager.checkStatusUnsafe(75,this.status)},get_L:function(){return this.keyManager.checkStatusUnsafe(76,this.status)},get_M:function(){return this.keyManager.checkStatusUnsafe(77,this.status)},get_N:function(){return this.keyManager.checkStatusUnsafe(78,this.status)},get_O:function(){return this.keyManager.checkStatusUnsafe(79,
this.status)},get_P:function(){return this.keyManager.checkStatusUnsafe(80,this.status)},get_Q:function(){return this.keyManager.checkStatusUnsafe(81,this.status)},get_R:function(){return this.keyManager.checkStatusUnsafe(82,this.status)},get_S:function(){return this.keyManager.checkStatusUnsafe(83,this.status)},get_T:function(){return this.keyManager.checkStatusUnsafe(84,this.status)},get_U:function(){return this.keyManager.checkStatusUnsafe(85,this.status)},get_V:function(){return this.keyManager.checkStatusUnsafe(86,
this.status)},get_W:function(){return this.keyManager.checkStatusUnsafe(87,this.status)},get_X:function(){return this.keyManager.checkStatusUnsafe(88,this.status)},get_Y:function(){return this.keyManager.checkStatusUnsafe(89,this.status)},get_Z:function(){return this.keyManager.checkStatusUnsafe(90,this.status)},get_ZERO:function(){return this.keyManager.checkStatusUnsafe(48,this.status)},get_ONE:function(){return this.keyManager.checkStatusUnsafe(49,this.status)},get_TWO:function(){return this.keyManager.checkStatusUnsafe(50,
this.status)},get_THREE:function(){return this.keyManager.checkStatusUnsafe(51,this.status)},get_FOUR:function(){return this.keyManager.checkStatusUnsafe(52,this.status)},get_FIVE:function(){return this.keyManager.checkStatusUnsafe(53,this.status)},get_SIX:function(){return this.keyManager.checkStatusUnsafe(54,this.status)},get_SEVEN:function(){return this.keyManager.checkStatusUnsafe(55,this.status)},get_EIGHT:function(){return this.keyManager.checkStatusUnsafe(56,this.status)},get_NINE:function(){return this.keyManager.checkStatusUnsafe(57,
this.status)},get_PAGEUP:function(){return this.keyManager.checkStatusUnsafe(33,this.status)},get_PAGEDOWN:function(){return this.keyManager.checkStatusUnsafe(34,this.status)},get_HOME:function(){return this.keyManager.checkStatusUnsafe(36,this.status)},get_END:function(){return this.keyManager.checkStatusUnsafe(35,this.status)},get_INSERT:function(){return this.keyManager.checkStatusUnsafe(45,this.status)},get_ESCAPE:function(){return this.keyManager.checkStatusUnsafe(27,this.status)},get_MINUS:function(){return this.keyManager.checkStatusUnsafe(189,
this.status)},get_PLUS:function(){return this.keyManager.checkStatusUnsafe(187,this.status)},get_DELETE:function(){return this.keyManager.checkStatusUnsafe(46,this.status)},get_BACKSPACE:function(){return this.keyManager.checkStatusUnsafe(8,this.status)},get_LBRACKET:function(){return this.keyManager.checkStatusUnsafe(219,this.status)},get_RBRACKET:function(){return this.keyManager.checkStatusUnsafe(221,this.status)},get_BACKSLASH:function(){return this.keyManager.checkStatusUnsafe(220,this.status)},
get_CAPSLOCK:function(){return this.keyManager.checkStatusUnsafe(20,this.status)},get_SCROLL_LOCK:function(){return this.keyManager.checkStatusUnsafe(145,this.status)},get_NUMLOCK:function(){return this.keyManager.checkStatusUnsafe(144,this.status)},get_SEMICOLON:function(){return this.keyManager.checkStatusUnsafe(186,this.status)},get_QUOTE:function(){return this.keyManager.checkStatusUnsafe(222,this.status)},get_ENTER:function(){return this.keyManager.checkStatusUnsafe(13,this.status)},get_SHIFT:function(){return this.keyManager.checkStatusUnsafe(16,
this.status)},get_COMMA:function(){return this.keyManager.checkStatusUnsafe(188,this.status)},get_PERIOD:function(){return this.keyManager.checkStatusUnsafe(190,this.status)},get_SLASH:function(){return this.keyManager.checkStatusUnsafe(191,this.status)},get_GRAVEACCENT:function(){return this.keyManager.checkStatusUnsafe(192,this.status)},get_CONTROL:function(){return this.keyManager.checkStatusUnsafe(17,this.status)},get_ALT:function(){return this.keyManager.checkStatusUnsafe(18,this.status)},get_SPACE:function(){return this.keyManager.checkStatusUnsafe(32,
this.status)},get_UP:function(){return this.keyManager.checkStatusUnsafe(38,this.status)},get_DOWN:function(){return this.keyManager.checkStatusUnsafe(40,this.status)},get_LEFT:function(){return this.keyManager.checkStatusUnsafe(37,this.status)},get_RIGHT:function(){return this.keyManager.checkStatusUnsafe(39,this.status)},get_TAB:function(){return this.keyManager.checkStatusUnsafe(9,this.status)},get_WINDOWS:function(){return this.keyManager.checkStatusUnsafe(15,this.status)},get_MENU:function(){return this.keyManager.checkStatusUnsafe(302,
this.status)},get_PRINTSCREEN:function(){return this.keyManager.checkStatusUnsafe(301,this.status)},get_BREAK:function(){return this.keyManager.checkStatusUnsafe(19,this.status)},get_F1:function(){return this.keyManager.checkStatusUnsafe(112,this.status)},get_F2:function(){return this.keyManager.checkStatusUnsafe(113,this.status)},get_F3:function(){return this.keyManager.checkStatusUnsafe(114,this.status)},get_F4:function(){return this.keyManager.checkStatusUnsafe(115,this.status)},get_F5:function(){return this.keyManager.checkStatusUnsafe(116,
this.status)},get_F6:function(){return this.keyManager.checkStatusUnsafe(117,this.status)},get_F7:function(){return this.keyManager.checkStatusUnsafe(118,this.status)},get_F8:function(){return this.keyManager.checkStatusUnsafe(119,this.status)},get_F9:function(){return this.keyManager.checkStatusUnsafe(120,this.status)},get_F10:function(){return this.keyManager.checkStatusUnsafe(121,this.status)},get_F11:function(){return this.keyManager.checkStatusUnsafe(122,this.status)},get_F12:function(){return this.keyManager.checkStatusUnsafe(123,
this.status)},get_NUMPADONE:function(){return this.keyManager.checkStatusUnsafe(97,this.status)},get_NUMPADTWO:function(){return this.keyManager.checkStatusUnsafe(98,this.status)},get_NUMPADTHREE:function(){return this.keyManager.checkStatusUnsafe(99,this.status)},get_NUMPADFOUR:function(){return this.keyManager.checkStatusUnsafe(100,this.status)},get_NUMPADFIVE:function(){return this.keyManager.checkStatusUnsafe(101,this.status)},get_NUMPADSIX:function(){return this.keyManager.checkStatusUnsafe(102,
this.status)},get_NUMPADSEVEN:function(){return this.keyManager.checkStatusUnsafe(103,this.status)},get_NUMPADEIGHT:function(){return this.keyManager.checkStatusUnsafe(104,this.status)},get_NUMPADNINE:function(){return this.keyManager.checkStatusUnsafe(105,this.status)},get_NUMPADZERO:function(){return this.keyManager.checkStatusUnsafe(96,this.status)},get_NUMPADMINUS:function(){return this.keyManager.checkStatusUnsafe(109,this.status)},get_NUMPADPLUS:function(){return this.keyManager.checkStatusUnsafe(107,
this.status)},get_NUMPADPERIOD:function(){return this.keyManager.checkStatusUnsafe(110,this.status)},get_NUMPADMULTIPLY:function(){return this.keyManager.checkStatusUnsafe(106,this.status)},get_NUMPADSLASH:function(){return this.keyManager.checkStatusUnsafe(111,this.status)},__class__:ok,__properties__:x(ai.prototype.__properties__,{get_NUMPADSLASH:"get_NUMPADSLASH",get_NUMPADMULTIPLY:"get_NUMPADMULTIPLY",get_NUMPADPERIOD:"get_NUMPADPERIOD",get_NUMPADPLUS:"get_NUMPADPLUS",get_NUMPADMINUS:"get_NUMPADMINUS",
get_NUMPADZERO:"get_NUMPADZERO",get_NUMPADNINE:"get_NUMPADNINE",get_NUMPADEIGHT:"get_NUMPADEIGHT",get_NUMPADSEVEN:"get_NUMPADSEVEN",get_NUMPADSIX:"get_NUMPADSIX",get_NUMPADFIVE:"get_NUMPADFIVE",get_NUMPADFOUR:"get_NUMPADFOUR",get_NUMPADTHREE:"get_NUMPADTHREE",get_NUMPADTWO:"get_NUMPADTWO",get_NUMPADONE:"get_NUMPADONE",get_F12:"get_F12",get_F11:"get_F11",get_F10:"get_F10",get_F9:"get_F9",get_F8:"get_F8",get_F7:"get_F7",get_F6:"get_F6",get_F5:"get_F5",get_F4:"get_F4",get_F3:"get_F3",get_F2:"get_F2",
get_F1:"get_F1",get_BREAK:"get_BREAK",get_PRINTSCREEN:"get_PRINTSCREEN",get_MENU:"get_MENU",get_WINDOWS:"get_WINDOWS",get_TAB:"get_TAB",get_RIGHT:"get_RIGHT",get_LEFT:"get_LEFT",get_DOWN:"get_DOWN",get_UP:"get_UP",get_SPACE:"get_SPACE",get_ALT:"get_ALT",get_CONTROL:"get_CONTROL",get_GRAVEACCENT:"get_GRAVEACCENT",get_SLASH:"get_SLASH",get_PERIOD:"get_PERIOD",get_COMMA:"get_COMMA",get_SHIFT:"get_SHIFT",get_ENTER:"get_ENTER",get_QUOTE:"get_QUOTE",get_SEMICOLON:"get_SEMICOLON",get_NUMLOCK:"get_NUMLOCK",
get_SCROLL_LOCK:"get_SCROLL_LOCK",get_CAPSLOCK:"get_CAPSLOCK",get_BACKSLASH:"get_BACKSLASH",get_RBRACKET:"get_RBRACKET",get_LBRACKET:"get_LBRACKET",get_BACKSPACE:"get_BACKSPACE",get_DELETE:"get_DELETE",get_PLUS:"get_PLUS",get_MINUS:"get_MINUS",get_ESCAPE:"get_ESCAPE",get_INSERT:"get_INSERT",get_END:"get_END",get_HOME:"get_HOME",get_PAGEDOWN:"get_PAGEDOWN",get_PAGEUP:"get_PAGEUP",get_NINE:"get_NINE",get_EIGHT:"get_EIGHT",get_SEVEN:"get_SEVEN",get_SIX:"get_SIX",get_FIVE:"get_FIVE",get_FOUR:"get_FOUR",
get_THREE:"get_THREE",get_TWO:"get_TWO",get_ONE:"get_ONE",get_ZERO:"get_ZERO",get_Z:"get_Z",get_Y:"get_Y",get_X:"get_X",get_W:"get_W",get_V:"get_V",get_U:"get_U",get_T:"get_T",get_S:"get_S",get_R:"get_R",get_Q:"get_Q",get_P:"get_P",get_O:"get_O",get_N:"get_N",get_M:"get_M",get_L:"get_L",get_K:"get_K",get_J:"get_J",get_I:"get_I",get_H:"get_H",get_G:"get_G",get_F:"get_F",get_E:"get_E",get_D:"get_D",get_C:"get_C",get_B:"get_B",get_A:"get_A"})});var Tj=function(){Pg.call(this,function(a,b){return new ok(a,
b)});this.preventDefaultKeys=[38,40,37,39,32,9];for(var a=Ca.fromStringMap.h,b=Object.keys(a),c=b.length,d=0;d<c;){var f=a[b[d++]];if(-2!=f&&-1!=f){var g=new xe(f);this._keyListArray.push(g);this._keyListMap.h[f]=g}}};h["flixel.input.keyboard.FlxKeyboard"]=Tj;Tj.__name__="flixel.input.keyboard.FlxKeyboard";Tj.__super__=Pg;Tj.prototype=x(Pg.prototype,{onKeyUp:function(a){Pg.prototype.onKeyUp.call(this,a)},onKeyDown:function(a){Pg.prototype.onKeyDown.call(this,a)},resolveKeyCode:function(a){return a.keyCode},
record:function(){for(var a=null,b=0,c=this._keyListArray;b<c.length;){var d=c[b];++b;null!=d&&0!=d.current&&-1!=d.current&&(null==a&&(a=[]),a.push(new Gm(d.ID,d.current)))}return a},playback:function(a){for(var b=0,c=a.length;b<c;){var d=a[b++];this._keyListMap.h[d.code].current=d.value}},__class__:Tj});var yd=function(a,b){null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b};h["lime.math.Vector2"]=yd;yd.__name__="lime.math.Vector2";yd.distance=function(a,b){var c=a.x-b.x;a=a.y-b.y;return Math.sqrt(c*
c+a*a)};yd.interpolate=function(a,b,c,d){null==d&&(d=new yd);d.x=b.x+c*(a.x-b.x);d.y=b.y+c*(a.y-b.y);return d};yd.polar=function(a,b,c){null==c&&(c=new yd);var d=a*Math.sin(b);c.x=a*Math.cos(b);c.y=d;return c};yd.prototype={x:null,y:null,add:function(a,b){null==b&&(b=new yd);b.x=a.x+this.x;b.y=a.y+this.y;return b},clone:function(){return new yd(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 yd);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__:yd,__properties__:{get_lengthSquared:"get_lengthSquared",get_length:"get_length"}};var ma=function(a,b,c,d){null==d&&(d=-1);null==
c&&(c=!0);this.__drawableType=0;this.transparent=c;null==a&&(a=0);null==b&&(b=0);0>a&&(a=0);0>b&&(b=0);this.width=a;this.height=b;this.rect=new ea(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 Eb(null,0,0,a,b,d<<8|d>>>24&255),this.image.set_transparent(c),this.readable=this.__isValid=!0);this.__renderTransform=new wa;this.__worldAlpha=1;this.__worldTransform=new wa;this.__worldColorTransform=new Ub;this.__renderable=
!0};h["openfl.display.BitmapData"]=ma;ma.__name__="openfl.display.BitmapData";ma.__interfaces__=[Fb];ma.__textureFormat=null;ma.__textureInternalFormat=null;ma.fromBase64=function(a,b){return null};ma.fromBytes=function(a,b){return null};ma.fromCanvas=function(a,b){null==b&&(b=!0);if(null==a)return null;var c=new ma(0,0,b,0);c.__fromImage(Eb.fromCanvas(a));c.image.set_transparent(b);return c};ma.fromFile=function(a){return null};ma.fromImage=function(a,b){null==b&&(b=!0);if(null==a||null==a.buffer)return null;
var c=new ma(0,0,b,0);c.__fromImage(a);c.image.set_transparent(b);return null!=c.image?c:null};ma.fromTexture=function(a){if(null==a)return null;var b=new ma(a.__width,a.__height,!0,0);b.readable=!1;b.__texture=a;b.__textureContext=a.__textureContext;b.image=null;return b};ma.loadFromBase64=function(a,b){return Eb.loadFromBase64(a,b).then(function(a){return ob.withValue(ma.fromImage(a))})};ma.loadFromBytes=function(a,b){return Eb.loadFromBytes(kb.toBytes(a)).then(function(a){a=ma.fromImage(a);null!=
b&&a.__applyAlpha(b);return ob.withValue(a)})};ma.loadFromFile=function(a){return Eb.loadFromFile(a).then(function(a){return ob.withValue(ma.fromImage(a))})};ma.prototype={height:null,image:null,readable:null,rect:null,transparent:null,width:null,__blendMode:null,__drawableType: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,__texture:null,__textureContext:null,__textureHeight:null,__textureVersion:null,__textureWidth:null,__transform: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 f=d.__preserveObject,g=null;var k=a?new ma(this.width,this.height,!0,0):this;f&&(g=new ma(this.width,this.height,!0,0));d.__preserveObject&&g.copyPixels(this,this.rect,c);b=d.__applyFilter(k,this,b,c);d.__preserveObject&&b.draw(g,null,null);a&&b==k&&(k.image.version=this.image.version,this.image=k.image);this.image.dirty=!0;this.image.version++}},clone:function(){if(this.__isValid)if(this.readable||null!=this.image)var a=ma.fromImage(this.image.clone(),
this.transparent);else a=new ma(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 ma(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,f=0,g=b.length;f<g;){var k=f++;if(b[k]!=c[k]){d=!1;break}}if(d)return 0}b=
null;f=0;for(g=this.height;f<g;){k=f++;for(var l=0,m=this.width;l<m;){var z=l++;c=!1;var h=this.getPixel32(z,k);var p=a.getPixel32(z,k);d=0;if(h!=p){var r=(h>>>16&255)-(p>>>16&255),w=(h>>>8&255)-(p>>>8&255),u=(h&255)-(p&255);0>r&&(r*=-1);0>w&&(w*=-1);0>u&&(u*=-1);0==r&&0==w&&0==u?(h=(h>>>24&255)-(p>>>24&255),0!=h&&(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=(h&255)<<24|(d>>>16&255)<<16|(d>>>
8&255)<<8|d&255,c=!0)):(d=(d>>>24&255)<<24|(r&255)<<16|(d>>>8&255)<<8|d&255,d=(d>>>24&255)<<24|(d>>>16&255)<<16|(w&255)<<8|d&255,d=(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|u&255,d=-16777216|(d>>>16&255)<<16|(d>>>8&255)<<8|d&255,c=!0)}c&&(null==b&&(b=new ma(this.width,this.height,this.transparent||a.transparent,0)),b.setPixel32(z,k,d))}}return null==b?0:b},copyChannel:function(a,b,c,d,f){if(this.readable){switch(d){case 1:d=ye.RED;break;case 2:d=ye.GREEN;break;case 4:d=ye.BLUE;break;case 8:d=
ye.ALPHA;break;default:return}switch(f){case 1:f=ye.RED;break;case 2:f=ye.GREEN;break;case 4:f=ye.BLUE;break;case 8:f=ye.ALPHA;break;default:return}this.image.copyChannel(a.image,b.__toLimeRectangle(),c.__toLimeVector2(),d,f)}},copyPixels:function(a,b,c,d,f,g){null==g&&(g=!1);this.readable&&null!=a&&(null!=f&&(ma.__tempVector.x=f.x,ma.__tempVector.y=f.y),this.image.copyPixels(a.image,b.__toLimeRectangle(),c.__toLimeVector2(),null!=d?d.image:null,null!=f?ma.__tempVector:null,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,f,g){null==g&&(g=!1);if(null!=a){var k=!0,l=null;a instanceof da&&(l=na.__cast(a,da),l.get_visible()||(k=!1,l.set_visible(!0)));a.__update(!1,!0);var m=wa.__pool.get();m.copyFrom(a.__renderTransform);m.invert();null!=b&&m.concat(b);b=null;
null!=f&&(b=wa.__pool.get(),b.copyFrom(m),b.invert());var z=new Ub;z.__copyFrom(a.__worldColorTransform);z.__invert();if(this.readable||null==ha.get_current().stage.context3D){if(null!=c){var h=ea.__pool.get(),p=wa.__pool.get();a.__getBounds(h,p);var r=Math.ceil(h.width),w=Math.ceil(h.height);p.tx=-h.x;p.ty=-h.y;r=new ma(r,w,!0,0);r.draw(a,p);r.colorTransform(r.rect,c);r.__renderTransform.identity();r.__renderTransform.tx=h.x;r.__renderTransform.ty=h.y;r.__renderTransform.concat(a.__renderTransform);
r.__worldAlpha=a.__worldAlpha;r.__worldColorTransform.__copyFrom(a.__worldColorTransform);a=r;ea.__pool.release(h);wa.__pool.release(p)}ya.convertToCanvas(this.image);c=new pg(this.image.buffer.__srcContext);c.__allowSmoothing=g;c.__overrideBlendMode=d;c.__worldTransform=m;c.__worldAlpha=1/a.__worldAlpha;c.__worldColorTransform=z;null!=f&&c.__pushMaskRect(f,b);this.__drawCanvas(a,c)}else null==this.__textureContext&&(this.__textureContext=F.current.__window.context),null!=c&&z.__combine(c),c=new Cb(ha.get_current().stage.context3D,
this),c.__allowSmoothing=g,c.__pixelRatio=ha.get_current().stage.window.__scale,c.__overrideBlendMode=d,c.__worldTransform=m,c.__worldAlpha=1/a.__worldAlpha,c.__worldColorTransform=z,c.__resize(this.width,this.height),null!=f&&c.__pushMaskRect(f,b),this.__drawGL(a,c);null!=f&&(c.__popMaskRect(),wa.__pool.release(b));wa.__pool.release(m);null==l||k||l.set_visible(!1)}},drawWithQuality:function(a,b,c,d,f,g,k){null==g&&(g=!1);this.draw(a,b,c,d,f,2!=k&&g)},encode:function(a,b,c){if(!this.readable||null==
a)return null;null==c&&(c=new Sb(0));var d=this.image;if(!a.equals(this.rect)){var f=wa.__pool.get();f.tx=Math.round(-a.x);f.ty=Math.round(-a.y);a=new ma(Math.ceil(a.width),Math.ceil(a.height),!0,0);a.draw(this,f);d=a.image;wa.__pool.release(f)}return b instanceof Hm?(c.writeBytes(kb.fromBytes(d.encode(pk.PNG)),0,0),c):b instanceof qk?(c.writeBytes(kb.fromBytes(d.encode(pk.JPEG,na.__cast(b,qk).quality)),0,0),c):null},fillRect:function(a,b){this.__fillRect(a,b,!0)},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 ea);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]=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.__indexBufferData[18]=8,this.__indexBufferData[19]=9,this.__indexBufferData[20]=0,this.__indexBufferData[21]=0,this.__indexBufferData[22]=9,this.__indexBufferData[23]=1,this.__indexBufferData[24]=10,this.__indexBufferData[25]=8,this.__indexBufferData[26]=4,this.__indexBufferData[27]=4,this.__indexBufferData[28]=8,this.__indexBufferData[29]=0,this.__indexBufferData[30]=11,this.__indexBufferData[31]=10,this.__indexBufferData[32]=6,this.__indexBufferData[33]=6,this.__indexBufferData[34]=
10,this.__indexBufferData[35]=4,this.__indexBufferData[36]=12,this.__indexBufferData[37]=13,this.__indexBufferData[38]=8,this.__indexBufferData[39]=8,this.__indexBufferData[40]=13,this.__indexBufferData[41]=9,this.__indexBufferData[42]=14,this.__indexBufferData[43]=12,this.__indexBufferData[44]=10,this.__indexBufferData[45]=10,this.__indexBufferData[46]=12,this.__indexBufferData[47]=8,this.__indexBufferData[48]=15,this.__indexBufferData[49]=14,this.__indexBufferData[50]=11,this.__indexBufferData[51]=
11,this.__indexBufferData[52]=14,this.__indexBufferData[53]=10,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 ea(0,0,this.width,this.height);this.__vertexBufferContext=a.__context;this.__vertexBuffer=null;null!=c&&(this.__vertexBufferWidth=c.get_width(),this.__vertexBufferHeight=c.get_height(),this.__vertexBufferScaleX=c.get_scaleX(),this.__vertexBufferScaleY=c.get_scaleY());if(null!=b&&null!=c){null==this.__vertexBufferGrid&&(this.__vertexBufferGrid=new ea);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,f=b.height;if(0!=d&&0!=f){this.__vertexBufferData=new Float32Array(224);var g=b.x,k=b.y,l=this.width-d-g,m=this.height-f-k;b=g/this.width;var z=k/this.height;d/=this.width;f/=this.height;g/=c.get_scaleX();k/=c.get_scaleY();l/=c.get_scaleX();var h=m/c.get_scaleY();m=c.get_width()/c.get_scaleX()-g-l;l=c.get_height()/c.get_scaleY()-k-h;this.__vertexBufferData[0]=g;this.__vertexBufferData[1]=
k;this.__vertexBufferData[3]=1*b;this.__vertexBufferData[4]=1*z;this.__vertexBufferData[15]=k;this.__vertexBufferData[18]=1*z;this.__vertexBufferData[28]=g;this.__vertexBufferData[31]=1*b;this.__vertexBufferData[56]=g+m;this.__vertexBufferData[57]=k;this.__vertexBufferData[59]=1*(b+d);this.__vertexBufferData[60]=1*z;this.__vertexBufferData[70]=g+m;this.__vertexBufferData[73]=1*(b+d);this.__vertexBufferData[84]=this.width;this.__vertexBufferData[85]=k;this.__vertexBufferData[87]=1;this.__vertexBufferData[88]=
1*z;this.__vertexBufferData[98]=this.width;this.__vertexBufferData[101]=1;this.__vertexBufferData[112]=g;this.__vertexBufferData[113]=k+l;this.__vertexBufferData[115]=1*b;this.__vertexBufferData[116]=1*(z+f);this.__vertexBufferData[127]=k+l;this.__vertexBufferData[130]=1*(z+f);this.__vertexBufferData[140]=g+m;this.__vertexBufferData[141]=k+l;this.__vertexBufferData[143]=1*(b+d);this.__vertexBufferData[144]=1*(z+f);this.__vertexBufferData[154]=this.width;this.__vertexBufferData[155]=k+l;this.__vertexBufferData[157]=
1;this.__vertexBufferData[158]=1*(z+f);this.__vertexBufferData[168]=g;this.__vertexBufferData[169]=this.height;this.__vertexBufferData[171]=1*b;this.__vertexBufferData[172]=1;this.__vertexBufferData[183]=this.height;this.__vertexBufferData[186]=1;this.__vertexBufferData[196]=g+m;this.__vertexBufferData[197]=this.height;this.__vertexBufferData[199]=1*(b+d);this.__vertexBufferData[200]=1;this.__vertexBufferData[210]=this.width;this.__vertexBufferData[211]=this.height;this.__vertexBufferData[213]=1;
this.__vertexBufferData[214]=1;this.__vertexBuffer=a.createVertexBuffer(16,14)}else 0==d&&0!=f?(this.__vertexBufferData=new Float32Array(112),k=b.y,m=this.height-f-k,z=k/this.height,f/=this.height,k/=c.get_scaleY(),h=m/c.get_scaleY(),l=c.get_height()/c.get_scaleY()-k-h,c=c.get_width()/c.get_scaleX(),this.__vertexBufferData[0]=c,this.__vertexBufferData[1]=k,this.__vertexBufferData[3]=1,this.__vertexBufferData[4]=1*z,this.__vertexBufferData[15]=k,this.__vertexBufferData[18]=1*z,this.__vertexBufferData[28]=
c,this.__vertexBufferData[31]=1,this.__vertexBufferData[56]=c,this.__vertexBufferData[57]=k+l,this.__vertexBufferData[59]=1,this.__vertexBufferData[60]=1*(z+f),this.__vertexBufferData[71]=k+l,this.__vertexBufferData[74]=1*(z+f),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==f&&0!=d&&(this.__vertexBufferData=
new Float32Array(112),g=b.x,l=this.width-d-g,b=g/this.width,d/=this.width,g/=c.get_scaleX(),l/=c.get_scaleX(),m=c.get_width()/c.get_scaleX()-g-l,c=c.get_height()/c.get_scaleY(),this.__vertexBufferData[0]=g,this.__vertexBufferData[1]=c,this.__vertexBufferData[3]=1*b,this.__vertexBufferData[4]=1,this.__vertexBufferData[15]=c,this.__vertexBufferData[18]=1,this.__vertexBufferData[28]=g,this.__vertexBufferData[31]=1*b,this.__vertexBufferData[56]=g+m,this.__vertexBufferData[57]=c,this.__vertexBufferData[59]=
1*(b+d),this.__vertexBufferData[60]=1,this.__vertexBufferData[70]=g+m,this.__vertexBufferData[73]=1*(b+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(qg.toArrayBufferView(this.__vertexBufferData))}return this.__vertexBuffer},getColorBoundsRect:function(a,b,c){null==c&&(c=!0);if(!this.readable)return new ea(0,0,this.width,this.height);a=this.image.getColorBoundsRect(a,
b,c,1);return new ea(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=kb.fromBytes(this.image.getPixels(a.__toLimeRectangle(),1));a.__endian=0;return a},getSurface:function(){if(!this.readable)return null;null==this.__surface&&(this.__surface=ep.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;ya.sync(this.image,!1);null!=this.image&&this.image.version>this.__textureVersion&&(null!=this.__surface&&fp.flush(this.__surface),a=this.image,Tb.__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=L.toFloat(kb.get_length(a))/L.toFloat(4)|0,c=ia.toIntVector(null,b,!0),d=0;d<b;){var f=d++;c.set(f,a.readUnsignedInt())}return c},histogram:function(a){a=null!=a?a:new ea(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);d=b;b=0;for(c=kb.get_length(a);b<c;){var f=b++;++d[f%4][a.readUnsignedByte()]}return d},hitTest:function(a,b,c,d,f){null==f&&(f=1);if(!this.readable)return!1;c instanceof dd&&(c=na.__cast(c,dd).__bitmapData);if(c instanceof Ya){f=c;c=f.x-a.x|0;var g=f.y-a.y|0;if(this.rect.contains(c,g)){var k=this.getPixel32(c,g);if((k>>24&255)>b)return!0}}else if(c instanceof ma){k=c;null==d?g=c=0:(c=Math.round(d.x-a.x),g=Math.round(d.y-
a.y));d=ea.__pool.get();d.setTo(c,g,k.width,k.height);if(this.rect.intersects(d)){0>c?(d.x=0,d.width=Math.min(k.width+c,this.width)):d.width=Math.min(k.width,this.width-c);0>g?(d.y=0,d.height=Math.min(k.height+g,this.height)):d.height=Math.min(k.height,this.height-g);a=this.getPixels(d);d.x=0>c?-c:0;d.y=0>g?-g:0;g=k.getPixels(d);k=d.width*d.height|0;c=0;for(var l=k;c<l;){c++;k=a.readUnsignedInt();var m=g.readUnsignedInt();if(L.gt(k>>>24&255,b)&&L.gt(m>>>24&255,f))return ea.__pool.release(d),!0}}ea.__pool.release(d)}else if(c instanceof
ea){f=ea.__pool.get();f.copyFrom(c);f.offset(-a.x,-a.y);f.__contract(0,0,this.width,this.height);if(0<f.width&&0<f.height)for(a=this.getPixels(f),k=L.toFloat(kb.get_length(a))/L.toFloat(4)|0,c=0,l=k;c<l;)if(c++,k=a.readUnsignedInt(),L.gt(k>>>24&255,b))return ea.__pool.release(f),!0;ea.__pool.release(f)}return!1},lock:function(){},merge:function(a,b,c,d,f,g,k){this.readable&&null!=a&&a.readable&&null!=b&&null!=c&&this.image.merge(a.image,b.__toLimeRectangle(),c.__toLimeVector2(),d,f,g,k)},noise:function(a,
b,c,d,f){null==f&&(f=!1);null==d&&(d=7);null==c&&(c=255);null==b&&(b=0);if(this.readable){var g=function(){a=1103515245*a+12345;return(Math.abs(a/65536)|0)%32768};g();c-=b;var k=1==(d&1),l=1==(d&2)>>1,m=1==(d&4)>>2;d=1==(d&8)>>3;for(var z=0,h=this.height;z<h;)for(var p=z++,r=0,w=this.width;r<w;){var u=r++,n=0,t=0,A=0,q=255;f?(n=A=t=b+g()%c,q=255):(k&&(n=b+g()%c),l&&(A=b+g()%c),m&&(t=b+g()%c),d&&(q=b+g()%c));q=(q<<8)+n;q=(q<<8)+A;q=(q<<8)+t;this.setPixel32(u,p,q)}}},paletteMap:function(a,b,c,d,f,g,
k){var l=b.width|0,m=b.height|0;a=a.getPixels(b);b=0;for(var z=m*l;b<z;){var h=b++;var p=a.readUnsignedInt();var r=null==k?p&-16777216:k[p>>24&255];var w=null==d?p&16711680:d[p>>16&255];var u=null==f?p&65280:f[p>>8&255];p=null==g?p&255:g[p&255];w=r+w+u+p;a.position=4*h;a.writeUnsignedInt(w)}a.position=0;d=ea.__pool.get();d.setTo(c.x,c.y,l,m);this.setPixels(d,a);ea.__pool.release(d)},perlinNoise:function(a,b,c,d,f,g,k,l,m){null==l&&(l=!1);null==k&&(k=7);this.readable&&(new wh(d,c,k,l,.5,f,.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(L.toFloat(b.length-b.position)<c)throw new sc("End of file was encountered.",2030);this.image.setPixels(a.__toLimeRectangle(),kb.toBytePointer(b),1,Ko.toLimeEndian(b.__endian))}},setVector:function(a,b){var c=new Sb(0);
kb.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,f,g,k,l){null==l&&(l=!1);null==k&&(k=-1);null==g&&(g=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,f,g,k,l,1)},unlock:function(a){},__applyAlpha:function(a){ya.convertToCanvas(this.image);ya.createImageData(this.image);
for(var b=this.image.buffer.data,c=0,d=kb.get_length(a);c<d;){var f=c++;b[4*f+3]=a.readUnsignedByte()}this.image.version++},__drawCairo:function(a,b){},__drawCanvas:function(a,b){var c=this.image.buffer;b.__allowSmoothing||b.applySmoothing(c.__srcContext,!1);b.__render(a);b.__allowSmoothing||b.applySmoothing(c.__srcContext,!0);c.__srcContext.setTransform(1,0,0,1,0,0);c.__srcImageData=null;c.data=null;this.image.dirty=!0;this.image.version++},__drawGL:function(a,b){var c=b.__context3D,d=c.__state.renderToTexture,
f=c.__state.renderToTextureDepthStencil,g=c.__state.renderToTextureAntiAlias,k=c.__state.renderToTextureSurfaceSelector;c.setRenderToTexture(this.getTexture(c),!0);b.__render(a);null!=d?c.setRenderToTexture(d,f,g,k):c.setRenderToBackBuffer()},__fillRect:function(a,b,c){if(null!=a)if(this.transparent&&0==(b&-16777216)&&(b=0),c&&null!=this.__texture&&null!=this.__texture.__glFramebuffer&&"opengl"==ha.get_current().stage.__renderer.__type){c=ha.get_current().stage.__renderer.__context3D;var d=!this.rect.equals(a),
f=c.__state.renderToTexture,g=c.__state.renderToTextureDepthStencil,k=c.__state.renderToTextureAntiAlias,l=c.__state.renderToTextureSurfaceSelector;c.setRenderToTexture(this.__texture);d&&c.setScissorRectangle(a);c.clear((b>>>16&255)/255,(b>>>8&255)/255,(b&255)/255,this.transparent?(b>>>24&255)/255:1,0,0,1);d&&c.setScissorRectangle(null);null!=f?c.setRenderToTexture(f,g,k,l):c.setRenderToBackBuffer()}else this.readable&&this.image.fillRect(a.__toLimeRectangle(),b,1)},__fromBase64:function(a,b){a=
Eb.fromBase64(a,b);this.__fromImage(a)},__fromBytes:function(a,b){a=Eb.fromBytes(kb.toBytes(a));this.__fromImage(a);null!=b&&this.__applyAlpha(b)},__fromFile:function(a){a=Eb.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 ea(0,0,a.width,a.height),this.__textureWidth=this.width,this.__textureHeight=this.height,this.__isValid=this.readable=!0)},__getBounds:function(a,b){var c=ea.__pool.get();this.rect.__transform(c,
b);a.__expand(c.x,c.y,c.width,c.height);ea.__pool.release(c)},__loadFromBase64:function(a,b){var c=this;return Eb.loadFromBase64(a,b).then(function(a){c.__fromImage(a);return ob.withValue(c)})},__loadFromBytes:function(a,b){var c=this;return Eb.loadFromBytes(kb.toBytes(a)).then(function(a){c.__fromImage(a);null!=b&&c.__applyAlpha(b);return ob.withValue(c)})},__loadFromFile:function(a){var b=this;return Eb.loadFromFile(a).then(function(a){b.__fromImage(a);return ob.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,f){if(null!=this.getVertexBuffer(a)&&(d!=this.__uvRect.width||f!=this.__uvRect.height||b!=this.__uvRect.x||c!=this.__uvRect.y)){null==this.__uvRect&&(this.__uvRect=new ea);this.__uvRect.setTo(b,c,d,f);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 g=0<this.__textureHeight?
f/this.__textureHeight:0;this.__vertexBufferData[0]=d;this.__vertexBufferData[1]=f;this.__vertexBufferData[3]=a+b;this.__vertexBufferData[4]=c+g;this.__vertexBufferData[15]=f;this.__vertexBufferData[17]=a;this.__vertexBufferData[18]=c+g;this.__vertexBufferData[28]=d;this.__vertexBufferData[31]=a+b;this.__vertexBufferData[32]=c;this.__vertexBufferData[45]=a;this.__vertexBufferData[46]=c;this.__vertexBuffer.uploadFromTypedArray(qg.toArrayBufferView(this.__vertexBufferData))}},__sync:function(){ya.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__:ma};var ze=function(a,b,c,d,f){null==d&&(d=-1);null==c&&(c=!0);ma.call(this,0,0,c,d);if(null!=ze.preload)this.__fromImage(ze.preload);else{var g=this;Eb.loadFromBase64(df.getString(ze.resourceName),ze.resourceType).then(function(a){g.__fromImage(a);return ob.withValue(g)}).onComplete(function(a){null==
ze.preload&&(ze.preload=a.image);null!=f&&la.isFunction(f)&&f(a)})}};h["flixel.input.mouse._FlxMouse.GraphicCursor"]=ze;ze.__name__="flixel.input.mouse._FlxMouse.GraphicCursor";ze.preload=null;ze.__super__=ma;ze.prototype=x(ma.prototype,{__class__:ze});var Oi=function(a){this._lastX=this._lastY=this._lastWheel=this._prevX=this._prevY=this._prevViewX=this._prevViewY=0;this._visibleWhenFocusLost=!0;this.useSystemCursor=this._wheelUsed=!1;this.visible=!0;this.wheel=0;this.enabled=!0;Ad.call(this);this.cursorContainer=
a;this.cursorContainer.mouseChildren=!1;this.cursorContainer.mouseEnabled=!1;this._leftButton=new ef(-1);this._stage=ha.get_current().stage;this._stage.addEventListener("mouseDown",(n=this._leftButton,q(n,n.onDown)));this._stage.addEventListener("mouseUp",(n=this._leftButton,q(n,n.onUp)));this._middleButton=new ef(-2);this._rightButton=new ef(-3);this._stage.addEventListener("middleMouseDown",(n=this._middleButton,q(n,n.onDown)));this._stage.addEventListener("middleMouseUp",(n=this._middleButton,
q(n,n.onUp)));this._stage.addEventListener("rightMouseDown",(n=this._rightButton,q(n,n.onDown)));this._stage.addEventListener("rightMouseUp",(n=this._rightButton,q(n,n.onUp)));this._stage.addEventListener("mouseLeave",q(this,this.onMouseLeave));this._stage.addEventListener("mouseWheel",q(this,this.onMouseWheel));u.signals.postGameStart.add(q(this,this.onGameStart));Kc.hide()};h["flixel.input.mouse.FlxMouse"]=Oi;Oi.__name__="flixel.input.mouse.FlxMouse";Oi.__interfaces__=[Og];Oi.__super__=Ad;Oi.prototype=
x(Ad.prototype,{enabled:null,wheel:null,cursorContainer:null,cursor:null,visible:null,useSystemCursor:null,_leftButton:null,_middleButton:null,_rightButton:null,_cursorBitmapData:null,_wheelUsed:null,_visibleWhenFocusLost:null,_lastX:null,_lastY:null,_lastWheel:null,_lastLeftButtonState:null,_prevX:null,_prevY:null,_prevViewX:null,_prevViewY:null,_stage:null,load:function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);null==b&&(b=1);null!=this.cursor&&ba.removeChild(this.cursorContainer,this.cursor);null==
a&&(a=new ze(0,0));if(na.__instanceof(a,$e))this.cursor=w.createInstance(a,[]);else if(a instanceof ma)this.cursor=new dd(a);else if("string"==typeof a){var f=!1;null==f&&(f=!1);this.cursor=new dd(u.assets.getAsset(a,"image",f,null))}else this.cursor=new dd(new ze(0,0));this.cursor.set_x(c);this.cursor.set_y(d);this.cursor.set_scaleX(b);this.cursor.set_scaleY(b);this.cursorContainer.addChild(this.cursor)},unload:function(){null!=this.cursor&&(this.cursorContainer.get_visible()?this.load():this.cursor=
ba.removeChild(this.cursorContainer,this.cursor))},destroy:function(){null!=this._stage&&(this._stage.removeEventListener("mouseDown",(n=this._leftButton,q(n,n.onDown))),this._stage.removeEventListener("mouseUp",(n=this._leftButton,q(n,n.onUp))),this._stage.removeEventListener("middleMouseDown",(n=this._middleButton,q(n,n.onDown))),this._stage.removeEventListener("middleMouseUp",(n=this._middleButton,q(n,n.onUp))),this._stage.removeEventListener("rightMouseDown",(n=this._rightButton,q(n,n.onDown))),
this._stage.removeEventListener("rightMouseUp",(n=this._rightButton,q(n,n.onUp))),this._stage.removeEventListener("mouseLeave",q(this,this.onMouseLeave)),this._stage.removeEventListener("mouseWheel",q(this,this.onMouseWheel)));this.cursor=this.cursorContainer=null;this._leftButton=ba.destroy(this._leftButton);this._middleButton=ba.destroy(this._middleButton);this._rightButton=ba.destroy(this._rightButton);this._cursorBitmapData=ba.dispose(this._cursorBitmapData);u.signals.postGameStart.remove(q(this,
this.onGameStart))},reset:function(){this._leftButton.reset();this._middleButton.reset();this._rightButton.reset()},update:function(){this._prevX=this.x;this._prevY=this.y;this._prevViewX=this.viewX;this._prevViewY=this.viewY;this.setRawPositionUnsafe(u.game.get_mouseX(),u.game.get_mouseY());this.visible&&(this.cursorContainer.set_x(u.game.get_mouseX()),this.cursorContainer.set_y(u.game.get_mouseY()));this._leftButton.update();this._middleButton.update();this._rightButton.update();this._wheelUsed||
(this.wheel=0);this._wheelUsed=!1},onFocus:function(){this.reset();this.set_useSystemCursor(this.useSystemCursor);this.set_visible(this._visibleWhenFocusLost)},onFocusLost:function(){(this._visibleWhenFocusLost=this.visible)&&this.set_visible(!1);Kc.show()},onGameStart:function(){this.set_visible(this.visible)},onMouseWheel:function(a){this.enabled&&(this._wheelUsed=!0,this.wheel=a.delta)},onMouseLeave:function(a){this._rightButton.onUp();this._middleButton.onUp()},get_justMoved:function(){return this._prevX==
this.x?this._prevY!=this.y:!0},get_deltaX:function(){return this.x-this._prevX},get_deltaY:function(){return this.y-this._prevY},get_deltaViewX:function(){return this.viewX-this._prevViewX},get_deltaViewY:function(){return this.viewY-this._prevViewY},get__prevScreenX:function(){return this._prevViewX},get__prevScreenY:function(){return this._prevViewY},get_deltaScreenX:function(){return this.viewX-this._prevViewX},get_deltaScreenY:function(){return this.viewY-this._prevViewY},get_pressed:function(){var a=
this._leftButton;return 1!=a.current?2==a.current:!0},get_justPressed:function(){return 2==this._leftButton.current},get_released:function(){var a=this._leftButton;return 0!=a.current?-1==a.current:!0},get_justReleased:function(){return-1==this._leftButton.current},get_justPressedTimeInTicks:function(){return this._leftButton.justPressedTimeInTicks},get_pressedRight:function(){var a=this._rightButton;return 1!=a.current?2==a.current:!0},get_justPressedRight:function(){return 2==this._rightButton.current},
get_releasedRight:function(){var a=this._rightButton;return 0!=a.current?-1==a.current:!0},get_justReleasedRight:function(){return-1==this._rightButton.current},get_justPressedTimeInTicksRight:function(){return this._rightButton.justPressedTimeInTicks},get_pressedMiddle:function(){var a=this._middleButton;return 1!=a.current?2==a.current:!0},get_justPressedMiddle:function(){return 2==this._middleButton.current},get_releasedMiddle:function(){var a=this._middleButton;return 0!=a.current?-1==a.current:
!0},get_justReleasedMiddle:function(){return-1==this._middleButton.current},get_justPressedTimeInTicksMiddle:function(){return this._middleButton.justPressedTimeInTicks},showSystemCursor:function(){this.cursorContainer.set_visible(!1);Kc.show()},hideSystemCursor:function(){Kc.hide();this.visible&&this.cursorContainer.set_visible(!0)},set_useSystemCursor:function(a){a?this.showSystemCursor():this.hideSystemCursor();return this.useSystemCursor=a},showCursor:function(){this.useSystemCursor?Kc.show():
(null==this.cursor&&this.load(),this.cursorContainer.set_visible(!0),Kc.hide())},hideCursor:function(){this.cursorContainer.set_visible(!1);Kc.hide()},set_visible:function(a){a?this.showCursor():this.hideCursor();return this.visible=a},record:function(){if(this._lastX==this.gameX&&this._lastY==this.gameY&&this._lastLeftButtonState==this._leftButton.current&&this._lastWheel==this.wheel)return null;this._lastX=this.gameX;this._lastY=this.gameY;this._lastLeftButtonState=this._leftButton.current;this._lastWheel=
this.wheel;return new Im(this._lastX,this._lastY,this._leftButton.current,this._lastWheel)},playback:function(a){1!=this._lastLeftButtonState&&2!=this._lastLeftButtonState||0!=a.button&&-1!=a.button||this._stage.dispatchEvent(new vb("mouseUp",!0,!1,a.x,a.y));this._lastLeftButtonState=this._leftButton.current=a.button;this.wheel=a.wheel;this._rawX=a.x;this._rawY=a.y;this.updatePositions()},get__cursor:function(){return this.cursor},set__cursor:function(a){return this.cursor=a},__class__:Oi,__properties__:x(Ad.prototype.__properties__,
{get__prevScreenY:"get__prevScreenY",get__prevScreenX:"get__prevScreenX",set__cursor:"set__cursor",get__cursor:"get__cursor",get_justPressedTimeInTicksMiddle:"get_justPressedTimeInTicksMiddle",get_justReleasedMiddle:"get_justReleasedMiddle",get_releasedMiddle:"get_releasedMiddle",get_justPressedMiddle:"get_justPressedMiddle",get_pressedMiddle:"get_pressedMiddle",get_justPressedTimeInTicksRight:"get_justPressedTimeInTicksRight",get_justReleasedRight:"get_justReleasedRight",get_releasedRight:"get_releasedRight",
get_justPressedRight:"get_justPressedRight",get_pressedRight:"get_pressedRight",get_justPressedTimeInTicks:"get_justPressedTimeInTicks",get_justReleased:"get_justReleased",get_released:"get_released",get_justPressed:"get_justPressed",get_pressed:"get_pressed",get_deltaViewY:"get_deltaViewY",get_deltaViewX:"get_deltaViewX",get_deltaScreenY:"get_deltaScreenY",get_deltaScreenX:"get_deltaScreenX",get_deltaY:"get_deltaY",get_deltaX:"get_deltaX",get_justMoved:"get_justMoved",set_useSystemCursor:"set_useSystemCursor",
set_visible:"set_visible"})});var ef=function(a){this.justPressedTimeInTicks=-1;var b=0,c=0;null==c&&(c=0);null==b&&(b=0);b=N.pool.get().set(b,c);b._inPool=!1;this.justPressedPosition=b;xe.call(this,a)};h["flixel.input.mouse.FlxMouseButton"]=ef;ef.__name__="flixel.input.mouse.FlxMouseButton";ef.__interfaces__=[D];ef.getByID=function(a){switch(a){case -3:return u.mouse._rightButton;case -2:return u.mouse._middleButton;case -1:return u.mouse._leftButton}};ef.__super__=xe;ef.prototype=x(xe.prototype,
{justPressedPosition:null,justPressedTimeInTicks:null,update:function(){xe.prototype.update.call(this);if(2==this.current){var a=this.justPressedPosition,b=u.mouse.viewX,c=u.mouse.viewY;null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c);this.justPressedTimeInTicks=u.game.ticks}else if(-1==this.current){var d=u.swipes,f=this.ID;a=this.justPressedPosition;var g=null;null==g&&(c=b=0,null==c&&(c=0),null==b&&(b=0),b=N.pool.get().set(b,c),b._inPool=!1,g=b);b=a.x;c=a.y;null==c&&(c=0);null==b&&(b=0);g.set_x(b);
g.set_y(c);d.push(new Si(f,g,u.mouse.getViewPosition(),this.justPressedTimeInTicks))}},destroy:function(){this.justPressedPosition=ba.put(this.justPressedPosition)},onDown:function(a){u.mouse.enabled&&this.press()},onUp:function(a){u.mouse.enabled&&this.release()},__class__:ef});var bc=function(a,b,c,d,f,g,k,l,m){this.object=a;this.onMouseDown=b;this.onMouseUp=c;this.onMouseOver=d;this.onMouseOut=f;this.mouseChildren=g;this.mouseEnabled=k;this.pixelPerfect=l;this.mouseButtons=null==m?[-1]:m;a instanceof
R&&(this.sprite=a)};h["flixel.input.mouse.FlxMouseEvent"]=bc;bc.__name__="flixel.input.mouse.FlxMouseEvent";bc.__interfaces__=[D];bc.globalManager=null;bc.add=function(a,b,c,d,f,g,k,l,m){null==l&&(l=!0);null==k&&(k=!0);null==g&&(g=!1);return bc.globalManager.add(a,b,c,d,f,g,k,l,m)};bc.remove=function(a){return bc.globalManager.remove(a)};bc.removeAll=function(){bc.globalManager.removeAll()};bc.reorder=function(){bc.globalManager.reorder()};bc.setMouseDownCallback=function(a,b){bc.globalManager.setMouseDownCallback(a,
b)};bc.setMouseUpCallback=function(a,b){bc.globalManager.setMouseUpCallback(a,b)};bc.setMouseClickCallback=function(a,b){bc.globalManager.setMouseClickCallback(a,b)};bc.setMouseDoubleClickCallback=function(a,b){bc.globalManager.setMouseDoubleClickCallback(a,b)};bc.setMouseOverCallback=function(a,b){bc.globalManager.setMouseOverCallback(a,b)};bc.setMouseOutCallback=function(a,b){bc.globalManager.setMouseOutCallback(a,b)};bc.setMouseMoveCallback=function(a,b){bc.globalManager.setMouseMoveCallback(a,
b)};bc.setMouseWheelCallback=function(a,b){bc.globalManager.setMouseWheelCallback(a,b)};bc.setObjectMouseEnabled=function(a,b){bc.globalManager.setObjectMouseEnabled(a,b)};bc.isObjectMouseEnabled=function(a){return bc.globalManager.isObjectMouseEnabled(a)};bc.setObjectMouseChildren=function(a,b){bc.globalManager.setObjectMouseChildren(a,b)};bc.isObjectMouseChildren=function(a){return bc.globalManager.isObjectMouseChildren(a)};bc.setObjectMouseButtons=function(a,b){bc.globalManager.setObjectMouseButtons(a,
b)};bc.prototype={object:null,onMouseDown:null,onMouseUp:null,onMouseClick:null,onMouseDoubleClick:null,onMouseOver:null,onMouseOut:null,onMouseMove:null,onMouseWheel:null,mouseChildren:null,mouseEnabled:null,pixelPerfect:null,sprite:null,mouseButtons:null,currentMouseButton:null,destroy:function(){this.mouseButtons=this.onMouseWheel=this.onMouseMove=this.onMouseOut=this.onMouseOver=this.onMouseDoubleClick=this.onMouseClick=this.onMouseUp=this.onMouseDown=this.sprite=this.object=null},__class__:bc};
var rk=function(){this.maxDoubleClickDelay=500;var a=0,b=0;null==b&&(b=0);null==a&&(a=0);a=N.pool.get().set(a,b);a._inPool=!1;this._point=a;this.mouseClickedTime=-1;this._clickList=[];this._downList=[];this._overList=[];this._list=[];Na.call(this);null!=this._list&&this.clearRegistry();this._list=[];this._overList=[];this._downList=[];this._clickList=[];u.signals.preStateSwitch.add(q(this,this.removeAll))};h["flixel.input.mouse.FlxMouseEventManager"]=rk;rk.__name__="flixel.input.mouse.FlxMouseEventManager";
rk.__super__=Na;rk.prototype=x(Na.prototype,{_list:null,_overList:null,_downList:null,_clickList:null,mouseClickedTime:null,_point:null,maxDoubleClickDelay:null,destroy:function(){this.clearRegistry();this._point=ba.put(this._point);u.signals.preStateSwitch.remove(q(this,this.removeAll));Na.prototype.destroy.call(this)},update:function(a){Na.prototype.update.call(this,a);a=[];for(var b=0,c=this._list;b<c.length;){var d=c[b];++b;if(d.object.alive&&d.object.exists&&d.object.visible&&d.mouseEnabled&&
this.checkOverlap(d)&&(a.push(d),!d.mouseChildren))break}b=0;for(c=this._overList;b<c.length;)if(d=c[b],++b,!(null==d.onMouseOut||d.object.exists&&d.object.visible&&null!=this.get(d.object,a)))d.onMouseOut(d.object);for(b=0;b<a.length;)if(d=a[b],++b,null!=d.onMouseOver&&d.object.exists&&d.object.visible&&null==this.get(d.object,this._overList))d.onMouseOver(d.object);if(u.mouse.enabled){b=u.mouse;if(b._prevX!=b.x||b._prevY!=b.y)for(b=0;b<a.length;)if(d=a[b],++b,null!=d.onMouseMove&&d.object.exists&&
d.object.visible)d.onMouseMove(d.object);for(b=0;b<a.length;)if(d=a[b],++b,null!=d.onMouseDown&&d.object.exists&&d.object.visible){c=0;for(var f=d.mouseButtons;c<f.length;){var g=f[c];++c;if(2==ef.getByID(g).current)d.onMouseDown(d.object)}}if(2==u.mouse._leftButton.current)for(b=0;b<a.length;)d=a[b],++b,(null!=d.onMouseClick||null!=d.onMouseDoubleClick)&&d.object.exists&&d.object.visible&&this._downList.push(d);for(b=0;b<a.length;)if(d=a[b],++b,null!=d.onMouseUp&&d.object.exists&&d.object.visible)for(c=
0,f=d.mouseButtons;c<f.length;)if(g=f[c],++c,-1==ef.getByID(g).current)d.onMouseUp(d.object);0<this._clickList.length&&u.game.ticks-this.mouseClickedTime>this.maxDoubleClickDelay&&(this._clickList=[]);if(-1==u.mouse._leftButton.current)for(this.mouseClickedTime=u.game.ticks,d=this._clickList,0<this._clickList.length&&(this._clickList=[]),b=0,c=this._downList;b<c.length;)if(f=c[b],++b,null!=f.object&&f.object.exists&&f.object.visible&&null!=this.get(f.object,a)){if(null!=f.onMouseClick)f.onMouseClick(f.object);
if(null!=f.onMouseDoubleClick)if(null!=this.get(f.object,d))f.onMouseDoubleClick(f.object);else this._clickList.push(f)}0<this._downList.length?(b=u.mouse._leftButton,b=!(1==b.current||2==b.current)):b=!1;b&&(this._downList=[]);if(0!=u.mouse.wheel)for(b=0;b<a.length;)if(d=a[b],++b,null!=d.onMouseWheel&&d.object.exists&&d.object.visible)d.onMouseWheel(d.object);this._overList=a}},addEvent:function(a){if(a.mouseChildren){for(var b=0;b<this._list.length&&!this._list[b].mouseChildren;)++b;this._list.splice(b,
0,a)}else this._list.unshift(a);return a},add:function(a,b,c,d,f,g,k,l,m){null==l&&(l=!0);null==k&&(k=!0);null==g&&(g=!1);b=new bc(a,b,c,d,f,g,k,l,m);this.addEvent(b);return a},remove:function(a){for(var b=0,c=this._list;b<c.length;){var d=c[b];++b;d.object==a&&(d.destroy(),y.remove(this._list,d))}return a},removeAll:function(){if(null!=this._list)for(var a=0,b=this._list;a<b.length;){var c=b[a];++a;c.destroy()}this._list.splice(0,this._list.length);this._overList=[];this._downList=[];this._clickList=
[]},reorder:function(){var a=[];this.traverseFlxGroup(u.game._state,a);a.reverse();this._list=a;pd.sort(this._list,q(this,this.sortByMouseChildren))},setMouseDownCallback:function(a,b){a=this.get(a);null!=a&&(a.onMouseDown=b)},setMouseUpCallback:function(a,b){a=this.get(a);null!=a&&(a.onMouseUp=b)},setMouseClickCallback:function(a,b){a=this.get(a);null!=a&&(a.onMouseClick=b)},setMouseDoubleClickCallback:function(a,b){a=this.get(a);null!=a&&(a.onMouseDoubleClick=b)},setMouseOverCallback:function(a,
b){a=this.get(a);null!=a&&(a.onMouseOver=b)},setMouseOutCallback:function(a,b){a=this.get(a);null!=a&&(a.onMouseOut=b)},setMouseMoveCallback:function(a,b){a=this.get(a);null!=a&&(a.onMouseMove=b)},setMouseWheelCallback:function(a,b){a=this.get(a);null!=a&&(a.onMouseWheel=b)},setObjectMouseEnabled:function(a,b){a=this.get(a);null!=a&&(a.mouseEnabled=b)},isObjectMouseEnabled:function(a){a=this.get(a);return null!=a?a.mouseEnabled:!1},setObjectMouseChildren:function(a,b){a=this.get(a);if(null!=a)if(a.mouseChildren=
b,y.remove(this._list,a),b){for(b=0;b<this._list.length&&!this._list[b].mouseChildren;)++b;this._list.splice(b,0,a)}else this._list.unshift(a)},isObjectMouseChildren:function(a){a=this.get(a);if(null!=a)return a.mouseChildren;throw new sc("FlxMouseEventManager , isObjectMouseChildren() : object not found");},setObjectMouseButtons:function(a,b){a=this.get(a);null!=a&&(a.mouseButtons=b)},traverseFlxGroup:function(a,b){for(var c=0,d=a.members;c<d.length;){var f=d[c];++c;a=yb.resolveGroup(f);null!=a&&
this.traverseFlxGroup(a,b);f instanceof Ha&&(a=this.get(f),null!=a&&b.push(a))}},get:function(a,b){null==b&&(b=this._list);for(var c=0;c<b.length;){var d=b[c];++c;if(d.object==a)return d}return null},sortByMouseChildren:function(a,b){return a.mouseChildren==b.mouseChildren?0:a.mouseChildren?1:-1},clearRegistry:function(){this._clickList=this._downList=this._overList=null;this._list=ba.destroyArray(this._list)},checkOverlap:function(a){for(var b=0,c=a.object.getCameras();b<c.length;){var d=c[b];++b;
var f=this._point=u.mouse.getViewPosition(d,this._point),g=f.x>d.viewMarginX&&f.x<d.width-d.viewMarginX&&f.y>d.viewMarginY&&f.y<d.height-d.viewMarginY;f._weak&&f.put();if(g&&(g=this._point=u.mouse.getWorldPosition(d,this._point),a.pixelPerfect&&null!=a.sprite?a.sprite.pixelsOverlapPoint(g,1,d):a.object.overlapsPoint(g,!0,d)))return!0;g=0;for(f=u.touches.list;g<f.length;){var k=f[g];++g;var l=this._point=k.getViewPosition(d,this._point),m=l.x>d.viewMarginX&&l.x<d.width-d.viewMarginX&&l.y>d.viewMarginY&&
l.y<d.height-d.viewMarginY;l._weak&&l.put();if(m&&(k=this._point=k.getWorldPosition(d,this._point),a.pixelPerfect&&null!=a.sprite?a.sprite.pixelsOverlapPoint(k,1,d):a.object.overlapsPoint(k,!0,d)))return!0}}return!1},checkOverlapWithPoint:function(a,b,c){return a.pixelPerfect&&null!=a.sprite?a.sprite.pixelsOverlapPoint(b,1,c):a.object.overlapsPoint(b,!0,c)},__class__:rk});var Vi=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.justPressedTimeInTicks=-1;var f=0,g=
0;null==g&&(g=0);null==f&&(f=0);f=N.pool.get().set(f,g);f._inPool=!1;this.justPressedPosition=f;this.flashPoint=new Ya;Ad.call(this);this.input=new xe(c);this.setXY(a,b);this.pressure=d};h["flixel.input.touch.FlxTouch"]=Vi;Vi.__name__="flixel.input.touch.FlxTouch";Vi.__interfaces__=[th,D];Vi.__super__=Ad;Vi.prototype=x(Ad.prototype,{pressure:null,input:null,flashPoint:null,justPressedPosition:null,justPressedTimeInTicks:null,destroy:function(){this.input=null;this.justPressedPosition=ba.put(this.justPressedPosition);
this.flashPoint=null},recycle:function(a,b,c,d){this.setXY(a,b);this.input.ID=c;this.input.reset();this.pressure=d},update:function(){this.input.update();if(2==this.input.current){var a=this.justPressedPosition,b=this.viewX,c=this.viewY;null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c);this.justPressedTimeInTicks=u.game.ticks}else if(-1==this.input.current){var d=u.swipes,f=this.input.ID;a=this.justPressedPosition;var g=null;null==g&&(c=b=0,null==c&&(c=0),null==b&&(b=0),b=N.pool.get().set(b,c),
b._inPool=!1,g=b);b=a.x;c=a.y;null==c&&(c=0);null==b&&(b=0);g.set_x(b);g.set_y(c);d.push(new Si(f,g,this.getViewPosition(),this.justPressedTimeInTicks))}},setXY:function(a,b){this.flashPoint.setTo(a,b);this.flashPoint=u.game.globalToLocal(this.flashPoint);this.setRawPositionUnsafe(this.flashPoint.x,this.flashPoint.y)},get_touchPointID:function(){return this.input.ID},get_justReleased:function(){return-1==this.input.current},get_released:function(){var a=this.input;return 0!=a.current?-1==a.current:
!0},get_pressed:function(){var a=this.input;return 1!=a.current?2==a.current:!0},get_justPressed:function(){return 2==this.input.current},__class__:Vi,__properties__:x(Ad.prototype.__properties__,{get_justPressed:"get_justPressed",get_pressed:"get_pressed",get_released:"get_released",get_justReleased:"get_justReleased",get_touchPointID:"get_touchPointID"})});var Wh=function(){this.list=[];this._inactiveTouches=[];this._touchesCache=new hc;Wh.maxTouchPoints=ff.maxTouchPoints;ff.inputMode=2;ha.get_current().stage.addEventListener("touchBegin",
q(this,this.handleTouchBegin));ha.get_current().stage.addEventListener("touchEnd",q(this,this.handleTouchEnd));ha.get_current().stage.addEventListener("touchMove",q(this,this.handleTouchMove))};h["flixel.input.touch.FlxTouchManager"]=Wh;Wh.__name__="flixel.input.touch.FlxTouchManager";Wh.__interfaces__=[Og];Wh.prototype={list:null,_inactiveTouches:null,_touchesCache:null,getByID:function(a){return this._touchesCache.h[a]},getFirst:function(){return null!=this.list[0]?this.list[0]:null},destroy:function(){for(var a=
0,b=this.list;a<b.length;){var c=b[a];++a;c.destroy()}this.list=null;a=0;for(b=this._inactiveTouches;a<b.length;)c=b[a],++a,c.destroy();this._touchesCache=this._inactiveTouches=null},justStarted:function(a){null==a&&(a=[]);var b=a.length;0<b&&a.splice(0,b);b=0;for(var c=this.list;b<c.length;){var d=c[b];++b;2==d.input.current&&a.push(d)}return a},justReleased:function(a){null==a&&(a=[]);var b=a.length;0<b&&a.splice(0,b);b=0;for(var c=this.list;b<c.length;){var d=c[b];++b;-1==d.input.current&&a.push(d)}return a},
reset:function(){for(var a=this._touchesCache.keys();a.hasNext();){var b=a.next();this._touchesCache.remove(b)}a=0;for(b=this.list;a<b.length;){var c=b[a];++a;c.input.reset();this._inactiveTouches.push(c)}this.list.splice(0,this.list.length)},handleTouchBegin:function(a){var b=this._touchesCache.h[a.touchPointID];null!=b?(b.setXY(a.stageX|0,a.stageY|0),b.pressure=a.pressure):b=this.recycle(a.stageX|0,a.stageY|0,a.touchPointID,a.pressure);b.input.press()},handleTouchEnd:function(a){a=this._touchesCache.h[a.touchPointID];
null!=a&&a.input.release()},handleTouchMove:function(a){var b=this._touchesCache.h[a.touchPointID];null!=b&&(b.setXY(a.stageX|0,a.stageY|0),b.pressure=a.pressure)},add:function(a){this.list.push(a);return this._touchesCache.h[a.input.ID]=a},recycle:function(a,b,c,d){if(0<this._inactiveTouches.length){var f=this._inactiveTouches.pop();f.recycle(a,b,c,d);return this.add(f)}return this.add(new Vi(a,b,c,d))},update:function(){for(var a=this.list.length-1,b;0<=a;){b=this.list[a];var c=b.input;0!=c.current&&
-1!=c.current||-1==b.input.current?b.update():(b.input.reset(),this._touchesCache.remove(b.input.ID),this.list.splice(a,1),this._inactiveTouches.push(b));--a}},onFocus:function(){},onFocusLost:function(){this.reset()},__class__:Wh};var ac=function(){};h["flixel.math.FlxAngle"]=ac;ac.__name__="flixel.math.FlxAngle";ac.__properties__={get_TO_RAD:"get_TO_RAD",get_TO_DEG:"get_TO_DEG"};ac.radiansFromOrigin=function(a,b){var c=!1;null==c&&(c=!1);return c?180/Math.PI*Math.atan2(b,a):Math.atan2(b,a)};ac.degreesFromOrigin=
function(a,b){var c=!0;null==c&&(c=!1);return c?180/Math.PI*Math.atan2(b,a):Math.atan2(b,a)};ac.angleFromOrigin=function(a,b,c){null==c&&(c=!1);return c?180/Math.PI*Math.atan2(b,a):Math.atan2(b,a)};ac.wrapAngle=function(a){180<a?a=ac.wrapAngle(a-360):-180>a&&(a=ac.wrapAngle(a+360));return a};ac.asDegrees=function(a){return 180/Math.PI*a};ac.asRadians=function(a){return Math.PI/180*a};ac.angleBetween=function(a,b,c){null==c&&(c=!1);var d=b.x+b.origin.x-(a.x+a.origin.x);a=b.y+b.origin.y-(a.y+a.origin.y);
null==c&&(c=!1);return c?180/Math.PI*Math.atan2(a,d):Math.atan2(a,d)};ac.degreesBetween=function(a,b){return ac.angleBetween(a,b,!0)};ac.radiansBetween=function(a,b){return ac.angleBetween(a,b,!1)};ac.angleBetweenPoint=function(a,b,c){null==c&&(c=!1);var d=b.x-(a.x+a.origin.x);a=b.y-(a.y+a.origin.y);b._weak&&b.put();b=c;null==b&&(b=!1);return b?180/Math.PI*Math.atan2(a,d):Math.atan2(a,d)};ac.degreesBetweenPoint=function(a,b){return ac.angleBetweenPoint(a,b,!0)};ac.radiansBetweenPoint=function(a,b){return ac.angleBetweenPoint(a,
b,!1)};ac.angleBetweenMouse=function(a,b){null==b&&(b=!1);if(null==a)return 0;var c=a.getScreenPosition();a=u.mouse.viewX-c.x;var d=u.mouse.viewY-c.y;c.put();null==b&&(b=!1);return b?180/Math.PI*Math.atan2(d,a):Math.atan2(d,a)};ac.degreesBetweenMouse=function(a){return ac.angleBetweenMouse(a,!0)};ac.radiansBetweenMouse=function(a){return ac.angleBetweenMouse(a,!1)};ac.angleBetweenTouch=function(a,b,c){null==c&&(c=!1);var d=a.getScreenPosition();a=b.viewX-d.x;b=b.viewY-d.y;d.put();null==c&&(c=!1);
return c?180/Math.PI*Math.atan2(b,a):Math.atan2(b,a)};ac.degreesBetweenTouch=function(a,b){return ac.angleBetweenTouch(a,b,!0)};ac.radiansBetweenTouch=function(a,b){return ac.angleBetweenTouch(a,b,!1)};ac.angleFromFacing=function(a,b){null==b&&(b=!1);a=Ef.get_degrees(a);return b?a:Math.PI/180*a};ac.getCartesianCoords=function(a,b,c){if(null==c){var d=c=0;null==d&&(d=0);null==c&&(c=0);c=N.pool.get().set(c,d);c._inPool=!1}c.set_x(a*Math.cos(Math.PI/180*b));c.set_y(a*Math.sin(Math.PI/180*b));return c};
ac.getPolarCoords=function(a,b,c){if(null==c){var d=c=0;null==d&&(d=0);null==c&&(c=0);c=N.pool.get().set(c,d);c._inPool=!1}c.set_x(Math.sqrt(a*a+b*b));d=!0;null==d&&(d=!1);c.set_y(d?180/Math.PI*Math.atan2(b,a):Math.atan2(b,a));return c};ac.get_TO_DEG=function(){return 180/Math.PI};ac.get_TO_RAD=function(){return Math.PI/180};var xb=function(){};h["flixel.math.FlxMath"]=xb;xb.__name__="flixel.math.FlxMath";xb.roundDecimal=function(a,b){for(var c=1,d=0;d<b;)d++,c*=10;return Math.round(a*c)/c};xb.bound=
function(a,b,c){a=null!=b&&a<b?b:a;return null!=c&&a>c?c:a};xb.lerp=function(a,b,c){return a+c*(b-a)};xb.inBounds=function(a,b,c){return null==b||a>=b?null!=c?a<=c:!0:!1};xb.isOdd=function(a){return 0!=((a|0)&1)};xb.isEven=function(a){return 0==((a|0)&1)};xb.numericComparison=function(a,b){return b>a?-1:a>b?1:0};xb.pointInCoordinates=function(a,b,c,d,f,g){return a>=c&&a<=c+f&&b>=d&&b<=d+g?!0:!1};xb.pointInFlxRect=function(a,b,c){return a>=c.x&&a<=c.x+c.width&&b>=c.y?b<=c.y+c.height:!1};xb.mouseInFlxRect=
function(a,b){return null==b?!0:a?xb.pointInFlxRect(Math.floor(u.mouse.x),Math.floor(u.mouse.y),b):xb.pointInFlxRect(u.mouse.viewX,u.mouse.viewY,b)};xb.pointInRectangle=function(a,b,c){return a>=c.x&&a<=c.get_right()&&b>=c.y?b<=c.get_bottom():!1};xb.maxAdd=function(a,b,c,d){null==d&&(d=0);a+=b;a>c?a=c:a<=d&&(a=d);return a};xb.wrap=function(a,b,c){c=c-b+1;a<b&&(a+=c*((b-a)/c+1|0));return b+(a-b)%c};xb.remapToRange=function(a,b,c,d,f){return d+(f-d)/(c-b)*(a-b)};xb.dotProduct=function(a,b,c,d){return a*
c+b*d};xb.vectorLength=function(a,b){return Math.sqrt(a*a+b*b)};xb.distanceBetween=function(a,b){var c=a.x+a.origin.x-(b.x+b.origin.x);a=a.y+a.origin.y-(b.y+b.origin.y);return Math.sqrt(c*c+a*a)|0};xb.isDistanceWithin=function(a,b,c,d){null==d&&(d=!1);var f=a.x+a.origin.x-(b.x+b.origin.x);a=a.y+a.origin.y-(b.y+b.origin.y);return d?f*f+a*a<=c*c:f*f+a*a<c*c};xb.distanceToPoint=function(a,b){var c=a.x+a.origin.x-b.x;a=a.y+a.origin.y-b.y;b._weak&&b.put();return Math.sqrt(c*c+a*a)|0};xb.isDistanceToPointWithin=
function(a,b,c,d){null==d&&(d=!1);var f=a.x+a.origin.x-b.x;a=a.y+a.origin.y-b.y;b._weak&&b.put();return d?f*f+a*a<=c*c:f*f+a*a<c*c};xb.distanceToMouse=function(a){var b=a.x+a.origin.x-u.mouse.viewX;a=a.y+a.origin.y-u.mouse.viewY;return Math.sqrt(b*b+a*a)|0};xb.isDistanceToMouseWithin=function(a,b,c){null==c&&(c=!1);var d=a.x+a.origin.x-u.mouse.viewX;a=a.y+a.origin.y-u.mouse.viewY;return c?d*d+a*a<=b*b:d*d+a*a<b*b};xb.distanceToTouch=function(a,b){var c=a.x+a.origin.x-b.viewX;a=a.y+a.origin.y-b.viewY;
return Math.sqrt(c*c+a*a)|0};xb.isDistanceToTouchWithin=function(a,b,c,d){null==d&&(d=!1);var f=a.x+a.origin.x-b.viewX;a=a.y+a.origin.y-b.viewY;return d?f*f+a*a<=c*c:f*f+a*a<c*c};xb.getDecimals=function(a){a=(null==a?"null":""+a).split(".");var b=0;1<a.length&&(b=a[1].length);return b};xb.equal=function(a,b,c){null==c&&(c=1E-7);return Math.abs(a-b)<=c};xb.signOf=function(a){return 0>a?-1:1};xb.sameSign=function(a,b){return(0>a?-1:1)==(0>b?-1:1)};xb.fastSin=function(a){a*=.3183098862;1<a?a-=Math.ceil(a)>>
1<<1:-1>a&&(a+=Math.ceil(-a)>>1<<1);return 0<a?a*(3.1+a*(.5+a*(-7.2+3.6*a))):a*(3.1-a*(.5+a*(7.2+3.6*a)))};xb.fastCos=function(a){a=.3183098862*(a+1.570796327);1<a?a-=Math.ceil(a)>>1<<1:-1>a&&(a+=Math.ceil(-a)>>1<<1);return 0<a?a*(3.1+a*(.5+a*(-7.2+3.6*a))):a*(3.1-a*(.5+a*(7.2+3.6*a)))};xb.sinh=function(a){return(Math.exp(a)-Math.exp(-a))/2};xb.maxInt=function(a,b){return a>b?a:b};xb.minInt=function(a,b){return a>b?b:a};xb.absInt=function(a){return 0<a?a:-a};var Mb={__properties__:{get_ly:"get_ly",
get_lx:"get_lx",get_ry:"get_ry",get_rx:"get_rx",set_radians:"set_radians",get_radians:"get_radians",set_degrees:"set_degrees",get_degrees:"get_degrees",get_lengthSquared:"get_lengthSquared",set_length:"set_length",get_length:"get_length",get_dy:"get_dy",get_dx:"get_dx",set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x"},get:function(a,b){null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);b=N.pool.get().set(a,b);b._inPool=!1;return b},weak:function(a,b){null==b&&(b=0);null==a&&(a=0);
null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);a=N.pool.get().set(a,b);a._inPool=!1;a._weak=!0;return a},plusOp:function(a,b){var c=a.x+b.x,d=a.y+b.y;null==d&&(d=0);null==c&&(c=0);null==d&&(d=0);null==c&&(c=0);d=N.pool.get().set(c,d);d._inPool=!1;a._weak&&a.put();a=b;a._weak&&a.put();return d},minusOp:function(a,b){var c=a.x-b.x,d=a.y-b.y;null==d&&(d=0);null==c&&(c=0);null==d&&(d=0);null==c&&(c=0);d=N.pool.get().set(c,d);d._inPool=!1;a._weak&&a.put();a=b;a._weak&&a.put();return d},scaleOp:function(a,
b){var c=a.x*b;b*=a.y;null==b&&(b=0);null==c&&(c=0);null==b&&(b=0);null==c&&(c=0);c=N.pool.get().set(c,b);c._inPool=!1;a._weak&&a.put();return c},divideOp:function(a,b){var c=a.x/b;b=a.y/b;null==b&&(b=0);null==c&&(c=0);null==b&&(b=0);null==c&&(c=0);c=N.pool.get().set(c,b);c._inPool=!1;a._weak&&a.put();return c},plusEqualOp:function(a,b){var c=b.x,d=b.y;null==d&&(d=0);null==c&&(c=0);a.set_x(a.x+c);a.set_y(a.y+d);b._weak&&b.put();return a},minusEqualOp:function(a,b){var c=b.x,d=b.y;null==d&&(d=0);null==
c&&(c=0);a.set_x(a.x-c);a.set_y(a.y-d);b._weak&&b.put();return a},scaleEqualOp:function(a,b){var c=null;null==c&&(c=b);a.set_x(a.x*b);a.set_y(a.y*c);return a},plusFlashOp:function(a,b){var c=a.x+b.x;b=a.y+b.y;null==b&&(b=0);null==c&&(c=0);null==b&&(b=0);null==c&&(c=0);c=N.pool.get().set(c,b);c._inPool=!1;a._weak&&a.put();return c},minusFlashOp:function(a,b){var c=a.x-b.x;b=a.y-b.y;null==b&&(b=0);null==c&&(c=0);null==b&&(b=0);null==c&&(c=0);c=N.pool.get().set(c,b);c._inPool=!1;a._weak&&a.put();return c},
minusFlashOp2:function(a,b){var c=a.x-b.x;a=a.y-b.y;null==a&&(a=0);null==c&&(c=0);null==a&&(a=0);null==c&&(c=0);c=N.pool.get().set(c,a);c._inPool=!1;b._weak&&b.put();return c},plusEqualFlashOp:function(a,b){var c=b.x;b=b.y;null==b&&(b=0);null==c&&(c=0);a.set_x(a.x+c);a.set_y(a.y+b);return a},minusEqualFlashOp:function(a,b){var c=b.x;b=b.y;null==b&&(b=0);null==c&&(c=0);a.set_x(a.x-c);a.set_y(a.y-b);return a},_new:function(a,b){null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);null==b&&(b=
0);null==a&&(a=0);a=N.pool.get().set(a,b);a._inPool=!1;return a},set:function(a,b,c){null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c);return a},add:function(a,b,c){null==c&&(c=0);null==b&&(b=0);a.set_x(a.x+b);a.set_y(a.y+c);return a},addPoint:function(a,b){var c=b.x,d=b.y;null==d&&(d=0);null==c&&(c=0);a.set_x(a.x+c);a.set_y(a.y+d);b._weak&&b.put();return a},subtract:function(a,b,c){null==c&&(c=0);null==b&&(b=0);a.set_x(a.x-b);a.set_y(a.y-c);return a},subtractPoint:function(a,b){var c=b.x,d=b.y;
null==d&&(d=0);null==c&&(c=0);a.set_x(a.x-c);a.set_y(a.y-d);b._weak&&b.put();return a},scale:function(a,b,c){null==c&&(c=b);a.set_x(a.x*b);a.set_y(a.y*c);return a},scalePoint:function(a,b){var c=b.x,d=b.y;null==d&&(d=c);a.set_x(a.x*c);a.set_y(a.y*d);b._weak&&b.put();return a},scaleNew:function(a,b){var c=null;if(null==c){var d=0,f=0;null==f&&(f=0);null==d&&(d=0);c=N.pool.get().set(d,f);c._inPool=!1}d=a.x;f=a.y;null==f&&(f=0);null==d&&(d=0);c.set_x(d);c.set_y(f);a=c;f=null;null==f&&(f=b);a.set_x(a.x*
b);a.set_y(a.y*f);return a},addNew:function(a,b){var c=null;if(null==c){var d=0,f=0;null==f&&(f=0);null==d&&(d=0);c=N.pool.get().set(d,f);c._inPool=!1}d=a.x;f=a.y;null==f&&(f=0);null==d&&(d=0);c.set_x(d);c.set_y(f);a=c;d=b.x;f=b.y;null==f&&(f=0);null==d&&(d=0);a.set_x(a.x+d);a.set_y(a.y+f);b._weak&&b.put();return a},subtractNew:function(a,b){var c=null;if(null==c){var d=0,f=0;null==f&&(f=0);null==d&&(d=0);c=N.pool.get().set(d,f);c._inPool=!1}d=a.x;f=a.y;null==f&&(f=0);null==d&&(d=0);c.set_x(d);c.set_y(f);
a=c;d=b.x;f=b.y;null==f&&(f=0);null==d&&(d=0);a.set_x(a.x-d);a.set_y(a.y-f);b._weak&&b.put();return a},copyFrom:function(a,b){var c=b.x,d=b.y;null==d&&(d=0);null==c&&(c=0);a.set_x(c);a.set_y(d);b._weak&&b.put();return a},copyFromFlash:function(a,b){return a.set(b.x,b.y)},copyTo:function(a,b){if(null==b){var c=0,d=0;null==d&&(d=0);null==c&&(c=0);b=N.pool.get().set(c,d);b._inPool=!1}c=a.x;d=a.y;null==d&&(d=0);null==c&&(c=0);b.set_x(c);b.set_y(d);return b},copyToFlash:function(a,b){null==b&&(b=new Ya);
b.x=a.x;b.y=a.y;return b},addToFlash:function(a,b){b.x+=a.x;b.y+=a.y;return b},subtractFromFlash:function(a,b){b.x-=a.x;b.y-=a.y;return b},floor:function(a){a.set_x(Math.floor(a.x));a.set_y(Math.floor(a.y));return a},ceil:function(a){a.set_x(Math.ceil(a.x));a.set_y(Math.ceil(a.y));return a},round:function(a){a.set_x(Math.round(a.x));a.set_y(Math.round(a.y));return a},inCoords:function(a,b,c,d,f){return xb.pointInCoordinates(a.x,a.y,b,c,d,f)},inRect:function(a,b){return xb.pointInFlxRect(a.x,a.y,b)},
rotate:function(a,b,c){return Mb.pivotRadians(a,b,Math.PI/180*c)},pivotRadians:function(a,b,c){var d=Mb._point1,f=a.x,g=a.y;null==g&&(g=0);null==f&&(f=0);d.set_x(f);d.set_y(g);f=a;f._weak&&f.put();f=b.x;g=b.y;null==g&&(g=0);null==f&&(f=0);d.set_x(d.x-f);d.set_y(d.y-g);f=b;f._weak&&f.put();d=Mb._point1;c=Mb.get_radians(Mb._point1)+c;f=Math.sqrt(d.x*d.x+d.y*d.y);d.set_x(f*Math.cos(c));d.set_y(f*Math.sin(c));f=Mb._point1.x+b.x;g=Mb._point1.y+b.y;null==g&&(g=0);null==f&&(f=0);a.set_x(f);a.set_y(g);f=
b;f._weak&&f.put();return a},pivotDegrees:function(a,b,c){return Mb.pivotRadians(a,b,Math.PI/180*c)},distanceTo:function(a,b){var c=a.x-b.x;a=a.y-b.y;b._weak&&b.put();return Math.sqrt(c*c+a*a)},radiansTo:function(a,b){var c=b.x-a.x;a=b.y-a.y;b=!1;null==b&&(b=!1);return b?180/Math.PI*Math.atan2(a,c):Math.atan2(a,c)},radiansFrom:function(a,b){var c=a.x-b.x;a=a.y-b.y;b=!1;null==b&&(b=!1);return b?180/Math.PI*Math.atan2(a,c):Math.atan2(a,c)},degreesTo:function(a,b){var c=b.x-a.x;a=b.y-a.y;b=!0;null==
b&&(b=!1);return b?180/Math.PI*Math.atan2(a,c):Math.atan2(a,c)},degreesFrom:function(a,b){var c=a.x-b.x;a=a.y-b.y;b=!0;null==b&&(b=!1);return b?180/Math.PI*Math.atan2(a,c):Math.atan2(a,c)},angleBetween:function(a,b){var c=b.x-a.x;a=b.y-a.y;var d=0;if(0!=c||0!=a){d=.25*Math.PI;var f=0>a?-a:a;d=0<=c?d-(c-f)/(c+f)*d:3*d-(c+f)/(f-c)*d;d=180/Math.PI*(0>a?-d:d);d=90<d?d-270:d+90}b._weak&&b.put();return d},transform:function(a,b){var c=a.x*b.a+a.y*b.c+b.tx;b=a.x*b.b+a.y*b.d+b.ty;null==b&&(b=0);null==c&&
(c=0);a.set_x(c);a.set_y(b);return a},dot:function(a,b){a=a.x*b.x+a.y*b.y;b._weak&&b.put();return a},dotProduct:function(a,b){a=a.x*b.x+a.y*b.y;b._weak&&b.put();return a},dotProductWeak:function(a,b){return a.x*b.x+a.y*b.y},dotProdWithNormalizing:function(a,b){var c=Mb._point1;if(null==c){var d=0,f=0;null==f&&(f=0);null==d&&(d=0);c=N.pool.get().set(d,f);c._inPool=!1}d=b.x;f=b.y;null==f&&(f=0);null==d&&(d=0);c.set_x(d);c.set_y(f);c=Mb.normalize(c);b._weak&&b.put();return a.x*c.x+a.y*c.y},isPerpendicular:function(a,
b){a=a.x*b.x+a.y*b.y;b._weak&&b.put();return 9.999999999999998E-15>Math.abs(a)},crossProductLength:function(a,b){a=a.x*b.y-a.y*b.x;b._weak&&b.put();return a},crossProductLengthWeak:function(a,b){return a.x*b.y-a.y*b.x},isParallel:function(a,b){a=9.999999999999998E-15>Math.abs(a.x*b.y-a.y*b.x);b._weak&&b.put();return a},isParallelWeak:function(a,b){return 9.999999999999998E-15>Math.abs(a.x*b.y-a.y*b.x)},isZero:function(a){return 1E-7>Math.abs(a.x)?1E-7>Math.abs(a.y):!1},zero:function(a){a.set_x(a.set_y(0));
return a},normalize:function(a){if(1E-7>Math.abs(a.x)&&1E-7>Math.abs(a.y))return a;var b=1/Math.sqrt(a.x*a.x+a.y*a.y),c=null;null==c&&(c=b);a.set_x(a.x*b);a.set_y(a.y*c);return a},isNormalized:function(a){return 9.999999999999998E-15>Math.abs(a.x*a.x+a.y*a.y-1)},rotateByRadians:function(a,b){var c=Math.sin(b);b=Math.cos(b);var d=a.x;a.set_x(d*b-a.y*c);a.set_y(d*c+a.y*b);return a},rotateByDegrees:function(a,b){var c=Math.PI/180*b;b=Math.sin(c);c=Math.cos(c);var d=a.x;a.set_x(d*c-a.y*b);a.set_y(d*b+
a.y*c);return a},rotateWithTrig:function(a,b,c){var d=a.x;a.set_x(d*c-a.y*b);a.set_y(d*b+a.y*c);return a},setPolarRadians:function(a,b,c){a.set_x(b*Math.cos(c));a.set_y(b*Math.sin(c));return a},setPolarDegrees:function(a,b,c){return Mb.setPolarRadians(a,b,Math.PI/180*c)},rightNormal:function(a,b){if(null==b){var c=0,d=0;null==d&&(d=0);null==c&&(c=0);b=N.pool.get().set(c,d);b._inPool=!1}c=-a.y;d=a.x;null==d&&(d=0);null==c&&(c=0);b.set_x(c);b.set_y(d);return b},leftNormal:function(a,b){if(null==b){var c=
0,d=0;null==d&&(d=0);null==c&&(c=0);b=N.pool.get().set(c,d);b._inPool=!1}c=a.y;d=-a.x;null==d&&(d=0);null==c&&(c=0);b.set_x(c);b.set_y(d);return b},negate:function(a){a.set_x(-1*a.x);a.set_y(-1*a.y);return a},negateNew:function(a){var b=null;if(null==b){var c=0,d=0;null==d&&(d=0);null==c&&(c=0);b=N.pool.get().set(c,d);b._inPool=!1}c=a.x;d=a.y;null==d&&(d=0);null==c&&(c=0);b.set_x(c);b.set_y(d);a=b;a.set_x(-1*a.x);a.set_y(-1*a.y);return a},projectTo:function(a,b,c){a=a.x*b.x+a.y*b.y;var d=b.x*b.x+
b.y*b.y;if(null==c){var f=0,g=0;null==g&&(g=0);null==f&&(f=0);c=N.pool.get().set(f,g);c._inPool=!1}f=a*b.x/d;g=a*b.y/d;null==g&&(g=0);null==f&&(f=0);c.set_x(f);c.set_y(g);b._weak&&b.put();return c},projectToNormalized:function(a,b,c){a=a.x*b.x+a.y*b.y;if(null==c){var d=0,f=0;null==f&&(f=0);null==d&&(d=0);c=N.pool.get().set(d,f);c._inPool=!1}d=a*b.x;f=a*b.y;null==f&&(f=0);null==d&&(d=0);c.set_x(d);c.set_y(f);b._weak&&b.put();return c},projectToNormalizedWeak:function(a,b,c){a=a.x*b.x+a.y*b.y;if(null==
c){var d=0,f=0;null==f&&(f=0);null==d&&(d=0);c=N.pool.get().set(d,f);c._inPool=!1}d=a*b.x;f=a*b.y;null==f&&(f=0);null==d&&(d=0);c.set_x(d);c.set_y(f);return c},perpProduct:function(a,b){a=a.y*b.x+-a.x*b.y;b._weak&&b.put();return a},perpProductWeak:function(a,b){return a.y*b.x+-a.x*b.y},ratio:function(a,b,c,d){if(9.999999999999998E-15>Math.abs(a.x*d.y-a.y*d.x))a=NaN;else if(9.999999999999998E-15>a.x*a.x+a.y*a.y||9.999999999999998E-15>d.x*d.x+d.y*d.y)a=NaN;else{var f=Mb._point1;if(null==f){var g=0,
k=0;null==k&&(k=0);null==g&&(g=0);g=N.pool.get().set(g,k);g._inPool=!1;f=g}g=c.x;k=c.y;null==k&&(k=0);null==g&&(g=0);f.set_x(g);f.set_y(k);Mb._point1=f;f=Mb._point1;g=b.x;k=b.y;null==k&&(k=0);null==g&&(g=0);f.set_x(f.x-g);f.set_y(f.y-k);f=Mb._point1;a=(f.y*d.x+-f.x*d.y)/(a.y*d.x+-a.x*d.y)}b._weak&&b.put();b=c;b._weak&&b.put();b=d;b._weak&&b.put();return a},ratioWeak:function(a,b,c,d){if(9.999999999999998E-15>Math.abs(a.x*d.y-a.y*d.x)||9.999999999999998E-15>a.x*a.x+a.y*a.y||9.999999999999998E-15>d.x*
d.x+d.y*d.y)return NaN;var f=Mb._point1;if(null==f){var g=0,k=0;null==k&&(k=0);null==g&&(g=0);g=N.pool.get().set(g,k);g._inPool=!1;f=g}g=c.x;k=c.y;null==k&&(k=0);null==g&&(g=0);f.set_x(g);f.set_y(k);Mb._point1=f;c=Mb._point1;g=b.x;k=b.y;null==k&&(k=0);null==g&&(g=0);c.set_x(c.x-g);c.set_y(c.y-k);c=Mb._point1;return(c.y*d.x+-c.x*d.y)/(a.y*d.x+-a.x*d.y)},findIntersection:function(a,b,c,d,f){if(9.999999999999998E-15>Math.abs(a.x*d.y-a.y*d.x))var g=NaN;else if(9.999999999999998E-15>a.x*a.x+a.y*a.y||9.999999999999998E-15>
d.x*d.x+d.y*d.y)g=NaN;else{g=Mb._point1;if(null==g){var k=0,l=0;null==l&&(l=0);null==k&&(k=0);k=N.pool.get().set(k,l);k._inPool=!1;g=k}k=c.x;l=c.y;null==l&&(l=0);null==k&&(k=0);g.set_x(k);g.set_y(l);Mb._point1=g;g=Mb._point1;k=b.x;l=b.y;null==l&&(l=0);null==k&&(k=0);g.set_x(g.x-k);g.set_y(g.y-l);g=Mb._point1;g=(g.y*d.x+-g.x*d.y)/(a.y*d.x+-a.x*d.y)}null==f&&(l=k=0,null==l&&(l=0),null==k&&(k=0),k=N.pool.get().set(k,l),k._inPool=!1,f=k);isNaN(g)?l=k=NaN:(k=b.x+g*a.x,l=b.y+g*a.y);null==l&&(l=0);null==
k&&(k=0);f.set_x(k);f.set_y(l);a=b;a._weak&&a.put();a=c;a._weak&&a.put();a=d;a._weak&&a.put();return f},findIntersectionInBounds:function(a,b,c,d,f){if(null==f){var g=0,k=0;null==k&&(k=0);null==g&&(g=0);g=N.pool.get().set(g,k);g._inPool=!1;f=g}if(9.999999999999998E-15>Math.abs(a.x*d.y-a.y*d.x))var l=NaN;else if(9.999999999999998E-15>a.x*a.x+a.y*a.y||9.999999999999998E-15>d.x*d.x+d.y*d.y)l=NaN;else{var m=Mb._point1;null==m&&(k=g=0,null==k&&(k=0),null==g&&(g=0),g=N.pool.get().set(g,k),g._inPool=!1,
m=g);g=c.x;k=c.y;null==k&&(k=0);null==g&&(g=0);m.set_x(g);m.set_y(k);Mb._point1=m;m=Mb._point1;g=b.x;k=b.y;null==k&&(k=0);null==g&&(g=0);m.set_x(m.x-g);m.set_y(m.y-k);m=Mb._point1;l=(m.y*d.x+-m.x*d.y)/(a.y*d.x+-a.x*d.y)}9.999999999999998E-15>Math.abs(d.x*a.y-d.y*a.x)?g=NaN:9.999999999999998E-15>d.x*d.x+d.y*d.y||9.999999999999998E-15>a.x*a.x+a.y*a.y?g=NaN:(m=Mb._point1,null==m&&(k=g=0,null==k&&(k=0),null==g&&(g=0),g=N.pool.get().set(g,k),g._inPool=!1,m=g),g=b.x,k=b.y,null==k&&(k=0),null==g&&(g=0),
m.set_x(g),m.set_y(k),Mb._point1=m,m=Mb._point1,g=c.x,k=c.y,null==k&&(k=0),null==g&&(g=0),m.set_x(m.x-g),m.set_y(m.y-k),m=Mb._point1,g=(m.y*a.x+-m.x*a.y)/(d.y*a.x+-d.x*a.y));!isNaN(l)&&!isNaN(g)&&0<l&&1>=l&&0<g&&1>=g?(g=b.x+l*a.x,k=b.y+l*a.y):k=g=NaN;null==k&&(k=0);null==g&&(g=0);f.set_x(g);f.set_y(k);a=b;a._weak&&a.put();a=c;a._weak&&a.put();a=d;a._weak&&a.put();return f},truncate:function(a,b){b=Math.min(b,Math.sqrt(a.x*a.x+a.y*a.y));if(!(1E-7>Math.abs(a.x)&&1E-7>Math.abs(a.y))){var c=Mb.get_radians(a);
a.set_x(b*Math.cos(c));a.set_y(b*Math.sin(c))}return a},radiansBetween:function(a,b){a=Math.acos((a.x*b.x+a.y*b.y)/(Math.sqrt(a.x*a.x+a.y*a.y)*Math.sqrt(b.x*b.x+b.y*b.y)));b._weak&&b.put();return a},degreesBetween:function(a,b){a=Math.acos((a.x*b.x+a.y*b.y)/(Math.sqrt(a.x*a.x+a.y*a.y)*Math.sqrt(b.x*b.x+b.y*b.y)));b._weak&&b.put();return 180/Math.PI*a},sign:function(a,b,c){a=(b.x-a.x)*(c.y-a.y)-(b.y-a.y)*(c.x-a.x);b._weak&&b.put();b=c;b._weak&&b.put();return 0==a?0:Math.round(a/Math.abs(a))},dist:function(a,
b){var c=b.x-a.x;a=b.y-a.y;b._weak&&b.put();return Math.sqrt(c*c+a*a)},distSquared:function(a,b){var c=b.x-a.x;a=b.y-a.y;b._weak&&b.put();return c*c+a*a},bounce:function(a,b,c){null==c&&(c=1);c=(1+c)*(a.x*b.x+a.y*b.y);a.set_x(a.x-c*b.x);a.set_y(a.y-c*b.y);b._weak&&b.put();return a},bounceWithFriction:function(a,b,c,d){null==d&&(d=0);null==c&&(c=1);var f=Mb.rightNormal(b,Mb._point3),g=Mb._point1,k=a.x*f.x+a.y*f.y;if(null==g){var l=0,m=0;null==m&&(m=0);null==l&&(l=0);g=N.pool.get().set(l,m);g._inPool=
!1}l=k*f.x;m=k*f.y;null==m&&(m=0);null==l&&(l=0);g.set_x(l);g.set_y(m);f=g;g=Mb._point2;k=a.x*b.x+a.y*b.y;null==g&&(m=l=0,null==m&&(m=0),null==l&&(l=0),g=N.pool.get().set(l,m),g._inPool=!1);l=k*b.x;m=k*b.y;null==m&&(m=0);null==l&&(l=0);g.set_x(l);g.set_y(m);k=g;g=-k.y;l=f.y;a.set_x(-k.x*c+f.x*d);a.set_y(g*c+l*d);b._weak&&b.put();return a},isValid:function(a){var b=a.x;isNaN(b)?b=!1:(b=a.y,b=!isNaN(b));b?(b=a.x,b=isFinite(b)):b=!1;return b?(b=a.y,isFinite(b)):!1},clone:function(a,b){if(null==b){var c=
0,d=0;null==d&&(d=0);null==c&&(c=0);b=N.pool.get().set(c,d);b._inPool=!1}c=a.x;d=a.y;null==d&&(d=0);null==c&&(c=0);b.set_x(c);b.set_y(d);return b},get_x:function(a){return a.x},set_x:function(a,b){return a.set_x(b)},get_y:function(a){return a.y},set_y:function(a,b){return a.set_y(b)},get_dx:function(a){return 1E-7>Math.abs(a.x)&&1E-7>Math.abs(a.y)?0:a.x/Math.sqrt(a.x*a.x+a.y*a.y)},get_dy:function(a){return 1E-7>Math.abs(a.x)&&1E-7>Math.abs(a.y)?0:a.y/Math.sqrt(a.x*a.x+a.y*a.y)},get_length:function(a){return Math.sqrt(a.x*
a.x+a.y*a.y)},set_length:function(a,b){if(!(1E-7>Math.abs(a.x)&&1E-7>Math.abs(a.y))){var c=Mb.get_radians(a);a.set_x(b*Math.cos(c));a.set_y(b*Math.sin(c))}return b},get_lengthSquared:function(a){return a.x*a.x+a.y*a.y},get_degrees:function(a){return Mb.get_radians(a)*(180/Math.PI)},set_degrees:function(a,b){var c=Math.PI/180*b,d=Math.sqrt(a.x*a.x+a.y*a.y);a.set_x(d*Math.cos(c));a.set_y(d*Math.sin(c));return b},get_radians:function(a){var b=a.x;a=a.y;var c=!1;null==c&&(c=!1);return c?180/Math.PI*Math.atan2(a,
b):Math.atan2(a,b)},set_radians:function(a,b){var c=Math.sqrt(a.x*a.x+a.y*a.y);a.set_x(c*Math.cos(b));a.set_y(c*Math.sin(b));return b},get_rx:function(a){return-a.y},get_ry:function(a){return a.x},get_lx:function(a){return a.y},get_ly:function(a){return-a.x}},hh=function(a,b,c){N.call(this);this._setXCallback=a;this._setXYCallback=this._setYCallback=c;null!=this._setXCallback&&(null==this._setYCallback&&(this._setYCallback=a),null==this._setXYCallback&&(this._setXYCallback=a))};h["flixel.math.FlxCallbackPoint"]=
hh;hh.__name__="flixel.math.FlxCallbackPoint";hh.__super__=N;hh.prototype=x(N.prototype,{_setXCallback:null,_setYCallback:null,_setXYCallback:null,set:function(a,b){null==b&&(b=0);null==a&&(a=0);N.prototype.set.call(this,a,b);null!=this._setXYCallback&&this._setXYCallback(this);return this},set_x:function(a){N.prototype.set_x.call(this,a);null!=this._setXCallback&&this._setXCallback(this);return a},set_y:function(a){N.prototype.set_y.call(this,a);null!=this._setYCallback&&this._setYCallback(this);
return a},destroy:function(){N.prototype.destroy.call(this);this._setXYCallback=this._setYCallback=this._setXCallback=null},put:function(){},__class__:hh});var ke=function(){};h["flixel.math.FlxVelocity"]=ke;ke.__name__="flixel.math.FlxVelocity";ke.moveTowardsObject=function(a,b,c,d){null==d&&(d=0);null==c&&(c=60);var f=ac.angleBetween(a,b);0<d&&(c=a.x+a.origin.x-(b.x+b.origin.x),b=a.y+a.origin.y-(b.y+b.origin.y),c=(Math.sqrt(c*c+b*b)|0)/(d/1E3)|0);a.velocity.set_x(Math.cos(f)*c);a.velocity.set_y(Math.sin(f)*
c)};ke.accelerateTowardsObject=function(a,b,c,d){var f=ac.angleBetween(a,b);b=Math.sin(f);f=Math.cos(f);var g=a.velocity,k=0,l=0;null==l&&(l=0);null==k&&(k=0);g.set_x(k);g.set_y(l);g=a.acceleration;k=f*c;l=b*c;null==l&&(l=0);null==k&&(k=0);g.set_x(k);g.set_y(l);g=a.maxVelocity;k=Math.abs(f*d);l=Math.abs(b*d);null==l&&(l=0);null==k&&(k=0);g.set_x(k);g.set_y(l)};ke.moveTowardsMouse=function(a,b,c){null==c&&(c=0);null==b&&(b=60);var d=ac.angleBetweenMouse(a);if(0<c){b=a.x+a.origin.x-u.mouse.viewX;var f=
a.y+a.origin.y-u.mouse.viewY;b=(Math.sqrt(b*b+f*f)|0)/(c/1E3)|0}a.velocity.set_x(Math.cos(d)*b);a.velocity.set_y(Math.sin(d)*b)};ke.moveTowardsTouch=function(a,b,c,d){null==d&&(d=0);null==c&&(c=60);var f=ac.angleBetweenTouch(a,b);0<d&&(c=a.x+a.origin.x-b.viewX,b=a.y+a.origin.y-b.viewY,c=(Math.sqrt(c*c+b*b)|0)/(d/1E3)|0);a.velocity.set_x(Math.cos(f)*c);a.velocity.set_y(Math.sin(f)*c)};ke.accelerateTowardsMouse=function(a,b,c){var d=ac.angleBetweenMouse(a),f=Math.sin(d);d=Math.cos(d);var g=a.velocity,
k=0,l=0;null==l&&(l=0);null==k&&(k=0);g.set_x(k);g.set_y(l);g=a.acceleration;k=d*b;l=f*b;null==l&&(l=0);null==k&&(k=0);g.set_x(k);g.set_y(l);g=a.maxVelocity;k=Math.abs(d*c);l=Math.abs(f*c);null==l&&(l=0);null==k&&(k=0);g.set_x(k);g.set_y(l)};ke.accelerateTowardsTouch=function(a,b,c,d){var f=ac.angleBetweenTouch(a,b);b=Math.sin(f);f=Math.cos(f);var g=a.velocity,k=0,l=0;null==l&&(l=0);null==k&&(k=0);g.set_x(k);g.set_y(l);g=a.acceleration;k=f*c;l=b*c;null==l&&(l=0);null==k&&(k=0);g.set_x(k);g.set_y(l);
g=a.maxVelocity;k=Math.abs(f*d);l=Math.abs(b*d);null==l&&(l=0);null==k&&(k=0);g.set_x(k);g.set_y(l)};ke.moveTowardsPoint=function(a,b,c,d){null==d&&(d=0);null==c&&(c=60);var f=ac.angleBetweenPoint(a,b);if(0<d){c=a.x+a.origin.x-b.x;var g=a.y+a.origin.y-b.y,k=b;k._weak&&k.put();c=(Math.sqrt(c*c+g*g)|0)/(d/1E3)|0}a.velocity.set_x(Math.cos(f)*c);a.velocity.set_y(Math.sin(f)*c);k=b;k._weak&&k.put()};ke.accelerateTowardsPoint=function(a,b,c,d){var f=ac.angleBetweenPoint(a,b),g=Math.sin(f);f=Math.cos(f);
var k=a.velocity,l=0,m=0;null==m&&(m=0);null==l&&(l=0);k.set_x(l);k.set_y(m);k=a.acceleration;l=f*c;m=g*c;null==m&&(m=0);null==l&&(l=0);k.set_x(l);k.set_y(m);k=a.maxVelocity;l=Math.abs(f*d);m=Math.abs(g*d);null==m&&(m=0);null==l&&(l=0);k.set_x(l);k.set_y(m);b._weak&&b.put()};ke.velocityFromAngle=function(a,b){var c=Math.PI/180*a;a=Math.cos(c)*b;b*=Math.sin(c);null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);b=N.pool.get().set(a,b);b._inPool=!1;return b};ke.velocityFromFacing=function(a,
b){var c=0,d=0;null==d&&(d=0);null==c&&(c=0);c=N.pool.get().set(c,d);c._inPool=!1;return Mb.setPolarRadians(c,b,Ef.get_degrees(a.facing)*(Math.PI/180))};ke.computeVelocity=function(a,b,c,d,f){0!=b?a+=b*f:0!=c&&(b=c*f,a=0<a-b?a-b:0>a+b?a+b:0);0!=a&&0!=d&&(a>d?a=d:a<-d&&(a=-d));return a};ke.accelerateFromAngle=function(a,b,c,d,f){null==f&&(f=!0);var g=Math.sin(b);b=Math.cos(b);if(f){f=a.velocity;var k=0,l=0;null==l&&(l=0);null==k&&(k=0);f.set_x(k);f.set_y(l)}f=a.acceleration;k=b*c;l=g*c;null==l&&(l=
0);null==k&&(k=0);f.set_x(k);f.set_y(l);f=a.maxVelocity;k=Math.abs(b*d);l=Math.abs(g*d);null==l&&(l=0);null==k&&(k=0);f.set_x(k);f.set_y(l)};var Wf=function(a,b,c){null==c&&(c=!0);this.currentIndex=this.nextIndex=-1;this.onFinish=new md;this.onNodeReached=new md;this.onEndReached=new md;this.direction=!0;this.loopType=16;this.nodes=a;this.target=b;this.direction=c;Na.call(this);null!=a&&0<a.length&&null!=b&&this.restart()};h["flixel.path.FlxTypedBasePath"]=Wf;Wf.__name__="flixel.path.FlxTypedBasePath";
Wf.__interfaces__=[D];Wf.__super__=Na;Wf.prototype=x(Na.prototype,{nodes:null,target:null,loopType:null,direction:null,onEndReached:null,onNodeReached:null,onFinish:null,currentIndex:null,nextIndex:null,destroy:function(){ba.putArray(this.nodes);this.nodes=null;ba.destroyArray(this.onEndReached.handlers)},restart:function(){this.currentIndex=this.getStartingNode();this.setNextIndex();return this},getStartingNode:function(){return 0==this.direction?this.nodes.length-1:0},nodeReached:function(){this.advance();
this.onNodeReached.dispatch(this);0>this.nextIndex&&this.onFinish.dispatch(this)},advance:function(){0>this.nextIndex?u.log.advanced("Cannot advance after path is finished",La.WARNING,!0):(this.currentIndex=this.nextIndex,this.setNextIndex())},setNextIndex:function(){if(this.currentIndex==this.nodes.length-1&&1==this.direction){switch(this.loopType){case 0:var a=-1;break;case 16:a=0;break;case 4096:this.direction=!1,a=this.currentIndex-1}this.nextIndex=a;this.onEndReached.dispatch(this)}else if(0==
this.currentIndex&&0==this.direction){switch(this.loopType){case 0:a=-1;break;case 16:a=this.nodes.length-1;break;case 4096:this.direction=!0,a=this.currentIndex+1}this.nextIndex=a;this.onEndReached.dispatch(this)}else this.nextIndex=this.currentIndex+(this.direction?1:-1)},startAt:function(a){this.currentIndex=a;this.setNextIndex();return this},update:function(a){Na.prototype.update.call(this,a);if(!(0>this.nextIndex||null==this.target)){if(this.isTargetAtNext(a)&&(this.nodeReached(),0>this.nextIndex))return;
this.updateTarget(a)}},isTargetAtNext:function(a){throw J.thrown("isTargetAtNext is not implemented");},updateTarget:function(a){},get_totalNodes:function(){return null!=this.nodes?this.nodes.length:0},get_finished:function(){return 0>this.nextIndex},get_current:function(){return null!=this.nodes&&0<=this.currentIndex?this.nodes[this.currentIndex]:null},get_next:function(){return null!=this.nodes&&0<=this.nextIndex?this.nodes[this.nextIndex]:null},getCameras:function(){return null!=this._cameras?
this._cameras:null!=this.get_container()?this.get_container().getCameras():null!=this.target?this.target.getCameras():jb._defaultCameras},__class__:Wf,__properties__:x(Na.prototype.__properties__,{get_next:"get_next",get_current:"get_current",get_finished:"get_finished",get_totalNodes:"get_totalNodes"})});var Zn=function(a,b,c,d,f,g,k,l){this.startSize=this.endSize=5;this.nodeSize=3;this.lineSize=1;this.endColor=-65536;this.startColor=-16744448;this.lineColor=this.nodeColor=-1;null!=a&&(this.lineColor=
a);null!=b&&(this.nodeColor=b);null!=c&&(this.startColor=c);null!=d&&(this.endColor=d);null!=f&&(this.lineSize=f);null!=g&&(this.nodeSize=g);null!=k&&(this.startSize=k);null!=l&&(this.endSize=l)};h["flixel.path.FlxPathDrawData"]=Zn;Zn.__name__="flixel.path.FlxPathDrawData";Zn.prototype={lineColor:null,nodeColor:null,startColor:null,endColor:null,lineSize:null,nodeSize:null,startSize:null,endSize:null,__class__:Zn};var xh=G["flixel.path.FlxPathAnchorMode"]={__ename__:"flixel.path.FlxPathAnchorMode",
__constructs__:null,TOP_LEFT:{_hx_name:"TOP_LEFT",_hx_index:0,__enum__:"flixel.path.FlxPathAnchorMode",toString:t},CENTER:{_hx_name:"CENTER",_hx_index:1,__enum__:"flixel.path.FlxPathAnchorMode",toString:t},ORIGIN:{_hx_name:"ORIGIN",_hx_index:2,__enum__:"flixel.path.FlxPathAnchorMode",toString:t},CUSTOM:(n=function(a){return{_hx_index:3,offset:a,__enum__:"flixel.path.FlxPathAnchorMode",toString:t}},n._hx_name="CUSTOM",n.__params__=["offset"],n)};xh.__constructs__=[xh.TOP_LEFT,xh.CENTER,xh.ORIGIN,xh.CUSTOM];
var sk=function(){};h["flixel.path._FlxPath.AnchorTools"]=sk;sk.__name__="flixel.path._FlxPath.AnchorTools";sk.computeAnchor=function(a,b,c){c=sk.computeAnchorOffset(a,b,c);a=b.x;b=b.y;null==b&&(b=0);null==a&&(a=0);c.set_x(c.x+a);c.set_y(c.y+b);return c};sk.computeAnchorOffset=function(a,b,c){if(null==c){var d=0,f=0;null==f&&(f=0);null==d&&(d=0);c=N.pool.get().set(d,f);c._inPool=!1}else c.set_x(0),c.set_y(0);switch(a._hx_index){case 0:return c;case 1:return d=.5*b.get_width(),f=.5*b.get_height(),
null==f&&(f=0),null==d&&(d=0),c.set_x(c.x+d),c.set_y(c.y+f),c;case 2:return b instanceof R&&(d=na.__cast(b,R).origin.x,f=na.__cast(b,R).origin.y,null==f&&(f=0),null==d&&(d=0),c.set_x(c.x+d),c.set_y(c.y+f)),c;case 3:return a=a.offset,d=a.x,f=a.y,null==f&&(f=0),null==d&&(d=0),c.set_x(c.x+d),c.set_y(c.y+f),a._weak&&a.put(),c}};var $d=function(a){this._firstUpdate=!1;this._wasObjectImmovable=null;this.axes=17;this.angleOffset=0;this.autoRotate=!1;this.centerMode=xh.CENTER;this.angle=0;this.immovable=
!1;this.speed=0;var b=this;Wf.call(this,null!=a?a.slice():[]);this.set_active(!1);this.onEndReached.add(function(a){if(null!=b.onComplete)b.onComplete(b)})};h["flixel.path.FlxPath"]=$d;$d.__name__="flixel.path.FlxPath";$d.__super__=Wf;$d.prototype=x(Wf.prototype,{speed:null,immovable:null,angle:null,centerMode:null,autoRotate:null,angleOffset:null,onComplete:null,axes:null,_wasObjectImmovable:null,_firstUpdate:null,reset:function(){this.centerMode=xh.CENTER;return this},setProperties:function(a,b,
c){null==c&&(c=!1);null==b&&(b=0);null==a&&(a=100);this.speed=Math.abs(a);this.set__mode(b);this.autoRotate=c;return this},start:function(a,b,c,d,f){null==f&&(f=!1);null==d&&(d=!1);null==c&&(c=0);null==b&&(b=100);null!=a&&(this.nodes=f?a:a.slice());this.setProperties(b,c,d);0<this.nodes.length&&this.restart();return this},restart:function(){Wf.prototype.restart.call(this);this.set_active(0<this.nodes.length);return this},setNode:function(a){this.startAt(a);return this},computeCenter:function(a){return sk.computeAnchor(this.centerMode,
this.get_object(),a)},isTargetAtNext:function(a){var b=0,c=0;null==c&&(c=0);null==b&&(b=0);b=N.pool.get().set(b,c);b._inPool=!1;b=this.computeCenter(b);c=(null!=this.nodes&&0<=this.nextIndex?this.nodes[this.nextIndex]:null).x-b.x;var d=(null!=this.nodes&&0<=this.nextIndex?this.nodes[this.nextIndex]:null).y-b.y;b.put();return 1==this.axes?(0<c?c:-c)<this.speed*a:16==this.axes?(0<d?d:-d)<this.speed*a:Math.sqrt(c*c+d*d)<this.speed*a},updateTarget:function(a){this._firstUpdate&&(this.immovable&&(this._wasObjectImmovable=
this.get_object().immovable,this.get_object().set_immovable(!0)),this._firstUpdate=!1);if(0!=this.speed){$d._point=this.computeCenter($d._point);a=null!=this.nodes&&0<=this.nextIndex?this.nodes[this.nextIndex]:null;var b=$d._point;b=1E-7>=Math.abs(b.x-a.x)&&1E-7>=Math.abs(b.y-a.y);a._weak&&a.put();b?(a=this.get_object().velocity,a.set_x(0),a.set_y(0)):this.calculateVelocity(a,1==this.axes,16==this.axes);this.autoRotate&&(this.get_object().angularVelocity=0,this.get_object().angularAcceleration=0,
this.get_object().set_angle(this.angle+this.angleOffset))}},calculateVelocity:function(a,b,c){if(b||$d._point.y==a.y)this.get_object().velocity.set_x($d._point.x<a.x?this.speed:-this.speed),this.angle=0>this.get_object().velocity.x?180:0,b||this.get_object().velocity.set_y(0);else if(c||$d._point.x==a.x)this.get_object().velocity.set_y($d._point.y<a.y?this.speed:-this.speed),this.angle=0>this.get_object().velocity.y?-90:90,c||this.get_object().velocity.set_x(0);else{b=this.get_object().velocity;c=
a.x;var d=a.y;null==d&&(d=0);null==c&&(c=0);b.set_x(c);b.set_y(d);a._weak&&a.put();a=$d._point;c=a.x;d=a.y;null==d&&(d=0);null==c&&(c=0);b.set_x(b.x-c);b.set_y(b.y-d);a._weak&&a.put();a=this.speed;1E-7>Math.abs(b.x)&&1E-7>Math.abs(b.y)||(c=Mb.get_radians(b),b.set_x(a*Math.cos(c)),b.set_y(a*Math.sin(c)));this.angle=Mb.get_radians(b)*(180/Math.PI)}},advancePath:function(a){this.advance();return null!=this.nodes&&0<=this.currentIndex?this.nodes[this.currentIndex]:null},advance:function(){var a=this.axes;
if(1==a||17==a)switch(a=null!=this.nodes&&0<=this.nextIndex?this.nodes[this.nextIndex]:null,this.get_object().set_x(a.x),a=this.centerMode,a._hx_index){case 1:a=this.get_object();a.set_x(a.x-.5*this.get_object().get_width());break;case 2:this.get_object()instanceof R&&(a=this.get_object(),a.set_x(a.x-this.get_object().origin.x));break;case 3:var b=a.offset;a=this.get_object();a.set_x(a.x-b.x)}a=this.axes;if(16==a||17==a)switch(a=null!=this.nodes&&0<=this.nextIndex?this.nodes[this.nextIndex]:null,
this.get_object().set_y(a.y),a=this.centerMode,a._hx_index){case 1:a=this.get_object();a.set_y(a.y-.5*this.get_object().get_height());break;case 2:this.get_object()instanceof R&&(a=this.get_object(),a.set_y(a.y-this.get_object().origin.y));break;case 3:b=a.offset,a=this.get_object(),a.set_y(a.y-b.y)}Wf.prototype.advance.call(this)},cancel:function(){this.onEnd();if(null!=this.get_object()){var a=this.get_object().velocity,b=0,c=0;null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c)}return this},onEnd:function(){this.set_active(!1);
null!=this._wasObjectImmovable&&this.get_object().set_immovable(this._wasObjectImmovable);this._wasObjectImmovable=null},add:function(a,b){var c=this.nodes;null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);a=N.pool.get().set(a,b);a._inPool=!1;c.push(a);return this},addAt:function(a,b,c){if(0>c)return this;var d=this.nodes;null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);a=N.pool.get().set(a,b);a._inPool=!1;d.splice(c,0,a);return this},addPoint:function(a,b){null==b&&(b=!1);if(b)this.nodes.push(a);
else{b=this.nodes;var c=a.x;a=a.y;null==a&&(a=0);null==c&&(c=0);null==a&&(a=0);null==c&&(c=0);a=N.pool.get().set(c,a);a._inPool=!1;b.push(a)}return this},addPointAt:function(a,b,c){null==c&&(c=!1);if(0>b)return this;if(c)this.nodes.splice(b,0,a);else{c=this.nodes;var d=a.x;a=a.y;null==a&&(a=0);null==d&&(d=0);null==a&&(a=0);null==d&&(d=0);a=N.pool.get().set(d,a);a._inPool=!1;c.splice(b,0,a)}return this},remove:function(a){a=this.nodes.indexOf(a);return 0<=a?this.nodes.splice(a,1)[0]:null},removeAt:function(a){if(0>=
this.nodes.length)return null;a>=this.nodes.length-1&&this.nodes.pop();return this.nodes.splice(a,1)[0]},head:function(){return 0<this.nodes.length?this.nodes[0]:null},tail:function(){return 0<this.nodes.length?this.nodes[this.nodes.length-1]:null},get_nodeIndex:function(){return this.nextIndex},set_immovable:function(a){if(this._firstUpdate||0>this.nextIndex||a==this.immovable)return this.immovable=a;a?(this._wasObjectImmovable=this.get_object().immovable,this.get_object().set_immovable(!0)):null!=
this._wasObjectImmovable&&(this.get_object().set_immovable(this._wasObjectImmovable),this._wasObjectImmovable=null);return this.immovable=a},set_autoCenter:function(a){this.centerMode=a?xh.CENTER:xh.TOP_LEFT;return a},get_autoCenter:function(){return 1==this.centerMode._hx_index?!0:!1},get__inc:function(){return this.direction?1:-1},set__inc:function(a){this.direction=0>a?!1:!0;return a},get__mode:function(){var a=1==this.direction;switch(this.loopType){case 0:return a?0:1;case 16:return a?16:256;
case 4096:return 4096}},set__mode:function(a){switch(a){case 0:case 1:var b=0;break;case 16:case 256:b=16;break;case 4096:b=4096}this.loopType=b;switch(a){case 0:case 16:b=!0;break;case 1:case 256:b=!1;break;case 4096:b=this.direction}this.direction=b;return a},get_object:function(){return this.target},set_object:function(a){return this.target=a},__class__:$d,__properties__:x(Wf.prototype.__properties__,{set_object:"set_object",get_object:"get_object",set__inc:"set__inc",get__inc:"get__inc",set__mode:"set__mode",
get__mode:"get__mode",get_nodeIndex:"get_nodeIndex",set_autoCenter:"set_autoCenter",get_autoCenter:"get_autoCenter",set_immovable:"set_immovable"})});var Wi=function(a){this.createData=a};h["flixel.path.FlxTypedPathfinder"]=Wi;Wi.__name__="flixel.path.FlxTypedPathfinder";Wi.prototype={createData:null,findPath:function(a,b,c,d){null==d&&(d=Qg.LINE);var f=b.y,g=a.getColumnAt(b.x);f=a.getRowAt(f);var k=0<=g&&g<a.widthInTiles&&0<=f&&f<a.heightInTiles?f*a.widthInTiles+g:-1;f=c.y;g=a.getColumnAt(c.x);f=
a.getRowAt(f);a=this.createData(a,k,0<=g&&g<a.widthInTiles&&0<=f&&f<a.heightInTiles?f*a.widthInTiles+g:-1);g=this.findPathIndicesHelper(a);if(null==g)return null;g=this.getPathPointsFromIndices(a,g);k=g[0];f=b.x;var l=b.y;null==l&&(l=0);null==f&&(f=0);k.set_x(f);k.set_y(l);b._weak&&b.put();k=g[g.length-1];f=c.x;l=c.y;null==l&&(l=0);null==f&&(f=0);k.set_x(f);k.set_y(l);b=c;b._weak&&b.put();g=this.simplifyPath(a,g,d);a.destroy();return g},findPathIndices:function(a,b,c){a=this.createData(a,b,c);b=this.findPathIndicesHelper(a);
a.destroy();return b},findPathIndicesHelper:function(a){this.compute(a);return a.foundEnd?a.getPathIndicesTo(a.endIndex):null},getPathPointsFromIndices:function(a,b){for(var c=Array(b.length),d=0,f=b.length;d<f;){var g=d++,k=b[g],l=a.map,m=!0;null==m&&(m=!1);if(0<=k&&k<l._data.length){var z=k/l.widthInTiles|0;null==m&&(m=!1);k=l.getColumnPos(k%l.widthInTiles,m);l=l.getRowPos(z,m);null==l&&(l=0);null==k&&(k=0);z=k;null==l&&(l=0);null==z&&(z=0);l=N.pool.get().set(z,l);l._inPool=!1}else l=null;c[g]=
l}return c},simplifyPath:function(a,b,c){switch(c._hx_index){case 1:this.simplifyLine(a,b);break;case 2:this.simplifyRay(a,b);break;case 3:this.simplifyRayStep(a,b,c.resolution);break;case 4:this.simplifyRayBox(a,b,c.width,c.height);break;case 5:c=c.method,b=c(a,b)}return b},simplifyLine:function(a,b){for(a=b.length-1;1<a--;){var c=b[a],d=b[a+1],f=b[a-1],g=(c.x-f.x)/(c.y-f.y),k=(c.x-d.x)/(c.y-d.y);f.x!=d.x&&f.y!=d.y&&g!=k||y.remove(b,c)}},simplifyRay:function(a,b){var c=0,d=0;null==d&&(d=0);null==
c&&(c=0);c=N.pool.get().set(c,d);c._inPool=!1;for(d=1;d<b.length-1;)a.map.ray(b[d-1],b[d+1],c)?y.remove(b,b[d]):++d;c.put()},simplifyRayBox:function(a,b,c,d){--c;--d;var f=0,g=0;null==g&&(g=0);null==f&&(f=0);var k=N.pool.get().set(f,g);k._inPool=!1;var l=k;g=f=0;null==g&&(g=0);null==f&&(f=0);k=N.pool.get().set(f,g);k._inPool=!1;for(var m=1;m<b.length-1;){var z=b[m-1];f=z.x;g=z.y;null==g&&(g=0);null==f&&(f=0);l.set_x(f);l.set_y(g);f=z;f._weak&&f.put();f=l;g=c/2;z=d/2;null==z&&(z=0);null==g&&(g=0);
f.set_x(f.x-g);f.set_y(f.y-z);f=b[m+1];g=f.x;z=f.y;null==z&&(z=0);null==g&&(g=0);k.set_x(g);k.set_y(z);f._weak&&f.put();f=k;g=c/2;z=d/2;null==z&&(z=0);null==g&&(g=0);f.set_x(f.x-g);f.set_y(f.y-z);a.map.ray(l,k)?(f=a.map,g=c,z=0,null==z&&(z=0),null==g&&(g=0),l.set_x(l.x+g),l.set_y(l.y+z),g=c,z=0,null==z&&(z=0),null==g&&(g=0),k.set_x(k.x+g),k.set_y(k.y+z),f=f.ray(l,k)):f=!1;f?(f=a.map,g=0,z=d,null==z&&(z=0),null==g&&(g=0),l.set_x(l.x+g),l.set_y(l.y+z),g=0,z=d,null==z&&(z=0),null==g&&(g=0),k.set_x(k.x+
g),k.set_y(k.y+z),f=f.ray(l,k)):f=!1;f?(f=a.map,g=-c,z=0,null==z&&(z=0),null==g&&(g=0),l.set_x(l.x+g),l.set_y(l.y+z),g=-c,z=0,null==z&&(z=0),null==g&&(g=0),k.set_x(k.x+g),k.set_y(k.y+z),f=f.ray(l,k)):f=!1;f?y.remove(b,b[m]):++m}l.put();k.put()},simplifyRayStep:function(a,b,c){var d=0,f=0;null==f&&(f=0);null==d&&(d=0);d=N.pool.get().set(d,f);d._inPool=!1;for(f=1;f<b.length-1;)a.map.rayStep(b[f-1],b[f+1],d,c)?y.remove(b,b[f]):++f;d.put()},computePathData:function(a,b,c,d){null==d&&(d=!0);return this.compute(this.createData(a,
b,c),d)},compute:function(a,b){null==b&&(b=!0);if(!this.hasValidInitialData(a))return null;for(var c=[a.startIndex];0<c.length;){for(var d=[],f=0;f<c.length;){var g=c[f];++f;for(var k=this.getNeighbors(a,g),l=a.distances[g],m=0;m<k.length;){var z=k[m];++m;var h=a.distances[z];if(!(-1!=h&&l>=h)){var p=l+this.getDistance(a,g,z);if(-1==h||p<h)a.distances[z]=p,a.moves[z]=g,d.push(z)}}}for(c=0;c<d.length;)f=d[c],++c,this.isTileSolved(a,f)&&a.excluded.push(f);a.foundEnd=this.isComplete(a);if(b&&a.foundEnd)break;
c=d}return a},getNeighbors:function(a,b){throw J.thrown("FlxTilemapPathPolicy.getNeighbors should not be called, It must be overriden in derived classes");},getDistance:function(a,b,c){throw J.thrown("FlxTilemapPathPolicy.getDistance should not be called, It must be overriden in derived classes");},isComplete:function(a){return-1!=a.moves[a.endIndex]},isTileSolved:function(a,b){return!0},hasValidInitialData:function(a){if(a.hasValidStartEnd()){var b=a.startIndex;var c=a.map;b=0==c._tileObjects[0<=
b&&b<c._data.length?c._data[b]:-1].allowCollisions}else b=!1;return b?(b=a.endIndex,c=a.map,0==c._tileObjects[0<=b&&b<c._data.length?c._data[b]:-1].allowCollisions):!1},__class__:Wi};var tk=function(a){null==a&&(a=0);Wi.call(this,function(a,c,d){return new Jm(a,c,d)});this.diagonalPolicy=a};h["flixel.path.FlxDiagonalPathfinder"]=tk;tk.__name__="flixel.path.FlxDiagonalPathfinder";tk.__super__=Wi;tk.prototype=x(Wi.prototype,{diagonalPolicy:null,getNeighbors:function(a,b){var c=this,d=[],f=this.getInBoundDirections(a,
b),g=256,k=(f&g)==g;g=4096;var l=(f&g)==g;g=1;var m=(f&g)==g;g=16;f=(f&g)==g;g=function(b,f,g){(b=b&&-1==a.excluded.indexOf(f)&&c.canGo(a,f,g))&&d.push(f);return b};var z=a.map.widthInTiles;k=g(k,b-z,256);l=g(l,b+z,4096);m=g(m,b-1,1);f=g(f,b+1,16);0!=this.diagonalPolicy&&(g(k&&m,b-z-1,257),g(k&&f,b-z+1,272),g(l&&m,b+z-1,4097),g(l&&f,b+z+1,4112));return d},getInBoundDirections:function(a,b){var c=b%a.map.widthInTiles;b=b/a.map.widthInTiles|0;return Ef.fromBools(0<c,c<a.map.widthInTiles-1,0<b,b<a.map.heightInTiles-
1)},canGo:function(a,b,c){a=a.map;return 0==a._tileObjects[0<=b&&b<a._data.length?a._data[b]:-1].allowCollisions},getDistance:function(a,b,c){if(0!=this.diagonalPolicy&&b%a.map.widthInTiles!=c%a.map.widthInTiles&&(b/a.map.widthInTiles|0)!=(c/a.map.widthInTiles|0))switch(this.diagonalPolicy){case 0:return 0;case 2:return 2}return 1},__class__:tk});var Jm=function(a,b,c){this.map=a;for(var d=[],f=0,g=a.totalTiles;f<g;)f++,d.push(-1);this.distances=d;this.distances[b]=0;d=[];f=0;for(g=a.totalTiles;f<
g;)f++,d.push(-1);this.moves=d;this.excluded=[b];this.startIndex=b;this.endIndex=c};h["flixel.path.FlxTypedPathfinderData"]=Jm;Jm.__name__="flixel.path.FlxTypedPathfinderData";Jm.prototype={startIndex:null,endIndex:null,map:null,distances:null,moves:null,excluded:null,foundEnd:null,getPathIndicesTo:function(a){if(a==this.startIndex)return[this.startIndex,a];if(-1==this.moves[a])return null;for(var b=[];-1!=a;)b.unshift(a),a=this.moves[a];b[0]!=this.startIndex&&u.log.advanced("getPathIndices ended up somewhere other than the start",
La.ERROR,!0);return b},getPathIndices:function(){return this.getPathIndicesTo(this.endIndex)},hasValidStartEnd:function(){var a=this.startIndex;return 0<=a&&a<this.map._data.length?(a=this.endIndex,0<=a?a<this.map._data.length:!1):!1},destroy:function(){this.excluded=this.moves=this.distances=this.map=null},isExcluded:function(a){return-1!=this.excluded.indexOf(a)},getX:function(a){return a%this.map.widthInTiles},getY:function(a){return a/this.map.widthInTiles|0},getTileCollisionsByIndex:function(a){var b=
this.map;return b._tileObjects[0<=a&&a<b._data.length?b._data[a]:-1].allowCollisions},__class__:Jm};var Qg=G["flixel.path.FlxPathSimplifier"]={__ename__:"flixel.path.FlxPathSimplifier",__constructs__:null,NONE:{_hx_name:"NONE",_hx_index:0,__enum__:"flixel.path.FlxPathSimplifier",toString:t},LINE:{_hx_name:"LINE",_hx_index:1,__enum__:"flixel.path.FlxPathSimplifier",toString:t},RAY:{_hx_name:"RAY",_hx_index:2,__enum__:"flixel.path.FlxPathSimplifier",toString:t},RAY_STEP:(n=function(a){return{_hx_index:3,
resolution:a,__enum__:"flixel.path.FlxPathSimplifier",toString:t}},n._hx_name="RAY_STEP",n.__params__=["resolution"],n),RAY_BOX:(n=function(a,b){return{_hx_index:4,width:a,height:b,__enum__:"flixel.path.FlxPathSimplifier",toString:t}},n._hx_name="RAY_BOX",n.__params__=["width","height"],n),CUSTOM:(n=function(a){return{_hx_index:5,method:a,__enum__:"flixel.path.FlxPathSimplifier",toString:t}},n._hx_name="CUSTOM",n.__params__=["method"],n)};Qg.__constructs__=[Qg.NONE,Qg.LINE,Qg.RAY,Qg.RAY_STEP,Qg.RAY_BOX,
Qg.CUSTOM];var ci=function(){this._alreadyPaused=!1;this._pitch=this._volumeAdjust=1;this.loopTime=this._time=this._length=0;Na.call(this);this.reset()};h["flixel.sound.FlxSound"]=ci;ci.__name__="flixel.sound.FlxSound";ci.__super__=Na;ci.prototype=x(Na.prototype,{x:null,y:null,persist:null,name:null,artist:null,amplitude:null,amplitudeLeft:null,amplitudeRight:null,autoDestroy:null,onComplete:null,group:null,looped:null,loopTime:null,endTime:null,fadeTween:null,_sound:null,_channel:null,_transform:null,
_paused:null,_volume:null,_time:null,_length:null,_pitch:null,_volumeAdjust:null,_target:null,_radius:null,_proximityPan:null,_alreadyPaused:null,reset:function(){this.destroy();this._time=this.y=this.x=0;this._paused=!1;this._volumeAdjust=this._volume=1;this.looped=!1;this.endTime=this.loopTime=0;this._target=null;this._radius=0;this._proximityPan=!1;this.set_visible(!1);this.amplitudeRight=this.amplitudeLeft=this.amplitude=0;this.autoDestroy=!1;null==this._transform&&(this._transform=new gf);this._transform.pan=
0},destroy:function(){null!=this.group&&this.group.remove(this);this._transform=null;this.set_exists(!1);this.set_active(!1);this.artist=this.name=this._target=null;null!=this._channel&&(this._channel.removeEventListener("soundComplete",q(this,this.stopped)),this._channel.stop(),this._channel=null);null!=this._sound&&(this._sound.removeEventListener("id3",q(this,this.gotID3)),this._sound=null);this.onComplete=null;Na.prototype.destroy.call(this)},update:function(a){if(null!=this._channel){this._time=
this._channel.get_position();var b=1;if(null!=this._target){a=this._target.getPosition();b=this.x;var c=this.y;null==c&&(c=0);null==b&&(b=0);null==c&&(c=0);null==b&&(b=0);null==c&&(c=0);null==b&&(b=0);b=N.pool.get().set(b,c);b._inPool=!1;b._weak=!0;b=Mb.distanceTo(a,b)/this._radius;a.put();a=0>b?0:b;b=1-(1<a?1:a);this._proximityPan&&(a=(this.x-this._target.x)/this._radius,a=-1>a?-1:a,this._transform.pan=1<a?1:a)}this._volumeAdjust=b;this.updateTransform();0<this._transform.volume?(this.amplitudeLeft=
this._channel.leftPeak/this._transform.volume,this.amplitudeRight=this._channel.rightPeak/this._transform.volume,this.amplitude=.5*(this.amplitudeLeft+this.amplitudeRight)):this.amplitude=this.amplitudeRight=this.amplitudeLeft=0;null!=this.endTime&&this._time>=this.endTime&&this.stopped()}},kill:function(){Na.prototype.kill.call(this);this.cleanup(!1)},loadEmbedded:function(a,b,c,d){null==c&&(c=!1);null==b&&(b=!1);if(null==a)return this;this.cleanup(!0);a instanceof ne?this._sound=a:na.__instanceof(a,
$e)?this._sound=w.createInstance(a,[]):"string"==typeof a&&(u.assets.exists(a,"sound")?this._sound=u.assets.getAssetUnsafe(a,"sound",!0):u.log.advanced("Could not find a Sound asset with an ID of '"+a+"'.",La.ERROR,!0));return this.init(b,c,d)},loadStream:function(a,b,c,d,f){null==c&&(c=!1);null==b&&(b=!1);var g=this;this.cleanup(!0);this._sound=new ne;this._sound.addEventListener("id3",q(this,this.gotID3));var k=null;k=function(a){a.target.removeEventListener(a.type,k);Bd.__eq(g._sound,a.target)&&
(g._length=g._sound.get_length(),null!=f&&f())};this._sound.addEventListener("complete",k,!1,0,!0);this._sound.load(new qh(a));return this.init(b,c,d)},init:function(a,b,c){null==b&&(b=!1);null==a&&(a=!1);this.looped=a;this.autoDestroy=b;this.updateTransform();this.set_exists(!0);this.onComplete=c;this.set_pitch(1);this.endTime=this._length=null==this._sound?0:this._sound.get_length();return this},proximity:function(a,b,c,d,f){null==f&&(f=!0);this.x=a;this.y=b;this._target=c;this._radius=d;this._proximityPan=
f;return this},play:function(a,b,c){null==b&&(b=0);null==a&&(a=!1);if(!this.exists)return this;if(a)this.cleanup(!1,!0);else if(null!=this._channel)return this;this._paused?this.resume():this.startSound(b);this.endTime=c;return this},resume:function(){this._paused&&this.startSound(this._time);return this},pause:function(){if(null==this._channel)return this;this._time=this._channel.get_position();this._paused=!0;this.cleanup(!1,!1);return this},stop:function(){this.cleanup(this.autoDestroy,!0);return this},
fadeOut:function(a,b,c){null==b&&(b=0);null==a&&(a=1);null!=this.fadeTween&&this.fadeTween.cancel();this.fadeTween=Ma.num(this._volume,b,a,{onComplete:c},q(this,this.volumeTween));return this},fadeIn:function(a,b,c,d){null==c&&(c=1);null==b&&(b=0);null==a&&(a=1);null==this._channel&&this.play();null!=this.fadeTween&&this.fadeTween.cancel();this.fadeTween=Ma.num(b,c,a,{onComplete:d},q(this,this.volumeTween));return this},volumeTween:function(a){this.set_volume(a)},getActualVolume:function(){return this._volume*
this._volumeAdjust},setPosition:function(a,b){null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b},updateTransform:function(){this._transform.volume=(u.sound.muted?0:1)*u.sound.volume*(null!=this.group?this.group.volume:1)*this._volume*this._volumeAdjust;null!=this._channel&&this._channel.set_soundTransform(this._transform)},startSound:function(a){null!=this._sound&&(this._time=a,this._paused=!1,this._channel=this._sound.play(this._time,0,this._transform),null!=this._channel?(this.set_pitch(this._pitch),
this._channel.addEventListener("soundComplete",q(this,this.stopped)),this.set_active(!0)):(this.set_exists(!1),this.set_active(!1)))},stopped:function(a){if(null!=this.onComplete)this.onComplete();this.looped?(this.cleanup(!1),this.play(!1,this.loopTime,this.endTime)):this.cleanup(this.autoDestroy)},cleanup:function(a,b){null==b&&(b=!0);a?this.reset():(null!=this._channel&&(this._channel.removeEventListener("soundComplete",q(this,this.stopped)),this._channel.stop(),this._channel=null),this.set_active(!1),
b&&(this._time=0,this._paused=!1))},gotID3:function(a){this.name=this._sound.get_id3().songName;this.artist=this._sound.get_id3().artist;this._sound.removeEventListener("id3",q(this,this.gotID3))},onFocus:function(){this._alreadyPaused||this.resume()},onFocusLost:function(){this._alreadyPaused=this._paused;this.pause()},set_group:function(a){null!=a?a.add(this):this.group.remove(this);return a},get_playing:function(){return null!=this._channel},get_volume:function(){return this._volume},set_volume:function(a){var b=
0>a?0:a;this._volume=1<b?1:b;this.updateTransform();return a},get_pitch:function(){return this._pitch},set_pitch:function(a){null!=this._channel&&null!=this._channel.__audioSource&&this._channel.__audioSource.set_pitch(a);return this._pitch=a},get_pan:function(){return this._transform.pan},set_pan:function(a){this._transform.pan=a;this.updateTransform();return a},get_time:function(){return this._time},set_time:function(a){null!=this._channel&&(this.cleanup(!1,!0),this.startSound(a));return this._time=
a},get_length:function(){return this._length},toString:function(){var a=null!=this._channel,b=Ua._pool.get();b.label="playing";b.value=a;a=this._time;var c=Ua._pool.get();c.label="time";c.value=a;a=this._length;var d=Ua._pool.get();d.label="length";d.value=a;a=this._volume;var f=Ua._pool.get();f.label="volume";f.value=a;return ab.getDebugString([b,c,d,f])},__class__:ci,__properties__:x(Na.prototype.__properties__,{set_group:"set_group",get_length:"get_length",set_time:"set_time",get_time:"get_time",
set_pitch:"set_pitch",get_pitch:"get_pitch",set_volume:"set_volume",get_volume:"get_volume",get_playing:"get_playing",set_pan:"set_pan",get_pan:"get_pan"})});var uk=function(a){null==a&&(a=1);this.sounds=[];this.set_volume(a)};h["flixel.sound.FlxSoundGroup"]=uk;uk.__name__="flixel.sound.FlxSoundGroup";uk.prototype={sounds:null,volume:null,add:function(a){return-1==this.sounds.indexOf(a)?(null!=a.group&&y.remove(a.group.sounds,a),this.sounds.push(a),a.group=this,a.updateTransform(),!0):!1},remove:function(a){return-1!=
this.sounds.indexOf(a)?(a.group=null,y.remove(this.sounds,a),a.updateTransform(),!0):!1},pause:function(){for(var a=0,b=this.sounds;a<b.length;){var c=b[a];++a;c.pause()}},resume:function(){for(var a=0,b=this.sounds;a<b.length;){var c=b[a];++a;c.resume()}},set_volume:function(a){this.volume=a;for(var b=0,c=this.sounds;b<c.length;){var d=c[b];++b;d.updateTransform()}return a},__class__:uk,__properties__:{set_volume:"set_volume"}};var hf=function(a,b,c,d,f){null==d&&(d=-1);null==c&&(c=!0);ma.call(this,
0,0,c,d);if(null!=hf.preload)this.__fromImage(hf.preload);else{var g=this;Eb.loadFromBase64(df.getString(hf.resourceName),hf.resourceType).then(function(a){g.__fromImage(a);return ob.withValue(g)}).onComplete(function(a){null==hf.preload&&(hf.preload=a.image);null!=f&&la.isFunction(f)&&f(a)})}};h["flixel.system.GraphicLogo"]=hf;hf.__name__="flixel.system.GraphicLogo";hf.preload=null;hf.__super__=ma;hf.prototype=x(ma.prototype,{__class__:hf});var Le=function(a,b,c,d,f){null==d&&(d=-1);null==c&&(c=
!0);ma.call(this,0,0,c,d);if(null!=Le.preload)this.__fromImage(Le.preload);else{var g=this;Eb.loadFromBase64(df.getString(Le.resourceName),Le.resourceType).then(function(a){g.__fromImage(a);return ob.withValue(g)}).onComplete(function(a){null==Le.preload&&(Le.preload=a.image);null!=f&&la.isFunction(f)&&f(a)})}};h["flixel.system.GraphicVirtualInput"]=Le;Le.__name__="flixel.system.GraphicVirtualInput";Le.preload=null;Le.__super__=ma;Le.prototype=x(ma.prototype,{__class__:Le});var bb=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"]=bb;bb.__name__="haxe.io.Bytes";bb.alloc=function(a){return new bb(new ArrayBuffer(a))};bb.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 bb((new Uint8Array(b)).buffer)};
bb.ofData=function(a){var b=a.hxBytes;return null!=b?b:new bb(a)};bb.ofHex=function(a){if(0!=(a.length&1))throw J.thrown("Not a hex string (odd number of digits)");for(var b=[],c=0,d=a.length>>1;c<d;){var f=a.charCodeAt(2*c),g=a.charCodeAt(2*c+1);f=(f&15)+9*((f&64)>>6);g=(g&15)+9*((g&64)>>6);b.push((f<<4|g)&255);++c}return new bb((new Uint8Array(b)).buffer)};bb.fastGet=function(a,b){return a.bytes[b]};bb.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 J.thrown(oe.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 J.thrown(oe.OutsideBounds);return new bb(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,f=this.length<a.length?this.length:a.length;d<
f;){var g=d++;if(b[g]!=c[g])return b[g]-c[g]}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 Gb(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 J.thrown(oe.OutsideBounds);c="";var d=this.b,f=oh.fromCharCode,g=a;for(a+=b;g<a;)if(b=d[g++],128>b){if(0==b)break;c+=f(b)}else if(224>b)c+=f((b&63)<<6|d[g++]&127);else if(240>b){var k=d[g++];c+=f((b&31)<<12|(k&127)<<6|d[g++]&127)}else{k=d[g++];var l=d[g++];b=(b&15)<<18|(k&127)<<12|(l&127)<<6|d[g++]&127;c+=f((b>>10)+55232);c+=f(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,d=16;c<d;){var f=c++;b.push(y.cca("0123456789abcdef",f))}c=0;for(d=this.length;c<d;)f=c++,f=this.b[f],a+=String.fromCodePoint(b[f>>4]),a+=String.fromCodePoint(b[f&15]);return a},getData:function(){return this.b.bufferValue},__class__:bb};var vk=function(){};h["openfl.utils.IDataOutput"]=vk;vk.__name__="openfl.utils.IDataOutput";vk.__isInterface__=!0;vk.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__:vk,__properties__:{set_endian:"set_endian",get_endian:"get_endian"}};var Xi=function(){};h["openfl.utils.IDataInput"]=Xi;Xi.__name__="openfl.utils.IDataInput";Xi.__isInterface__=!0;Xi.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__:Xi,__properties__:{set_endian:"set_endian",get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}};var Sb=function(a){null==a&&(a=0);var b=new bb(new ArrayBuffer(a));bb.call(this,b.b.buffer);this.__allocated=a;null==Sb.__defaultEndian&&(Fa.get_endianness()==Xf.LITTLE_ENDIAN?Sb.__defaultEndian=1:Sb.__defaultEndian=0);this.__endian=
Sb.__defaultEndian;this.objectEncoding=Sb.defaultObjectEncoding;this.position=0};h["openfl.utils.ByteArrayData"]=Sb;Sb.__name__="openfl.utils.ByteArrayData";Sb.__interfaces__=[vk,Xi];Sb.__properties__={set_defaultEndian:"set_defaultEndian",get_defaultEndian:"get_defaultEndian"};Sb.fromBytes=function(a){var b=new Sb;b.__fromBytes(a);return b};Sb.get_defaultEndian=function(){null==Sb.__defaultEndian&&(Fa.get_endianness()==Xf.LITTLE_ENDIAN?Sb.__defaultEndian=1:Sb.__defaultEndian=0);return Sb.__defaultEndian};
Sb.set_defaultEndian=function(a){return Sb.__defaultEndian=a};Sb.__super__=bb;Sb.prototype=x(bb.prototype,{objectEncoding:null,position:null,__endian:null,__allocated:null,__amf3Reader:null,clear:function(){this.position=this.length=0},compress:function(a){null==a&&(a=2);if(this.__allocated>this.length){var b=this.length;this.length=this.__allocated;var c=new bb(new ArrayBuffer(b));c.blit(0,this,0,b);this.b=c.b;this.__allocated=c.length;this.data=c.data;this.length=b}switch(a){case 0:a=Jd.compress(this,
Yf.DEFLATE);break;case 1:a=Jd.compress(this,Yf.LZMA);break;default:a=Jd.compress(this,Yf.ZLIB)}null!=a&&(this.b=a.b,this.__allocated=a.length,this.data=a.data,this.position=this.length=this.__allocated)},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 Zf;},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 Zf;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 Zf;this.position+=8;return this.getDouble(this.position-8)}var a=this.readInt(),b=this.readInt();return Yc.i64ToDouble(b,a)},readFloat:function(){if(1==this.__endian){if(this.position+4>this.length)throw new Zf;this.position+=4;return this.getFloat(this.position-
4)}return Yc.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},readInt64:function(){if(this.position+8>this.length)throw new Zf;if(1==this.__endian){var a=this.readUnsignedInt();var b=this.readUnsignedInt()}else b=this.readUnsignedInt(),a=this.readUnsignedInt();return new Gb(b,a)},readMultiByte:function(a,b){return this.readUTFBytes(a)},
readObject:function(){switch(this.objectEncoding){case 0:var a=new og(this,this.position),b=new wk(a);b=pe.unwrapValue(b.read());this.position=a.pos;return b;case 3:return a=new og(this,this.position),b=new xk(a,this.__amf3Reader),b=qb.decode(b.read()),this.position=a.pos,b;case 10:return b=this.readUTF(),Pd.run(b);case 12:return b=this.readUTF(),JSON.parse(b);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 Zf;},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 Zf;this.position+=a;return this.getString(this.position-a,a)},uncompress:function(a){null==a&&(a=2);if(this.__allocated>this.length){var b=this.length;this.length=this.__allocated;var c=new bb(new ArrayBuffer(b));c.blit(0,this,0,b);this.b=c.b;this.__allocated=c.length;this.data=c.data;this.length=b}switch(a){case 0:a=Jd.decompress(this,Yf.DEFLATE);break;case 1:a=Jd.decompress(this,Yf.LZMA);break;default:a=Jd.decompress(this,Yf.ZLIB)}null!=
a&&(this.b=a.b,this.__allocated=a.length,this.data=a.data,this.length=this.__allocated);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!=kb.get_length(a)&&(0==c&&(c=kb.get_length(a)-b),this.__resize(this.position+c),this.blit(this.position,a,b,c),this.position+=c)},writeDouble:function(a){a=Yc.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=Yc.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)},writeInt64:function(a){1==this.__endian?(this.writeUnsignedInt(a.low),this.writeUnsignedInt(a.high)):(this.writeUnsignedInt(a.high),this.writeUnsignedInt(a.low))},writeMultiByte:function(a,b){this.writeUTFBytes(a)},writeObject:function(a){switch(this.objectEncoding){case 0:a=pe.encode(a);var b=new Yi,c=new Km(b);c.write(a);this.writeBytes(kb.fromBytes(b.getBytes()));break;case 3:b=new Yi;c=new Lm(b);a instanceof Sb?c.write(Hb.AByteArray(a)):(a=qb.encode(a),
c.write(a));this.writeBytes(kb.fromBytes(b.getBytes()));break;case 10:a=Qd.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=bb.ofString(a);this.writeShort(a.length);this.writeBytes(kb.fromBytes(a))},writeUTFBytes:function(a){a=
bb.ofString(a);this.writeBytes(kb.fromBytes(a))},__fromBytes:function(a){this.b=a.b;this.__allocated=a.length;this.data=a.data;this.length=a.length},__resize:function(a){if(a>this.__allocated){var b=new bb(new ArrayBuffer(3*(a+1)>>1));if(0<this.__allocated){var c=this.length;this.length=this.__allocated;b.blit(0,this,0,this.__allocated);this.length=c}this.b=b.b;this.__allocated=b.length;this.data=b.data}this.length<a&&(this.length=a)},__setData:function(a){this.b=a.b;this.__allocated=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},get___length:function(){return this.length},set___length:function(a){return this.length=a},__class__:Sb,__properties__:{set___length:"set___length",get___length:"get___length",set_endian:"set_endian",get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}});var Zi=function(a){Sb.call(this);a=df.getBytes("__ASSET__:file_flixel_system_VirtualInputData");
this.__fromBytes(a)};h["flixel.system.VirtualInputData"]=Zi;Zi.__name__="flixel.system.VirtualInputData";Zi.__super__=Sb;Zi.prototype=x(Sb.prototype,{__class__:Zi});var Ro={getXml:function(a){if("string"==typeof a){if(u.assets.exists(a)){var b=!0;null==b&&(b=!0);a=u.assets.getAssetUnsafe(a,"text",b);return null!=a?X.parse(a):null}return X.parse(a)}return na.__cast(a,X)},fromPath:function(a){var b=!0;null==b&&(b=!0);a=u.assets.getAssetUnsafe(a,"text",b);return null!=a?X.parse(a):null},fromXmlString:function(a){return X.parse(a)}},
cp={getData:function(a){if("string"==typeof a){if(u.assets.exists(a)){var b=!0;null==b&&(b=!0);a=u.assets.getAssetUnsafe(a,"text",b);return null!=a?JSON.parse(a):null}return JSON.parse(a)}return a},fromPath:function(a){var b=!0;null==b&&(b=!0);a=u.assets.getAssetUnsafe(a,"text",b);return null!=a?JSON.parse(a):null},fromDataString:function(a){return JSON.parse(a)}},Ec=function(){};h["flixel.system.FlxAssets"]=Ec;Ec.__name__="flixel.system.FlxAssets";Ec.drawLogo=function(a){a.beginFill(47394);a.moveTo(50,
13);a.lineTo(51,13);a.lineTo(87,50);a.lineTo(87,51);a.lineTo(51,87);a.lineTo(50,87);a.lineTo(13,51);a.lineTo(13,50);a.lineTo(50,13);a.endFill();a.beginFill(16761138);a.moveTo(0,0);a.lineTo(25,0);a.lineTo(50,13);a.lineTo(13,50);a.lineTo(0,25);a.lineTo(0,0);a.endFill();a.beginFill(16066382);a.moveTo(100,0);a.lineTo(75,0);a.lineTo(51,13);a.lineTo(87,50);a.lineTo(100,25);a.lineTo(100,0);a.endFill();a.beginFill(3555839);a.moveTo(0,100);a.lineTo(25,100);a.lineTo(50,87);a.lineTo(13,51);a.lineTo(0,75);a.lineTo(0,
100);a.endFill();a.beginFill(314875);a.moveTo(100,100);a.lineTo(75,100);a.lineTo(51,87);a.lineTo(87,51);a.lineTo(100,75);a.lineTo(100,100);a.endFill()};Ec.getBitmapData=function(a){return u.assets.getAsset(a,"image",!1,null)};Ec.getBitmapFromClass=function(a){return w.createInstance(a,[])};Ec.resolveBitmapData=function(a){return a instanceof ma?a:na.__instanceof(a,$e)?w.createInstance(a,[]):"string"==typeof a?u.assets.getAsset(a,"image",!1,null):null};Ec.resolveKey=function(a,b){return null!=b||a instanceof
ma?b:na.__instanceof(a,$e)?a.__name__:"string"==typeof a?a:null};Ec.getSound=function(a){return Ec.getSoundAddExtension(a)};Ec.getSoundAddExtension=function(a,b){null==b&&(b=!0);O.endsWith(a,".mp3")||O.endsWith(a,".ogg")||O.endsWith(a,".wav")||(a+="."+Ec.defaultSoundExtension);null==b&&(b=!0);return u.assets.getAssetUnsafe(a,"sound",b)};Ec.getVirtualInputFrames=function(){var a=new Le(0,0);la.setProperty(a,"width",399);la.setProperty(a,"height",183);a=lc.fromBitmapData(a);return mc.fromSpriteSheetPacker(a,
M.string(new Zi))};var Pj=function(){R.call(this);this.makeGraphic(1,1,-1,!0,u.bitmap.getUniqueKey("bg_graphic_"));var a=this.scrollFactor;a.set_x(0);a.set_y(0)};h["flixel.system.FlxBGSprite"]=Pj;Pj.__name__="flixel.system.FlxBGSprite";Pj.__super__=R;Pj.prototype=x(R.prototype,{draw:function(){for(var a=0,b=this.getCamerasLegacy();a<b.length;){var c=b[a];++a;c.visible&&c.exists&&(this._matrix.identity(),this._matrix.scale(c.width-2*c.viewMarginX,c.height-2*c.viewMarginY),this._matrix.translate(c.viewMarginX,
c.viewMarginY),c.drawPixels(this.frame,null,this._matrix,this.colorTransform))}},__class__:Pj});var Rg=function(){Ka.call(this);this.addEventListener("addedToStage",q(this,this.onAddedToStage))};h["flixel.system._FlxBasePreloader.DefaultPreloader"]=Rg;Rg.__name__="flixel.system._FlxBasePreloader.DefaultPreloader";Rg.__super__=Ka;Rg.prototype=x(Ka.prototype,{onAddedToStage:function(a){this.removeEventListener("addedToStage",q(this,this.onAddedToStage));this.onInit();this.onUpdate(this.get_loaderInfo().bytesLoaded,
this.get_loaderInfo().bytesTotal);this.addEventListener("progress",q(this,this.onProgress));this.addEventListener("complete",q(this,this.onComplete))},onComplete:function(a){a.preventDefault();this.removeEventListener("progress",q(this,this.onProgress));this.removeEventListener("complete",q(this,this.onComplete));this.onLoaded()},onProgress:function(a){this.onUpdate(a.bytesLoaded|0,a.bytesTotal|0)},onInit:function(){},onLoaded:function(){this.dispatchEvent(new fa("unload"))},onUpdate:function(a,b){},
__class__:Rg});var rg=function(a,b){null==a&&(a=0);this._loaded=this._urlChecked=this._destroyed=!1;this._percent=0;this.siteLockBodyText="It appears the website you are using is hosting an unauthorized copy of this game. Storage or redistribution of this content, without the express permission of the developer or other copyright holder, is prohibited under copyright law.\n\nThank you for your interest in this game! Please support the developer by visiting the following website to play the game:";
this.siteLockTitleText="Sorry.";this.minDisplayTime=this.siteLockURLIndex=0;Rg.call(this);this.minDisplayTime=a;this.allowedURLs=null!=b?b:[];this._startTime=(new Date).getTime()};h["flixel.system.FlxBasePreloader"]=rg;rg.__name__="flixel.system.FlxBasePreloader";rg.__super__=Rg;rg.prototype=x(Rg.prototype,{minDisplayTime:null,allowedURLs:null,siteLockURLIndex:null,siteLockTitleText:null,siteLockBodyText:null,_percent:null,_width:null,_height:null,_loaded:null,_urlChecked:null,_destroyed:null,_startTime:null,
create:function(){},onInit:function(){Rg.prototype.onInit.call(this);ha.get_current().stage.set_scaleMode(2);ha.get_current().stage.align=6;this.create();this.addEventListener("enterFrame",q(this,this.onEnterFrame));this.checkSiteLock()},onUpdate:function(a,b){this._percent=0!=b?a/b:0},onEnterFrame:function(a){a=(new Date).getTime()-this._startTime;var b=1E3*this.minDisplayTime,c=this._percent;0<b&&this._percent>a/b&&(c=a/b);this._destroyed||this.update(c);this._loaded&&(0>=b||1<=a/b)&&(this.removeEventListener("enterFrame",
q(this,this.onEnterFrame)),Rg.prototype.onLoaded.call(this),this.destroy(),this._destroyed=!0)},destroy:function(){},update:function(a){},onLoaded:function(){this._loaded=!0;this._percent=1},createBitmap:function(a,b){var c=new dd;c.set_bitmapData(w.createInstance(a,[0,0,!0,-1,function(a){b(c)}]));return c},loadBitmapData:function(a,b){return w.createInstance(a,[0,0,!0,-1,b])},checkSiteLock:function(){this._urlChecked||(this.isHostUrlAllowed()?this._urlChecked=!0:(this.removeChildren(),this.removeEventListener("enterFrame",
q(this,this.onEnterFrame)),this.createSiteLockFailureScreen()))},createSiteLockFailureScreen:function(){this.addChild(this.createSiteLockFailureBackground(16777215,15066597));this.addChild(this.createSiteLockFailureIcon(15066597,.9));this.addChild(this.createSiteLockFailureText(30))},createSiteLockFailureBackground:function(a,b){var c=new Sg,d=c.get_graphics();d.clear();var f=new wa;f.createGradientBox(1,1,0,-.5,-.5);var g=Math.max(this.stage.stageWidth,this.stage.stageHeight);f.scale(g,g);f.translate(.5*
this.stage.stageWidth,.5*this.stage.stageHeight);d.beginGradientFill(1,[a,b],[1,1],[0,255],f);d.drawRect(0,0,this.stage.stageWidth,this.stage.stageHeight);d.endFill();return c},createSiteLockFailureIcon:function(a,b){var c=new Sg,d=c.get_graphics();d.clear();d.beginFill(a);a=[1,6,2,2,2,6,6,2,2,2,6,1,6,2,6,2,6,2,6,1,6,6,2,2,2,6,6];for(var f=ia.toIntVector(null),g=0,k=a.length;g<k;){var l=g++;f.set(l,a[l])}var m=f;a=[120,0,164,0,200,35,200,79,200,130,160,130,160,79,160,57,142,40,120,40,97,40,79,57,
79,79,80,130,40,130,40,79,40,35,75,0,120,0,220,140,231,140,240,148,240,160,240,300,240,311,231,320,220,320,20,320,8,320,0,311,0,300,0,160,0,148,8,140,20,140,120,190,108,190,100,198,100,210,100,217,104,223,110,227,110,270,130,270,130,227,135,223,140,217,140,210,140,198,131,190,120,190];f=ia.toFloatVector(null);g=0;for(k=a.length;g<k;)l=g++,f.set(l,a[l]);d.drawPath(m,f,1);d.endFill();d=new wa;d.translate(-.5*c.get_width(),-.5*c.get_height());b*=Math.min(this.stage.stageWidth/c.get_width(),this.stage.stageHeight/
c.get_height());d.scale(b,b);d.translate(.5*this.stage.stageWidth,.5*this.stage.stageHeight);c.get_transform().set_matrix(d);return c},createSiteLockFailureText:function(a){var b=new Ka,c=new ea(0,0,this.stage.stageWidth,this.stage.stageHeight);c.inflate(-a,-a);a=new zd;var d=new Id("_sans",33,3355443,!0);d.align=3;a.set_defaultTextFormat(d);a.set_selectable(!1);a.set_width(c.width);a.set_text(this.siteLockTitleText);d=new zd;var f=new Id("_sans",22,3355443);f.align=2;d.set_defaultTextFormat(f);d.set_multiline(!0);
d.set_wordWrap(!0);d.set_selectable(!1);d.set_width(c.width);d.set_text(this.siteLockBodyText);f=new zd;var g=new Id("_sans",22,7247820,!0,!1,!0);g.align=0;g.url=this.allowedURLs[this.siteLockURLIndex];f.set_defaultTextFormat(g);f.set_selectable(!0);f.set_width(c.width);f.set_text(this.allowedURLs[this.siteLockURLIndex]);this.adjustSiteLockTextFields(a,d,f);a.set_height(a.get_textHeight()+4);d.set_height(d.get_textHeight()+4);f.set_height(f.get_textHeight()+4);a.set_x(d.set_x(f.set_x(c.get_left())));
a.set_y(c.get_top());d.set_y(a.get_y()+2*a.get_height());f.set_y(d.get_y()+d.get_height()+f.get_height());b.addChild(a);b.addChild(d);b.addChild(f);return b},adjustSiteLockTextFields:function(a,b,c){},goToMyURL:function(a){"localhost"!=this.allowedURLs[this.siteLockURLIndex]?(a=this.allowedURLs[this.siteLockURLIndex],(new E("^.\\w+?:/*","")).match(a)||(a="https://"+a),ha.getURL(new qh(a),"_blank")):ha.getURL(new qh(this.allowedURLs[this.siteLockURLIndex]))},isHostUrlAllowed:function(){if(0==this.allowedURLs.length)return!0;
for(var a=ab.getDomain(B.location.href),b=0,c=this.allowedURLs;b<c.length;){var d=c[b];++b;if(ab.getDomain(d)==a)return!0}return!1},__class__:rg});var Pc=function(){this.exists=!0};h["flixel.system.FlxLinkedList"]=Pc;Pc.__name__="flixel.system.FlxLinkedList";Pc.__interfaces__=[D];Pc._cachedListsHead=null;Pc.recycle=function(){if(null!=Pc._cachedListsHead){var a=Pc._cachedListsHead;Pc._cachedListsHead=Pc._cachedListsHead.next;Pc._NUM_CACHED_FLX_LIST--;a.exists=!0;a.next=null;return a}return new Pc};
Pc.clearCache=function(){for(;null!=Pc._cachedListsHead;){var a=Pc._cachedListsHead;Pc._cachedListsHead=Pc._cachedListsHead.next;a.object=null;a.next=null}Pc._NUM_CACHED_FLX_LIST=0};Pc.prototype={object:null,next:null,exists:null,destroy:function(){this.exists&&(this.object=null,null!=this.next&&this.next.destroy(),this.exists=!1,this.next=Pc._cachedListsHead,Pc._cachedListsHead=this,Pc._NUM_CACHED_FLX_LIST++)},__class__:Pc};var Me=function(a,b,c,d,f){null==d&&(d=-1);null==c&&(c=!0);ma.call(this,
0,0,c,d);if(null!=Me.preload)this.__fromImage(Me.preload);else{var g=this;Eb.loadFromBase64(df.getString(Me.resourceName),Me.resourceType).then(function(a){g.__fromImage(a);return ob.withValue(g)}).onComplete(function(a){null==Me.preload&&(Me.preload=a.image);null!=f&&la.isFunction(f)&&f(a)})}};h["flixel.system._FlxPreloader.GraphicLogoLight"]=Me;Me.__name__="flixel.system._FlxPreloader.GraphicLogoLight";Me.preload=null;Me.__super__=ma;Me.prototype=x(ma.prototype,{__class__:Me});var Ne=function(a,
b,c,d,f){null==d&&(d=-1);null==c&&(c=!0);ma.call(this,0,0,c,d);if(null!=Ne.preload)this.__fromImage(Ne.preload);else{var g=this;Eb.loadFromBase64(df.getString(Ne.resourceName),Ne.resourceType).then(function(a){g.__fromImage(a);return ob.withValue(g)}).onComplete(function(a){null==Ne.preload&&(Ne.preload=a.image);null!=f&&la.isFunction(f)&&f(a)})}};h["flixel.system._FlxPreloader.GraphicLogoCorners"]=Ne;Ne.__name__="flixel.system._FlxPreloader.GraphicLogoCorners";Ne.preload=null;Ne.__super__=ma;Ne.prototype=
x(ma.prototype,{__class__:Ne});var Hj=function(a,b){null==a&&(a=0);rg.call(this,a,b)};h["flixel.system.FlxPreloader"]=Hj;Hj.__name__="flixel.system.FlxPreloader";Hj.__super__=rg;Hj.prototype=x(rg.prototype,{_buffer:null,_bmpBar:null,_text:null,_logo:null,_logoGlow:null,create:function(){var a=this;this._buffer=new Ka;this._buffer.set_scaleX(this._buffer.set_scaleY(2));this.addChild(this._buffer);this._width=ha.get_current().stage.stageWidth/this._buffer.get_scaleX()|0;this._height=ha.get_current().stage.stageHeight/
this._buffer.get_scaleY()|0;this._buffer.addChild(new dd(new ma(this._width,this._height,!1,13406)));var b=this.createBitmap(Me,function(b){b.set_width(b.set_height(a._height));b.set_x((a._width-b.get_width())/2)});b.smoothing=!0;this._buffer.addChild(b);this._bmpBar=new dd(new ma(1,7,!1,6253311));this._bmpBar.set_x(4);this._bmpBar.set_y(this._height-11);this._buffer.addChild(this._bmpBar);this._text=new zd;this._text.set_defaultTextFormat(new Id(Ec.FONT_DEFAULT,8,6253311));this._text.set_embedFonts(!0);
this._text.set_selectable(!1);this._text.set_multiline(!1);this._text.set_x(2);this._text.set_y(this._bmpBar.get_y()-11);this._text.set_width(200);this._buffer.addChild(this._text);this._logo=new Ka;Ec.drawLogo(this._logo.get_graphics());this._logo.set_scaleX(this._logo.set_scaleY(this._height/8*.04));this._logo.set_x((this._width-this._logo.get_width())/2);this._logo.set_y((this._height-this._logo.get_height())/2);this._buffer.addChild(this._logo);this._logoGlow=new Ka;Ec.drawLogo(this._logoGlow.get_graphics());
this._logoGlow.set_blendMode(12);this._logoGlow.set_scaleX(this._logoGlow.set_scaleY(this._height/8*.04));this._logoGlow.set_x((this._width-this._logoGlow.get_width())/2);this._logoGlow.set_y((this._height-this._logoGlow.get_height())/2);this._buffer.addChild(this._logoGlow);b=this.createBitmap(Ne,function(b){b.set_width(a._width);b.set_height(a.get_height())});b.smoothing=!0;this._buffer.addChild(b);b=new dd(new ma(this._width,this._height,!1,16777215));for(var c=0,d=0;c<this._height;){for(d=0;d<
this._width;)b.get_bitmapData().setPixel(d++,c,0);c+=2}b.set_blendMode(11);b.set_alpha(.25);this._buffer.addChild(b);rg.prototype.create.call(this)},destroy:function(){null!=this._buffer&&this.removeChild(this._buffer);this._logoGlow=this._logo=this._text=this._bmpBar=this._buffer=null;rg.prototype.destroy.call(this)},update:function(a){this._bmpBar.set_scaleX(a*(this._width-8));this._text.set_text(M.string(u.VERSION)+" "+(100*a|0)+"%");.1>a?(this._logoGlow.set_alpha(0),this._logo.set_alpha(0)):.15>
a?(this._logoGlow.set_alpha(Math.random()),this._logo.set_alpha(0)):.2>a?(this._logoGlow.set_alpha(0),this._logo.set_alpha(0)):.25>a?(this._logoGlow.set_alpha(0),this._logo.set_alpha(Math.random())):.7>a?(this._logoGlow.set_alpha((a-.45)/.45),this._logo.set_alpha(1)):.8<a&&.9>a?(this._logoGlow.set_alpha(1-(a-.8)/.1),this._logo.set_alpha(0)):.9<a&&this._buffer.set_alpha(1-(a-.9)/.1)},__class__:Hj});var W=function(a,b,c,d,f){V.call(this);var g=a,k=b,l=c,m=d;null==m&&(m=0);null==l&&(l=0);null==k&&(k=
0);null==g&&(g=0);this.x=g;this.y=k;this.width=l;this.height=m;this.reset(a,b,c,d,f)};h["flixel.system.FlxQuadTree"]=W;W.__name__="flixel.system.FlxQuadTree";W.divisions=null;W._min=null;W._object=null;W._objectLeftEdge=null;W._objectTopEdge=null;W._objectRightEdge=null;W._objectBottomEdge=null;W._list=null;W._useBothLists=null;W._processingCallback=null;W._notifyCallback=null;W._iterator=null;W._objectHullX=null;W._objectHullY=null;W._objectHullWidth=null;W._objectHullHeight=null;W._checkObjectHullX=
null;W._checkObjectHullY=null;W._checkObjectHullWidth=null;W._checkObjectHullHeight=null;W._cachedTreesHead=null;W.recycle=function(a,b,c,d,f){if(null!=W._cachedTreesHead){var g=W._cachedTreesHead;W._cachedTreesHead=W._cachedTreesHead.next;W._NUM_CACHED_QUAD_TREES--;g.reset(a,b,c,d,f);return g}return new W(a,b,c,d,f)};W.clearCache=function(){for(;null!=W._cachedTreesHead;){var a=W._cachedTreesHead;W._cachedTreesHead=W._cachedTreesHead.next;a.next=null}W._NUM_CACHED_QUAD_TREES=0};W.__super__=V;W.prototype=
x(V.prototype,{exists:null,_canSubdivide:null,_headA:null,_tailA:null,_headB:null,_tailB:null,_northWestTree:null,_northEastTree:null,_southEastTree:null,_southWestTree:null,_leftEdge:null,_rightEdge:null,_topEdge:null,_bottomEdge:null,_halfWidth:null,_halfHeight:null,_midpointX:null,_midpointY:null,next:null,reset:function(a,b,c,d,f){this.exists=!0;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;this._headA=this._tailA=Pc.recycle();this._headB=
this._tailB=Pc.recycle();if(null!=f){if(null!=f._headA.object)for(d=f._headA;null!=d;)null!=this._tailA.object&&(a=this._tailA,this._tailA=Pc.recycle(),a.next=this._tailA),this._tailA.object=d.object,d=d.next;if(null!=f._headB.object)for(d=f._headB;null!=d;)null!=this._tailB.object&&(a=this._tailB,this._tailB=Pc.recycle(),a.next=this._tailB),this._tailB.object=d.object,d=d.next}else W._min=Math.floor((this.width+this.height)/(2*W.divisions));this._canSubdivide=this.width>W._min||this.height>W._min;
this._southWestTree=this._southEastTree=this._northEastTree=this._northWestTree=null;this._leftEdge=this.x;this._rightEdge=this.x+this.width;this._halfWidth=this.width/2;this._midpointX=this._leftEdge+this._halfWidth;this._topEdge=this.y;this._bottomEdge=this.y+this.height;this._halfHeight=this.height/2;this._midpointY=this._topEdge+this._halfHeight},destroy:function(){this._headA=ba.destroy(this._headA);this._headB=ba.destroy(this._headB);this._tailA=ba.destroy(this._tailA);this._tailB=ba.destroy(this._tailB);
this._northWestTree=ba.destroy(this._northWestTree);this._northEastTree=ba.destroy(this._northEastTree);this._southWestTree=ba.destroy(this._southWestTree);this._southEastTree=ba.destroy(this._southEastTree);W._object=null;W._processingCallback=null;W._notifyCallback=null;this.exists=!1;this.next=W._cachedTreesHead;W._cachedTreesHead=this;W._NUM_CACHED_QUAD_TREES++;V.prototype.destroy.call(this)},load:function(a,b,c,d){this.add(a,0);null!=b?(this.add(b,1),W._useBothLists=!0):W._useBothLists=!1;W._notifyCallback=
c;W._processingCallback=d},add:function(a,b){W._list=b;var c=yb.resolveGroup(a);if(null!=c){a=0;for(var d,f=c.members,g=c.length;a<g;)d=f[a++],null!=d&&d.exists&&(c=yb.resolveGroup(d),null!=c?this.add(c,b):(W._object=d,W._object.exists&&0!=W._object.allowCollisions&&(W._objectLeftEdge=W._object.x,W._objectTopEdge=W._object.y,W._objectRightEdge=W._object.x+W._object.get_width(),W._objectBottomEdge=W._object.y+W._object.get_height(),this.addObject())))}else W._object=a,W._object.exists&&0!=W._object.allowCollisions&&
(W._objectLeftEdge=W._object.x,W._objectTopEdge=W._object.y,W._objectRightEdge=W._object.x+W._object.get_width(),W._objectBottomEdge=W._object.y+W._object.get_height(),this.addObject())},addObject:function(){if(!this._canSubdivide||this._leftEdge>=W._objectLeftEdge&&this._rightEdge<=W._objectRightEdge&&this._topEdge>=W._objectTopEdge&&this._bottomEdge<=W._objectBottomEdge)this.addToList();else{if(W._objectLeftEdge>this._leftEdge&&W._objectRightEdge<this._midpointX){if(W._objectTopEdge>this._topEdge&&
W._objectBottomEdge<this._midpointY){null==this._northWestTree&&(this._northWestTree=W.recycle(this._leftEdge,this._topEdge,this._halfWidth,this._halfHeight,this));this._northWestTree.addObject();return}if(W._objectTopEdge>this._midpointY&&W._objectBottomEdge<this._bottomEdge){null==this._southWestTree&&(this._southWestTree=W.recycle(this._leftEdge,this._midpointY,this._halfWidth,this._halfHeight,this));this._southWestTree.addObject();return}}if(W._objectLeftEdge>this._midpointX&&W._objectRightEdge<
this._rightEdge){if(W._objectTopEdge>this._topEdge&&W._objectBottomEdge<this._midpointY){null==this._northEastTree&&(this._northEastTree=W.recycle(this._midpointX,this._topEdge,this._halfWidth,this._halfHeight,this));this._northEastTree.addObject();return}if(W._objectTopEdge>this._midpointY&&W._objectBottomEdge<this._bottomEdge){null==this._southEastTree&&(this._southEastTree=W.recycle(this._midpointX,this._midpointY,this._halfWidth,this._halfHeight,this));this._southEastTree.addObject();return}}W._objectRightEdge>
this._leftEdge&&W._objectLeftEdge<this._midpointX&&W._objectBottomEdge>this._topEdge&&W._objectTopEdge<this._midpointY&&(null==this._northWestTree&&(this._northWestTree=W.recycle(this._leftEdge,this._topEdge,this._halfWidth,this._halfHeight,this)),this._northWestTree.addObject());W._objectRightEdge>this._midpointX&&W._objectLeftEdge<this._rightEdge&&W._objectBottomEdge>this._topEdge&&W._objectTopEdge<this._midpointY&&(null==this._northEastTree&&(this._northEastTree=W.recycle(this._midpointX,this._topEdge,
this._halfWidth,this._halfHeight,this)),this._northEastTree.addObject());W._objectRightEdge>this._midpointX&&W._objectLeftEdge<this._rightEdge&&W._objectBottomEdge>this._midpointY&&W._objectTopEdge<this._bottomEdge&&(null==this._southEastTree&&(this._southEastTree=W.recycle(this._midpointX,this._midpointY,this._halfWidth,this._halfHeight,this)),this._southEastTree.addObject());W._objectRightEdge>this._leftEdge&&W._objectLeftEdge<this._midpointX&&W._objectBottomEdge>this._midpointY&&W._objectTopEdge<
this._bottomEdge&&(null==this._southWestTree&&(this._southWestTree=W.recycle(this._leftEdge,this._midpointY,this._halfWidth,this._halfHeight,this)),this._southWestTree.addObject())}},addToList:function(){if(0==W._list){if(null!=this._tailA.object){var a=this._tailA;this._tailA=Pc.recycle();a.next=this._tailA}this._tailA.object=W._object}else null!=this._tailB.object&&(a=this._tailB,this._tailB=Pc.recycle(),a.next=this._tailB),this._tailB.object=W._object;this._canSubdivide&&(null!=this._northWestTree&&
this._northWestTree.addToList(),null!=this._northEastTree&&this._northEastTree.addToList(),null!=this._southEastTree&&this._southEastTree.addToList(),null!=this._southWestTree&&this._southWestTree.addToList())},execute:function(){var a=!1;if(null!=this._headA.object)for(var b=this._headA;null!=b;)W._object=b.object,W._iterator=W._useBothLists?this._headB:b.next,null!=W._object&&W._object.exists&&0<W._object.allowCollisions&&null!=W._iterator&&null!=W._iterator.object&&this.overlapNode()&&(a=!0),b=
b.next;null!=this._northWestTree&&this._northWestTree.execute()&&(a=!0);null!=this._northEastTree&&this._northEastTree.execute()&&(a=!0);null!=this._southEastTree&&this._southEastTree.execute()&&(a=!0);null!=this._southWestTree&&this._southWestTree.execute()&&(a=!0);return a},overlapNode:function(){W._objectHullX=W._object.x<W._object.last.x?W._object.x:W._object.last.x;W._objectHullY=W._object.y<W._object.last.y?W._object.y:W._object.last.y;W._objectHullWidth=W._object.x-W._object.last.x;W._objectHullWidth=
W._object.get_width()+(0<W._objectHullWidth?W._objectHullWidth:-W._objectHullWidth);W._objectHullHeight=W._object.y-W._object.last.y;W._objectHullHeight=W._object.get_height()+(0<W._objectHullHeight?W._objectHullHeight:-W._objectHullHeight);for(var a=!1,b;null!=W._iterator;)b=W._iterator.object,W._object==b||!b.exists||0>=b.allowCollisions?W._iterator=W._iterator.next:(W._checkObjectHullX=b.x<b.last.x?b.x:b.last.x,W._checkObjectHullY=b.y<b.last.y?b.y:b.last.y,W._checkObjectHullWidth=b.x-b.last.x,
W._checkObjectHullWidth=b.get_width()+(0<W._checkObjectHullWidth?W._checkObjectHullWidth:-W._checkObjectHullWidth),W._checkObjectHullHeight=b.y-b.last.y,W._checkObjectHullHeight=b.get_height()+(0<W._checkObjectHullHeight?W._checkObjectHullHeight:-W._checkObjectHullHeight),W._objectHullX+W._objectHullWidth>W._checkObjectHullX&&W._objectHullX<W._checkObjectHullX+W._checkObjectHullWidth&&W._objectHullY+W._objectHullHeight>W._checkObjectHullY&&W._objectHullY<W._checkObjectHullY+W._checkObjectHullHeight&&
(null==W._processingCallback||W._processingCallback(W._object,b))&&(a=!0,null!=W._notifyCallback&&W._notifyCallback(W._object,b)),null!=W._iterator&&(W._iterator=W._iterator.next));return a},__class__:W});var Tg=function(){};h["flixel.system.debug.DebuggerUtil"]=Tg;Tg.__name__="flixel.system.debug.DebuggerUtil";Tg.createTextField=function(a,b,c,d){null==d&&(d=12);null==c&&(c=-1);null==b&&(b=0);null==a&&(a=0);return Tg.initTextField(new zd,a,b,c,d)};Tg.initTextField=function(a,b,c,d,f){null==f&&(f=
12);null==d&&(d=-1);null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c);a.set_multiline(!1);a.set_wordWrap(!1);a.set_embedFonts(!0);a.set_selectable(!1);a.set_defaultTextFormat(new Id(Ec.FONT_DEBUGGER,f,d&16777215));a.set_alpha((d>>24&255)/255);a.set_autoSize(1);return a};Tg.fixSize=function(a){la.setProperty(a,"width",11);la.setProperty(a,"height",11);return a};var Mm=function(a,b,c,d){ma.call(this,a,b,c,d)};h["flixel.system.debug._FlxDebugger.GraphicFlixel"]=Mm;Mm.__name__="flixel.system.debug._FlxDebugger.GraphicFlixel";
Mm.__super__=ma;Mm.prototype=x(ma.prototype,{__class__:Mm});var Nm=function(a,b,c,d){ma.call(this,a,b,c,d)};h["flixel.system.debug._FlxDebugger.GraphicDrawDebug"]=Nm;Nm.__name__="flixel.system.debug._FlxDebugger.GraphicDrawDebug";Nm.__super__=ma;Nm.prototype=x(ma.prototype,{__class__:Nm});var Om=function(a,b,c,d){ma.call(this,a,b,c,d)};h["flixel.system.debug.GraphicLog"]=Om;Om.__name__="flixel.system.debug.GraphicLog";Om.__super__=ma;Om.prototype=x(ma.prototype,{__class__:Om});var Pm=function(a,b,
c,d){ma.call(this,a,b,c,d)};h["flixel.system.debug.GraphicStats"]=Pm;Pm.__name__="flixel.system.debug.GraphicStats";Pm.__super__=ma;Pm.prototype=x(ma.prototype,{__class__:Pm});var Qm=function(a,b,c,d){ma.call(this,a,b,c,d)};h["flixel.system.debug.GraphicWatch"]=Qm;Qm.__name__="flixel.system.debug.GraphicWatch";Qm.__super__=ma;Qm.prototype=x(ma.prototype,{__class__:Qm});var Rm=function(a,b,c,d){ma.call(this,a,b,c,d)};h["flixel.system.debug.GraphicBitmapLog"]=Rm;Rm.__name__="flixel.system.debug.GraphicBitmapLog";
Rm.__super__=ma;Rm.prototype=x(ma.prototype,{__class__:Rm});var Sm=function(a,b,c,d){ma.call(this,a,b,c,d)};h["flixel.system.debug.GraphicConsole"]=Sm;Sm.__name__="flixel.system.debug.GraphicConsole";Sm.__super__=ma;Sm.prototype=x(ma.prototype,{__class__:Sm});var Tm=function(a,b,c,d){ma.call(this,a,b,c,d)};h["flixel.system.debug.GraphicArrowLeft"]=Tm;Tm.__name__="flixel.system.debug.GraphicArrowLeft";Tm.__super__=ma;Tm.prototype=x(ma.prototype,{__class__:Tm});var Um=function(a,b,c,d){ma.call(this,
a,b,c,d)};h["flixel.system.debug.GraphicArrowRight"]=Um;Um.__name__="flixel.system.debug.GraphicArrowRight";Um.__super__=ma;Um.prototype=x(ma.prototype,{__class__:Um});var yk=function(a,b,c,d){ma.call(this,a,b,c,d)};h["flixel.system.debug.GraphicCloseButton"]=yk;yk.__name__="flixel.system.debug.GraphicCloseButton";yk.__super__=ma;yk.prototype=x(ma.prototype,{__class__:yk});var Vm=function(a,b,c,d){ma.call(this,a,b,c,d)};h["flixel.system.debug.GraphicInteractive"]=Vm;Vm.__name__="flixel.system.debug.GraphicInteractive";
Vm.__super__=ma;Vm.prototype=x(ma.prototype,{__class__:Vm});var Wm=function(){Ka.call(this)};h["flixel.system.debug.FlxDebugger"]=Wm;Wm.__name__="flixel.system.debug.FlxDebugger";Wm.__super__=Ka;Wm.prototype=x(Ka.prototype,{__class__:Wm});var $i=G["flixel.system.debug.FlxDebuggerLayout"]={__ename__:"flixel.system.debug.FlxDebuggerLayout",__constructs__:null,STANDARD:{_hx_name:"STANDARD",_hx_index:0,__enum__:"flixel.system.debug.FlxDebuggerLayout",toString:t},MICRO:{_hx_name:"MICRO",_hx_index:1,__enum__:"flixel.system.debug.FlxDebuggerLayout",
toString:t},BIG:{_hx_name:"BIG",_hx_index:2,__enum__:"flixel.system.debug.FlxDebuggerLayout",toString:t},TOP:{_hx_name:"TOP",_hx_index:3,__enum__:"flixel.system.debug.FlxDebuggerLayout",toString:t},LEFT:{_hx_name:"LEFT",_hx_index:4,__enum__:"flixel.system.debug.FlxDebuggerLayout",toString:t},RIGHT:{_hx_name:"RIGHT",_hx_index:5,__enum__:"flixel.system.debug.FlxDebuggerLayout",toString:t}};$i.__constructs__=[$i.STANDARD,$i.MICRO,$i.BIG,$i.TOP,$i.LEFT,$i.RIGHT];var zk=function(a,b,c,d){ma.call(this,
a,b,c,d)};h["flixel.system.debug._Window.GraphicWindowHandle"]=zk;zk.__name__="flixel.system.debug._Window.GraphicWindowHandle";zk.__super__=ma;zk.prototype=x(ma.prototype,{__class__:zk});var Ae=function(a,b,c,d,f,g,k,l){null==l&&(l=!0);null==k&&(k=!1);null==f&&(f=!0);null==d&&(d=0);null==c&&(c=0);Ka.call(this);this.minSize=new Ya(50,30);this._width=Math.abs(c)|0;this._height=Math.abs(d)|0;this.updateBounds(g);this._drag=new Ya;this._resizable=f;this._closable=k;this._alwaysOnTop=l;this._shadow=new dd(new ma(1,
2,!0,-16777216));this._background=new dd(new ma(1,1,!0,-580952225));this._header=new dd(new ma(1,15,!0,-1157627904));this._background.set_y(this._header.get_height());this._title=Tg.createTextField(2,-1);this._title.set_alpha(.8);this._title.set_text(a);this.addChild(this._shadow);this.addChild(this._background);this.addChild(this._header);this.addChild(this._title);null!=b&&(Tg.fixSize(b),this._icon=new dd(b),this._icon.set_x(5),this._icon.set_y(2),this._icon.set_alpha(.8),this._title.set_x(this._icon.get_x()+
this._icon.get_width()+2),this.addChild(this._icon));this._resizable&&(this._handle=new dd(Tg.fixSize(new zk(0,0))),this.addChild(this._handle));this._closable?(this._closeButton=new aj(new yk(0,0),q(this,this.close)),this._closeButton.set_alpha(.8),this.addChild(this._closeButton)):(this._id=Ae.windowAmount,this.loadSaveData(),Ae.windowAmount++);0==this._width&&0==this._height||this.updateSize();this.bound();this.addEventListener("enterFrame",q(this,this.init))};h["flixel.system.debug.Window"]=Ae;
Ae.__name__="flixel.system.debug.Window";Ae.__super__=Ka;Ae.prototype=x(Ka.prototype,{minSize:null,maxSize:null,toggleButton:null,_width:null,_height:null,_bounds:null,_background:null,_header:null,_shadow:null,_title:null,_handle:null,_icon:null,_closeButton:null,_overHeader:null,_overHandle:null,_drag:null,_dragging:null,_resizing:null,_resizable:null,_closable:null,_alwaysOnTop:null,_id:null,destroy:function(){this._bounds=this.maxSize=this.minSize=null;null!=this._shadow&&this.removeChild(this._shadow);
this._shadow=null;null!=this._background&&this.removeChild(this._background);this._background=null;null!=this._header&&this.removeChild(this._header);this._header=null;null!=this._title&&this.removeChild(this._title);this._title=null;null!=this._handle&&this.removeChild(this._handle);this._drag=this._handle=null;this._closeButton=ba.destroy(this._closeButton);var a=ha.get_current().stage;a.hasEventListener("mouseMove")&&a.removeEventListener("mouseMove",q(this,this.onMouseMove));this.hasEventListener("mouseDown")&&
this.removeEventListener("mouseDown",q(this,this.onMouseDown));a.hasEventListener("mouseUp")&&a.removeEventListener("mouseUp",q(this,this.onMouseUp))},resize:function(a,b){this._width=Math.abs(a)|0;this._height=Math.abs(b)|0;this.updateSize()},reposition:function(a,b){this.set_x(a);this.set_y(b);this.bound()},updateBounds:function(a){this._bounds=a;this.maxSize=null!=this._bounds?new Ya(this._bounds.width,this._bounds.height):new Ya(1.79E308,1.79E308)},setVisible:function(a){this.set_visible(a);(this._closable?
0:1==u.save.status._hx_index)&&this.saveWindowVisibility();null!=this.toggleButton&&this.toggleButton.set_toggled(!this.get_visible());this.get_visible()&&this._alwaysOnTop&&this.parent.addChild(this)},toggleVisible:function(){this.setVisible(!this.get_visible())},putOnTop:function(){this.parent.addChild(this)},loadSaveData:function(){1==u.save.status._hx_index&&(null==u.save.data.windowSettings&&(this.initWindowsSave(),u.save.flush()),this.set_visible(u.save.data.windowSettings[this._id]))},initWindowsSave:function(){for(var a=
[],b=0;10>b;)b++,a.push(!0);u.save.data.windowSettings=a},saveWindowVisibility:function(){null==u.save.data.windowSettings&&this.initWindowsSave();u.save.data.windowSettings[this._id]=this.get_visible();u.save.flush()},update:function(){},init:function(a){null!=this.stage&&(this.removeEventListener("enterFrame",q(this,this.init)),this.stage.addEventListener("mouseMove",q(this,this.onMouseMove)),this.stage.addEventListener("mouseUp",q(this,this.onMouseUp)),this.addEventListener("mouseDown",q(this,
this.onMouseDown)))},onMouseMove:function(a){a=0>this.get_mouseX()?0:this.get_mouseX();var b=0>this.get_mouseY()?0:this.get_mouseY();this.parent.get_visible()?this._dragging?(this._overHeader=!0,this.reposition(this.parent.get_mouseX()-this._drag.x,this.parent.get_mouseY()-this._drag.y)):this._resizing?(this._overHandle=!0,this.resize(a-this._drag.x,b-this._drag.y)):0<=a&&a<=this._width&&0<=b&&b<=this._height?(this._overHeader=a<=this._header.get_width()&&b<=this._header.get_height(),this._resizable&&
(this._overHandle=a>=this._width-this._handle.get_width()&&b>=this._height-this._handle.get_height())):this._overHandle=this._overHeader=!1:this._overHandle=this._overHeader=!1},onMouseDown:function(a){if(this._overHeader)this._alwaysOnTop&&this.parent.addChild(this),this._dragging=!0,this._drag.x=this.get_mouseX(),this._drag.y=this.get_mouseY();else if(this._overHandle){this._alwaysOnTop&&this.parent.addChild(this);this._resizing=!0;a=this._width;var b=this.get_mouseX();this._drag.x=a-b;a=this._height;
b=this.get_mouseY();this._drag.y=a-b}},onMouseUp:function(a){this._resizing=this._dragging=!1},bound:function(){if(null!=this._bounds){var a=this.get_x(),b=this._bounds.get_left(),c=this._bounds.get_right()-this._width;a=null!=b&&a<b?b:a;this.set_x(null!=c&&a>c?c:a);a=this.get_y();b=this._bounds.get_top();c=this._bounds.get_bottom()-this._height;a=null!=b&&a<b?b:a;this.set_y(null!=c&&a>c?c:a)}},updateSize:function(){var a=this._width,b=this.minSize.x,c=this.maxSize.x;a=null!=b&&a<b?b:a;this._width=
(null!=c&&a>c?c:a)|0;a=this._height;b=this.minSize.y;c=this.maxSize.y;a=null!=b&&a<b?b:a;this._height=(null!=c&&a>c?c:a)|0;this._header.set_scaleX(this._width);this._background.set_scaleX(this._width);this._background.set_scaleY(this._height-this._header.get_height());this._shadow.set_scaleX(this._width);this._shadow.set_y(this._height);this._title.set_width(this._width-4);this._resizable&&(this._handle.set_x(this._width-this._handle.get_width()),this._handle.set_y(this._height-this._handle.get_height()));
null!=this._closeButton&&(this._closeButton.set_x(this._width-this._closeButton.get_width()-3),this._closeButton.set_y(3))},close:function(){this.destroy()},__class__:Ae});var fd=function(){};h["flixel.system.debug.console.ConsoleUtil"]=fd;fd.__name__="flixel.system.debug.console.ConsoleUtil";fd.parser=null;fd.interp=null;fd.init=function(){fd.parser=new di;fd.parser.allowJSON=!0;fd.parser.allowTypes=!0;fd.interp=new Ak};fd.parseCommand=function(a){O.endsWith(a,";")&&(a=y.substr(a,0,-1));return fd.parser.parseString(a)};
fd.runCommand=function(a){return fd.interp.expr(fd.parseCommand(a))};fd.runExpr=function(a){return fd.interp.expr(a)};fd.registerObject=function(a,b){if(null==b||la.isObject(b))fd.interp.variables.h[a]=b};fd.registerFunction=function(a,b){la.isFunction(b)&&(fd.interp.variables.h[a]=b)};fd.removeByAlias=function(a){var b=fd.interp.variables;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]};fd.getFields=function(a){var b=[];if(na.__instanceof(a,$e))b=w.getClassFields(a);else if(na.__instanceof(a,
Xn)){b=a.__constructs__;var c=Array(b.length);a=0;for(var d=b.length;a<d;){var f=a++;c[f]=b[f]._hx_name}b=c}else la.isObject(a)&&(b=w.getInstanceFields(na.getClass(a)));y.remove(b,"__constructs__");c=[];for(a=0;a<b.length;)d=b[a],++a,O.startsWith(d,"get_")||O.startsWith(d,"set_")?(d=y.substr(d,4,null),-1==b.indexOf(d)&&-1==c.indexOf(d)&&c.push(d)):c.push(d);return fd.sortFields(c)};fd.sortFields=function(a){for(var b=[],c=[],d=0;d<a.length;){var f=a[d];++d;if(O.startsWith(f,"_")){b.push(f);var g=
!1}else g=!0;g&&c.push(f)}a=c;ab.sortAlphabetically(a);ab.sortAlphabetically(b);return a.concat(b)};fd.log=function(a){u.log.advanced([a],La.CONSOLE)};var bj=function(){this.locals=new Ba;this.declared=[];this.resetVariables();this.initOps()};h["hscript.Interp"]=bj;bj.__name__="hscript.Interp";bj.prototype={variables:null,locals:null,binops:null,depth:null,inTry:null,declared:null,returnValue:null,resetVariables:function(){var a=this;this.variables=new Ba;this.variables.h["null"]=null;this.variables.h["true"]=
!0;this.variables.h["false"]=!1;var b=this.variables,c=la.makeVarArgs(function(b){var c=a.posInfos(),d=b.shift();0<b.length&&(c.customParams=b);gg.trace(M.string(d),c)});b.h.trace=c},posInfos:function(){return{fileName:"hscript",lineNumber:0}},initOps:function(){var a=this;this.binops=new Ba;this.binops.h["+"]=function(b,c){return a.expr(b)+a.expr(c)};this.binops.h["-"]=function(b,c){return a.expr(b)-a.expr(c)};this.binops.h["*"]=function(b,c){return a.expr(b)*a.expr(c)};this.binops.h["/"]=function(b,
c){return a.expr(b)/a.expr(c)};this.binops.h["%"]=function(b,c){return a.expr(b)%a.expr(c)};this.binops.h["&"]=function(b,c){return a.expr(b)&a.expr(c)};this.binops.h["|"]=function(b,c){return a.expr(b)|a.expr(c)};this.binops.h["^"]=function(b,c){return a.expr(b)^a.expr(c)};this.binops.h["<<"]=function(b,c){return a.expr(b)<<a.expr(c)};this.binops.h[">>"]=function(b,c){return a.expr(b)>>a.expr(c)};this.binops.h[">>>"]=function(b,c){return a.expr(b)>>>a.expr(c)};this.binops.h["=="]=function(b,c){return a.expr(b)==
a.expr(c)};this.binops.h["!="]=function(b,c){return a.expr(b)!=a.expr(c)};this.binops.h[">="]=function(b,c){return a.expr(b)>=a.expr(c)};this.binops.h["<="]=function(b,c){return a.expr(b)<=a.expr(c)};this.binops.h[">"]=function(b,c){return a.expr(b)>a.expr(c)};this.binops.h["<"]=function(b,c){return a.expr(b)<a.expr(c)};this.binops.h["||"]=function(b,c){return 1!=a.expr(b)?1==a.expr(c):!0};this.binops.h["&&"]=function(b,c){return 1==a.expr(b)?1==a.expr(c):!1};this.binops.h["="]=q(this,this.assign);
this.binops.h["..."]=function(b,c){return new Y(a.expr(b),a.expr(c))};this.binops.h.is=function(b,c){return na.__instanceof(a.expr(b),a.expr(c))};this.assignOp("+=",function(a,c){return a+c});this.assignOp("-=",function(a,c){return a-c});this.assignOp("*=",function(a,c){return a*c});this.assignOp("/=",function(a,c){return a/c});this.assignOp("%=",function(a,c){return a%c});this.assignOp("&=",function(a,c){return a&c});this.assignOp("|=",function(a,c){return a|c});this.assignOp("^=",function(a,c){return a^
c});this.assignOp("<<=",function(a,c){return a<<c});this.assignOp(">>=",function(a,c){return a>>c});this.assignOp(">>>=",function(a,c){return a>>>c})},setVar:function(a,b){return this.variables.h[a]=b},assign:function(a,b){b=this.expr(b);switch(a._hx_index){case 1:var c=a.v;a=this.locals.h[c];null==a?this.setVar(c,b):a.r=b;break;case 5:c=a.e;a=a.f;b=this.set(this.expr(c),a,b);break;case 16:c=a.e;a=a.index;c=this.expr(c);a=this.expr(a);na.__implements(c,ta)?na.__cast(c,ta).set(a,b):c[a]=b;break;default:throw c=
gc.EInvalidOp("="),J.thrown(c);}return b},assignOp:function(a,b){var c=this;this.binops.h[a]=function(d,f){return c.evalAssignOp(a,b,d,f)}},evalAssignOp:function(a,b,c,d){switch(c._hx_index){case 1:a=c.v;var f=this.locals.h[a];b=b(this.expr(c),this.expr(d));null==f?this.setVar(a,b):f.r=b;break;case 5:a=c.e;c=c.f;a=this.expr(a);b=b(this.get(a,c),this.expr(d));b=this.set(a,c,b);break;case 16:a=c.e;f=c.index;c=this.expr(a);a=this.expr(f);na.__implements(c,ta)?(b=b(na.__cast(c,ta).get(a),this.expr(d)),
na.__cast(c,ta).set(a,b)):(b=b(c[a],this.expr(d)),c[a]=b);break;default:throw a=gc.EInvalidOp(a),J.thrown(a);}return b},increment:function(a,b,c){switch(a._hx_index){case 1:a=a.v;var d=this.locals.h[a],f=null==d?this.resolve(a):d.r;b?(f+=c,null==d?this.setVar(a,f):d.r=f):null==d?this.setVar(a,f+c):d.r=f+c;return f;case 5:return f=a.e,a=a.f,d=this.expr(f),f=this.get(d,a),b?(f+=c,this.set(d,a,f)):this.set(d,a,f+c),f;case 16:return f=a.e,d=a.index,a=this.expr(f),d=this.expr(d),na.__implements(a,ta)?
(f=na.__cast(a,ta).get(d),b?(f+=c,na.__cast(a,ta).set(d,f)):na.__cast(a,ta).set(d,f+c)):(f=a[d],b?(f+=c,a[d]=f):a[d]=f+c),f;default:throw a=gc.EInvalidOp(0<c?"++":"--"),J.thrown(a);}},execute:function(a){this.depth=0;this.locals=new Ba;this.declared=[];return this.exprReturn(a)},exprReturn:function(a){try{return this.expr(a)}catch(b){if(db.lastError=b,a=J.caught(b).unwrap(),na.__instanceof(a,Ff))switch(a._hx_index){case 0:throw J.thrown("Invalid break");case 1:throw J.thrown("Invalid continue");case 2:return a=
this.returnValue,this.returnValue=null,a}else throw b;}},duplicate:function(a){for(var b=new Ba,c=Object.keys(a.h),d=c.length,f=0;f<d;){var g=c[f++];b.h[g]=a.h[g]}return b},restore:function(a){for(;this.declared.length>a;){var b=this.declared.pop();this.locals.h[b.n]=b.old}},error:function(a,b){throw J.thrown(a);},rethrow:function(a){throw J.thrown(a);},resolve:function(a){var b=this.variables.h[a];if(null==b&&!Object.prototype.hasOwnProperty.call(this.variables.h,a))throw a=gc.EUnknownVariable(a),
J.thrown(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:var d=c.v;return d;case 1:return d=c.f;case 2:return c.s}break;case 1:var f=a.v,g=this.locals.h[f];return null!=g?g.r:this.resolve(f);case 2:return g=a.t,g=a.n,f=a.e,this.declared.push({n:g,old:this.locals.h[g]}),d=this.locals,f=null==f?null:this.expr(f),d.h[g]={r:f},null;case 3:return f=a.e,this.expr(f);case 4:var k=a.e;a=this.declared.length;d=null;for(g=0;g<k.length;)f=k[g],++g,d=this.expr(f);
this.restore(a);return d;case 5:return f=a.e,d=a.f,this.get(this.expr(f),d);case 6:d=a.op;f=a.e1;g=a.e2;a=this.binops.h[d];if(null==a)throw f=gc.EInvalidOp(d),J.thrown(f);return a(f,g);case 7:switch(d=a.op,g=a.prefix,f=a.e,d){case "!":return 1!=this.expr(f);case "++":return this.increment(f,g,1);case "-":return-this.expr(f);case "--":return this.increment(f,g,-1);case "~":return~this.expr(f);default:throw f=gc.EInvalidOp(d),J.thrown(f);}case 8:f=a.e;var l=a.params;a=[];for(g=0;g<l.length;)d=l[g],
++g,a.push(this.expr(d));if(5==f._hx_index){g=f.e;d=f.f;f=this.expr(g);if(null==f)throw g=gc.EInvalidAccess(d),J.thrown(g);return this.fcall(f,d,a)}return this.call(null,this.expr(f),a);case 9:return d=a.cond,f=a.e1,g=a.e2,1==this.expr(d)?this.expr(f):null==g?null:this.expr(g);case 10:return d=a.cond,f=a.e,this.whileLoop(d,f),null;case 11:return d=a.v,g=a.it,f=a.e,this.forLoop(d,g,f),null;case 12:throw J.thrown(Ff.SBreak);case 13:throw J.thrown(Ff.SContinue);case 14:g=a.ret;l=a.args;var m=a.e,z=a.name,
h=this.duplicate(this.locals),p=this,r=0;for(g=0;g<l.length;)d=l[g],++g,d.opt||(r+=1);d=function(a){if((null==a?0:a.length)!=l.length){if(a.length<r){a="Invalid number of parameters. Got "+a.length+", required "+r;null!=z&&(a+=" for function '"+z+"'");var c=gc.ECustom(a);throw J.thrown(c);}var d=[],f=a.length-r,g=0;for(c=0;c<l.length;){var k=l[c];++c;k.opt?0<f?(d.push(a[g++]),--f):d.push(null):d.push(a[g++])}a=d}d=p.locals;f=p.depth;p.depth++;p.locals=p.duplicate(h);c=0;for(g=l.length;c<g;)k=c++,
p.locals.h[l[k].name]={r:a[k]};c=null;a=b.declared.length;if(b.inTry)try{c=p.exprReturn(m)}catch(So){throw db.lastError=So,c=J.caught(So).unwrap(),b.restore(a),p.locals=d,p.depth=f,J.thrown(c);}else c=p.exprReturn(m);b.restore(a);p.locals=d;p.depth=f;return c};f=la.makeVarArgs(d);null!=z&&(0==this.depth?this.variables.h[z]=f:(this.declared.push({n:z,old:this.locals.h[z]}),g={r:f},this.locals.h[z]=g,h.h[z]=g));return f;case 15:throw f=a.e,this.returnValue=null==f?null:this.expr(f),J.thrown(Ff.SReturn);
case 16:return f=a.e,g=a.index,d=this.expr(f),f=this.expr(g),na.__implements(d,ta)?na.__cast(d,ta).get(f):d[f];case 17:d=a.e;0<d.length?(g=d[0],6==g._hx_index?(f=g.e1,f=g.e2,f="=>"==g.op):f=!1):f=!1;if(f){a=[];k=[];for(g=0;g<d.length;)if(f=d[g],++g,6==f._hx_index)if("=>"==f.op)c=f.e2,a.push(this.expr(f.e1)),k.push(this.expr(c));else throw g=gc.ECustom("Invalid map key=>value expression"),J.thrown(g);else throw f=gc.ECustom("Invalid map key=>value expression"),J.thrown(f);return this.makeMap(a,k)}a=
[];for(g=0;g<d.length;)f=d[g],++g,a.push(this.expr(f));return a;case 18:d=a.cl;k=a.params;a=[];for(g=0;g<k.length;)f=k[g],++g,a.push(this.expr(f));return this.cnew(d,a);case 19:throw f=a.e,J.thrown(this.expr(f));case 20:g=a.t;f=a.e;g=a.v;k=a.ecatch;a=this.declared.length;c=this.inTry;try{return this.inTry=!0,d=this.expr(f),this.restore(a),this.inTry=c,d}catch(zb){db.lastError=zb;f=J.caught(zb).unwrap();if(na.__instanceof(f,Ff))throw this.inTry=c,J.thrown(f);this.restore(a);this.inTry=c;this.declared.push({n:g,
old:this.locals.h[g]});this.locals.h[g]={r:f};d=this.expr(k);this.restore(a);return d}case 21:f=a.fl;a={};for(g=0;g<f.length;)d=f[g],++g,this.set(a,d.name,this.expr(d.e));return a;case 22:return d=a.cond,f=a.e1,g=a.e2,1==this.expr(d)?this.expr(f):this.expr(g);case 23:f=a.e;k=a.cases;a=a.defaultExpr;var w=this.expr(f),u=!1;for(g=0;g<k.length;){c=k[g];++g;f=0;for(var n=c.values;f<n.length;)if(d=n[f],++f,this.expr(d)==w){u=!0;break}if(u){w=this.expr(c.expr);break}}u||(w=null==a?null:this.expr(a));return w;
case 24:return d=a.cond,f=a.e,this.doWhileLoop(d,f),null;case 25:return g=a.name,g=a.args,f=a.e,this.expr(f);case 26:return g=a.t,f=a.e,this.expr(f)}},doWhileLoop:function(a,b){var c=this.declared.length;do{var d=!0;try{this.expr(b)}catch(g){db.lastError=g;var f=J.caught(g).unwrap();if(na.__instanceof(f,Ff))switch(f._hx_index){case 0:d=!1;break;case 2:throw J.thrown(f);}else throw g;}if(!d)break}while(1==this.expr(a));this.restore(c)},whileLoop:function(a,b){for(var c=this.declared.length;1==this.expr(a);){var d=
!0;try{this.expr(b)}catch(g){db.lastError=g;var f=J.caught(g).unwrap();if(na.__instanceof(f,Ff))switch(f._hx_index){case 0:d=!1;break;case 2:throw J.thrown(f);}else throw g;}if(!d)break}this.restore(c)},makeIterator:function(a){if(a instanceof Array)return new Ld(a);null!=a.iterator&&(a=P(a));if(null==a.hasNext||null==a.next)throw a=gc.EInvalidIterator(a),J.thrown(a);return a},forLoop:function(a,b,c){var d=this.declared.length;this.declared.push({n:a,old:this.locals.h[a]});for(b=this.makeIterator(this.expr(b));b.hasNext();){var f=
this.locals,g={r:b.next()};f.h[a]=g;f=!0;try{this.expr(c)}catch(k){if(db.lastError=k,g=J.caught(k).unwrap(),na.__instanceof(g,Ff))switch(g._hx_index){case 0:f=!1;break;case 2:throw J.thrown(g);}else throw k;}if(!f)break}this.restore(d)},loopRun:function(a){var b=!0;try{a()}catch(c){if(db.lastError=c,a=J.caught(c).unwrap(),na.__instanceof(a,Ff))switch(a._hx_index){case 0:b=!1;break;case 2:throw J.thrown(a);}else throw c;}return b},isMap:function(a){return na.__implements(a,ta)},getMapValue:function(a,
b){return na.__cast(a,ta).get(b)},setMapValue:function(a,b,c){na.__cast(a,ta).set(b,c)},makeMap:function(a,b){for(var c=!0,d=!0,f=!0,g=!0,k=0;k<a.length;){var l=a[k];++k;c=c&&"string"==typeof l;d=d&&"number"==typeof l&&(l|0)===l;f=f&&la.isObject(l);g=g&&la.isEnumValue(l)}if(d){c=new hc;for(d=0;d<a.length;)l=a[d],f=d++,c.h[l]=b[f];return c}if(c){c=new Ba;for(d=0;d<a.length;)l=a[d],f=d++,c.h[l]=b[f];return c}if(g){c=new ng;for(d=0;d<a.length;)l=a[d],f=d++,c.set(l,b[f]);return c}if(f){c=new Ga;for(d=
0;d<a.length;)l=a[d],f=d++,c.set(l,b[f]);return c}b=gc.ECustom("Invalid map keys "+M.string(a));throw J.thrown(b);},get:function(a,b){if(null==a)throw a=gc.EInvalidAccess(b),J.thrown(a);return la.getProperty(a,b)},set:function(a,b,c){if(null==a)throw a=gc.EInvalidAccess(b),J.thrown(a);la.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 w.createInstance(c,
b)},__class__:bj};var Ak=function(){bj.call(this)};h["flixel.system.debug.console._ConsoleUtil.Interp"]=Ak;Ak.__name__="flixel.system.debug.console._ConsoleUtil.Interp";Ak.__super__=bj;Ak.prototype=x(bj.prototype,{getGlobals:function(){return this.toArray(new Sh(this.locals.h)).concat(this.toArray(new Sh(this.variables.h)))},toArray:function(a){for(var b=[];a.hasNext();){var c=a.next();b.push(c)}return b},get:function(a,b){if(null==a)throw a=gc.EInvalidAccess(b),J.thrown(a);return la.getProperty(a,
b)},set:function(a,b,c){if(null==a)throw a=gc.EInvalidAccess(b),J.thrown(a);la.setProperty(a,b,c);return c},__class__:Ak});var La=function(a,b,c,d,f,g,k,l,m,z,h){null==h&&(h=!1);null==l&&(l=!1);null==g&&(g=!1);null==f&&(f=!1);null==d&&(d=!1);null==c&&(c=12);null==b&&(b="FFFFFF");null==a&&(a="");this.throwException=!1;this.onLog=new md;this.prefix=a;this.color=b;this.size=c;this.bold=d;this.italic=f;this.underlined=g;this.errorSound=k;this.openConsole=l;this.callbackFunction=m;null!=z&&this.onLog.add(z);
this.throwException=h};h["flixel.system.debug.log.LogStyle"]=La;La.__name__="flixel.system.debug.log.LogStyle";La.prototype={prefix:null,color:null,size:null,bold:null,italic:null,underlined:null,errorSound:null,openConsole:null,callbackFunction:null,onLog:null,throwException:null,toLogString:function(a){for(var b=[],c=0,d=a.length;c<d;){var f=c++;f=null==a[f]?"null":M.string(a[f]);b.push(O.htmlEscape(f))}return this.prefix+b.join(" ")},toHtmlString:function(a){return ab.htmlFormat(this.toLogString(a),
this.size,this.color,this.bold,this.italic,this.underlined)},__class__:La};var cj=function(a,b,c,d,f,g,k,l){Ae.call(this,a,b,c,d,f,g,k,l)};h["flixel.system.debug.watch.Watch"]=cj;cj.__name__="flixel.system.debug.watch.Watch";cj.__super__=Ae;cj.prototype=x(Ae.prototype,{__class__:cj});var Xm=function(a,b,c,d,f,g,k,l){Ae.call(this,a,b,c,d,f,g,k,l)};h["flixel.system.debug.watch.Tracker"]=Xm;Xm.__name__="flixel.system.debug.watch.Tracker";Xm.__super__=cj;Xm.prototype=x(cj.prototype,{__class__:Xm});var $n=
function(a,b,c){this.objectClass=a;this.variables=b;this.extensions=c};h["flixel.system.debug.watch.TrackerProfile"]=$n;$n.__name__="flixel.system.debug.watch.TrackerProfile";$n.prototype={objectClass:null,variables:null,extensions:null,toString:function(){var a=this.variables,b=Ua._pool.get();b.label="variables";b.value=a;a=this.extensions;var c=Ua._pool.get();c.label="extensions";c.value=a;return ab.getDebugString([b,c])},__class__:$n};var Uh={toOpenFlType:function(a){switch(a){case "binary":return"BINARY";
case "font":return"FONT";case "image":return"IMAGE";case "sound":return"SOUND";case "text":return"TEXT"}}},xf=G["flixel.system.frontEnds.FlxBrowser"]={__ename__:"flixel.system.frontEnds.FlxBrowser",__constructs__:null,INTERNET_EXPLORER:{_hx_name:"INTERNET_EXPLORER",_hx_index:0,__enum__:"flixel.system.frontEnds.FlxBrowser",toString:t},CHROME:{_hx_name:"CHROME",_hx_index:1,__enum__:"flixel.system.frontEnds.FlxBrowser",toString:t},FIREFOX:{_hx_name:"FIREFOX",_hx_index:2,__enum__:"flixel.system.frontEnds.FlxBrowser",
toString:t},SAFARI:{_hx_name:"SAFARI",_hx_index:3,__enum__:"flixel.system.frontEnds.FlxBrowser",toString:t},OPERA:{_hx_name:"OPERA",_hx_index:4,__enum__:"flixel.system.frontEnds.FlxBrowser",toString:t},UNKNOWN:{_hx_name:"UNKNOWN",_hx_index:5,__enum__:"flixel.system.frontEnds.FlxBrowser",toString:t}};xf.__constructs__=[xf.INTERNET_EXPLORER,xf.CHROME,xf.FIREFOX,xf.SAFARI,xf.OPERA,xf.UNKNOWN];var Yd=G["flixel.system.frontEnds.FlxPlatform"]={__ename__:"flixel.system.frontEnds.FlxPlatform",__constructs__:null,
WINDOWS:{_hx_name:"WINDOWS",_hx_index:0,__enum__:"flixel.system.frontEnds.FlxPlatform",toString:t},LINUX:{_hx_name:"LINUX",_hx_index:1,__enum__:"flixel.system.frontEnds.FlxPlatform",toString:t},MAC:{_hx_name:"MAC",_hx_index:2,__enum__:"flixel.system.frontEnds.FlxPlatform",toString:t},ANDROID:{_hx_name:"ANDROID",_hx_index:3,__enum__:"flixel.system.frontEnds.FlxPlatform",toString:t},BLACKBERRY:{_hx_name:"BLACKBERRY",_hx_index:4,__enum__:"flixel.system.frontEnds.FlxPlatform",toString:t},WINDOWS_PHONE:{_hx_name:"WINDOWS_PHONE",
_hx_index:5,__enum__:"flixel.system.frontEnds.FlxPlatform",toString:t},IOS:(n=function(a){return{_hx_index:6,device:a,__enum__:"flixel.system.frontEnds.FlxPlatform",toString:t}},n._hx_name="IOS",n.__params__=["device"],n),UNKNOWN:{_hx_name:"UNKNOWN",_hx_index:7,__enum__:"flixel.system.frontEnds.FlxPlatform",toString:t}};Yd.__constructs__=[Yd.WINDOWS,Yd.LINUX,Yd.MAC,Yd.ANDROID,Yd.BLACKBERRY,Yd.WINDOWS_PHONE,Yd.IOS,Yd.UNKNOWN];var Ni=G["flixel.system.frontEnds.FlxIOSDevice"]={__ename__:"flixel.system.frontEnds.FlxIOSDevice",
__constructs__:null,IPHONE:{_hx_name:"IPHONE",_hx_index:0,__enum__:"flixel.system.frontEnds.FlxIOSDevice",toString:t},IPAD:{_hx_name:"IPAD",_hx_index:1,__enum__:"flixel.system.frontEnds.FlxIOSDevice",toString:t},IPOD:{_hx_name:"IPOD",_hx_index:2,__enum__:"flixel.system.frontEnds.FlxIOSDevice",toString:t}};Ni.__constructs__=[Ni.IPHONE,Ni.IPAD,Ni.IPOD];var vm=function(){this.drawOnTop=!1;this.list=[];this.addPlugin(bf.globalManager=new Bk);this.addPlugin(Ma.globalManager=new Ck);this.addPlugin(bc.globalManager=
new rk);this.addPlugin(qe.globalManager=new Dk)};h["flixel.system.frontEnds.PluginFrontEnd"]=vm;vm.__name__="flixel.system.frontEnds.PluginFrontEnd";vm.prototype={list:null,drawOnTop:null,addPlugin:function(a){this.list.push(a);return a},addIfUniqueType:function(a){for(var b=0,c=this.list;b<c.length;){var d=c[b];++b;if(ab.getClassName(a,!0)==ab.getClassName(d,!0))return a}this.list.push(a);return a},get:function(a){for(var b=0,c=this.list;b<c.length;){var d=c[b];++b;if(na.__instanceof(d,a))return d}return null},
remove:function(a){y.remove(this.list,a);return a},removeType:function(a){return this.removeAllByType(a)},removeAllByType:function(a){for(var b=!1,c=this.list.length;0<c--;)na.__instanceof(this.list[c],a)&&(this.list.splice(c,1),b=!0);return b},update:function(a){for(var b=0,c=this.list;b<c.length;){var d=c[b];++b;d.exists&&d.active&&d.update(a)}},draw:function(){for(var a=0,b=this.list;a<b.length;){var c=b[a];++a;c.exists&&c.visible&&c.draw()}},__class__:vm};var xm=function(){this.volume=1;this.list=
new yb;this.defaultSoundGroup=new uk;this.defaultMusicGroup=new uk;this.soundTrayEnabled=!0;this.muteKeys=[48,96];this.volumeDownKeys=[189,109];this.volumeUpKeys=[187,107];this.onVolumeChange=new md;this.muted=!1;this.loadSavedPrefs()};h["flixel.system.frontEnds.SoundFrontEnd"]=xm;xm.__name__="flixel.system.frontEnds.SoundFrontEnd";xm.prototype={music:null,muted:null,volumeHandler:null,onVolumeChange:null,volumeUpKeys:null,volumeDownKeys:null,muteKeys:null,soundTrayEnabled:null,get_soundTray:function(){return u.game.soundTray},
defaultMusicGroup:null,defaultSoundGroup:null,list:null,volume:null,playMusic:function(a,b,c,d){null==c&&(c=!0);null==b&&(b=1);null==d&&(d=this.defaultMusicGroup);if(null==this.music)this.music=new ci;else if(this.music.active){var f=this.music;f.cleanup(f.autoDestroy,!0)}this.music.loadEmbedded(a,c);this.music.set_volume(b);this.music.persist=!0;d.add(this.music);this.music.play()},load:function(a,b,c,d,f,g,k,l,m){null==g&&(g=!1);null==f&&(f=!1);null==c&&(c=!1);null==b&&(b=1);if(null==a&&null==k)return u.log.advanced("FlxG.sound.load() requires either\nan embedded sound or a URL to work.",
La.WARNING,!0),null;var z=this.list.recycle(ci);null!=a?(z.loadEmbedded(a,c,f,l),this.loadHelper(z,b,d,g),null!=m&&null!=z._sound&&m()):(a=m,g&&(a=function(){z.play();null!=m&&m()}),z.loadStream(k,c,f,l,a),this.loadHelper(z,b,d));return z},loadHelper:function(a,b,c,d){null==d&&(d=!1);null==c&&(c=this.defaultSoundGroup);a.set_volume(b);c.add(a);d&&a.play();return a},cache:function(a){if(u.assets.exists(a,"sound")){var b=!0;null==b&&(b=!0);return u.assets.getAssetUnsafe(a,"sound",b)}u.log.advanced("Could not find a Sound asset with an ID of '"+
a+"'.",La.ERROR,!0);return null},cacheAll:function(){for(var a=0,b=u.assets.list("sound");a<b.length;){var c=b[a];++a;if(u.assets.exists(c,"sound")){var d=!0;null==d&&(d=!0);u.assets.getAssetUnsafe(c,"sound",d)}else u.log.advanced("Could not find a Sound asset with an ID of '"+c+"'.",La.ERROR,!0)}},play:function(a,b,c,d,f,g){null==f&&(f=!0);null==c&&(c=!1);null==b&&(b=1);if("string"==typeof a)if(u.assets.exists(a,"sound")){var k=!0;null==k&&(k=!0);a=u.assets.getAssetUnsafe(a,"sound",k)}else u.log.advanced("Could not find a Sound asset with an ID of '"+
a+"'.",La.ERROR,!0),a=null;a=this.list.recycle(ci).loadEmbedded(a,c,f,g);return this.loadHelper(a,b,d,!0)},stream:function(a,b,c,d,f,g,k){null==f&&(f=!0);null==c&&(c=!1);null==b&&(b=1);return this.load(null,b,c,d,f,!0,a,g,k)},pause:function(){null!=this.music&&this.music.exists&&this.music.active&&this.music.pause();for(var a=0,b=this.list.members;a<b.length;){var c=b[a];++a;null!=c&&c.exists&&c.active&&c.pause()}},resume:function(){null!=this.music&&this.music.exists&&this.music.resume();for(var a=
0,b=this.list.members;a<b.length;){var c=b[a];++a;null!=c&&c.exists&&c.resume()}},destroy:function(a){null==a&&(a=!1);null==this.music||!a&&this.music.persist||(this.music.destroy(),this.music=null);for(var b=0,c=this.list.members;b<c.length;){var d=c[b];++b;null==d||!a&&d.persist||d.destroy()}},toggleMuted:function(){this.muted=!this.muted;null!=this.volumeHandler&&this.volumeHandler(this.muted?0:this.volume);this.onVolumeChange.dispatch(this.muted?0:this.volume);this.showSoundTray(!0)},changeVolume:function(a){this.muted=
!1;this.set_volume(this.volume+a);this.showSoundTray(0<a)},showSoundTray:function(a){null==a&&(a=!1);null!=u.game.soundTray&&this.soundTrayEnabled&&u.game.soundTray.show(a)},update:function(a){null!=this.music&&this.music.active&&this.music.update(a);null!=this.list&&this.list.active&&this.list.update(a);qe.globalManager.get_isTyping()||(u.keys.checkKeyArrayState(this.muteKeys,-1)?this.toggleMuted():u.keys.checkKeyArrayState(this.volumeUpKeys,-1)?this.changeVolume(.1):u.keys.checkKeyArrayState(this.volumeDownKeys,
-1)&&this.changeVolume(-.1))},onFocusLost:function(){if(null!=this.music)this.music.onFocusLost();for(var a=0,b=this.list.members;a<b.length;){var c=b[a];++a;if(null!=c)c.onFocusLost()}},onFocus:function(){if(null!=this.music)this.music.onFocus();for(var a=0,b=this.list.members;a<b.length;){var c=b[a];++a;if(null!=c)c.onFocus()}},loadSavedPrefs:function(){1==u.save.status._hx_index&&(null!=u.save.data.volume&&this.set_volume(u.save.data.volume),null!=u.save.data.mute&&(this.muted=u.save.data.mute))},
set_volume:function(a){a=0>a?0:a;a=1<a?1:a;null!=this.volumeHandler&&this.volumeHandler(this.muted?0:a);this.onVolumeChange.dispatch(this.muted?0:a);return this.volume=a},__class__:xm,__properties__:{set_volume:"set_volume",get_soundTray:"get_soundTray"}};var wm=function(){this.paused=this.stepRequested=!1};h["flixel.system.frontEnds.VCRFrontEnd"]=wm;wm.__name__="flixel.system.frontEnds.VCRFrontEnd";wm.prototype={paused:null,stepRequested:null,pause:function(){this.paused||(u.mouse.useSystemCursor||
Kc.show(),this.paused=!0)},resume:function(){this.paused&&(u.mouse.useSystemCursor||Kc.hide(),this.paused=!1)},__class__:wm};var To=function(){};h["flixel.system.macros.FlxMacroUtil"]=To;To.__name__="flixel.system.macros.FlxMacroUtil";var Gm=function(a,b){this.code=a;this.value=b};h["flixel.system.replay.CodeValuePair"]=Gm;Gm.__name__="flixel.system.replay.CodeValuePair";Gm.prototype={code:null,value:null,__class__:Gm};var Im=function(a,b,c,d){this.x=a;this.y=b;this.button=c;this.wheel=d};h["flixel.system.replay.MouseRecord"]=
Im;Im.__name__="flixel.system.replay.MouseRecord";Im.prototype={x:null,y:null,button:null,wheel:null,__class__:Im};var Rj=function(){Mg.call(this)};h["flixel.system.scaleModes.PixelPerfectScaleMode"]=Rj;Rj.__name__="flixel.system.scaleModes.PixelPerfectScaleMode";Rj.__super__=Mg;Rj.prototype=x(Mg.prototype,{updateGameSize:function(a,b){a=Math.floor(Math.min(a/u.width,b/u.height));1>a&&(a=1);this.gameSize.set_x(u.width*a);this.gameSize.set_y(u.height*a)},__class__:Rj});var Uj=function(){Ka.call(this);
this.draw();var a=new Ka;Ec.drawLogo(a.get_graphics());a.set_scaleX(a.set_scaleY(.2));a.set_x(a.set_y(5));a.set_alpha(.35);this.addChild(a);this.set_visible(!1)};h["flixel.system.ui.FlxFocusLostScreen"]=Uj;Uj.__name__="flixel.system.ui.FlxFocusLostScreen";Uj.__super__=Ka;Uj.prototype=x(Ka.prototype,{draw:function(){var a=this.get_graphics(),b=ha.get_current().stage.stageWidth|0,c=ha.get_current().stage.stageHeight|0;a.clear();a.moveTo(0,0);a.beginFill(0,.5);a.drawRect(0,0,b,c);a.endFill();b=b/2|0;
c=c/2|0;var d=Math.min(b,c)/3|0;a.moveTo(b-d,c-d);a.beginFill(16777215,.65);a.lineTo(b+d,c);a.lineTo(b-d,c+d);a.lineTo(b-d,c-d);a.endFill();this.set_x(-u.scaleMode.offset.x);this.set_y(-u.scaleMode.offset.y)},__class__:Uj});var Vj=function(){this.silent=!1;this.volumeUpSound=this.volumeDownSound="flixel/sounds/beep";this._defaultScale=2;this._width=80;Ka.call(this);this.set_visible(!1);this.set_scaleX(this._defaultScale);this.set_scaleY(this._defaultScale);var a=new dd(new ma(this._width,30,!0,2130706432));
this.screenCenter();this.addChild(a);var b=new zd;b.set_width(a.get_width());b.set_height(a.get_height());b.set_multiline(!0);b.set_wordWrap(!0);b.set_selectable(!1);a=new Id(Ec.FONT_DEFAULT,10,16777215);a.align=0;b.set_defaultTextFormat(a);this.addChild(b);b.set_text("VOLUME");b.set_y(16);b=10;var c=14;this._bars=[];for(var d=0;10>d;)a=d++,a=new dd(new ma(4,a+1,!1,-1)),a.set_x(b),a.set_y(c),this.addChild(a),this._bars.push(a),b+=6,--c;this.set_y(-this.get_height());this.set_visible(!1)};h["flixel.system.ui.FlxSoundTray"]=
Vj;Vj.__name__="flixel.system.ui.FlxSoundTray";Vj.__super__=Ka;Vj.prototype=x(Ka.prototype,{active:null,_timer:null,_bars:null,_width:null,_defaultScale:null,volumeUpSound:null,volumeDownSound:null,silent:null,update:function(a){0<this._timer?this._timer-=a/1E3:this.get_y()>-this.get_height()&&(this.set_y(this.get_y()-a/1E3*this.get_height()*.5),this.get_y()<=-this.get_height()&&(this.set_visible(!1),this.active=!1,1==u.save.status._hx_index&&(u.save.data.mute=u.sound.muted,u.save.data.volume=u.sound.volume,
u.save.flush())))},show:function(a){null==a&&(a=!1);this.silent||(a=Ec.getSoundAddExtension(a?this.volumeUpSound:this.volumeDownSound),null!=a&&u.sound.load(a).play());this._timer=1;this.set_y(0);this.set_visible(!0);this.active=!0;a=Math.round(10*u.sound.volume);u.sound.muted&&(a=0);for(var b=0,c=this._bars.length;b<c;){var d=b++;d<a?this._bars[d].set_alpha(1):this._bars[d].set_alpha(.5)}},screenCenter:function(){this.set_scaleX(this._defaultScale);this.set_scaleY(this._defaultScale);this.set_x(.5*
(ha.get_current().stage.stageWidth-this._width*this._defaultScale)-u.game.get_x())},__class__:Vj});var aj=function(a,b,c){null==c&&(c=!1);this.toggleMode=this.toggled=this._mouseDown=!1;this.enabled=!0;Ka.call(this);null!=a&&this.changeIcon(a);this.upHandler=b;this.toggleMode=c;this.addEventListener("mouseUp",q(this,this.onMouseUp));this.addEventListener("mouseDown",q(this,this.onMouseDown));this.addEventListener("mouseOut",q(this,this.onMouseOut));this.addEventListener("mouseOver",q(this,this.onMouseOver))};
h["flixel.system.ui.FlxSystemButton"]=aj;aj.__name__="flixel.system.ui.FlxSystemButton";aj.__interfaces__=[D];aj.__super__=Ka;aj.prototype=x(Ka.prototype,{upHandler:null,enabled:null,toggleMode:null,toggled:null,_icon:null,_mouseDown:null,changeIcon:function(a){null!=this._icon&&this.removeChild(this._icon);Tg.fixSize(a);this._icon=new dd(a);this.addChild(this._icon)},destroy:function(){this.removeEventListener("mouseUp",q(this,this.onMouseUp));this.removeEventListener("mouseDown",q(this,this.onMouseDown));
this.removeEventListener("mouseOut",q(this,this.onMouseOut));this.removeEventListener("mouseOver",q(this,this.onMouseOver));this.upHandler=this._icon=null},onMouseUp:function(a){this.enabled&&this._mouseDown&&(this.set_toggled(!this.toggled),this._mouseDown=!1,null!=this.upHandler&&this.upHandler())},onMouseDown:function(a){this._mouseDown=!0},onMouseOver:function(a){this.enabled&&this.set_alpha(this.get_alpha()-.2)},onMouseOut:function(a){this.enabled&&this.set_alpha(this.get_alpha()+.2)},set_toggled:function(a){this.toggleMode&&
this.set_alpha(a?.3:1);return this.toggled=a},__class__:aj,__properties__:x(Ka.prototype.__properties__,{set_toggled:"set_toggled"})});var ih=function(a,b,c,d){null==c&&(c="");null==b&&(b=0);null==a&&(a=0);this.multiLine=this.pendingTextChange=this.pendingTextBitmapChange=this.pendingPixelsChange=!0;this.backgroundColor=0;this.background=!1;var f=1,g=1;null==g&&(g=0);null==f&&(f=0);null==g&&(g=0);null==f&&(f=0);g=N.pool.get().set(f,g);g._inPool=!1;this._shadowOffset=g;this.borderQuality=0;this.borderSize=
1;this.borderColor=-16777216;this.borderStyle=ue.NONE;this.useTextColor=!1;this.textColor=-1;this.numSpacesInTab=4;this.padding=0;this.autoSize=!0;this.wrap=wf.WORD(jh.NEVER);this.autoUpperCase=!1;this.lineSpacing=this.letterSpacing=0;this.alignment="left";this._linesWidth=[];this._lines=[];this._colorParams=new Ub;this.text="";R.call(this,a,b);this.set_width(this.set_fieldWidth(2));this.set_alpha(1);this.set_font(null==d?rc.getDefaultFont():d);u.renderBlit?this.set_pixels(new ma(1,1,!0,0)):(this.textData=
[],this.textDrawData=[],this.borderDrawData=[]);this.set_text(c)};h["flixel.text.FlxBitmapText"]=ih;ih.__name__="flixel.text.FlxBitmapText";ih.isSpaceWord=function(a){a=va.charCodeAt(a,0);return 32!=a?9==a:!0};ih.isSpaceChar=function(a){return 32!=a?9==a:!0};ih.__super__=R;ih.prototype=x(R.prototype,{font:null,text:null,_colorParams:null,_lines:null,_linesWidth:null,alignment:null,lineSpacing:null,letterSpacing:null,autoUpperCase:null,wrap:null,autoSize:null,padding:null,numSpacesInTab:null,textColor:null,
useTextColor:null,borderStyle:null,borderColor:null,borderSize:null,borderQuality:null,_shadowOffset:null,background:null,backgroundColor:null,multiLine:null,_fieldWidth:null,pendingTextChange:null,pendingTextBitmapChange:null,pendingPixelsChange:null,textData:null,textDrawData:null,borderDrawData:null,textBitmap:null,destroy:function(){this.set_font(null);this.set_text(null);this._linesWidth=this._lines=null;this._shadowOffset=ba.put(this._shadowOffset);this.textBitmap=ba.dispose(this.textBitmap);
this._colorParams=null;u.renderTile&&(this.borderDrawData=this.textDrawData=this.textData=null);R.prototype.destroy.call(this)},drawFrame:function(a){null==a&&(a=!1);u.renderTile&&(a=!0);this.pendingTextBitmapChange=this.pendingTextBitmapChange||a;this.checkPendingChanges(!1);u.renderBlit&&R.prototype.drawFrame.call(this,a)},updateHitbox:function(){this.checkPendingChanges(!0);R.prototype.updateHitbox.call(this)},checkPendingChanges:function(a){null==a&&(a=!1);u.renderBlit&&(a=!1);this.pendingTextChange&&
(this.updateText(),this.pendingTextBitmapChange=!0);this.pendingTextBitmapChange&&(this.updateTextBitmap(a),this.pendingPixelsChange=!0);this.pendingPixelsChange&&this.updatePixels(a)},draw:function(){if(u.renderBlit)this.checkPendingChanges(!1),R.prototype.draw.call(this);else{this.checkPendingChanges(!0);var a=this.textDrawData.length/3|0,b=this.borderDrawData.length/3|0,c=(this.color>>16&255)/255,d=(this.color>>8&255)/255,f=(this.color&255)/255,g=(this.borderColor>>16&255)/255*c,k=(this.borderColor>>
8&255)/255*d,l=(this.borderColor&255)/255*f,m=(this.borderColor>>24&255)/255*this.alpha,z=c,h=d,p=f,r=this.alpha;this.useTextColor&&(z*=(this.textColor>>16&255)/255,h*=(this.textColor>>8&255)/255,p*=(this.textColor&255)/255,r*=(this.textColor>>24&255)/255);var w=this.alpha;this.background&&(c*=(this.backgroundColor>>16&255)/255,d*=(this.backgroundColor>>8&255)/255,f*=(this.backgroundColor&255)/255,w*=(this.backgroundColor>>24&255)/255);var n=this.scale.x*this._facingHorizontalMult,t=this.scale.y*
this._facingVerticalMult,A=this.origin.x,q=this.origin.y;1!=this._facingHorizontalMult&&(A=this.frameWidth-A);1!=this._facingVerticalMult&&(q=this.frameHeight-q);if(null!=this.clipRect){var y=this.clipRect;var E=0,L=0;var v=this.frameWidth;var C=this.frameHeight;null==C&&(C=0);null==v&&(v=0);null==L&&(L=0);null==E&&(E=0);null==C&&(C=0);null==v&&(v=0);null==L&&(L=0);null==E&&(E=0);var x=V._pool.get();null==C&&(C=0);null==v&&(v=0);null==L&&(L=0);null==E&&(E=0);x.x=E;x.y=L;x.width=v;x.height=C;E=x;E._inPool=
!1;E._weak=!0;y=y.intersection(E);if(0==y.width||0==y.height)return}else L=E=0,v=this.frameWidth,C=this.frameHeight,null==C&&(C=0),null==v&&(v=0),null==L&&(L=0),null==E&&(E=0),x=V._pool.get(),null==C&&(C=0),null==v&&(v=0),null==L&&(L=0),null==E&&(E=0),x.x=E,x.y=L,x.width=v,x.height=C,E=x,E._inPool=!1,y=E;E=this.getCamerasLegacy();for(L=0;L<E.length;)if(v=E[L],++L,v.visible&&v.exists&&this.isOnScreen(v)){x=this.getScreenPosition(this._point,v);C=this.offset;var Y=C.x;var G=C.y;null==G&&(G=0);null==
Y&&(Y=0);x.set_x(x.x-Y);x.set_y(x.y-G);x=C;x._weak&&x.put();this.isPixelPerfectRender(v)&&(x=this._point,x.set_x(Math.floor(x.x)),x.set_y(Math.floor(x.y)));this._angleChanged&&(x=Math.PI/180*this.angle,this._sinAngle=Math.sin(x),this._cosAngle=Math.cos(x),this._angleChanged=!1);if(this.background){x=u.bitmap.get_whitePixel();this._matrix.identity();this._matrix.scale(.1*y.width,.1*y.height);this._matrix.translate(y.x-A,y.y-q);this._matrix.scale(n,t);if(0!=this.angle){C=this._matrix;Y=this._cosAngle;
G=this._sinAngle;var H=C.a*Y-C.b*G;C.b=C.a*G+C.b*Y;C.a=H;H=C.c*Y-C.d*G;C.d=C.c*G+C.d*Y;C.c=H;H=C.tx*Y-C.ty*G;C.ty=C.tx*G+C.ty*Y;C.tx=H}this._matrix.translate(this._point.x+A,this._point.y+q);Rc.setMultipliers(this._colorParams,c,d,f,w);v.drawPixels(x,null,this._matrix,this._colorParams,this.blend,this.antialiasing)}x=null!=this.colorTransform&&Rc.hasRGBAOffsets(this.colorTransform);v=v.startQuadBatch(this.font.parent,!0,x,this.blend,this.antialiasing,this.shader);C=0;for(Y=b;C<Y;){H=3*C++;x=this.font.charMap.h[this.borderDrawData[H]|
0];G=this.borderDrawData[H+1];H=this.borderDrawData[H+2];if(null!=this.clipRect){var B=this.clipRect;y.x=B.x;y.y=B.y;y.width=B.width;y.height=B.height;B._weak&&!B._inPool&&(B._inPool=!0,B._weak=!1,V._pool.putUnsafe(B));B=y;B.x+=-G;B.y+=-H;x=x.clipTo(y)}x.prepareMatrix(this._matrix);this._matrix.translate(G-A,H-q);this._matrix.scale(n,t);if(0!=this.angle){G=this._matrix;H=this._cosAngle;B=this._sinAngle;var D=G.a*H-G.b*B;G.b=G.a*B+G.b*H;G.a=D;D=G.c*H-G.d*B;G.d=G.c*B+G.d*H;G.c=D;D=G.tx*H-G.ty*B;G.ty=
G.tx*B+G.ty*H;G.tx=D}this._matrix.translate(this._point.x+A,this._point.y+q);Rc.setMultipliers(this._colorParams,g,k,l,m);v.addQuad(x,this._matrix,this._colorParams)}C=0;for(Y=a;C<Y;)H=3*C++,x=this.font.charMap.h[this.textDrawData[H]|0],G=this.textDrawData[H+1],H=this.textDrawData[H+2],null!=this.clipRect&&(B=this.clipRect,y.x=B.x,y.y=B.y,y.width=B.width,y.height=B.height,B._weak&&!B._inPool&&(B._inPool=!0,B._weak=!1,V._pool.putUnsafe(B)),B=y,B.x+=-G,B.y+=-H,x=x.clipTo(y)),x.prepareMatrix(this._matrix),
this._matrix.translate(G-A,H-q),this._matrix.scale(n,t),0!=this.angle&&(G=this._matrix,H=this._cosAngle,B=this._sinAngle,D=G.a*H-G.b*B,G.b=G.a*B+G.b*H,G.a=D,D=G.c*H-G.d*B,G.d=G.c*B+G.d*H,G.c=D,D=G.tx*H-G.ty*B,G.ty=G.tx*B+G.ty*H,G.tx=D),this._matrix.translate(this._point.x+A,this._point.y+q),Rc.setMultipliers(this._colorParams,z,h,p,r),v.addQuad(x,this._matrix,this._colorParams)}y._inPool||(y._inPool=!0,y._weak=!1,V._pool.putUnsafe(y))}},set_clipRect:function(a){R.prototype.set_clipRect.call(this,
a);u.renderBlit||(this.pendingTextBitmapChange=!0);return this.clipRect},set_color:function(a){R.prototype.set_color.call(this,a);u.renderBlit&&(this.pendingTextBitmapChange=!0);return this.color},set_alpha:function(a){R.prototype.set_alpha.call(this,a);u.renderBlit&&(this.pendingTextBitmapChange=!0);return a},set_textColor:function(a){this.textColor!=a&&(this.textColor=a,u.renderBlit&&(this.pendingPixelsChange=!0));return a},set_useTextColor:function(a){this.useTextColor!=a&&(this.useTextColor=a,
u.renderBlit&&(this.pendingPixelsChange=!0));return a},calcFrame:function(a){null==a&&(a=!1);u.renderTile?this.drawFrame(a):R.prototype.calcFrame.call(this,a)},set_text:function(a){a!=this.text&&(this.text=a,this.pendingTextChange=!0);return a},updateText:function(){this._lines=(this.autoUpperCase?this.text.toUpperCase():this.text).split("\n");this.autoSize||(this._lines=this.wrap!=wf.NONE?this.autoWrap(this._lines):this.cutLines(this._lines));this.multiLine||(this._lines=[this._lines[0]]);for(var a=
0,b=this._lines.length;a<b;){var c=a++;this._lines[c]=O.rtrim(this._lines[c])}this.pendingTextChange=!1;this.pendingTextBitmapChange=!0},computeTextSize:function(){var a=this.autoSize?this.get_textWidth()+2*this.padding:this.get_fieldWidth(),b=this.get_textHeight()+2*this.padding;this.frameWidth=0==a?1:a;this.frameHeight=0==b?1:b},getLineWidth:function(a){return 0>a||a>=this._lines.length?0:this.getStringWidth(this._lines[a])},getStringWidth:function(a){for(var b=this.font.spaceWidth,c=b*this.numSpacesInTab,
d=va.get_length(a),f=this.font.minOffsetX,g,k,l=0;l<d;){var m=l++;g=va.charCodeAt(a,m);k=0;32==g?k=b:9==g?k=c:this.font.charMap.h.hasOwnProperty(g)&&(k=this.font,k=k.charAdvance.h.hasOwnProperty(g)?k.charAdvance.h[g]:0,m==d-1&&(g=this.font.charMap.h[g],k=g.sourceSize.x|0));f+=k+this.letterSpacing}0<d&&(f-=this.letterSpacing);return f|0},cutLines:function(a){for(var b=0,c=a.length;b<c;)for(var d=b++,f=a[d],g=this.font.minOffsetX,k=0,l=va.get_length(f);k<l;){var m=k++,z=va.charCodeAt(f,m);g+=this.getCharAdvance(z,
this.font.spaceWidth)+this.letterSpacing;if(g>this._fieldWidth-2*this.padding){a[d]=va.substr(a[d],0,m);break}}return a},getCharAdvance:function(a,b){switch(a){case 9:return b*this.numSpacesInTab;case 32:return b;default:return b=this.font,b=b.charAdvance.h.hasOwnProperty(a)?b.charAdvance.h[a]:0,this.isUnicodeComboMark(a)?-b:b}},getCharPairAdvance:function(a,b,c){return this.getCharAdvance(a,c)+this.font.getKerning(a,b)},getRenderedText:function(a){this.autoUpperCase&&(a=a.toUpperCase());return this.autoSize?
a:(a=a.split("\n"),this.wrap!=wf.NONE?this.autoWrap(a).join("\n"):this.cutLines(a).join("\n"))},autoWrap:function(a){for(var b=[],c,d=0;d<a.length;){var f=a[d];++d;c=[];this.splitLineIntoWords(f,c);f=this.wrap;switch(f._hx_index){case 0:throw J.thrown("autoWrap called with wrap:NONE");case 1:this.wrapLineByCharacter(c,b);break;case 2:this.wrapLineByWord(c,b,f.splitWords)}}return b},splitLineIntoWords:function(a,b){for(var c="",d=!1,f=va.get_length(a),g=0;g<f;){var k=va.charCodeAt(a,g);32==k||9==k?
(d||(d=!0,""!=c&&(b.push(c),c="")),c+=String.fromCodePoint(k)):45==k?(d&&""!=c?(d=!1,b.push(c),b.push("-")):d||b.push(c+String.fromCodePoint(k)),c=""):(d&&""!=c&&(d=!1,b.push(c),c=""),c+=String.fromCodePoint(k));++g}""!=c&&b.push(c)},wrapLineByWord:function(a,b,c){var d=this;if(0!=a.length){for(var f=this._fieldWidth-2*this.padding,g=this.font.minOffsetX,k=g,l="",m=null,z=0,h=0,p=function(a,b){null==b&&(b=-1);l+=a;k+=(0>b?d.getWordWidth(a):b)+d.letterSpacing},r=function(){""!=l&&b.push(l);l="";k=
g},w=function(){var a=[];for(d.wrapLineByCharacter([l,m],a);1<a.length;)b.push(a.shift());l=a.shift();k=g+d.getWordWidth(l);h+=1};h<a.length;)if(m=a[h],z=this.getWordWidth(m),k+z<=f)p(m,z),h+=1;else{var u=va.charCodeAt(m,0);if(32==u||9==u)r(),h+=1;else{u=g+z<=f;switch(c._hx_index){case 0:r();p(m,z);h+=1;break;case 1:u?(r(),p(m,z),h+=1):w();break;case 2:m.length>=c.minChars?w():(r(),p(m,z),h+=1);break;case 3:z>=c.minPixels?w():(r(),p(m,z),h+=1)}k>f&&r()}}""!=l&&b.push(l)}},wrapLineByCharacter:function(a,
b){if(0!=a.length){for(var c=this.font.minOffsetX,d="",f=c,g=0;g<a.length;){var k=a[g];++g;for(var l=0,m=va.get_length(k);l<m;){var z=l++;z=va.charAt(k,z);var h=this.getCharWidth(z);f+=h;if(f<=this._fieldWidth-2*this.padding)d+=z,f+=this.letterSpacing;else if(f=va.charCodeAt(k,0),32==f||9==f){b.push(d);d="";f=c;break}else""!=d&&b.push(d),d=z,f=c+h+this.letterSpacing}}""!=d&&b.push(d)}},getWordWidth:function(a){for(var b=0,c=0,d=va.get_length(a);c<d;){var f=c++;b+=this.getCharAdvance(va.charCodeAt(a,
f),this.font.spaceWidth)}return b+(va.get_length(a)-1)*this.letterSpacing},getCharWidth:function(a){return this.getCharAdvance(va.charCodeAt(a,0),this.font.spaceWidth)},updateTextBitmap:function(a){null==a&&(a=!1);this.computeTextSize();u.renderBlit&&(a=!1);a?u.renderTile&&this.textData.splice(0,this.textData.length):(this.textBitmap=ba.disposeIfNotEqual(this.textBitmap,this.frameWidth,this.frameHeight),null==this.textBitmap?this.textBitmap=new ma(this.frameWidth,this.frameHeight,!0,0):this.textBitmap.fillRect(this.textBitmap.rect,
0),this.textBitmap.lock());this._fieldWidth=this.frameWidth;for(var b,c,d,f=0,g=this._lines.length;f<g;){var k=f++;b=this._linesWidth[k];c=this.font.minOffsetX;d=k*(this.font.lineHeight+this.lineSpacing)+this.padding;c="center"==this.alignment?c+((this.frameWidth-b)/2|0):"right"==this.alignment?c+(this.frameWidth-b-this.padding):c+this.padding;this.drawLine(this._lines[k],c,d,a)}a||this.textBitmap.unlock();this.pendingTextBitmapChange=!1},drawLine:function(a,b,c,d){null==d&&(d=!1);u.renderBlit&&(d=
!1);d?this.tileLine(a,b,c):this.blitLine(a,b,c)},blitLine:function(a,b,c){var d=[];for(this.addLineData(a,b,c,d);0<d.length;)c=d.shift()|0,a=d.shift(),b=d.shift(),c=this.font.charMap.h[c],this._flashPoint.setTo(a,b),c.paint(this.textBitmap,this._flashPoint,!0)},tileLine:function(a,b,c){u.renderTile&&this.addLineData(a,b,c,this.textData)},addLineData:function(a,b,c,d){var f=d.length,g=va.get_length(a),k=this.get_textWidth(),l=this.font.spaceWidth;if("justify"==this.alignment){l=this.getStringWidth(a);
var m=this.countSpaces(a);l=(k-l+m*this.font.spaceWidth)/m|0}for(k=0;k<g;){var z=k++;m=va.charCodeAt(a,z);var h=32==m||9==m,p=this.font.charMap.h.hasOwnProperty(m);p&&!h&&(d[f++]=m,d[f++]=b,d[f++]=c);if(p||h)z+1<g?(z=va.charCodeAt(a,z+1),b+=this.getCharPairAdvance(m,z,l)+this.letterSpacing):b+=this.getCharAdvance(m,l)+this.letterSpacing}},countSpaces:function(a){for(var b=va.get_length(a),c=0;0<b--;){var d=va.charCodeAt(a,b);32==d?++c:9==d&&(c+=this.numSpacesInTab)}return c},updatePixels:function(a){null==
a&&(a=!1);this.pendingPixelsChange=!1;var b=this.background?this.backgroundColor:0,c=null;if(u.renderBlit)null==this.get_pixels()||this.frameWidth!=this.get_pixels().width||this.frameHeight!=this.get_pixels().height?this.set_pixels(new ma(this.frameWidth,this.frameHeight,!0,b)):this.get_pixels().fillRect(this.graphic.bitmap.rect,b),c=this.get_pixels();else{a?(this.textDrawData.splice(0,this.textDrawData.length),this.borderDrawData.splice(0,this.borderDrawData.length)):(null==this.framePixels||this.frameWidth!=
this.framePixels.width||this.frameHeight!=this.framePixels.height?(this.framePixels=ba.dispose(this.framePixels),this.framePixels=new ma(this.frameWidth,this.frameHeight,!0,b)):this.framePixels.fillRect(this.framePixels.rect,b),c=this.framePixels);var d=this.set_width(Math.abs(this.scale.x)*this.frameWidth),f=this.set_height(Math.abs(this.scale.y)*this.frameHeight);b=this.offset;d=-.5*(d-this.frameWidth);f=-.5*(f-this.frameHeight);null==f&&(f=0);null==d&&(d=0);b.set_x(d);b.set_y(f);b=this.origin;
d=.5*this.frameWidth;f=.5*this.frameHeight;null==f&&(f=0);null==d&&(d=0);b.set_x(d);b.set_y(f)}a||c.lock();b=this.borderSize*this.borderQuality|0;0>=b&&(b=1);d=this.borderSize/b|0;f=this.borderStyle;switch(f._hx_index){case 1:if(1!=this._shadowOffset.x||1!=this._shadowOffset.y){f=Math.round(Math.abs(this._shadowOffset.x)*this.borderQuality);0>=f&&(f=1);var g=Math.round(Math.abs(this._shadowOffset.y)*this.borderQuality);0>=g&&(g=1);d=Math.round(this._shadowOffset.x/f);var k=Math.round(this._shadowOffset.y/
g);for(b=0;b<g;)for(var l=b++,m=0,z=f;m<z;){var h=m++;this.drawText(d*(h+1),k*(l+1),!1,c,a)}}else for(f=1>this.borderQuality?1:Math.abs(this.borderSize)*this.borderQuality|0,b=this.borderSize/f,d=f+1;1<d--;)this.drawText(b*d|0,b*d|0,!1,c,a);break;case 2:b=f.offsetX;k=f.offsetY;f=Math.max(b,k);f=1>this.borderQuality?1:f*this.borderQuality|0;for(d=f+1;1<d--;)this.drawText(b/f*d|0,k/f*d|0,!1,c,a);break;case 3:for(f=0;f<b;)k=f++,k=d*(k+1),this.drawText(-k,-k,!1,c,a),this.drawText(0,-k,!1,c,a),this.drawText(k,
-k,!1,c,a),this.drawText(-k,0,!1,c,a),this.drawText(k,0,!1,c,a),this.drawText(-k,k,!1,c,a),this.drawText(0,k,!1,c,a),this.drawText(k,k,!1,c,a);break;case 4:for(f=0;f<b;)k=f++,k=d*(k+1),this.drawText(-k,-k,!1,c,a),this.drawText(k,-k,!1,c,a),this.drawText(-k,k,!1,c,a),this.drawText(k,k,!1,c,a)}this.drawText(0,0,!0,c,a);a||c.unlock();u.renderBlit&&(this.dirty=!0);if(this.pendingPixelsChange)throw J.thrown("pendingPixelsChange was changed to true while processing changed pixels");},drawText:function(a,
b,c,d,f){null==f&&(f=!1);null==c&&(c=!0);u.renderBlit&&(f=!1);f?this.tileText(a,b,c):this.blitText(a,b,c,d)},blitText:function(a,b,c,d){null==c&&(c=!0);this._matrix.identity();this._matrix.translate(a,b);a=-1;c&&this.useTextColor?a=this.textColor:c||(a=this.borderColor);Rc.setMultipliers(this._colorParams,(a>>16&255)/255,(a>>8&255)/255,(a&255)/255,(a>>24&255)/255);c&&!this.useTextColor?(this._flashRect.setTo(0,0,this.textBitmap.width,this.textBitmap.height),d.copyPixels(this.textBitmap,this._flashRect,
this._flashPointZero,null,null,!0)):d.draw(this.textBitmap,this._matrix,this._colorParams)},tileText:function(a,b,c){null==c&&(c=!0);if(u.renderTile){c=c?this.textDrawData:this.borderDrawData;var d=c.length,f,g=this.textData.length/3|0,k=V._pool.get(),l=f=0,m=0,z=0;null==z&&(z=0);null==m&&(m=0);null==l&&(l=0);null==f&&(f=0);k.x=f;k.y=l;k.width=m;k.height=z;l=k;l._inPool=!1;for(m=0;m<g;)f=3*m++,k=!0,null!=this.clipRect&&(k=this.clipRect,l.x=k.x,l.y=k.y,l.width=k.width,l.height=k.height,k._weak&&!k._inPool&&
(k._inPool=!0,k._weak=!1,V._pool.putUnsafe(k)),k=l,z=-this.textData[f+2]-b,k.x+=-this.textData[f+1]-a,k.y+=z,k=2!=this.font.charMap.h[this.textData[f]|0].clipTo(l).type),k&&(c[d++]=this.textData[f],c[d++]=this.textData[f+1]+a,c[d++]=this.textData[f+2]+b);l._inPool||(l._inPool=!0,l._weak=!1,V._pool.putUnsafe(l))}},setBorderStyle:function(a,b,c,d){null==d&&(d=1);null==c&&(c=1);null==b&&(b=0);this.set_borderStyle(a);this.set_borderColor(b);this.set_borderSize(c);this.set_borderQuality(d);this.borderStyle==
ue.SHADOW&&(a=this._shadowOffset,c=b=this.borderSize,null==c&&(c=0),null==b&&(b=0),a.set_x(b),a.set_y(c));this.pendingTextBitmapChange=!0},get_fieldWidth:function(){return this.autoSize?this.get_textWidth():this._fieldWidth},set_fieldWidth:function(a){1>=a&&(a=1);a!=this._fieldWidth&&(0>=a&&this.set_autoSize(!0),this.pendingTextChange=!0);return this._fieldWidth=a},set_alignment:function(a){this.alignment!=a&&"justify"!=this.alignment&&(this.pendingTextBitmapChange=!0);return this.alignment=a},set_multiLine:function(a){this.multiLine!=
a&&(this.pendingTextChange=!0);return this.multiLine=a},set_font:function(a){this.font!=a&&(this.pendingTextChange=!0);return this.font=a},set_lineSpacing:function(a){this.lineSpacing!=a&&(this.pendingTextBitmapChange=!0);return this.lineSpacing=a},set_letterSpacing:function(a){a!=this.letterSpacing&&(this.pendingTextChange=!0);return this.letterSpacing=a},set_autoUpperCase:function(a){this.autoUpperCase!=a&&(this.pendingTextChange=!0);return this.autoUpperCase=a},set_wrap:function(a){this.wrap!=
a&&(this.pendingTextChange=!0);return this.wrap=a},get_wordWrap:function(){return this.wrap!=wf.NONE},set_wordWrap:function(a){this.set_wrap(a?wf.WORD(jh.NEVER):wf.NONE);return a},get_wrapByWord:function(){return 2==this.wrap._hx_index?!0:!1},set_wrapByWord:function(a){this.set_wrap(a?wf.WORD(jh.NEVER):wf.CHAR);return a},set_autoSize:function(a){this.autoSize!=a&&(this.pendingTextChange=!0);return this.autoSize=a},set_padding:function(a){a!=this.padding&&(this.pendingTextChange=!0);return this.padding=
a},set_numSpacesInTab:function(a){this.numSpacesInTab!=a&&0<a&&(this.numSpacesInTab=a,this.pendingTextChange=!0);return a},set_background:function(a){this.background!=a&&(this.background=a,u.renderBlit&&(this.pendingPixelsChange=!0));return a},set_backgroundColor:function(a){this.backgroundColor!=a&&(this.backgroundColor=a,u.renderBlit&&(this.pendingPixelsChange=!0));return a},set_borderStyle:function(a){a!=this.borderStyle&&(this.borderStyle=a,this.pendingTextBitmapChange=!0);return this.borderStyle},
set_borderColor:function(a){this.borderColor!=a&&(this.borderColor=a,u.renderBlit&&(this.pendingPixelsChange=!0));return a},set_borderSize:function(a){a!=this.borderSize&&(this.borderSize=a,this.borderStyle!=ue.NONE&&(this.pendingTextBitmapChange=!0));return a},set_borderQuality:function(a){a=Math.min(1,Math.max(0,a));a!=this.borderQuality&&(this.borderQuality=a,this.borderStyle!=ue.NONE&&(this.pendingTextBitmapChange=!0));return a},get_numLines:function(){return this._lines.length},get_textWidth:function(){var a=
0,b=this._lines.length;this._linesWidth=[];for(var c=0;c<b;){var d=c++;var f=this.getLineWidth(d);this._linesWidth[d]=f;a<=f&&(a=f)}return a},get_textHeight:function(){return(this.get_lineHeight()+this.lineSpacing)*this._lines.length-this.lineSpacing},get_lineHeight:function(){return this.font.lineHeight},get_width:function(){this.checkPendingChanges(!0);return R.prototype.get_width.call(this)},get_height:function(){this.checkPendingChanges(!0);return R.prototype.get_height.call(this)},get_shadowOffset:function(){return this._shadowOffset},
isUnicodeComboMark:function(a){return 768<=a&&879>=a||6832<=a&&6911>=a||7616<=a&&7679>=a||8400<=a&&8447>=a?!0:65056<=a?65071>=a:!1},__class__:ih,__properties__:x(R.prototype.__properties__,{set_fieldWidth:"set_fieldWidth",get_fieldWidth:"get_fieldWidth",get_numLines:"get_numLines",set_multiLine:"set_multiLine",set_backgroundColor:"set_backgroundColor",set_background:"set_background",get_shadowOffset:"get_shadowOffset",set_borderQuality:"set_borderQuality",set_borderSize:"set_borderSize",set_borderColor:"set_borderColor",
set_borderStyle:"set_borderStyle",set_useTextColor:"set_useTextColor",set_textColor:"set_textColor",set_numSpacesInTab:"set_numSpacesInTab",get_lineHeight:"get_lineHeight",get_textHeight:"get_textHeight",get_textWidth:"get_textWidth",set_padding:"set_padding",set_autoSize:"set_autoSize",set_wrapByWord:"set_wrapByWord",get_wrapByWord:"get_wrapByWord",set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_wrap:"set_wrap",set_autoUpperCase:"set_autoUpperCase",set_letterSpacing:"set_letterSpacing",
set_lineSpacing:"set_lineSpacing",set_alignment:"set_alignment",set_text:"set_text",set_font:"set_font"})});var wf=G["flixel.text.Wrap"]={__ename__:"flixel.text.Wrap",__constructs__:null,NONE:{_hx_name:"NONE",_hx_index:0,__enum__:"flixel.text.Wrap",toString:t},CHAR:{_hx_name:"CHAR",_hx_index:1,__enum__:"flixel.text.Wrap",toString:t},WORD:(n=function(a){return{_hx_index:2,splitWords:a,__enum__:"flixel.text.Wrap",toString:t}},n._hx_name="WORD",n.__params__=["splitWords"],n)};wf.__constructs__=[wf.NONE,
wf.CHAR,wf.WORD];var jh=G["flixel.text.WordSplitConditions"]={__ename__:"flixel.text.WordSplitConditions",__constructs__:null,NEVER:{_hx_name:"NEVER",_hx_index:0,__enum__:"flixel.text.WordSplitConditions",toString:t},LINE_WIDTH:{_hx_name:"LINE_WIDTH",_hx_index:1,__enum__:"flixel.text.WordSplitConditions",toString:t},LENGTH:(n=function(a){return{_hx_index:2,minChars:a,__enum__:"flixel.text.WordSplitConditions",toString:t}},n._hx_name="LENGTH",n.__params__=["minChars"],n),WIDTH:(n=function(a){return{_hx_index:3,
minPixels:a,__enum__:"flixel.text.WordSplitConditions",toString:t}},n._hx_name="WIDTH",n.__params__=["minPixels"],n)};jh.__constructs__=[jh.NEVER,jh.LINE_WIDTH,jh.LENGTH,jh.WIDTH];var Dc=function(a,b,c,d,f,g){null==g&&(g=!0);null==f&&(f=8);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this._hasBorderAlpha=!1;this._regen=!0;this._formatRanges=[];var k=0,l=0;null==l&&(l=0);null==k&&(k=0);null==l&&(l=0);null==k&&(k=0);l=N.pool.get().set(k,l);l._inPool=!1;this._graphicOffset=l;l=k=1;null==l&&(l=0);null==
k&&(k=0);null==l&&(l=0);null==k&&(k=0);l=N.pool.get().set(k,l);l._inPool=!1;this._shadowOffset=l;this._autoHeight=!0;this.borderSize=this.borderQuality=1;this.borderColor=0;this.borderStyle=ue.NONE;this.text="";R.call(this,a,b);null==d||""==d?(this.set_text(""),d=" "):this.set_text(d);this.textField=new zd;this.textField.set_selectable(!1);this.textField.set_multiline(!0);this.textField.set_wordWrap(!0);this._defaultFormat=new Id(null,f,16777215);this.set_letterSpacing(0);this.set_font(Ec.FONT_DEFAULT);
this._formatAdjusted=new Id;this.textField.set_defaultTextFormat(this._defaultFormat);this.textField.set_text(d);this.set_fieldWidth(c);this.textField.set_embedFonts(g);this.textField.set_sharpness(100);this.textField.set_height(0>=d.length?1:10);this.set_allowCollisions(0);this.set_moves(!1);this.drawFrame()};h["flixel.text.FlxText"]=Dc;Dc.__name__="flixel.text.FlxText";Dc.__super__=R;Dc.prototype=x(R.prototype,{text:null,borderStyle:null,borderColor:null,borderSize:null,borderQuality:null,textField:null,
_autoHeight:null,_shadowOffset:null,_graphicOffset:null,_defaultFormat:null,_formatAdjusted:null,_formatRanges:null,_font:null,_regen:null,_borderPixels:null,_borderColorTransform:null,_hasBorderAlpha:null,destroy:function(){this._formatAdjusted=this._defaultFormat=this._font=this.textField=null;this._shadowOffset=ba.put(this._shadowOffset);this._graphicOffset=ba.put(this._graphicOffset);R.prototype.destroy.call(this)},drawFrame:function(a){null==a&&(a=!1);this._regen=this._regen||a;R.prototype.drawFrame.call(this,
this._regen)},stampOnAtlas:function(a){this.regenGraphic();a=a.addNode(this.graphic.bitmap,this.graphic.key);var b=null!=a;null!=a&&this.set_frames(a.getImageFrame());return b},applyMarkup:function(a,b){if(null==b||0==b.length)return this;this.clearFormats();for(var c=[],d=[],f=[],g=0,k=0;k<b.length;){var l=b[k];++k;if(null!=l.marker&&null!=l.format){var m=!1,z=va.get_length(l.marker);if(-1!=a.indexOf(l.marker)){for(var h=0,p=va.get_length(a);h<p;){var r=h++;va.substr(a,r,z)==l.marker&&(m?(m=!1,d.push(r)):
(m=!0,c.push(r),f.push(l)))}m&&d.push(-1);++g}}}for(k=0;k<b.length;)l=b[k],++k,a=O.replace(a,l.marker,"");k=0;for(h=c.length;k<h;){g=k++;b=c[g];z=va.get_length(f[g].marker);p=0;for(l=c.length;p<l;)m=p++,c[m]>b&&(c[m]-=z),d[m]>b&&(d[m]-=z);b=d[g];g=0;for(p=c.length;g<p;)l=g++,c[l]>b&&(c[l]-=z),d[l]>b&&(d[l]-=z)}this.set_text(a);k=0;for(h=c.length;k<h;)g=k++,this.addFormat(f[g].format,c[g],d[g]);return this},addFormat:function(a,b,c){null==c&&(c=-1);null==b&&(b=-1);this._formatRanges.push(new Ym(a,
b,c));this._formatRanges.sort(function(a,b){return a.range.start<b.range.start?-1:1});this._regen=!0;return this},removeFormat:function(a,b,c){for(var d=this._formatRanges.length;0<d--;){var f=this._formatRanges[d];if(f.format==a){if(null!=b&&null!=c){var g=f.range;if(b>=g.end||c<=g.start)continue;if(b>g.start&&c<g.end){this.addFormat(f.format,c+1,g.end);g.end=b;continue}if(b<=g.start&&c<g.end){g.start=c;continue}if(b>g.start&&c>=g.end){g.end=b;continue}}y.remove(this._formatRanges,f)}}this._regen=
!0;return this},clearFormats:function(){this._formatRanges=[];this.textField.set_defaultTextFormat(this._defaultFormat);this.textField.setTextFormat(this._defaultFormat);this._regen=!0;return this},setFormat:function(a,b,c,d,f,g,k){null==k&&(k=!0);null==g&&(g=0);null==c&&(c=-1);null==b&&(b=8);null==f&&(f=ue.NONE);k?this.set_font(a):null!=a&&this.set_systemFont(a);this.set_size(b);this.set_color(c);null!=d&&this.set_alignment(d);c=g;null==c&&(c=0);this.set_borderStyle(f);this.set_borderColor(c);this.set_borderSize(1);
this.set_borderQuality(1);this.textField.set_defaultTextFormat(this._defaultFormat);this.textField.setTextFormat(this._defaultFormat);this._regen=!0;return this},setBorderStyle:function(a,b,c,d){null==d&&(d=1);null==c&&(c=1);null==b&&(b=0);this.set_borderStyle(a);this.set_borderColor(b);this.set_borderSize(c);this.set_borderQuality(d);return this},updateHitbox:function(){this.regenGraphic();R.prototype.updateHitbox.call(this)},getScreenBounds:function(a,b){this.regenGraphic();return R.prototype.getScreenBounds.call(this,
a,b)},set_fieldWidth:function(a){if(null==this.textField)return a;0>=a?(this.set_wordWrap(!1),this.set_autoSize(!0),this._autoHeight=!0):(this.set_autoSize(!1),this.set_wordWrap(!0),this.textField.set_width(a));this._regen=!0;return a},get_fieldWidth:function(){return null!=this.textField?this.textField.get_width():0},get_fieldHeight:function(){return null!=this.textField?this.textField.get_height():0},set_fieldHeight:function(a){if(null==this.textField)return a;0>=a?this._autoHeight=!0:(this._autoHeight=
!1,this.textField.set_height(a));this._regen=!0;return a},set_autoSize:function(a){null!=this.textField&&(this.textField.set_autoSize(a?1:2),this._regen=!0);return a},get_autoSize:function(){return null!=this.textField?2!=this.textField.get_autoSize():!1},set_text:function(a){this.text=a;if(null!=this.textField){var b=this.textField.get_text();this.textField.set_text(a);this._regen=this.textField.get_text()!=b||this._regen}return a},get_size:function(){return this._defaultFormat.size|0},set_size:function(a){this._defaultFormat.size=
a;this.textField.set_defaultTextFormat(this._defaultFormat);this.textField.setTextFormat(this._defaultFormat);this._regen=!0;return a},get_letterSpacing:function(){return this._defaultFormat.letterSpacing},set_letterSpacing:function(a){this._defaultFormat.letterSpacing=a;this.textField.set_defaultTextFormat(this._defaultFormat);this.textField.setTextFormat(this._defaultFormat);this._regen=!0;return a},set_color:function(a){if(this._defaultFormat.color==(a&16777215))return a;this._defaultFormat.color=
a&16777215;this.color=a;this.textField.set_defaultTextFormat(this._defaultFormat);this.textField.setTextFormat(this._defaultFormat);this._regen=!0;return a},get_font:function(){return this._font},set_font:function(a){this.textField.set_embedFonts(!0);if(null!=a){var b=a;u.assets.exists(a,"font")&&(b=u.assets.getAssetUnsafe(a,"font",!0).name);this._defaultFormat.font=b}else this._defaultFormat.font=Ec.FONT_DEFAULT;this.textField.set_defaultTextFormat(this._defaultFormat);this.textField.setTextFormat(this._defaultFormat);
this._regen=!0;return this._font=this._defaultFormat.font},get_embedded:function(){return this.textField.get_embedFonts()},get_systemFont:function(){return this._defaultFormat.font},set_systemFont:function(a){this.textField.set_embedFonts(!1);this._defaultFormat.font=a;this.textField.set_defaultTextFormat(this._defaultFormat);this.textField.setTextFormat(this._defaultFormat);this._regen=!0;return a},get_bold:function(){return this._defaultFormat.bold},set_bold:function(a){this._defaultFormat.bold!=
a&&(this._defaultFormat.bold=a,this.textField.set_defaultTextFormat(this._defaultFormat),this.textField.setTextFormat(this._defaultFormat),this._regen=!0);return a},get_italic:function(){return this._defaultFormat.italic},set_italic:function(a){this._defaultFormat.italic!=a&&(this._defaultFormat.italic=a,this.textField.set_defaultTextFormat(this._defaultFormat),this.textField.setTextFormat(this._defaultFormat),this._regen=!0);return a},get_underline:function(){return this._defaultFormat.underline},
set_underline:function(a){this._defaultFormat.underline!=a&&(this._defaultFormat.underline=a,this.textField.set_defaultTextFormat(this._defaultFormat),this.textField.setTextFormat(this._defaultFormat),this._regen=!0);return a},get_wordWrap:function(){return this.textField.get_wordWrap()},set_wordWrap:function(a){this.textField.get_wordWrap()!=a&&(this.textField.set_wordWrap(a),this._regen=!0);return a},get_alignment:function(){return dj.fromOpenFL(this._defaultFormat.align)},set_alignment:function(a){this._defaultFormat.align=
dj.toOpenFL(a);this.textField.set_defaultTextFormat(this._defaultFormat);this.textField.setTextFormat(this._defaultFormat);this._regen=!0;return a},set_borderStyle:function(a){a!=this.borderStyle&&(this._regen=!0);return this.borderStyle=a},set_borderColor:function(a){this.borderColor!=a&&this.borderStyle!=ue.NONE&&(this._regen=!0);this._hasBorderAlpha=1>(a>>24&255)/255;return this.borderColor=a},set_borderSize:function(a){a!=this.borderSize&&this.borderStyle!=ue.NONE&&(this._regen=!0);return this.borderSize=
a},set_borderQuality:function(a){a=0>a?0:a;a=1<a?1:a;a!=this.borderQuality&&this.borderStyle!=ue.NONE&&(this._regen=!0);return this.borderQuality=a},set_graphic:function(a){var b=this.graphic;a=R.prototype.set_graphic.call(this,a);u.bitmap.removeIfNoUse(b);return a},get_width:function(){this.regenGraphic();return R.prototype.get_width.call(this)},get_height:function(){this.regenGraphic();return R.prototype.get_height.call(this)},get_shadowOffset:function(){return this._shadowOffset},updateColorTransform:function(){null==
this.colorTransform&&(this.colorTransform=new Ub);1!=this.alpha?(this.colorTransform.alphaMultiplier=this.alpha,this.useColorTransform=!0):(this.colorTransform.alphaMultiplier=1,this.useColorTransform=!1);this.dirty=!0},regenGraphic:function(){if(null!=this.textField&&this._regen){var a=null!=this.graphic?this.graphic.width:0,b=null!=this.graphic?this.graphic.height:4,c=this.textField.get_width(),d=this._autoHeight?this.textField.get_textHeight()+4:this.textField.get_height(),f=0,g=0,k=this.borderStyle;
switch(k._hx_index){case 1:1!=this._shadowOffset.x||1!=this._shadowOffset.y?(f+=Math.abs(this._shadowOffset.x),g+=Math.abs(this._shadowOffset.y)):(f+=Math.abs(this.borderSize),g+=Math.abs(this.borderSize));break;case 2:var l=k.offsetY;f+=Math.abs(k.offsetX);g+=Math.abs(l);break;case 3:case 4:f+=2*Math.abs(this.borderSize),g+=2*Math.abs(this.borderSize)}f=Math.ceil(c+f);g=Math.ceil(d+g);0==this.textField.get_textHeight()||a==f&&b==g?(this.graphic.bitmap.fillRect(this._flashRect,0),this._hasBorderAlpha&&
(null==this._borderPixels?this._borderPixels=new ma(this.frameWidth,this.frameHeight,!0):this._borderPixels.fillRect(this._flashRect,0))):(a=u.bitmap.getUniqueKey("text"),this.makeGraphic(f,g,0,!1,a),this.set_width(Math.ceil(c)),this.set_height(Math.ceil(d)),this._hasBorderAlpha&&(this._borderPixels=this.graphic.bitmap.clone()),this._autoHeight&&this.textField.set_height(g),this._flashRect.x=0,this._flashRect.y=0,this._flashRect.width=f,this._flashRect.height=g);null!=this.textField&&null!=this.textField.get_text()&&
(this.copyTextFormat(this._defaultFormat,this._formatAdjusted),this._matrix.identity(),this.applyBorderStyle(),this._hasBorderAlpha&&(null==this._borderColorTransform&&(this._borderColorTransform=new Ub),this._borderColorTransform.alphaMultiplier=(this.borderColor>>24&255)/255,this._borderPixels.colorTransform(this._borderPixels.rect,this._borderColorTransform),this.graphic.bitmap.draw(this._borderPixels)),this.applyFormats(this._formatAdjusted,!1),this.drawTextFieldTo(this.graphic.bitmap));this._regen=
!1;this.set_frame(this.frame)}},drawTextFieldTo:function(a){a.draw(this.textField,this._matrix)},draw:function(){this.regenGraphic();R.prototype.draw.call(this)},drawSimple:function(a){var b=this.getScreenPosition(this._point,a),c=this.offset,d=c.x,f=c.y;null==f&&(f=0);null==d&&(d=0);b.set_x(b.x-d);b.set_y(b.y-f);c._weak&&c.put();c=this._graphicOffset;d=c.x;f=c.y;null==f&&(f=0);null==d&&(d=0);b.set_x(b.x-d);b.set_y(b.y-f);c._weak&&c.put();this.isPixelPerfectRender(a)&&(b=this._point,b.set_x(Math.floor(b.x)),
b.set_y(Math.floor(b.y)));b=this._point;c=this._flashPoint;null==c&&(c=new Ya);c.x=b.x;c.y=b.y;a.copyPixels(this._frame,this.framePixels,this._flashRect,this._flashPoint,this.colorTransform,this.blend,this.antialiasing)},drawComplex:function(a){var b=this.flipX!=this._frame.flipX,c=this.flipY!=this._frame.flipY;this._frame.prepareMatrix(this._matrix,0,null!=this.animation._curAnim?b!=this.animation._curAnim.flipX:b,null!=this.animation._curAnim?c!=this.animation._curAnim.flipY:c);this._matrix.translate(-this.origin.x,
-this.origin.y);this._matrix.scale(this.scale.x,this.scale.y);if(0>=this.bakedRotationAngle&&(this._angleChanged&&(b=Math.PI/180*this.angle,this._sinAngle=Math.sin(b),this._cosAngle=Math.cos(b),this._angleChanged=!1),0!=this.angle)){b=this._matrix;c=this._cosAngle;var d=this._sinAngle,f=b.a*c-b.b*d;b.b=b.a*d+b.b*c;b.a=f;f=b.c*c-b.d*d;b.d=b.c*d+b.d*c;b.c=f;f=b.tx*c-b.ty*d;b.ty=b.tx*d+b.ty*c;b.tx=f}c=this.getScreenPosition(this._point,a);b=this.offset;d=b.x;f=b.y;null==f&&(f=0);null==d&&(d=0);c.set_x(c.x-
d);c.set_y(c.y-f);b._weak&&b.put();b=this._graphicOffset;d=b.x;f=b.y;null==f&&(f=0);null==d&&(d=0);c.set_x(c.x-d);c.set_y(c.y-f);b._weak&&b.put();c=this._point;d=this.origin.x;f=this.origin.y;null==f&&(f=0);null==d&&(d=0);c.set_x(c.x+d);c.set_y(c.y+f);this._matrix.translate(this._point.x,this._point.y);this.isPixelPerfectRender(a)&&(this._matrix.tx=Math.floor(this._matrix.tx),this._matrix.ty=Math.floor(this._matrix.ty));a.drawPixels(this._frame,this.framePixels,this._matrix,this.colorTransform,this.blend,
this.antialiasing,this.shader)},calcFrame:function(a){null==a&&(a=!1);null==this.textField||u.renderTile&&!a||(this.regenGraphic(),R.prototype.calcFrame.call(this,a))},applyBorderStyle:function(){var a=this.borderStyle;switch(a._hx_index){case 0:a=this._graphicOffset;var b=0,c=0;null==c&&(c=0);null==b&&(b=0);a.set_x(b);a.set_y(c);break;case 1:1!=this._shadowOffset.x||1!=this._shadowOffset.y?(this._graphicOffset.set_x(0<this._shadowOffset.x?this._shadowOffset.x:0),this._graphicOffset.set_y(0<this._shadowOffset.y?
this._shadowOffset.y:0)):0>this.borderSize&&(a=this._graphicOffset,b=-this.borderSize,c=-this.borderSize,null==c&&(c=0),null==b&&(b=0),a.set_x(b),a.set_y(c));break;case 2:b=a.offsetX;a=a.offsetY;this._graphicOffset.set_x(0>b?-b:0);this._graphicOffset.set_y(0>a?-a:0);break;case 3:case 4:0>this.borderSize?(a=this._graphicOffset,b=-this.borderSize,c=-this.borderSize):(a=this._graphicOffset,c=b=0),null==c&&(c=0),null==b&&(b=0),a.set_x(b),a.set_y(c)}this._matrix.translate(this._graphicOffset.x,this._graphicOffset.y);
a=this.borderStyle;switch(a._hx_index){case 1:if(1!=this._shadowOffset.x||1!=this._shadowOffset.y){this.applyFormats(this._formatAdjusted,!0);a=1>this.borderQuality?1:Math.abs(this.borderSize)*this.borderQuality|0;b=this.borderSize/a;for(var d=0;d<a;)d++,c=this._hasBorderAlpha?this._borderPixels:this.graphic.bitmap,this._matrix.translate(b,b),this.drawTextFieldTo(c);this._matrix.translate(-this._shadowOffset.x*this.borderSize,-this._shadowOffset.y*this.borderSize)}else{this.applyFormats(this._formatAdjusted,
!0);var f=this._matrix.tx,g=this._matrix.ty;a=1>this.borderQuality?1:Math.abs(this.borderSize)*this.borderQuality|0;for(b=a+1;1<b--;)c=this._hasBorderAlpha?this._borderPixels:this.graphic.bitmap,this._matrix.translate(this.borderSize/a*b,this.borderSize/a*b),this.drawTextFieldTo(c),this._matrix.tx=f,this._matrix.ty=g}break;case 2:d=a.offsetX;var k=a.offsetY;this.applyFormats(this._formatAdjusted,!0);f=this._matrix.tx;g=this._matrix.ty;a=Math.max(d,k);a=1>this.borderQuality?1:a*this.borderQuality|
0;for(b=a+1;1<b--;)c=this._hasBorderAlpha?this._borderPixels:this.graphic.bitmap,this._matrix.translate(d/a*b,k/a*b),this.drawTextFieldTo(c),this._matrix.tx=f,this._matrix.ty=g;break;case 3:this.applyFormats(this._formatAdjusted,!0);a=this.borderSize*this.borderQuality|0;a=1>a?1:a;for(b=a+1;1<b--;)d=this.borderSize/a*b,c=this._hasBorderAlpha?this._borderPixels:this.graphic.bitmap,this._matrix.translate(-d,-d),this.drawTextFieldTo(c),c=this._hasBorderAlpha?this._borderPixels:this.graphic.bitmap,this._matrix.translate(d,
0),this.drawTextFieldTo(c),c=this._hasBorderAlpha?this._borderPixels:this.graphic.bitmap,this._matrix.translate(d,0),this.drawTextFieldTo(c),c=this._hasBorderAlpha?this._borderPixels:this.graphic.bitmap,this._matrix.translate(0,d),this.drawTextFieldTo(c),c=this._hasBorderAlpha?this._borderPixels:this.graphic.bitmap,this._matrix.translate(0,d),this.drawTextFieldTo(c),c=this._hasBorderAlpha?this._borderPixels:this.graphic.bitmap,this._matrix.translate(-d,0),this.drawTextFieldTo(c),c=this._hasBorderAlpha?
this._borderPixels:this.graphic.bitmap,this._matrix.translate(-d,0),this.drawTextFieldTo(c),c=this._hasBorderAlpha?this._borderPixels:this.graphic.bitmap,this._matrix.translate(0,-d),this.drawTextFieldTo(c),this._matrix.translate(d,0);break;case 4:for(this.applyFormats(this._formatAdjusted,!0),a=this.borderSize*this.borderQuality|0,a=1>a?1:a,b=a+1;1<b--;)d=this.borderSize/a*b,c=this._hasBorderAlpha?this._borderPixels:this.graphic.bitmap,this._matrix.translate(-d,-d),this.drawTextFieldTo(c),c=this._hasBorderAlpha?
this._borderPixels:this.graphic.bitmap,this._matrix.translate(2*d,0),this.drawTextFieldTo(c),c=this._hasBorderAlpha?this._borderPixels:this.graphic.bitmap,this._matrix.translate(0,2*d),this.drawTextFieldTo(c),c=this._hasBorderAlpha?this._borderPixels:this.graphic.bitmap,this._matrix.translate(2*-d,0),this.drawTextFieldTo(c),this._matrix.translate(d,-d)}},applyBorderTransparency:function(){this._hasBorderAlpha&&(null==this._borderColorTransform&&(this._borderColorTransform=new Ub),this._borderColorTransform.alphaMultiplier=
(this.borderColor>>24&255)/255,this._borderPixels.colorTransform(this._borderPixels.rect,this._borderColorTransform),this.graphic.bitmap.draw(this._borderPixels))},copyTextWithOffset:function(a,b){var c=this._hasBorderAlpha?this._borderPixels:this.graphic.bitmap;this._matrix.translate(a,b);this.drawTextFieldTo(c)},applyFormats:function(a,b){null==b&&(b=!1);this.copyTextFormat(this._defaultFormat,a,!1);a.color=b?this.borderColor&16777215:this._defaultFormat.color;this.textField.setTextFormat(a);for(var c=
0,d=this._formatRanges;c<d.length;){var f=d[c];++c;if(this.textField.get_text().length-1<f.range.start)break;else{var g=f.format.format;this.copyTextFormat(g,a,!1);a.color=b?f.format.borderColor&16777215:g.color}this.textField.setTextFormat(a,f.range.start,Math.min(f.range.end,this.textField.get_text().length)|0)}},copyTextFormat:function(a,b,c){null==c&&(c=!0);b.font=a.font;b.bold=a.bold;b.italic=a.italic;b.underline=a.underline;b.size=a.size;b.color=a.color;b.leading=a.leading;c&&(b.align=a.align)},
dtfCopy:function(){var a=this.textField.get_defaultTextFormat();return new Id(a.font,a.size,a.color,a.bold,a.italic,a.underline,a.url,a.target,a.align)},updateDefaultFormat:function(){this.textField.set_defaultTextFormat(this._defaultFormat);this.textField.setTextFormat(this._defaultFormat);this._regen=!0},set_frames:function(a){R.prototype.set_frames.call(this,a);this._regen=!1;return a},__class__:Dc,__properties__:x(R.prototype.__properties__,{get_shadowOffset:"get_shadowOffset",set_autoSize:"set_autoSize",
get_autoSize:"get_autoSize",set_fieldHeight:"set_fieldHeight",get_fieldHeight:"get_fieldHeight",set_fieldWidth:"set_fieldWidth",get_fieldWidth:"get_fieldWidth",set_borderQuality:"set_borderQuality",set_borderSize:"set_borderSize",set_borderColor:"set_borderColor",set_borderStyle:"set_borderStyle",set_alignment:"set_alignment",get_alignment:"get_alignment",set_wordWrap:"set_wordWrap",get_wordWrap:"get_wordWrap",set_underline:"set_underline",get_underline:"get_underline",set_italic:"set_italic",get_italic:"get_italic",
set_bold:"set_bold",get_bold:"get_bold",set_systemFont:"set_systemFont",get_systemFont:"get_systemFont",get_embedded:"get_embedded",set_font:"set_font",get_font:"get_font",set_letterSpacing:"set_letterSpacing",get_letterSpacing:"get_letterSpacing",set_size:"set_size",get_size:"get_size",set_text:"set_text"})});var Ek=function(){};h["flixel.text.IFlxInputText"]=Ek;Ek.__name__="flixel.text.IFlxInputText";Ek.__isInterface__=!0;Ek.prototype={editable:null,startFocus:null,endFocus:null,dispatchTypingAction:null,
__class__:Ek};var qe=function(a,b,c,d,f,g,k,l,m){null==l&&(l=!0);null==k&&(k=-1);null==g&&(g=-16777216);null==f&&(f=8);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this._mouseDown=!1;this._lastPressTime=this._scrollVCounter=0;this._selectionIndex=-1;this._selectionFormat=new Id;this._selectionBoxes=[];this._justGainedFocus=this._regenBackground=this._regenCaretSize=!1;this._caretTimer=0;this._caretIndex=-1;this.useSelectedTextFormat=!0;this.selectionColor=-16777216;this.selectedTextColor=-1;this.selectable=
!0;this.onTextChange=new Vh;this.onScrollChange=new Vh;this.onFocusChange=new md;this.onEnter=new md;this.mouseWheelEnabled=!0;this.hasFocus=!1;this.forceCase=0;this.filterMode=yh.NONE;this.fieldBorderThickness=1;this.fieldBorderColor=-16777216;this.editable=!0;this.caretWidth=1;this.backgroundColor=-1;this.background=!1;Dc.call(this,a,b,c,d,f,l);if(null==d||""==d)this.textField.set_text(""),this._regen=!0;this.set_backgroundColor(k);0!=this.textField.get_multiline()&&this.textField.set_multiline(!1);
this.set_wordWrap(!1);this.textField.set_type(1);this._selectionFormat.color=this.selectedTextColor;this._caret=(new R).makeGraphic(1,1);this._caret.set_visible(!1);this.updateCaretSize();this.updateCaretPosition();this.set_color(g);0!=k&&this.set_background(!0);null==m&&(m=qe.globalManager);this.manager=m;m.registerInputText(this)};h["flixel.text.FlxInputText"]=qe;qe.__name__="flixel.text.FlxInputText";qe.__interfaces__=[Ek];qe.globalManager=null;qe.__super__=Dc;qe.prototype=x(Dc.prototype,{background:null,
backgroundColor:null,caretColor:null,caretWidth:null,editable:null,fieldBorderColor:null,fieldBorderThickness:null,filterMode:null,forceCase:null,hasFocus:null,mouseWheelEnabled:null,onEnter:null,onFocusChange:null,onScrollChange:null,onTextChange:null,selectable:null,selectedTextColor:null,selectionColor:null,useSelectedTextFormat:null,manager:null,_backgroundSprite:null,_caret:null,_caretIndex:null,_caretTimer:null,_fieldBorderSprite:null,_justGainedFocus:null,_pointerCamera:null,_regenBackground:null,
_regenCaretSize:null,_selectionBoxes:null,_selectionFormat:null,_selectionIndex:null,_lastPressTime:null,_scrollVCounter:null,_mouseDown:null,_currentTouch:null,_lastTouchX:null,_lastTouchY:null,setManager:function(a){if(null==this.manager)u.log.advanced("Cannot set manager once destroyed",La.ERROR,!0);else if(a!=this.manager){var b=this.manager.focus==this;this.manager.unregisterInputText(this);a.registerInputText(this);b&&a.setFocus(this);this.manager=a}},startFocus:function(){if(!this.hasFocus){this.hasFocus=
!0;var a=this.getLimeBounds(this._pointerCamera);ha.get_current().stage.window.setTextInputRect(a);this.manager.setFocus(this);0>this._caretIndex&&(this._selectionIndex=this._caretIndex=this.text.length,this.updateSelection(!0));this.restartCaretTimer();this._justGainedFocus=!0;this.onFocusChange.dispatch(this.hasFocus)}},endFocus:function(){this.hasFocus&&(this.hasFocus=!1,this.manager.focus==this&&this.manager.setFocus(null),this._selectionIndex!=this._caretIndex&&(this._selectionIndex=this._caretIndex,
this.updateSelection(!0)),this.onFocusChange.dispatch(this.hasFocus))},update:function(a){Dc.prototype.update.call(this,a);this._caretTimer+=a;this._caret.set_visible(.6>this._caretTimer%1.2&&this.hasFocus&&this.editable&&this._selectionIndex==this._caretIndex&&this.isCaretLineVisible());this.visible&&(this.updateMouseInput(a)||this.updateTouchInput(a));this._justGainedFocus&&(this._justGainedFocus=!1)},draw:function(){this.regenGraphic();this.drawSprite(this._fieldBorderSprite);this.drawSprite(this._backgroundSprite);
for(var a=0,b=this._selectionBoxes;a<b.length;){var c=b[a];++a;this.drawSprite(c)}Dc.prototype.draw.call(this);this.drawSprite(this._caret)},destroy:function(){this.endFocus();this.manager.unregisterInputText(this);ba.destroy(this.onEnter);ba.destroy(this.onFocusChange);ba.destroy(this.onScrollChange);ba.destroy(this.onTextChange);this._backgroundSprite=ba.destroy(this._backgroundSprite);this._caret=ba.destroy(this._caret);this._fieldBorderSprite=ba.destroy(this._fieldBorderSprite);for(this._pointerCamera=
null;0<this._selectionBoxes.length;)ba.destroy(this._selectionBoxes.pop());this._currentTouch=this._selectionFormat=this._selectionBoxes=null;Dc.prototype.destroy.call(this)},applyFormats:function(a,b){null==b&&(b=!1);var c=this.textField.get_scrollH(),d=this.textField.get_scrollV();Dc.prototype.applyFormats.call(this,a,b);!b&&this.useSelectedTextFormat&&this.get_selectionEndIndex()>this.get_selectionBeginIndex()&&this.textField.setTextFormat(this._selectionFormat,this.get_selectionBeginIndex(),this.get_selectionEndIndex());
this.textField.set_scrollH(c);this.textField.set_scrollV(d)},regenGraphic:function(){var a=this._regen;Dc.prototype.regenGraphic.call(this);this._regenCaretSize&&this.updateCaretSize();a&&this.updateSelectionSprites();this._regenBackground&&this.regenBackground()},dispatchTypingAction:function(a){switch(a._hx_index){case 0:a=a.text;this.editable&&this.addText(a);break;case 1:this.moveCursor(a.type,a.shiftKey);break;case 2:this.runCommand(a.cmd)}},replaceSelectedText:function(a){null==a&&(a="");if(""!=
a||this._selectionIndex!=this._caretIndex){var b=this.get_selectionBeginIndex(),c=this.get_selectionEndIndex();b==c&&0<this.textField.get_maxChars()&&this.text.length==this.textField.get_maxChars()||(0>b&&(b=0),this.replaceText(b,c,a))}},setSelection:function(a,b){this._selectionIndex=a;this._caretIndex=b;null!=this.textField&&this.updateSelection()},addText:function(a){a=this.filterText(a,!0);0<a.length&&(this.replaceSelectedText(a),this.onTextChange.dispatch(this.text,"input"))},clipSprite:function(a,
b){null==b&&(b=!1);if(null!=a){var c=a.clipRect;if(null==c){var d=V._pool.get(),f=0,g=0,k=0,l=0;null==l&&(l=0);null==k&&(k=0);null==g&&(g=0);null==f&&(f=0);d.x=f;d.y=g;d.width=k;d.height=l;d._inPool=!1;c=d}g=f=0;k=a.get_width();l=a.get_height();null==l&&(l=0);null==k&&(k=0);null==g&&(g=0);null==f&&(f=0);c.x=f;c.y=g;c.width=k;c.height=l;b?(f=-this.fieldBorderThickness,g=-this.fieldBorderThickness,k=this.get_width()+2*this.fieldBorderThickness,l=this.get_height()+2*this.fieldBorderThickness,null==l&&
(l=0),null==k&&(k=0),null==g&&(g=0),null==f&&(f=0),d=V._pool.get(),b=f):(g=f=0,k=this.get_width(),l=this.get_height(),null==l&&(l=0),null==k&&(k=0),null==g&&(g=0),null==f&&(f=0),d=V._pool.get(),b=f);null==l&&(l=0);null==k&&(k=0);null==g&&(g=0);null==b&&(b=0);d.x=b;d.y=g;d.width=k;d.height=l;d._inPool=!1;null!=this.clipRect&&(d=d.clipTo(this.clipRect));d.x+=this.x-a.x;d.y+=this.y-a.y;a.set_clipRect(c.clipTo(d));d._inPool||(d._inPool=!0,d._weak=!1,V._pool.putUnsafe(d))}},drawSprite:function(a){if(null!=
a&&a.visible){var b=a.scrollFactor,c=this.scrollFactor,d=c.x,f=c.y;null==f&&(f=0);null==d&&(d=0);b.set_x(d);b.set_y(f);c._weak&&c.put();a._cameras=this._cameras;a.draw()}},filterText:function(a,b){1==this.forceCase?a=a.toUpperCase():2==this.forceCase&&(a=a.toLowerCase());if(this.filterMode!=yh.NONE){b=this.filterMode;switch(b._hx_index){case 1:b=new E("[^a-zA-Z]*","g");break;case 2:b=new E("[^0-9]*","g");break;case 3:b=new E("[^a-zA-Z0-9]*","g");break;case 4:b=b.reg;break;case 5:b=b.chars;b=O.replace(O.replace(O.replace(b,
"\\","\\\\"),"-","\\-"),"]","\\]");b=new E("[^"+b+"]*","g");break;default:throw J.thrown("Unknown filterMode ("+M.string(this.filterMode)+")");}null!=b&&(a=a.replace(b.r,""))}return a},getCaretOffsetX:function(){switch(dj.fromOpenFL(this._defaultFormat.align)){case "center":return this.get_width()/2;case "right":return this.get_width()-2;default:return 2}},getCharAtPosition:function(a,b){2>a&&(a=2);b>this.textField.get_textHeight()&&(b=this.textField.get_textHeight());2>b&&(b=2);for(var c=0,d=this.textField.get_numLines();c<
d;){var f=c++,g=2+this.getLineY(f),k=this.textField.getLineOffset(f),l=this.textField.getLineMetrics(f).height;if(b>=g&&b<=g+l){d=this.textField.getLineLength(f);b=k+d;for(c=0;c<d;){f=c++;g=this.getCharBoundaries(k+f);if(null==g)return k+f;if(a<=g.get_right()){if(a<=g.x+g.width/2)return k+f;if(k+f<b)return k+f+1;break}}return b}}return this.text.length},getCharBoundaries:function(a){a=this.textField.getCharBoundaries(a);return null==a?null:a},getCharIndexOnDifferentLine:function(a,b){if(0>a||a>this.text.length||
0>b||b>this.textField.get_numLines()-1)return-1;a=this.getCharBoundaries(a-1);a=null!=a?a.get_right():2;b=2+this.getLineY(b)+this.textField.getLineMetrics(b).height/2;return this.getCharAtPosition(a,b)},getLineIndexOfChar:function(a){return a==this.text.length?this.textField.get_numLines()-1:this.textField.getLineIndexOfChar(a)},getLineY:function(a){for(var b=0,c=0;c<a;){var d=c++;b+=this.textField.getLineMetrics(d).height}return b},getLimeBounds:function(a){null==a&&(a=u.camera);var b=this.getScreenBounds(null,
a);b.x=b.x*a.totalScaleX-.5*a.width*(a.scaleX-a.initialZoom)*u.scaleMode.scale.x+u.game.get_x();b.y=b.y*a.totalScaleY-.5*a.height*(a.scaleY-a.initialZoom)*u.scaleMode.scale.y+u.game.get_y();b.width*=a.totalScaleX;b.height*=a.totalScaleY;return new Uc(b.x,b.y,b.width,b.height)},getScrollVOffset:function(){return this.getLineY(this.textField.get_scrollV()-1)},isCaretLineVisible:function(){if(0==this.text.length)return!0;var a=this.getLineIndexOfChar(this._caretIndex);return a>=this.textField.get_scrollV()-
1?a<=this.textField.get_bottomScrollV()-1:!1},moveCursor:function(a,b){switch(a._hx_index){case 0:0<this._caretIndex&&this._caretIndex--;b||(this._selectionIndex=this._caretIndex);this.setSelection(this._selectionIndex,this._caretIndex);this.restartCaretTimer();break;case 1:this._caretIndex<this.text.length&&this._caretIndex++;b||(this._selectionIndex=this._caretIndex);this.setSelection(this._selectionIndex,this._caretIndex);this.restartCaretTimer();break;case 2:a=this.getLineIndexOfChar(this._caretIndex);
0<a&&(this._caretIndex=this.getCharIndexOnDifferentLine(this._caretIndex,a-1));b||(this._selectionIndex=this._caretIndex);this.setSelection(this._selectionIndex,this._caretIndex);this.restartCaretTimer();break;case 3:a=this.getLineIndexOfChar(this._caretIndex);a<this.textField.get_numLines()-1&&(this._caretIndex=this.getCharIndexOnDifferentLine(this._caretIndex,a+1));b||(this._selectionIndex=this._caretIndex);this.setSelection(this._selectionIndex,this._caretIndex);this.restartCaretTimer();break;
case 4:this._caretIndex=0;b||(this._selectionIndex=this._caretIndex);this.setSelection(this._selectionIndex,this._caretIndex);this.restartCaretTimer();break;case 5:this._caretIndex=this.text.length;b||(this._selectionIndex=this._caretIndex);this.setSelection(this._selectionIndex,this._caretIndex);this.restartCaretTimer();break;case 6:this._caretIndex=this.textField.getLineOffset(this.getLineIndexOfChar(this._caretIndex));b||(this._selectionIndex=this._caretIndex);this.setSelection(this._selectionIndex,
this._caretIndex);this.restartCaretTimer();break;case 7:a=this.getLineIndexOfChar(this._caretIndex);a<this.textField.get_numLines()-1?this._caretIndex=this.textField.getLineOffset(a+1)-1:this._caretIndex=this.text.length;b||(this._selectionIndex=this._caretIndex);this.setSelection(this._selectionIndex,this._caretIndex);this.restartCaretTimer();break;case 8:if(0<this._caretIndex){for(this._caretIndex--;0<this._caretIndex&&-1!=qe.DELIMITERS.indexOf(this.text.charAt(this._caretIndex));)this._caretIndex--;
for(;0<this._caretIndex&&-1==qe.DELIMITERS.indexOf(this.text.charAt(this._caretIndex-1));)this._caretIndex--}b||(this._selectionIndex=this._caretIndex);this.setSelection(this._selectionIndex,this._caretIndex);this.restartCaretTimer();break;case 9:for(;this._caretIndex<this.text.length&&-1==qe.DELIMITERS.indexOf(this.text.charAt(this._caretIndex));)this._caretIndex++;for(;this._caretIndex<this.text.length&&-1!=qe.DELIMITERS.indexOf(this.text.charAt(this._caretIndex));)this._caretIndex++;b||(this._selectionIndex=
this._caretIndex);this.setSelection(this._selectionIndex,this._caretIndex);this.restartCaretTimer()}},regenBackground:function(){this.background&&(this._regenBackground=!1,0<this.fieldBorderThickness?(this._fieldBorderSprite.makeGraphic((this.get_fieldWidth()|0)+2*this.fieldBorderThickness,(this.get_fieldHeight()|0)+2*this.fieldBorderThickness,this.fieldBorderColor),this._fieldBorderSprite.set_visible(!0)):this._fieldBorderSprite.set_visible(!1),0<(this.backgroundColor>>24&255)?(this._backgroundSprite.makeGraphic(this.get_fieldWidth()|
0,this.get_fieldHeight()|0,this.backgroundColor),this._backgroundSprite.set_visible(!0)):this._backgroundSprite.set_visible(!1),this.updateBackgroundPosition())},replaceText:function(a,b,c){b<a||0>a||b>this.text.length||null==c||(this.set_text(this.text.substring(0,a)+c+this.text.substring(b)),this._selectionIndex=this._caretIndex=a+c.length,this.setSelection(this._selectionIndex,this._caretIndex),this.restartCaretTimer())},runCommand:function(a){switch(a._hx_index){case 0:this.editable&&this.textField.get_multiline()?
this.addText("\n"):this.restartCaretTimer();this.onEnter.dispatch(this.text);break;case 1:if(!this.editable)break;this._selectionIndex==this._caretIndex&&0<this._caretIndex&&(this._selectionIndex=this._caretIndex-1);this._selectionIndex!=this._caretIndex?(this.replaceSelectedText(""),this._selectionIndex=this._caretIndex,this.onTextChange.dispatch(this.text,"backspace")):this.restartCaretTimer();break;case 2:if(!this.editable)break;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.onTextChange.dispatch(this.text,"delete")):this.restartCaretTimer();break;case 3:this._caretIndex==this._selectionIndex||this.textField.get_displayAsPassword()||Qc.set_text(this.text.substring(this._caretIndex,this._selectionIndex));break;case 4:this.editable&&this._caretIndex!=this._selectionIndex&&!this.textField.get_displayAsPassword()&&(Qc.set_text(this.text.substring(this._caretIndex,
this._selectionIndex)),this.replaceSelectedText(""));break;case 5:this.editable&&null!=Qc.get_text()&&this.addText(Qc.get_text());break;case 6:this._selectionIndex=0,this._caretIndex=this.text.length,this.setSelection(this._selectionIndex,this._caretIndex)}},restartCaretTimer:function(){this._caretTimer=0},updateBackgroundPosition:function(){this.background&&(this._fieldBorderSprite.setPosition(this.x-this.fieldBorderThickness,this.y-this.fieldBorderThickness),this._backgroundSprite.setPosition(this.x,
this.y),this.clipSprite(this._fieldBorderSprite,!0),this.clipSprite(this._backgroundSprite))},updateCaretPosition:function(){if(null!=this.textField&&null!=this._caret){if(0==this.text.length)this._caret.setPosition(this.x+this.getCaretOffsetX(),this.y+2);else{var a=this.getCharBoundaries(this._caretIndex-1);null!=a?this._caret.setPosition(this.x+a.get_right()-this.textField.get_scrollH(),this.y+a.y-this.getScrollVOffset()):(a=this.getCharBoundaries(this._caretIndex),null!=a?this._caret.setPosition(this.x+
a.x-this.textField.get_scrollH(),this.y+a.y-this.getScrollVOffset()):this._caret.setPosition(this.x+this.getCaretOffsetX(),this.y+2+this.getLineY(this.getLineIndexOfChar(this._caretIndex))-this.getScrollVOffset()))}this.clipSprite(this._caret)}},updateCaretSize:function(){if(null!=this._caret){this._regenCaretSize=!1;var a=this.get_height()-4;0<this.text.length&&(a=this.textField.getLineMetrics(0).height);this._caret.makeGraphic(this.caretWidth,a|0);this.clipSprite(this._caret)}},updateSelection:function(a){null==
a&&(a=!1);var b=this.textField.get_scrollH(),c=this.textField.get_scrollV();this.textField.setSelection(this._selectionIndex,this._caretIndex);this._regen=!0;a?(this.set_scrollH(b),this.set_scrollV(c)):this.textField.get_scrollH()==b&&this.textField.get_scrollV()==c||this.onScrollChange.dispatch(this.textField.get_scrollH(),this.textField.get_scrollV())},updateSelectionBoxes:function(){if(null!=this.textField&&null!=this._selectionBoxes){for(var a=this.textField.get_bottomScrollV()-this.textField.get_scrollV()+
1;this._selectionBoxes.length>a;){var b=this._selectionBoxes.pop();null!=b&&b.destroy()}if(this._caretIndex==this._selectionIndex){a=0;for(var c=this._selectionBoxes;a<c.length;)b=c[a],++a,null!=b&&b.set_visible(!1)}else{var d=this.getLineIndexOfChar(this.get_selectionBeginIndex()),f=this.getLineIndexOfChar(this.get_selectionEndIndex()),g=this.textField.get_scrollV()-1,k=this.getScrollVOffset();a=g;for(c=this.textField.get_bottomScrollV();a<c;){var l=a++,m=l-g;b=this._selectionBoxes[m];if(l>=d&&l<=
f){var z=this.textField.getLineOffset(l);l=z+this.textField.getLineLength(l);var h=this.get_selectionBeginIndex();z=z>h?z:h;h=this.get_selectionEndIndex();var p=l>h?h:l;l=this.getCharBoundaries(z);h=this.getCharBoundaries(p-1);null==h&&p>z&&(h=this.getCharBoundaries(p-2));if(null!=l&&null!=h&&1E-7>=Math.abs(l.y-h.y)){null==b&&(b=this._selectionBoxes[m]=new R,b.set_color(this.selectionColor));p=l.x-this.textField.get_scrollH();z=l.y-k;h=h.get_right()-l.x;l=l.height;null==l&&(l=0);null==h&&(h=0);null==
z&&(z=0);null==p&&(p=0);m=V._pool.get();null==l&&(l=0);null==h&&(h=0);null==z&&(z=0);null==p&&(p=0);m.x=p;m.y=z;m.width=h;m.height=l;m._inPool=!1;h=z=0;p=this.get_width();l=this.get_height();null==l&&(l=0);null==p&&(p=0);null==h&&(h=0);null==z&&(z=0);var r=l;null==r&&(r=0);null==p&&(p=0);null==h&&(h=0);null==z&&(z=0);l=V._pool.get();null==r&&(r=0);null==p&&(p=0);null==h&&(h=0);null==z&&(z=0);l.x=z;l.y=h;l.width=p;l.height=r;l._inPool=!1;l._weak=!0;m.clipTo(l);b.setPosition(this.x+m.x,this.y+m.y);
b.makeGraphic(m.width|0,m.height|0);this.clipSprite(b);b.set_visible(!0);m._inPool||(m._inPool=!0,m._weak=!1,V._pool.putUnsafe(m))}else null!=b&&b.set_visible(!1)}else null!=b&&b.set_visible(!1)}}}},updateSelectionSprites:function(){this.updateCaretPosition();this.updateSelectionBoxes()},updateSpritePositions:function(){this.updateBackgroundPosition();this.updateCaretPosition();this.updateSelectionBoxes()},updateMouseInput:function(a){var b=!1;if(this._mouseDown){if(this.updatePointerDrag(u.mouse,
a),a=u.mouse,a._prevX==a.x&&a._prevY==a.y||this.updatePointerMove(u.mouse),a=u.mouse._leftButton,0==a.current||-1==a.current)this.updatePointerRelease(u.mouse),this._mouseDown=!1}else-1==u.mouse._leftButton.current&&(this._lastPressTime=0);if(this.checkPointerOverlap(u.mouse)){if(b=!0,2==u.mouse._leftButton.current&&this.selectable&&(this._mouseDown=!0,this.updatePointerPress(u.mouse)),0!=u.mouse.wheel&&this.mouseWheelEnabled){a=this.textField.get_scrollV();var c=this.textField.get_scrollV()-u.mouse.wheel,
d=this.textField.get_maxScrollV();this.set_scrollV(c>d?d:c);this.textField.get_scrollV()!=a&&this.onScrollChange.dispatch(this.textField.get_scrollH(),this.textField.get_scrollV())}}else 2!=u.mouse._leftButton.current||this._justGainedFocus||this.endFocus();return b},updateTouchInput:function(a){var b=!1;if(null!=this._currentTouch){this.updatePointerDrag(this._currentTouch,a);if(this._lastTouchX!=this._currentTouch.x||this._lastTouchY!=this._currentTouch.y)this.updatePointerMove(this._currentTouch),
this._lastTouchX=this._currentTouch.x,this._lastTouchY=this._currentTouch.y;a=this._currentTouch.input;if(0==a.current||-1==a.current)this.updatePointerRelease(this._currentTouch),this._lastTouchY=this._lastTouchX=this._currentTouch=null}a=!1;for(var c=0,d=u.touches.list;c<d.length;){var f=d[c];++c;if(this.checkPointerOverlap(f)){b=!0;2==f.input.current&&this.selectable&&(this._currentTouch=f,this._lastTouchX=f.x,this._lastTouchY=f.y,this.updatePointerPress(f));break}else 2==f.input.current&&(a=!0,
this._lastPressTime=0)}a&&null==this._currentTouch&&!this._justGainedFocus&&this.endFocus();return b},checkPointerOverlap:function(a){var b=!1,c=0,d=0;null==d&&(d=0);null==c&&(c=0);c=N.pool.get().set(c,d);c._inPool=!1;d=0;for(var f=this.getCameras();d<f.length;){var g=f[d];++d;a.getWorldPosition(g,c);if(this.overlapsPoint(c,!0,g)){null==this._pointerCamera&&(this._pointerCamera=g);b=!0;break}}c.put();return b},updatePointerPress:function(a){this.startFocus();a=this.getRelativePosition(a);this._selectionIndex=
this._caretIndex=this.getCharAtPosition(a.x+this.textField.get_scrollH(),a.y+this.getScrollVOffset());this.updateSelection(!0);this.restartCaretTimer();a.put()},updatePointerDrag:function(a,b){a=this.getRelativePosition(a);var c=this.textField.get_scrollH(),d=this.textField.get_scrollV();a.x>this.get_width()-1?this.set_scrollH(this.textField.get_scrollH()+(Math.max(Math.min(.1*(a.x-this.get_width()),10),1)|0)):1>a.x&&this.set_scrollH(this.textField.get_scrollH()-(Math.max(Math.min(-.1*a.x,10),1)|
0));this._scrollVCounter+=b;.1<this._scrollVCounter&&(a.y>this.get_height()-2?this.set_scrollV(Math.min(this.textField.get_scrollV()+Math.max(Math.min(.03*(a.y-this.get_height()),5),1),this.textField.get_maxScrollV())|0):2>a.y&&this.set_scrollV(this.textField.get_scrollV()-(Math.max(Math.min(-.03*a.y,5),1)|0)),this._scrollVCounter=0);this.textField.get_scrollH()==c&&this.textField.get_scrollV()==d||this.onScrollChange.dispatch(this.textField.get_scrollH(),this.textField.get_scrollV())},updatePointerMove:function(a){if(!(0>
this._selectionIndex)){a=this.getRelativePosition(a);var b=this.getCharAtPosition(a.x+this.textField.get_scrollH(),a.y+this.getScrollVOffset());b!=this._caretIndex&&(this._caretIndex=b,this.updateSelection(!0),this.restartCaretTimer());a.put()}},updatePointerRelease:function(a){if(this.hasFocus){this.hasFocus&&this.restartCaretTimer();this._pointerCamera=null;var b=u.game.ticks;500>b-this._lastPressTime?(this.updatePointerDoublePress(a),this._lastPressTime=0):this._lastPressTime=b}},updatePointerDoublePress:function(a){a=
this.text.length;if(0<this.text.length&&0<=this._caretIndex&&a>=this._caretIndex){var b=-1,c=this._caretIndex;c=1<c?c:1;for(var d=0,f=qe.DELIMITERS;d<f.length;){var g=f[d];++d;var k=this.text.lastIndexOf(g,c-1);k>b&&(b=k+1);k=this.text.indexOf(g,c);k<a&&-1!=k&&(a=k)}b!=a&&this.setSelection(b,a)}},getRelativePosition:function(a){var b=this._pointerCamera,c=0,d=0;null==d&&(d=0);null==c&&(c=0);d=N.pool.get().set(c,d);d._inPool=!1;a=a.getWorldPosition(b,d);this.getScreenPosition(this._point,this._pointerCamera);
c=a.x-this._pointerCamera.scroll.x-this._point.x;d=a.y-this._pointerCamera.scroll.y-this._point.y;null==d&&(d=0);null==c&&(c=0);b=c;null==d&&(d=0);null==b&&(b=0);d=N.pool.get().set(b,d);d._inPool=!1;a.put();return d},set_bold:function(a){this._defaultFormat.bold!=a&&(Dc.prototype.set_bold.call(this,a),this._regenCaretSize=this._regenBackground=!0);return a},set_clipRect:function(a){Dc.prototype.set_clipRect.call(this,a);this.clipSprite(this._backgroundSprite);this.clipSprite(this._fieldBorderSprite,
!0);this.clipSprite(this._caret);for(var b=0,c=this._selectionBoxes;b<c.length;){var d=c[b];++b;this.clipSprite(d)}return a},set_color:function(a){this.color!=a&&(Dc.prototype.set_color.call(this,a),this.set_caretColor(a));return a},set_fieldHeight:function(a){this.get_fieldHeight()!=a&&(Dc.prototype.set_fieldHeight.call(this,a),this._regenBackground=!0);return a},set_fieldWidth:function(a){this.get_fieldWidth()!=a&&(Dc.prototype.set_fieldWidth.call(this,a),this._regenBackground=!0);return a},set_font:function(a){this._font!=
a&&(Dc.prototype.set_font.call(this,a),this._regenCaretSize=this._regenBackground=!0);return a},set_italic:function(a){this._defaultFormat.italic!=a&&(Dc.prototype.set_italic.call(this,a),this._regenCaretSize=this._regenBackground=!0);return a},set_size:function(a){(this._defaultFormat.size|0)!=a&&(Dc.prototype.set_size.call(this,a),this._regenCaretSize=this._regenBackground=!0);return a},set_systemFont:function(a){this._defaultFormat.font!=a&&(Dc.prototype.set_systemFont.call(this,a),this._regenCaretSize=
this._regenBackground=!0);return a},set_text:function(a){this.text!=a&&(Dc.prototype.set_text.call(this,a),null!=this.textField&&(this.hasFocus?(this.text.length<this._selectionIndex&&(this._selectionIndex=this.text.length),this.text.length<this._caretIndex&&(this._caretIndex=this.text.length)):this._caretIndex=this._selectionIndex=0,this.setSelection(this._selectionIndex,this._caretIndex),this.hasFocus&&this.restartCaretTimer()),this.get_autoSize()||this._autoHeight)&&(this._regenBackground=!0);
return a},set_x:function(a){this.x!=a&&(Dc.prototype.set_x.call(this,a),this.updateSpritePositions());return a},set_y:function(a){this.y!=a&&(Dc.prototype.set_y.call(this,a),this.updateSpritePositions());return a},set_background:function(a){this.background!=a&&((this.background=a)?(null==this._backgroundSprite&&(this._backgroundSprite=new R),null==this._fieldBorderSprite&&(this._fieldBorderSprite=new R),this._regenBackground=!0):(this._backgroundSprite=ba.destroy(this._backgroundSprite),this._fieldBorderSprite=
ba.destroy(this._fieldBorderSprite)));return a},set_backgroundColor:function(a){this.backgroundColor!=a&&(this.backgroundColor=a,this._regenBackground=!0);return a},get_bottomScrollV:function(){return this.textField.get_bottomScrollV()},set_caretColor:function(a){this.caretColor!=a&&(this.caretColor=a,this._caret.set_color(this.caretColor));return a},get_caretIndex:function(){return this._caretIndex},set_caretIndex:function(a){0>a&&(a=0);a>this.text.length&&(a=this.text.length);this._caretIndex!=
a&&(this._caretIndex=a,this.setSelection(this._caretIndex,this._caretIndex),this.restartCaretTimer());return a},set_caretWidth:function(a){1>a&&(a=1);this.caretWidth!=a&&(this.caretWidth=a,this._regenCaretSize=!0);return a},set_fieldBorderColor:function(a){this.fieldBorderColor!=a&&(this.fieldBorderColor=a,this._regenBackground=!0);return a},set_fieldBorderThickness:function(a){0>a&&(a=0);this.fieldBorderThickness!=a&&(this.fieldBorderThickness=a,this._regenBackground=!0);return a},set_filterMode:function(a){this.filterMode!=
a&&(this.filterMode=a,this.set_text(this.filterText(this.text)));return a},set_forceCase:function(a){this.forceCase!=a&&(this.forceCase=a,this.set_text(this.filterText(this.text)));return a},get_maxChars:function(){return this.textField.get_maxChars()},set_maxChars:function(a){this.textField.get_maxChars()!=a&&(this.textField.set_maxChars(a),this._regen=!0);return a},get_maxScrollH:function(){return this.textField.get_maxScrollH()},get_maxScrollV:function(){return this.textField.get_maxScrollV()},
get_multiline:function(){return this.textField.get_multiline()},set_multiline:function(a){this.textField.get_multiline()!=a&&this.textField.set_multiline(a);return a},get_passwordMode:function(){return this.textField.get_displayAsPassword()},set_passwordMode:function(a){this.textField.get_displayAsPassword()!=a&&(this.textField.set_displayAsPassword(a),this._regen=!0);return a},get_scrollH:function(){return this.textField.get_scrollH()},set_scrollH:function(a){this.textField.get_scrollH()!=a&&(this.textField.set_scrollH(a),
this._regen=!0);return a},get_scrollV:function(){return this.textField.get_scrollV()},set_scrollV:function(a){if(this.textField.get_scrollV()!=a||0==this.textField.get_scrollV())this.textField.set_scrollV(a),this._regen=!0;return a},set_selectedTextColor:function(a){this.selectedTextColor!=a&&(this.selectedTextColor=a,this._selectionFormat.color=this.selectedTextColor,this._regen=!0);return a},get_selectionBeginIndex:function(){var a=this._caretIndex,b=this._selectionIndex;return a>b?b:a},set_selectionColor:function(a){if(this.selectionColor!=
a){this.selectionColor=a;for(var b=0,c=this._selectionBoxes;b<c.length;){var d=c[b];++b;null!=d&&d.set_color(this.selectionColor)}}return a},get_selectionEndIndex:function(){var a=this._caretIndex,b=this._selectionIndex;return a>b?a:b},set_useSelectedTextFormat:function(a){this.useSelectedTextFormat!=a&&(this.useSelectedTextFormat=a,this._regen=!0);return a},__class__:qe,__properties__:x(Dc.prototype.__properties__,{set_useSelectedTextFormat:"set_useSelectedTextFormat",get_selectionEndIndex:"get_selectionEndIndex",
set_selectionColor:"set_selectionColor",get_selectionBeginIndex:"get_selectionBeginIndex",set_selectedTextColor:"set_selectedTextColor",set_scrollV:"set_scrollV",get_scrollV:"get_scrollV",set_scrollH:"set_scrollH",get_scrollH:"get_scrollH",set_passwordMode:"set_passwordMode",get_passwordMode:"get_passwordMode",set_multiline:"set_multiline",get_multiline:"get_multiline",get_maxScrollV:"get_maxScrollV",get_maxScrollH:"get_maxScrollH",set_maxChars:"set_maxChars",get_maxChars:"get_maxChars",set_forceCase:"set_forceCase",
set_filterMode:"set_filterMode",set_fieldBorderThickness:"set_fieldBorderThickness",set_fieldBorderColor:"set_fieldBorderColor",set_caretWidth:"set_caretWidth",set_caretIndex:"set_caretIndex",get_caretIndex:"get_caretIndex",set_caretColor:"set_caretColor",get_bottomScrollV:"get_bottomScrollV",set_backgroundColor:"set_backgroundColor",set_background:"set_background"})});var yh=G["flixel.text.FlxInputTextFilterMode"]={__ename__:"flixel.text.FlxInputTextFilterMode",__constructs__:null,NONE:{_hx_name:"NONE",
_hx_index:0,__enum__:"flixel.text.FlxInputTextFilterMode",toString:t},ALPHABET:{_hx_name:"ALPHABET",_hx_index:1,__enum__:"flixel.text.FlxInputTextFilterMode",toString:t},NUMERIC:{_hx_name:"NUMERIC",_hx_index:2,__enum__:"flixel.text.FlxInputTextFilterMode",toString:t},ALPHANUMERIC:{_hx_name:"ALPHANUMERIC",_hx_index:3,__enum__:"flixel.text.FlxInputTextFilterMode",toString:t},REG:(n=function(a){return{_hx_index:4,reg:a,__enum__:"flixel.text.FlxInputTextFilterMode",toString:t}},n._hx_name="REG",n.__params__=
["reg"],n),CHARS:(n=function(a){return{_hx_index:5,chars:a,__enum__:"flixel.text.FlxInputTextFilterMode",toString:t}},n._hx_name="CHARS",n.__params__=["chars"],n)};yh.__constructs__=[yh.NONE,yh.ALPHABET,yh.NUMERIC,yh.ALPHANUMERIC,yh.REG,yh.CHARS];var Dk=function(){this._mac=!1;this._registeredInputTexts=[];this.onTypingAction=new md;var a=B.navigator.userAgent.toUpperCase(),b=B.navigator.platform.toUpperCase();this._mac=-1!=a.indexOf("APPLEWEBKIT")||-1!=b.indexOf("MAC");Na.call(this)};h["flixel.text.FlxInputTextManager"]=
Dk;Dk.__name__="flixel.text.FlxInputTextManager";Dk.__super__=Na;Dk.prototype=x(Na.prototype,{focus:null,onTypingAction:null,_registeredInputTexts:null,_mac:null,destroy:function(){Na.prototype.destroy.call(this);this.focus=null;this._registeredInputTexts.length=0;this.removeEvents()},addEvents:function(){ha.get_current().stage.addEventListener("textInput",q(this,this.onTextInput));ha.get_current().stage.window.onKeyDown.add(q(this,this.onKeyDown),!1,1E3)},removeEvents:function(){ha.get_current().stage.removeEventListener("textInput",
q(this,this.onTextInput));ha.get_current().stage.window.onKeyDown.remove(q(this,this.onKeyDown))},registerInputText:function(a){-1==this._registeredInputTexts.indexOf(a)&&(this._registeredInputTexts.push(a),ha.get_current().stage.window.onKeyDown.has(q(this,this.onKeyDown))||this.addEvents())},unregisterInputText:function(a){-1!=this._registeredInputTexts.indexOf(a)&&(y.remove(this._registeredInputTexts,a),0==this._registeredInputTexts.length&&ha.get_current().stage.window.onKeyDown.has(q(this,this.onKeyDown))&&
this.removeEvents())},setFocus:function(a){this.focus!=a&&(null!=this.focus&&this.focus.endFocus(),this.focus=a,null!=this.focus&&this.focus.startFocus(),ha.get_current().stage.window.__backend.setTextInputEnabled(null!=this.focus))},onTextInput:function(a){1==a.text.length&&13==y.cca(a.text,0)||null==this.focus||this.dispatchTypingAction(rd.ADD_TEXT(a.text))},dispatchTypingAction:function(a){this.focus.dispatchTypingAction(a);this.onTypingAction.dispatch(a)},onKeyDown:function(a,b){if(null!=this.focus){var c=
this._mac?Ra.get_metaKey(b):Ra.get_ctrlKey(b),d=Ra.get_altKey(b);switch(a){case 8:this.dispatchTypingAction(rd.COMMAND(jf.DELETE_LEFT));break;case 97:c&&this.dispatchTypingAction(rd.COMMAND(jf.SELECT_ALL));break;case 99:c&&this.dispatchTypingAction(rd.COMMAND(jf.COPY));break;case 120:c&&this.dispatchTypingAction(rd.COMMAND(jf.CUT));break;case 127:this.dispatchTypingAction(rd.COMMAND(jf.DELETE_RIGHT));break;case 1073741898:!this._mac&&c?this.dispatchTypingAction(rd.MOVE_CURSOR(sd.TOP,Ra.get_shiftKey(b))):
this.dispatchTypingAction(rd.MOVE_CURSOR(sd.LINE_LEFT,Ra.get_shiftKey(b)));break;case 1073741901:!this._mac&&c?this.dispatchTypingAction(rd.MOVE_CURSOR(sd.BOTTOM,Ra.get_shiftKey(b))):this.dispatchTypingAction(rd.MOVE_CURSOR(sd.LINE_RIGHT,Ra.get_shiftKey(b)));break;case 1073741903:c?this.dispatchTypingAction(rd.MOVE_CURSOR(sd.LINE_RIGHT,Ra.get_shiftKey(b))):d?this.dispatchTypingAction(rd.MOVE_CURSOR(sd.WORD_RIGHT,Ra.get_shiftKey(b))):this.dispatchTypingAction(rd.MOVE_CURSOR(sd.RIGHT,Ra.get_shiftKey(b)));
break;case 1073741904:c?this.dispatchTypingAction(rd.MOVE_CURSOR(sd.LINE_LEFT,Ra.get_shiftKey(b))):d?this.dispatchTypingAction(rd.MOVE_CURSOR(sd.WORD_LEFT,Ra.get_shiftKey(b))):this.dispatchTypingAction(rd.MOVE_CURSOR(sd.LEFT,Ra.get_shiftKey(b)));break;case 1073741905:this._mac&&c?this.dispatchTypingAction(rd.MOVE_CURSOR(sd.BOTTOM,Ra.get_shiftKey(b))):this.dispatchTypingAction(rd.MOVE_CURSOR(sd.DOWN,Ra.get_shiftKey(b)));break;case 1073741906:this._mac&&c?this.dispatchTypingAction(rd.MOVE_CURSOR(sd.TOP,
Ra.get_shiftKey(b))):this.dispatchTypingAction(rd.MOVE_CURSOR(sd.UP,Ra.get_shiftKey(b)));break;case 13:case 1073741912:this.dispatchTypingAction(rd.COMMAND(jf.NEW_LINE))}if(32==a&&null!=u.keys.preventDefaultKeys&&-1!=u.keys.preventDefaultKeys.indexOf(32))this.onTextInput(new fe("textInput",!1,!1," "))}},get_isTyping:function(){return null!=this.focus?this.focus.editable:!1},__class__:Dk,__properties__:x(Na.prototype.__properties__,{get_isTyping:"get_isTyping"})});var rd=G["flixel.text.TypingAction"]=
{__ename__:"flixel.text.TypingAction",__constructs__:null,ADD_TEXT:(n=function(a){return{_hx_index:0,text:a,__enum__:"flixel.text.TypingAction",toString:t}},n._hx_name="ADD_TEXT",n.__params__=["text"],n),MOVE_CURSOR:(n=function(a,b){return{_hx_index:1,type:a,shiftKey:b,__enum__:"flixel.text.TypingAction",toString:t}},n._hx_name="MOVE_CURSOR",n.__params__=["type","shiftKey"],n),COMMAND:(n=function(a){return{_hx_index:2,cmd:a,__enum__:"flixel.text.TypingAction",toString:t}},n._hx_name="COMMAND",n.__params__=
["cmd"],n)};rd.__constructs__=[rd.ADD_TEXT,rd.MOVE_CURSOR,rd.COMMAND];var sd=G["flixel.text.MoveCursorAction"]={__ename__:"flixel.text.MoveCursorAction",__constructs__:null,LEFT:{_hx_name:"LEFT",_hx_index:0,__enum__:"flixel.text.MoveCursorAction",toString:t},RIGHT:{_hx_name:"RIGHT",_hx_index:1,__enum__:"flixel.text.MoveCursorAction",toString:t},UP:{_hx_name:"UP",_hx_index:2,__enum__:"flixel.text.MoveCursorAction",toString:t},DOWN:{_hx_name:"DOWN",_hx_index:3,__enum__:"flixel.text.MoveCursorAction",
toString:t},TOP:{_hx_name:"TOP",_hx_index:4,__enum__:"flixel.text.MoveCursorAction",toString:t},BOTTOM:{_hx_name:"BOTTOM",_hx_index:5,__enum__:"flixel.text.MoveCursorAction",toString:t},LINE_LEFT:{_hx_name:"LINE_LEFT",_hx_index:6,__enum__:"flixel.text.MoveCursorAction",toString:t},LINE_RIGHT:{_hx_name:"LINE_RIGHT",_hx_index:7,__enum__:"flixel.text.MoveCursorAction",toString:t},WORD_LEFT:{_hx_name:"WORD_LEFT",_hx_index:8,__enum__:"flixel.text.MoveCursorAction",toString:t},WORD_RIGHT:{_hx_name:"WORD_RIGHT",
_hx_index:9,__enum__:"flixel.text.MoveCursorAction",toString:t}};sd.__constructs__=[sd.LEFT,sd.RIGHT,sd.UP,sd.DOWN,sd.TOP,sd.BOTTOM,sd.LINE_LEFT,sd.LINE_RIGHT,sd.WORD_LEFT,sd.WORD_RIGHT];var jf=G["flixel.text.TypingCommand"]={__ename__:"flixel.text.TypingCommand",__constructs__:null,NEW_LINE:{_hx_name:"NEW_LINE",_hx_index:0,__enum__:"flixel.text.TypingCommand",toString:t},DELETE_LEFT:{_hx_name:"DELETE_LEFT",_hx_index:1,__enum__:"flixel.text.TypingCommand",toString:t},DELETE_RIGHT:{_hx_name:"DELETE_RIGHT",
_hx_index:2,__enum__:"flixel.text.TypingCommand",toString:t},COPY:{_hx_name:"COPY",_hx_index:3,__enum__:"flixel.text.TypingCommand",toString:t},CUT:{_hx_name:"CUT",_hx_index:4,__enum__:"flixel.text.TypingCommand",toString:t},PASTE:{_hx_name:"PASTE",_hx_index:5,__enum__:"flixel.text.TypingCommand",toString:t},SELECT_ALL:{_hx_name:"SELECT_ALL",_hx_index:6,__enum__:"flixel.text.TypingCommand",toString:t}};jf.__constructs__=[jf.NEW_LINE,jf.DELETE_LEFT,jf.DELETE_RIGHT,jf.COPY,jf.CUT,jf.PASTE,jf.SELECT_ALL];
var ao=function(a,b,c,d,f){this.format=new Id(null,null,a,b,c,f);this.borderColor=null==d?0:d};h["flixel.text.FlxTextFormat"]=ao;ao.__name__="flixel.text.FlxTextFormat";ao.prototype={leading:null,borderColor:null,format:null,set_leading:function(a){return this.format.leading=a},__class__:ao,__properties__:{set_leading:"set_leading"}};var Ym=function(a,b,c){this.range=new yf(b,c);this.format=a};h["flixel.text._FlxText.FlxTextFormatRange"]=Ym;Ym.__name__="flixel.text._FlxText.FlxTextFormatRange";Ym.prototype=
{range:null,format:null,__class__:Ym};var bo=function(a,b){this.format=a;this.marker=b};h["flixel.text.FlxTextFormatMarkerPair"]=bo;bo.__name__="flixel.text.FlxTextFormatMarkerPair";bo.prototype={format:null,marker:null,__class__:bo};var ue=G["flixel.text.FlxTextBorderStyle"]={__ename__:"flixel.text.FlxTextBorderStyle",__constructs__:null,NONE:{_hx_name:"NONE",_hx_index:0,__enum__:"flixel.text.FlxTextBorderStyle",toString:t},SHADOW:{_hx_name:"SHADOW",_hx_index:1,__enum__:"flixel.text.FlxTextBorderStyle",
toString:t},SHADOW_XY:(n=function(a,b){return{_hx_index:2,offsetX:a,offsetY:b,__enum__:"flixel.text.FlxTextBorderStyle",toString:t}},n._hx_name="SHADOW_XY",n.__params__=["offsetX","offsetY"],n),OUTLINE:{_hx_name:"OUTLINE",_hx_index:3,__enum__:"flixel.text.FlxTextBorderStyle",toString:t},OUTLINE_FAST:{_hx_name:"OUTLINE_FAST",_hx_index:4,__enum__:"flixel.text.FlxTextBorderStyle",toString:t}};ue.__constructs__=[ue.NONE,ue.SHADOW,ue.SHADOW_XY,ue.OUTLINE,ue.OUTLINE_FAST];var dj={fromOpenFL:function(a){if(null==
a)return"left";switch(a){case 0:return"center";case 2:return"justify";case 3:return"left";case 4:return"right";default:return"left"}},toOpenFL:function(a){switch(a){case "center":return 0;case "justify":return 2;case "left":return 3;case "right":return 4;default:return 3}}},kf=function(){this._startingIndex=this._drawIndex=this._collideIndex=0;this._tileObjects=[];this.widthInTiles=this.heightInTiles=this.totalTiles=0;this.auto=sg.OFF;Ha.call(this);this.flixelType=3;this.set_immovable(!0);this.set_moves(!1)};
h["flixel.tile.FlxBaseTilemap"]=kf;kf.__name__="flixel.tile.FlxBaseTilemap";kf.__super__=Ha;kf.prototype=x(Ha.prototype,{auto:null,widthInTiles:null,heightInTiles:null,totalTiles:null,customTileRemap:null,_randomIndices:null,_randomChoices:null,_randomLambda:null,_tileObjects:null,_startingIndex:null,_data:null,_drawIndex:null,_collideIndex:null,updateTile:function(a){throw J.thrown("updateTile must be implemented");},cacheGraphics:function(a,b,c){throw J.thrown("cacheGraphics must be implemented");
},initTileObjects:function(){throw J.thrown("initTileObjects must be implemented");},updateMap:function(){throw J.thrown("updateMap must be implemented");},computeDimensions:function(){throw J.thrown("computeDimensions must be implemented");},getColumnAt:function(a,b){throw J.thrown("getColumnAt must be implemented");},getRowAt:function(a,b){throw J.thrown("getRowAt must be implemented");},getColumnPos:function(a,b){throw J.thrown("getColumnPos must be implemented");},getRowPos:function(a,b){throw J.thrown("getRowPos must be implemented");
},getTileIndexByCoords:function(a){var b=a.y;a=this.getColumnAt(a.x);b=this.getRowAt(b);return 0<=a&&a<this.widthInTiles&&0<=b&&b<this.heightInTiles?b*this.widthInTiles+a:-1},getTileCoordsByIndex:function(a,b){null==b&&(b=!0);null==b&&(b=!1);if(0<=a&&a<this._data.length){var c=a/this.widthInTiles|0;null==b&&(b=!1);a=this.getColumnPos(a%this.widthInTiles,b);c=this.getRowPos(c,b);null==c&&(c=0);null==a&&(a=0);null==c&&(c=0);null==a&&(a=0);c=N.pool.get().set(a,c);c._inPool=!1;return c}return null},ray:function(a,
b,c){throw J.thrown("ray must be implemented");},rayStep:function(a,b,c,d){throw J.thrown("rayStep must be implemented?");},calcRayEntry:function(a,b,c){var d=0,f=0,g=0,k=0;null==k&&(k=0);null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);var l=V._pool.get();null==k&&(k=0);null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);l.x=d;l.y=f;l.width=g;l.height=k;l._inPool=!1;l._weak=!0;l=this.getBounds(l);l.width--;l.height--;return Wa.calcRectEntry(l,a,b,c)},calcRayExit:function(a,b,c){return this.calcRayEntry(b,a,
c)},isOverlappingTile:function(a,b,c){throw J.thrown("overlapsWithCallback must be implemented");},forEachOverlappingTile:function(a,b,c){throw J.thrown("overlapsWithCallback must be implemented");},overlapsWithCallback:function(a,b,c,d){null==c&&(c=!1);return this.objectOverlapsTiles(a,function(a,d){return c?b(d,a):b(a,d)},d)},objectOverlapsTiles:function(a,b,c,d){throw J.thrown("objectOverlapsTiles must be implemented");},setDirty:function(a){throw J.thrown("setDirty must be implemented");},destroy:function(){this._data=
null;Ha.prototype.destroy.call(this)},loadMapFromCSV:function(a,b,c,d,f,g,k,l){null==l&&(l=1);null==k&&(k=1);null==g&&(g=0);null==d&&(d=0);null==c&&(c=0);u.assets.exists(a)&&(a=u.assets.getAssetUnsafe(a,"text",!0));this._data=[];var m=[],z=0;for(a=(new E("[ \t]*((\r\n)|\r|\n)[ \t]*","g")).split(a);z<a.length;){var h=a[z];++z;""!=h&&m.push(h)}this.heightInTiles=m.length;for(z=this.widthInTiles=0;z<this.heightInTiles;)if(a=m[z],O.endsWith(a,",")&&(a=y.substr(a,0,a.length-1)),a=a.split(","),0==a.length)this.heightInTiles--;
else{0==this.widthInTiles&&(this.widthInTiles=a.length);for(h=0;h<this.widthInTiles;){var p=a[h],r=M.parseInt(p);if(null==r)throw J.thrown("String in row "+z+", column "+h+' is not a valid integer: "'+p+'"');this._data.push(r);++h}++z}this.loadMapHelper(b,c,d,f,g,k,l);return this},loadMapFromArray:function(a,b,c,d,f,g,k,l,m,z){null==z&&(z=1);null==m&&(m=1);null==l&&(l=0);null==g&&(g=0);null==f&&(f=0);this.widthInTiles=b;this.heightInTiles=c;this._data=a.slice();this.loadMapHelper(d,f,g,k,l,m,z);return this},
loadMapFrom2DArray:function(a,b,c,d,f,g,k,l){null==l&&(l=1);null==k&&(k=1);null==g&&(g=0);null==d&&(d=0);null==c&&(c=0);this.widthInTiles=a[0].length;this.heightInTiles=a.length;this._data=Hd.flatten2DArray_Int(a);this.loadMapHelper(b,c,d,f,g,k,l);return this},loadMapFromGraphic:function(a,b,c,d,f,g,k,l,m,z,h){null==h&&(h=1);null==z&&(z=1);null==m&&(m=0);null==k&&(k=0);null==g&&(g=0);null==c&&(c=1);null==b&&(b=!1);a=Ec.resolveBitmapData(a);b=ab.bitmapToCSV(a,b,c,d);return this.loadMapFromCSV(b,f,
g,k,l,m,z,h)},loadMapHelper:function(a,b,c,d,f,g,k){null==k&&(k=1);null==g&&(g=1);null==f&&(f=0);null==c&&(c=0);null==b&&(b=0);for(var l=0,m=this._data.length;l<m;){var z=l++;0>this._data[z]&&(this._data[z]=0)}this.totalTiles=this._data.length;this.auto=null==d?sg.OFF:d;this._startingIndex=0>=f?0:f;this.auto!=sg.OFF&&(k=g=this._startingIndex=1);this._drawIndex=g;this._collideIndex=k;this.applyAutoTile();this.applyCustomRemap();this.randomizeIndices();this.cacheGraphics(b,c,a);this.postGraphicLoad()},
postGraphicLoad:function(){this.initTileObjects();this.computeDimensions();this.updateMap()},applyAutoTile:function(){if(this.auto!=sg.OFF)for(var a=0;a<this.totalTiles;)this.autoTile(a++)},applyCustomRemap:function(){var a=0;if(null!=this.customTileRemap)for(;a<this.totalTiles;){var b=this._data[a],c=b;b<this.customTileRemap.length&&(c=this.customTileRemap[b]);this._data[a]=c;++a}},randomizeIndices:function(){var a=0;if(null!=this._randomIndices)for(var b=null!=this._randomLambda?this._randomLambda:
function(){return u.random.float()};a<this.totalTiles;){for(var c=this._data[a],d=0,f=c,g=0,k=this._randomIndices;g<k.length;){var l=k[g];++g;c==l&&(f=b()*this._randomChoices[d].length|0,f=this._randomChoices[d][f]);++d}this._data[a]=f;++a}},autoTile:function(a){if(0!=this._data[a])if(this.auto==sg.FULL)this.autoTileFull(a);else{this._data[a]=0;if(0>a-this.widthInTiles||0<this._data[a-this.widthInTiles])this._data[a]+=1;if(a%this.widthInTiles>=this.widthInTiles-1||0<this._data[a+1])this._data[a]+=
2;if((a+this.widthInTiles|0)>=this.totalTiles||0<this._data[a+this.widthInTiles])this._data[a]+=4;if(0>=a%this.widthInTiles||0<this._data[a-1])this._data[a]+=8;this.auto==sg.ALT&&15==this._data[a]&&(0<a%this.widthInTiles&&(a+this.widthInTiles|0)<this.totalTiles&&0>=this._data[a+this.widthInTiles-1]&&(this._data[a]=1),0<a%this.widthInTiles&&0<=a-this.widthInTiles&&0>=this._data[a-this.widthInTiles-1]&&(this._data[a]=2),a%this.widthInTiles<this.widthInTiles-1&&0<=a-this.widthInTiles&&0>=this._data[a-
this.widthInTiles+1]&&(this._data[a]=4),a%this.widthInTiles<this.widthInTiles-1&&(a+this.widthInTiles|0)<this.totalTiles&&0>=this._data[a+this.widthInTiles+1]&&(this._data[a]=8));this._data[a]+=1}},autoTileFull:function(a){this._data[a]=0;var b=0>a-this.widthInTiles,c=a%this.widthInTiles>=this.widthInTiles-1,d=(a+this.widthInTiles|0)>=this.totalTiles,f=0>=a%this.widthInTiles,g=b||0<this._data[a-this.widthInTiles],k=b||c||0<this._data[a-this.widthInTiles+1],l=c||0<this._data[a+1];c=c||d||0<this._data[a+
this.widthInTiles+1];var m=d||0<this._data[a+this.widthInTiles];d=d||f||0<this._data[a+this.widthInTiles-1];var z=f||0<this._data[a-1];b=f||b||0<this._data[a-this.widthInTiles-1];g&&(this._data[a]+=1);k&&g&&l&&(this._data[a]+=2);l&&(this._data[a]+=4);c&&l&&m&&(this._data[a]+=8);m&&(this._data[a]+=16);d&&m&&z&&(this._data[a]+=32);z&&(this._data[a]+=64);b&&z&&g&&(this._data[a]+=128);this._data[a]-=kf.offsetAutoTile[this._data[a]]-1},setCustomTileMappings:function(a,b,c,d){this.customTileRemap=a;this._randomIndices=
b;this._randomChoices=c;this._randomLambda=d;if(null!=this._randomIndices&&(null==this._randomChoices||0==this._randomChoices.length))throw J.thrown("You must provide valid 'randomChoices' if you wish to randomize tilemap indices, please read documentation of 'setCustomTileMappings' function.");},getMapIndexAt:function(a,b){a=this.getColumnAt(a);b=this.getRowAt(b);return 0<=a&&a<this.widthInTiles&&0<=b&&b<this.heightInTiles?b*this.widthInTiles+a:-1},getColumn:function(a){return a%this.widthInTiles},
getRow:function(a){return a/this.widthInTiles|0},tileExistsAt:function(a,b){a=this.getColumnAt(a);return 0<=a&&a<this.widthInTiles?(b=this.getRowAt(b),0<=b?b<this.heightInTiles:!1):!1},columnExistsAt:function(a){a=this.getColumnAt(a);return 0<=a?a<this.widthInTiles:!1},rowExistsAt:function(a){a=this.getRowAt(a);return 0<=a?a<this.heightInTiles:!1},getTileIndexAt:function(a,b){a=this.getColumnAt(a);b=this.getRowAt(b);b=0<=a&&a<this.widthInTiles&&0<=b&&b<this.heightInTiles?b*this.widthInTiles+a:-1;
return 0<=b&&b<this._data.length?this._data[b]:-1},getTilePosAt:function(a,b,c){null==c&&(c=!1);a=this.getColumnAt(a);b=this.getRowAt(b);null==c&&(c=!1);a=this.getColumnPos(a,c);c=this.getRowPos(b,c);null==c&&(c=0);null==a&&(a=0);null==c&&(c=0);null==a&&(a=0);c=N.pool.get().set(a,c);c._inPool=!1;return c},getAllTilePos:function(a,b){null==b&&(b=!1);for(var c=[],d=0,f=this._data.length;d<f;){var g=d++;if((0<=g&&g<this._data.length?this._data[g]:-1)==a){var k=b;null==k&&(k=!1);if(0<=g&&g<this._data.length){var l=
g/this.widthInTiles|0;null==k&&(k=!1);g=this.getColumnPos(g%this.widthInTiles,k);l=this.getRowPos(l,k);null==l&&(l=0);null==g&&(g=0);null==l&&(l=0);null==g&&(g=0);l=N.pool.get().set(g,l);l._inPool=!1}else l=null;c.push(l)}}return c},getTile:function(a,b){a=0<=a&&a<this.widthInTiles&&0<=b&&b<this.heightInTiles?b*this.widthInTiles+a:-1;return 0<=a&&a<this._data.length?this._data[a]:-1},getTileByIndex:function(a){return 0<=a&&a<this._data.length?this._data[a]:-1},getTileCollisions:function(a){return this._tileObjects[0<=
a&&a<this._data.length?this._data[a]:-1].allowCollisions},getTileInstances:function(a){a=this.getAllMapIndices(a);return 0==a.length?null:a},getAllMapIndices:function(a){for(var b=[],c=0,d=this._data.length;c<d;){var f=c++;(0<=f&&f<this._data.length?this._data[f]:-1)==a&&b.push(f)}return b},forEachMapIndex:function(a,b){for(var c=0,d=this._data.length;c<d;){var f=c++;(0<=f&&f<this._data.length?this._data[f]:-1)==a&&b(f)}},setTileIndexAt:function(a,b,c,d){null==d&&(d=!0);a=this.getColumnAt(a);b=this.getRowAt(b);
return this.setTileHelper(0<=a&&a<this.widthInTiles&&0<=b&&b<this.heightInTiles?b*this.widthInTiles+a:-1,c,d)},setTile:function(a,b,c,d){null==d&&(d=!0);null==d&&(d=!0);return this.setTileHelper(0<=a&&a<this.widthInTiles&&0<=b&&b<this.heightInTiles?b*this.widthInTiles+a:-1,c,d)},setTileByIndex:function(a,b,c){null==c&&(c=!0);null==c&&(c=!0);return this.setTileHelper(a,b,c)},setTileHelper:function(a,b,c){null==c&&(c=!0);if(!(0<=a&&a<this._data.length))return!1;this._data[a]=b;if(!c)return!0;this.setDirty();
0==this.auto._hx_index?this.updateTile(this._data[a]):this.updateTileWithAutoTile(a);return!0},updateTileWithAutoTile:function(a){var b=(a/this.widthInTiles|0)-1;a=a%this.widthInTiles-1;for(var c=b+3,d=a+3;b<c;){for(a=d-3;a<d;){if(0<=a&&a<this.widthInTiles&&0<=b&&b<this.heightInTiles){var f=0<=a&&a<this.widthInTiles&&0<=b&&b<this.heightInTiles?b*this.widthInTiles+a:-1;this.autoTile(f);this.updateTile(this._data[f])}++a}++b}},setTileProperties:function(a,b,c,d,f){null==f&&(f=1);null==b&&(b=4369);0>=
f&&(f=1);var g=this._tileObjects.length,k=a+f;if(0==g)u.log.advanced("Cannot setTileProperties of "+(1==f?"tile "+a:"tiles "+a+"-"+(k-1))+" when tilemap does not contain any tiles. This may be due to an invalid graphic.",La.ERROR,!0);else if(k>g)u.log.advanced("Cannot setTileProperties of "+(1==f?"tile "+a:"tiles "+a+"-"+(k-1))+" when there are only "+k+" tiles.",La.ERROR,!0);else for(;a<k;)f=a++,f=this._tileObjects[f],f.set_allowCollisions(b),f.callbackFunction=c,f.filter=d},getData:function(a){null==
a&&(a=!1);if(!a)return this._data;a=[];for(var b=0,c=this._data.length;b<c;){var d=b++;a.push(0<(this._tileObjects[0<=d&&d<this._data.length?this._data[d]:-1].allowCollisions&4369)?1:0)}return a},findPath:function(a,b,c,d){null==d&&(d=2);null==c&&(c=Qg.LINE);kf.diagonalPathfinder.diagonalPolicy=d;return kf.diagonalPathfinder.findPath(this,a,b,c)},findPathCustom:function(a,b,c,d){null==d&&(d=Qg.LINE);return a.findPath(this,b,c,d)},computePathDistance:function(a,b,c,d){null==d&&(d=!0);null==c&&(c=2);
a=this.computePathData(a,b,c,d);return null!=a?a.distances:null},computePathData:function(a,b,c,d){null==d&&(d=!0);null==c&&(c=2);kf.diagonalPathfinder.diagonalPolicy=c;c=kf.diagonalPathfinder;null==d&&(d=!0);return c.compute(c.createData(this,a,b),d)},getDiagonalPathfinder:function(a){kf.diagonalPathfinder.diagonalPolicy=a;return kf.diagonalPathfinder},overlaps:function(a,b,c){null==b&&(b=!1);var d=yb.resolveGroup(a);if(null!=d){var f=this,g=b;return d.any(function(a){var b=g;null==b&&(b=!1);return 1==
a.flixelType||3==a.flixelType?f.objectOverlapsTiles(a):f.overlaps(a,b,c)})}return 1==a.flixelType||3==a.flixelType?this.objectOverlapsTiles(a):this.overlaps(a,!1,null)},tilemapOverlapsCallback:function(a,b,c,d,f){null==d&&(d=!1);return 1==a.flixelType||3==a.flixelType?this.objectOverlapsTiles(a):this.overlaps(a,d,f)},overlapsAt:function(a,b,c,d,f){null==d&&(d=!1);var g=yb.resolveGroup(c);if(null!=g){var k=this,l=d;return g.any(function(c){if(1==c.flixelType||3==c.flixelType){var d=k._point,g=a,m=
b;null==m&&(m=0);null==g&&(g=0);d.set_x(g);d.set_y(m);return k.objectOverlapsTiles(c,null,d)}return k.overlapsAt(a,b,c,l,f)})}if(1==c.flixelType||3==c.flixelType){d=this._point;g=a;var m=b;null==m&&(m=0);null==g&&(g=0);d.set_x(g);d.set_y(m);return this.objectOverlapsTiles(c,null,d)}return this.overlapsAt(a,b,c,d,f)},tilemapOverlapsAtCallback:function(a,b,c,d,f){return 1==a.flixelType||3==a.flixelType?(d=this._point,null==c&&(c=0),null==b&&(b=0),d.set_x(b),d.set_y(c),this.objectOverlapsTiles(a,null,
d)):this.overlapsAt(b,c,a,d,f)},overlapsPoint:function(a,b,c){null==b&&(b=!1);if(b){null==c&&(c=u.camera);b=c.scroll;c=b.x;var d=b.y;null==d&&(d=0);null==c&&(c=0);a.set_x(a.x-c);a.set_y(a.y-d);b._weak&&b.put();b=a;b._weak&&b.put()}return this.tileAtPointAllowsCollisions(a)},tileAtPointAllowsCollisions:function(a){var b=a.y;a=this.getColumnAt(a.x);b=this.getRowAt(b);b=0<=a&&a<this.widthInTiles&&0<=b&&b<this.heightInTiles?b*this.widthInTiles+a:-1;return 0<=b&&b<this._data.length?0<(this._tileObjects[0<=
b&&b<this._data.length?this._data[b]:-1].allowCollisions&4369):!1},getBounds:function(a){if(null==a){a=V._pool.get();var b=0,c=0,d=0,f=0;null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a.width=d;a.height=f;a._inPool=!1}b=this.x;c=this.y;d=this.get_width();f=this.get_height();null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a.width=d;a.height=f;return a},__class__:kf});var sg=G["flixel.tile.FlxTilemapAutoTiling"]={__ename__:"flixel.tile.FlxTilemapAutoTiling",
__constructs__:null,OFF:{_hx_name:"OFF",_hx_index:0,__enum__:"flixel.tile.FlxTilemapAutoTiling",toString:t},AUTO:{_hx_name:"AUTO",_hx_index:1,__enum__:"flixel.tile.FlxTilemapAutoTiling",toString:t},ALT:{_hx_name:"ALT",_hx_index:2,__enum__:"flixel.tile.FlxTilemapAutoTiling",toString:t},FULL:{_hx_name:"FULL",_hx_index:3,__enum__:"flixel.tile.FlxTilemapAutoTiling",toString:t}};sg.__constructs__=[sg.OFF,sg.AUTO,sg.ALT,sg.FULL];var Gf=function(a,b,c,d){R.call(this,a,b);this.makeGraphic(c,d,0,!0);this.set_active(!1);
this.set_immovable(!0);this.set_moves(!1)};h["flixel.tile.FlxTileblock"]=Gf;Gf.__name__="flixel.tile.FlxTileblock";Gf.__super__=R;Gf.prototype=x(R.prototype,{tileSprite:null,destroy:function(){this.tileSprite=ba.destroy(this.tileSprite);R.prototype.destroy.call(this)},loadFrames:function(a,b){null==b&&(b=0);if(null==a)return this;this.tileSprite=null==this.tileSprite?new R:this.tileSprite;this.tileSprite.set_frames(a);a=this.tileSprite.get_width()|0;var c=this.tileSprite.get_height()|0,d=this.tileSprite.get_numFrames()+
b,f=!1;0!=this.get_width()%this.tileSprite.get_width()&&(this.set_width((this.get_width()/a+1|0)*a),f=!0);0!=this.get_height()%this.tileSprite.get_height()&&(this.set_height((this.get_height()/c+1|0)*c),f=!0);f?this.makeGraphic(this.get_width()|0,this.get_height()|0,0,!0):Ea.fill(this,0);f=0;for(var g,k,l=0,m=this.get_width()/a|0,z=this.get_height()/c|0;f<z;){for(g=k=0;g<m;)u.random.float()*d>b&&(this.tileSprite.animation.randomFrame(),this.tileSprite.drawFrame(),this.stamp(this.tileSprite,k,l)),
k+=a,++g;l+=c;++f}this.dirty=!0;return this},loadTiles:function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);if(null==a)return this;a=u.bitmap.add(a);if(null==a)return this;0==b&&(b=a.height,b>a.width&&(b=a.width));0==c&&(c=b,c>a.height&&(c=a.height));null==c&&(c=0);null==b&&(b=0);null==c&&(c=0);null==b&&(b=0);c=N.pool.get().set(b,c);c._inPool=!1;a=Cc.fromGraphic(a,c);return this.loadFrames(a,d)},setTile:function(a,b,c){this.tileSprite.animation.set_frameIndex(c);this.stamp(this.tileSprite,
a*(this.tileSprite.get_width()|0),b*(this.tileSprite.get_height()|0));this.dirty=!0},__class__:Gf});var Za=function(){};h["flixel.tweens.FlxEase"]=Za;Za.__name__="flixel.tweens.FlxEase";Za.linear=function(a){return a};Za.quadIn=function(a){return a*a};Za.quadOut=function(a){return-a*(a-2)};Za.quadInOut=function(a){return.5>=a?a*a*2:1- --a*a*2};Za.cubeIn=function(a){return a*a*a};Za.cubeOut=function(a){return 1+--a*a*a};Za.cubeInOut=function(a){return.5>=a?a*a*a*4:1+--a*a*a*4};Za.quartIn=function(a){return a*
a*a*a};Za.quartOut=function(a){return 1- --a*a*a*a};Za.quartInOut=function(a){if(.5>=a)return a*a*a*a*8;a=2*a-2;return(1-a*a*a*a)/2+.5};Za.quintIn=function(a){return a*a*a*a*a};Za.quintOut=function(a){return--a*a*a*a*a+1};Za.quintInOut=function(a){return 1>(a*=2)?a*a*a*a*a/2:((a-=2)*a*a*a*a+2)/2};Za.smoothStepIn=function(a){a/=2;return 2*a*a*(-2*a+3)};Za.smoothStepOut=function(a){a=a/2+.5;return 2*a*a*(-2*a+3)-1};Za.smoothStepInOut=function(a){return a*a*(-2*a+3)};Za.smootherStepIn=function(a){a/=
2;return 2*a*a*a*(a*(6*a-15)+10)};Za.smootherStepOut=function(a){a=a/2+.5;return 2*a*a*a*(a*(6*a-15)+10)-1};Za.smootherStepInOut=function(a){return a*a*a*(a*(6*a-15)+10)};Za.sineIn=function(a){return-Math.cos(Za.PI2*a)+1};Za.sineOut=function(a){return Math.sin(Za.PI2*a)};Za.sineInOut=function(a){return-Math.cos(Math.PI*a)/2+.5};Za.bounceIn=function(a){return 1-Za.bounceOut(1-a)};Za.bounceOut=function(a){return a<Za.B1?7.5625*a*a:a<Za.B2?7.5625*(a-Za.B3)*(a-Za.B3)+.75:a<Za.B4?7.5625*(a-Za.B5)*(a-Za.B5)+
.9375:7.5625*(a-Za.B6)*(a-Za.B6)+.984375};Za.bounceInOut=function(a){return.5>a?(1-Za.bounceOut(1-2*a))/2:(1+Za.bounceOut(2*a-1))/2};Za.circIn=function(a){return-(Math.sqrt(1-a*a)-1)};Za.circOut=function(a){return Math.sqrt(1-(a-1)*(a-1))};Za.circInOut=function(a){return.5>=a?(Math.sqrt(1-a*a*4)-1)/-2:(Math.sqrt(1-(2*a-2)*(2*a-2))+1)/2};Za.expoIn=function(a){return Math.pow(2,10*(a-1))};Za.expoOut=function(a){return-Math.pow(2,-10*a)+1};Za.expoInOut=function(a){return.5>a?Math.pow(2,10*(2*a-1))/2:
(-Math.pow(2,-10*(2*a-1))+2)/2};Za.backIn=function(a){return a*a*(2.70158*a-1.70158)};Za.backOut=function(a){return 1- --a*a*(-2.70158*a-1.70158)};Za.backInOut=function(a){a*=2;if(1>a)return a*a*(2.70158*a-1.70158)/2;--a;return(1- --a*a*(-2.70158*a-1.70158))/2+.5};Za.elasticIn=function(a){return-(Za.ELASTIC_AMPLITUDE*Math.pow(2,10*--a)*Math.sin(2*(a-Za.ELASTIC_PERIOD/(2*Math.PI)*Math.asin(1/Za.ELASTIC_AMPLITUDE))*Math.PI/Za.ELASTIC_PERIOD))};Za.elasticOut=function(a){return Za.ELASTIC_AMPLITUDE*Math.pow(2,
-10*a)*Math.sin(2*(a-Za.ELASTIC_PERIOD/(2*Math.PI)*Math.asin(1/Za.ELASTIC_AMPLITUDE))*Math.PI/Za.ELASTIC_PERIOD)+1};Za.elasticInOut=function(a){return.5>a?-.5*Math.pow(2,10*(a-=.5))*Math.sin(2*(a-Za.ELASTIC_PERIOD/4)*Math.PI/Za.ELASTIC_PERIOD):Math.pow(2,-10*(a-=.5))*Math.sin(2*(a-Za.ELASTIC_PERIOD/4)*Math.PI/Za.ELASTIC_PERIOD)*.5+1};var Ma=function(a,b){this._running=this._waitingForRestart=!1;this.duration=this.scale=this.executions=this.startDelay=this.loopDelay=this._secondsSinceStart=this._delayToUse=
0;this.active=!1;a=this.resolveTweenOptions(a);this.set_type(a.type);this.onStart=a.onStart;this.onUpdate=a.onUpdate;this.onComplete=a.onComplete;this.ease=a.ease;this.setDelays(a.startDelay,a.loopDelay);this.manager=null!=b?b:Ma.globalManager};h["flixel.tweens.FlxTween"]=Ma;Ma.__name__="flixel.tweens.FlxTween";Ma.__interfaces__=[D];Ma.globalManager=null;Ma.tween=function(a,b,c,d){null==c&&(c=1);return Ma.globalManager.tween(a,b,c,d)};Ma.num=function(a,b,c,d,f){null==c&&(c=1);return Ma.globalManager.num(a,
b,c,d,f)};Ma.flicker=function(a,b,c,d){null==c&&(c=.08);null==b&&(b=1);return Ma.globalManager.flicker(a,b,c,d)};Ma.isFlickering=function(a){return Ma.globalManager.isFlickering(a)};Ma.stopFlickering=function(a){Ma.globalManager.stopFlickering(a)};Ma.shake=function(a,b,c,d,f){null==c&&(c=1);null==b&&(b=.05);return Ma.globalManager.shake(a,b,c,d,f)};Ma.angle=function(a,b,c,d,f){null==d&&(d=1);return Ma.globalManager.angle(a,b,c,d,f)};Ma.color=function(a,b,c,d,f){null==b&&(b=1);return Ma.globalManager.color(a,
b,c,d,f)};Ma.linearMotion=function(a,b,c,d,f,g,k,l){null==k&&(k=!0);null==g&&(g=1);return Ma.globalManager.linearMotion(a,b,c,d,f,g,k,l)};Ma.quadMotion=function(a,b,c,d,f,g,k,l,m,z){null==m&&(m=!0);null==l&&(l=1);return Ma.globalManager.quadMotion(a,b,c,d,f,g,k,l,m,z)};Ma.cubicMotion=function(a,b,c,d,f,g,k,l,m,z,h){null==z&&(z=1);return Ma.globalManager.cubicMotion(a,b,c,d,f,g,k,l,m,z,h)};Ma.circularMotion=function(a,b,c,d,f,g,k,l,m){null==l&&(l=!0);null==k&&(k=1);return Ma.globalManager.circularMotion(a,
b,c,d,f,g,k,l,m)};Ma.linearPath=function(a,b,c,d,f){null==d&&(d=!0);null==c&&(c=1);return Ma.globalManager.linearPath(a,b,c,d,f)};Ma.quadPath=function(a,b,c,d,f){null==d&&(d=!0);null==c&&(c=1);return Ma.globalManager.quadPath(a,b,c,d,f)};Ma.cancelTweensOf=function(a,b){Ma.globalManager.cancelTweensOf(a,b)};Ma.completeTweensOf=function(a,b){Ma.globalManager.completeTweensOf(a,b)};Ma.prototype={manager:null,active:null,duration:null,ease:null,onStart:null,onUpdate:null,onComplete:null,type:null,finished:null,
scale:null,backward:null,executions:null,startDelay:null,loopDelay:null,_secondsSinceStart:null,_delayToUse:null,_running:null,_waitingForRestart:null,_chainedTweens:null,_nextTweenInChain:null,resolveTweenOptions:function(a){null==a&&(a={type:8});null==a.type&&(a.type=8);return a},destroy:function(){this._nextTweenInChain=this._chainedTweens=this.manager=this.ease=this.onComplete=this.onUpdate=this.onStart=null},then:function(a){return this.addChainedTween(a)},wait:function(a){return this.addChainedTween(Ma.num(0,
0,a))},addChainedTween:function(a){a.setVarsOnEnd();a.manager.remove(a,!1);null==this._chainedTweens&&(this._chainedTweens=[]);this._chainedTweens.push(a);return this},update:function(a){this._secondsSinceStart+=a;a=0<this.executions?this.loopDelay:this.startDelay;if(!(this._secondsSinceStart<a)){this.scale=Math.max(this._secondsSinceStart-a,0)/this.duration;null!=this.ease&&(this.scale=this.ease(this.scale));this.backward&&(this.scale=1-this.scale);if(this._secondsSinceStart>a&&!this._running&&(this._running=
!0,null!=this.onStart))this.onStart(this);if(this._secondsSinceStart>=this.duration+a)this.scale=this.backward?0:1,this.finished=!0;else if(null!=this.onUpdate)this.onUpdate(this)}},start:function(){this._waitingForRestart=!1;this._secondsSinceStart=0;this._delayToUse=0<this.executions?this.loopDelay:this.startDelay;if(0==this.duration)return this.set_active(!1),this;this.set_active(!0);this.finished=this._running=!1;return this},cancel:function(){this.onEnd();null!=this.manager&&this.manager.remove(this)},
cancelChain:function(){null!=this._nextTweenInChain&&this._nextTweenInChain.cancelChain();null!=this._chainedTweens&&(this._chainedTweens=null);this.cancel()},finish:function(){this.executions++;if(null!=this.onComplete)this.onComplete(this);var a=this.type&-17;if(1==a||8==a)this.onEnd(),this._secondsSinceStart=this.duration+this.startDelay,8==a&&null!=this.manager&&this.manager.remove(this);if(2==a||4==a)this._secondsSinceStart=(this._secondsSinceStart-this._delayToUse)%this.duration+this._delayToUse,
this.scale=Math.max(this._secondsSinceStart-this._delayToUse,0)/this.duration,null!=this.ease&&0<this.scale&&1>this.scale&&(this.scale=this.ease(this.scale)),4==a&&(this.backward=!this.backward)&&(this.scale=1-this.scale),this.restart()},onEnd:function(){this.setVarsOnEnd();this.processTweenChain()},setVarsOnEnd:function(){this.set_active(!1);this._running=!1;this.finished=!0},processTweenChain:function(){null==this._chainedTweens||0>=this._chainedTweens.length||(this._nextTweenInChain=this._chainedTweens.shift(),
this.doNextTween(this._nextTweenInChain),this._chainedTweens=null)},doNextTween:function(a){a.active||(a.start(),this.manager.add_flixel_tweens_FlxTween(a));a.setChain(this._chainedTweens)},setChain:function(a){null!=a&&(this._chainedTweens=null==this._chainedTweens?a:this._chainedTweens.concat(a))},restart:function(){this.active?this.start():this._waitingForRestart=!0},isTweenOf:function(a,b){return!1},setDelays:function(a,b){this.set_startDelay(null!=a?a:0);this.set_loopDelay(null!=b?b:0);return this},
set_startDelay:function(a){a=Math.abs(a);0==this.executions&&(this._delayToUse=a);return this.startDelay=a},set_loopDelay:function(a){a=Math.abs(a);0<this.executions&&(this._secondsSinceStart=Math.max(this._secondsSinceStart-this._delayToUse,0)/this.duration*this.duration+Math.max(a-this.loopDelay,0),this._delayToUse=a);return this.loopDelay=a},get_time:function(){return Math.max(this._secondsSinceStart-this._delayToUse,0)},get_percent:function(){return Math.max(this._secondsSinceStart-this._delayToUse,
0)/this.duration},set_percent:function(a){return this._secondsSinceStart=this.duration*a+this._delayToUse},set_type:function(a){0==a?a=8:16==a&&(a=17);this.backward=0<(a&16);return this.type=a},set_active:function(a){this.active=a;this._waitingForRestart&&this.restart();return a},__class__:Ma,__properties__:{set_loopDelay:"set_loopDelay",set_startDelay:"set_startDelay",get_time:"get_time",set_percent:"set_percent",get_percent:"get_percent",set_type:"set_type",set_active:"set_active"}};var Ck=function(){this._tweens=
[];Na.call(this);this.set_visible(!1);u.signals.preStateSwitch.add(q(this,this.clear))};h["flixel.tweens.FlxTweenManager"]=Ck;Ck.__name__="flixel.tweens.FlxTweenManager";Ck.__super__=Na;Ck.prototype=x(Na.prototype,{add_flixel_tweens_motion_QuadPath:function(a,b){null==b&&(b=!1);if(null==a)return null;this._tweens.push(a);b&&a.start();return a},add_flixel_tweens_motion_LinearPath:function(a,b){null==b&&(b=!1);if(null==a)return null;this._tweens.push(a);b&&a.start();return a},add_flixel_tweens_motion_CircularMotion:function(a,
b){null==b&&(b=!1);if(null==a)return null;this._tweens.push(a);b&&a.start();return a},add_flixel_tweens_motion_CubicMotion:function(a,b){null==b&&(b=!1);if(null==a)return null;this._tweens.push(a);b&&a.start();return a},add_flixel_tweens_motion_QuadMotion:function(a,b){null==b&&(b=!1);if(null==a)return null;this._tweens.push(a);b&&a.start();return a},add_flixel_tweens_motion_LinearMotion:function(a,b){null==b&&(b=!1);if(null==a)return null;this._tweens.push(a);b&&a.start();return a},add_flixel_tweens_misc_ColorTween:function(a,
b){null==b&&(b=!1);if(null==a)return null;this._tweens.push(a);b&&a.start();return a},add_flixel_tweens_misc_AngleTween:function(a,b){null==b&&(b=!1);if(null==a)return null;this._tweens.push(a);b&&a.start();return a},add_flixel_tweens_misc_ShakeTween:function(a,b){null==b&&(b=!1);if(null==a)return null;this._tweens.push(a);b&&a.start();return a},add_flixel_tweens_misc_FlickerTween:function(a,b){null==b&&(b=!1);if(null==a)return null;this._tweens.push(a);b&&a.start();return a},add_flixel_tweens_misc_NumTween:function(a,
b){null==b&&(b=!1);if(null==a)return null;this._tweens.push(a);b&&a.start();return a},add_flixel_tweens_misc_VarTween:function(a,b){null==b&&(b=!1);if(null==a)return null;this._tweens.push(a);b&&a.start();return a},add_flixel_tweens_FlxTween:function(a,b){null==b&&(b=!1);if(null==a)return null;this._tweens.push(a);b&&a.start();return a},_tweens:null,tween:function(a,b,c,d){null==c&&(c=1);d=new Fk(d,this);d.tween(a,b,c);return this.add_flixel_tweens_misc_VarTween(d)},num:function(a,b,c,d,f){null==
c&&(c=1);d=new Gk(d,this);d.tween(a,b,c,f);return this.add_flixel_tweens_misc_NumTween(d)},flicker:function(a,b,c,d){null==c&&(c=.08);null==b&&(b=1);d=new ei(d,this);d.tween(a,b,c);return this.add_flixel_tweens_misc_FlickerTween(d)},isFlickering:function(a){return this.containsTweensOf(a,["flicker"])},stopFlickering:function(a){this.cancelTweensOf(a,["flicker"])},shake:function(a,b,c,d,f){null==d&&(d=17);null==c&&(c=1);null==b&&(b=.05);f=new Hk(f,this);f.tween(a,b,c,d);return this.add_flixel_tweens_misc_ShakeTween(f)},
angle:function(a,b,c,d,f){null==d&&(d=1);f=new Ik(f,this);f.tween(b,c,d,a);return this.add_flixel_tweens_misc_AngleTween(f)},color:function(a,b,c,d,f){null==b&&(b=1);f=new Jk(f,this);f.tween(b,c,d,a);return this.add_flixel_tweens_misc_ColorTween(f)},linearMotion:function(a,b,c,d,f,g,k,l){null==k&&(k=!0);null==g&&(g=1);l=new Kk(l,this);l.setObject(a);l.setMotion(b,c,d,f,g,k);return this.add_flixel_tweens_motion_LinearMotion(l)},quadMotion:function(a,b,c,d,f,g,k,l,m,z){null==m&&(m=!0);null==l&&(l=1);
z=new Lk(z,this);z.setObject(a);z.setMotion(b,c,d,f,g,k,l,m);return this.add_flixel_tweens_motion_QuadMotion(z)},cubicMotion:function(a,b,c,d,f,g,k,l,m,z,h){null==z&&(z=1);h=new Mk(h,this);h.setObject(a);h.setMotion(b,c,d,f,g,k,l,m,z);return this.add_flixel_tweens_motion_CubicMotion(h)},circularMotion:function(a,b,c,d,f,g,k,l,m){null==l&&(l=!0);null==k&&(k=1);m=new Nk(m,this);m.setObject(a);m.setMotion(b,c,d,f,g,k,l);return this.add_flixel_tweens_motion_CircularMotion(m)},linearPath:function(a,b,
c,d,f){null==d&&(d=!0);null==c&&(c=1);f=new Ok(f,this);if(null!=b)for(var g=0;g<b.length;){var k=b[g];++g;f.addPoint(k.x,k.y)}f.setObject(a);f.setMotion(c,d);return this.add_flixel_tweens_motion_LinearPath(f)},quadPath:function(a,b,c,d,f){null==d&&(d=!0);null==c&&(c=1);f=new Pk(f,this);if(null!=b)for(var g=0;g<b.length;){var k=b[g];++g;f.addPoint(k.x,k.y)}f.setObject(a);f.setMotion(c,d);return this.add_flixel_tweens_motion_QuadPath(f)},destroy:function(){Na.prototype.destroy.call(this);u.signals.preStateSwitch.remove(q(this,
this.clear))},update:function(a){for(var b=null,c=0,d=this._tweens;c<d.length;){var f=d[c];++c;f.active&&(f.update(a),f.finished&&(null==b&&(b=[]),b.push(f)))}if(null!=b)for(;0<b.length;)b.shift().finish()},remove:function(a,b){null==b&&(b=!0);if(null==a)return null;a.set_active(!1);b&&a.destroy();b=this._tweens;var c=b.indexOf(a);-1!=c&&(b[c]=b[b.length-1],b.pop());return a},clear:function(){for(var a=0,b=this._tweens;a<b.length;){var c=b[a];++a;null!=c&&(c.set_active(!1),c.destroy())}this._tweens.splice(0,
this._tweens.length)},cancelTweensOf:function(a,b){this.forEachTweensOf(a,b,function(a){a.cancel()})},completeTweensOf:function(a,b){this.forEachTweensOf(a,b,function(a){0==(a.type&2)&&0==(a.type&4)&&a.active&&a.update(1.79E308)})},forEachTweensOf:function(a,b,c){if(null==a)throw J.thrown("Cannot cancel tween variables of an object that is null.");if(null==b||0==b.length)for(b=this._tweens.length;0<b--;){var d=this._tweens[b];d.isTweenOf(a)&&c(d)}else{for(var f=[],g=0;g<b.length;){var k=b[g];++g;
d=a;k=k.split(".");for(var l=k.pop(),m=0;m<k.length;){var z=k[m];++m;d=la.getProperty(d,z);if(!la.isObject(d))break}la.isObject(d)&&f.push({object:d,field:l})}for(b=this._tweens.length;0<b--;)for(d=this._tweens[b],g=0;g<f.length;)if(a=f[g],++g,d.isTweenOf(a.object,a.field)){c(d);break}}},containsTweensOf:function(a,b){var c=!1;this.forEachTweensOf(a,b,function(a){c=!0});return c},completeAll:function(){for(var a=0,b=this._tweens;a<b.length;){var c=b[a];++a;0==(c.type&2)&&0==(c.type&4)&&c.active&&
c.update(1.79E308)}},forEach:function(a){for(var b=0,c=this._tweens;b<c.length;){var d=c[b];++b;a(d)}},__class__:Ck});var Ik=function(a,b){Ma.call(this,a,b)};h["flixel.tweens.misc.AngleTween"]=Ik;Ik.__name__="flixel.tweens.misc.AngleTween";Ik.__super__=Ma;Ik.prototype=x(Ma.prototype,{angle:null,sprite:null,_start:null,_range:null,destroy:function(){Ma.prototype.destroy.call(this);this.sprite=null},tween:function(a,b,c,d){this._start=this.angle=a;this._range=b-this.angle;this.duration=c;this.sprite=
d;null!=this.sprite&&this.sprite.set_angle(this.angle%360);this.start();return this},update:function(a){Ma.prototype.update.call(this,a);this.angle=this._start+this._range*this.scale;null!=this.sprite&&this.sprite.set_angle(this.angle%360)},isTweenOf:function(a,b){return this.sprite==a?null!=b?"angle"==b:!0:!1},__class__:Ik});var Jk=function(a,b){Ma.call(this,a,b)};h["flixel.tweens.misc.ColorTween"]=Jk;Jk.__name__="flixel.tweens.misc.ColorTween";Jk.__super__=Ma;Jk.prototype=x(Ma.prototype,{color:null,
startColor:null,endColor:null,sprite:null,destroy:function(){Ma.prototype.destroy.call(this);this.sprite=null},tween:function(a,b,c,d){this.color=this.startColor=b;this.endColor=c;this.duration=a;this.sprite=d;this.start();return this},update:function(a){Ma.prototype.update.call(this,a);var b=this.startColor,c=this.endColor,d=this.scale;null==d&&(d=.5);a=((c>>16&255)-(b>>16&255))*d+(b>>16&255)|0;var f=((c>>8&255)-(b>>8&255))*d+(b>>8&255)|0,g=((c&255)-(b&255))*d+(b&255)|0;c=((c>>24&255)-(b>>24&255))*
d+(b>>24&255)|0;null==c&&(c=255);b=mb._new();null==c&&(c=255);b=(b&-16711681|(255<a?255:0>a?0:a)<<16)&-65281|(255<f?255:0>f?0:f)<<8;b&=-256;b|=255<g?255:0>g?0:g;b&=16777215;this.color=b|=(255<c?255:0>c?0:c)<<24;null!=this.sprite&&(this.sprite.set_color(this.color),this.sprite.set_alpha((this.color>>24&255)/255))},isTweenOf:function(a,b){return this.sprite==a?null!=b?"color"==b:!0:!1},__class__:Jk});var ei=function(a,b){this.ratio=.5;this.period=.08;this.endVisibility=!0;this.tweenFunction=ei.defaultTweenFunction;
null!=a&&(null!=a.endVisibility&&(this.endVisibility=a.endVisibility),null!=a.ratio&&(this.ratio=a.ratio),null!=a.tweenFunction&&(this.tweenFunction=a.tweenFunction));Ma.call(this,a,b)};h["flixel.tweens.misc.FlickerTween"]=ei;ei.__name__="flixel.tweens.misc.FlickerTween";ei.defaultTweenFunction=function(a){return Math.max(a._secondsSinceStart-a._delayToUse,0)/a.period%1>a.ratio};ei.__super__=Ma;ei.prototype=x(Ma.prototype,{basic:null,tweenFunction:null,endVisibility:null,period:null,ratio:null,destroy:function(){Ma.prototype.destroy.call(this);
this.basic=null},tween:function(a,b,c){this.basic=a;this.duration=b;this.period=c;0>=c&&(this.period=1/u.updateFramerate,u.log.advanced("Cannot flicker with a period of 0.0 or less, using 1.0 / FlxG.updateFramerate, instead",La.WARNING,!0));this.start();return this},update:function(a){Ma.prototype.update.call(this,a);null!=this.tweenFunction&&this._secondsSinceStart>=this._delayToUse&&(a=this.tweenFunction(this),this.basic.visible!=a&&this.basic.set_visible(a))},onEnd:function(){Ma.prototype.onEnd.call(this);
this.basic.set_visible(this.endVisibility)},isTweenOf:function(a,b){return this.basic==a?null!=b&&"visible"!=b?"flicker"==b:!0:!1},__class__:ei});var Gk=function(a,b){Ma.call(this,a,b)};h["flixel.tweens.misc.NumTween"]=Gk;Gk.__name__="flixel.tweens.misc.NumTween";Gk.__super__=Ma;Gk.prototype=x(Ma.prototype,{value:null,_tweenFunction:null,_start:null,_range:null,destroy:function(){Ma.prototype.destroy.call(this);this._tweenFunction=null},tween:function(a,b,c,d){this._tweenFunction=d;this._start=this.value=
a;this._range=b-this.value;this.duration=c;this.start();return this},update:function(a){Ma.prototype.update.call(this,a);this.value=this._start+this._range*this.scale;null!=this._tweenFunction&&this._tweenFunction(this.value)},__class__:Gk});var Hk=function(a,b){Ma.call(this,a,b)};h["flixel.tweens.misc.ShakeTween"]=Hk;Hk.__name__="flixel.tweens.misc.ShakeTween";Hk.__super__=Ma;Hk.prototype=x(Ma.prototype,{intensity:null,axes:null,sprite:null,initialOffset:null,tween:function(a,b,c,d){null==d&&(d=
17);null==c&&(c=1);null==b&&(b=.05);this.intensity=b;this.sprite=a;this.duration=c;this.axes=d;b=a.offset.x;a=a.offset.y;null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);a=N.pool.get().set(b,a);a._inPool=!1;this.initialOffset=a;this.start();return this},destroy:function(){Ma.prototype.destroy.call(this);if(null!=this.sprite){var a=this.sprite.offset;var b=this.initialOffset;a=1E-7>=Math.abs(a.x-b.x)&&1E-7>=Math.abs(a.y-b.y);b._weak&&b.put();b=!a}else b=!1;
if(b){b=this.sprite.offset;a=this.initialOffset.x;var c=this.initialOffset.y;null==c&&(c=0);null==a&&(a=0);b.set_x(a);b.set_y(c)}this.initialOffset=this.sprite=null},update:function(a){Ma.prototype.update.call(this,a);a=this.axes;1!=a&&17!=a||this.sprite.offset.set_x(this.initialOffset.x+u.random.float(-this.intensity*this.sprite.get_width(),this.intensity*this.sprite.get_width()));a=this.axes;16!=a&&17!=a||this.sprite.offset.set_y(this.initialOffset.y+u.random.float(-this.intensity*this.sprite.get_height(),
this.intensity*this.sprite.get_height()))},isTweenOf:function(a,b){return this.sprite==a?null!=b?"shake"==b:!0:!1},__class__:Hk});var Fk=function(a,b){Ma.call(this,a,b)};h["flixel.tweens.misc.VarTween"]=Fk;Fk.__name__="flixel.tweens.misc.VarTween";Fk.__super__=Ma;Fk.prototype=x(Ma.prototype,{_object:null,_properties:null,_propertyInfos:null,tween:function(a,b,c){this._object=a;this._properties=b;this._propertyInfos=[];this.duration=c;this.start();this.initializeVars();return this},update:function(a){if(this._secondsSinceStart<
(0<this.executions?this.loopDelay:this.startDelay))Ma.prototype.update.call(this,a);else if(isNaN(this._propertyInfos[0].startValue)&&this.setStartValues(),Ma.prototype.update.call(this,a),this.active){a=0;for(var b=this._propertyInfos;a<b.length;){var c=b[a];++a;la.setProperty(c.object,c.field,c.startValue+c.range*this.scale)}}},initializeVars:function(){if(la.isObject(this._properties))var a=la.fields(this._properties);else throw J.thrown("Unsupported properties container - use an object containing key/value pairs.");
for(var b=0;b<a.length;){var c=a[b];++b;for(var d=this._object,f=c.split("."),g=f.pop(),k=0;k<f.length;){var l=f[k];++k;d=la.getProperty(d,l);if(!la.isObject(d))throw J.thrown('The object does not have the property "'+l+'" in "'+c+'"');}this._propertyInfos.push({object:d,field:g,startValue:NaN,range:la.getProperty(this._properties,c)})}},setStartValues:function(){for(var a=0,b=this._propertyInfos;a<b.length;){var c=b[a];++a;if(null==la.getProperty(c.object,c.field))throw J.thrown('The object does not have the property "'+
c.field+'"');var d=la.getProperty(c.object,c.field);if(isNaN(d))throw J.thrown('The property "'+c.field+'" is not numeric.');c.startValue=d;c.range-=d}},destroy:function(){Ma.prototype.destroy.call(this);this._propertyInfos=this._properties=this._object=null},isTweenOf:function(a,b){if(a==this._object&&null==b)return!0;for(var c=0,d=this._propertyInfos;c<d.length;){var f=d[c];++c;if(a==f.object&&(b==f.field||null==b))return!0}return!1},__class__:Fk});var kc=function(a,b){this.x=this.y=0;Ma.call(this,
a,b)};h["flixel.tweens.motion.Motion"]=kc;kc.__name__="flixel.tweens.motion.Motion";kc.__super__=Ma;kc.prototype=x(Ma.prototype,{x:null,y:null,_object:null,_wasObjectImmovable:null,destroy:function(){Ma.prototype.destroy.call(this);this._object=null},setObject:function(a){this._object=a;this._wasObjectImmovable=this._object.immovable;this._object.set_immovable(!0);return this},update:function(a){Ma.prototype.update.call(this,a);this.postUpdate()},onEnd:function(){this._object.set_immovable(this._wasObjectImmovable);
Ma.prototype.onEnd.call(this)},postUpdate:function(){null!=this._object&&this._object.setPosition(this.x,this.y)},isTweenOf:function(a,b){return this._object==a?null!=b&&"x"!=b?"y"==b:!0:!1},__class__:kc});var Nk=function(a,b){this.angle=this._centerX=this._centerY=this._radius=this._angleStart=this._angleFinish=0;kc.call(this,a,b)};h["flixel.tweens.motion.CircularMotion"]=Nk;Nk.__name__="flixel.tweens.motion.CircularMotion";Nk.__super__=kc;Nk.prototype=x(kc.prototype,{angle:null,_centerX:null,_centerY:null,
_radius:null,_angleStart:null,_angleFinish:null,setMotion:function(a,b,c,d,f,g,k){null==k&&(k=!0);this._centerX=a;this._centerY=b;this._radius=c;this.angle=this._angleStart=d*Math.PI/-180;this._angleFinish=2*Math.PI*(f?1:-1);this.duration=k?g:2*this._radius*Math.PI/g;this.start();return this},update:function(a){kc.prototype.update.call(this,a);this.angle=this._angleStart+this._angleFinish*this.scale;this.x=this._centerX+Math.cos(this.angle)*this._radius;this.y=this._centerY+Math.sin(this.angle)*this._radius;
this.finished&&this.postUpdate()},get_circumference:function(){return 2*this._radius*Math.PI},__class__:Nk,__properties__:x(kc.prototype.__properties__,{get_circumference:"get_circumference"})});var Mk=function(a,b){this._fromX=this._fromY=this._toX=this._toY=this._aX=this._aY=this._bX=this._bY=this._ttt=this._tt=0;kc.call(this,a,b)};h["flixel.tweens.motion.CubicMotion"]=Mk;Mk.__name__="flixel.tweens.motion.CubicMotion";Mk.__super__=kc;Mk.prototype=x(kc.prototype,{_fromX:null,_fromY:null,_toX:null,
_toY:null,_aX:null,_aY:null,_bX:null,_bY:null,_ttt:null,_tt:null,setMotion:function(a,b,c,d,f,g,k,l,m){this.x=this._fromX=a;this.y=this._fromY=b;this._aX=c;this._aY=d;this._bX=f;this._bY=g;this._toX=k;this._toY=l;this.duration=m;this.start();return this},update:function(a){kc.prototype.update.call(this,a);this.x=this.scale*this.scale*this.scale*(this._toX+3*(this._aX-this._bX)-this._fromX)+3*this.scale*this.scale*(this._fromX-2*this._aX+this._bX)+3*this.scale*(this._aX-this._fromX)+this._fromX;this.y=
this.scale*this.scale*this.scale*(this._toY+3*(this._aY-this._bY)-this._fromY)+3*this.scale*this.scale*(this._fromY-2*this._aY+this._bY)+3*this.scale*(this._aY-this._fromY)+this._fromY;this.finished&&this.postUpdate()},__class__:Mk});var Kk=function(a,b){this._distance=-1;this._fromX=this._fromY=this._moveX=this._moveY=0;kc.call(this,a,b)};h["flixel.tweens.motion.LinearMotion"]=Kk;Kk.__name__="flixel.tweens.motion.LinearMotion";Kk.__super__=kc;Kk.prototype=x(kc.prototype,{_fromX:null,_fromY:null,
_moveX:null,_moveY:null,_distance:null,setMotion:function(a,b,c,d,f,g){null==g&&(g=!0);this._distance=-1;this.x=this._fromX=a;this.y=this._fromY=b;this._moveX=c-a;this._moveY=d-b;this.duration=g?f:this.get_distance()/f;this.start();return this},update:function(a){kc.prototype.update.call(this,a);this.x=this._fromX+this._moveX*this.scale;this.y=this._fromY+this._moveY*this.scale;this.x==this._fromX+this._moveX&&this.y==this._fromY+this._moveY&&this.active&&this._secondsSinceStart>=this.duration&&(this.finished=
!0);this.finished&&this.postUpdate()},get_distance:function(){return 0<=this._distance?this._distance:this._distance=Math.sqrt(this._moveX*this._moveX+this._moveY*this._moveY)},__class__:Kk,__properties__:x(kc.prototype.__properties__,{get_distance:"get_distance"})});var Ok=function(a,b){this.distance=this._speed=this._index=0;kc.call(this,a,b);this.points=[];this._pointD=[0];this._pointT=[0]};h["flixel.tweens.motion.LinearPath"]=Ok;Ok.__name__="flixel.tweens.motion.LinearPath";Ok.__super__=kc;Ok.prototype=
x(kc.prototype,{distance:null,points:null,_pointD:null,_pointT:null,_speed:null,_index:null,_last:null,_prevPoint:null,_nextPoint:null,destroy:function(){kc.prototype.destroy.call(this);for(var a=0,b=this.points;a<b.length;){var c=b[a];++a;ba.put(c)}this._last=ba.put(this._last);this._prevPoint=ba.put(this._prevPoint);this._nextPoint=ba.put(this._nextPoint)},setMotion:function(a,b){null==b&&(b=!0);this.updatePath();b?(this.duration=a,this._speed=this.distance/a):(this.duration=this.distance/a,this._speed=
a);this.start();return this},addPoint:function(a,b){null==b&&(b=0);null==a&&(a=0);null!=this._last&&(this.distance+=Math.sqrt((a-this._last.x)*(a-this._last.x)+(b-this._last.y)*(b-this._last.y)),this._pointD[this.points.length]=this.distance);var c=this.points,d=this.points.length;null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);a=N.pool.get().set(a,b);a._inPool=!1;c[d]=this._last=a;return this},getPoint:function(a){null==a&&(a=0);if(0==this.points.length)throw J.thrown("No points have been added to the path yet.");
return this.points[a%this.points.length]},start:function(){this._index=this.backward?this.points.length-1:0;kc.prototype.start.call(this);return this},update:function(a){kc.prototype.update.call(this,a);if(null!=this.points){if(this.backward){if(0<this._index)for(;this.scale<this._pointT[this._index-1];)if(--this._index,0==this._index){this._index+=1;break}a=this._pointT[this._index];var b=this._pointT[this._index-1]-a;a=(this.scale-a)/b;this._prevPoint=this.points[this._index];this._nextPoint=this.points[this._index-
1]}else{if(this._index<this.points.length-1)for(;this.scale>this._pointT[this._index+1];)if(this._index++,this._index==this.points.length-1){--this._index;break}a=this._pointT[this._index];b=this._pointT[this._index+1]-a;a=(this.scale-a)/b;this._prevPoint=this.points[this._index];this._nextPoint=this.points[this._index+1]}this.x=this._prevPoint.x+(this._nextPoint.x-this._prevPoint.x)*a;this.y=this._prevPoint.y+(this._nextPoint.y-this._prevPoint.y)*a;kc.prototype.postUpdate.call(this)}},updatePath:function(){if(2>
this.points.length)throw J.thrown("A LinearPath must have at least 2 points to operate.");if(this._pointD.length!=this._pointT.length)for(var a=0;a<this.points.length;)this._pointT[a]=this._pointD[a++]/this.distance},__class__:Ok});var Lk=function(a,b){this._fromX=this._fromY=this._toX=this._toY=this._controlX=this._controlY=0;this._distance=-1;kc.call(this,a,b)};h["flixel.tweens.motion.QuadMotion"]=Lk;Lk.__name__="flixel.tweens.motion.QuadMotion";Lk.__super__=kc;Lk.prototype=x(kc.prototype,{_distance:null,
_fromX:null,_fromY:null,_toX:null,_toY:null,_controlX:null,_controlY:null,setMotion:function(a,b,c,d,f,g,k,l){null==l&&(l=!0);this._distance=-1;this.x=this._fromX=a;this.y=this._fromY=b;this._controlX=c;this._controlY=d;this._toX=f;this._toY=g;this.duration=l?k:this.get_distance()/k;this.start();return this},update:function(a){kc.prototype.update.call(this,a);this.x=this._fromX*(1-this.scale)*(1-this.scale)+2*this._controlX*(1-this.scale)*this.scale+this._toX*this.scale*this.scale;this.y=this._fromY*
(1-this.scale)*(1-this.scale)+2*this._controlY*(1-this.scale)*this.scale+this._toY*this.scale*this.scale;this.finished&&this.postUpdate()},get_distance:function(){if(0<=this._distance)return this._distance;var a=0,b=0;null==b&&(b=0);null==a&&(a=0);a=N.pool.get().set(a,b);a._inPool=!1;var c=a;b=a=0;null==b&&(b=0);null==a&&(a=0);a=N.pool.get().set(a,b);a._inPool=!1;c.set_x(this.x-2*this._controlX+this._toX);c.set_y(this.y-2*this._controlY+this._toY);a.set_x(2*this._controlX-2*this.x);a.set_y(2*this._controlY-
2*this.y);b=4*(c.x*c.x+c.y*c.y);var d=4*(c.x*a.x+c.y*a.y),f=a.x*a.x+a.y*a.y,g=2*Math.sqrt(b+d+f),k=Math.sqrt(b),l=2*b*k,m=2*Math.sqrt(f),z=d/k;c.put();a.put();return(l*g+k*d*(g-m)+(4*f*b-d*d)*Math.log((2*k+z+g)/(z+m)))/(4*l)},__class__:Lk,__properties__:x(kc.prototype.__properties__,{get_distance:"get_distance"})});var Pk=function(a,b){this._updateCurve=!0;this._distance=this._speed=this._index=this._numSegs=0;kc.call(this,a,b);this._points=[];this._curveT=[];this._curveD=[]};h["flixel.tweens.motion.QuadPath"]=
Pk;Pk.__name__="flixel.tweens.motion.QuadPath";Pk.__super__=kc;Pk.prototype=x(kc.prototype,{_points:null,_distance:null,_speed:null,_index:null,_numSegs:null,_updateCurve:null,_curveT:null,_curveD:null,_a:null,_b:null,_c:null,destroy:function(){kc.prototype.destroy.call(this);for(var a=0,b=this._points;a<b.length;){var c=b[a];++a;ba.put(c)}this._a=ba.put(this._a);this._b=ba.put(this._b);this._c=ba.put(this._c)},setMotion:function(a,b){null==b&&(b=!0);this.updatePath();b?(this.duration=a,this._speed=
this._distance/a):(this.duration=this._distance/a,this._speed=a);this.start();return this},addPoint:function(a,b){null==b&&(b=0);null==a&&(a=0);this._updateCurve=!0;var c=this._points;null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);a=N.pool.get().set(a,b);a._inPool=!1;c.push(a);return this},getPoint:function(a){null==a&&(a=0);if(0==this._points.length)throw J.thrown("No points have been added to the path yet.");return this._points[a%this._points.length]},start:function(){this._index=this.backward?
this._numSegs-1:0;kc.prototype.start.call(this);return this},update:function(a){kc.prototype.update.call(this,a);if(!this.backward&&null!=this._points){if(this._index<this._numSegs-1)for(;this.scale>this._curveT[this._index+1]&&(this._index++,this._index!=this._numSegs-1););a=this._curveT[this._index];var b=this._curveT[this._index+1]-a;a=(this.scale-a)/b;this._a=this._points[2*this._index];this._b=this._points[2*this._index+1];this._c=this._points[2*this._index+2];this.x=this._a.x*(1-a)*(1-a)+2*
this._b.x*(1-a)*a+this._c.x*a*a;this.y=this._a.y*(1-a)*(1-a)+2*this._b.y*(1-a)*a+this._c.y*a*a}else if(null!=this._points){if(0<this._index)for(;this.scale<this._curveT[this._index]&&(this._index--,0!=this._index););a=this._curveT[this._index+1];b=this._curveT[this._index]-a;a=(this.scale-a)/b;this._a=this._points[2*this._index+2];this._b=this._points[2*this._index+1];this._c=this._points[2*this._index];this.x=this._a.x*(1-a)*(1-a)+2*this._b.x*(1-a)*a+this._c.x*a*a;this.y=this._a.y*(1-a)*(1-a)+2*
this._b.y*(1-a)*a+this._c.y*a*a}kc.prototype.postUpdate.call(this)},updatePath:function(){if(0!=(this._points.length-1)%2||3>this._points.length)throw J.thrown("A QuadPath must have at least 3 points to operate and number of points must be a odd.");if(this._updateCurve){this._updateCurve=!1;var a=0;this._distance=0;for(this._numSegs=(this._points.length-1)/2|0;a<this._numSegs;){var b=2*a;this._curveD[a]=this.getCurveLength(this._points[b],this._points[b+1],this._points[b+2]);this._distance+=this._curveD[a++]}for(b=
a=0;a<this._numSegs;)b+=this._curveD[a],this._curveT[a++]=b/this._distance;this._curveT[this._numSegs-1]=1;this._curveT.unshift(0)}},getCurveLength:function(a,b,c){var d=null;if(null==d){var f=0,g=0;null==g&&(g=0);null==f&&(f=0);var k=N.pool.get().set(f,g);k._inPool=!1;d=k}f=b.x;g=b.y;null==g&&(g=0);null==f&&(f=0);d.set_x(f);d.set_y(g);b=d;g=f=0;null==g&&(g=0);null==f&&(f=0);k=N.pool.get().set(f,g);k._inPool=!1;d=k;g=f=0;null==g&&(g=0);null==f&&(f=0);k=N.pool.get().set(f,g);k._inPool=!1;f=b;f=1E-7>=
Math.abs(f.x-a.x)&&1E-7>=Math.abs(f.y-a.y);a._weak&&a.put();f&&(g=f=1E-7,null==g&&(g=0),null==f&&(f=0),b.set_x(b.x+f),b.set_y(b.y+g));f=b;f=1E-7>=Math.abs(f.x-c.x)&&1E-7>=Math.abs(f.y-c.y);c._weak&&c.put();f&&(g=f=1E-7,null==g&&(g=0),null==f&&(f=0),b.set_x(b.x+f),b.set_y(b.y+g));d.set_x(a.x-2*b.x+c.x);d.set_y(a.y-2*b.y+c.y);k.set_x(2*b.x-2*a.x);k.set_y(2*b.y-2*a.y);a=4*(d.x*d.x+d.y*d.y);c=4*(d.x*k.x+d.y*k.y);f=k.x*k.x+k.y*k.y;g=2*Math.sqrt(a+c+f);var l=Math.sqrt(a),m=2*a*l,z=2*Math.sqrt(f),h=c/l;
d.put();k.put();b.put();return(m*g+l*c*(g-z)+(4*f*a-c*c)*Math.log((2*l+h+g)/(h+z)))/(4*m)},__class__:Pk});var tg=function(a,b,c){null==b&&(b=0);null==a&&(a=0);this.lastStatus=-1;this.maxInputMovement=Infinity;this.mouseButtons=[-1];this.allowSwiping=!0;this.statusAnimations=["normal","highlight","pressed","disabled"];this.labelAlphas=[.8,1,.5,.3];var d=0,f=0;null==f&&(f=0);null==d&&(d=0);var g=N.pool.get().set(d,f);g._inPool=!1;f=d=0;null==f&&(f=0);null==d&&(d=0);var k=N.pool.get().set(d,f);k._inPool=
!1;d=0;f=1;null==f&&(f=0);null==d&&(d=0);var l=d;null==f&&(f=0);null==l&&(l=0);l=N.pool.get().set(l,f);l._inPool=!1;f=d=0;null==f&&(f=0);null==d&&(d=0);f=N.pool.get().set(d,f);f._inPool=!1;this.labelOffsets=[g,k,l,f];R.call(this,a,b);this.loadDefaultGraphic();this.onUp=new Hf(c);this.onDown=new Hf;this.onOver=new Hf;this.onOut=new Hf;this.set_status(0);a=this.scrollFactor;a.set_x(0);a.set_y(0);ha.get_current().stage.addEventListener("mouseUp",q(this,this.onUpEventListener));this.input=new xe(0)};
h["flixel.ui.FlxTypedButton_flixel_text_FlxText"]=tg;tg.__name__="flixel.ui.FlxTypedButton_flixel_text_FlxText";tg.__interfaces__=[th];tg.__super__=R;tg.prototype=x(R.prototype,{label:null,labelOffsets:null,labelAlphas:null,statusAnimations:null,allowSwiping:null,mouseButtons:null,maxInputMovement:null,status:null,onUp:null,onDown:null,onOver:null,onOut:null,_spriteLabel:null,input:null,currentInput:null,lastStatus:null,graphicLoaded:function(){R.prototype.graphicLoaded.call(this);this.setupAnimation("normal",
0);this.setupAnimation("highlight",1);this.setupAnimation("pressed",2);this.setupAnimation("disabled",3)},loadDefaultGraphic:function(){this.loadGraphic("flixel/images/ui/button.png",!0,80,20)},setupAnimation:function(a,b){b=Math.min(b,this.animation._sprite.get_numFrames()-1)|0;this.animation.add(a,[b])},destroy:function(){this.set_label(ba.destroy(this.label));this._spriteLabel=null;this.onUp=ba.destroy(this.onUp);this.onDown=ba.destroy(this.onDown);this.onOver=ba.destroy(this.onOver);this.onOut=
ba.destroy(this.onOut);this.labelOffsets=ba.putArray(this.labelOffsets);this.input=this.currentInput=this.labelAlphas=null;ha.get_current().stage.removeEventListener("mouseUp",q(this,this.onUpEventListener));R.prototype.destroy.call(this)},update:function(a){R.prototype.update.call(this,a);this.visible&&(this.updateButton(),this.lastStatus!=this.status&&(this.updateStatusAnimation(),this.lastStatus=this.status));this.input.update()},updateStatusAnimation:function(){this.animation.play(this.statusAnimations[this.status])},
draw:function(){R.prototype.draw.call(this);null!=this._spriteLabel&&this._spriteLabel.visible&&(this._spriteLabel.set_cameras(this._cameras),this._spriteLabel.draw())},stampOnAtlas:function(a){var b=a.addNode(this.graphic.bitmap,this.graphic.key),c=null!=b;if(null!=b){var d=this.frames,f=d.tileSize.x;d=d.tileSize.y;null==d&&(d=0);null==f&&(f=0);null==d&&(d=0);null==f&&(f=0);f=N.pool.get().set(f,d);f._inPool=!1;b=b.getTileFrames(f);this.set_frames(b)}c&&null!=this.label&&(a=a.addNode(this.label.graphic.bitmap,
this.label.graphic.key),c=c&&null!=a,null!=a&&this.label.set_frames(a.getImageFrame()));return c},updateButton:function(){if(3!=this.status){var a=this.checkMouseOverlap();a||(a=this.checkTouchOverlap());if(null!=this.currentInput&&this.currentInput.get_justReleased()&&a)this.onUpHandler();if(0!=this.status&&(!a||null!=this.currentInput&&this.currentInput.get_justReleased()))this.onOutHandler()}},checkMouseOverlap:function(){for(var a=!1,b=0,c=this.getCameras();b<c.length;){var d=c[b];++b;for(var f=
0,g=this.mouseButtons;f<g.length;){var k=g[f];++f;k=ef.getByID(k);null!=k&&this.checkInput(u.mouse,k,k.justPressedPosition,d)&&(a=!0)}}return a},checkTouchOverlap:function(){for(var a=!1,b=0,c=this.getCameras();b<c.length;){var d=c[b];++b;for(var f=0,g=u.touches.list;f<g.length;){var k=g[f];++f;this.checkInput(k,k,k.justPressedPosition,d)&&(a=!0)}}return a},checkInput:function(a,b,c,d){if(Infinity!=this.maxInputMovement){var f=0,g=0;null==g&&(g=0);null==f&&(f=0);null==g&&(g=0);null==f&&(f=0);g=N.pool.get().set(f,
g);g._inPool=!1;g._weak=!0;c=Mb.distanceTo(c,a.getViewPosition(null,g))>this.maxInputMovement}else c=!1;if(c&&b==this.currentInput)this.currentInput=null;else if(this.overlapsPoint(a.getWorldPosition(d,this._point),!0,d))return this.updateStatus(b),!0;return!1},updateStatus:function(a){if(a.get_justPressed())this.currentInput=a,this.onDownHandler();else if(0==this.status)if(this.allowSwiping&&a.get_pressed())this.onDownHandler();else this.onOverHandler()},updateLabelPosition:function(){null!=this._spriteLabel&&
(this._spriteLabel.set_x((this.pixelPerfectPosition?Math.floor(this.x):this.x)+this.labelOffsets[this.status].x),this._spriteLabel.set_y((this.pixelPerfectPosition?Math.floor(this.y):this.y)+this.labelOffsets[this.status].y))},updateLabelAlpha:function(){null!=this._spriteLabel&&this.labelAlphas.length>this.status&&this._spriteLabel.set_alpha(this.alpha*this.labelAlphas[this.status])},onUpEventListener:function(a){if(this.visible&&this.exists&&this.active&&2==this.status)this.onUpHandler()},onUpHandler:function(){this.set_status(1);
this.input.release();this.currentInput=null;var a=this.onUp;null!=a.callback&&a.callback();null!=a.sound&&a.sound.play(!0)},onDownHandler:function(){this.set_status(2);this.input.press();var a=this.onDown;null!=a.callback&&a.callback();null!=a.sound&&a.sound.play(!0)},onOverHandler:function(){if(u.mouse.enabled){this.set_status(1);var a=this.onOver;null!=a.callback&&a.callback();null!=a.sound&&a.sound.play(!0)}else this.set_status(0)},onOutHandler:function(){this.set_status(0);this.input.release();
var a=this.onOut;null!=a.callback&&a.callback();null!=a.sound&&a.sound.play(!0)},set_label:function(a){null!=a&&(a.scrollFactor.put(),a.scrollFactor=this.scrollFactor);this._spriteLabel=this.label=a;this.updateLabelPosition();return a},set_status:function(a){this.status=a;this.updateLabelAlpha();this.updateLabelPosition();return this.status},set_alpha:function(a){R.prototype.set_alpha.call(this,a);this.updateLabelAlpha();return this.alpha},set_x:function(a){R.prototype.set_x.call(this,a);this.updateLabelPosition();
return this.x},set_y:function(a){R.prototype.set_y.call(this,a);this.updateLabelPosition();return this.y},get_justReleased:function(){return-1==this.input.current},get_released:function(){var a=this.input;return 0!=a.current?-1==a.current:!0},get_pressed:function(){var a=this.input;return 1!=a.current?2==a.current:!0},get_justPressed:function(){return 2==this.input.current},__class__:tg,__properties__:x(R.prototype.__properties__,{get_justPressed:"get_justPressed",get_pressed:"get_pressed",get_released:"get_released",
get_justReleased:"get_justReleased",set_status:"set_status",set_label:"set_label"})});var Gg=function(a,b,c,d){null==b&&(b=0);null==a&&(a=0);tg.call(this,a,b,d);a=0;for(b=this.labelOffsets;a<b.length;){d=b[a];++a;var f=d.x,g=d.y+3;null==g&&(g=0);null==f&&(f=0);d.set_x(f);d.set_y(g)}null!=c&&(this.set_label(new Dc(this.x+this.labelOffsets[0].x,this.y+this.labelOffsets[0].y,80,c)),this.label.setFormat(null,8,3355443,"center"),this.label.set_alpha(this.labelAlphas[this.status]),this.label.drawFrame(!0))};
h["flixel.ui.FlxButton"]=Gg;Gg.__name__="flixel.ui.FlxButton";Gg.__super__=tg;Gg.prototype=x(tg.prototype,{resetHelpers:function(){tg.prototype.resetHelpers.call(this);if(null!=this.label){var a=this.label,b=this.get_width()|0;a.set_fieldWidth(this.label.frameWidth=b);this.label.set_size(this.label._defaultFormat.size|0)}},initLabel:function(a){null!=a&&(this.set_label(new Dc(this.x+this.labelOffsets[0].x,this.y+this.labelOffsets[0].y,80,a)),this.label.setFormat(null,8,3355443,"center"),this.label.set_alpha(this.labelAlphas[this.status]),
this.label.drawFrame(!0))},get_text:function(){return null!=this.label?this.label.text:null},set_text:function(a){null==this.label?null!=a&&(this.set_label(new Dc(this.x+this.labelOffsets[0].x,this.y+this.labelOffsets[0].y,80,a)),this.label.setFormat(null,8,3355443,"center"),this.label.set_alpha(this.labelAlphas[this.status]),this.label.drawFrame(!0)):this.label.set_text(a);return a},__class__:Gg,__properties__:x(tg.prototype.__properties__,{set_text:"set_text",get_text:"get_text"})});var Qk=function(a,
b,c){null==b&&(b=0);null==a&&(a=0);this.lastStatus=-1;this.maxInputMovement=Infinity;this.mouseButtons=[-1];this.allowSwiping=!0;this.statusAnimations=["normal","highlight","pressed","disabled"];this.labelAlphas=[.8,1,.5,.3];var d=0,f=0;null==f&&(f=0);null==d&&(d=0);var g=N.pool.get().set(d,f);g._inPool=!1;f=d=0;null==f&&(f=0);null==d&&(d=0);var k=N.pool.get().set(d,f);k._inPool=!1;d=0;f=1;null==f&&(f=0);null==d&&(d=0);var l=d;null==f&&(f=0);null==l&&(l=0);l=N.pool.get().set(l,f);l._inPool=!1;f=d=
0;null==f&&(f=0);null==d&&(d=0);f=N.pool.get().set(d,f);f._inPool=!1;this.labelOffsets=[g,k,l,f];R.call(this,a,b);this.loadDefaultGraphic();this.onUp=new Hf(c);this.onDown=new Hf;this.onOver=new Hf;this.onOut=new Hf;this.set_status(0);a=this.scrollFactor;a.set_x(0);a.set_y(0);ha.get_current().stage.addEventListener("mouseUp",q(this,this.onUpEventListener));this.input=new xe(0)};h["flixel.ui.FlxTypedButton"]=Qk;Qk.__name__="flixel.ui.FlxTypedButton";Qk.__interfaces__=[th];Qk.__super__=R;Qk.prototype=
x(R.prototype,{label:null,labelOffsets:null,labelAlphas:null,statusAnimations:null,allowSwiping:null,mouseButtons:null,maxInputMovement:null,status:null,onUp:null,onDown:null,onOver:null,onOut:null,_spriteLabel:null,input:null,currentInput:null,lastStatus:null,graphicLoaded:function(){R.prototype.graphicLoaded.call(this);this.setupAnimation("normal",0);this.setupAnimation("highlight",1);this.setupAnimation("pressed",2);this.setupAnimation("disabled",3)},loadDefaultGraphic:function(){this.loadGraphic("flixel/images/ui/button.png",
!0,80,20)},setupAnimation:function(a,b){b=Math.min(b,this.animation._sprite.get_numFrames()-1)|0;this.animation.add(a,[b])},destroy:function(){this.set_label(ba.destroy(this.label));this._spriteLabel=null;this.onUp=ba.destroy(this.onUp);this.onDown=ba.destroy(this.onDown);this.onOver=ba.destroy(this.onOver);this.onOut=ba.destroy(this.onOut);this.labelOffsets=ba.putArray(this.labelOffsets);this.input=this.currentInput=this.labelAlphas=null;ha.get_current().stage.removeEventListener("mouseUp",q(this,
this.onUpEventListener));R.prototype.destroy.call(this)},update:function(a){R.prototype.update.call(this,a);this.visible&&(this.updateButton(),this.lastStatus!=this.status&&(this.updateStatusAnimation(),this.lastStatus=this.status));this.input.update()},updateStatusAnimation:function(){this.animation.play(this.statusAnimations[this.status])},draw:function(){R.prototype.draw.call(this);null!=this._spriteLabel&&this._spriteLabel.visible&&(this._spriteLabel.set_cameras(this._cameras),this._spriteLabel.draw())},
stampOnAtlas:function(a){var b=a.addNode(this.graphic.bitmap,this.graphic.key),c=null!=b;if(null!=b){var d=this.frames,f=d.tileSize.x;d=d.tileSize.y;null==d&&(d=0);null==f&&(f=0);null==d&&(d=0);null==f&&(f=0);f=N.pool.get().set(f,d);f._inPool=!1;b=b.getTileFrames(f);this.set_frames(b)}c&&null!=this.label&&(a=a.addNode(this.label.graphic.bitmap,this.label.graphic.key),c=c&&null!=a,null!=a&&this.label.set_frames(a.getImageFrame()));return c},updateButton:function(){if(3!=this.status){var a=this.checkMouseOverlap();
a||(a=this.checkTouchOverlap());if(null!=this.currentInput&&this.currentInput.get_justReleased()&&a)this.onUpHandler();if(0!=this.status&&(!a||null!=this.currentInput&&this.currentInput.get_justReleased()))this.onOutHandler()}},checkMouseOverlap:function(){for(var a=!1,b=0,c=this.getCameras();b<c.length;){var d=c[b];++b;for(var f=0,g=this.mouseButtons;f<g.length;){var k=g[f];++f;k=ef.getByID(k);null!=k&&this.checkInput(u.mouse,k,k.justPressedPosition,d)&&(a=!0)}}return a},checkTouchOverlap:function(){for(var a=
!1,b=0,c=this.getCameras();b<c.length;){var d=c[b];++b;for(var f=0,g=u.touches.list;f<g.length;){var k=g[f];++f;this.checkInput(k,k,k.justPressedPosition,d)&&(a=!0)}}return a},checkInput:function(a,b,c,d){if(Infinity!=this.maxInputMovement){var f=0,g=0;null==g&&(g=0);null==f&&(f=0);null==g&&(g=0);null==f&&(f=0);g=N.pool.get().set(f,g);g._inPool=!1;g._weak=!0;c=Mb.distanceTo(c,a.getViewPosition(null,g))>this.maxInputMovement}else c=!1;if(c&&b==this.currentInput)this.currentInput=null;else if(this.overlapsPoint(a.getWorldPosition(d,
this._point),!0,d))return this.updateStatus(b),!0;return!1},updateStatus:function(a){if(a.get_justPressed())this.currentInput=a,this.onDownHandler();else if(0==this.status)if(this.allowSwiping&&a.get_pressed())this.onDownHandler();else this.onOverHandler()},updateLabelPosition:function(){null!=this._spriteLabel&&(this._spriteLabel.set_x((this.pixelPerfectPosition?Math.floor(this.x):this.x)+this.labelOffsets[this.status].x),this._spriteLabel.set_y((this.pixelPerfectPosition?Math.floor(this.y):this.y)+
this.labelOffsets[this.status].y))},updateLabelAlpha:function(){null!=this._spriteLabel&&this.labelAlphas.length>this.status&&this._spriteLabel.set_alpha(this.alpha*this.labelAlphas[this.status])},onUpEventListener:function(a){if(this.visible&&this.exists&&this.active&&2==this.status)this.onUpHandler()},onUpHandler:function(){this.set_status(1);this.input.release();this.currentInput=null;var a=this.onUp;null!=a.callback&&a.callback();null!=a.sound&&a.sound.play(!0)},onDownHandler:function(){this.set_status(2);
this.input.press();var a=this.onDown;null!=a.callback&&a.callback();null!=a.sound&&a.sound.play(!0)},onOverHandler:function(){if(u.mouse.enabled){this.set_status(1);var a=this.onOver;null!=a.callback&&a.callback();null!=a.sound&&a.sound.play(!0)}else this.set_status(0)},onOutHandler:function(){this.set_status(0);this.input.release();var a=this.onOut;null!=a.callback&&a.callback();null!=a.sound&&a.sound.play(!0)},set_label:function(a){null!=a&&(a.scrollFactor.put(),a.scrollFactor=this.scrollFactor);
this._spriteLabel=this.label=a;this.updateLabelPosition();return a},set_status:function(a){this.status=a;this.updateLabelAlpha();this.updateLabelPosition();return this.status},set_alpha:function(a){R.prototype.set_alpha.call(this,a);this.updateLabelAlpha();return this.alpha},set_x:function(a){R.prototype.set_x.call(this,a);this.updateLabelPosition();return this.x},set_y:function(a){R.prototype.set_y.call(this,a);this.updateLabelPosition();return this.y},get_justReleased:function(){return-1==this.input.current},
get_released:function(){var a=this.input;return 0!=a.current?-1==a.current:!0},get_pressed:function(){var a=this.input;return 1!=a.current?2==a.current:!0},get_justPressed:function(){return 2==this.input.current},__class__:Qk,__properties__:x(R.prototype.__properties__,{get_justPressed:"get_justPressed",get_pressed:"get_pressed",get_released:"get_released",get_justReleased:"get_justReleased",set_status:"set_status",set_label:"set_label"})});var Hf=function(a,b){this.callback=a;this.sound=b};h["flixel.ui._FlxButton.FlxButtonEvent"]=
Hf;Hf.__name__="flixel.ui._FlxButton.FlxButtonEvent";Hf.__interfaces__=[D];Hf.prototype={callback:null,sound:null,destroy:function(){this.callback=null;this.sound=ba.destroy(this.sound)},fire:function(){null!=this.callback&&this.callback();null!=this.sound&&this.sound.play(!0)},__class__:Hf};var Hd=function(){};h["flixel.util.FlxArrayUtil"]=Hd;Hd.__name__="flixel.util.FlxArrayUtil";Hd.flatten2DArray_Int=function(a){for(var b=[],c=0;c<a.length;){var d=a[c];++c;for(var f=0;f<d.length;){var g=d[f];++f;
b.push(g)}}return b};Hd.fastSplice_flixel_tweens_FlxTween=function(a,b){b=a.indexOf(b);-1!=b&&(a[b]=a[a.length-1],a.pop());return a};Hd.fastSplice_flixel_util_FlxTimer=function(a,b){b=a.indexOf(b);-1!=b&&(a[b]=a[a.length-1],a.pop());return a};Hd.swapAndPop_fastSplice_T=function(a,b){a[b]=a[a.length-1];a.pop();return a};Hd.setLength=function(a,b){0<b&&b<a.length&&(a.length=b);return a};Hd.swapByIndex=function(a,b,c){var d=a[b];a[b]=a[c];a[c]=d;return a};Hd.safeSwapByIndex=function(a,b,c){if(0<=b&&
b<a.length&&0<=c&&c<a.length){var d=a[b];a[b]=a[c];a[c]=d}return a};Hd.swap=function(a,b,c){b=a.indexOf(b);c=a.indexOf(c);var d=a[b];a[b]=a[c];a[c]=d;return a};Hd.safeSwap=function(a,b,c){b=a.indexOf(b);c=a.indexOf(c);if(0<=b&&b<a.length&&0<=c&&c<a.length){var d=a[b];a[b]=a[c];a[c]=d}return a};Hd.clearArray=function(a,b){null==b&&(b=!1);if(null==a)return a;if(b)for(;0<a.length;)a.pop()instanceof Array&&Hd.clearArray(a,b);else for(;0<a.length;)a.pop();return a};Hd.equals=function(a,b){if(null==a&&
null==b)return!0;if(null==a&&null!=b||null!=a&&null==b||a.length!=b.length)return!1;for(var c=0,d=a.length;c<d;){var f=c++;if(a[f]!=b[f])return!1}return!0};Hd.last=function(a){return null==a||0==a.length?null:a[a.length-1]};Hd.safePush=function(a,b){null==a&&(a=[]);a.push(b);return a};Hd.contains=function(a,b){return-1!=a.indexOf(b)};Hd.safeContains=function(a,b){return null!=a?-1!=a.indexOf(b):!1};var Wb=function(){};h["flixel.util.FlxBitmapDataPool"]=Wb;Wb.__name__="flixel.util.FlxBitmapDataPool";
Wb.__properties__={set_maxLength:"set_maxLength"};Wb.get=function(a,b,c,d,f){null==f&&(f=!1);null==c&&(c=!0);for(var g=null,k=Wb._head;null!=k;){var l=k.bmd;if(l.transparent==c&&l.width>=a&&l.height>=b&&(!f||f&&l.width==a&&l.height==b)){g=l;null!=k.prev&&(k.prev.next=k.next);null!=k.next&&(k.next.prev=k.prev);k==Wb._head&&(Wb._head=k.next);k==Wb._tail&&(Wb._tail=k.prev);Wb.$length--;break}k=k.next}null!=g?null!=d&&(Wb._rect.x=0,Wb._rect.y=0,Wb._rect.width=a,Wb._rect.height=b,g.fillRect(Wb._rect,d)):
g=new ma(a,b,c,null!=d?d:-1);return g};Wb.put=function(a){if(Wb.$length>=Wb.maxLength){var b=Wb._tail;b.bmd.dispose();null!=b.prev&&(b.prev.next=null,Wb._tail=b.prev);Wb.$length--}a=new Zm(a);a.next=Wb._head;null==Wb._head?Wb._head=Wb._tail=a:(Wb._head=a,a.next.prev=a);Wb.$length++};Wb.clear=function(){for(var a=Wb._head;null!=a;)a.bmd.dispose(),a=a.next;Wb.$length=0;Wb._head=Wb._tail=null};Wb.set_maxLength=function(a){if(Wb.maxLength!=a)for(var b=Wb._tail;null!=b&&Wb.$length>a;)b.bmd.dispose(),b=
b.prev,Wb.$length--;return Wb.maxLength=a};var Zm=function(a,b,c){this.bmd=a;this.prev=b;this.next=c};h["flixel.util._FlxBitmapDataPool.FlxBitmapDataPoolNode"]=Zm;Zm.__name__="flixel.util._FlxBitmapDataPool.FlxBitmapDataPoolNode";Zm.prototype={bmd:null,prev:null,next:null,__class__:Zm};var xd=function(){};h["flixel.util.FlxBitmapDataUtil"]=xd;xd.__name__="flixel.util.FlxBitmapDataUtil";xd.merge=function(a,b,c,d,f,g,k,l){if(!(d.x>=c.width||d.y>=c.height||b.x>=a.width||b.y>=a.height||0>=b.x+b.width||
0>=b.y+b.height)){for(;b.x+b.width>a.width||b.y+b.height>a.height||0>b.x||0>b.y||0>d.x||0>d.y;){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&&(d.x-=b.x,b.width+=b.x,b.x=0);0>b.y&&(d.y-=b.y,b.height+=b.y,b.y=0);if(d.x>=c.width||d.y>=c.height)return;0>d.x&&(b.x-=d.x,b.width+=d.x,d.x=0);0>d.y&&(b.y-=d.y,b.height+=d.y,d.y=0)}if(!(0>=b.width||0>=b.height)){var m=Math.round(b.x),z=Math.round(b.y),h=Math.round(b.width);b=Math.round(b.height);var p=Math.round(d.x);
d=Math.round(d.y);c.lock();for(var r=0;r<h;)for(var w=r++,u=0,n=b;u<n;){var t=u++;var A=m+w;var y=z+t;var q=p+w;t=d+t;var E=a.getPixel32(A,y);var L=c.getPixel32(q,t);A=((E>>16&255)*f+(L>>16&255)*(256-f))/256|0;y=((E>>8&255)*g+(L>>8&255)*(256-g))/256|0;var v=((E&255)*k+(L&255)*(256-k))/256|0;L=E=((E>>24&255)*l+(L>>24&255)*(256-l))/256|0;null==L&&(L=255);E=mb._new();null==L&&(L=255);E&=-16711681;E|=(255<A?255:0>A?0:A)<<16;E&=-65281;E|=(255<y?255:0>y?0:y)<<8;E&=-256;E|=255<v?255:0>v?0:v;E&=16777215;
A=E|=(255<L?255:0>L?0:L)<<24;c.setPixel32(q,t,A)}c.unlock()}}};xd.mergeColorComponent=function(a,b,c){return(a*c+b*(256-c))/256|0};xd.compare=function(a,b){if(a==b)return 0;if(a.width!=b.width)return-3;if(a.height!=b.height)return-4;for(var c=a.width,d=a.height,f=new ma(c,d,!0,0),g=!0,k=0;k<c;)for(var l=k++,m=0,z=d;m<z;){var h=m++,p=a.getPixel32(l,h),r=b.getPixel32(l,h);if(p!=r)if(g=!1,(p&16777215)!=(r&16777215)){var w=(p>>16&255)-(r>>16&255);w=0<=w?w:256+w;var u=(p>>8&255)-(r>>8&255);u=0<=u?u:256+
u;r=(p&255)-(r&255);r=0<=r?r:256+r;p=mb._new();var n=255;null==n&&(n=255);p&=-16711681;p|=(255<w?255:0>w?0:w)<<16;p&=-65281;p|=(255<u?255:0>u?0:u)<<8;p&=-256;p|=255<r?255:0>r?0:r;p&=16777215;p|=(255<n?255:0>n?0:n)<<24;f.setPixel32(l,h,p)}else w=p>>24&255,u=r>>24&255,w!=u&&(w-=u,u=0<=w?w:256+w,null==u&&(u=255),w=mb._new(),null==u&&(u=255),w&=-16711681,w|=16711680,w&=-65281,w|=65280,w&=-256,w|=255,w&=16777215,w|=(255<u?255:0>u?0:u)<<24,f.setPixel32(l,h,w))}return g?0:f};xd.getDiff=function(a,b){a-=
b;return 0<=a?a:256+a};xd.getMemorySize=function(a){return a.width*a.height*4};xd.replaceColor=function(a,b,c,d,f){null==d&&(d=!1);var g=null;d&&(g=[]);var k=0,l=0,m=a.width,z=a.height;null!=f&&(k=f.x|0,l=f.y|0,m=f.width|0,z=f.height|0);m=Math.max(m,a.width)|0;z=Math.max(z,a.height)|0;f=0;var h,p=!1;for(a.lock();f<z;){for(h=0;h<m;){var r=k+h;var w=l+f;a.getPixel32(r,w)==b&&(a.setPixel32(r,w,c),p=!0,d&&(null==w&&(w=0),null==r&&(r=0),null==w&&(w=0),null==r&&(r=0),w=N.pool.get().set(r,w),w._inPool=!1,
g.push(w)));++h}++f}a.unlock();p&&null==g&&(g=[]);return g};xd.addSpacesAndBorders=function(a,b,c,d,f){if(null==f){var g=0,k=0,l=a.width,m=a.height;null==m&&(m=0);null==l&&(l=0);null==k&&(k=0);null==g&&(g=0);f=V._pool.get();null==m&&(m=0);null==l&&(l=0);null==k&&(k=0);null==g&&(g=0);f.x=g;f.y=k;f.width=l;f.height=m;f._inPool=!1}m=f.width|0;g=f.height|0;null!=b&&(m=b.x|0,g=b.y|0);b=f.width/m|0;l=f.height/g|0;var z=k=0;null!=c&&(k=c.x|0,z=c.y|0);var h=c=0;null!=d&&(c=d.x|0,h=d.y|0);d=new ma(f.width+
(b-1)*k+2*b*c|0,f.height+(l-1)*z+2*l*h|0,!0,0);d.lock();for(var p=new ea(0,0,m,g),r=new Ya,w=0;w<b;){var u=w++;r.x=u*(m+k+2*c)+c;p.x=u*m+f.x;u=0;for(var n=l;u<n;){var t=u++;r.y=t*(g+z+2*h)+h;p.y=t*g+f.y;d.copyPixels(a,p,r)}}d.unlock();xd.copyBorderPixels(d,m,g,k,z,c,h,b,l);return d};xd.copyBorderPixels=function(a,b,c,d,f,g,k,l,m){var z=new ea(0,0,1,a.height),h=new Ya;a.lock();for(var p=0;p<l;){var r=p++;z.x=r*(b+2*g+d)+g;r=0;for(var w=g;r<w;){var u=r++;h.x=z.x-u-1;a.copyPixels(a,z,h)}z.x+=b-1;r=0;
for(w=g;r<w;)u=r++,h.x=z.x+u+1,a.copyPixels(a,z,h)}h.setTo(0,0);z.setTo(0,0,a.width,1);p=0;for(l=m;p<l;){r=p++;z.y=r*(c+2*k+f)+k;r=0;for(w=k;r<w;)u=r++,h.y=z.y-u-1,a.copyPixels(a,z,h);z.y+=c-1;r=0;for(w=k;r<w;)u=r++,h.y=z.y+u+1,a.copyPixels(a,z,h)}a.unlock();return a};xd.generateRotations=function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!1);null==b&&(b=16);var f=a.width,g=a.height,k=g>f?g:f;d&&(k=1.5*k|0);d=Math.sqrt(b)|0;var l=Math.ceil(b/d);b=360/b;var m=new ma(k*l,k*d,!0,0),z=0,h=0;f=.5*f|0;for(var p=
.5*g|0,r=.5*k|0,w=.5*k|0;z<d;){for(g=0;g<l;)xd.matrix.identity(),xd.matrix.translate(-f,-p),xd.matrix.rotate(Math.PI/180*h),xd.matrix.translate(k*g+r,w),h+=b,m.draw(a,xd.matrix,null,null,null,c),++g;w+=k;++z}return m};var Wa=function(){};h["flixel.util.FlxCollision"]=Wa;Wa.__name__="flixel.util.FlxCollision";Wa.pixelPerfectCheck=function(a,b,c,d){null==c&&(c=1);var f=0!=a.angle||0!=b.angle||1!=a.scale.x||1!=a.scale.y||1!=b.scale.x||1!=b.scale.y;a.getScreenBounds(Wa.boundsA,d);b.getScreenBounds(Wa.boundsB,
d);var g=Wa.intersect;g.x=0;g.y=0;g.width=0;g.height=0;Wa.boundsA.intersection(Wa.boundsB,g);g=Wa.intersect;if(0==g.width||0==g.height||1>Wa.intersect.width||1>Wa.intersect.height)return!1;Wa.matrixA.identity();Wa.matrixA.translate(-(Wa.intersect.x-Wa.boundsA.x),-(Wa.intersect.y-Wa.boundsA.y));Wa.matrixB.identity();Wa.matrixB.translate(-(Wa.intersect.x-Wa.boundsB.x),-(Wa.intersect.y-Wa.boundsB.y));a.drawFrame();b.drawFrame();d=a.framePixels;var k=b.framePixels,l=Wa.intersect.width|0,m=Wa.intersect.height|
0;f&&(Wa.testMatrix.identity(),Wa.testMatrix.translate(-a.origin.x,-a.origin.y),Wa.testMatrix.rotate(Math.PI/180*a.angle),Wa.testMatrix.scale(a.scale.x,a.scale.y),Wa.testMatrix.translate(Wa.boundsA.width/2,Wa.boundsA.height/2),g=Wb.get(Math.floor(Wa.boundsA.width),Math.floor(Wa.boundsA.height),!0,0,!1),g.draw(d,Wa.testMatrix,null,null,null,!1),d=g,Wa.testMatrix.identity(),Wa.testMatrix.translate(-b.origin.x,-b.origin.y),Wa.testMatrix.rotate(Math.PI/180*b.angle),Wa.testMatrix.scale(b.scale.x,b.scale.y),
Wa.testMatrix.translate(Wa.boundsB.width/2,Wa.boundsB.height/2),b=Wb.get(Math.floor(Wa.boundsB.width),Math.floor(Wa.boundsB.height),!0,0,!1),b.draw(k,Wa.testMatrix,null,null,null,!1),k=b);Wa.boundsA.x=-Wa.matrixA.tx|0;Wa.boundsA.y=-Wa.matrixA.ty|0;Wa.boundsA.width=l;Wa.boundsA.height=m;Wa.boundsB.x=-Wa.matrixB.tx|0;Wa.boundsB.y=-Wa.matrixB.ty|0;Wa.boundsB.width=l;Wa.boundsB.height=m;g=Wa.boundsA;a=Wa.flashRect;null==a&&(a=new ea);a.x=g.x;a.y=g.y;a.width=g.width;a.height=g.height;b=d.getPixels(Wa.flashRect);
g=Wa.boundsB;a=Wa.flashRect;null==a&&(a=new ea);a.x=g.x;a.y=g.y;a.width=g.width;a.height=g.height;g=k.getPixels(Wa.flashRect);a=!1;l*=m;m=0;for(var z=Math.ceil(l/2);m<z;){var h=m++;h<<=3;b.position=g.position=h;h=b.readUnsignedByte();var p=g.readUnsignedByte();if(h>=c&&p>=c){a=!0;break}}if(!a)for(m=0,z=l>>1;m<z;)if(h=m++,h=(h<<3)+4,b.position=g.position=h,h=b.readUnsignedByte(),p=g.readUnsignedByte(),h>=c&&p>=c){a=!0;break}f&&(Wb.put(d),Wb.put(k));return a};Wa.pixelPerfectPointCheck=function(a,b,
c,d){null==d&&(d=1);u.renderTile&&c.drawFrame();null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);a=N.pool.get().set(a,b);a._inPool=!1;a._weak=!0;return c.pixelsOverlapPoint(a,d)};Wa.createCameraWall=function(a,b,c,d){null==d&&(d=!1);null==b&&(b=!0);if(b){b=new Gf(Math.floor(a.x-c),Math.floor(a.y),c,a.height);var f=new Gf(Math.floor(a.x+a.width),Math.floor(a.y),c,a.height);var g=new Gf(Math.floor(a.x-c),Math.floor(a.y-c),a.width+2*c,c);var k=new Gf(Math.floor(a.x-
c),a.height,a.width+2*c,c);if(d){d=u.worldBounds;var l=a.x-c,m=a.y-c,z=a.width+2*c;a=a.height+2*c;null==a&&(a=0);null==z&&(z=0);null==m&&(m=0);null==l&&(l=0);d.x=l;d.y=m;d.width=z;d.height=a}}else b=new Gf(Math.floor(a.x),Math.floor(a.y+c),c,a.height-2*c),f=new Gf(Math.floor(a.x+a.width-c),Math.floor(a.y+c),c,a.height-2*c),g=new Gf(Math.floor(a.x),Math.floor(a.y),a.width,c),k=new Gf(Math.floor(a.x),a.height-c,a.width,c),d&&(d=u.worldBounds,l=a.x,m=a.y,z=a.width,a=a.height,null==a&&(a=0),null==z&&
(z=0),null==m&&(m=0),null==l&&(l=0),d.x=l,d.y=m,d.width=z,d.height=a);a=new yb;a.add(b);a.add(f);a.add(g);a.add(k);return a};Wa.calcRectEntry=function(a,b,c,d){var f=function(f,g){null==d?(null==g&&(g=0),null==f&&(f=0),null==g&&(g=0),null==f&&(f=0),g=N.pool.get().set(f,g),g._inPool=!1,d=g):(null==g&&(g=0),null==f&&(f=0),d.set_x(f),d.set_y(g));g=b;g._weak&&g.put();g=c;g._weak&&g.put();a._weak&&!a._inPool&&(a._inPool=!0,a._weak=!1,V._pool.putUnsafe(a));return d},g=function(){var d=b;d._weak&&d.put();
d=c;d._weak&&d.put();a._weak&&!a._inPool&&(a._inPool=!0,a._weak=!1,V._pool.putUnsafe(a));return null},k=b.x,l=b.y;k=k>=a.x&&k<=a.x+a.width&&l>=a.y&&l<=a.y+a.height;b._weak&&b.put();if(k)return f(b.x,b.y);if(b.y<a.y&&c.y<a.y||b.y>a.y+a.height&&c.y>a.y+a.height||b.x>a.x+a.width&&c.x>a.x+a.width||b.x<a.x&&c.x<a.x)return g();if(b.x==c.x)return b.y<a.y?f(b.x,a.y):f(b.x,a.y+a.height);k=(b.y-c.y)/(b.x-c.x);l=b.y-k*b.x;var m=k*a.x+l,z=k*(a.x+a.width)+l;return m<a.y&&z<a.y||m>a.y+a.height&&z>a.y+a.height?
g():b.x<c.x?m<a.y?f((a.y-l)/k,a.y):m>a.y+a.height?f((a.y+a.height-l)/k,a.y+a.height):f(a.x,m):z<a.y?f((a.y-l)/k,a.y):z>a.y+a.height?f((a.y+a.height-l)/k,a.y+a.height):f(a.x+a.width,z)};Wa.calcRectExit=function(a,b,c,d){return Wa.calcRectEntry(a,c,b,d)};var mb={__properties__:{set_lightness:"set_lightness",get_lightness:"get_lightness",set_brightness:"set_brightness",get_brightness:"get_brightness",set_saturation:"set_saturation",get_saturation:"get_saturation",set_hue:"set_hue",get_hue:"get_hue",
set_rgb:"set_rgb",get_rgb:"get_rgb",set_black:"set_black",get_black:"get_black",set_yellow:"set_yellow",get_yellow:"get_yellow",set_magenta:"set_magenta",get_magenta:"get_magenta",set_cyan:"set_cyan",get_cyan:"get_cyan",set_alphaFloat:"set_alphaFloat",get_alphaFloat:"get_alphaFloat",set_greenFloat:"set_greenFloat",get_greenFloat:"get_greenFloat",set_blueFloat:"set_blueFloat",get_blueFloat:"get_blueFloat",set_redFloat:"set_redFloat",get_redFloat:"get_redFloat",set_alpha:"set_alpha",get_alpha:"get_alpha",
set_green:"set_green",get_green:"get_green",set_blue:"set_blue",get_blue:"get_blue",set_red:"set_red",get_red:"get_red"},fromInt:function(a){return mb._new(a)},fromRGB:function(a,b,c,d){null==d&&(d=255);var f=mb._new();null==d&&(d=255);f=(f&-16711681|(255<a?255:0>a?0:a)<<16)&-65281|(255<b?255:0>b?0:b)<<8;f&=-256;f|=255<c?255:0>c?0:c;f&=16777215;return f|=(255<d?255:0>d?0:d)<<24},fromRGBFloat:function(a,b,c,d){null==d&&(d=1);var f=mb._new();null==d&&(d=1);a=Math.round(255*a);f=f&-16711681|(255<a?255:
0>a?0:a)<<16;a=Math.round(255*b);f=f&-65281|(255<a?255:0>a?0:a)<<8;a=Math.round(255*c);f=f&-256|(255<a?255:0>a?0:a);a=Math.round(255*d);return f&16777215|(255<a?255:0>a?0:a)<<24},fromCMYK:function(a,b,c,d,f){null==f&&(f=1);var g=mb._new();null==f&&(f=1);a=Math.round((1-a)*(1-d)*255);g=g&-16711681|(255<a?255:0>a?0:a)<<16;a=Math.round((1-b)*(1-d)*255);g=g&-65281|(255<a?255:0>a?0:a)<<8;a=Math.round((1-c)*(1-d)*255);b=Math.round(255*f);return g=(g&-256|(255<a?255:0>a?0:a))&16777215|(255<b?255:0>b?0:b)<<
24},fromHSB:function(a,b,c,d){null==d&&(d=1);var f=mb._new();b*=c;c-=b;var g=a%360/60;a=b*(1-Math.abs(g%2-1))+c;b+=c;switch(g|0){case 0:null==d&&(d=1);g=Math.round(255*b);f=f&-16711681|(255<g?255:0>g?0:g)<<16;g=Math.round(255*a);f=f&-65281|(255<g?255:0>g?0:g)<<8;g=Math.round(255*c);f=f&-256|(255<g?255:0>g?0:g);g=Math.round(255*d);f=f&16777215|(255<g?255:0>g?0:g)<<24;break;case 1:null==d&&(d=1);g=Math.round(255*a);f=f&-16711681|(255<g?255:0>g?0:g)<<16;g=Math.round(255*b);f=f&-65281|(255<g?255:0>g?
0:g)<<8;g=Math.round(255*c);f=f&-256|(255<g?255:0>g?0:g);g=Math.round(255*d);f=f&16777215|(255<g?255:0>g?0:g)<<24;break;case 2:null==d&&(d=1);g=Math.round(255*c);f=f&-16711681|(255<g?255:0>g?0:g)<<16;g=Math.round(255*b);f=f&-65281|(255<g?255:0>g?0:g)<<8;g=Math.round(255*a);f=f&-256|(255<g?255:0>g?0:g);g=Math.round(255*d);f=f&16777215|(255<g?255:0>g?0:g)<<24;break;case 3:null==d&&(d=1);g=Math.round(255*c);f=f&-16711681|(255<g?255:0>g?0:g)<<16;g=Math.round(255*a);f=f&-65281|(255<g?255:0>g?0:g)<<8;g=
Math.round(255*b);f=f&-256|(255<g?255:0>g?0:g);g=Math.round(255*d);f=f&16777215|(255<g?255:0>g?0:g)<<24;break;case 4:null==d&&(d=1);g=Math.round(255*a);f=f&-16711681|(255<g?255:0>g?0:g)<<16;g=Math.round(255*c);f=f&-65281|(255<g?255:0>g?0:g)<<8;g=Math.round(255*b);f=f&-256|(255<g?255:0>g?0:g);g=Math.round(255*d);f=f&16777215|(255<g?255:0>g?0:g)<<24;break;case 5:null==d&&(d=1),g=Math.round(255*b),f=f&-16711681|(255<g?255:0>g?0:g)<<16,g=Math.round(255*c),f=f&-65281|(255<g?255:0>g?0:g)<<8,g=Math.round(255*
a),f=f&-256|(255<g?255:0>g?0:g),g=Math.round(255*d),f=f&16777215|(255<g?255:0>g?0:g)<<24}return f},fromHSL:function(a,b,c,d){null==d&&(d=1);var f=mb._new();b*=1-Math.abs(2*c-1);c-=b/2;var g=a%360/60;a=b*(1-Math.abs(g%2-1))+c;b+=c;switch(g|0){case 0:null==d&&(d=1);g=Math.round(255*b);f=f&-16711681|(255<g?255:0>g?0:g)<<16;g=Math.round(255*a);f=f&-65281|(255<g?255:0>g?0:g)<<8;g=Math.round(255*c);f=f&-256|(255<g?255:0>g?0:g);g=Math.round(255*d);f=f&16777215|(255<g?255:0>g?0:g)<<24;break;case 1:null==
d&&(d=1);g=Math.round(255*a);f=f&-16711681|(255<g?255:0>g?0:g)<<16;g=Math.round(255*b);f=f&-65281|(255<g?255:0>g?0:g)<<8;g=Math.round(255*c);f=f&-256|(255<g?255:0>g?0:g);g=Math.round(255*d);f=f&16777215|(255<g?255:0>g?0:g)<<24;break;case 2:null==d&&(d=1);g=Math.round(255*c);f=f&-16711681|(255<g?255:0>g?0:g)<<16;g=Math.round(255*b);f=f&-65281|(255<g?255:0>g?0:g)<<8;g=Math.round(255*a);f=f&-256|(255<g?255:0>g?0:g);g=Math.round(255*d);f=f&16777215|(255<g?255:0>g?0:g)<<24;break;case 3:null==d&&(d=1);
g=Math.round(255*c);f=f&-16711681|(255<g?255:0>g?0:g)<<16;g=Math.round(255*a);f=f&-65281|(255<g?255:0>g?0:g)<<8;g=Math.round(255*b);f=f&-256|(255<g?255:0>g?0:g);g=Math.round(255*d);f=f&16777215|(255<g?255:0>g?0:g)<<24;break;case 4:null==d&&(d=1);g=Math.round(255*a);f=f&-16711681|(255<g?255:0>g?0:g)<<16;g=Math.round(255*c);f=f&-65281|(255<g?255:0>g?0:g)<<8;g=Math.round(255*b);f=f&-256|(255<g?255:0>g?0:g);g=Math.round(255*d);f=f&16777215|(255<g?255:0>g?0:g)<<24;break;case 5:null==d&&(d=1),g=Math.round(255*
b),f=f&-16711681|(255<g?255:0>g?0:g)<<16,g=Math.round(255*c),f=f&-65281|(255<g?255:0>g?0:g)<<8,g=Math.round(255*a),f=f&-256|(255<g?255:0>g?0:g),g=Math.round(255*d),f=f&16777215|(255<g?255:0>g?0:g)<<24}return f},fromString:function(a){var b=null;a=O.trim(a);if(mb.COLOR_REGEX.match(a))a="0x"+mb.COLOR_REGEX.matched(2),b=mb._new(M.parseInt(a)),8==a.length&&(b=b&16777215|-16777216);else{a=a.toUpperCase();for(var c=Object.keys(mb.colorLookup.h),d=c.length,f=0;f<d;){var g=c[f++];if(g.toUpperCase()==a){b=
mb._new(mb.colorLookup.h[g]);break}}}return b},getHSBColorWheel:function(a){null==a&&(a=255);for(var b=[],c=0;360>c;){var d=c++;b.push(mb.fromHSB(d,1,1,a))}return b},interpolate:function(a,b,c){null==c&&(c=.5);var d=((b>>16&255)-(a>>16&255))*c+(a>>16&255)|0,f=((b>>8&255)-(a>>8&255))*c+(a>>8&255)|0,g=((b&255)-(a&255))*c+(a&255)|0;b=((b>>24&255)-(a>>24&255))*c+(a>>24&255)|0;null==b&&(b=255);a=mb._new();null==b&&(b=255);a=(a&-16711681|(255<d?255:0>d?0:d)<<16)&-65281|(255<f?255:0>f?0:f)<<8;a&=-256;a|=
255<g?255:0>g?0:g;a&=16777215;return a|=(255<b?255:0>b?0:b)<<24},gradient:function(a,b,c,d){var f=[];null==d&&(d=function(a){return a});for(var g=0;g<c;){var k=g++,l=d(k/(c-1));null==l&&(l=.5);var m=((b>>16&255)-(a>>16&255))*l+(a>>16&255)|0,z=((b>>8&255)-(a>>8&255))*l+(a>>8&255)|0,h=((b&255)-(a&255))*l+(a&255)|0,p=((b>>24&255)-(a>>24&255))*l+(a>>24&255)|0;null==p&&(p=255);l=mb._new();null==p&&(p=255);l&=-16711681;l|=(255<m?255:0>m?0:m)<<16;l&=-65281;l|=(255<z?255:0>z?0:z)<<8;l&=-256;l|=255<h?255:
0>h?0:h;l&=16777215;l|=(255<p?255:0>p?0:p)<<24;f[k]=l}return f},multiply:function(a,b){var c=(a>>16&255)/255*((b>>16&255)/255),d=(a>>8&255)/255*((b>>8&255)/255);a=(a&255)/255*((b&255)/255);b=mb._new();var f=1;null==f&&(f=1);c=Math.round(255*c);b=b&-16711681|(255<c?255:0>c?0:c)<<16;c=Math.round(255*d);b=b&-65281|(255<c?255:0>c?0:c)<<8;c=Math.round(255*a);b=b&-256|(255<c?255:0>c?0:c);c=Math.round(255*f);return b&16777215|(255<c?255:0>c?0:c)<<24},add:function(a,b){var c=(a>>16&255)+(b>>16&255),d=(a>>
8&255)+(b>>8&255);a=(a&255)+(b&255);b=mb._new();var f=255;null==f&&(f=255);b=(b&-16711681|(255<c?255:0>c?0:c)<<16)&-65281|(255<d?255:0>d?0:d)<<8;b&=-256;b|=255<a?255:0>a?0:a;b&=16777215;return b|=(255<f?255:0>f?0:f)<<24},subtract:function(a,b){var c=(a>>16&255)-(b>>16&255),d=(a>>8&255)-(b>>8&255);a=(a&255)-(b&255);b=mb._new();var f=255;null==f&&(f=255);b=(b&-16711681|(255<c?255:0>c?0:c)<<16)&-65281|(255<d?255:0>d?0:d)<<8;b&=-256;b|=255<a?255:0>a?0:a;b&=16777215;return b|=(255<f?255:0>f?0:f)<<24},
getComplementHarmony:function(a){return mb.fromHSB(xb.wrap((mb.get_hue(a)|0)+180,0,350),Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255)),(Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255))-Math.min((a>>16&255)/255,Math.min((a>>8&255)/255,(a&255)/255)))/Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255)),(a>>24&255)/255)},getAnalogousHarmony:function(a,b){null==b&&(b=30);var c=mb.fromHSB(xb.wrap((mb.get_hue(a)|0)-b,0,350),(Math.max((a>>16&255)/255,Math.max((a>>
8&255)/255,(a&255)/255))-Math.min((a>>16&255)/255,Math.min((a>>8&255)/255,(a&255)/255)))/Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255)),Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255)),(a>>24&255)/255);b=mb.fromHSB(xb.wrap((mb.get_hue(a)|0)+b,0,350),(Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255))-Math.min((a>>16&255)/255,Math.min((a>>8&255)/255,(a&255)/255)))/Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255)),Math.max((a>>16&255)/255,Math.max((a>>
8&255)/255,(a&255)/255)),(a>>24&255)/255);return{original:a,warmer:c,colder:b}},getSplitComplementHarmony:function(a,b){null==b&&(b=30);var c=xb.wrap((mb.get_hue(a)|0)+180,0,350),d=mb.fromHSB(xb.wrap(c-b,0,350),(Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255))-Math.min((a>>16&255)/255,Math.min((a>>8&255)/255,(a&255)/255)))/Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255)),Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255)),(a>>24&255)/255);b=mb.fromHSB(xb.wrap(c+
b,0,350),(Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255))-Math.min((a>>16&255)/255,Math.min((a>>8&255)/255,(a&255)/255)))/Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255)),Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255)),(a>>24&255)/255);return{original:a,warmer:d,colder:b}},getTriadicHarmony:function(a){var b=mb.fromHSB(xb.wrap((mb.get_hue(a)|0)+120,0,359),(Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255))-Math.min((a>>16&255)/255,Math.min((a>>
8&255)/255,(a&255)/255)))/Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255)),Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255)),(a>>24&255)/255),c=mb.fromHSB(xb.wrap((mb.get_hue(b)|0)+120,0,359),(Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255))-Math.min((a>>16&255)/255,Math.min((a>>8&255)/255,(a&255)/255)))/Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255)),Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255)),(a>>24&255)/255);return{color1:a,
color2:b,color3:c}},to24Bit:function(a){return a&16777215},toHexString:function(a,b,c){null==c&&(c=!0);null==b&&(b=!0);b=b?O.hex(a>>24&255,2):"";return(c?"0x":"")+b+O.hex(a>>16&255,2)+O.hex(a>>8&255,2)+O.hex(a&255,2)},toWebString:function(a){var b=!1,c=!1;null==c&&(c=!0);null==b&&(b=!0);b=b?O.hex(a>>24&255,2):"";return"#"+((c?"0x":"")+b+O.hex(a>>16&255,2)+O.hex(a>>8&255,2)+O.hex(a&255,2))},getColorInfo:function(a){var b="0x"+O.hex(a>>24&255,2)+O.hex(a>>16&255,2)+O.hex(a>>8&255,2)+O.hex(a&255,2)+"\n";
return b=b+("Alpha: "+(a>>24&255)+" Red: "+(a>>16&255)+" Green: "+(a>>8&255)+" Blue: "+(a&255)+"\nHue: ")+(xb.roundDecimal(mb.get_hue(a),2)+" Saturation: "+xb.roundDecimal((Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255))-Math.min((a>>16&255)/255,Math.min((a>>8&255)/255,(a&255)/255)))/Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255)),2)+" Brightness: "+xb.roundDecimal(Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255)),2)+" Lightness: "+xb.roundDecimal((Math.max((a>>
16&255)/255,Math.max((a>>8&255)/255,(a&255)/255))+Math.min((a>>16&255)/255,Math.min((a>>8&255)/255,(a&255)/255)))/2,2))},getDarkened:function(a,b){null==b&&(b=.2);b=0>b?0:b;var c=(Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255))+Math.min((a>>16&255)/255,Math.min((a>>8&255)/255,(a&255)/255)))/2*(1-(1<b?1:b)),d=mb.get_hue(a),f=(a>>24&255)/255,g=(Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255))-Math.min((a>>16&255)/255,Math.min((a>>8&255)/255,(a&255)/255)))/Math.max((a>>16&
255)/255,Math.max((a>>8&255)/255,(a&255)/255))*(1-Math.abs(2*c-1));b=c-g/2;c=d%360/60;d=g*(1-Math.abs(c%2-1))+b;g+=b;switch(c|0){case 0:null==f&&(f=1);c=Math.round(255*g);a=a&-16711681|(255<c?255:0>c?0:c)<<16;c=Math.round(255*d);a=a&-65281|(255<c?255:0>c?0:c)<<8;c=Math.round(255*b);a=a&-256|(255<c?255:0>c?0:c);c=Math.round(255*f);a=a&16777215|(255<c?255:0>c?0:c)<<24;break;case 1:null==f&&(f=1);c=Math.round(255*d);a=a&-16711681|(255<c?255:0>c?0:c)<<16;c=Math.round(255*g);a=a&-65281|(255<c?255:0>c?
0:c)<<8;c=Math.round(255*b);a=a&-256|(255<c?255:0>c?0:c);c=Math.round(255*f);a=a&16777215|(255<c?255:0>c?0:c)<<24;break;case 2:null==f&&(f=1);c=Math.round(255*b);a=a&-16711681|(255<c?255:0>c?0:c)<<16;c=Math.round(255*g);a=a&-65281|(255<c?255:0>c?0:c)<<8;c=Math.round(255*d);a=a&-256|(255<c?255:0>c?0:c);c=Math.round(255*f);a=a&16777215|(255<c?255:0>c?0:c)<<24;break;case 3:null==f&&(f=1);c=Math.round(255*b);a=a&-16711681|(255<c?255:0>c?0:c)<<16;c=Math.round(255*d);a=a&-65281|(255<c?255:0>c?0:c)<<8;c=
Math.round(255*g);a=a&-256|(255<c?255:0>c?0:c);c=Math.round(255*f);a=a&16777215|(255<c?255:0>c?0:c)<<24;break;case 4:null==f&&(f=1);c=Math.round(255*d);a=a&-16711681|(255<c?255:0>c?0:c)<<16;c=Math.round(255*b);a=a&-65281|(255<c?255:0>c?0:c)<<8;c=Math.round(255*g);a=a&-256|(255<c?255:0>c?0:c);c=Math.round(255*f);a=a&16777215|(255<c?255:0>c?0:c)<<24;break;case 5:null==f&&(f=1),c=Math.round(255*g),a=a&-16711681|(255<c?255:0>c?0:c)<<16,c=Math.round(255*b),a=a&-65281|(255<c?255:0>c?0:c)<<8,c=Math.round(255*
d),a=a&-256|(255<c?255:0>c?0:c),c=Math.round(255*f),a=a&16777215|(255<c?255:0>c?0:c)<<24}return a},getLightened:function(a,b){null==b&&(b=.2);var c=0>b?0:b;b=a;c=(Math.max((b>>16&255)/255,Math.max((b>>8&255)/255,(b&255)/255))+Math.min((b>>16&255)/255,Math.min((b>>8&255)/255,(b&255)/255)))/2+(1-(Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255))+Math.min((a>>16&255)/255,Math.min((a>>8&255)/255,(a&255)/255)))/2)*(1<c?1:c);var d=mb.get_hue(b),f=(b>>24&255)/255,g=(Math.max((b>>16&255)/255,
Math.max((b>>8&255)/255,(b&255)/255))-Math.min((b>>16&255)/255,Math.min((b>>8&255)/255,(b&255)/255)))/Math.max((b>>16&255)/255,Math.max((b>>8&255)/255,(b&255)/255))*(1-Math.abs(2*c-1));a=c-g/2;c=d%360/60;d=g*(1-Math.abs(c%2-1))+a;g+=a;switch(c|0){case 0:null==f&&(f=1);c=Math.round(255*g);b=b&-16711681|(255<c?255:0>c?0:c)<<16;c=Math.round(255*d);b=b&-65281|(255<c?255:0>c?0:c)<<8;c=Math.round(255*a);b=b&-256|(255<c?255:0>c?0:c);c=Math.round(255*f);b=b&16777215|(255<c?255:0>c?0:c)<<24;break;case 1:null==
f&&(f=1);c=Math.round(255*d);b=b&-16711681|(255<c?255:0>c?0:c)<<16;c=Math.round(255*g);b=b&-65281|(255<c?255:0>c?0:c)<<8;c=Math.round(255*a);b=b&-256|(255<c?255:0>c?0:c);c=Math.round(255*f);b=b&16777215|(255<c?255:0>c?0:c)<<24;break;case 2:null==f&&(f=1);c=Math.round(255*a);b=b&-16711681|(255<c?255:0>c?0:c)<<16;c=Math.round(255*g);b=b&-65281|(255<c?255:0>c?0:c)<<8;c=Math.round(255*d);b=b&-256|(255<c?255:0>c?0:c);c=Math.round(255*f);b=b&16777215|(255<c?255:0>c?0:c)<<24;break;case 3:null==f&&(f=1);
c=Math.round(255*a);b=b&-16711681|(255<c?255:0>c?0:c)<<16;c=Math.round(255*d);b=b&-65281|(255<c?255:0>c?0:c)<<8;c=Math.round(255*g);b=b&-256|(255<c?255:0>c?0:c);c=Math.round(255*f);b=b&16777215|(255<c?255:0>c?0:c)<<24;break;case 4:null==f&&(f=1);c=Math.round(255*d);b=b&-16711681|(255<c?255:0>c?0:c)<<16;c=Math.round(255*a);b=b&-65281|(255<c?255:0>c?0:c)<<8;c=Math.round(255*g);b=b&-256|(255<c?255:0>c?0:c);c=Math.round(255*f);b=b&16777215|(255<c?255:0>c?0:c)<<24;break;case 5:null==f&&(f=1),c=Math.round(255*
g),b=b&-16711681|(255<c?255:0>c?0:c)<<16,c=Math.round(255*a),b=b&-65281|(255<c?255:0>c?0:c)<<8,c=Math.round(255*d),b=b&-256|(255<c?255:0>c?0:c),c=Math.round(255*f),b=b&16777215|(255<c?255:0>c?0:c)<<24}return b},getInverted:function(a){var b=a>>24&255,c=255-(a>>16&255),d=255-(a>>8&255);a=255-(a&255);var f=mb._new(),g=255;null==g&&(g=255);f=(f&-16711681|(255<c?255:0>c?0:c)<<16)&-65281|(255<d?255:0>d?0:d)<<8;f&=-256;f|=255<a?255:0>a?0:a;f&=16777215;f|=(255<g?255:0>g?0:g)<<24;return f&16777215|(255<b?
255:0>b?0:b)<<24},setRGB:function(a,b,c,d,f){null==f&&(f=255);a=(a&-16711681|(255<b?255:0>b?0:b)<<16)&-65281|(255<c?255:0>c?0:c)<<8;a&=-256;a|=255<d?255:0>d?0:d;a&=16777215;return a|=(255<f?255:0>f?0:f)<<24},setRGBFloat:function(a,b,c,d,f){null==f&&(f=1);b=Math.round(255*b);a=a&-16711681|(255<b?255:0>b?0:b)<<16;b=Math.round(255*c);a=a&-65281|(255<b?255:0>b?0:b)<<8;b=Math.round(255*d);a=a&-256|(255<b?255:0>b?0:b);b=Math.round(255*f);return a&16777215|(255<b?255:0>b?0:b)<<24},setCMYK:function(a,b,c,
d,f,g){null==g&&(g=1);b=Math.round((1-b)*(1-f)*255);a=a&-16711681|(255<b?255:0>b?0:b)<<16;b=Math.round((1-c)*(1-f)*255);a=a&-65281|(255<b?255:0>b?0:b)<<8;b=Math.round((1-d)*(1-f)*255);c=Math.round(255*g);return a=(a&-256|(255<b?255:0>b?0:b))&16777215|(255<c?255:0>c?0:c)<<24},setHSB:function(a,b,c,d,f){c*=d;d-=c;var g=b%360/60;b=c*(1-Math.abs(g%2-1))+d;c+=d;switch(g|0){case 0:null==f&&(f=1);g=Math.round(255*c);a=a&-16711681|(255<g?255:0>g?0:g)<<16;g=Math.round(255*b);a=a&-65281|(255<g?255:0>g?0:g)<<
8;g=Math.round(255*d);a=a&-256|(255<g?255:0>g?0:g);g=Math.round(255*f);a=a&16777215|(255<g?255:0>g?0:g)<<24;break;case 1:null==f&&(f=1);g=Math.round(255*b);a=a&-16711681|(255<g?255:0>g?0:g)<<16;g=Math.round(255*c);a=a&-65281|(255<g?255:0>g?0:g)<<8;g=Math.round(255*d);a=a&-256|(255<g?255:0>g?0:g);g=Math.round(255*f);a=a&16777215|(255<g?255:0>g?0:g)<<24;break;case 2:null==f&&(f=1);g=Math.round(255*d);a=a&-16711681|(255<g?255:0>g?0:g)<<16;g=Math.round(255*c);a=a&-65281|(255<g?255:0>g?0:g)<<8;g=Math.round(255*
b);a=a&-256|(255<g?255:0>g?0:g);g=Math.round(255*f);a=a&16777215|(255<g?255:0>g?0:g)<<24;break;case 3:null==f&&(f=1);g=Math.round(255*d);a=a&-16711681|(255<g?255:0>g?0:g)<<16;g=Math.round(255*b);a=a&-65281|(255<g?255:0>g?0:g)<<8;g=Math.round(255*c);a=a&-256|(255<g?255:0>g?0:g);g=Math.round(255*f);a=a&16777215|(255<g?255:0>g?0:g)<<24;break;case 4:null==f&&(f=1);g=Math.round(255*b);a=a&-16711681|(255<g?255:0>g?0:g)<<16;g=Math.round(255*d);a=a&-65281|(255<g?255:0>g?0:g)<<8;g=Math.round(255*c);a=a&-256|
(255<g?255:0>g?0:g);g=Math.round(255*f);a=a&16777215|(255<g?255:0>g?0:g)<<24;break;case 5:null==f&&(f=1),g=Math.round(255*c),a=a&-16711681|(255<g?255:0>g?0:g)<<16,g=Math.round(255*d),a=a&-65281|(255<g?255:0>g?0:g)<<8,g=Math.round(255*b),a=a&-256|(255<g?255:0>g?0:g),g=Math.round(255*f),a=a&16777215|(255<g?255:0>g?0:g)<<24}return a},setHSL:function(a,b,c,d,f){c*=1-Math.abs(2*d-1);d-=c/2;var g=b%360/60;b=c*(1-Math.abs(g%2-1))+d;c+=d;switch(g|0){case 0:null==f&&(f=1);g=Math.round(255*c);a=a&-16711681|
(255<g?255:0>g?0:g)<<16;g=Math.round(255*b);a=a&-65281|(255<g?255:0>g?0:g)<<8;g=Math.round(255*d);a=a&-256|(255<g?255:0>g?0:g);g=Math.round(255*f);a=a&16777215|(255<g?255:0>g?0:g)<<24;break;case 1:null==f&&(f=1);g=Math.round(255*b);a=a&-16711681|(255<g?255:0>g?0:g)<<16;g=Math.round(255*c);a=a&-65281|(255<g?255:0>g?0:g)<<8;g=Math.round(255*d);a=a&-256|(255<g?255:0>g?0:g);g=Math.round(255*f);a=a&16777215|(255<g?255:0>g?0:g)<<24;break;case 2:null==f&&(f=1);g=Math.round(255*d);a=a&-16711681|(255<g?255:
0>g?0:g)<<16;g=Math.round(255*c);a=a&-65281|(255<g?255:0>g?0:g)<<8;g=Math.round(255*b);a=a&-256|(255<g?255:0>g?0:g);g=Math.round(255*f);a=a&16777215|(255<g?255:0>g?0:g)<<24;break;case 3:null==f&&(f=1);g=Math.round(255*d);a=a&-16711681|(255<g?255:0>g?0:g)<<16;g=Math.round(255*b);a=a&-65281|(255<g?255:0>g?0:g)<<8;g=Math.round(255*c);a=a&-256|(255<g?255:0>g?0:g);g=Math.round(255*f);a=a&16777215|(255<g?255:0>g?0:g)<<24;break;case 4:null==f&&(f=1);g=Math.round(255*b);a=a&-16711681|(255<g?255:0>g?0:g)<<
16;g=Math.round(255*d);a=a&-65281|(255<g?255:0>g?0:g)<<8;g=Math.round(255*c);a=a&-256|(255<g?255:0>g?0:g);g=Math.round(255*f);a=a&16777215|(255<g?255:0>g?0:g)<<24;break;case 5:null==f&&(f=1),g=Math.round(255*c),a=a&-16711681|(255<g?255:0>g?0:g)<<16,g=Math.round(255*d),a=a&-65281|(255<g?255:0>g?0:g)<<8,g=Math.round(255*b),a=a&-256|(255<g?255:0>g?0:g),g=Math.round(255*f),a=a&16777215|(255<g?255:0>g?0:g)<<24}return a},setHueChromaMatch:function(a,b,c,d,f){var g=b%360/60;b=c*(1-Math.abs(g%2-1))+d;c+=
d;switch(g|0){case 0:null==f&&(f=1);g=Math.round(255*c);a=a&-16711681|(255<g?255:0>g?0:g)<<16;g=Math.round(255*b);a=a&-65281|(255<g?255:0>g?0:g)<<8;g=Math.round(255*d);a=a&-256|(255<g?255:0>g?0:g);g=Math.round(255*f);a=a&16777215|(255<g?255:0>g?0:g)<<24;break;case 1:null==f&&(f=1);g=Math.round(255*b);a=a&-16711681|(255<g?255:0>g?0:g)<<16;g=Math.round(255*c);a=a&-65281|(255<g?255:0>g?0:g)<<8;g=Math.round(255*d);a=a&-256|(255<g?255:0>g?0:g);g=Math.round(255*f);a=a&16777215|(255<g?255:0>g?0:g)<<24;break;
case 2:null==f&&(f=1);g=Math.round(255*d);a=a&-16711681|(255<g?255:0>g?0:g)<<16;g=Math.round(255*c);a=a&-65281|(255<g?255:0>g?0:g)<<8;g=Math.round(255*b);a=a&-256|(255<g?255:0>g?0:g);g=Math.round(255*f);a=a&16777215|(255<g?255:0>g?0:g)<<24;break;case 3:null==f&&(f=1);g=Math.round(255*d);a=a&-16711681|(255<g?255:0>g?0:g)<<16;g=Math.round(255*b);a=a&-65281|(255<g?255:0>g?0:g)<<8;g=Math.round(255*c);a=a&-256|(255<g?255:0>g?0:g);g=Math.round(255*f);a=a&16777215|(255<g?255:0>g?0:g)<<24;break;case 4:null==
f&&(f=1);g=Math.round(255*b);a=a&-16711681|(255<g?255:0>g?0:g)<<16;g=Math.round(255*d);a=a&-65281|(255<g?255:0>g?0:g)<<8;g=Math.round(255*c);a=a&-256|(255<g?255:0>g?0:g);g=Math.round(255*f);a=a&16777215|(255<g?255:0>g?0:g)<<24;break;case 5:null==f&&(f=1),g=Math.round(255*c),a=a&-16711681|(255<g?255:0>g?0:g)<<16,g=Math.round(255*d),a=a&-65281|(255<g?255:0>g?0:g)<<8,g=Math.round(255*b),a=a&-256|(255<g?255:0>g?0:g),g=Math.round(255*f),a=a&16777215|(255<g?255:0>g?0:g)<<24}return a},_new:function(a){null==
a&&(a=0);return a},getThis:function(a){return a},validate:function(a){},get_red:function(a){return a>>16&255},get_green:function(a){return a>>8&255},get_blue:function(a){return a&255},get_alpha:function(a){return a>>24&255},get_redFloat:function(a){return(a>>16&255)/255},get_greenFloat:function(a){return(a>>8&255)/255},get_blueFloat:function(a){return(a&255)/255},get_alphaFloat:function(a){return(a>>24&255)/255},set_red:function(a,b){return b},set_green:function(a,b){return b},set_blue:function(a,
b){return b},set_alpha:function(a,b){return b},set_redFloat:function(a,b){return b},set_greenFloat:function(a,b){return b},set_blueFloat:function(a,b){return b},set_alphaFloat:function(a,b){return b},get_cyan:function(a){return(1-(a>>16&255)/255-(1-Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255))))/Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255))},get_magenta:function(a){return(1-(a>>8&255)/255-(1-Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255))))/Math.max((a>>
16&255)/255,Math.max((a>>8&255)/255,(a&255)/255))},get_yellow:function(a){return(1-(a&255)/255-(1-Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255))))/Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255))},get_black:function(a){return 1-Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255))},set_cyan:function(a,b){return b},set_magenta:function(a,b){return b},set_yellow:function(a,b){return b},set_black:function(a,b){return b},get_hue:function(a){a=Math.atan2(Math.sqrt(3)*
((a>>8&255)/255-(a&255)/255),(a>>16&255)/255*2-(a>>8&255)/255-(a&255)/255);var b=0;0!=a&&(b=180/Math.PI*a);return 0>b?b+360:b},get_brightness:function(a){return Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255))},get_saturation:function(a){return(Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255))-Math.min((a>>16&255)/255,Math.min((a>>8&255)/255,(a&255)/255)))/Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255))},get_lightness:function(a){return(Math.max((a>>16&255)/
255,Math.max((a>>8&255)/255,(a&255)/255))+Math.min((a>>16&255)/255,Math.min((a>>8&255)/255,(a&255)/255)))/2},set_hue:function(a,b){return b},set_saturation:function(a,b){mb.get_hue(a);return b},set_brightness:function(a,b){mb.get_hue(a);return b},set_lightness:function(a,b){mb.get_hue(a);return b},set_rgb:function(a,b){return b},get_rgb:function(a){return a&16777215},maxColor:function(a){return Math.max((a>>16&255)/255,Math.max((a>>8&255)/255,(a&255)/255))},minColor:function(a){return Math.min((a>>
16&255)/255,Math.min((a>>8&255)/255,(a&255)/255))},boundChannel:function(a,b){return 255<b?255:0>b?0:b}},Rc=function(){};h["flixel.util.FlxColorTransformUtil"]=Rc;Rc.__name__="flixel.util.FlxColorTransformUtil";Rc.setMultipliers=function(a,b,c,d,f){a.redMultiplier=b;a.greenMultiplier=c;a.blueMultiplier=d;a.alphaMultiplier=f;return a};Rc.setOffsets=function(a,b,c,d,f){a.redOffset=b;a.greenOffset=c;a.blueOffset=d;a.alphaOffset=f;return a};Rc.hasRGBMultipliers=function(a){return 1==a.redMultiplier&&
1==a.greenMultiplier?1!=a.blueMultiplier:!0};Rc.hasRGBAMultipliers=function(a){return Rc.hasRGBMultipliers(a)?!0:1!=a.alphaMultiplier};Rc.hasRGBOffsets=function(a){return 0==a.redOffset&&0==a.greenOffset?0!=a.blueOffset:!0};Rc.hasRGBAOffsets=function(a){return Rc.hasRGBOffsets(a)?!0:0!=a.alphaOffset};var ba=function(){};h["flixel.util.FlxDestroyUtil"]=ba;ba.__name__="flixel.util.FlxDestroyUtil";ba.destroy=function(a){null!=a&&a.destroy();return null};ba.destroyArray=function(a){if(null!=a){for(var b=
0;b<a.length;){var c=a[b];++b;ba.destroy(c)}a.splice(0,a.length)}return null};ba.put=function(a){null!=a&&a.put();return null};ba.putArray=function(a){if(null!=a){for(var b=0;b<a.length;){var c=a[b];++b;ba.put(c)}a.splice(0,a.length)}return null};ba.dispose=function(a){null!=a&&a.dispose();return null};ba.disposeIfNotEqual=function(a,b,c){if(null!=a&&(a.width!=b||a.height!=c))a.dispose();else if(null!=a)return a;return null};ba.removeChild=function(a,b){null!=a&&null!=b&&a.contains(b)&&a.removeChild(b);
return null};var Ef={__properties__:{get_right:"get_right",get_left:"get_left",get_down:"get_down",get_up:"get_up",get_radians:"get_radians",get_degrees:"get_degrees"},get_degrees:function(a){switch(a){case 1:return 180;case 16:return 0;case 256:return-90;case 4096:return 90;default:return 4112==a?45:4097==a?135:272==a?-45:257==a?-135:0}},get_radians:function(a){return Ef.get_degrees(a)*(Math.PI/180)},get_up:function(a){return 256==(a&256)},get_down:function(a){return 4096==(a&4096)},get_left:function(a){return 1==
(a&1)},get_right:function(a){return 16==(a&16)},has:function(a,b){return(a&b)==b},hasAny:function(a,b){return 0<(a&b)},with:function(a,b){return a|b},without:function(a,b){return a&~b},toString:function(a){if(0==a)return"NONE";var b="",c=1;(a&c)==c&&(b+=" | L");c=16;(a&c)==c&&(b+=" | R");c=256;(a&c)==c&&(b+=" | U");c=4096;(a&c)==c&&(b+=" | D");return y.substr(b,3,null)},fromBools:function(a,b,c,d){return(a?1:0)|(b?16:0)|(c?256:0)|(d?4096:0)}},rm=G["flixel.util.FlxHorizontalAlign"]={__ename__:"flixel.util.FlxHorizontalAlign",
__constructs__:null,LEFT:{_hx_name:"LEFT",_hx_index:0,__enum__:"flixel.util.FlxHorizontalAlign",toString:t},CENTER:{_hx_name:"CENTER",_hx_index:1,__enum__:"flixel.util.FlxHorizontalAlign",toString:t},RIGHT:{_hx_name:"RIGHT",_hx_index:2,__enum__:"flixel.util.FlxHorizontalAlign",toString:t}};rm.__constructs__=[rm.LEFT,rm.CENTER,rm.RIGHT];var Vc=function(){Da.call(this);this.client=this;this.objectEncoding=Vc.defaultObjectEncoding};h["openfl.net.SharedObject"]=Vc;Vc.__name__="openfl.net.SharedObject";
Vc.__sharedObjects=null;Vc.getLocal=function(a,b,c){c=" ~%&\\;:\"',<>?#".split("");var d=!0;if(null==a||""==a)d=!1;else for(var f=0;f<c.length;){var g=c[f];++f;if(-1<a.indexOf(g)){d=!1;break}}if(!d)throw new sc("Error #2134: Cannot create SharedObject.");null==Vc.__sharedObjects&&(Vc.__sharedObjects=new Ba,null!=F.current&&F.current.onExit.add(Vc.application_onExit));c=b+"/"+a;if(!Object.prototype.hasOwnProperty.call(Vc.__sharedObjects.h,c)){d=null;try{var k=If.getLocalStorage();null==b&&(null!=k&&
(d=k.getItem(window.location.href+":"+a),k.removeItem(window.location.href+":"+a)),b=window.location.pathname);null!=k&&null==d&&(d=k.getItem(b+":"+a))}catch(m){db.lastError=m}k=new Vc;k.data={};k.__localPath=b;k.__name=a;if(null!=d&&""!=d)try{var l=new Pd(d);l.setResolver({resolveEnum:w.resolveEnum,resolveClass:Vc.__resolveClass});k.data=l.unserialize()}catch(m){db.lastError=m}Vc.__sharedObjects.h[c]=k}return Vc.__sharedObjects.h[c]};Vc.getRemote=function(a,b,c,d){Bc.notImplemented({fileName:"openfl/net/SharedObject.hx",
lineNumber:808,className:"openfl.net.SharedObject",methodName:"getRemote"});return null};Vc.__getPath=function(a,b){a=Fa.get_applicationStorageDirectory()+"/"+a+"/";b=O.replace(b,"//","/");b=O.replace(b,"//","/");O.startsWith(b,"/")&&(b=y.substr(b,1,null));O.endsWith(b,"/")&&(b=b.substring(0,b.length-1));if(-1<b.indexOf("/")){var c=b.split("/");b="";for(var d=0,f=c.length-1;d<f;){var g=d++;b+="#"+c[g]+"/"}b+=c[c.length-1]}return a+b+".sol"};Vc.__mkdir=function(a){};Vc.__resolveClass=function(a){return null!=
a?(O.startsWith(a,"neash.")&&(a=O.replace(a,"neash.","openfl.")),O.startsWith(a,"native.")&&(a=O.replace(a,"native.","openfl.")),O.startsWith(a,"flash.")&&(a=O.replace(a,"flash.","openfl.")),O.startsWith(a,"openfl._v2.")&&(a=O.replace(a,"openfl._v2.","openfl.")),O.startsWith(a,"openfl._legacy.")&&(a=O.replace(a,"openfl._legacy.","openfl.")),h[a]):null};Vc.application_onExit=function(a){a=Vc.__sharedObjects.h;for(var b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].flush()};Vc.__super__=Da;Vc.prototype=
x(Da.prototype,{client:null,data:null,fps:null,objectEncoding:null,__localPath:null,__name:null,clear:function(){this.data={};try{var a=If.getLocalStorage();null!=a&&a.removeItem(this.__localPath+":"+this.__name)}catch(b){db.lastError=b}},close:function(){},connect:function(a,b){Bc.notImplemented({fileName:"openfl/net/SharedObject.hx",lineNumber:392,className:"openfl.net.SharedObject",methodName:"connect"})},flush:function(a){if(0==la.fields(this.data).length)return 0;a=Qd.run(this.data);try{var b=
If.getLocalStorage();null!=b&&(b.removeItem(this.__localPath+":"+this.__name),b.setItem(this.__localPath+":"+this.__name,a))}catch(c){return db.lastError=c,1}return 0},send:function(a){Bc.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=Qd.run(this.data);return bb.ofString(a).length}catch(b){return db.lastError=
b,0}},__class__:Vc,__properties__:{get_size:"get_size"}});var Wc=function(){Vc.call(this)};h["flixel.util._FlxSave.FlxSharedObject"]=Wc;Wc.__name__="flixel.util._FlxSave.FlxSharedObject";Wc.all=null;Wc.init=function(){if(null==Wc.all){Wc.all=new Ba;var a=F.current;null!=a&&a.onExit.add(Wc.onExit)}};Wc.onExit=function(a){a=Wc.all.h;for(var b=Object.keys(a),c=b.length,d=0;d<c;)a[b[d++]].flush()};Wc.getDefaultLocalPath=function(){var a=ha.get_current().stage.application.meta.h.company;return a=null==
a||""==a?"HaxeFlixel":ee.validate(a)};Wc.getLocal=function(a,b){if(null==a||""==a)return fi.FAILURE(Lg.INVALID_NAME(a));null==b&&(b="");var c=b+"/"+a;Wc.init();if(!Object.prototype.hasOwnProperty.call(Wc.all.h,c)){var d=null;if((new E("(?:^|/)\\.\\./","")).match(b))return fi.FAILURE(Lg.INVALID_PATH(b,"../ not allowed in localPath"));try{d=Wc.getData(a,b)}catch(k){return a=J.caught(k),fi.FAILURE(Lg.IO(a))}""==b&&(b=Wc.getDefaultLocalPath());var f=new Wc;f.data={};f.__localPath=b;f.__name=a;if(null!=
d&&""!=d)try{var g=new Pd(d);g.setResolver({resolveEnum:w.resolveEnum,resolveClass:ee.resolveFlixelClasses});f.data=g.unserialize()}catch(k){return a=J.caught(k),Wc.all.h[c]=f,fi.FAILURE(Lg.PARSING(d,a),f)}Wc.all.h[c]=f}return fi.SUCCESS(Wc.all.h[c])};Wc.getData=function(a,b){var c=If.getLocalStorage();if(null==c)return null;if(""!=b)return c.getItem(b+":"+a);b=c.getItem(Wc.getDefaultLocalPath()+":"+a);if(null!=b)return b;b=c.getItem(window.location.pathname+":"+a);return null!=b?b:c.getItem(window.location.href+
":"+a)};Wc.exists=function(a,b){var c=If.getLocalStorage();return null==c?!1:null==c.getItem(b+":"+a)&&null==c.getItem(Wc.getDefaultLocalPath()+":"+a)&&null==c.getItem(window.location.pathname+":"+a)?null!=c.getItem(window.location.href+":"+a):!0};Wc.__super__=Vc;Wc.prototype=x(Vc.prototype,{__class__:Wc});var fi=G["flixel.util.LoadResult"]={__ename__:"flixel.util.LoadResult",__constructs__:null,SUCCESS:(n=function(a){return{_hx_index:0,obj:a,__enum__:"flixel.util.LoadResult",toString:t}},n._hx_name=
"SUCCESS",n.__params__=["obj"],n),FAILURE:(n=function(a,b){return{_hx_index:1,type:a,obj:b,__enum__:"flixel.util.LoadResult",toString:t}},n._hx_name="FAILURE",n.__params__=["type","obj"],n)};fi.__constructs__=[fi.SUCCESS,fi.FAILURE];var Lg=G["flixel.util.LoadFailureType"]={__ename__:"flixel.util.LoadFailureType",__constructs__:null,INVALID_NAME:(n=function(a,b){return{_hx_index:0,name:a,message:b,__enum__:"flixel.util.LoadFailureType",toString:t}},n._hx_name="INVALID_NAME",n.__params__=["name","message"],
n),INVALID_PATH:(n=function(a,b){return{_hx_index:1,path:a,message:b,__enum__:"flixel.util.LoadFailureType",toString:t}},n._hx_name="INVALID_PATH",n.__params__=["path","message"],n),IO:(n=function(a){return{_hx_index:2,exception:a,__enum__:"flixel.util.LoadFailureType",toString:t}},n._hx_name="IO",n.__params__=["exception"],n),PARSING:(n=function(a,b){return{_hx_index:3,rawData:a,exception:b,__enum__:"flixel.util.LoadFailureType",toString:t}},n._hx_name="PARSING",n.__params__=["rawData","exception"],
n)};Lg.__constructs__=[Lg.INVALID_NAME,Lg.INVALID_PATH,Lg.IO,Lg.PARSING];var af=G["flixel.util.FlxSaveStatus"]={__ename__:"flixel.util.FlxSaveStatus",__constructs__:null,EMPTY:{_hx_name:"EMPTY",_hx_index:0,__enum__:"flixel.util.FlxSaveStatus",toString:t},BOUND:(n=function(a,b){return{_hx_index:1,name:a,path:b,__enum__:"flixel.util.FlxSaveStatus",toString:t}},n._hx_name="BOUND",n.__params__=["name","path"],n),ERROR:(n=function(a){return{_hx_index:2,msg:a,__enum__:"flixel.util.FlxSaveStatus",toString:t}},
n._hx_name="ERROR",n.__params__=["msg"],n),LOAD_ERROR:(n=function(a){return{_hx_index:3,type:a,__enum__:"flixel.util.FlxSaveStatus",toString:t}},n._hx_name="LOAD_ERROR",n.__params__=["type"],n)};af.__constructs__=[af.EMPTY,af.BOUND,af.ERROR,af.LOAD_ERROR];var Rk=function(a,b){this.dispatchOnce=!1;this.listener=a;this.dispatchOnce=b};h["flixel.util._FlxSignal.FlxSignalHandler"]=Rk;Rk.__name__="flixel.util._FlxSignal.FlxSignalHandler";Rk.__interfaces__=[D];Rk.prototype={listener:null,dispatchOnce:null,
destroy:function(){this.listener=null},__class__:Rk};var ej=function(){};h["flixel.util.IFlxSignal"]=ej;ej.__name__="flixel.util.IFlxSignal";ej.__isInterface__=!0;ej.__interfaces__=[D];ej.prototype={dispatch:null,add:null,addOnce:null,remove:null,removeAll:null,destroy:null,has:null,__class__:ej};var Td=function(){this.processingListeners=!1;this.handlers=[];this.pendingRemove=[]};h["flixel.util._FlxSignal.FlxBaseSignal"]=Td;Td.__name__="flixel.util._FlxSignal.FlxBaseSignal";Td.__interfaces__=[ej];
Td.prototype={dispatch:null,handlers:null,pendingRemove:null,processingListeners:null,add:function(a){null!=a&&this.registerListener(a,!1)},addOnce:function(a){null!=a&&this.registerListener(a,!0)},remove:function(a){null!=a&&(a=this.getHandler(a),null!=a&&(this.processingListeners?this.pendingRemove.push(a):(y.remove(this.handlers,a),a.destroy())))},removeHandler:function(a){this.processingListeners?this.pendingRemove.push(a):(y.remove(this.handlers,a),a.destroy())},has:function(a){return null==
a?!1:null!=this.getHandler(a)},removeAll:function(){ba.destroyArray(this.handlers)},destroy:function(){ba.destroyArray(this.handlers);this.pendingRemove=this.handlers=null},registerListener:function(a,b){var c=this.getHandler(a);if(null==c)return c=new Rk(a,b),this.handlers.push(c),c;if(c.dispatchOnce!=b)throw J.thrown("You cannot addOnce() then add() the same listener without removing the relationship first.");return c},getHandler:function(a){for(var b=0,c=this.handlers;b<c.length;){var d=c[b];++b;
if(d.listener==a)return d}return null},__class__:Td};var Xd=function(){Td.call(this);this.dispatch=q(this,this.dispatch0)};h["flixel.util._FlxSignal.FlxSignal0"]=Xd;Xd.__name__="flixel.util._FlxSignal.FlxSignal0";Xd.__super__=Td;Xd.prototype=x(Td.prototype,{dispatch0:function(){this.processingListeners=!0;for(var a=0,b=this.handlers;a<b.length;){var c=b[a];++a;c.listener();c.dispatchOnce&&(this.processingListeners?this.pendingRemove.push(c):(y.remove(this.handlers,c),c.destroy()))}this.processingListeners=
!1;a=0;for(b=this.pendingRemove;a<b.length;)c=b[a],++a,this.processingListeners?this.pendingRemove.push(c):(y.remove(this.handlers,c),c.destroy());0<this.pendingRemove.length&&(this.pendingRemove=[])},__class__:Xd});var md=function(){Td.call(this);this.dispatch=q(this,this.dispatch1)};h["flixel.util._FlxSignal.FlxSignal1"]=md;md.__name__="flixel.util._FlxSignal.FlxSignal1";md.__super__=Td;md.prototype=x(Td.prototype,{dispatch1:function(a){this.processingListeners=!0;for(var b=0,c=this.handlers;b<
c.length;){var d=c[b];++b;d.listener(a);d.dispatchOnce&&(this.processingListeners?this.pendingRemove.push(d):(y.remove(this.handlers,d),d.destroy()))}this.processingListeners=!1;b=0;for(c=this.pendingRemove;b<c.length;)d=c[b],++b,this.processingListeners?this.pendingRemove.push(d):(y.remove(this.handlers,d),d.destroy());0<this.pendingRemove.length&&(this.pendingRemove=[])},__class__:md});var Vh=function(){Td.call(this);this.dispatch=q(this,this.dispatch2)};h["flixel.util._FlxSignal.FlxSignal2"]=Vh;
Vh.__name__="flixel.util._FlxSignal.FlxSignal2";Vh.__super__=Td;Vh.prototype=x(Td.prototype,{dispatch2:function(a,b){this.processingListeners=!0;for(var c=0,d=this.handlers;c<d.length;){var f=d[c];++c;f.listener(a,b);f.dispatchOnce&&(this.processingListeners?this.pendingRemove.push(f):(y.remove(this.handlers,f),f.destroy()))}this.processingListeners=!1;c=0;for(d=this.pendingRemove;c<d.length;)f=d[c],++c,this.processingListeners?this.pendingRemove.push(f):(y.remove(this.handlers,f),f.destroy());0<
this.pendingRemove.length&&(this.pendingRemove=[])},__class__:Vh});var Xj=function(){Td.call(this);this.dispatch=q(this,this.dispatch3)};h["flixel.util._FlxSignal.FlxSignal3"]=Xj;Xj.__name__="flixel.util._FlxSignal.FlxSignal3";Xj.__super__=Td;Xj.prototype=x(Td.prototype,{dispatch3:function(a,b,c){this.processingListeners=!0;for(var d=0,f=this.handlers;d<f.length;){var g=f[d];++d;g.listener(a,b,c);g.dispatchOnce&&(this.processingListeners?this.pendingRemove.push(g):(y.remove(this.handlers,g),g.destroy()))}this.processingListeners=
!1;d=0;for(f=this.pendingRemove;d<f.length;)g=f[d],++d,this.processingListeners?this.pendingRemove.push(g):(y.remove(this.handlers,g),g.destroy());0<this.pendingRemove.length&&(this.pendingRemove=[])},__class__:Xj});var $m=function(){Td.call(this);this.dispatch=q(this,this.dispatch4)};h["flixel.util._FlxSignal.FlxSignal4"]=$m;$m.__name__="flixel.util._FlxSignal.FlxSignal4";$m.__super__=Td;$m.prototype=x(Td.prototype,{dispatch4:function(a,b,c,d){this.processingListeners=!0;for(var f=0,g=this.handlers;f<
g.length;){var k=g[f];++f;k.listener(a,b,c,d);k.dispatchOnce&&(this.processingListeners?this.pendingRemove.push(k):(y.remove(this.handlers,k),k.destroy()))}this.processingListeners=!1;f=0;for(g=this.pendingRemove;f<g.length;)k=g[f],++f,this.processingListeners?this.pendingRemove.push(k):(y.remove(this.handlers,k),k.destroy());0<this.pendingRemove.length&&(this.pendingRemove=[])},__class__:$m});var Uo=function(){};h["flixel.util._FlxSignal.Macro"]=Uo;Uo.__name__="flixel.util._FlxSignal.Macro";var Sk=
function(){};h["flixel.util.FlxSort"]=Sk;Sk.__name__="flixel.util.FlxSort";Sk.byY=function(a,b,c){b=b.y;c=c.y;var d=0;b<c?d=a:b>c&&(d=-a);return d};Sk.byValues=function(a,b,c){var d=0;b<c?d=a:b>c&&(d=-a);return d};var Ea=function(){};h["flixel.util.FlxSpriteUtil"]=Ea;Ea.__name__="flixel.util.FlxSpriteUtil";Ea.alphaMask=function(a,b,c){b=Ec.resolveBitmapData(b);c=Ec.resolveBitmapData(c);if(null==b||null==c)return null;b=b.clone();b.copyChannel(c,new ea(0,0,b.width,b.height),new Ya,8,8);a.set_pixels(b);
return a};Ea.alphaMaskFlxSprite=function(a,b,c){a.drawFrame();var d=a.get_pixels().clone();d.copyChannel(b.get_pixels(),new ea(0,0,a.get_width(),a.get_height()),new Ya,8,8);c.set_pixels(d);return c};Ea.screenWrap=function(a,b,c,d,f){null==f&&(f=!0);null==d&&(d=!0);null==c&&(c=!0);null==b&&(b=!0);b&&0>=a.x+a.frameWidth/2?a.set_x(u.width):c&&a.x>=u.width&&a.set_x(0);d&&0>=a.y+a.frameHeight/2?a.set_y(u.height):f&&a.y>=u.height&&a.set_y(0);return a};Ea.bound=function(a,b,c,d,f){null==f&&(f=0);null==d&&
(d=0);null==c&&(c=0);null==b&&(b=0);0>=c&&(c=u.width);0>=f&&(f=u.height);c-=a.frameWidth;f-=a.frameHeight;var g=a.x;b=null!=b&&g<b?b:g;a.set_x(null!=c&&b>c?c:b);g=a.y;b=null!=d&&g<d?d:g;a.set_y(null!=f&&b>f?f:b);return a};Ea.cameraWrap=function(a,b,c){null==c&&(c=4369);null==b&&(b=u.camera);var d=a.getScreenBounds(null,b),f=a.x-d.x-b.scroll.x,g=a.y-d.y-b.scroll.y;null==g&&(g=0);null==f&&(f=0);null==g&&(g=0);null==f&&(f=0);g=N.pool.get().set(f,g);g._inPool=!1;f=1;(c&f)==f&&d.x+d.width<b.viewMarginX?
a.set_x(b.scroll.x+(b.width-b.viewMarginX)+g.x):(f=16,(c&f)==f&&d.x>b.width-b.viewMarginX&&a.set_x(b.scroll.x+b.viewMarginX+g.x-d.width));f=256;(c&f)==f&&d.y+d.height<b.viewMarginY?a.set_y(b.scroll.y+(b.height-b.viewMarginY)+g.y):(f=4096,(c&f)==f&&d.y>b.height-b.viewMarginY&&a.set_y(b.scroll.y+b.viewMarginY+g.y-d.height));d._inPool||(d._inPool=!0,d._weak=!1,V._pool.putUnsafe(d));g.put();return a};Ea.cameraBound=function(a,b,c){null==c&&(c=4369);null==b&&(b=u.camera);var d=a.getScreenBounds(null,b),
f=a.x-d.x-b.scroll.x,g=a.y-d.y-b.scroll.y;null==g&&(g=0);null==f&&(f=0);null==g&&(g=0);null==f&&(f=0);g=N.pool.get().set(f,g);g._inPool=!1;f=1;(c&f)==f&&d.x<b.viewMarginX?a.set_x(b.scroll.x+b.viewMarginX+g.x):(f=16,(c&f)==f&&d.x+d.width>b.width-b.viewMarginX&&a.set_x(b.scroll.x+(b.width-b.viewMarginX)+g.x-d.width));f=256;(c&f)==f&&d.y<b.viewMarginY?a.set_y(b.scroll.y+b.viewMarginY+g.y):(f=4096,(c&f)==f&&d.y+d.height>b.height-b.viewMarginY&&a.set_y(b.scroll.y+(b.height-b.viewMarginY)+g.y-d.height));
d._inPool||(d._inPool=!0,d._weak=!1,V._pool.putUnsafe(d));g.put();return a};Ea.space=function(a,b,c,d,f,g,k){null==g&&(g=!1);var l=0;null!=d?g&&(l=a[0].get_width()):b=a[0].x;var m=0;null!=f?g&&(m=a[0].get_height()):c=a[0].y;null!=k?k(a[0],b,c):(a[0].set_x(b),a[0].set_y(c));for(var z,h,p=1,r=a.length;p<r;){z=p++;var w=a[z];null!=d?b=z=b+l+d:z=w.x;null!=f?c=h=c+m+f:h=w.y;null!=k?k(w,z,h):(w.set_x(z),w.set_y(h));g&&(l=w.get_width(),m=w.get_height())}};Ea.drawLine=function(a,b,c,d,f,g,k){null==g&&(g=
{thickness:1,color:-1});null==g.thickness&&(g.thickness=1);null==g.color&&(g.color=-1);Ea.flashGfx.clear();if(null!=g){var l=null==g.color?-16777216:g.color;null==g.thickness&&(g.thickness=1);null==g.pixelHinting&&(g.pixelHinting=!1);null==g.miterLimit&&(g.miterLimit=3);Ea.flashGfx.lineStyle(g.thickness,l&16777215,(l>>24&255)/255,g.pixelHinting,g.scaleMode,g.capsStyle,g.jointStyle,g.miterLimit)}Ea.flashGfx.moveTo(b,c);Ea.flashGfx.lineTo(d,f);Ea.flashGfx.endFill();Ea.updateSpriteGraphic(a,k);return a};
Ea.drawCurve=function(a,b,c,d,f,g,k,l,m,z){null==l&&(l=0);null==m&&(m={thickness:1,color:-1});null==m.thickness&&(m.thickness=1);null==m.color&&(m.color=-1);Ea.flashGfx.clear();if(null!=m){var h=null==m.color?-16777216:m.color;null==m.thickness&&(m.thickness=1);null==m.pixelHinting&&(m.pixelHinting=!1);null==m.miterLimit&&(m.miterLimit=3);Ea.flashGfx.lineStyle(m.thickness,h&16777215,(h>>24&255)/255,m.pixelHinting,m.scaleMode,m.capsStyle,m.jointStyle,m.miterLimit)}0!=l&&Ea.flashGfx.beginFill(l&16777215,
(l>>24&255)/255);Ea.flashGfx.moveTo(b,c);Ea.flashGfx.curveTo(d,f,g,k);Ea.flashGfx.endFill();Ea.updateSpriteGraphic(a,z);return a};Ea.drawRect=function(a,b,c,d,f,g,k,l){null==g&&(g=-1);Ea.flashGfx.clear();if(null!=k){var m=null==k.color?-16777216:k.color;null==k.thickness&&(k.thickness=1);null==k.pixelHinting&&(k.pixelHinting=!1);null==k.miterLimit&&(k.miterLimit=3);Ea.flashGfx.lineStyle(k.thickness,m&16777215,(m>>24&255)/255,k.pixelHinting,k.scaleMode,k.capsStyle,k.jointStyle,k.miterLimit)}0!=g&&
Ea.flashGfx.beginFill(g&16777215,(g>>24&255)/255);Ea.flashGfx.drawRect(b,c,d,f);Ea.flashGfx.endFill();Ea.updateSpriteGraphic(a,l);return a};Ea.drawRoundRect=function(a,b,c,d,f,g,k,l,m,z){null==l&&(l=-1);Ea.flashGfx.clear();if(null!=m){var h=null==m.color?-16777216:m.color;null==m.thickness&&(m.thickness=1);null==m.pixelHinting&&(m.pixelHinting=!1);null==m.miterLimit&&(m.miterLimit=3);Ea.flashGfx.lineStyle(m.thickness,h&16777215,(h>>24&255)/255,m.pixelHinting,m.scaleMode,m.capsStyle,m.jointStyle,m.miterLimit)}0!=
l&&Ea.flashGfx.beginFill(l&16777215,(l>>24&255)/255);Ea.flashGfx.drawRoundRect(b,c,d,f,g,k);Ea.flashGfx.endFill();Ea.updateSpriteGraphic(a,z);return a};Ea.drawRoundRectComplex=function(a,b,c,d,f,g,k,l,m,z,h,p){null==z&&(z=-1);Ea.flashGfx.clear();if(null!=h){var r=null==h.color?-16777216:h.color;null==h.thickness&&(h.thickness=1);null==h.pixelHinting&&(h.pixelHinting=!1);null==h.miterLimit&&(h.miterLimit=3);Ea.flashGfx.lineStyle(h.thickness,r&16777215,(r>>24&255)/255,h.pixelHinting,h.scaleMode,h.capsStyle,
h.jointStyle,h.miterLimit)}0!=z&&Ea.flashGfx.beginFill(z&16777215,(z>>24&255)/255);Ea.flashGfx.drawRoundRectComplex(b,c,d,f,g,k,l,m);Ea.flashGfx.endFill();Ea.updateSpriteGraphic(a,p);return a};Ea.drawCircle=function(a,b,c,d,f,g,k){null==f&&(f=-1);null==d&&(d=-1);null==c&&(c=-1);null==b&&(b=-1);if(-1==b||-1==c){var l=a.getGraphicMidpoint();-1==b&&(b=l.x-a.x);-1==c&&(c=l.y-a.y);l.put()}1>d&&(d=Math.min(a.frameWidth,a.frameHeight)/2);Ea.flashGfx.clear();null!=g&&(l=null==g.color?-16777216:g.color,null==
g.thickness&&(g.thickness=1),null==g.pixelHinting&&(g.pixelHinting=!1),null==g.miterLimit&&(g.miterLimit=3),Ea.flashGfx.lineStyle(g.thickness,l&16777215,(l>>24&255)/255,g.pixelHinting,g.scaleMode,g.capsStyle,g.jointStyle,g.miterLimit));0!=f&&Ea.flashGfx.beginFill(f&16777215,(f>>24&255)/255);Ea.flashGfx.drawCircle(b,c,d);Ea.flashGfx.endFill();Ea.updateSpriteGraphic(a,k);return a};Ea.drawEllipse=function(a,b,c,d,f,g,k,l){null==g&&(g=-1);Ea.flashGfx.clear();if(null!=k){var m=null==k.color?-16777216:
k.color;null==k.thickness&&(k.thickness=1);null==k.pixelHinting&&(k.pixelHinting=!1);null==k.miterLimit&&(k.miterLimit=3);Ea.flashGfx.lineStyle(k.thickness,m&16777215,(m>>24&255)/255,k.pixelHinting,k.scaleMode,k.capsStyle,k.jointStyle,k.miterLimit)}0!=g&&Ea.flashGfx.beginFill(g&16777215,(g>>24&255)/255);Ea.flashGfx.drawEllipse(b,c,d,f);Ea.flashGfx.endFill();Ea.updateSpriteGraphic(a,l);return a};Ea.drawTriangle=function(a,b,c,d,f,g,k){null==f&&(f=-1);Ea.flashGfx.clear();if(null!=g){var l=null==g.color?
-16777216:g.color;null==g.thickness&&(g.thickness=1);null==g.pixelHinting&&(g.pixelHinting=!1);null==g.miterLimit&&(g.miterLimit=3);Ea.flashGfx.lineStyle(g.thickness,l&16777215,(l>>24&255)/255,g.pixelHinting,g.scaleMode,g.capsStyle,g.jointStyle,g.miterLimit)}0!=f&&Ea.flashGfx.beginFill(f&16777215,(f>>24&255)/255);Ea.flashGfx.moveTo(b+d/2,c);Ea.flashGfx.lineTo(b+d,d+c);Ea.flashGfx.lineTo(b,d+c);Ea.flashGfx.lineTo(b+d/2,c);Ea.flashGfx.endFill();Ea.updateSpriteGraphic(a,k);return a};Ea.drawPolygon=function(a,
b,c,d,f){null==c&&(c=-1);Ea.flashGfx.clear();if(null!=d){var g=null==d.color?-16777216:d.color;null==d.thickness&&(d.thickness=1);null==d.pixelHinting&&(d.pixelHinting=!1);null==d.miterLimit&&(d.miterLimit=3);Ea.flashGfx.lineStyle(d.thickness,g&16777215,(g>>24&255)/255,d.pixelHinting,d.scaleMode,d.capsStyle,d.jointStyle,d.miterLimit)}0!=c&&Ea.flashGfx.beginFill(c&16777215,(c>>24&255)/255);c=b.shift();Ea.flashGfx.moveTo(c.x,c.y);for(d=0;d<b.length;)g=b[d],++d,Ea.flashGfx.lineTo(g.x,g.y);Ea.flashGfx.endFill();
Ea.updateSpriteGraphic(a,f);b.unshift(c);return a};Ea.beginDraw=function(a,b){Ea.flashGfx.clear();if(null!=b){var c=null==b.color?-16777216:b.color;null==b.thickness&&(b.thickness=1);null==b.pixelHinting&&(b.pixelHinting=!1);null==b.miterLimit&&(b.miterLimit=3);Ea.flashGfx.lineStyle(b.thickness,c&16777215,(c>>24&255)/255,b.pixelHinting,b.scaleMode,b.capsStyle,b.jointStyle,b.miterLimit)}0!=a&&Ea.flashGfx.beginFill(a&16777215,(a>>24&255)/255)};Ea.endDraw=function(a,b){Ea.flashGfx.endFill();Ea.updateSpriteGraphic(a,
b);return a};Ea.updateSpriteGraphic=function(a,b){null==b?b={smoothing:!1}:null==b.smoothing&&(b.smoothing=!1);a.get_pixels().draw(Ea.flashGfxSprite,b.matrix,b.colorTransform,b.blendMode,b.clipRect,b.smoothing);a.dirty=!0;return a};Ea.setLineStyle=function(a){if(null!=a){var b=null==a.color?-16777216:a.color;null==a.thickness&&(a.thickness=1);null==a.pixelHinting&&(a.pixelHinting=!1);null==a.miterLimit&&(a.miterLimit=3);Ea.flashGfx.lineStyle(a.thickness,b&16777215,(b>>24&255)/255,a.pixelHinting,a.scaleMode,
a.capsStyle,a.jointStyle,a.miterLimit)}};Ea.getDefaultLineStyle=function(a){null==a&&(a={thickness:1,color:-1});null==a.thickness&&(a.thickness=1);null==a.color&&(a.color=-1);return a};Ea.fill=function(a,b){a.get_pixels().fillRect(a.get_pixels().rect,b);a.get_pixels()!=a.framePixels&&(a.dirty=!0);return a};Ea.flicker=function(a,b,c,d,f,g,k){null==f&&(f=!0);null==d&&(d=!0);null==c&&(c=.04);null==b&&(b=1);return Ed.flicker(a,b,c,d,f,g,k)};Ea.isFlickering=function(a){return Ed.isFlickering(a)};Ea.stopFlickering=
function(a){Ed.stopFlickering(a);return a};Ea.fadeIn=function(a,b,c,d){null==b&&(b=1);c&&a.set_alpha(0);Ma.num(a.alpha,1,b,{onComplete:d},function(b){Ea.alphaTween(a,b)});return a};Ea.fadeOut=function(a,b,c){null==b&&(b=1);Ma.num(a.alpha,0,b,{onComplete:c},function(b){Ea.alphaTween(a,b)});return a};Ea.alphaTween=function(a,b){a.set_alpha(b)};Ea.setTint=function(a,b){var c=(b>>24&255)/255,d=1-c;a.setColorTransform(d,d,d,1,Math.round((b>>16&255)*c),Math.round((b>>8&255)*c),Math.round((b&255)*c))};Ea.flashTint=
function(a,b,c,d,f){null==c&&(c=.5);null==b&&(b=-1);f=null!=f?{onComplete:function(a){}}:null;null==d&&(d=function(a){return 1- -(Math.sqrt(1-a*a)-1)});var g=b&16777215,k=(b>>24&255)/255;Ma.num(0,1,c,f,function(b){b=k*d(b);b=Math.round(255*b);g=(g&=16777215)|(255<b?255:0>b?0:b)<<24;b=(g>>24&255)/255;var c=1-b;a.setColorTransform(c,c,c,1,Math.round((g>>16&255)*b),Math.round((g>>8&255)*b),Math.round((g&255)*b))});return a};Ea.setBrightness=function(a,b){var c=1-Math.abs(b);b=Math.round(Math.max(0,255*
b));a.setColorTransform(c,c,c,1,b,b,b)};var ab=function(){};h["flixel.util.FlxStringUtil"]=ab;ab.__name__="flixel.util.FlxStringUtil";ab.formatTicks=function(a,b){return Math.abs(b-a)/1E3+"s"};ab.formatTime=function(a,b){null==b&&(b=!1);var c=(a/60|0)+":",d=(a|0)%60;10>d&&(c+="0");c+=d;b&&(c+=".",d=100*(a-(a|0))|0,10>d&&(c+="0"),c+=d);return c};ab.formatArray=function(a){var b="";if(null!=a&&0<a.length){b=M.string(a[0]);for(var c=1,d=a.length;c<d;)b+=", "+M.string(a[c++])}return b};ab.formatStringMap=
function(a){var b="";a=Object.keys(a.h);for(var c=a.length,d=0;d<c;){var f=a[d++];b+=null==f?"null":""+f;b+=", "}return b.substring(0,b.length-2)};ab.formatMoney=function(a,b,c){null==c&&(c=!0);null==b&&(b=!0);var d=0>a;a=Math.abs(a);for(var f="",g="",k=Math.floor(a);0<k;){0<f.length&&0>=g.length&&(g=c?",":".");var l="",m=k-1E3*Math.floor(k/1E3);k=Math.floor(k/1E3);0<k&&(100>m&&(l+="0"),10>m&&(l+="0"));f=l+m+g+f}""==f&&(f="0");b&&(k=Math.floor(100*a)-100*Math.floor(a),f+=c?".":",",10>k&&(f+="0"),
f+=k);d&&(f="-"+f);return f};ab.formatBytes=function(a,b){null==b&&(b=2);for(var c="Bytes kB MB GB TB PB".split(" "),d=0;1024<=a&&d<c.length-1;)a/=1024,++d;return xb.roundDecimal(a,b)+c[d]};ab.filterDigits=function(a){for(var b="",c=0,d=a.length;c<d;){var f=c++;f=y.cca(a,f);48<=f&&57>=f&&(b+=String.fromCodePoint(f))}return b};ab.htmlFormat=function(a,b,c,d,f,g){null==g&&(g=!1);null==f&&(f=!1);null==d&&(d=!1);null==c&&(c="FFFFFF");null==b&&(b=12);b="<font size='"+b+"' color='#"+c+"'>";c="</font>";
d&&(b="<b>"+b,c+="</b>");f&&(b="<i>"+b,c+="</i>");g&&(b="<u>"+b,c+="</u>");return b+a+c};ab.getClassName=function(a,b){null==b&&(b=!1);a=na.__instanceof(a,$e)?a:na.getClass(a);return ab.formatPackage(a.__name__,b)};ab.getEnumName=function(a,b){null==b&&(b=!1);a=na.__instanceof(a,Xn)?a:w.getEnum(a);return ab.formatPackage(a.__ename__,b)};ab.formatPackage=function(a,b){if(null==a)return null;a=O.replace(a,"::",".");b&&(a=y.substr(a,a.lastIndexOf(".")+1,null));return a};ab.getHost=function(a){var b=
new E("^(?:[a-z][a-z0-9+\\-.]*://)?(?:[a-z0-9\\-._~%!$&'()*+,;=]+@)?([a-z0-9\\-._~%]{3,}|\\[[a-f0-9:.]+\\])?(?::[0-9]+)?","i");return b.match(a)&&(a=b.matched(1),null!=a)?decodeURIComponent(a.split("+").join(" ")).toLowerCase():""};ab.getDomain=function(a){a=ab.getHost(a);var b=new E("^(localhost|[0-9.]+|\\[[a-f0-9:.]+\\])$","i"),c=new E("^(?:[a-z0-9\\-]+\\.)*([a-z0-9\\-]+\\.[a-z0-9\\-]+)$","i");return!b.match(a)&&c.match(a)&&(a=c.matched(1),null!=a)?a.toLowerCase():""};ab.sameClassName=function(a,
b,c){null==c&&(c=!0);return ab.getClassName(a,c)==ab.getClassName(b,c)};ab.toIntArray=function(a){if(null!=a&&""!=a){a=a.split(",");for(var b=[],c=0;c<a.length;){var d=a[c];++c;b.push(M.parseInt(d))}return b}return null};ab.toFloatArray=function(a){if(null!=a&&""!=a){a=a.split(",");for(var b=[],c=0;c<a.length;){var d=a[c];++c;b.push(parseFloat(d))}return b}return null};ab.arrayToCSV=function(a,b,c){null==c&&(c=!1);for(var d=0,f,g="",k=a.length/b|0,l,m=0;d<k;){for(f=0;f<b;)l=a[m],c&&(0==l?l=1:1==l&&
(l=0)),g=0==f?0==d?g+l:g+("\n"+l):g+(", "+l),++f,++m;++d}return g};ab.bitmapToCSV=function(a,b,c,d){null==c&&(c=1);null==b&&(b=!1);1>c&&(c=1);if(1<c){var f=a;a=new ma(a.width*c,a.height*c);for(var g=f.height,k,l=0,m=f.width;l<m;)for(var z=l++,h=0,p=g;h<p;){var r=h++;k=f.getPixel(z,r);for(var w=0,u=c;w<u;)for(var n=w++,t=0,A=c;t<A;){var y=t++;a.setPixel(z*c+n,r*c+y,k)}}}if(null!=d)for(l=0,m=d.length;l<m;)z=l++,d[z]&=16777215;c=0;k="";l=a.width;for(m=a.height;c<m;){for(f=0;f<l;)g=a.getPixel(f,c),g=
null!=d?d.indexOf(g):b&&0<g||!b&&0==g?1:0,k=0==f?0==c?k+g:k+("\n"+g):k+(", "+g),++f;++c}return k};ab.imageToCSV=function(a,b,c,d){null==c&&(c=1);null==b&&(b=!1);a="string"==typeof a?u.assets.getAsset(a,"image",!1,null):w.createInstance(a,[]).bitmapData;return ab.bitmapToCSV(a,b,c,d)};ab.getDebugString=function(a){for(var b="(",c=0;c<a.length;){var d=a[c];++c;b+=d.label+": ";var f=d.value;"number"==typeof f&&(f=xb.roundDecimal(f,u.debugger.precision));b+=M.string(f)+" | ";Ua._pool.put(d)}b=O.trim(y.substr(b,
0,b.length-2));return b+")"};ab.contains=function(a,b){return-1!=a.indexOf(b)};ab.remove=function(a,b){return O.replace(a,b,"")};ab.insert=function(a,b,c){return a.substring(0,b)+c+y.substr(a,b,null)};ab.sortAlphabetically=function(a){a.sort(function(a,c){a=a.toLowerCase();c=c.toLowerCase();return a<c?-1:a>c?1:0});return a};ab.isNullOrEmpty=function(a){return null!=a?0==a.length:!0};ab.toUnderscoreCase=function(a){return a.toLowerCase().replace(/[^a-z0-9]+/g,"_")};ab.toTitleCase=function(a){var b=
"a an the at by for in of on to up and as but or nor".split(" "),c=new E("^(?=[MDCLXVI])M*(C[MD]|D?C*)(X[CL]|L?X*)(I[XV]|V?I*)$","i");a=a.toLowerCase().split(" ");for(var d=0,f=a.length;d<f;){var g=d++;if(c.match(a[g]))a[g]=a[g].toUpperCase();else if(0==g||-1==b.indexOf(a[g]))a[g]=a[g].charAt(0).toUpperCase()+y.substr(a[g],1,null)}return a.join(" ")};var Ua=function(){};h["flixel.util.LabelValuePair"]=Ua;Ua.__name__="flixel.util.LabelValuePair";Ua.__interfaces__=[D];Ua.weak=function(a,b){var c=Ua._pool.get();
c.label=a;c.value=b;return c};Ua.prototype={label:null,value:null,create:function(a,b){this.label=a;this.value=b;return this},put:function(){Ua._pool.put(this)},destroy:function(){this.value=this.label=null},__class__:Ua};var bf=function(a){this._inManager=!1;this._timeCounter=this._loopsCounter=0;this.active=this.finished=!1;this.time=this.loops=0;this.manager=null!=a?a:bf.globalManager};h["flixel.util.FlxTimer"]=bf;bf.__name__="flixel.util.FlxTimer";bf.__interfaces__=[D];bf.wait=function(a,b){return(new bf).start(a,
function(a){b()})};bf.loop=function(a,b,c){return(new bf).start(a,function(a){b(a._loopsCounter)},c)};bf.globalManager=null;bf.prototype={manager:null,time:null,loops:null,active:null,finished:null,onComplete:null,_timeCounter:null,_loopsCounter:null,_inManager:null,destroy:function(){this.onComplete=null},start:function(a,b,c){null==c&&(c=1);null==a&&(a=1);null==this.manager||this._inManager||(this.manager.add(this),this._inManager=!0);this.active=!0;this.finished=!1;this.time=Math.abs(a);0>c&&(c*=
-1);this.loops=c;this.onComplete=b;this._loopsCounter=this._timeCounter=0;return this},reset:function(a){null==a&&(a=-1);0>a&&(a=this.time);this.start(a,this.onComplete,this.loops);return this},cancel:function(){this.finished=!0;this.active=!1;null!=this.manager&&this._inManager&&(this.manager.remove(this),this._inManager=!1)},update:function(a){for(this._timeCounter+=a;this._timeCounter>=this.time&&this.active&&!this.finished;)this._timeCounter-=this.time,this._loopsCounter++,0<this.loops&&this._loopsCounter>=
this.loops&&(this.finished=!0)},onLoopFinished:function(){this.finished&&this.cancel();if(null!=this.onComplete)this.onComplete(this)},get_timeLeft:function(){return this.time-this._timeCounter},get_elapsedTime:function(){return this._timeCounter},get_loopsLeft:function(){return this.loops-this._loopsCounter},get_elapsedLoops:function(){return this._loopsCounter},get_progress:function(){return 0<this.time?this._timeCounter/this.time:0},__class__:bf,__properties__:{get_progress:"get_progress",get_elapsedLoops:"get_elapsedLoops",
get_loopsLeft:"get_loopsLeft",get_elapsedTime:"get_elapsedTime",get_timeLeft:"get_timeLeft"}};var Bk=function(){this._timers=[];Na.call(this);this.set_visible(!1);u.signals.preStateSwitch.add(q(this,this.clear))};h["flixel.util.FlxTimerManager"]=Bk;Bk.__name__="flixel.util.FlxTimerManager";Bk.__super__=Na;Bk.prototype=x(Na.prototype,{_timers:null,destroy:function(){Hd.clearArray(this._timers);this._timers=null;u.signals.preStateSwitch.remove(q(this,this.clear));Na.prototype.destroy.call(this)},update:function(a){for(var b=
null,c=0,d=this._timers;c<d.length;){var f=d[c];++c;if(f.active&&!f.finished&&0<=f.time){var g=f._loopsCounter;f.update(a);g!=f._loopsCounter&&(null==b&&(b=[]),b.push(f))}}if(null!=b)for(;0<b.length;)b.shift().onLoopFinished()},add:function(a){this._timers.push(a)},remove:function(a){var b=this._timers;a=b.indexOf(a);-1!=a&&(b[a]=b[b.length-1],b.pop())},completeAll:function(){for(var a=[],b=0,c=this._timers;b<c.length;){var d=c[b];++b;0<d.loops&&d.active&&a.push(d)}for(b=0;b<a.length;)for(d=a[b],
++b;!d.finished;)d.update(d.time-d._timeCounter),d.onLoopFinished()},clear:function(){Hd.clearArray(this._timers)},forEach:function(a){for(var b=0,c=this._timers;b<c.length;){var d=c[b];++b;a(d)}},__class__:Bk});var qm=G["flixel.util.FlxVerticalAlign"]={__ename__:"flixel.util.FlxVerticalAlign",__constructs__:null,TOP:{_hx_name:"TOP",_hx_index:0,__enum__:"flixel.util.FlxVerticalAlign",toString:t},CENTER:{_hx_name:"CENTER",_hx_index:1,__enum__:"flixel.util.FlxVerticalAlign",toString:t},BOTTOM:{_hx_name:"BOTTOM",
_hx_index:2,__enum__:"flixel.util.FlxVerticalAlign",toString:t}};qm.__constructs__=[qm.TOP,qm.CENTER,qm.BOTTOM];var Ng=function(a,b){this.active=!0;this.min=a;this.max=null==b?a:b};h["flixel.util.helpers.FlxBounds"]=Ng;Ng.__name__="flixel.util.helpers.FlxBounds";Ng.prototype={min:null,max:null,active:null,set:function(a,b){this.min=a;this.max=null==b?a:b;return this},equals:function(a){return this.min==a.min?this.max==a.max:!1},toString:function(){var a=this.min,b=Ua._pool.get();b.label="min";b.value=
a;a=this.max;var c=Ua._pool.get();c.label="max";c.value=a;return ab.getDebugString([b,c])},__class__:Ng};var rh=function(a,b,c,d,f,g,k,l){this.active=!0;var m=0,z=0;null==z&&(z=0);null==m&&(m=0);var h=N.pool.get().set(m,z);h._inPool=!1;z=m=0;null==z&&(z=0);null==m&&(m=0);m=N.pool.get().set(m,z);m._inPool=!1;this.start=new Ng(h,m);z=m=0;null==z&&(z=0);null==m&&(m=0);h=N.pool.get().set(m,z);h._inPool=!1;z=m=0;null==z&&(z=0);null==m&&(m=0);m=N.pool.get().set(m,z);m._inPool=!1;this.end=new Ng(h,m);this.set(a,
b,c,d,f,g,k,l)};h["flixel.util.helpers.FlxPointRangeBounds"]=rh;rh.__name__="flixel.util.helpers.FlxPointRangeBounds";rh.__interfaces__=[D];rh.prototype={start:null,end:null,active:null,set:function(a,b,c,d,f,g,k,l){this.start.min.set_x(a);this.start.min.set_y(null==b?this.start.min.x:b);this.start.max.set_x(null==c?this.start.min.x:c);this.start.max.set_y(null==d?this.start.min.y:d);this.end.min.set_x(null==f?this.start.min.x:f);this.end.min.set_y(null==g?this.start.min.y:g);this.end.max.set_x(null==
k?null==f?this.start.max.x:this.end.min.x:k);this.end.max.set_y(null==l?null==g?this.start.max.y:this.end.min.y:l);return this},equals:function(a){var b=this.start.min;var c=a.start.min;b=1E-7>=Math.abs(b.x-c.x)&&1E-7>=Math.abs(b.y-c.y);c._weak&&c.put();b?(b=this.start.max,c=a.start.max,b=1E-7>=Math.abs(b.x-c.x)&&1E-7>=Math.abs(b.y-c.y),c._weak&&c.put(),c=b):c=!1;c?(b=this.end.min,c=a.end.min,b=1E-7>=Math.abs(b.x-c.x)&&1E-7>=Math.abs(b.y-c.y),c._weak&&c.put(),c=b):c=!1;return c?(b=this.end.max,c=
a.end.max,b=1E-7>=Math.abs(b.x-c.x)&&1E-7>=Math.abs(b.y-c.y),c._weak&&c.put(),b):!1},toString:function(){var a=this.start.min.x,b=Ua._pool.get();b.label="start.min.x";b.value=a;a=this.start.min.y;var c=Ua._pool.get();c.label="start.min.y";c.value=a;a=this.start.max.x;var d=Ua._pool.get();d.label="start.max.x";d.value=a;a=this.start.max.y;var f=Ua._pool.get();f.label="start.max.y";f.value=a;a=this.end.min.x;var g=Ua._pool.get();g.label="end.min.x";g.value=a;a=this.end.min.y;var k=Ua._pool.get();k.label=
"end.min.y";k.value=a;a=this.end.max.x;var l=Ua._pool.get();l.label="end.max.x";l.value=a;a=this.end.max.y;var m=Ua._pool.get();m.label="end.max.y";m.value=a;return ab.getDebugString([b,c,d,f,g,k,l,m])},destroy:function(){this.start.min=ba.put(this.start.min);this.start.max=ba.put(this.start.max);this.end.min=ba.put(this.end.min);this.end.max=ba.put(this.end.max)},__class__:rh};var yf=function(a,b){this.active=!0;this.start=a;this.end=null==b?a:b};h["flixel.util.helpers.FlxRange"]=yf;yf.__name__=
"flixel.util.helpers.FlxRange";yf.prototype={start:null,end:null,active:null,set:function(a,b){this.start=a;this.end=null==b?a:b;return this},equals:function(a){return this.start==a.start?this.end==a.end:!1},toString:function(){var a=this.start,b=Ua._pool.get();b.label="start";b.value=a;a=this.end;var c=Ua._pool.get();c.label="end";c.value=a;return ab.getDebugString([b,c])},__class__:yf};var Sf=function(a,b,c,d){this.active=!0;this.start=new Ng(a,null==b?a:b);this.end=new Ng(null==c?a:c,null==d?this.start.max:
d)};h["flixel.util.helpers.FlxRangeBounds"]=Sf;Sf.__name__="flixel.util.helpers.FlxRangeBounds";Sf.prototype={start:null,end:null,active:null,set:function(a,b,c,d){this.start.min=a;this.start.max=null==b?this.start.min:b;this.end.min=null==c?this.start.min:c;this.end.max=null==d?null==c?this.start.max:this.end.min:d;return this},equals:function(a){var b=this.start,c=a.start;return b.min==c.min&&b.max==c.max?(b=this.end,c=a.end,b.min==c.min?b.max==c.max:!1):!1},toString:function(){var a=this.start.min,
b=Ua._pool.get();b.label="start.min";b.value=a;a=this.start.min;var c=Ua._pool.get();c.label="start.max";c.value=a;a=this.end.min;var d=Ua._pool.get();d.label="end.min";d.value=a;a=this.end.max;var f=Ua._pool.get();f.label="end.max";f.value=a;return ab.getDebugString([b,c,d,f])},__class__:Sf};var fg={fromState:function(a){return a},fromMaker:function(a){return a},isInstance:function(a){return a instanceof wb},isClass:function(a){return na.__instanceof(a,$e)},createInstance:function(a){return a instanceof
wb?a:na.__instanceof(a,$e)?w.createInstance(a,[]):a()},getConstructor:function(a){return a instanceof wb?function(){return w.createInstance(na.getClass(a),[])}:na.__instanceof(a,$e)?function(){return w.createInstance(a,[])}:a}},No={fromType:function(a){return a},fromMaker:function(a){return a},toNextState:function(a){return na.__instanceof(a,$e)?fg.fromMaker(function(){return w.createInstance(a,[])}):a}},Jf=G["haxe.StackItem"]={__ename__:"haxe.StackItem",__constructs__:null,CFunction:{_hx_name:"CFunction",
_hx_index:0,__enum__:"haxe.StackItem",toString:t},Module:(n=function(a){return{_hx_index:1,m:a,__enum__:"haxe.StackItem",toString:t}},n._hx_name="Module",n.__params__=["m"],n),FilePos:(n=function(a,b,c,d){return{_hx_index:2,s:a,file:b,line:c,column:d,__enum__:"haxe.StackItem",toString:t}},n._hx_name="FilePos",n.__params__=["s","file","line","column"],n),Method:(n=function(a,b){return{_hx_index:3,classname:a,method:b,__enum__:"haxe.StackItem",toString:t}},n._hx_name="Method",n.__params__=["classname",
"method"],n),LocalFunction:(n=function(a){return{_hx_index:4,v:a,__enum__:"haxe.StackItem",toString:t}},n._hx_name="LocalFunction",n.__params__=["v"],n)};Jf.__constructs__=[Jf.CFunction,Jf.Module,Jf.FilePos,Jf.Method,Jf.LocalFunction];var $f={callStack:function(){return db.toHaxe(db.callStack())},exceptionStack:function(a){null==a&&(a=!1);var b=db.toHaxe(db.exceptionStack());return a?b:$f.subtract(b,$f.callStack())},toString:function(a){for(var b=new Wd,c=0;c<a.length;){var d=a[c];++c;b.b+="\nCalled from ";
$f.itemToString(b,d)}return b.b},subtract:function(a,b){for(var c=-1,d=-1;++d<a.length;){for(var f=0,g=b.length;f<g;){var k=f++;if($f.equalItems(a[d],b[k])){if(0>c&&(c=d),++d,d>=a.length)break}else c=-1}if(0<=c)break}return 0<=c?a.slice(0,c):a},equalItems:function(a,b){if(null==a)return null==b?!0:!1;switch(a._hx_index){case 0:return null==b?!1:0==b._hx_index?!0:!1;case 1:return null==b?!1:1==b._hx_index?a.m==b.m:!1;case 2:if(null==b)return!1;if(2==b._hx_index){var c=b.s,d=b.line,f=b.column,g=a.column,
k=a.line,l=a.s;return a.file==b.file&&k==d&&g==f?$f.equalItems(l,c):!1}return!1;case 3:return null==b?!1:3==b._hx_index?(c=b.method,d=a.method,a.classname==b.classname?d==c:!1):!1;case 4:return null==b?!1:4==b._hx_index?a.v==b.v:!1}},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.s,d=b.file,f=b.line;b=b.column;null!=c&&($f.itemToString(a,c),a.b+=" (");a.b+=null==d?"null":""+d;a.b+=" line ";a.b+=
null==f?"null":""+f;null!=b&&(a.b+=" column ",a.b+=null==b?"null":""+b);null!=c&&(a.b+=")");break;case 3:c=b.classname;b=b.method;a.b+=M.string(null==c?"<unknown>":c);a.b+=".";a.b+=null==b?"null":""+b;break;case 4:b=b.v,a.b+="local function #",a.b+=null==b?"null":""+b}}},J=function(a,b,c){Error.call(this,a);this.message=a;this.__previousException=b;this.__nativeException=null!=c?c:this;this.__skipStack=0;a=Error.prepareStackTrace;Error.prepareStackTrace=function(a){return a.stack};if(c instanceof
Error)this.stack=c.stack;else{c=null;if(Error.captureStackTrace)Error.captureStackTrace(this,J),c=this;else if(c=Error(),"undefined"==typeof c.stack){try{throw c;}catch(d){}this.__skipStack++}this.stack=c.stack}Error.prepareStackTrace=a};h["haxe.Exception"]=J;J.__name__="haxe.Exception";J.caught=function(a){return a instanceof J?a:a instanceof Error?new J(a.message,null,a):new fj(a,null,a)};J.thrown=function(a){if(a instanceof J)return a.get_native();if(a instanceof Error)return a;a=new fj(a);a.__skipStack++;
return a};J.__super__=Error;J.prototype=x(Error.prototype,{__skipStack:null,__nativeException:null,__previousException:null,unwrap:function(){return this.__nativeException},toString:function(){return this.get_message()},__shiftStack:function(){this.__skipStack++},get_message:function(){return this.message},get_native:function(){return this.__nativeException},get_stack:function(){var a=this.__exceptionStack;null==a&&(a=db.toHaxe(db.normalize(this.stack),this.__skipStack),this.setProperty("__exceptionStack",
a));return a},setProperty:function(a,b){try{Object.defineProperty(this,a,{value:b})}catch(c){this[a]=b}},__class__:J,__properties__:{get_native:"get_native",get_stack:"get_stack",get_message:"get_message"}});var Gb=function(a,b){this.high=a;this.low=b};h["haxe._Int64.___Int64"]=Gb;Gb.__name__="haxe._Int64.___Int64";Gb.prototype={high:null,low:null,__class__:Gb};var db=function(){};h["haxe.NativeStackTrace"]=db;db.__name__="haxe.NativeStackTrace";db.lastError=null;db.wrapCallSite=null;db.saveStack=
function(a){db.lastError=a};db.callStack=function(){var a=Error(""),b=db.tryHaxeStack(a);if("undefined"==typeof b){try{throw a;}catch(c){}b=a.stack}return db.normalize(b,2)};db.exceptionStack=function(){return db.normalize(db.tryHaxeStack(db.lastError))};db.toHaxe=function(a,b){null==b&&(b=0);if(null==a)return[];if("string"==typeof a){a=a.split("\n");"Error"==a[0]&&a.shift();for(var c=[],d=0,f=a.length;d<f;){var g=d++;if(!(b>g)){var k=a[g];g=k.match(/^    at ([$A-Za-z0-9_. ]+) \(([^)]+):([0-9]+):([0-9]+)\)$/);
if(null!=g){k=g[1].split(".");"$hxClasses"==k[0]&&k.shift();var l=k.pop(),m=g[2],z=M.parseInt(g[3]);g=M.parseInt(g[4]);c.push(Jf.FilePos("Anonymous function"==l?Jf.LocalFunction():"Global code"==l?null:Jf.Method(k.join("."),l),m,z,g))}else c.push(Jf.Module(O.trim(k)))}}return c}return 0<b&&Array.isArray(a)?a.slice(b):a};db.tryHaxeStack=function(a){if(null==a)return[];var b=Error.prepareStackTrace;Error.prepareStackTrace=db.prepareHxStackTrace;a=a.stack;Error.prepareStackTrace=b;return a};db.prepareHxStackTrace=
function(a,b){a=[];for(var c=0;c<b.length;){var d=b[c];++c;null!=db.wrapCallSite&&(d=db.wrapCallSite(d));var f=null,g=d.getFunctionName();if(null!=g){var k=g.lastIndexOf(".");0<=k?(f=g.substring(0,k),g=g.substring(k+1),f=Jf.Method(f,g)):f=Jf.Method(null,g)}g=d.getFileName();k=null==g?-1:g.indexOf("file:");null!=db.wrapCallSite&&0<k&&(g=g.substring(k+6));a.push(Jf.FilePos(f,g,d.getLineNumber(),d.getColumnNumber()))}return a};db.normalize=function(a,b){null==b&&(b=0);if(Array.isArray(a)&&0<b)return a.slice(b);
if("string"==typeof a){switch(a.substring(0,6)){case "Error\n":case "Error:":++b}return db.skipLines(a,b)}return a};db.skipLines=function(a,b,c){null==c&&(c=0);return 0<b?(c=a.indexOf("\n",c),0>c?"":db.skipLines(a,--b,c+1)):a.substring(c)};var df=function(){};h["haxe.Resource"]=df;df.__name__="haxe.Resource";df.content=null;df.getString=function(a){for(var b=0,c=df.content;b<c.length;){var d=c[b];++b;if(d.name==a)return null!=d.str?d.str:Ug.decode(d.data).toString()}return null};df.getBytes=function(a){for(var b=
0,c=df.content;b<c.length;){var d=c[b];++b;if(d.name==a)return null!=d.str?bb.ofString(d.str):Ug.decode(d.data)}return null};var Qd=function(){this.buf=new Wd;this.cache=[];this.useCache=Qd.USE_CACHE;this.useEnumIndex=Qd.USE_ENUM_INDEX;this.shash=new Ba;this.scount=0};h["haxe.Serializer"]=Qd;Qd.__name__="haxe.Serializer";Qd.run=function(a){var b=new Qd;b.serialize(a);return b.toString()};Qd.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.h[a];null!=b?(this.buf.b+="R",this.buf.b+=null==b?"null":""+b):(this.shash.h[a]=this.scount++,this.buf.b+="y",a=encodeURIComponent(a),this.buf.b+=M.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 f=c++,g=this.cache[f];if(typeof g==b&&g==a)return this.buf.b+="r",this.buf.b+=null==f?"null":""+f,!0}this.cache.push(a);return!1},serializeFields:function(a){for(var b=
0,c=la.fields(a);b<c.length;){var d=c[b];++b;this.serializeString(d);this.serialize(la.field(a,d))}this.buf.b+="g"},serialize:function(a){var b=w.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:na.__instanceof(a,$e)?(a=a.__name__,this.buf.b+=
"A",this.serializeString(a)):na.__instanceof(a,Xn)?(this.buf.b+="B",this.serializeString(a.__ename__)):this.useCache&&this.serializeRef(a)||(this.buf.b+="o",this.serializeFields(a));break;case 5:throw J.thrown("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:var c=0;this.buf.b+="a";for(var d=0,f=a.length;d<f;)b=d++,null==a[b]?++c:(0<c&&(1==c?this.buf.b+="n":(this.buf.b+="u",this.buf.b+=null==c?"null":
""+c),c=0),this.serialize(a[b]));0<c&&(1==c?this.buf.b+="n":(this.buf.b+="u",this.buf.b+=null==c?"null":""+c));this.buf.b+="h";break;case Date:this.buf.b+="v";this.buf.b+=M.string(a.getTime());break;case hc: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 ib: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 Ga:this.buf.b+="M";for(b=a.keys();b.hasNext();){c=
b.next();var g=la.field(c,"__id__");la.deleteField(c,"__id__");this.serialize(c);c.__id__=g;this.serialize(a.h[c.__id__])}this.buf.b+="h";break;case Ba:this.buf.b+="b";c=Object.keys(a.h);g=c.length;for(d=0;d<g;)b=c[d++],this.serializeString(b),this.serialize(a.h[b]);this.buf.b+="h";break;case bb:this.buf.b+="s";this.buf.b+=M.string(Math.ceil(8*a.length/6));this.buf.b+=":";b=0;c=a.length-2;g=Qd.BASE64_CODES;if(null==g){g=Array(Qd.BASE64.length);d=0;for(f=Qd.BASE64.length;d<f;){var k=d++;g[k]=y.cca(Qd.BASE64,
k)}Qd.BASE64_CODES=g}for(;b<c;)d=a.b[b++],f=a.b[b++],k=a.b[b++],this.buf.b+=String.fromCodePoint(g[d>>2]),this.buf.b+=String.fromCodePoint(g[(d<<4|f>>4)&63]),this.buf.b+=String.fromCodePoint(g[(f<<2|k>>6)&63]),this.buf.b+=String.fromCodePoint(g[k&63]);b==c?(d=a.b[b++],f=a.b[b++],this.buf.b+=String.fromCodePoint(g[d>>2]),this.buf.b+=String.fromCodePoint(g[(d<<4|f>>4)&63]),this.buf.b+=String.fromCodePoint(g[f<<2&63])):b==c+1&&(d=a.b[b++],this.buf.b+=String.fromCodePoint(g[d>>2]),this.buf.b+=String.fromCodePoint(g[d<<
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+=M.string(this.useEnumIndex?"j":"w");this.serializeString(b.__ename__);this.useEnumIndex?(this.buf.b+=
":",this.buf.b+=M.string(a._hx_index)):(b=a,this.serializeString(G[b.__enum__].__constructs__[b._hx_index]._hx_name));this.buf.b+=":";c=w.enumParameters(a);this.buf.b+=M.string(c.length);for(b=0;b<c.length;)g=c[b],++b,this.serialize(g);this.useCache&&this.cache.push(a);break;default:throw J.thrown("Cannot serialize "+M.string(a));}},__class__:Qd};var Sc=function(a){var b=this;this.id=setInterval(function(){b.run()},a)};h["haxe.Timer"]=Sc;Sc.__name__="haxe.Timer";Sc.delay=function(a,b){var c=new Sc(b);
c.run=function(){c.stop();a()};return c};Sc.measure=function(a,b){var c=(new Date).getTime()/1E3;a=a();gg.trace((new Date).getTime()/1E3-c+"s",b);return a};Sc.stamp=function(){return(new Date).getTime()/1E3};Sc.prototype={id:null,stop:function(){null!=this.id&&(clearInterval(this.id),this.id=null)},run:function(){},__class__:Sc};var Tk=function(){};h["haxe._Unserializer.DefaultResolver"]=Tk;Tk.__name__="haxe._Unserializer.DefaultResolver";Tk.prototype={resolveClass:function(a){return h[a]},resolveEnum:function(a){return G[a]},
__class__:Tk};var Pd=function(a){this.buf=a;this.length=this.buf.length;this.pos=0;this.scache=[];this.cache=[];a=Pd.DEFAULT_RESOLVER;null==a&&(a=new Tk,Pd.DEFAULT_RESOLVER=a);this.resolver=a};h["haxe.Unserializer"]=Pd;Pd.__name__="haxe.Unserializer";Pd.initCodes=function(){for(var a=[],b=0,c=Pd.BASE64.length;b<c;){var d=b++;a[Pd.BASE64.charCodeAt(d)]=d}return a};Pd.run=function(a){return(new Pd(a)).unserialize()};Pd.prototype={buf:null,pos:null,length:null,cache:null,scache:null,resolver:null,setResolver:function(a){null==
a?(null==zh.instance&&(zh.instance=new zh),this.resolver=zh.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(y.substr(this.buf,a,this.pos-a))},unserializeObject:function(a){for(;;){if(this.pos>=
this.length)throw J.thrown("Invalid object");if(103==this.buf.charCodeAt(this.pos))break;var b=this.unserialize();if("string"!=typeof b)throw J.thrown("Invalid object key");var c=this.unserialize();a[b]=c}this.pos++},unserializeEnum:function(a,b){if(58!=this.buf.charCodeAt(this.pos++))throw J.thrown("Invalid enum format");var c=this.readDigits();if(0==c)return w.createEnum(a,b);for(var d=[];0<c--;)d.push(this.unserialize());return w.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 J.thrown("Class not found "+a);return b;case 66:a=this.unserialize();b=this.resolver.resolveEnum(a);if(null==b)throw J.thrown("Enum not found "+a);return b;case 67:a=this.unserialize();b=this.resolver.resolveClass(a);if(null==b)throw J.thrown("Class not found "+a);b=Object.create(b.prototype);this.cache.push(b);b.hxUnserialize(this);if(103!=this.buf.charCodeAt(this.pos++))throw J.thrown("Invalid custom data");return b;case 77:a=new Ga;
this.cache.push(a);for(var c;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 J.thrown("Invalid string reference");return this.scache[a];case 97:b=[];for(this.cache.push(b);;){c=this.buf.charCodeAt(this.pos);if(104==c){this.pos++;break}117==c?(this.pos++,a=this.readDigits(),b[b.length+a-1]=null):b.push(this.unserialize())}return b;case 98:a=new Ba;for(this.cache.push(a);104!=this.buf.charCodeAt(this.pos);)b=
this.unserialize(),c=this.unserialize(),a.h[b]=c;this.pos++;return a;case 99:a=this.unserialize();b=this.resolver.resolveClass(a);if(null==b)throw J.thrown("Class not found "+a);b=Object.create(b.prototype);this.cache.push(b);this.unserializeObject(b);return b;case 100:return this.readFloat();case 102:return!1;case 105:return this.readDigits();case 106:a=this.unserialize();c=this.resolver.resolveEnum(a);if(null==c)throw J.thrown("Enum not found "+a);this.pos++;for(var d=this.readDigits(),f=c.__constructs__,
g=Array(f.length),k=0,l=f.length;k<l;)b=k++,g[b]=f[b]._hx_name;b=g[d];if(null==b)throw J.thrown("Unknown enum index "+a+"@"+d);b=this.unserializeEnum(c,b);this.cache.push(b);return b;case 107:return NaN;case 108:b=new ib;for(this.cache.push(b);104!=this.buf.charCodeAt(this.pos);)b.add(this.unserialize());this.pos++;return b;case 109:return-Infinity;case 110:return null;case 111:return b={},this.cache.push(b),this.unserializeObject(b),b;case 112:return Infinity;case 113:a=new hc;this.cache.push(a);
for(c=this.buf.charCodeAt(this.pos++);58==c;)b=this.readDigits(),c=this.unserialize(),a.h[b]=c,c=this.buf.charCodeAt(this.pos++);if(104!=c)throw J.thrown("Invalid IntMap format");return a;case 114:a=this.readDigits();if(0>a||a>=this.cache.length)throw J.thrown("Invalid reference");return this.cache[a];case 115:a=this.readDigits();c=this.buf;if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos<a)throw J.thrown("Invalid bytes length");d=Pd.CODES;null==d&&(d=Pd.initCodes(),Pd.CODES=d);b=this.pos;
f=a&3;g=b+(a-f);k=new bb(new ArrayBuffer(3*(a>>2)+(2<=f?f-1:0)));for(l=0;b<g;){var m=d[c.charCodeAt(b++)],z=d[c.charCodeAt(b++)];k.b[l++]=(m<<2|z>>4)&255;m=d[c.charCodeAt(b++)];k.b[l++]=(z<<4|m>>2)&255;z=d[c.charCodeAt(b++)];k.b[l++]=(m<<6|z)&255}2<=f&&(m=d[c.charCodeAt(b++)],z=d[c.charCodeAt(b++)],k.b[l++]=(m<<2|z>>4)&255,3==f&&(m=d[c.charCodeAt(b++)],k.b[l++]=(z<<4|m>>2)&255));this.pos+=a;this.cache.push(k);return k;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)?(b=y.strDate(y.substr(this.buf,this.pos,19)),this.pos+=19):b=new Date(this.readFloat()),this.cache.push(b),b;case 119:a=this.unserialize();c=this.resolver.resolveEnum(a);if(null==c)throw J.thrown("Enum not found "+a);b=this.unserializeEnum(c,this.unserialize());
this.cache.push(b);return b;case 120:throw J.thrown(this.unserialize());case 121:a=this.readDigits();if(58!=this.buf.charCodeAt(this.pos++)||this.length-this.pos<a)throw J.thrown("Invalid string length");b=y.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 J.thrown("Invalid char "+this.buf.charAt(this.pos)+" at position "+this.pos);},__class__:Pd};var zh=function(){};h["haxe._Unserializer.NullResolver"]=
zh;zh.__name__="haxe._Unserializer.NullResolver";zh.instance=null;zh.prototype={resolveClass:function(a){return null},resolveEnum:function(a){return null},__class__:zh};var fj=function(a,b,c){J.call(this,String(a),b,c);this.value=a;this.__skipStack++};h["haxe.ValueException"]=fj;fj.__name__="haxe.ValueException";fj.__super__=J;fj.prototype=x(J.prototype,{value:null,unwrap:function(){return this.value},__class__:fj});var gi=function(){this.a1=1;this.a2=0};h["haxe.crypto.Adler32"]=gi;gi.__name__="haxe.crypto.Adler32";
gi.read=function(a){var b=new gi,c=a.readByte(),d=a.readByte(),f=a.readByte();a=a.readByte();b.a1=f<<8|a;b.a2=c<<8|d;return b};gi.prototype={a1:null,a2:null,update:function(a,b,c){var d=this.a1,f=this.a2,g=b;for(b+=c;g<b;)c=g++,d=(d+a.b[c])%65521,f=(f+d)%65521;this.a1=d;this.a2=f},equals:function(a){return a.a1==this.a1?a.a2==this.a2:!1},__class__:gi};var Ug=function(){};h["haxe.crypto.Base64"]=Ug;Ug.__name__="haxe.crypto.Base64";Ug.decode=function(a,b){null==b&&(b=!0);if(b)for(;61==y.cca(a,a.length-
1);)a=y.substr(a,0,-1);return(new an(Ug.BYTES)).decodeBytes(bb.ofString(a))};var an=function(a){for(var b=a.length,c=1;b>1<<c;)++c;if(8<c||b!=1<<c)throw J.thrown("BaseCode : base length must be a power of two.");this.base=a;this.nbits=c};h["haxe.crypto.BaseCode"]=an;an.__name__="haxe.crypto.BaseCode";an.prototype={base:null,nbits:null,tbl:null,initTable:function(){for(var a=[],b=0;256>b;){var c=b++;a[c]=-1}b=0;for(var d=this.base.length;b<d;)c=b++,a[this.base.b[c]]=c;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,f=new bb(new ArrayBuffer(d)),g=0,k=0,l=0,m=0;m<d;){for(;8>k;){k+=b;g<<=b;var z=c[a.b[l++]];if(-1==z)throw J.thrown("BaseCode : invalid encoded char");g|=z}k-=8;f.b[m++]=g>>k&255}return f},__class__:an};var pd=function(){};h["haxe.ds.ArraySort"]=pd;pd.__name__="haxe.ds.ArraySort";pd.sort=function(a,b){pd.rec(a,b,0,a.length)};pd.rec=function(a,b,c,d){var f=c+d>>1;if(12>d-c){if(!(d<=c))for(f=c+1;f<d;)for(var g=f++;g>c;){if(0>
b(a[g],a[g-1]))pd.swap(a,g-1,g);else break;--g}}else pd.rec(a,b,c,f),pd.rec(a,b,f,d),pd.doMerge(a,b,c,f,d,f-c,d-f)};pd.doMerge=function(a,b,c,d,f,g,k){if(0!=g&&0!=k)if(2==g+k)0>b(a[d],a[c])&&pd.swap(a,d,c);else{if(g>k){var l=g>>1;var m=c+l;var z=pd.lower(a,b,d,f,m);var h=z-d}else h=k>>1,z=d+h,m=pd.upper(a,b,c,d,z),l=m-c;pd.rotate(a,b,m,d,z);d=m+h;pd.doMerge(a,b,c,m,d,l,h);pd.doMerge(a,b,d,z,f,g-l,k-h)}};pd.rotate=function(a,b,c,d,f){if(c!=d&&d!=f)for(b=pd.gcd(f-c,d-c);0!=b--;){for(var g=a[c+b],k=
d-c,l=c+b,m=c+b+k;m!=c+b;)a[l]=a[m],l=m,m=f-m>k?m+k:c+(k-(f-m));a[l]=g}};pd.gcd=function(a,b){for(;0!=b;){var c=a%b;a=b;b=c}return a};pd.upper=function(a,b,c,d,f){d-=c;for(var g,k;0<d;)g=d>>1,k=c+g,0>b(a[f],a[k])?d=g:(c=k+1,d=d-g-1);return c};pd.lower=function(a,b,c,d,f){d-=c;for(var g,k;0<d;)g=d>>1,k=c+g,0>b(a[k],a[f])?(c=k+1,d=d-g-1):d=g;return c};pd.swap=function(a,b,c){var d=a[b];a[b]=a[c];a[c]=d};var ug=function(){};h["haxe.ds.BalancedTree"]=ug;ug.__name__="haxe.ds.BalancedTree";ug.__interfaces__=
[ta];ug.iteratorLoop=function(a,b){null!=a&&(ug.iteratorLoop(a.left,b),b.push(a.value),ug.iteratorLoop(a.right,b))};ug.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){db.lastError=b;if("string"==typeof J.caught(b).unwrap())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=[];ug.iteratorLoop(this.root,a);return new Ld(a)},keyValueIterator:function(){return new Dg(this)},keys:function(){var a=[];this.keysLoop(this.root,a);return new Ld(a)},setLoop:function(a,b,c){if(null==c)return new re(null,a,b,null);var d=this.compare(a,c.key);if(0==d)return new re(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 J.thrown("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))},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 J.thrown("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 f=null==a?0:a._height,g=null==d?0:d._height;return f>g+2?(f=a.left,g=a.right,(null==f?0:f._height)>=(null==g?0:g._height)?new re(a.left,a.key,
a.value,new re(a.right,b,c,d)):new re(new re(a.left,a.key,a.value,a.right.left),a.right.key,a.right.value,new re(a.right.right,b,c,d))):g>f+2?(f=d.right,g=d.left,(null==f?0:f._height)>(null==g?0:g._height)?new re(new re(a,b,c,d.left),d.key,d.value,d.right):new re(new re(a,b,c,d.left.left),d.left.key,d.left.value,new re(d.left.right,d.key,d.value,d.right))):new re(a,b,c,d,(f>g?f:g)+1)},compare:function(a,b){return la.compare(a,b)},__class__:ug};var re=function(a,b,c,d,f){null==f&&(f=-1);this.left=
a;this.key=b;this.value=c;this.right=d;-1==f?(a=this.left,b=this.right,a=(null==a?0:a._height)>(null==b?0:b._height)?this.left:this.right,this._height=(null==a?0:a._height)+1):this._height=f};h["haxe.ds.TreeNode"]=re;re.__name__="haxe.ds.TreeNode";re.prototype={left:null,right:null,key:null,value:null,_height:null,__class__:re};var ng=function(){};h["haxe.ds.EnumValueMap"]=ng;ng.__name__="haxe.ds.EnumValueMap";ng.__interfaces__=[ta];ng.__super__=ug;ng.prototype=x(ug.prototype,{compare:function(a,
b){var c=a._hx_index-b._hx_index;if(0!=c)return c;a=w.enumParameters(a);b=w.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 f=c++;f=this.compareArg(a[f],b[f]);if(0!=f)return f}return 0},compareArg:function(a,b){return la.isEnumValue(a)&&la.isEnumValue(b)?this.compare(a,b):a instanceof Array&&b instanceof Array?this.compareArgs(a,b):la.compare(a,b)},__class__:ng});var rb=function(a,
b){this.elt=a;this.next=b};h["haxe.ds.GenericCell"]=rb;rb.__name__="haxe.ds.GenericCell";rb.prototype={elt:null,next:null,__class__:rb};var bn=function(){};h["haxe.ds.GenericStack"]=bn;bn.__name__="haxe.ds.GenericStack";bn.prototype={head:null,__class__:bn};var hc=function(){this.h={}};h["haxe.ds.IntMap"]=hc;hc.__name__="haxe.ds.IntMap";hc.__interfaces__=[ta];hc.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);return new Ld(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 Dg(this)},__class__:hc};var Ij=function(a,b){this.item=a;this.next=b};h["haxe.ds._List.ListNode"]=Ij;Ij.__name__="haxe.ds._List.ListNode";Ij.prototype={item:null,next:null,__class__:Ij};
var cm=function(a){this.head=a};h["haxe.ds._List.ListIterator"]=cm;cm.__name__="haxe.ds._List.ListIterator";cm.prototype={head:null,hasNext:function(){return null!=this.head},next:function(){var a=this.head.item;this.head=this.head.next;return a},__class__:cm};var Ba=function(){this.h=Object.create(null)};h["haxe.ds.StringMap"]=Ba;Ba.__name__="haxe.ds.StringMap";Ba.__interfaces__=[ta];Ba.stringify=function(a){var b="[",c=!0,d;for(d in a)c?c=!1:b+=",",b+=d+" => "+M.string(a[d]);return b+"]"};Ba.prototype=
{h:null,exists:function(a){return Object.prototype.hasOwnProperty.call(this.h,a)},get:function(a){return this.h[a]},set:function(a,b){this.h[a]=b},remove:function(a){return Object.prototype.hasOwnProperty.call(this.h,a)?(delete this.h[a],!0):!1},keys:function(){return new Sh(this.h)},iterator:function(){return new gj(this.h)},keyValueIterator:function(){return new cn(this.h)},__class__:Ba};var Sh=function(a){this.h=a;this.keys=Object.keys(a);this.length=this.keys.length;this.current=0};h["haxe.ds._StringMap.StringMapKeyIterator"]=
Sh;Sh.__name__="haxe.ds._StringMap.StringMapKeyIterator";Sh.prototype={h:null,keys:null,length:null,current:null,hasNext:function(){return this.current<this.length},next:function(){return this.keys[this.current++]},__class__:Sh};var gj=function(a){this.h=a;this.keys=Object.keys(a);this.length=this.keys.length;this.current=0};h["haxe.ds._StringMap.StringMapValueIterator"]=gj;gj.__name__="haxe.ds._StringMap.StringMapValueIterator";gj.prototype={h:null,keys:null,length:null,current:null,hasNext:function(){return this.current<
this.length},next:function(){return this.h[this.keys[this.current++]]},__class__:gj};var cn=function(a){this.h=a;this.keys=Object.keys(a);this.length=this.keys.length;this.current=0};h["haxe.ds._StringMap.StringMapKeyValueIterator"]=cn;cn.__name__="haxe.ds._StringMap.StringMapKeyValueIterator";cn.prototype={h:null,keys:null,length:null,current:null,hasNext:function(){return this.current<this.length},next:function(){var a=this.keys[this.current++];return{key:a,value:this.h[a]}},__class__:cn};var hi=
function(a,b,c){J.call(this,a,b);this.posInfos=null==c?{fileName:"(unknown)",lineNumber:0,className:"(unknown)",methodName:"(unknown)"}:c;this.__skipStack++};h["haxe.exceptions.PosException"]=hi;hi.__name__="haxe.exceptions.PosException";hi.__super__=J;hi.prototype=x(J.prototype,{posInfos:null,toString:function(){return""+J.prototype.toString.call(this)+" in "+this.posInfos.className+"."+this.posInfos.methodName+" at "+this.posInfos.fileName+":"+this.posInfos.lineNumber},__class__:hi});var hj=function(a,
b,c){null==a&&(a="Not implemented");hi.call(this,a,b,c);this.__skipStack++};h["haxe.exceptions.NotImplementedException"]=hj;hj.__name__="haxe.exceptions.NotImplementedException";hj.__super__=hi;hj.prototype=x(hi.prototype,{__class__:hj});var $h=function(){this.size=this.pos=0};h["haxe.io.BytesBuffer"]=$h;$h.__name__="haxe.io.BytesBuffer";$h.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 J.thrown(oe.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 bb(new ArrayBuffer(0));var a=new bb(this.buffer);a.length=this.pos;return a},__class__:$h};var Uk=function(){};h["haxe.io.Input"]=Uk;Uk.__name__="haxe.io.Input";Uk.prototype={bigEndian:null,readByte:function(){throw new hj(null,null,{fileName:"haxe/io/Input.hx",lineNumber:53,className:"haxe.io.Input",methodName:"readByte"});},readBytes:function(a,b,c){var d=
c,f=a.b;if(0>b||0>c||b+c>a.length)throw J.thrown(oe.OutsideBounds);try{for(;0<d;)f[b]=this.readByte(),++b,--d}catch(g){if(db.lastError=g,!(J.caught(g).unwrap()instanceof ij))throw g;}return c-d},set_bigEndian:function(a){return this.bigEndian=a},readFullBytes:function(a,b,c){for(;0<c;){var d=this.readBytes(a,b,c);if(0==d)throw J.thrown(oe.Blocked);b+=d;c-=d}},read:function(a){for(var b=new bb(new ArrayBuffer(a)),c=0;0<a;){var d=this.readBytes(b,c,a);if(0==d)throw J.thrown(oe.Blocked);c+=d;a-=d}return b},
readFloat:function(){return Yc.i32ToFloat(this.readInt32())},readDouble:function(){var a=this.readInt32(),b=this.readInt32();return this.bigEndian?Yc.i64ToDouble(b,a):Yc.i64ToDouble(a,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 bb(new ArrayBuffer(a));this.readFullBytes(c,0,a);return c.getString(0,a,b)},__class__:Uk,__properties__:{set_bigEndian:"set_bigEndian"}};var og=function(a,b,c){null==b&&(b=0);null==c&&(c=a.length-b);if(0>b||0>c||b+c>a.length)throw J.thrown(oe.OutsideBounds);this.b=a.b;this.pos=b;this.totlen=this.len=c};h["haxe.io.BytesInput"]=og;og.__name__="haxe.io.BytesInput";og.__super__=Uk;og.prototype=x(Uk.prototype,
{b:null,pos:null,len:null,totlen:null,readByte:function(){if(0==this.len)throw J.thrown(new ij);this.len--;return this.b[this.pos++]},readBytes:function(a,b,c){if(0>b||0>c||b+c>a.length)throw J.thrown(oe.OutsideBounds);if(0==this.len&&0<c)throw J.thrown(new ij);this.len<c&&(c=this.len);var d=this.b;a=a.b;for(var f=0,g=c;f<g;){var k=f++;a[b+k]=d[this.pos+k]}this.pos+=c;this.len-=c;return c},__class__:og});var Vk=function(){};h["haxe.io.Output"]=Vk;Vk.__name__="haxe.io.Output";Vk.prototype={bigEndian:null,
writeByte:function(a){throw new hj(null,null,{fileName:"haxe/io/Output.hx",lineNumber:47,className:"haxe.io.Output",methodName:"writeByte"});},writeBytes:function(a,b,c){if(0>b||0>c||b+c>a.length)throw J.thrown(oe.OutsideBounds);a=a.b;for(var d=c;0<d;)this.writeByte(a[b]),++b,--d;return c},set_bigEndian:function(a){return this.bigEndian=a},write:function(a){for(var b=a.length,c=0;0<b;){var d=this.writeBytes(a,c,b);if(0==d)throw J.thrown(oe.Blocked);c+=d;b-=d}},writeFullBytes:function(a,b,c){for(;0<
c;){var d=this.writeBytes(a,b,c);b+=d;c-=d}},writeDouble:function(a){a=Yc.doubleToI64(a);this.bigEndian?(this.writeInt32(a.high),this.writeInt32(a.low)):(this.writeInt32(a.low),this.writeInt32(a.high))},writeUInt16:function(a){if(0>a||65536<=a)throw J.thrown(oe.Overflow);this.bigEndian?(this.writeByte(a>>8),this.writeByte(a&255)):(this.writeByte(a&255),this.writeByte(a>>8))},writeInt32:function(a){this.bigEndian?(this.writeByte(a>>>24),this.writeByte(a>>16&255),this.writeByte(a>>8&255),this.writeByte(a&
255)):(this.writeByte(a&255),this.writeByte(a>>8&255),this.writeByte(a>>16&255),this.writeByte(a>>>24))},writeString:function(a,b){a=bb.ofString(a,b);this.writeFullBytes(a,0,a.length)},__class__:Vk,__properties__:{set_bigEndian:"set_bigEndian"}};var Yi=function(){this.b=new $h};h["haxe.io.BytesOutput"]=Yi;Yi.__name__="haxe.io.BytesOutput";Yi.__super__=Vk;Yi.prototype=x(Vk.prototype,{b:null,writeByte:function(a){this.b.addByte(a)},writeBytes:function(a,b,c){this.b.addBytes(a,b,c);return c},getBytes:function(){return this.b.getBytes()},
__class__:Yi});var dn=G["haxe.io.Encoding"]={__ename__:"haxe.io.Encoding",__constructs__:null,UTF8:{_hx_name:"UTF8",_hx_index:0,__enum__:"haxe.io.Encoding",toString:t},RawNative:{_hx_name:"RawNative",_hx_index:1,__enum__:"haxe.io.Encoding",toString:t}};dn.__constructs__=[dn.UTF8,dn.RawNative];var ij=function(){};h["haxe.io.Eof"]=ij;ij.__name__="haxe.io.Eof";ij.prototype={toString:function(){return"Eof"},__class__:ij};var oe=G["haxe.io.Error"]={__ename__:"haxe.io.Error",__constructs__:null,Blocked:{_hx_name:"Blocked",
_hx_index:0,__enum__:"haxe.io.Error",toString:t},Overflow:{_hx_name:"Overflow",_hx_index:1,__enum__:"haxe.io.Error",toString:t},OutsideBounds:{_hx_name:"OutsideBounds",_hx_index:2,__enum__:"haxe.io.Error",toString:t},Custom:(n=function(a){return{_hx_index:3,e:a,__enum__:"haxe.io.Error",toString:t}},n._hx_name="Custom",n.__params__=["e"],n)};oe.__constructs__=[oe.Blocked,oe.Overflow,oe.OutsideBounds,oe.Custom];var Yc=function(){};h["haxe.io.FPHelper"]=Yc;Yc.__name__="haxe.io.FPHelper";Yc.i32ToFloat=
function(a){Yc.helper.setInt32(0,a,!0);return Yc.helper.getFloat32(0,!0)};Yc.floatToI32=function(a){Yc.helper.setFloat32(0,a,!0);return Yc.helper.getInt32(0,!0)};Yc.i64ToDouble=function(a,b){Yc.helper.setInt32(0,a,!0);Yc.helper.setInt32(4,b,!0);return Yc.helper.getFloat64(0,!0)};Yc.doubleToI64=function(a){var b=Yc.i64tmp;Yc.helper.setFloat64(0,a,!0);b.low=Yc.helper.getInt32(0,!0);b.high=Yc.helper.getInt32(4,!0);return b};var gp={fromBytes:function(a,b,c){null==b&&(b=0);null==c&&(c=a.length-b>>2);
return new Float32Array(a.b.bufferValue,b,c)}},Vg=function(a){switch(a){case ".":case "..":this.dir=a;this.file="";return}var b=a.lastIndexOf("/"),c=a.lastIndexOf("\\");b<c?(this.dir=y.substr(a,0,c),a=y.substr(a,c+1,null),this.backslash=!0):c<b?(this.dir=y.substr(a,0,b),a=y.substr(a,b+1,null)):this.dir=null;b=a.lastIndexOf(".");-1!=b?(this.ext=y.substr(a,b+1,null),this.file=y.substr(a,0,b)):(this.ext=null,this.file=a)};h["haxe.io.Path"]=Vg;Vg.__name__="haxe.io.Path";Vg.directory=function(a){a=new Vg(a);
return null==a.dir?"":a.dir};Vg.prototype={dir:null,file:null,ext:null,backslash:null,__class__:Vg};var Ld=function(a){this.current=0;this.array=a};h["haxe.iterators.ArrayIterator"]=Ld;Ld.__name__="haxe.iterators.ArrayIterator";Ld.prototype={array:null,current:null,hasNext:function(){return this.current<this.array.length},next:function(){return this.array[this.current++]},__class__:Ld};var dm=function(a){this.current=0;this.array=a};h["haxe.iterators.ArrayKeyValueIterator"]=dm;dm.__name__="haxe.iterators.ArrayKeyValueIterator";
dm.prototype={current:null,array:null,hasNext:function(){return this.current<this.array.length},next:function(){return{value:this.array[this.current],key:this.current++}},__class__:dm};var co=function(a){this.access=a;this.keys=la.fields(a);this.index=0};h["haxe.iterators.DynamicAccessIterator"]=co;co.__name__="haxe.iterators.DynamicAccessIterator";co.prototype={access:null,keys:null,index:null,hasNext:function(){return this.index<this.keys.length},next:function(){return this.access[this.keys[this.index++]]},
__class__:co};var Dg=function(a){this.map=a;this.keys=a.keys()};h["haxe.iterators.MapKeyValueIterator"]=Dg;Dg.__name__="haxe.iterators.MapKeyValueIterator";Dg.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__:Dg};var Tf={resolve:function(a,b){if(a.nodeType==X.Document)throw J.thrown("Cannot access document attribute "+b);var c=a.get(b);if(null==c){if(a.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+
(null==a.nodeType?"null":Oa.toString(a.nodeType)));throw J.thrown(a.nodeName+" is missing attribute "+b);}return c}},Yj={resolve:function(a,b){if(a.nodeType==X.Document)throw J.thrown("Cannot access document attribute "+b);return a.exists(b)}},dp={resolve:function(a,b){var c=[];for(a=a.elementsNamed(b);a.hasNext();){b=a.next();if(b.nodeType!=X.Document&&b.nodeType!=X.Element)throw J.thrown("Invalid nodeType "+(null==b.nodeType?"null":Oa.toString(b.nodeType)));c.push(b)}return c}},Fd=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"]=Fd;Fd.__name__="haxe.xml.XmlParserException";Fd.prototype={message:null,lineNumber:null,positionAtLine:null,position:null,xml:null,toString:function(){return na.getClass(this).__name__+": "+this.message+" at line "+this.lineNumber+" char "+this.positionAtLine},__class__:Fd};
var Jg=function(){};h["haxe.xml.Parser"]=Jg;Jg.__name__="haxe.xml.Parser";Jg.parse=function(a,b){null==b&&(b=!1);var c=X.createDocument();Jg.doParse(a,b,0,c);return c};Jg.doParse=function(a,b,c,d){null==c&&(c=0);for(var f=null,g=1,k=1,l=null,m=0,z=0,h=0,p=new Wd,r=1,w=-1;c<a.length;){var u=a.charCodeAt(c);switch(g){case 0:switch(u){case 9:case 10:case 13:case 32:break;default:g=k;continue}break;case 1:if(60==u)g=0,k=2;else{m=c;g=13;continue}break;case 2:switch(u){case 33:if(91==a.charCodeAt(c+1)){c+=
2;if("CDATA["!=y.substr(a,c,6).toUpperCase())throw J.thrown(new Fd("Expected <![CDATA[",a,c));c+=5;g=17}else if(68==a.charCodeAt(c+1)||100==a.charCodeAt(c+1)){if("OCTYPE"!=y.substr(a,c+2,6).toUpperCase())throw J.thrown(new Fd("Expected <!DOCTYPE",a,c));c+=8;g=16}else{if(45!=a.charCodeAt(c+1)||45!=a.charCodeAt(c+2))throw J.thrown(new Fd("Expected \x3c!--",a,c));c+=2;g=15}m=c+1;break;case 47:if(null==d)throw J.thrown(new Fd("Expected node name",a,c));m=c+1;g=0;k=10;break;case 63:g=14;m=c;break;default:g=
3;m=c;continue}break;case 3:if(!(97<=u&&122>=u||65<=u&&90>=u||48<=u&&57>=u||58==u||46==u||95==u||45==u)){if(c==m)throw J.thrown(new Fd("Expected node name",a,c));f=X.createElement(y.substr(a,m,c-m));d.addChild(f);++z;g=0;k=4;continue}break;case 4:switch(u){case 47:g=11;break;case 62:g=9;break;default:g=5;m=c;continue}break;case 5:if(!(97<=u&&122>=u||65<=u&&90>=u||48<=u&&57>=u||58==u||46==u||95==u||45==u)){if(m==c)throw J.thrown(new Fd("Expected attribute name",a,c));l=y.substr(a,m,c-m);if(f.exists(l))throw J.thrown(new Fd("Duplicate attribute ["+
l+"]",a,c));g=0;k=6;continue}break;case 6:if(61==u)g=0,k=7;else throw J.thrown(new Fd("Expected =",a,c));break;case 7:switch(u){case 34:case 39:p=new Wd;g=8;m=c+1;w=u;break;default:throw J.thrown(new Fd('Expected "',a,c));}break;case 8:switch(u){case 38:r=c-m;p.b+=null==r?y.substr(a,m,null):y.substr(a,m,r);g=18;r=8;m=c+1;break;case 60:case 62:if(b)throw J.thrown(new Fd("Invalid unescaped "+String.fromCodePoint(u)+" in attribute value",a,c));u==w&&(k=c-m,p.b+=null==k?y.substr(a,m,null):y.substr(a,
m,k),k=p.b,p=new Wd,f.set(l,k),g=0,k=4);break;default:u==w&&(k=c-m,p.b+=null==k?y.substr(a,m,null):y.substr(a,m,k),k=p.b,p=new Wd,f.set(l,k),g=0,k=4)}break;case 9:m=c=Jg.doParse(a,b,c,f);g=1;break;case 10:if(!(97<=u&&122>=u||65<=u&&90>=u||48<=u&&57>=u||58==u||46==u||95==u||45==u)){if(m==c)throw J.thrown(new Fd("Expected node name",a,c));k=y.substr(a,m,c-m);if(null==d||0!=d.nodeType)throw J.thrown(new Fd("Unexpected </"+k+">, tag is not open",a,c));if(d.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+
(null==d.nodeType?"null":Oa.toString(d.nodeType)));if(k!=d.nodeName){if(d.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==d.nodeType?"null":Oa.toString(d.nodeType)));throw J.thrown(new Fd("Expected </"+d.nodeName+">",a,c));}g=0;k=12;continue}break;case 11:if(62==u)g=1;else throw J.thrown(new Fd("Expected >",a,c));break;case 12:if(62==u)return 0==z&&d.addChild(X.createPCData("")),c;throw J.thrown(new Fd("Expected >",a,c));case 13:60==u?(k=c-m,p.b+=null==k?y.substr(a,
m,null):y.substr(a,m,k),k=X.createPCData(p.b),p=new Wd,d.addChild(k),++z,g=0,k=2):38==u&&(r=c-m,p.b+=null==r?y.substr(a,m,null):y.substr(a,m,r),g=18,r=13,m=c+1);break;case 14:63==u&&62==a.charCodeAt(c+1)&&(++c,g=y.substr(a,m+1,c-m-2),d.addChild(X.createProcessingInstruction(g)),++z,g=1);break;case 15:45==u&&45==a.charCodeAt(c+1)&&62==a.charCodeAt(c+2)&&(d.addChild(X.createComment(y.substr(a,m,c-m))),++z,c+=2,g=1);break;case 16:91==u?++h:93==u?--h:62==u&&0==h&&(d.addChild(X.createDocType(y.substr(a,
m,c-m))),++z,g=1);break;case 17:93==u&&93==a.charCodeAt(c+1)&&62==a.charCodeAt(c+2)&&(g=X.createCData(y.substr(a,m,c-m)),d.addChild(g),++z,c+=2,g=1);break;case 18:if(59==u){m=y.substr(a,m,c-m);if(35==m.charCodeAt(0))m=120==m.charCodeAt(1)?M.parseInt("0"+y.substr(m,1,m.length-1)):M.parseInt(y.substr(m,1,m.length-1)),p.b+=String.fromCodePoint(m);else if(Object.prototype.hasOwnProperty.call(Jg.escapes.h,m))p.b+=M.string(Jg.escapes.h[m]);else{if(b)throw J.thrown(new Fd("Undefined entity: "+m,a,c));p.b+=
M.string("&"+m+";")}m=c+1;g=r}else if(!(97<=u&&122>=u||65<=u&&90>=u||48<=u&&57>=u||58==u||46==u||95==u||45==u)&&35!=u){if(b)throw J.thrown(new Fd("Invalid character in entity: "+String.fromCodePoint(u),a,c));p.b+=String.fromCodePoint(38);g=c-m;p.b+=null==g?y.substr(a,m,null):y.substr(a,m,g);--c;m=c+1;g=r}}++c}1==g&&(m=c,g=13);if(13==g){if(0==d.nodeType){if(d.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==d.nodeType?"null":Oa.toString(d.nodeType)));throw J.thrown(new Fd("Unclosed node <"+
d.nodeName+">",a,c));}if(c!=m||0==z)r=c-m,p.b+=null==r?y.substr(a,m,null):y.substr(a,m,r),d.addChild(X.createPCData(p.b));return c}if(!b&&18==g&&13==r)return p.b+=String.fromCodePoint(38),r=c-m,p.b+=null==r?y.substr(a,m,null):y.substr(a,m,r),d.addChild(X.createPCData(p.b)),c;throw J.thrown(new Fd("Unexpected end",a,c));};var Th=function(a){this.output=new Wd;this.pretty=a};h["haxe.xml.Printer"]=Th;Th.__name__="haxe.xml.Printer";Th.print=function(a,b){null==b&&(b=!1);b=new Th(b);b.writeNode(a,"");
return b.output.b};Th.prototype={output:null,pretty:null,writeNode:function(a,b){switch(a.nodeType){case 0:this.output.b+=M.string(b+"<");if(a.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));this.output.b+=M.string(a.nodeName);for(var c=a.attributes();c.hasNext();){var d=c.next();this.output.b+=M.string(" "+d+'="');d=O.htmlEscape(a.get(d),!0);this.output.b+=M.string(d);this.output.b+='"'}if(this.hasChildren(a)){this.output.b+=
">";this.pretty&&(this.output.b+="\n");if(a.nodeType!=X.Document&&a.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element or Document but found "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));c=0;for(d=a.children;c<d.length;){var f=d[c++];this.writeNode(f,this.pretty?b+"\t":b)}this.output.b+=M.string(b+"</");if(a.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element but found "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));this.output.b+=M.string(a.nodeName);
this.output.b+=">"}else this.output.b+="/>";this.pretty&&(this.output.b+="\n");break;case 1:if(a.nodeType==X.Document||a.nodeType==X.Element)throw J.thrown("Bad node type, unexpected "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));a=a.nodeValue;0!=a.length&&(d=b+O.htmlEscape(a),this.output.b+=M.string(d),this.pretty&&(this.output.b+="\n"));break;case 2:this.output.b+=M.string(b+"<![CDATA[");if(a.nodeType==X.Document||a.nodeType==X.Element)throw J.thrown("Bad node type, unexpected "+(null==a.nodeType?
"null":Oa.toString(a.nodeType)));this.output.b+=M.string(a.nodeValue);this.output.b+="]]\x3e";this.pretty&&(this.output.b+="\n");break;case 3:if(a.nodeType==X.Document||a.nodeType==X.Element)throw J.thrown("Bad node type, unexpected "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));a=a.nodeValue;a=a.replace(/[\n\r\t]+/g,"");this.output.b+=null==b?"null":""+b;d=O.trim("\x3c!--"+a+"--\x3e");this.output.b+=M.string(d);this.pretty&&(this.output.b+="\n");break;case 4:if(a.nodeType==X.Document||a.nodeType==
X.Element)throw J.thrown("Bad node type, unexpected "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));this.output.b+=M.string("<!DOCTYPE "+a.nodeValue+">");this.pretty&&(this.output.b+="\n");break;case 5:if(a.nodeType==X.Document||a.nodeType==X.Element)throw J.thrown("Bad node type, unexpected "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));this.output.b+=M.string("<?"+a.nodeValue+"?>");this.pretty&&(this.output.b+="\n");break;case 6:if(a.nodeType!=X.Document&&a.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element or Document but found "+
(null==a.nodeType?"null":Oa.toString(a.nodeType)));c=0;for(d=a.children;c<d.length;)f=d[c++],this.writeNode(f,b)}},hasChildren:function(a){if(a.nodeType!=X.Document&&a.nodeType!=X.Element)throw J.thrown("Bad node type, expected Element or Document but found "+(null==a.nodeType?"null":Oa.toString(a.nodeType)));var b=0;for(a=a.children;b<a.length;){var c=a[b++];switch(c.nodeType){case 0:case 1:return!0;case 2:case 3:if(c.nodeType==X.Document||c.nodeType==X.Element)throw J.thrown("Bad node type, unexpected "+
(null==c.nodeType?"null":Oa.toString(c.nodeType)));if(0!=O.ltrim(c.nodeValue).length)return!0}}return!1},__class__:Th};var ii=G["haxe.zip.ExtraField"]={__ename__:"haxe.zip.ExtraField",__constructs__:null,FUnknown:(n=function(a,b){return{_hx_index:0,tag:a,bytes:b,__enum__:"haxe.zip.ExtraField",toString:t}},n._hx_name="FUnknown",n.__params__=["tag","bytes"],n),FInfoZipUnicodePath:(n=function(a,b){return{_hx_index:1,name:a,crc:b,__enum__:"haxe.zip.ExtraField",toString:t}},n._hx_name="FInfoZipUnicodePath",
n.__params__=["name","crc"],n),FUtf8:{_hx_name:"FUtf8",_hx_index:2,__enum__:"haxe.zip.ExtraField",toString:t}};ii.__constructs__=[ii.FUnknown,ii.FInfoZipUnicodePath,ii.FUtf8];var Kf=G["haxe.zip.Huffman"]={__ename__:"haxe.zip.Huffman",__constructs__:null,Found:(n=function(a){return{_hx_index:0,i:a,__enum__:"haxe.zip.Huffman",toString:t}},n._hx_name="Found",n.__params__=["i"],n),NeedBit:(n=function(a,b){return{_hx_index:1,left:a,right:b,__enum__:"haxe.zip.Huffman",toString:t}},n._hx_name="NeedBit",
n.__params__=["left","right"],n),NeedBits:(n=function(a,b){return{_hx_index:2,n:a,table:b,__enum__:"haxe.zip.Huffman",toString:t}},n._hx_name="NeedBits",n.__params__=["n","table"],n)};Kf.__constructs__=[Kf.Found,Kf.NeedBit,Kf.NeedBits];var en=function(){};h["haxe.zip.HuffTools"]=en;en.__name__="haxe.zip.HuffTools";en.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 J.thrown("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,Kf.NeedBit(this.treeCompress(a.left),this.treeCompress(b));throw J.thrown("assert");}for(var c=[],d=0,f=1<<b;d<f;)d++,c.push(Kf.Found(-1));this.treeWalk(c,0,0,b,a);return Kf.NeedBits(b,c)},treeWalk:function(a,b,c,d,f){if(1==f._hx_index){var g=f.left,k=f.right;0<d?(this.treeWalk(a,b,c+1,d-1,g),this.treeWalk(a,b|1<<c,c+1,d-1,k)):a[b]=this.treeCompress(f)}else a[b]=this.treeCompress(f)},treeMake:function(a,
b,c,d){if(d>b)throw J.thrown("Invalid huffman");var f=c<<5|d;if(a.h.hasOwnProperty(f))return Kf.Found(a.h[f]);c<<=1;++d;return Kf.NeedBit(this.treeMake(a,b,c,d),this.treeMake(a,b,c|1,d))},make:function(a,b,c,d){if(1==c)return Kf.NeedBit(Kf.Found(0),Kf.Found(0));var f=[],g=[];if(32<d)throw J.thrown("Invalid huffman");for(var k=0,l=d;k<l;)k++,f.push(0),g.push(0);k=0;for(l=c;k<l;){var m=k++;m=a[m+b];if(m>=d)throw J.thrown("Invalid huffman");f[m]++}var z=0;k=1;for(l=d-1;k<l;)m=k++,z=z+f[m]<<1,g[m]=z;
f=new hc;k=0;for(l=c;k<l;)m=k++,c=a[m+b],0!=c&&(z=g[c-1],g[c-1]=z+1,f.h[z<<5|c]=m);return this.treeCompress(Kf.NeedBit(this.treeMake(f,d,0,1),this.treeMake(f,d,1,1)))},__class__:en};var fn=function(a){this.buffer=new bb(new ArrayBuffer(65536));this.pos=0;a&&(this.crc=new gi)};h["haxe.zip._InflateImpl.Window"]=fn;fn.__name__="haxe.zip._InflateImpl.Window";fn.prototype={buffer:null,pos:null,crc:null,slide:function(){null!=this.crc&&this.crc.update(this.buffer,0,32768);var a=new bb(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__:fn};var td=G["haxe.zip._InflateImpl.State"]=
{__ename__:"haxe.zip._InflateImpl.State",__constructs__:null,Head:{_hx_name:"Head",_hx_index:0,__enum__:"haxe.zip._InflateImpl.State",toString:t},Block:{_hx_name:"Block",_hx_index:1,__enum__:"haxe.zip._InflateImpl.State",toString:t},CData:{_hx_name:"CData",_hx_index:2,__enum__:"haxe.zip._InflateImpl.State",toString:t},Flat:{_hx_name:"Flat",_hx_index:3,__enum__:"haxe.zip._InflateImpl.State",toString:t},Crc:{_hx_name:"Crc",_hx_index:4,__enum__:"haxe.zip._InflateImpl.State",toString:t},Dist:{_hx_name:"Dist",
_hx_index:5,__enum__:"haxe.zip._InflateImpl.State",toString:t},DistOne:{_hx_name:"DistOne",_hx_index:6,__enum__:"haxe.zip._InflateImpl.State",toString:t},Done:{_hx_name:"Done",_hx_index:7,__enum__:"haxe.zip._InflateImpl.State",toString:t}};td.__constructs__=[td.Head,td.Block,td.CData,td.Flat,td.Crc,td.Dist,td.DistOne,td.Done];var Rd=function(a,b,c){null==c&&(c=!0);null==b&&(b=!0);this.isFinal=!1;this.htools=new en;this.huffman=this.buildFixedHuffman();this.huffdist=null;this.dist=this.len=0;this.state=
b?td.Head:td.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 fn(c)};h["haxe.zip.InflateImpl"]=Rd;Rd.__name__="haxe.zip.InflateImpl";Rd.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!=Rd.FIXED_HUFFMAN)return Rd.FIXED_HUFFMAN;for(var a=[],b=0;288>b;){var c=b++;a.push(143>=c?8:255>=c?9:279>=c?7:8)}Rd.FIXED_HUFFMAN=this.htools.make(a,0,288,10);return Rd.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:var b=
a.i;return b;case 1:return b=a.left,a=a.right,this.applyHuffman(this.getBit()?a:b);case 2:return b=a.n,this.applyHuffman(a.table[this.getBits(b)])}},inflateLengths:function(a,b){for(var c=0,d=0;c<b;){var f=this.applyHuffman(this.huffman);switch(f){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=f;a[c]=f;++c;break;case 16:f=c+3+this.getBits(2);if(f>b)throw J.thrown("Invalid data");for(;c<f;)a[c]=d,++c;break;case 17:c+=3+this.getBits(3);
if(c>b)throw J.thrown("Invalid data");break;case 18:c+=11+this.getBits(7);if(c>b)throw J.thrown("Invalid data");break;default:throw J.thrown("Invalid data");}}},inflateLoop:function(){switch(this.state._hx_index){case 0:var a=this.input.readByte();if(8!=(a&15))throw J.thrown("Invalid data");var b=this.input.readByte(),c=0!=(b&32);if(0!=((a<<8)+b)%31)throw J.thrown("Invalid data");if(c)throw J.thrown("Unsupported dictionary");this.state=td.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 J.thrown("Invalid data");this.state=td.Flat;a=this.inflateLoop();this.resetBits();return a;case 1:return this.huffman=this.buildFixedHuffman(),this.huffdist=null,this.state=td.CData,!0;case 2:a=this.getBits(5)+257;b=this.getBits(5)+1;var d=this.getBits(4)+4;c=0;for(var f=d;c<f;){var g=c++;this.lengths[Rd.CODE_LENGTHS_POS[g]]=this.getBits(3)}c=d;for(f=19;c<f;)g=c++,this.lengths[Rd.CODE_LENGTHS_POS[g]]=0;this.huffman=this.htools.make(this.lengths,
0,19,8);d=[];c=0;for(f=a+b;c<f;)c++,d.push(0);this.inflateLengths(d,a+b);this.huffdist=this.htools.make(d,a,b,16);this.huffman=this.htools.make(d,0,a,16);this.state=td.CData;return!0;default:throw J.thrown("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?td.Crc:td.Block;else{b-=257;a=Rd.LEN_EXTRA_BITS_TBL[b];if(-1==a)throw J.thrown("Invalid data");this.len=Rd.LEN_BASE_VAL_TBL[b]+this.getBits(a);b=null==this.huffdist?
this.getRevBits(5):this.applyHuffman(this.huffdist);a=Rd.DIST_EXTRA_BITS_TBL[b];if(-1==a)throw J.thrown("Invalid data");this.dist=Rd.DIST_BASE_VAL_TBL[b]+this.getBits(a);if(this.dist>this.window.available())throw J.thrown("Invalid data");this.state=1==this.dist?td.DistOne:td.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?td.Crc:td.Block),0<this.needed;case 4:a=this.window.checksum();
if(null==a)return this.state=td.Done,!0;b=gi.read(this.input);if(!a.equals(b))throw J.thrown("Invalid CRC");this.state=td.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=td.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=td.CData),0<this.needed;case 7:return!1}},__class__:Rd};
var jj=function(a){this.i=a};h["haxe.zip.Reader"]=jj;jj.__name__="haxe.zip.Reader";jj.readZip=function(a){return(new jj(a)).read()};jj.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 ib;0<a;){if(4>a)throw J.thrown("Invalid extra fields data");var c=this.i.readUInt16(),d=this.i.readUInt16();if(a<d)throw J.thrown("Invalid extra fields data");
if(28789==c){var f=this.i.readByte();if(1!=f){var g=new $h;g.addByte(f);g.add(this.i.read(d-1));b.add(ii.FUnknown(c,g.getBytes()))}else c=this.i.readInt32(),f=this.i.read(d-5).toString(),b.add(ii.FInfoZipUnicodePath(f,c))}else b.add(ii.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 J.thrown("Invalid Zip Data");a.readUInt16();b=a.readUInt16();var c=0!=(b&2048);if(0!=(b&63473))throw J.thrown("Unsupported flags "+
b);var d=a.readUInt16(),f=0!=d;if(f&&8!=d)throw J.thrown("Unsupported compression "+d);d=this.readZipDate();var g=a.readInt32(),k=a.readInt32(),l=a.readInt32(),m=a.readInt16(),z=a.readInt16();a=a.readString(m);z=this.readExtraFields(z);c&&z.push(ii.FUtf8);0!=(b&8)&&(g=null);return{fileName:a,fileSize:l,fileTime:d,compressed:f,dataSize:k,data:null,crc32:g,extraFields:z}},read:function(){for(var a=new ib,b=null;;){var c=this.readEntryHeader();if(null==c)break;if(null==c.crc32){if(c.compressed){null==
b&&(b=new bb(new ArrayBuffer(65536)));for(var d=new $h,f=new Rd(this.i,!1,!1);;){var g=f.readBytes(b,0,65536);d.addBytes(b,0,g);if(65536>g)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__:jj};var Oe=G["hscript.Const"]={__ename__:"hscript.Const",__constructs__:null,
CInt:(n=function(a){return{_hx_index:0,v:a,__enum__:"hscript.Const",toString:t}},n._hx_name="CInt",n.__params__=["v"],n),CFloat:(n=function(a){return{_hx_index:1,f:a,__enum__:"hscript.Const",toString:t}},n._hx_name="CFloat",n.__params__=["f"],n),CString:(n=function(a){return{_hx_index:2,s:a,__enum__:"hscript.Const",toString:t}},n._hx_name="CString",n.__params__=["s"],n)};Oe.__constructs__=[Oe.CInt,Oe.CFloat,Oe.CString];var ka=G["hscript.Expr"]={__ename__:"hscript.Expr",__constructs__:null,EConst:(n=
function(a){return{_hx_index:0,c:a,__enum__:"hscript.Expr",toString:t}},n._hx_name="EConst",n.__params__=["c"],n),EIdent:(n=function(a){return{_hx_index:1,v:a,__enum__:"hscript.Expr",toString:t}},n._hx_name="EIdent",n.__params__=["v"],n),EVar:(n=function(a,b,c){return{_hx_index:2,n:a,t:b,e:c,__enum__:"hscript.Expr",toString:t}},n._hx_name="EVar",n.__params__=["n","t","e"],n),EParent:(n=function(a){return{_hx_index:3,e:a,__enum__:"hscript.Expr",toString:t}},n._hx_name="EParent",n.__params__=["e"],
n),EBlock:(n=function(a){return{_hx_index:4,e:a,__enum__:"hscript.Expr",toString:t}},n._hx_name="EBlock",n.__params__=["e"],n),EField:(n=function(a,b){return{_hx_index:5,e:a,f:b,__enum__:"hscript.Expr",toString:t}},n._hx_name="EField",n.__params__=["e","f"],n),EBinop:(n=function(a,b,c){return{_hx_index:6,op:a,e1:b,e2:c,__enum__:"hscript.Expr",toString:t}},n._hx_name="EBinop",n.__params__=["op","e1","e2"],n),EUnop:(n=function(a,b,c){return{_hx_index:7,op:a,prefix:b,e:c,__enum__:"hscript.Expr",toString:t}},
n._hx_name="EUnop",n.__params__=["op","prefix","e"],n),ECall:(n=function(a,b){return{_hx_index:8,e:a,params:b,__enum__:"hscript.Expr",toString:t}},n._hx_name="ECall",n.__params__=["e","params"],n),EIf:(n=function(a,b,c){return{_hx_index:9,cond:a,e1:b,e2:c,__enum__:"hscript.Expr",toString:t}},n._hx_name="EIf",n.__params__=["cond","e1","e2"],n),EWhile:(n=function(a,b){return{_hx_index:10,cond:a,e:b,__enum__:"hscript.Expr",toString:t}},n._hx_name="EWhile",n.__params__=["cond","e"],n),EFor:(n=function(a,
b,c){return{_hx_index:11,v:a,it:b,e:c,__enum__:"hscript.Expr",toString:t}},n._hx_name="EFor",n.__params__=["v","it","e"],n),EBreak:{_hx_name:"EBreak",_hx_index:12,__enum__:"hscript.Expr",toString:t},EContinue:{_hx_name:"EContinue",_hx_index:13,__enum__:"hscript.Expr",toString:t},EFunction:(n=function(a,b,c,d){return{_hx_index:14,args:a,e:b,name:c,ret:d,__enum__:"hscript.Expr",toString:t}},n._hx_name="EFunction",n.__params__=["args","e","name","ret"],n),EReturn:(n=function(a){return{_hx_index:15,e:a,
__enum__:"hscript.Expr",toString:t}},n._hx_name="EReturn",n.__params__=["e"],n),EArray:(n=function(a,b){return{_hx_index:16,e:a,index:b,__enum__:"hscript.Expr",toString:t}},n._hx_name="EArray",n.__params__=["e","index"],n),EArrayDecl:(n=function(a){return{_hx_index:17,e:a,__enum__:"hscript.Expr",toString:t}},n._hx_name="EArrayDecl",n.__params__=["e"],n),ENew:(n=function(a,b){return{_hx_index:18,cl:a,params:b,__enum__:"hscript.Expr",toString:t}},n._hx_name="ENew",n.__params__=["cl","params"],n),EThrow:(n=
function(a){return{_hx_index:19,e:a,__enum__:"hscript.Expr",toString:t}},n._hx_name="EThrow",n.__params__=["e"],n),ETry:(n=function(a,b,c,d){return{_hx_index:20,e:a,v:b,t:c,ecatch:d,__enum__:"hscript.Expr",toString:t}},n._hx_name="ETry",n.__params__=["e","v","t","ecatch"],n),EObject:(n=function(a){return{_hx_index:21,fl:a,__enum__:"hscript.Expr",toString:t}},n._hx_name="EObject",n.__params__=["fl"],n),ETernary:(n=function(a,b,c){return{_hx_index:22,cond:a,e1:b,e2:c,__enum__:"hscript.Expr",toString:t}},
n._hx_name="ETernary",n.__params__=["cond","e1","e2"],n),ESwitch:(n=function(a,b,c){return{_hx_index:23,e:a,cases:b,defaultExpr:c,__enum__:"hscript.Expr",toString:t}},n._hx_name="ESwitch",n.__params__=["e","cases","defaultExpr"],n),EDoWhile:(n=function(a,b){return{_hx_index:24,cond:a,e:b,__enum__:"hscript.Expr",toString:t}},n._hx_name="EDoWhile",n.__params__=["cond","e"],n),EMeta:(n=function(a,b,c){return{_hx_index:25,name:a,args:b,e:c,__enum__:"hscript.Expr",toString:t}},n._hx_name="EMeta",n.__params__=
["name","args","e"],n),ECheckType:(n=function(a,b){return{_hx_index:26,e:a,t:b,__enum__:"hscript.Expr",toString:t}},n._hx_name="ECheckType",n.__params__=["e","t"],n)};ka.__constructs__=[ka.EConst,ka.EIdent,ka.EVar,ka.EParent,ka.EBlock,ka.EField,ka.EBinop,ka.EUnop,ka.ECall,ka.EIf,ka.EWhile,ka.EFor,ka.EBreak,ka.EContinue,ka.EFunction,ka.EReturn,ka.EArray,ka.EArrayDecl,ka.ENew,ka.EThrow,ka.ETry,ka.EObject,ka.ETernary,ka.ESwitch,ka.EDoWhile,ka.EMeta,ka.ECheckType];var ge=G["hscript.CType"]={__ename__:"hscript.CType",
__constructs__:null,CTPath:(n=function(a,b){return{_hx_index:0,path:a,params:b,__enum__:"hscript.CType",toString:t}},n._hx_name="CTPath",n.__params__=["path","params"],n),CTFun:(n=function(a,b){return{_hx_index:1,args:a,ret:b,__enum__:"hscript.CType",toString:t}},n._hx_name="CTFun",n.__params__=["args","ret"],n),CTAnon:(n=function(a){return{_hx_index:2,fields:a,__enum__:"hscript.CType",toString:t}},n._hx_name="CTAnon",n.__params__=["fields"],n),CTParent:(n=function(a){return{_hx_index:3,t:a,__enum__:"hscript.CType",
toString:t}},n._hx_name="CTParent",n.__params__=["t"],n),CTOpt:(n=function(a){return{_hx_index:4,t:a,__enum__:"hscript.CType",toString:t}},n._hx_name="CTOpt",n.__params__=["t"],n),CTNamed:(n=function(a,b){return{_hx_index:5,n:a,t:b,__enum__:"hscript.CType",toString:t}},n._hx_name="CTNamed",n.__params__=["n","t"],n)};ge.__constructs__=[ge.CTPath,ge.CTFun,ge.CTAnon,ge.CTParent,ge.CTOpt,ge.CTNamed];var gc=G["hscript.Error"]={__ename__:"hscript.Error",__constructs__:null,EInvalidChar:(n=function(a){return{_hx_index:0,
c:a,__enum__:"hscript.Error",toString:t}},n._hx_name="EInvalidChar",n.__params__=["c"],n),EUnexpected:(n=function(a){return{_hx_index:1,s:a,__enum__:"hscript.Error",toString:t}},n._hx_name="EUnexpected",n.__params__=["s"],n),EUnterminatedString:{_hx_name:"EUnterminatedString",_hx_index:2,__enum__:"hscript.Error",toString:t},EUnterminatedComment:{_hx_name:"EUnterminatedComment",_hx_index:3,__enum__:"hscript.Error",toString:t},EInvalidPreprocessor:(n=function(a){return{_hx_index:4,msg:a,__enum__:"hscript.Error",
toString:t}},n._hx_name="EInvalidPreprocessor",n.__params__=["msg"],n),EUnknownVariable:(n=function(a){return{_hx_index:5,v:a,__enum__:"hscript.Error",toString:t}},n._hx_name="EUnknownVariable",n.__params__=["v"],n),EInvalidIterator:(n=function(a){return{_hx_index:6,v:a,__enum__:"hscript.Error",toString:t}},n._hx_name="EInvalidIterator",n.__params__=["v"],n),EInvalidOp:(n=function(a){return{_hx_index:7,op:a,__enum__:"hscript.Error",toString:t}},n._hx_name="EInvalidOp",n.__params__=["op"],n),EInvalidAccess:(n=
function(a){return{_hx_index:8,f:a,__enum__:"hscript.Error",toString:t}},n._hx_name="EInvalidAccess",n.__params__=["f"],n),ECustom:(n=function(a){return{_hx_index:9,msg:a,__enum__:"hscript.Error",toString:t}},n._hx_name="ECustom",n.__params__=["msg"],n)};gc.__constructs__=[gc.EInvalidChar,gc.EUnexpected,gc.EUnterminatedString,gc.EUnterminatedComment,gc.EInvalidPreprocessor,gc.EUnknownVariable,gc.EInvalidIterator,gc.EInvalidOp,gc.EInvalidAccess,gc.ECustom];var Ah=G["hscript.ModuleDecl"]={__ename__:"hscript.ModuleDecl",
__constructs__:null,DPackage:(n=function(a){return{_hx_index:0,path:a,__enum__:"hscript.ModuleDecl",toString:t}},n._hx_name="DPackage",n.__params__=["path"],n),DImport:(n=function(a,b){return{_hx_index:1,path:a,everything:b,__enum__:"hscript.ModuleDecl",toString:t}},n._hx_name="DImport",n.__params__=["path","everything"],n),DClass:(n=function(a){return{_hx_index:2,c:a,__enum__:"hscript.ModuleDecl",toString:t}},n._hx_name="DClass",n.__params__=["c"],n),DTypedef:(n=function(a){return{_hx_index:3,c:a,
__enum__:"hscript.ModuleDecl",toString:t}},n._hx_name="DTypedef",n.__params__=["c"],n)};Ah.__constructs__=[Ah.DPackage,Ah.DImport,Ah.DClass,Ah.DTypedef];var Lf=G["hscript.FieldAccess"]={__ename__:"hscript.FieldAccess",__constructs__:null,APublic:{_hx_name:"APublic",_hx_index:0,__enum__:"hscript.FieldAccess",toString:t},APrivate:{_hx_name:"APrivate",_hx_index:1,__enum__:"hscript.FieldAccess",toString:t},AInline:{_hx_name:"AInline",_hx_index:2,__enum__:"hscript.FieldAccess",toString:t},AOverride:{_hx_name:"AOverride",
_hx_index:3,__enum__:"hscript.FieldAccess",toString:t},AStatic:{_hx_name:"AStatic",_hx_index:4,__enum__:"hscript.FieldAccess",toString:t},AMacro:{_hx_name:"AMacro",_hx_index:5,__enum__:"hscript.FieldAccess",toString:t}};Lf.__constructs__=[Lf.APublic,Lf.APrivate,Lf.AInline,Lf.AOverride,Lf.AStatic,Lf.AMacro];var gn=G["hscript.FieldKind"]={__ename__:"hscript.FieldKind",__constructs__:null,KFunction:(n=function(a){return{_hx_index:0,f:a,__enum__:"hscript.FieldKind",toString:t}},n._hx_name="KFunction",
n.__params__=["f"],n),KVar:(n=function(a){return{_hx_index:1,v:a,__enum__:"hscript.FieldKind",toString:t}},n._hx_name="KVar",n.__params__=["v"],n)};gn.__constructs__=[gn.KFunction,gn.KVar];var Ff=G["hscript._Interp.Stop"]={__ename__:"hscript._Interp.Stop",__constructs__:null,SBreak:{_hx_name:"SBreak",_hx_index:0,__enum__:"hscript._Interp.Stop",toString:t},SContinue:{_hx_name:"SContinue",_hx_index:1,__enum__:"hscript._Interp.Stop",toString:t},SReturn:{_hx_name:"SReturn",_hx_index:2,__enum__:"hscript._Interp.Stop",
toString:t}};Ff.__constructs__=[Ff.SBreak,Ff.SContinue,Ff.SReturn];var pa=G["hscript.Token"]={__ename__:"hscript.Token",__constructs__:null,TEof:{_hx_name:"TEof",_hx_index:0,__enum__:"hscript.Token",toString:t},TConst:(n=function(a){return{_hx_index:1,c:a,__enum__:"hscript.Token",toString:t}},n._hx_name="TConst",n.__params__=["c"],n),TId:(n=function(a){return{_hx_index:2,s:a,__enum__:"hscript.Token",toString:t}},n._hx_name="TId",n.__params__=["s"],n),TOp:(n=function(a){return{_hx_index:3,s:a,__enum__:"hscript.Token",
toString:t}},n._hx_name="TOp",n.__params__=["s"],n),TPOpen:{_hx_name:"TPOpen",_hx_index:4,__enum__:"hscript.Token",toString:t},TPClose:{_hx_name:"TPClose",_hx_index:5,__enum__:"hscript.Token",toString:t},TBrOpen:{_hx_name:"TBrOpen",_hx_index:6,__enum__:"hscript.Token",toString:t},TBrClose:{_hx_name:"TBrClose",_hx_index:7,__enum__:"hscript.Token",toString:t},TDot:{_hx_name:"TDot",_hx_index:8,__enum__:"hscript.Token",toString:t},TQuestionDot:{_hx_name:"TQuestionDot",_hx_index:9,__enum__:"hscript.Token",
toString:t},TComma:{_hx_name:"TComma",_hx_index:10,__enum__:"hscript.Token",toString:t},TSemicolon:{_hx_name:"TSemicolon",_hx_index:11,__enum__:"hscript.Token",toString:t},TBkOpen:{_hx_name:"TBkOpen",_hx_index:12,__enum__:"hscript.Token",toString:t},TBkClose:{_hx_name:"TBkClose",_hx_index:13,__enum__:"hscript.Token",toString:t},TQuestion:{_hx_name:"TQuestion",_hx_index:14,__enum__:"hscript.Token",toString:t},TDoubleDot:{_hx_name:"TDoubleDot",_hx_index:15,__enum__:"hscript.Token",toString:t},TMeta:(n=
function(a){return{_hx_index:16,s:a,__enum__:"hscript.Token",toString:t}},n._hx_name="TMeta",n.__params__=["s"],n),TPrepro:(n=function(a){return{_hx_index:17,s:a,__enum__:"hscript.Token",toString:t}},n._hx_name="TPrepro",n.__params__=["s"],n)};pa.__constructs__=[pa.TEof,pa.TConst,pa.TId,pa.TOp,pa.TPOpen,pa.TPClose,pa.TBrOpen,pa.TBrClose,pa.TDot,pa.TQuestionDot,pa.TComma,pa.TSemicolon,pa.TBkOpen,pa.TBkClose,pa.TQuestion,pa.TDoubleDot,pa.TMeta,pa.TPrepro];var di=function(){this.uid=0;this.preprocesorValues=
new Ba;this.line=1;this.opChars="+*/-=!><&|^%~";this.identChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_";var a=[["%"],["*","/"],["+","-"],["<<",">>",">>>"],["|","&","^"],"== != > < >= <=".split(" "),["..."],["&&"],["||"],"= += -= *= /= %= <<= >>= >>>= |= &= ^= =>".split(" "),["->"]];this.opPriority=new Ba;this.opRightAssoc=new Ba;for(var b=0,c=a.length;b<c;)for(var d=b++,f=0,g=a[d];f<g.length;){var k=g[f];++f;this.opPriority.h[k]=d;9==d&&(this.opRightAssoc.h[k]=!0)}k="!";
this.opPriority.h[k]="++"==k||"--"==k?-1:-2;k="++";this.opPriority.h[k]="++"==k||"--"==k?-1:-2;k="--";this.opPriority.h[k]="++"==k||"--"==k?-1:-2;k="~";this.opPriority.h[k]="++"==k||"--"==k?-1:-2};h["hscript.Parser"]=di;di.__name__="hscript.Parser";di.prototype={line:null,opChars:null,identChars:null,opPriority:null,opRightAssoc:null,preprocesorValues:null,allowJSON:null,allowTypes:null,allowMetadata:null,resumeErrors:null,input:null,readPos:null,offset:null,char:null,ops:null,idents:null,uid:null,
tokens:null,get_currentPos:function(){return this.readPos+this.offset},error:function(a,b,c){if(!this.resumeErrors)throw J.thrown(a);},invalidChar:function(a){if(!this.resumeErrors)throw J.thrown(gc.EInvalidChar(a));},initParser:function(a,b){this.preprocStack=[];this.tokens=new bn;this.offset=b;this.char=-1;this.ops=[];this.idents=[];a=this.uid=0;for(b=this.opChars.length;a<b;){var c=a++;this.ops[y.cca(this.opChars,c)]=!0}a=0;for(b=this.identChars.length;a<b;)c=a++,this.idents[y.cca(this.identChars,
c)]=!0},parseString:function(a,b,c){null==c&&(c=0);null==b&&(b="hscript");this.initParser(b,c);this.input=a;this.readPos=0;for(a=[];;){b=this.token();if(b==pa.TEof)break;c=this.tokens;c.head=new rb(b,c.head);this.parseFullExpr(a)}return 1==a.length?a[0]:ka.EBlock(a)},unexpected:function(a){a=gc.EUnexpected(this.tokenString(a));if(!this.resumeErrors)throw J.thrown(a);return null},push:function(a){var b=this.tokens;b.head=new rb(a,b.head)},ensure:function(a){var b=this.token();b!=a&&this.unexpected(b)},
ensureToken:function(a){var b=this.token();w.enumEq(b,a)||this.unexpected(b)},maybe:function(a){var b=this.token();if(w.enumEq(b,a))return!0;a=this.tokens;a.head=new rb(b,a.head);return!1},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){if(null==a||null==a)return!1;switch(a._hx_index){case 2:var b=
a.t,c=a.e;return null!=c?this.isBlock(c):null!=b?null==b?!1:2==b._hx_index?!0:!1:!1;case 4:return!0;case 6:return c=a.e2,this.isBlock(c);case 7:return b=a.prefix,c=a.e,b?!1:this.isBlock(c);case 9:return c=a.e1,a=a.e2,null!=a?this.isBlock(a):this.isBlock(c);case 10:return c=a.e,this.isBlock(c);case 11:return c=a.e,this.isBlock(c);case 14:return c=a.e,this.isBlock(c);case 15:return c=a.e,null!=c?this.isBlock(c):!1;case 20:return c=a.ecatch,this.isBlock(c);case 21:return!0;case 23:return!0;case 24:return c=
a.e,this.isBlock(c);case 25:return c=a.e,this.isBlock(c);default:return!1}},parseFullExpr:function(a){var b=this.parseExpr();a.push(b);for(var c=this.token();c==pa.TComma&&null!=b&&null!=b&&2==b._hx_index;)b=this.parseStructure("var"),a.push(b),c=this.token();c!=pa.TSemicolon&&c!=pa.TEof&&(this.isBlock(b)?(a=this.tokens,a.head=new rb(c,a.head)):this.unexpected(c))},parseObject:function(a){a=[];a:for(;;){var b=this.token(),c=null;if(null==b){this.unexpected(b);break}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);break a}b=this.token();b!=pa.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 10:break;default:this.unexpected(b)}}return this.parseExprNext(ka.EObject(a))},parseExpr:function(){var a=this.token();if(null==a)return this.unexpected(a);switch(a._hx_index){case 1:var b=
a.c;return this.parseExprNext(ka.EConst(b));case 2:var c=a.s;b=this.parseStructure(c);null==b&&(b=ka.EIdent(c));return this.parseExprNext(b);case 3:c=a.s;if("-"==c)if(b=this.parseExpr(),null!=b&&null!=b&&0==b._hx_index)switch(a=b.c,a._hx_index){case 0:return ka.EConst(Oe.CInt(-a.v));case 1:return ka.EConst(Oe.CFloat(-a.f));default:return this.makeUnop(c,b)}else return this.makeUnop(c,b);return 0>this.opPriority.h[c]?this.makeUnop(c,this.parseExpr()):this.unexpected(a);case 4:a=this.token();if(a==
pa.TPClose)return c=this.token(),w.enumEq(c,pa.TOp("->"))||this.unexpected(c),a=this.parseExpr(),ka.EFunction([],ka.EReturn(a));c=this.tokens;c.head=new rb(a,c.head);b=this.parseExpr();a=this.token();if(null!=a)switch(a._hx_index){case 5:return this.parseExprNext(ka.EParent(b));case 10:if(null!=b&&1==b._hx_index)return a=b.v,this.parseLambda([{name:a}],0);break;case 15:if(c=this.parseType(),a=this.token(),null!=a)switch(a._hx_index){case 5:return this.parseExprNext(ka.ECheckType(b,c));case 10:if(null!=
b&&1==b._hx_index)return a=b.v,this.parseLambda([{name:a,t:c}],0)}}return this.unexpected(a);case 6:a=this.token();if(null==a)c=this.tokens,c.head=new rb(a,c.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 rb(b,c.head),c=this.tokens,c.head=new rb(a,c.head),null!=b&&15==b._hx_index)return this.parseExprNext(this.parseObject(0))}else c=this.tokens,c.head=new rb(a,c.head);else c=this.tokens,c.head=new rb(a,c.head);break;case 2:b=
this.token();c=this.tokens;c.head=new rb(b,c.head);c=this.tokens;c.head=new rb(a,c.head);if(null!=b&&15==b._hx_index)return this.parseExprNext(this.parseObject(0));break;case 7:return this.parseExprNext(ka.EObject([]));default:c=this.tokens,c.head=new rb(a,c.head)}for(b=[];;){this.parseFullExpr(b);a=this.token();if(a==pa.TBrClose||this.resumeErrors&&a==pa.TEof)break;c=this.tokens;c.head=new rb(a,c.head)}return ka.EBlock(b);case 12:b=[];for(a=this.token();a!=pa.TBkClose&&(!this.resumeErrors||a!=pa.TEof);)c=
this.tokens,c.head=new rb(a,c.head),b.push(this.parseExpr()),a=this.token(),a==pa.TComma&&(a=this.token());if(1==b.length&&null!=b[0]&&(a=b[0],null!=a))switch(a._hx_index){case 10:return a="__a_"+this.uid++,b=ka.EBlock([ka.EVar(a,null,ka.EArrayDecl([])),this.mapCompr(a,b[0]),ka.EIdent(a)]),this.parseExprNext(b);case 11:return a="__a_"+this.uid++,b=ka.EBlock([ka.EVar(a,null,ka.EArrayDecl([])),this.mapCompr(a,b[0]),ka.EIdent(a)]),this.parseExprNext(b);case 24:return a="__a_"+this.uid++,b=ka.EBlock([ka.EVar(a,
null,ka.EArrayDecl([])),this.mapCompr(a,b[0]),ka.EIdent(a)]),this.parseExprNext(b)}return this.parseExprNext(ka.EArrayDecl(b));case 16:return c=a.s,this.allowMetadata?(a=this.parseMetaArgs(),ka.EMeta(c,a,this.parseExpr())):this.unexpected(a);default:return this.unexpected(a)}},parseLambda:function(a,b){a:for(;;){b=this.getIdent();var c=this.maybe(pa.TDoubleDot)?this.parseType():null;a.push({name:b,t:c});b=this.token();if(null==b){this.unexpected(b);break}else switch(b._hx_index){case 5:break a;case 10:break;
default:this.unexpected(b);break a}}c=this.token();w.enumEq(c,pa.TOp("->"))||this.unexpected(c);b=this.parseExpr();return ka.EFunction(a,ka.EReturn(b))},parseMetaArgs:function(){var a=this.token();if(a!=pa.TPOpen){var b=this.tokens;b.head=new rb(a,b.head);return null}var c=[];a=this.token();if(a!=pa.TPClose)a:for(b=this.tokens,b.head=new rb(a,b.head);;)if(c.push(this.parseExpr()),a=this.token(),null==a)this.unexpected(a);else switch(a._hx_index){case 5:break a;case 10:break;default:this.unexpected(a)}return c},
mapCompr:function(a,b){if(null==b)return null;switch(b._hx_index){case 3:var c=b.e;a=ka.EParent(this.mapCompr(a,c));break;case 4:c=b.e;if(1==c.length){var d=c[0];a=ka.EBlock([this.mapCompr(a,d)])}else a=ka.ECall(ka.EField(ka.EIdent(a),"push"),[b]);break;case 9:var f=b.cond;d=b.e1;c=b.e2;a=null==c?ka.EIf(f,this.mapCompr(a,d),null):ka.ECall(ka.EField(ka.EIdent(a),"push"),[b]);break;case 10:f=b.cond;c=b.e;a=ka.EWhile(f,this.mapCompr(a,c));break;case 11:d=b.v;f=b.it;c=b.e;a=ka.EFor(d,f,this.mapCompr(a,
c));break;case 24:f=b.cond;c=b.e;a=ka.EDoWhile(f,this.mapCompr(a,c));break;default:a=ka.ECall(ka.EField(ka.EIdent(a),"push"),[b])}return a},makeUnop:function(a,b){if(null==b&&this.resumeErrors)return null;if(null==b)return ka.EUnop(a,!0,b);switch(b._hx_index){case 6:var c=b.e1,d=b.e2;return ka.EBinop(b.op,this.makeUnop(a,c),d);case 22:return c=b.cond,d=b.e1,b=b.e2,ka.ETernary(this.makeUnop(a,c),d,b);default:return ka.EUnop(a,!0,b)}},makeBinop:function(a,b,c){if(null==c&&this.resumeErrors||null==c)return ka.EBinop(a,
b,c);switch(c._hx_index){case 6:var d=c.op,f=c.e1,g=c.e2;return this.opPriority.h[a]<=this.opPriority.h[d]&&!Object.prototype.hasOwnProperty.call(this.opRightAssoc.h,a)?ka.EBinop(d,this.makeBinop(a,b,f),g):ka.EBinop(a,b,c);case 22:return f=c.cond,g=c.e1,d=c.e2,Object.prototype.hasOwnProperty.call(this.opRightAssoc.h,a)?ka.EBinop(a,b,c):ka.ETernary(this.makeBinop(a,b,f),g,d);default:return ka.EBinop(a,b,c)}},parseStructure:function(a){switch(a){case "break":return ka.EBreak;case "continue":return ka.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 ka.EDoWhile(b,a);case "else":return this.unexpected(pa.TId(a));case "for":var c=this.token();c!=pa.TPOpen&&this.unexpected(c);b=this.getIdent();c=this.token();w.enumEq(c,pa.TId("in"))||this.unexpected(c);var d=this.parseExpr();c=this.token();c!=pa.TPClose&&this.unexpected(c);a=this.parseExpr();return ka.EFor(b,d,a);case "function":return b=
this.token(),a=null,null==b?(d=this.tokens,d.head=new rb(b,d.head)):2==b._hx_index?a=b.s:(d=this.tokens,d.head=new rb(b,d.head)),b=this.parseFunctionDecl(),ka.EFunction(b.args,b.body,a,b.ret);case "if":c=this.token();c!=pa.TPOpen&&this.unexpected(c);a=this.parseExpr();c=this.token();c!=pa.TPClose&&this.unexpected(c);c=this.parseExpr();var f=null,g=!1;b=this.token();b==pa.TSemicolon&&(g=!0,b=this.token());w.enumEq(b,pa.TId("else"))?f=this.parseExpr():(d=this.tokens,d.head=new rb(b,d.head),g&&(d=this.tokens,
d.head=new rb(pa.TSemicolon,d.head)));return ka.EIf(a,c,f);case "inline":return this.maybe(pa.TId("function"))||this.unexpected(pa.TId("inline")),this.parseStructure("function");case "new":a=[];a.push(this.getIdent());a:for(;;)if(b=this.token(),null==b){this.unexpected(b);break}else switch(b._hx_index){case 4:break a;case 8:a.push(this.getIdent());break;default:this.unexpected(b);break a}b=this.parseExprList(pa.TPClose);return ka.ENew(a.join("."),b);case "return":return b=this.token(),d=this.tokens,
d.head=new rb(b,d.head),a=b==pa.TSemicolon?null:this.parseExpr(),ka.EReturn(a);case "switch":a=this.parseExpr();g=null;f=[];c=this.token();c!=pa.TBrOpen&&this.unexpected(c);a:for(;;)if(b=this.token(),null==b){this.unexpected(b);break}else switch(b._hx_index){case 2:switch(b.s){case "case":var k={values:[],expr:null};f.push(k);b:for(;;)if(c=this.parseExpr(),k.values.push(c),b=this.token(),null==b){this.unexpected(b);break}else switch(b._hx_index){case 10:break;case 15:break b;default:this.unexpected(b);
break b}c=[];b:for(;;)if(b=this.token(),d=this.tokens,d.head=new rb(b,d.head),null==b)this.parseFullExpr(c);else switch(b._hx_index){case 0:if(this.resumeErrors)break b;else this.parseFullExpr(c);break;case 2:switch(b.s){case "case":case "default":break b;default:this.parseFullExpr(c)}break;case 7:break b;default:this.parseFullExpr(c)}k.expr=1==c.length?c[0]:0==c.length?ka.EBlock([]):ka.EBlock(c);break;case "default":null!=g&&this.unexpected(b);c=this.token();c!=pa.TDoubleDot&&this.unexpected(c);
d=[];b:for(;;)if(b=this.token(),c=this.tokens,c.head=new rb(b,c.head),null==b)this.parseFullExpr(d);else switch(b._hx_index){case 0:if(this.resumeErrors)break b;else this.parseFullExpr(d);break;case 2:switch(b.s){case "case":case "default":break b;default:this.parseFullExpr(d)}break;case 7:break b;default:this.parseFullExpr(d)}g=1==d.length?d[0]:0==d.length?ka.EBlock([]):ka.EBlock(d);break;default:this.unexpected(b);break a}break;case 7:break a;default:this.unexpected(b);break a}return ka.ESwitch(a,
f,g);case "throw":return a=this.parseExpr(),ka.EThrow(a);case "try":return a=this.parseExpr(),c=this.token(),w.enumEq(c,pa.TId("catch"))||this.unexpected(c),c=this.token(),c!=pa.TPOpen&&this.unexpected(c),b=this.getIdent(),c=this.token(),c!=pa.TDoubleDot&&this.unexpected(c),c=null,this.allowTypes?c=this.parseType():(d=this.token(),w.enumEq(d,pa.TId("Dynamic"))||this.unexpected(d)),d=this.token(),d!=pa.TPClose&&this.unexpected(d),d=this.parseExpr(),ka.ETry(a,b,c,d);case "var":return f=this.getIdent(),
b=this.token(),c=null,b==pa.TDoubleDot&&this.allowTypes&&(c=this.parseType(),b=this.token()),a=null,w.enumEq(b,pa.TOp("="))?a=this.parseExpr():(d=this.tokens,d.head=new rb(b,d.head)),ka.EVar(f,c,a);case "while":return b=this.parseExpr(),a=this.parseExpr(),ka.EWhile(b,a);default:return null}},parseExprNext:function(a){var b=this.token();if(null==b){var c=this.tokens;c.head=new rb(b,c.head);return a}switch(b._hx_index){case 2:c=b.s;if("is"==c)return this.makeBinop(c,a,this.parseExpr());c=this.tokens;
c.head=new rb(b,c.head);return a;case 3:c=b.s;if("->"==c){switch(a._hx_index){case 1:return c=a.v,a=this.parseExpr(),ka.EFunction([{name:c}],ka.EReturn(a));case 3:var d=a.e;if(1==d._hx_index)return c=d.v,a=this.parseExpr(),ka.EFunction([{name:c}],ka.EReturn(a));break;case 26:if(d=a.e,1==d._hx_index)return c=d.v,b=a.t,a=this.parseExpr(),ka.EFunction([{name:c,t:b}],ka.EReturn(a))}this.unexpected(b)}return-1==this.opPriority.h[c]?(d=this.isBlock(a)?!0:3==a._hx_index?!0:!1)?(c=this.tokens,c.head=new rb(b,
c.head),a):this.parseExprNext(ka.EUnop(c,!1,a)):this.makeBinop(c,a,this.parseExpr());case 4:return this.parseExprNext(ka.ECall(a,this.parseExprList(pa.TPClose)));case 8:return b=this.getIdent(),this.parseExprNext(ka.EField(a,b));case 9:return b=this.getIdent(),d="__a_"+this.uid++,a=ka.EBlock([ka.EVar(d,null,a),ka.ETernary(ka.EBinop("==",ka.EIdent(d),ka.EIdent("null")),ka.EIdent("null"),ka.EField(ka.EIdent(d),b))]),this.parseExprNext(a);case 12:return c=this.parseExpr(),b=this.token(),b!=pa.TBkClose&&
this.unexpected(b),this.parseExprNext(ka.EArray(a,c));case 14:return c=this.parseExpr(),b=this.token(),b!=pa.TDoubleDot&&this.unexpected(b),b=this.parseExpr(),ka.ETernary(a,c,b);default:return c=this.tokens,c.head=new rb(b,c.head),a}},parseFunctionArgs:function(){var a=[],b=this.token();if(b!=pa.TPClose)for(var c=!1;!c;){var d=!1;null!=b&&14==b._hx_index&&(d=!0,b=this.token());if(null==b){this.unexpected(b);break}else if(2==b._hx_index)b=b.s;else{this.unexpected(b);break}b={name:b};a.push(b);d&&(b.opt=
!0);this.allowTypes&&(this.maybe(pa.TDoubleDot)&&(b.t=this.parseType()),this.maybe(pa.TOp("="))&&(b.value=this.parseExpr()));b=this.token();if(null==b)this.unexpected(b);else switch(b._hx_index){case 5:c=!0;break;case 10:b=this.token();break;default:this.unexpected(b)}}return a},parseFunctionDecl:function(){var a=this.token();a!=pa.TPOpen&&this.unexpected(a);a=this.parseFunctionArgs();var b=null;if(this.allowTypes){var c=this.token();if(c!=pa.TDoubleDot){var d=this.tokens;d.head=new rb(c,d.head)}else b=
this.parseType()}return{args:a,ret:b,body:this.parseExpr()}},parsePath:function(){for(var a=[this.getIdent()];;){var b=this.token();if(b!=pa.TDot){var c=this.tokens;c.head=new rb(b,c.head);break}a.push(this.getIdent())}return a},parseType:function(){var a=this,b=this.token();if(null==b)return this.unexpected(b);switch(b._hx_index){case 2:var c=this.tokens;c.head=new rb(b,c.head);var d=this.parsePath(),f=null;b=this.token();if(null==b)c=this.tokens,c.head=new rb(b,c.head);else if(3==b._hx_index){var g=
b.s;if("<"==g)a:for(f=[];;){f.push(this.parseType());b=this.token();if(null!=b)switch(b._hx_index){case 3:g=b.s;if(">"==g)break a;if(62==y.cca(g,0)){c=this.tokens;c.head=new rb(pa.TOp(y.substr(g,1,null)),c.head);break a}break;case 10:continue}this.unexpected(b);break}else c=this.tokens,c.head=new rb(b,c.head)}else c=this.tokens,c.head=new rb(b,c.head);return this.parseTypeNext(ge.CTPath(d,f));case 4:if(b=this.token(),d=this.token(),c=this.tokens,c.head=new rb(d,c.head),c=this.tokens,c.head=new rb(b,
c.head),c=function(b){var c=a.token();null==c?a.unexpected(c):3==c._hx_index?"->"!=c.s&&a.unexpected(c):a.unexpected(c);return ge.CTFun(b,a.parseType())},null==b){f=this.parseType();b=this.token();if(null==b)return this.unexpected(b);switch(b._hx_index){case 5:return this.parseTypeNext(ge.CTParent(f));case 10:b=[f];do b.push(this.parseType());while(this.maybe(pa.TComma));f=this.token();f!=pa.TPClose&&this.unexpected(f);return c(b);default:return this.unexpected(b)}}else switch(b._hx_index){case 2:b=
b.s;if(null!=d&&15==d._hx_index){b=[];d=0;for(f=this.parseFunctionArgs();d<f.length;){g=f[d];++d;var k=g.value;if(null!=k&&!this.resumeErrors)throw J.thrown(gc.ECustom("Default values not allowed in function types"));b.push(ge.CTNamed(g.name,g.opt?ge.CTOpt(g.t):g.t))}return c(b)}f=this.parseType();b=this.token();if(null==b)return this.unexpected(b);switch(b._hx_index){case 5:return this.parseTypeNext(ge.CTParent(f));case 10:b=[f];do b.push(this.parseType());while(this.maybe(pa.TComma));f=this.token();
f!=pa.TPClose&&this.unexpected(f);return c(b);default:return this.unexpected(b)}case 5:b=[];d=0;for(f=this.parseFunctionArgs();d<f.length;){g=f[d];++d;k=g.value;if(null!=k&&!this.resumeErrors)throw J.thrown(gc.ECustom("Default values not allowed in function types"));b.push(ge.CTNamed(g.name,g.opt?ge.CTOpt(g.t):g.t))}return c(b);default:f=this.parseType();b=this.token();if(null==b)return this.unexpected(b);switch(b._hx_index){case 5:return this.parseTypeNext(ge.CTParent(f));case 10:b=[f];do b.push(this.parseType());
while(this.maybe(pa.TComma));f=this.token();f!=pa.TPClose&&this.unexpected(f);return c(b);default:return this.unexpected(b)}}case 6:c=[];d=null;a:for(;;)if(b=this.token(),null==b){this.unexpected(b);break}else switch(b._hx_index){case 2:b=b.s;if("var"==b)b=this.getIdent(),f=this.token(),f!=pa.TDoubleDot&&this.unexpected(f),c.push({name:b,t:this.parseType(),meta:d}),d=null,b=this.token(),b!=pa.TSemicolon&&this.unexpected(b);else if(f=this.token(),f!=pa.TDoubleDot&&this.unexpected(f),c.push({name:b,
t:this.parseType(),meta:d}),b=this.token(),null==b)this.unexpected(b);else switch(b._hx_index){case 7:break a;case 10:break;default:this.unexpected(b)}break;case 7:break a;case 16:b=b.s;null==d&&(d=[]);d.push({name:b,params:this.parseMetaArgs()});break;default:this.unexpected(b);break a}return this.parseTypeNext(ge.CTAnon(c));default:return this.unexpected(b)}},parseTypeNext:function(a){var b=this.token();if(null==b){var c=this.tokens;c.head=new rb(b,c.head);return a}if(3==b._hx_index){if("->"!=b.s)return c=
this.tokens,c.head=new rb(b,c.head),a}else return c=this.tokens,c.head=new rb(b,c.head),a;b=this.parseType();return 1==b._hx_index?(b.args.unshift(a),b):ge.CTFun([a],b)},parseExprList:function(a){var b=[],c=this.token();if(c==a)return b;var d=this.tokens;for(d.head=new rb(c,d.head);;)if(b.push(this.parseExpr()),c=this.token(),null==c){if(c==a)break;this.unexpected(c);break}else if(10!=c._hx_index){if(c==a)break;this.unexpected(c);break}return b},parseModule:function(a,b,c){null==c&&(c=0);null==b&&
(b="hscript");this.initParser(b,c);this.input=a;this.readPos=0;this.allowMetadata=this.allowTypes=!0;for(a=[];;){b=this.token();if(b==pa.TEof)break;c=this.tokens;c.head=new rb(b,c.head);a.push(this.parseModuleDecl())}return a},parseMetadata:function(){for(var a=[];;){var b=this.token();if(null==b){var c=this.tokens;c.head=new rb(b,c.head);break}else if(16==b._hx_index)a.push({name:b.s,params:this.parseMetaArgs()});else{c=this.tokens;c.head=new rb(b,c.head);break}}return a},parseParams:function(){if(this.maybe(pa.TOp("<"))&&
!this.resumeErrors)throw J.thrown(gc.EInvalidOp("Unsupported class type parameters"));return{}},parseModuleDecl:function(){var a=this.parseMetadata(),b=this.getIdent(),c=!1,d=!1;a:for(;;){switch(b){case "extern":d=!0;break;case "private":c=!0;break;default:break a}b=this.getIdent()}switch(b){case "class":var f=this.getIdent(),g=this.parseParams(),k=null,l=[];a:for(;;)if(b=this.token(),null==b){var m=this.tokens;m.head=new rb(b,m.head);break}else if(2==b._hx_index)switch(b.s){case "extends":k=this.parseType();
break;case "implements":l.push(this.parseType());break;default:m=this.tokens;m.head=new rb(b,m.head);break a}else{m=this.tokens;m.head=new rb(b,m.head);break}m=[];b=this.token();for(b!=pa.TBrOpen&&this.unexpected(b);!this.maybe(pa.TBrClose);)m.push(this.parseField());return Ah.DClass({name:f,meta:a,params:g,extend:k,implement:l,fields:m,isPrivate:c,isExtern:d});case "import":a=[this.getIdent()];for(c=!1;;){b=this.token();if(b!=pa.TDot){m=this.tokens;m.head=new rb(b,m.head);break}b=this.token();if(null==
b)this.unexpected(b);else switch(b._hx_index){case 2:a.push(b.s);break;case 3:"*"==b.s?c=!0:this.unexpected(b);break;default:this.unexpected(b)}}b=this.token();b!=pa.TSemicolon&&this.unexpected(b);return Ah.DImport(a,c);case "package":return a=this.parsePath(),b=this.token(),b!=pa.TSemicolon&&this.unexpected(b),Ah.DPackage(a);case "typedef":return f=this.getIdent(),g=this.parseParams(),b=this.token(),w.enumEq(b,pa.TOp("="))||this.unexpected(b),b=this.parseType(),Ah.DTypedef({name:f,meta:a,params:g,
isPrivate:c,t:b});default:this.unexpected(pa.TId(b))}return null},parseField:function(){var a=this.parseMetadata(),b=[];a:for(;;){var c=this.getIdent();switch(c){case "function":c=this.getIdent();var d=this.parseFunctionDecl();return{name:c,meta:a,access:b,kind:gn.KFunction({args:d.args,expr:d.body,ret:d.ret})};case "inline":b.push(Lf.AInline);break;case "macro":b.push(Lf.AMacro);break;case "override":b.push(Lf.AOverride);break;case "private":b.push(Lf.APrivate);break;case "public":b.push(Lf.APublic);
break;case "static":b.push(Lf.AStatic);break;case "var":c=this.getIdent();var f=d=null;if(this.maybe(pa.TPOpen)){d=this.getIdent();f=this.token();f!=pa.TComma&&this.unexpected(f);f=this.getIdent();var g=this.token();g!=pa.TPClose&&this.unexpected(g)}g=this.maybe(pa.TDoubleDot)?this.parseType():null;var k=this.maybe(pa.TOp("="))?this.parseExpr():null;if(null!=k)if(this.isBlock(k))this.maybe(pa.TSemicolon);else{var l=this.token();l!=pa.TSemicolon&&this.unexpected(l)}else null!=g&&(null==g?0:2==g._hx_index)?
this.maybe(pa.TSemicolon):(l=this.token(),l!=pa.TSemicolon&&this.unexpected(l));return{name:c,meta:a,access:b,kind:gn.KVar({get:d,set:f,type:g,expr:k})};default:this.unexpected(pa.TId(c));break a}}return null},readChar:function(){return this.input.charCodeAt(this.readPos++)},readString:function(a){for(var b,c="",d=!1,f=this.line;;){b=this.input.charCodeAt(this.readPos++);if(b!=b){this.line=f;if(!this.resumeErrors)throw J.thrown(gc.EUnterminatedString);break}if(d)switch(d=!1,b){case 47:this.allowJSON?
c+=String.fromCodePoint(b):this.invalidChar(b);break;case 34:case 39:case 92:c+=String.fromCodePoint(b);break;case 110:c+=String.fromCodePoint(10);break;case 114:c+=String.fromCodePoint(13);break;case 116:c+=String.fromCodePoint(9);break;case 117:this.allowJSON||this.invalidChar(b);for(var g=b=0;4>g;){g++;b<<=4;var k=this.input.charCodeAt(this.readPos++);switch(k){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:b+=k-48;break;case 65:case 66:case 67:case 68:case 69:case 70:b+=
k-55;break;case 97:case 98:case 99:case 100:case 101:case 102:b+=k-87;break;default:if(k!=k&&(this.line=f,!this.resumeErrors))throw J.thrown(gc.EUnterminatedString);this.invalidChar(k)}}c+=String.fromCodePoint(b);break;default:this.invalidChar(b)}else if(92==b)d=!0;else if(b==a)break;else 10==b&&this.line++,c+=String.fromCodePoint(b)}return c},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.input.charCodeAt(this.readPos++):
(a=this.char,this.char=-1);for(;;){if(a!=a)return this.char=a,pa.TEof;switch(a){case 0:return pa.TEof;case 10:this.line++;break;case 9:case 13:case 32:break;case 34:case 39:return pa.TConst(Oe.CString(this.readString(a)));case 35:a=this.input.charCodeAt(this.readPos++);if(this.idents[a])for(b=String.fromCodePoint(a);;){a=this.input.charCodeAt(this.readPos++);if(!this.idents[a])return this.char=a,this.preprocess(b);b+=String.fromCodePoint(a)}this.invalidChar(a);break;case 40:return pa.TPOpen;case 41:return pa.TPClose;
case 44:return pa.TComma;case 46:switch(a=this.input.charCodeAt(this.readPos++),a){case 46:return a=this.input.charCodeAt(this.readPos++),46!=a&&this.invalidChar(a),pa.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.input.charCodeAt(this.readPos++),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,pa.TConst(Oe.CFloat(b/c))}default:return this.char=
a,pa.TDot}case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:for(b=a-48,c=0;;)switch(a=this.input.charCodeAt(this.readPos++),c*=10,a){case 46:if(0<c){if(10==c&&46==this.input.charCodeAt(this.readPos++))return a=this.tokens,a.head=new rb(pa.TOp("..."),a.head),a=b|0,pa.TConst(a==b?Oe.CInt(a):Oe.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 69:case 101:var d=this.token(),f=
null;if(null==d){var g=this.tokens;g.head=new rb(d,g.head)}else switch(d._hx_index){case 1:g=d.c;0==g._hx_index?f=g.v:(g=this.tokens,g.head=new rb(d,g.head));break;case 3:"-"==d.s?(d=this.token(),null==d?(g=this.tokens,g.head=new rb(d,g.head)):1==d._hx_index?(g=d.c,0==g._hx_index?f=-g.v:(g=this.tokens,g.head=new rb(d,g.head))):(g=this.tokens,g.head=new rb(d,g.head))):(g=this.tokens,g.head=new rb(d,g.head));break;default:g=this.tokens,g.head=new rb(d,g.head)}null==f&&this.invalidChar(a);return pa.TConst(Oe.CFloat(Math.pow(10,
f)/c*b*10));case 120:for((0<b||0<c)&&this.invalidChar(a),b=0;;)switch(a=this.input.charCodeAt(this.readPos++),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,pa.TConst(Oe.CInt(b))}default:return this.char=a,a=b|0,pa.TConst(0<c?Oe.CFloat(10*b/c):a==b?Oe.CInt(a):Oe.CFloat(b))}case 58:return pa.TDoubleDot;
case 59:return pa.TSemicolon;case 61:a=this.input.charCodeAt(this.readPos++);if(61==a)return pa.TOp("==");if(62==a)return pa.TOp("=>");this.char=a;return pa.TOp("=");case 63:a=this.input.charCodeAt(this.readPos++);if(46==a)return pa.TQuestionDot;this.char=a;return pa.TQuestion;case 64:a=this.input.charCodeAt(this.readPos++);if(this.idents[a]||58==a)for(b=String.fromCodePoint(a);;){a=this.input.charCodeAt(this.readPos++);if(!this.idents[a])return this.char=a,pa.TMeta(b);b+=String.fromCodePoint(a)}this.invalidChar(a);
break;case 91:return pa.TBkOpen;case 93:return pa.TBkClose;case 123:return pa.TBrOpen;case 125:return pa.TBrClose;default:if(this.ops[a])for(b=String.fromCodePoint(a);;){a=this.input.charCodeAt(this.readPos++);a!=a&&(a=0);if(!this.ops[a])return this.char=a,pa.TOp(b);c=b;b+=String.fromCodePoint(a);if(!Object.prototype.hasOwnProperty.call(this.opPriority.h,b)&&Object.prototype.hasOwnProperty.call(this.opPriority.h,c)){if("//"==b||"/*"==b)return this.tokenComment(b,a);this.char=a;return pa.TOp(c)}}if(this.idents[a])for(b=
String.fromCodePoint(a);;){a=this.input.charCodeAt(this.readPos++);a!=a&&(a=0);if(!this.idents[a])return this.char=a,pa.TId(b);b+=String.fromCodePoint(a)}this.invalidChar(a)}a=this.input.charCodeAt(this.readPos++)}},preprocValue:function(a){return this.preprocesorValues.h[a]},preprocStack:null,parsePreproCond:function(){var a=this.token();if(null==a)return this.unexpected(a);switch(a._hx_index){case 2:return ka.EIdent(a.s);case 3:return"!"==a.s?ka.EUnop("!",!0,this.parsePreproCond()):this.unexpected(a);
case 4:return a=this.tokens,a.head=new rb(pa.TPOpen,a.head),this.parseExpr();default:return this.unexpected(a)}},evalPreproCond:function(a){switch(a._hx_index){case 1:return null!=this.preprocValue(a.v);case 3:var b=a.e;return this.evalPreproCond(b);case 6:b=a.e1;var c=a.e2;switch(a.op){case "&&":return a=c,this.evalPreproCond(b)?this.evalPreproCond(a):!1;case "||":return a=c,this.evalPreproCond(b)?!0:this.evalPreproCond(a);default:if(!this.resumeErrors)throw J.thrown(gc.EInvalidPreprocessor("Can't eval "+
G[a.__enum__].__constructs__[a._hx_index]._hx_name));return!1}case 7:if("!"==a.op)return b=a.e,!this.evalPreproCond(b);if(!this.resumeErrors)throw J.thrown(gc.EInvalidPreprocessor("Can't eval "+G[a.__enum__].__constructs__[a._hx_index]._hx_name));return!1;default:if(!this.resumeErrors)throw J.thrown(gc.EInvalidPreprocessor("Can't eval "+G[a.__enum__].__constructs__[a._hx_index]._hx_name));return!1}},preprocess:function(a){switch(a){case "else":case "elseif":if(0<this.preprocStack.length){if(this.preprocStack[this.preprocStack.length-
1].r)return this.preprocStack[this.preprocStack.length-1].r=!1,this.skipTokens(),this.token();if("else"==a)return this.preprocStack.pop(),this.preprocStack.push({r:!0}),this.token();this.preprocStack.pop();return this.preprocess("if")}return pa.TPrepro(a);case "end":return 0<this.preprocStack.length?(this.preprocStack.pop(),this.token()):pa.TPrepro(a);case "if":a=this.parsePreproCond();if(this.evalPreproCond(a))return this.preprocStack.push({r:!0}),this.token();this.preprocStack.push({r:!1});this.skipTokens();
return this.token();default:return pa.TPrepro(a)}},skipTokens:function(){for(var a=this.preprocStack.length-1,b=this.preprocStack[a];;){var c=this.token();if(c==pa.TEof&&!this.resumeErrors)throw J.thrown(gc.EInvalidPreprocessor("Unclosed"));if(this.preprocStack[a]!=b){a=this.tokens;a.head=new rb(c,a.head);break}}},tokenComment:function(a,b){var c=y.cca(a,1);if(47==c){for(;13!=b&&10!=b&&(b=this.input.charCodeAt(this.readPos++),b==b););this.char=b;return this.token()}if(42==c){c=this.line;if("/**/"==
a)return this.char=b,this.token();do{for(;42!=b;)if(10==b&&this.line++,b=this.input.charCodeAt(this.readPos++),b!=b){this.line=c;if(!this.resumeErrors)throw J.thrown(gc.EUnterminatedComment);break}b=this.input.charCodeAt(this.readPos++);if(b!=b){this.line=c;if(!this.resumeErrors)throw J.thrown(gc.EUnterminatedComment);break}}while(47!=b);return this.token()}this.char=b;return pa.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=a.s;case 3:return a=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":";case 16:return a=a.s,"@"+a;case 17:return a=a.s,"#"+a}},__class__:di,__properties__:{get_currentPos:"get_currentPos"}};
var Wk=function(){};h["hscript.Tools"]=Wk;Wk.__name__="hscript.Tools";Wk.iter=function(a,b){switch(a._hx_index){case 2:var c=a.e;null!=c&&b(c);break;case 3:c=a.e;b(c);break;case 4:var d=a.e;for(a=0;a<d.length;)c=d[a],++a,b(c);break;case 5:c=a.e;b(c);break;case 6:c=a.e1;a=a.e2;b(c);b(a);break;case 7:c=a.e;b(c);break;case 8:c=a.e;d=a.params;b(c);for(a=0;a<d.length;){var f=d[a];++a;b(f)}break;case 9:d=a.cond;c=a.e1;a=a.e2;b(d);b(c);null!=a&&b(a);break;case 10:d=a.cond;c=a.e;b(d);b(c);break;case 11:d=
a.it;c=a.e;b(d);b(c);break;case 14:c=a.e;b(c);break;case 15:c=a.e;null!=c&&b(c);break;case 16:c=a.e;a=a.index;b(c);b(a);break;case 17:d=a.e;for(a=0;a<d.length;)c=d[a],++a,b(c);break;case 18:d=a.params;for(a=0;a<d.length;)c=d[a],++a,b(c);break;case 19:c=a.e;b(c);break;case 20:c=a.e;d=a.ecatch;b(c);b(d);break;case 21:c=a.fl;for(a=0;a<c.length;)d=c[a],++a,b(d.e);break;case 22:d=a.cond;c=a.e1;a=a.e2;b(d);b(c);b(a);break;case 23:c=a.e;f=a.cases;var g=a.defaultExpr;b(c);for(a=0;a<f.length;){d=f[a];++a;
c=0;for(var k=d.values;c<k.length;){var l=k[c];++c;b(l)}b(d.expr)}null!=g&&b(g);break;case 24:d=a.cond;c=a.e;b(d);b(c);break;case 25:d=a.args;c=a.e;if(null!=d)for(a=0;a<d.length;)f=d[a],++a,b(f);b(c);break;case 26:c=a.e,b(c)}};Wk.map=function(a,b){switch(a._hx_index){case 0:var c=a;break;case 1:c=a;break;case 2:var d=a.t;c=a.e;c=ka.EVar(a.n,d,null!=c?b(c):null);break;case 3:c=a.e;c=ka.EParent(b(c));break;case 4:var f=a.e;a=[];for(d=0;d<f.length;)c=f[d],++d,a.push(b(c));c=ka.EBlock(a);break;case 5:c=
a.e;var g=a.f;c=ka.EField(b(c),g);break;case 6:d=a.op;c=a.e1;a=a.e2;c=ka.EBinop(d,b(c),b(a));break;case 7:d=a.op;g=a.prefix;c=a.e;c=ka.EUnop(d,g,b(c));break;case 8:c=a.e;f=a.params;g=b(c);a=[];for(d=0;d<f.length;){var k=f[d];++d;a.push(b(k))}c=ka.ECall(g,a);break;case 9:f=a.cond;c=a.e1;a=a.e2;c=ka.EIf(b(f),b(c),null!=a?b(a):null);break;case 10:f=a.cond;c=a.e;c=ka.EWhile(b(f),b(c));break;case 11:var l=a.v;d=a.it;c=a.e;c=ka.EFor(l,b(d),b(c));break;case 12:case 13:c=a;break;case 14:f=a.args;c=a.e;l=
a.name;d=a.ret;c=ka.EFunction(f,b(c),l,d);break;case 15:c=a.e;c=ka.EReturn(null!=c?b(c):null);break;case 16:c=a.e;a=a.index;c=ka.EArray(b(c),b(a));break;case 17:f=a.e;a=[];for(d=0;d<f.length;)c=f[d],++d,a.push(b(c));c=ka.EArrayDecl(a);break;case 18:g=a.cl;f=a.params;a=[];for(d=0;d<f.length;)c=f[d],++d,a.push(b(c));c=ka.ENew(g,a);break;case 19:c=a.e;c=ka.EThrow(b(c));break;case 20:c=a.e;l=a.v;d=a.t;f=a.ecatch;c=ka.ETry(b(c),l,d,b(f));break;case 21:c=a.fl;a=[];for(d=0;d<c.length;)g=c[d],++d,a.push({name:g.name,
e:b(g.e)});c=ka.EObject(a);break;case 22:f=a.cond;c=a.e1;a=a.e2;c=ka.ETernary(b(f),b(c),b(a));break;case 23:c=a.e;k=a.cases;var m=a.defaultExpr;g=b(c);a=[];for(d=0;d<k.length;){f=k[d];++d;c=[];for(var z=0,h=f.values;z<h.length;)l=h[z],++z,c.push(b(l));a.push({values:c,expr:b(f.expr)})}c=ka.ESwitch(g,a,null==m?null:b(m));break;case 24:f=a.cond;c=a.e;c=ka.EDoWhile(b(f),b(c));break;case 25:l=a.name;f=a.args;c=a.e;if(null==f)g=null;else{a=[];for(d=0;d<f.length;)k=f[d],++d,a.push(b(k));g=a}c=ka.EMeta(l,
g,b(c));break;case 26:c=a.e,d=a.t,c=ka.ECheckType(b(c),d)}return c};Wk.expr=function(a){return a};Wk.mk=function(a,b){return a};var If=function(){};h["js.Browser"]=If;If.__name__="js.Browser";If.__properties__={get_supported:"get_supported"};If.get_supported=function(){return"undefined"!=typeof window&&"undefined"!=typeof window.location?"string"==typeof window.location.protocol:!1};If.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 db.lastError=c,null}};var eo=function(){};h["js.html._CanvasElement.CanvasUtil"]=eo;eo.__name__="js.html._CanvasElement.CanvasUtil";eo.getContextWebGL=function(a,b){var c=a.getContext("webgl",b);if(null!=c)return c;c=a.getContext("experimental-webgl",b);return null!=c?c:null};var fo=function(){};h["js.lib._ArrayBuffer.ArrayBufferCompat"]=fo;fo.__name__="js.lib._ArrayBuffer.ArrayBufferCompat";fo.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 $l=function(){this.connected=!0;this.buttons=[];this.axes=[]};h["lime._internal.backend.html5.GameDeviceData"]=$l;$l.__name__="lime._internal.backend.html5.GameDeviceData";$l.prototype={connected:null,id:null,isGamepad:null,buttons:null,axes:null,__class__:$l};var hn=function(a){this.parent=a;this.id=-1;this.gain=1;this.position=new tc};h["lime._internal.backend.html5.HTML5AudioSource"]=hn;hn.__name__="lime._internal.backend.html5.HTML5AudioSource";
hn.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",q(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",q(this,this.howl_onEnd),this.id))},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",q(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},getPitch:function(){return this.parent.buffer.__srcHowl.rate()},setPitch:function(a){this.parent.buffer.__srcHowl.rate(a);return this.getPitch()},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&&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__:hn};var Sa=function(){this.validStatus0=(new E("Tizen","gi")).match(window.navigator.userAgent)};h["lime._internal.backend.html5.HTML5HTTPRequest"]=Sa;Sa.__name__="lime._internal.backend.html5.HTML5HTTPRequest";Sa.originElement=null;Sa.originHostname=null;Sa.originPort=null;Sa.originProtocol=null;Sa.supportsImageProgress=
null;Sa.loadImage=function(a){var b=new od;Sa.activeRequests<Sa.requestLimit?(Sa.activeRequests++,Sa.__loadImage(a,b,0)):Sa.requestQueue.add({instance:null,uri:a,promise:b,type:"IMAGE",options:0});return b.future};Sa.loadImageFromBytes=function(a,b){var c=URL.createObjectURL(new Blob([a.b.bufferValue],{type:b}));return null!=c?(a=new od,Sa.activeRequests<Sa.requestLimit?(Sa.activeRequests++,Sa.__loadImage(c,a,1)):Sa.requestQueue.add({instance:null,uri:c,promise:a,type:"IMAGE",options:1}),a.future):
Sa.loadImage("data:"+b+";base64,"+lf.encode(a))};Sa.processQueue=function(){if(Sa.activeRequests<Sa.requestLimit&&0<Sa.requestQueue.length){Sa.activeRequests++;var a=Sa.requestQueue.pop();switch(a.type){case "BINARY":a.instance.__loadData(a.uri,a.promise);break;case "IMAGE":Sa.__loadImage(a.uri,a.promise,a.options);break;case "TEXT":a.instance.__loadText(a.uri,a.promise);break;default:Sa.activeRequests--}}};Sa.__createBlobURIFromBytes=function(a,b){return URL.createObjectURL(new Blob([a.b.bufferValue],
{type:b}))};Sa.__fixHostname=function(a){return null==a?"":a};Sa.__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};Sa.__fixProtocol=function(a){return null==a||""==a?"http:":a};Sa.__isInMemoryURI=function(a){return O.startsWith(a,"data:")?!0:O.startsWith(a,"blob:")};Sa.__isSameOrigin=function(a){if(null==a||""==a||Sa.__isInMemoryURI(a))return!0;
null==Sa.originElement&&(Sa.originElement=window.document.createElement("a"),Sa.originHostname=Sa.__fixHostname(B.location.hostname),Sa.originProtocol=Sa.__fixProtocol(B.location.protocol),Sa.originPort=Sa.__fixPort(B.location.port,Sa.originProtocol));var b=Sa.originElement;b.href=a;""==b.hostname&&(b.href=b.href);var c=Sa.__fixHostname(b.hostname);a=Sa.__fixProtocol(b.protocol);b=Sa.__fixPort(b.port,a);c=""==c||c==Sa.originHostname;b=""==b||b==Sa.originPort;return"file:"!=a&&c?b:!1};Sa.__loadImage=
function(a,b,c){var d=new window.Image;Sa.__isSameOrigin(a)||(d.crossOrigin="Anonymous");null==Sa.supportsImageProgress&&(Sa.supportsImageProgress="onprogress"in d);if(Sa.supportsImageProgress||Sa.__isInMemoryURI(a))d.addEventListener("load",function(f){Sa.__revokeBlobURI(a,c);f=new mf(null,d.width,d.height);f.__srcImage=d;Sa.activeRequests--;Sa.processQueue();b.complete(new Eb(f))},!1),d.addEventListener("progress",function(a){b.progress(a.loaded,a.total)},!1),d.addEventListener("error",function(d){Sa.__revokeBlobURI(a,
c);Sa.activeRequests--;Sa.processQueue();b.error(new ji(d.detail,null))},!1),d.src=a;else{var f=new XMLHttpRequest;f.onload=function(a){Sa.activeRequests--;Sa.processQueue();(new Eb).__fromBytes(bb.ofData(f.response),function(a){b.complete(a)})};f.onerror=function(a){b.error(new ji(a.message,null))};f.onprogress=function(a){a.lengthComputable&&b.progress(a.loaded,a.total)};f.open("GET",a,!0);f.responseType="arraybuffer";f.overrideMimeType("text/plain; charset=x-user-defined");f.send(null)}};Sa.__revokeBlobURI=
function(a,b){0!=(b&1)&&URL.revokeObjectURL(a)};Sa.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){c=Object.keys(this.parent.formData.h);for(var d=
c.length,f=0;f<d;){var g=c[f++];0<b.length&&(b+="&");var k=this.parent.formData.h[g];if(-1<g.indexOf("[]")&&k instanceof Array){var l=[];for(k=P(k);k.hasNext();){var m=k.next();l.push(encodeURIComponent(m))}l=l.join("&amp;"+g+"=");b+=encodeURIComponent(g)+"="+l}else l=encodeURIComponent(g)+"=",g=M.string(k),b+=l+encodeURIComponent(g)}"GET"==this.parent.method&&""!=b&&(a=-1<a.indexOf("?")?a+("&"+b):a+("?"+b),b="")}this.request.open(M.string(this.parent.method),a,!0);0<this.parent.timeout&&(this.request.timeout=
this.parent.timeout);this.binary&&(this.request.responseType="arraybuffer");a=null;l=0;for(c=this.parent.headers;l<c.length;)d=c[l],++l,"Content-Type"==d.name?a=d.value:this.request.setRequestHeader(d.name,d.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 od;Sa.activeRequests<Sa.requestLimit?(Sa.activeRequests++,this.__loadData(a,b)):Sa.requestQueue.add({instance:this,uri:a,promise:b,type:"BINARY",options:0});return b.future},loadText:function(a){var b=new od;Sa.activeRequests<Sa.requestLimit?(Sa.activeRequests++,this.__loadText(a,b)):Sa.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=O.trim(y.substr(b,0,b.indexOf(":"))),b=O.trim(y.substr(b,b.indexOf(":")+1,null)),""!=a&&this.parent.responseHeaders.push(new Xk(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&&
(a=null,""==c.request.responseType?null!=c.request.responseText&&(a=bb.ofString(c.request.responseText)):null!=c.request.response&&(a=bb.ofData(c.request.response)),null!=c.request.status&&(200<=c.request.status&&400>c.request.status||c.validStatus0&&0==c.request.status)?(c.processResponse(),b.complete(a)):(c.processResponse(),b.error(new ji(c.request.status,a))),c.request=null,Sa.activeRequests--,Sa.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(new ji(c.request.status,c.request.responseText))),c.request=null,Sa.activeRequests--,Sa.processQueue())})},__class__:Sa};var ki=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_Dynamic_Void"]=ki;ki.__name__=
"lime.app._Event_Dynamic_Void";ki.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__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__:ki};var Bh={skip:function(a){return null!=a&&a instanceof Object&&1!=la.field(a,"__skipPrototype__")?null!=a.byteLength&&null!=a.byteOffset&&null!=a.buffer?a.buffer instanceof ArrayBuffer:!1:!0},disablePreserveClasses:function(a){null!=a&&a instanceof Object&&1!=la.field(a,"__skipPrototype__")&&!(null!=a.byteLength&&null!=a.byteOffset&&null!=a.buffer&&a.buffer instanceof ArrayBuffer)&&(a.__skipPrototype__=!0)},preserveClasses:function(a){if(null!=a&&a instanceof Object&&1!=la.field(a,
"__skipPrototype__")&&!(null!=a.byteLength&&null!=a.byteOffset&&null!=a.buffer&&a.buffer instanceof ArrayBuffer)&&!Object.prototype.hasOwnProperty.call(a,"__prototype__")){if(!(a instanceof Array)){try{a.__prototype__=null!=a.__class__?a.__class__.__name__:null}catch(d){db.lastError=d;return}"function"==typeof a.toString&&la.deleteField(a,"toString")}var b=0;for(a=Object.values(a);b<a.length;){var c=a[b];++b;Bh.preserveClasses(c)}}},restoreClasses:function(a,b){null==b&&(b=2147483647*Math.random()|
0,la.field(a,"__restoreFlag__")==b&&++b);if(null!=a&&a instanceof Object&&1!=la.field(a,"__skipPrototype__")&&!(null!=a.byteLength&&null!=a.byteOffset&&null!=a.buffer&&a.buffer instanceof ArrayBuffer)&&la.field(a,"__restoreFlag__")!=b){try{a.__restoreFlag__=b}catch(f){db.lastError=f;return}if(null!=la.field(a,"__prototype__"))try{Object.setPrototypeOf(a,h[la.field(a,"__prototype__")].prototype)}catch(f){db.lastError=f}var c=0;for(a=Object.values(a);c<a.length;){var d=a[c];++c;Bh.restoreClasses(d,
b)}}}},jn={__properties__:{get_portable:"get_portable"},toFunction:function(a){if(null!=a.func)return a.func;if(null!=a.classPath&&null!=a.functionName)return a.func=h[a.classPath][a.functionName],a.func;if(null!=a.sourceCode)return a.func=(new Function("return "+a.sourceCode))(),a.func;throw J.thrown("Object is not a valid WorkFunction: "+M.string(a));},makePortable:function(a,b){if(null!=a.func){if(null!=a.classPath||null!=a.functionName){if((h[a.classPath]&&h[a.classPath][a.functionName])!=a.func)throw J.thrown("Could not make "+
a.functionName+" portable. Either "+a.functionName+" isn't static, or "+a.classPath+" is something other than a class.");a.func=null;return!0}a.sourceCode=a.func.toString();if(0>a.sourceCode.indexOf("[native code]"))return a.func=null,!0;a.sourceCode=null;throw J.thrown("Only static class functions can be made portable. Set -Dlime-warn-portability to see which line caused this.");}return null==a.func},get_portable:function(a){return null==a.func}},Ab=function(a,b){this.__href=a;null!=b&&(this.__worker=
b,this.__worker.onmessage=q(this,this.dispatchMessage),this.onMessage=new ki);Bh.disablePreserveClasses(this)};h["lime._internal.backend.html5.HTML5Thread"]=Ab;Ab.__name__="lime._internal.backend.html5.HTML5Thread";Ab.current=function(){return Ab.__current};Ab.create=function(a){var b=new URL(Ab.__current.__href);b.pathname=y.substr(b.pathname,0,b.pathname.lastIndexOf("/")+1)+F.current.meta.h.file+".js";0<b.hash.length&&(b.hash+="_");b.hash+=Ab.__workerCount;Ab.__workerCount++;jn.makePortable(a);
b=new Ab(b.href,new Worker(b.href));b.sendMessage(a);return b};Ab.zeroDelay=function(){return new Promise(function(a,b){B.setTimeout(a)})};Ab.returnMessage=function(a,b,c){null==c&&(c=!0);Ab.__isWorker&&(c&&Bh.preserveClasses(a),B.postMessage(a,b))};Ab.equals=function(a,b){return a.__href==b.__href};Ab.prototype={onMessage:null,__href:null,__worker:null,sendMessage:function(a,b,c){null==c&&(c=!0);null!=this.__worker?(c&&Bh.preserveClasses(a),this.__worker.postMessage(a,b)):Ab.__messages.add(a)},dispatchMessage:function(a){a=
a.data;Bh.restoreClasses(a);null!=this.onMessage&&this.onMessage.dispatch(a);Ab.__resolveMethods.isEmpty()?Ab.__messages.add(a):Ab.__resolveMethods.pop()(a)},destroy:function(){if(null!=this.__worker)this.__worker.terminate();else if(Ab.__isWorker)try{B.close()}catch(a){db.lastError=a}},isWorker:function(){return null==this.__worker?Ab.__isWorker:!0},__class__:Ab};var Ja=function(a){this.imeCompositionActive=!1;this.unusedTouchesPool=new ib;this.scale=1;this.currentTouches=new hc;this.parent=a;this.cursor=
dc.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=Ja.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 f=b[d];++d;c.addEventListener(f,q(this,this.handleMouseEvent),!0)}c.addEventListener("contextmenu",q(this,this.handleContextMenuEvent),!0);c.addEventListener("dragstart",q(this,this.handleDragEvent),!0);c.addEventListener("dragover",q(this,this.handleDragEvent),!0);c.addEventListener("drop",q(this,this.handleDragEvent),!0);c.addEventListener("touchstart",
q(this,this.handleTouchEvent),!0);c.addEventListener("touchmove",q(this,this.handleTouchEvent),!0);c.addEventListener("touchend",q(this,this.handleTouchEvent),!0);c.addEventListener("touchcancel",q(this,this.handleTouchEvent),!0);c.addEventListener("gamepadconnected",q(this,this.handleGamepadEvent),!0);c.addEventListener("gamepaddisconnected",q(this,this.handleGamepadEvent),!0)}this.createContext();"webgl"==a.context.type&&(this.canvas.addEventListener("webglcontextlost",q(this,this.handleContextEvent),
!1),this.canvas.addEventListener("webglcontextrestored",q(this,this.handleContextEvent),!1))};h["lime._internal.backend.html5.HTML5Window"]=Ja;Ja.__name__="lime._internal.backend.html5.HTML5Window";Ja.textArea=null;Ja.textInput=null;Ja.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,textInputRect:null,unusedTouchesPool:null,__focusPending:null,alert:function(a,b){null!=a&&window.alert(M.string(a))},close:function(){var a=this.parent.element;if(null!=a){null!=this.canvas?(a!=this.canvas&&a.removeChild(this.canvas),this.canvas=null):null!=this.div&&(a.removeChild(this.div),this.div=null);for(var b="mousedown mouseenter mouseleave mousemove mouseup wheel".split(" "),c=0;c<b.length;){var d=b[c];++c;a.removeEventListener(d,q(this,this.handleMouseEvent),
!0)}a.removeEventListener("contextmenu",q(this,this.handleContextMenuEvent),!0);a.removeEventListener("dragstart",q(this,this.handleDragEvent),!0);a.removeEventListener("dragover",q(this,this.handleDragEvent),!0);a.removeEventListener("drop",q(this,this.handleDragEvent),!0);a.removeEventListener("touchstart",q(this,this.handleTouchEvent),!0);a.removeEventListener("touchmove",q(this,this.handleTouchEvent),!0);a.removeEventListener("touchend",q(this,this.handleTouchEvent),!0);a.removeEventListener("touchcancel",
q(this,this.handleTouchEvent),!0);a.removeEventListener("gamepadconnected",q(this,this.handleGamepadEvent),!0);a.removeEventListener("gamepaddisconnected",q(this,this.handleGamepadEvent),!0)}this.parent.application.__removeWindow(this.parent)},createContext:function(){var a=new kn,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,f="opengl"==this.renderType||
"opengles"==this.renderType||"webgl"==this.renderType,g=!Object.prototype.hasOwnProperty.call(b,"version")||"1"!=b.version,k=!1;if(f||!d&&(!Object.prototype.hasOwnProperty.call(b,"hardware")||b.hardware)){d=Object.prototype.hasOwnProperty.call(b,"background")&&null==b.background;f=Object.prototype.hasOwnProperty.call(b,"colorDepth")?b.colorDepth:16;var l=Object.prototype.hasOwnProperty.call(b,"antialiasing")&&0<b.antialiasing,m=Object.prototype.hasOwnProperty.call(b,"depth")?b.depth:!0,z=Object.prototype.hasOwnProperty.call(b,
"stencil")&&b.stencil;b=Object.prototype.hasOwnProperty.call(b,"preserveDrawingBuffer")&&b.preserveDrawingBuffer;b={alpha:d||16<f,antialias:l,depth:m,premultipliedAlpha:!0,stencil:z,preserveDrawingBuffer:b,failIfMajorPerformanceCaveat:!1};d=["webgl","experimental-webgl"];g&&d.unshift("webgl2");for(g=0;g<d.length&&(f=d[g],++g,c=this.canvas.getContext(f,b),null!=c&&"webgl2"==f&&(k=!0),null==c););}null==c?(a.canvas2D=this.canvas.getContext("2d"),a.type="canvas",a.version=""):(a.webgl=ec.fromWebGL2RenderContext(c),
k&&(a.webgl2=c),null==r.context&&(r.context=c,r.type="webgl",r.version=k?2:1),a.type="webgl",a.version=k?"2":"1")}this.parent.context=a},focus:function(){},focusTextInput:function(){var a=this;this.__focusPending||(this.__focusPending=!0,Sc.delay(function(){a.__focusPending=!1;a.textInputEnabled&&Ja.textInput.focus()},20))},getCursor:function(){return this.cursor},getDisplay:function(){return Fa.getDisplay(0)},getDisplayMode:function(){return Fa.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},getOpacity: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){var b=Qc.get_text();null==b&&(b="");a.clipboardData.setData("text/plain",b);a.cancelable&&a.preventDefault()},handleDragEvent:function(a){switch(a.type){case "dragover":return a.preventDefault(),!1;case "dragstart":if("img"==na.__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){this.textInputEnabled&&(null==a.relatedTarget||this.isDescendent(a.relatedTarget))&&this.focusTextInput()},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 f=c++;window.document.removeEventListener(a[f],q(this,this.handleFullscreenEvent),
!1);window.document.removeEventListener(b[f],q(this,this.handleFullscreenEvent),!1)}}},handleGamepadEvent:function(a){switch(a.type){case "gamepadconnected":Fc.__connect(a.gamepad.index);"standard"==a.gamepad.mapping&&$c.__connect(a.gamepad.index);break;case "gamepaddisconnected":Fc.__disconnect(a.gamepad.index),$c.__disconnect(a.gamepad.index)}},handleInputEvent:function(a){this.imeCompositionActive||Ja.textInput.value==Ja.dummyCharacter||(a=O.replace(Ja.textInput.value,Ja.dummyCharacter,""),0<a.length&&
this.parent.onTextInput.dispatch(a),Ja.textInput.value=Ja.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",q(this,this.handleMouseEvent));this.parent.clickCount=a.detail;this.parent.onMouseDown.dispatch(c,b,a.button);this.parent.clickCount=0;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",
q(this,this.handleMouseEvent)),a.currentTarget==this.parent.element&&a.stopPropagation(),this.parent.clickCount=a.detail,this.parent.onMouseUp.dispatch(c,b,a.button),this.parent.clickCount=0,this.parent.onMouseUp.canceled&&a.cancelable&&a.preventDefault()}this.cacheMouseX=c;this.cacheMouseY=b}else{switch(a.deltaMode){case 0:c=Wg.PIXELS;break;case 1:c=Wg.LINES;break;case 2:c=Wg.PAGES;break;default:c=Wg.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");Qc.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 f,g,k,l,m,z=0,h=a.changedTouches;z<h.length;){var p=h[z];++z;null!=b?(g=c/b.width*(p.clientX-b.left),k=d/b.height*(p.clientY-b.top)):(g=p.clientX,k=p.clientY);if("touchstart"==a.type)f=this.unusedTouchesPool.pop(),null==f?f=new Nc(g/c,k/d,p.identifier,0,0,p.force,this.parent.id):(f.x=g/c,f.y=k/d,f.id=p.identifier,f.dx=
0,f.dy=0,f.pressure=p.force,f.device=this.parent.id),this.currentTouches.h[p.identifier]=f,Nc.onStart.dispatch(f),null==this.primaryTouch&&(this.primaryTouch=f),f==this.primaryTouch&&this.parent.onMouseDown.dispatch(g,k,0);else if(f=this.currentTouches.h[p.identifier],null!=f)switch(l=f.x,m=f.y,f.x=g/c,f.y=k/d,f.dx=f.x-l,f.dy=f.y-m,f.pressure=p.force,a.type){case "touchcancel":Nc.onCancel.dispatch(f);this.currentTouches.remove(p.identifier);this.unusedTouchesPool.add(f);f==this.primaryTouch&&(this.primaryTouch=
null);break;case "touchend":Nc.onEnd.dispatch(f);this.currentTouches.remove(p.identifier);this.unusedTouchesPool.add(f);f==this.primaryTouch&&(this.parent.onMouseUp.dispatch(g,k,0),this.primaryTouch=null);break;case "touchmove":Nc.onMove.dispatch(f),f==this.primaryTouch&&this.parent.onMouseMove.dispatch(g,k)}}},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 Uc(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),Eb.fromCanvas(b)}return null},resize:function(a,b){},setMinSize:function(a,b){},setMaxSize:function(a,b){},setBorderless:function(a){return a},setClipboard:function(a){null==Ja.textArea&&(Ja.textArea=window.document.createElement("textarea"),
Ja.textArea.style.height="0px",Ja.textArea.style.left="-100px",Ja.textArea.style.opacity="0",Ja.textArea.style.position="fixed",Ja.textArea.style.top="-100px",Ja.textArea.style.width="0px",window.document.body.appendChild(Ja.textArea));Ja.textArea.value=a;Ja.textArea.focus();Ja.textArea.select();window.document.queryCommandEnabled("copy")&&window.document.execCommand("copy");this.textInputEnabled&&this.focusTextInput()},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,(n=this.parent.element,q(n,n.requestFullscreen))?(document.addEventListener("fullscreenchange",
q(this,this.handleFullscreenEvent),!1),document.addEventListener("fullscreenerror",q(this,this.handleFullscreenEvent),!1),this.parent.element.requestFullscreen()):this.parent.element.mozRequestFullScreen?(document.addEventListener("mozfullscreenchange",q(this,this.handleFullscreenEvent),!1),document.addEventListener("mozfullscreenerror",q(this,this.handleFullscreenEvent),!1),this.parent.element.mozRequestFullScreen()):this.parent.element.webkitRequestFullscreen?(document.addEventListener("webkitfullscreenchange",
q(this,this.handleFullscreenEvent),!1),document.addEventListener("webkitfullscreenerror",q(this,this.handleFullscreenEvent),!1),this.parent.element.webkitRequestFullscreen()):this.parent.element.msRequestFullscreen&&(document.addEventListener("MSFullscreenChange",q(this,this.handleFullscreenEvent),!1),document.addEventListener("MSFullscreenError",q(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){ya.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){},setOpacity:function(a){},setResizable:function(a){return a},setTextInputEnabled:function(a){if(a){if(null==Ja.textInput){Ja.textInput=window.document.createElement("input");var b=0<=B.navigator.userAgent.indexOf("Android")?"password":"text";Ja.textInput.type=b;Ja.textInput.style.position="absolute";Ja.textInput.style.opacity="0";Ja.textInput.style.color="transparent";Ja.textInput.value=Ja.dummyCharacter;
Ja.textInput.autocapitalize="off";Ja.textInput.autocorrect="off";Ja.textInput.autocomplete="off";Ja.textInput.style.left="0px";Ja.textInput.style.top="50%";(new E("(iPad|iPhone|iPod).*OS 8_","gi")).match(window.navigator.userAgent)?(Ja.textInput.style.fontSize="0px",Ja.textInput.style.width="0px",Ja.textInput.style.height="0px"):(Ja.textInput.style.width="1px",Ja.textInput.style.height="1px");Ja.textInput.style.pointerEvents="none";Ja.textInput.style.zIndex="-10000000"}null==Ja.textInput.parentNode&&
this.parent.element.appendChild(Ja.textInput);this.textInputEnabled||(Ja.textInput.addEventListener("input",q(this,this.handleInputEvent),!0),Ja.textInput.addEventListener("blur",q(this,this.handleFocusEvent),!0),Ja.textInput.addEventListener("cut",q(this,this.handleCutOrCopyEvent),!0),Ja.textInput.addEventListener("copy",q(this,this.handleCutOrCopyEvent),!0),Ja.textInput.addEventListener("paste",q(this,this.handlePasteEvent),!0),Ja.textInput.addEventListener("compositionstart",q(this,this.handleCompositionstartEvent),
!0),Ja.textInput.addEventListener("compositionend",q(this,this.handleCompositionendEvent),!0));Ja.textInput.focus();Ja.textInput.select()}else null!=Ja.textInput&&(Ja.textInput.blur(),Ja.textInput.removeEventListener("input",q(this,this.handleInputEvent),!0),Ja.textInput.removeEventListener("blur",q(this,this.handleFocusEvent),!0),Ja.textInput.removeEventListener("cut",q(this,this.handleCutOrCopyEvent),!0),Ja.textInput.removeEventListener("copy",q(this,this.handleCutOrCopyEvent),!0),Ja.textInput.removeEventListener("paste",
q(this,this.handlePasteEvent),!0),Ja.textInput.removeEventListener("compositionstart",q(this,this.handleCompositionstartEvent),!0),Ja.textInput.removeEventListener("compositionend",q(this,this.handleCompositionendEvent),!0));return this.textInputEnabled=a},setTextInputRect:function(a){return this.textInputRect=a},imeCompositionActive:null,handleCompositionstartEvent:function(a){this.imeCompositionActive=!0},handleCompositionendEvent:function(a){this.imeCompositionActive=!1;this.handleInputEvent(a)},
setTitle:function(a){null!=a&&(window.document.title=a);return a},setVisible:function(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,f=a,g=b,k=0,l=0;c<d?(g=Math.floor(this.setHeight*c),l=Math.floor((b-g)/2)):(f=Math.floor(this.setWidth*d),k=Math.floor((a-f)/2));null!=this.canvas?this.parent.element!=this.canvas&&(this.canvas.style.width=f+"px",this.canvas.style.height=g+"px",this.canvas.style.marginLeft=k+"px",this.canvas.style.marginTop=l+"px"):(this.div.style.width=f+"px",this.div.style.height=g+"px",this.div.style.marginLeft=k+"px",this.div.style.marginTop=l+"px")}}}},warpMouse:function(a,b){},__class__:Ja};
var Vo=function(){};h["lime._internal.backend.native.NativeCFFI"]=Vo;Vo.__name__="lime._internal.backend.native.NativeCFFI";var go=function(){};h["lime._internal.format.BMP"]=go;go.__name__="lime._internal.format.BMP";go.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=Ch.RGB);var c=14,d=40,f=a.width*a.height*4;if(null!=b)switch(b._hx_index){case 0:f=(3*a.width+3*a.width%4)*a.height;break;case 1:d=108;break;case 2:c=0,
f+=a.width*a.height}var g=new bb(new ArrayBuffer(c+d+f)),k=0;0<c&&(g.b[k++]=66,g.b[k++]=77,g.setInt32(k,g.length),k+=4,g.setUInt16(k,0),k+=2,g.setUInt16(k,0),k+=2,g.setInt32(k,c+d),k+=4);g.setInt32(k,d);k+=4;g.setInt32(k,a.width);k+=4;g.setInt32(k,b==Ch.ICO?2*a.height:a.height);k+=4;g.setUInt16(k,1);k+=2;g.setUInt16(k,b==Ch.RGB?24:32);k+=2;g.setInt32(k,b==Ch.BITFIELD?3:0);k+=4;g.setInt32(k,f);k+=4;g.setInt32(k,11824);k+=4;g.setInt32(k,11824);k+=4;g.setInt32(k,0);k+=4;g.setInt32(k,0);k+=4;if(b==Ch.BITFIELD)for(g.setInt32(k,
16711680),k+=4,g.setInt32(k,65280),k+=4,g.setInt32(k,255),k+=4,g.setInt32(k,-16777216),k+=4,g.b[k++]=32,g.b[k++]=110,g.b[k++]=105,g.b[k++]=87,c=0;48>c;)c++,g.b[k++]=0;d=a.getPixels(new Uc(0,0,a.width,a.height),1);if(null!=b)switch(b._hx_index){case 0:c=0;for(b=a.height;c<b;){var l=c++;l=4*(a.height-1-l)*a.width;for(var m=0,z=a.width;m<z;){m++;l++;var h=d.b[l++];var p=d.b[l++];var r=d.b[l++];g.b[k++]=r&255;g.b[k++]=p&255;g.b[k++]=h&255}f=0;for(var w=3*a.width%4;f<w;)f++,g.b[k++]=0}break;case 1:c=0;
for(b=a.height;c<b;)for(l=c++,l=4*(a.height-1-l)*a.width,m=0,z=a.width;m<z;){m++;var u=d.b[l++];h=d.b[l++];p=d.b[l++];r=d.b[l++];g.b[k++]=r&255;g.b[k++]=p&255;g.b[k++]=h&255;g.b[k++]=u&255}break;case 2:f=new bb(new ArrayBuffer(a.width*a.height));c=w=0;for(b=a.height;c<b;)for(l=c++,l=4*(a.height-1-l)*a.width,m=0,z=a.width;m<z;)m++,u=d.b[l++],h=d.b[l++],p=d.b[l++],r=d.b[l++],g.b[k++]=r&255,g.b[k++]=p&255,g.b[k++]=h&255,g.b[k++]=u&255,f.b[w++]=0;g.blit(k,f,0,a.width*a.height)}return g};var Ch=G["lime._internal.format.BMPType"]=
{__ename__:"lime._internal.format.BMPType",__constructs__:null,RGB:{_hx_name:"RGB",_hx_index:0,__enum__:"lime._internal.format.BMPType",toString:t},BITFIELD:{_hx_name:"BITFIELD",_hx_index:1,__enum__:"lime._internal.format.BMPType",toString:t},ICO:{_hx_name:"ICO",_hx_index:2,__enum__:"lime._internal.format.BMPType",toString:t}};Ch.__constructs__=[Ch.RGB,Ch.BITFIELD,Ch.ICO];var lf=function(){};h["lime._internal.format.Base64"]=lf;lf.__name__="lime._internal.format.Base64";lf.decode=function(a){return Ug.decode(a)};
lf.encode=function(a){var b=[],c=lf.DICTIONARY,d=lf.EXTENDED_DICTIONARY,f=a.length,g=Math.floor(f/3),k=2*g;b.length=2*Math.ceil(f/3);for(var l=0,m=0,z;m<k;)z=a.b[l]<<16|a.b[l+1]<<8|a.b[l+2],b[m]=d[z>>12&4095],b[m+1]=d[z&4095],l+=3,m+=2;switch(f-3*g){case 1:z=a.b[l]<<16;b[m]=d[z>>12&4095];b[m+1]="==";break;case 2:z=a.b[l]<<16|a.b[l+1]<<8,b[m]=d[z>>12&4095],b[m+1]=c[z>>6&63]+"="}return b.join("")};var Yk=function(){};h["lime._internal.format.Deflate"]=Yk;Yk.__name__="lime._internal.format.Deflate";
Yk.compress=function(a){a=pako.deflateRaw(a.b.bufferValue);return bb.ofData(a)};Yk.decompress=function(a){a=pako.inflateRaw(a.b.bufferValue);return bb.ofData(a)};var Zk=function(){};h["lime._internal.format.GZip"]=Zk;Zk.__name__="lime._internal.format.GZip";Zk.compress=function(a){a=pako.gzip(a.b.bufferValue);return bb.ofData(a)};Zk.decompress=function(a){a=pako.ungzip(a.b.bufferValue);return bb.ofData(a)};var $k=function(){};h["lime._internal.format.JPEG"]=$k;$k.__name__="lime._internal.format.JPEG";
$k.decodeBytes=function(a,b){return null};$k.decodeFile=function(a,b){return null};$k.encode=function(a,b){if(a.get_premultiplied()||0!=a.get_format())a=a.clone(),a.set_premultiplied(!1),a.set_format(0);ya.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 bb(new ArrayBuffer(a.length));for(var c=0,d=a.length;c<d;){var f=c++;b.b[f]=y.cca(a,f)&255}return b}return null};var al=function(){};h["lime._internal.format.LZMA"]=
al;al.__name__="lime._internal.format.LZMA";al.compress=function(a){var b=LZMA.compress;a=a.b.bufferValue;a=null!=a?new Uint8Array(a,0):null;b=b(a,5);return"string"==typeof b?bb.ofString(b):bb.ofData(b)};al.decompress=function(a){var b=LZMA.decompress;a=a.b.bufferValue;a=null!=a?new Uint8Array(a,0):null;b=b(a);return"string"==typeof b?bb.ofString(b):bb.ofData(b)};var kj=function(){};h["lime._internal.format.PNG"]=kj;kj.__name__="lime._internal.format.PNG";kj.decodeBytes=function(a,b){return null};
kj.decodeFile=function(a,b){return null};kj.encode=function(a){if(a.get_premultiplied()||0!=a.get_format())a=a.clone(),a.set_premultiplied(!1),a.set_format(0);ya.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 bb(new ArrayBuffer(a.length)),c=0,d=a.length;c<d;){var f=c++;b.b[f]=y.cca(a,f)&255}return b}return null};var bl=function(){};h["lime._internal.format.Zlib"]=bl;bl.__name__="lime._internal.format.Zlib";
bl.compress=function(a){a=pako.deflate(a.b.bufferValue);return bb.ofData(a)};bl.decompress=function(a){a=pako.inflate(a.b.bufferValue);return bb.ofData(a)};var ya=function(){};h["lime._internal.graphics.ImageCanvasUtil"]=ya;ya.__name__="lime._internal.graphics.ImageCanvasUtil";ya.colorTransform=function(a,b,c){ya.convertToData(a);Qa.colorTransform(a,b,c)};ya.convertToCanvas=function(a,b){null==b&&(b=!1);var c=a.buffer;null!=c.__srcImage?(null==c.__srcCanvas&&(ya.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),ya.createCanvas(a,c.width,c.height),ya.createImageData(a),c.__srcContext.putImageData(c.__srcImageData,0,0)):a.type==Kd.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=Kd.CANVAS};ya.convertToData=
function(a,b){null==b&&(b=!1);var c=a.buffer;null!=c.__srcImage&&ya.convertToCanvas(a);if(null!=c.__srcCanvas&&null==c.data)ya.createImageData(a),a.type==Kd.CANVAS&&(a.dirty=!1);else if(a.type==Kd.CANVAS&&null!=c.__srcCanvas&&a.dirty){if(null==c.__srcImageData)ya.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=Kd.DATA};ya.copyChannel=function(a,b,c,d,f,g){ya.convertToData(b);ya.convertToData(a);Qa.copyChannel(a,b,c,d,f,g)};ya.copyPixels=function(a,b,c,d,f,g,k){null==k&&(k=!1);null==d||d.x>=a.width||d.y>=a.height||null==c||1>c.width||1>c.height||(null!=f&&f.get_transparent()&&(null==g&&(g=new yd),b=b.clone(),b.copyChannel(f,new Uc(c.x+g.x,c.y+g.y,c.width,c.height),new yd(c.x,c.y),ye.ALPHA,ye.ALPHA)),ya.convertToCanvas(a,!0),k||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),ya.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++)};ya.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})))};ya.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}};ya.fillRect=function(a,b,c,d){ya.convertToCanvas(a);if(1==d){d=c>>16&255;var f=c>>8&255;var g=c&255;c=a.get_transparent()?c>>24&255:255}else d=c>>24&255,f=c>>16&255,g=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+", "+f+", "+g+", "+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++)};ya.floodFill=function(a,b,c,d,f){ya.convertToData(a);Qa.floodFill(a,b,c,d,f)};ya.getPixel=function(a,b,c,d){ya.convertToData(a);return Qa.getPixel(a,b,c,d)};ya.getPixel32=function(a,b,c,d){ya.convertToData(a);return Qa.getPixel32(a,b,c,d)};ya.getPixels=function(a,b,c){ya.convertToData(a);return Qa.getPixels(a,b,c)};ya.merge=function(a,b,
c,d,f,g,k,l){ya.convertToData(b);ya.convertToData(a);Qa.merge(a,b,c,d,f,g,k,l)};ya.resize=function(a,b,c){var d=a.buffer;if(null==d.__srcCanvas)ya.createCanvas(a,b,c),d.__srcContext.drawImage(d.get_src(),0,0,b,c);else{ya.convertToCanvas(a,!0);var f=d.__srcCanvas;d.__srcCanvas=null;ya.createCanvas(a,b,c);d.__srcContext.drawImage(f,0,0,b,c)}d.__srcImageData=null;d.data=null;a.dirty=!0;a.version++};ya.scroll=function(a,b,c){if(0!=b%a.width||0!=c%a.height){var d=a.clone();ya.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++}};ya.setPixel=function(a,b,c,d,f){ya.convertToData(a);Qa.setPixel(a,b,c,d,f)};ya.setPixel32=function(a,b,c,d,f){ya.convertToData(a);Qa.setPixel32(a,b,c,d,f)};ya.setPixels=function(a,b,c,d,f){ya.convertToData(a);Qa.setPixels(a,b,c,d,f)};ya.sync=function(a,b){null!=a&&(a.type!=Kd.CANVAS||null==a.buffer.__srcCanvas&&null==a.buffer.data?a.type==Kd.DATA&&ya.convertToData(a,b):ya.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,f,g,k){var l=a.buffer.data,m=b.buffer.data,z=c.buffer.data,h=a.buffer.format,p=b.buffer.format,r=c.buffer.format,w=a.get_premultiplied(),u=b.get_premultiplied(),n=c.get_premultiplied();b=new ae(b);c=new ae(c);for(var t,A,y=0,q=0,E,L,v,C=0,G=0,x=0,Y=0,B,H=0,D=b.height;H<D;){var J=H++;t=b.byteOffset+b.stride*J;for(var X=0,M=b.width;X<M;){var qa=X++;A=t+4*qa;v=d.x|0;E=d.y|
0;if(k){q=b.byteOffset+b.stride*(J-E+1)+4*(qa-v);L=r;B=n;null==B&&(B=!1);null==L&&(L=0);switch(L){case 0:C=(z[q]&255)<<24|(z[q+1]&255)<<16|(z[q+2]&255)<<8|z[q+3]&255;break;case 1:C=(z[q+1]&255)<<24|(z[q+2]&255)<<16|(z[q+3]&255)<<8|z[q]&255;break;case 2:C=(z[q+2]&255)<<24|(z[q+1]&255)<<16|(z[q]&255)<<8|z[q+3]&255}B&&0!=(C&255)&&255!=(C&255)&&(K.unmult=255/(C&255),C=(K.__clamp[Math.round((C>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((C>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((C>>>
8&255)*K.unmult)]&255)<<8|C&255);q=b.byteOffset+b.stride*(J-E)+4*(qa-v+1);L=r;B=n;null==B&&(B=!1);null==L&&(L=0);switch(L){case 0:G=(z[q]&255)<<24|(z[q+1]&255)<<16|(z[q+2]&255)<<8|z[q+3]&255;break;case 1:G=(z[q+1]&255)<<24|(z[q+2]&255)<<16|(z[q+3]&255)<<8|z[q]&255;break;case 2:G=(z[q+2]&255)<<24|(z[q+1]&255)<<16|(z[q]&255)<<8|z[q+3]&255}B&&0!=(G&255)&&255!=(G&255)&&(K.unmult=255/(G&255),G=(K.__clamp[Math.round((G>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((G>>>16&255)*K.unmult)]&255)<<16|
(K.__clamp[Math.round((G>>>8&255)*K.unmult)]&255)<<8|G&255);q=b.byteOffset+b.stride*(J-E+1)+4*(qa-v+1);L=r;B=n;null==B&&(B=!1);null==L&&(L=0);switch(L){case 0:x=(z[q]&255)<<24|(z[q+1]&255)<<16|(z[q+2]&255)<<8|z[q+3]&255;break;case 1:x=(z[q+1]&255)<<24|(z[q+2]&255)<<16|(z[q+3]&255)<<8|z[q]&255;break;case 2:x=(z[q+2]&255)<<24|(z[q+1]&255)<<16|(z[q]&255)<<8|z[q+3]&255}B&&0!=(x&255)&&255!=(x&255)&&(K.unmult=255/(x&255),x=(K.__clamp[Math.round((x>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((x>>>
16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((x>>>8&255)*K.unmult)]&255)<<8|x&255);q=b.byteOffset+b.stride*(J-E)+4*(qa-v);L=r;B=n;null==B&&(B=!1);null==L&&(L=0);switch(L){case 0:Y=(z[q]&255)<<24|(z[q+1]&255)<<16|(z[q+2]&255)<<8|z[q+3]&255;break;case 1:Y=(z[q+1]&255)<<24|(z[q+2]&255)<<16|(z[q+3]&255)<<8|z[q]&255;break;case 2:Y=(z[q+2]&255)<<24|(z[q+1]&255)<<16|(z[q]&255)<<8|z[q+3]&255}B&&0!=(Y&255)&&255!=(Y&255)&&(K.unmult=255/(Y&255),Y=(K.__clamp[Math.round((Y>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((Y>>>
16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((Y>>>8&255)*K.unmult)]&255)<<8|Y&255);q=Qa.bilinear(C,G,x,Y,d.x-v,d.y-E)}else{v=c.byteOffset+c.stride*(J-E)+4*(qa-v);E=r;L=n;null==L&&(L=!1);null==E&&(E=0);switch(E){case 0:q=(z[v]&255)<<24|(z[v+1]&255)<<16|(z[v+2]&255)<<8|z[v+3]&255;break;case 1:q=(z[v+1]&255)<<24|(z[v+2]&255)<<16|(z[v+3]&255)<<8|z[v]&255;break;case 2:q=(z[v+2]&255)<<24|(z[v+1]&255)<<16|(z[v]&255)<<8|z[v+3]&255}L&&0!=(q&255)&&255!=(q&255)&&(K.unmult=255/(q&255),q=(K.__clamp[Math.round((q>>>
24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((q>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((q>>>8&255)*K.unmult)]&255)<<8|q&255)}v=(q&255)/255;E=((q>>>24&255)-128)/255*v;L=((q>>>16&255)-128)/255*v;v=E*f.x+L*g.x;B=E*f.y+L*g.y;E=Math.floor(v*b.width);L=Math.floor(B*b.height);if(k){y=b.byteOffset+b.stride*(J+L+1)+4*(qa+E);var va=p,N=u;null==N&&(N=!1);null==va&&(va=0);switch(va){case 0:C=(m[y]&255)<<24|(m[y+1]&255)<<16|(m[y+2]&255)<<8|m[y+3]&255;break;case 1:C=(m[y+1]&255)<<24|(m[y+2]&255)<<
16|(m[y+3]&255)<<8|m[y]&255;break;case 2:C=(m[y+2]&255)<<24|(m[y+1]&255)<<16|(m[y]&255)<<8|m[y+3]&255}N&&0!=(C&255)&&255!=(C&255)&&(K.unmult=255/(C&255),C=(K.__clamp[Math.round((C>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((C>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((C>>>8&255)*K.unmult)]&255)<<8|C&255);y=b.byteOffset+b.stride*(J+L)+4*(qa+E+1);va=p;N=u;null==N&&(N=!1);null==va&&(va=0);switch(va){case 0:G=(m[y]&255)<<24|(m[y+1]&255)<<16|(m[y+2]&255)<<8|m[y+3]&255;break;case 1:G=
(m[y+1]&255)<<24|(m[y+2]&255)<<16|(m[y+3]&255)<<8|m[y]&255;break;case 2:G=(m[y+2]&255)<<24|(m[y+1]&255)<<16|(m[y]&255)<<8|m[y+3]&255}N&&0!=(G&255)&&255!=(G&255)&&(K.unmult=255/(G&255),G=(K.__clamp[Math.round((G>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((G>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((G>>>8&255)*K.unmult)]&255)<<8|G&255);y=b.byteOffset+b.stride*(J+L+1)+4*(qa+E+1);va=p;N=u;null==N&&(N=!1);null==va&&(va=0);switch(va){case 0:x=(m[y]&255)<<24|(m[y+1]&255)<<16|(m[y+2]&
255)<<8|m[y+3]&255;break;case 1:x=(m[y+1]&255)<<24|(m[y+2]&255)<<16|(m[y+3]&255)<<8|m[y]&255;break;case 2:x=(m[y+2]&255)<<24|(m[y+1]&255)<<16|(m[y]&255)<<8|m[y+3]&255}N&&0!=(x&255)&&255!=(x&255)&&(K.unmult=255/(x&255),x=(K.__clamp[Math.round((x>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((x>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((x>>>8&255)*K.unmult)]&255)<<8|x&255);qa=b.byteOffset+b.stride*(J+L)+4*(qa+E);y=p;va=u;null==va&&(va=!1);null==y&&(y=0);switch(y){case 0:Y=(m[qa]&255)<<
24|(m[qa+1]&255)<<16|(m[qa+2]&255)<<8|m[qa+3]&255;break;case 1:Y=(m[qa+1]&255)<<24|(m[qa+2]&255)<<16|(m[qa+3]&255)<<8|m[qa]&255;break;case 2:Y=(m[qa+2]&255)<<24|(m[qa+1]&255)<<16|(m[qa]&255)<<8|m[qa+3]&255}va&&0!=(Y&255)&&255!=(Y&255)&&(K.unmult=255/(Y&255),Y=(K.__clamp[Math.round((Y>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((Y>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((Y>>>8&255)*K.unmult)]&255)<<8|Y&255);y=Qa.bilinear(C,G,x,Y,v*b.width-E,B*b.height-L)}else{qa=b.byteOffset+b.stride*
(J+L)+4*(qa+E);v=p;E=u;null==E&&(E=!1);null==v&&(v=0);switch(v){case 0:y=(m[qa]&255)<<24|(m[qa+1]&255)<<16|(m[qa+2]&255)<<8|m[qa+3]&255;break;case 1:y=(m[qa+1]&255)<<24|(m[qa+2]&255)<<16|(m[qa+3]&255)<<8|m[qa]&255;break;case 2:y=(m[qa+2]&255)<<24|(m[qa+1]&255)<<16|(m[qa]&255)<<8|m[qa+3]&255}E&&0!=(y&255)&&255!=(y&255)&&(K.unmult=255/(y&255),y=(K.__clamp[Math.round((y>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((y>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((y>>>8&255)*K.unmult)]&255)<<
8|y&255)}qa=h;v=w;null==v&&(v=!1);null==qa&&(qa=0);v&&(0==(y&255)?0!=y&&(y=0):255!=(y&255)&&(K.a16=K.__alpha16[y&255],y=((y>>>24&255)*K.a16>>16&255)<<24|((y>>>16&255)*K.a16>>16&255)<<16|((y>>>8&255)*K.a16>>16&255)<<8|y&255));switch(qa){case 0:l[A]=y>>>24&255;l[A+1]=y>>>16&255;l[A+2]=y>>>8&255;l[A+3]=y&255;break;case 1:l[A]=y&255;l[A+1]=y>>>24&255;l[A+2]=y>>>16&255;l[A+3]=y>>>8&255;break;case 2:l[A]=y>>>8&255,l[A+1]=y>>>16&255,l[A+2]=y>>>24&255,l[A+3]=y&255}}}a.dirty=!0;a.version++};Qa.bilinear=function(a,
b,c,d,f,g){return Qa.lerpRGBA(Qa.lerpRGBA(d,b,f),Qa.lerpRGBA(a,c,f),g)};Qa.lerpRGBA=function(a,b,c){var d=0,f=Math.floor(Qa.lerp(a>>>24&255,b>>>24&255,c));d=(f&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|d&255;f=Math.floor(Qa.lerp(a>>>16&255,b>>>16&255,c));d=(d>>>24&255)<<24|(f&255)<<16|(d>>>8&255)<<8|d&255;f=Math.floor(Qa.lerp(a>>>8&255,b>>>8&255,c));d=(d>>>24&255)<<24|(d>>>16&255)<<16|(f&255)<<8|d&255;f=Math.floor(Qa.lerp(a&255,b&255,c));return(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|f&255};
Qa.lerp4f=function(a,b,c){return new tc(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 f=a.buffer.format,g=a.buffer.premultiplied;b=new ae(a,b);var k=gd.getAlphaTable(c),l=gd.getRedTable(c),m=gd.getGreenTable(c);c=gd.getBlueTable(c);for(var z,h,p=0,r=0,w=b.height;r<w;){z=r++;z=b.byteOffset+b.stride*z;for(var u=0,n=b.width;u<n;){h=u++;h=z+4*h;var t=f,A=g;null==
A&&(A=!1);null==t&&(t=0);switch(t){case 0:p=(d[h]&255)<<24|(d[h+1]&255)<<16|(d[h+2]&255)<<8|d[h+3]&255;break;case 1:p=(d[h+1]&255)<<24|(d[h+2]&255)<<16|(d[h+3]&255)<<8|d[h]&255;break;case 2:p=(d[h+2]&255)<<24|(d[h+1]&255)<<16|(d[h]&255)<<8|d[h+3]&255}A&&0!=(p&255)&&255!=(p&255)&&(K.unmult=255/(p&255),p=(K.__clamp[Math.round((p>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((p>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((p>>>8&255)*K.unmult)]&255)<<8|p&255);p=(l[p>>>24&255]&255)<<24|(m[p>>>
16&255]&255)<<16|(c[p>>>8&255]&255)<<8|k[p&255]&255;t=f;A=g;null==A&&(A=!1);null==t&&(t=0);A&&(0==(p&255)?0!=p&&(p=0):255!=(p&255)&&(K.a16=K.__alpha16[p&255],p=((p>>>24&255)*K.a16>>16&255)<<24|((p>>>16&255)*K.a16>>16&255)<<16|((p>>>8&255)*K.a16>>16&255)<<8|p&255));switch(t){case 0:d[h]=p>>>24&255;d[h+1]=p>>>16&255;d[h+2]=p>>>8&255;d[h+3]=p&255;break;case 1:d[h]=p&255;d[h+1]=p>>>24&255;d[h+2]=p>>>16&255;d[h+3]=p>>>8&255;break;case 2:d[h]=p>>>8&255,d[h+1]=p>>>16&255,d[h+2]=p>>>24&255,d[h+3]=p&255}}}a.dirty=
!0;a.version++}};Qa.copyChannel=function(a,b,c,d,f,g){switch(g._hx_index){case 0:var k=0;break;case 1:k=1;break;case 2:k=2;break;case 3:k=3}switch(f._hx_index){case 0:var l=0;break;case 1:l=1;break;case 2:l=2;break;case 3:l=3}f=b.buffer.data;g=a.buffer.data;if(null!=f&&null!=g){c=new ae(b,c);d=new ae(a,new Uc(d.x,d.y,c.width,c.height));var m=b.buffer.format,h=a.buffer.format;b=b.buffer.premultiplied;for(var r=a.buffer.premultiplied,p,w,u=0,n=0,t=0,A=0,y=d.height;A<y;){w=A++;p=c.byteOffset+c.stride*
w;w=d.byteOffset+d.stride*w;for(var q=0,E=d.width;q<E;){q++;var L=m,v=b;null==v&&(v=!1);null==L&&(L=0);switch(L){case 0:u=(f[p]&255)<<24|(f[p+1]&255)<<16|(f[p+2]&255)<<8|f[p+3]&255;break;case 1:u=(f[p+1]&255)<<24|(f[p+2]&255)<<16|(f[p+3]&255)<<8|f[p]&255;break;case 2:u=(f[p+2]&255)<<24|(f[p+1]&255)<<16|(f[p]&255)<<8|f[p+3]&255}v&&0!=(u&255)&&255!=(u&255)&&(K.unmult=255/(u&255),u=(K.__clamp[Math.round((u>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((u>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((u>>>
8&255)*K.unmult)]&255)<<8|u&255);L=h;v=r;null==v&&(v=!1);null==L&&(L=0);switch(L){case 0:n=(g[w]&255)<<24|(g[w+1]&255)<<16|(g[w+2]&255)<<8|g[w+3]&255;break;case 1:n=(g[w+1]&255)<<24|(g[w+2]&255)<<16|(g[w+3]&255)<<8|g[w]&255;break;case 2:n=(g[w+2]&255)<<24|(g[w+1]&255)<<16|(g[w]&255)<<8|g[w+3]&255}v&&0!=(n&255)&&255!=(n&255)&&(K.unmult=255/(n&255),n=(K.__clamp[Math.round((n>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((n>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((n>>>8&255)*K.unmult)]&
255)<<8|n&255);switch(l){case 0:t=u>>>24&255;break;case 1:t=u>>>16&255;break;case 2:t=u>>>8&255;break;case 3:t=u&255}switch(k){case 0:n=(t&255)<<24|(n>>>16&255)<<16|(n>>>8&255)<<8|n&255;break;case 1:n=(n>>>24&255)<<24|(t&255)<<16|(n>>>8&255)<<8|n&255;break;case 2:n=(n>>>24&255)<<24|(n>>>16&255)<<16|(t&255)<<8|n&255;break;case 3:n=(n>>>24&255)<<24|(n>>>16&255)<<16|(n>>>8&255)<<8|t&255}L=h;v=r;null==v&&(v=!1);null==L&&(L=0);v&&(0==(n&255)?0!=n&&(n=0):255!=(n&255)&&(K.a16=K.__alpha16[n&255],n=((n>>>
24&255)*K.a16>>16&255)<<24|((n>>>16&255)*K.a16>>16&255)<<16|((n>>>8&255)*K.a16>>16&255)<<8|n&255));switch(L){case 0:g[w]=n>>>24&255;g[w+1]=n>>>16&255;g[w+2]=n>>>8&255;g[w+3]=n&255;break;case 1:g[w]=n&255;g[w+1]=n>>>24&255;g[w+2]=n>>>16&255;g[w+3]=n>>>8&255;break;case 2:g[w]=n>>>8&255,g[w+1]=n>>>16&255,g[w+2]=n>>>24&255,g[w+3]=n&255}p+=4;w+=4}}a.dirty=!0;a.version++}};Qa.copyPixels=function(a,b,c,d,f,g,k){null==k&&(k=!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==f&&null==g&&0==k&&a.get_format()==b.get_format())a.buffer.data.set(b.buffer.data);else{var l=b.buffer.data,m=a.buffer.data;if(null==l||null==m)return;c=new ae(b,c);var h=new Uc(d.x,d.y,c.width,c.height);h=new ae(a,h);var r=b.buffer.format,p=a.buffer.format,w=0,u=0,n=b.buffer.premultiplied,t=a.buffer.premultiplied,A=b.buffer.bitsPerPixel/8|0,y=a.buffer.bitsPerPixel/8|0,q=null!=f&&f.get_transparent(),E=k||q&&!a.get_transparent()||!k&&!a.get_transparent()&&b.get_transparent();
if(q)if(y=f.buffer.data,b=f.buffer.format,k=0,f=new ae(f,new Uc(c.x+(null==g?0:g.x),c.y+(null==g?0:g.y),c.width,c.height)),h.clip(d.x|0,d.y|0,f.width,f.height),E)for(E=0,A=h.height;E<A;)for(q=E++,d=c.byteOffset+c.stride*q,g=h.byteOffset+h.stride*q,q=f.byteOffset+f.stride*q,x=0,Y=h.width;x<Y;){x++;var L=r;var v=n;null==v&&(v=!1);null==L&&(L=0);switch(L){case 0:w=(l[d]&255)<<24|(l[d+1]&255)<<16|(l[d+2]&255)<<8|l[d+3]&255;break;case 1:w=(l[d+1]&255)<<24|(l[d+2]&255)<<16|(l[d+3]&255)<<8|l[d]&255;break;
case 2:w=(l[d+2]&255)<<24|(l[d+1]&255)<<16|(l[d]&255)<<8|l[d+3]&255}v&&0!=(w&255)&&255!=(w&255)&&(K.unmult=255/(w&255),w=(K.__clamp[Math.round((w>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((w>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((w>>>8&255)*K.unmult)]&255)<<8|w&255);L=p;v=t;null==v&&(v=!1);null==L&&(L=0);switch(L){case 0:u=(m[g]&255)<<24|(m[g+1]&255)<<16|(m[g+2]&255)<<8|m[g+3]&255;break;case 1:u=(m[g+1]&255)<<24|(m[g+2]&255)<<16|(m[g+3]&255)<<8|m[g]&255;break;case 2:u=(m[g+
2]&255)<<24|(m[g+1]&255)<<16|(m[g]&255)<<8|m[g+3]&255}v&&0!=(u&255)&&255!=(u&255)&&(K.unmult=255/(u&255),u=(K.__clamp[Math.round((u>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((u>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((u>>>8&255)*K.unmult)]&255)<<8|u&255);L=b;v=!1;null==v&&(v=!1);null==L&&(L=0);switch(L){case 0:k=(y[q]&255)<<24|(y[q+1]&255)<<16|(y[q+2]&255)<<8|y[q+3]&255;break;case 1:k=(y[q+1]&255)<<24|(y[q+2]&255)<<16|(y[q+3]&255)<<8|y[q]&255;break;case 2:k=(y[q+2]&255)<<24|
(y[q+1]&255)<<16|(y[q]&255)<<8|y[q+3]&255}v&&0!=(k&255)&&255!=(k&255)&&(K.unmult=255/(k&255),k=(K.__clamp[Math.round((k>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((k>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((k>>>8&255)*K.unmult)]&255)<<8|k&255);v=(k&255)/255*((w&255)/255);if(0<v){var C=(u&255)/255;var G=1-v;L=v+C*G;B=K.__clamp[Math.round(((w>>>24&255)*v+(u>>>24&255)*C*G)/L)];u=(B&255)<<24|(u>>>16&255)<<16|(u>>>8&255)<<8|u&255;B=K.__clamp[Math.round(((w>>>16&255)*v+(u>>>16&255)*
C*G)/L)];u=(u>>>24&255)<<24|(B&255)<<16|(u>>>8&255)<<8|u&255;v=K.__clamp[Math.round(((w>>>8&255)*v+(u>>>8&255)*C*G)/L)];u=(u>>>24&255)<<24|(u>>>16&255)<<16|(v&255)<<8|u&255;L=K.__clamp[Math.round(255*L)];u=(u>>>24&255)<<24|(u>>>16&255)<<16|(u>>>8&255)<<8|L&255;L=p;v=t;null==v&&(v=!1);null==L&&(L=0);v&&(0==(u&255)?0!=u&&(u=0):255!=(u&255)&&(K.a16=K.__alpha16[u&255],u=((u>>>24&255)*K.a16>>16&255)<<24|((u>>>16&255)*K.a16>>16&255)<<16|((u>>>8&255)*K.a16>>16&255)<<8|u&255));switch(L){case 0:m[g]=u>>>24&
255;m[g+1]=u>>>16&255;m[g+2]=u>>>8&255;m[g+3]=u&255;break;case 1:m[g]=u&255;m[g+1]=u>>>24&255;m[g+2]=u>>>16&255;m[g+3]=u>>>8&255;break;case 2:m[g]=u>>>8&255,m[g+1]=u>>>16&255,m[g+2]=u>>>24&255,m[g+3]=u&255}}d+=4;g+=4;q+=4}else for(E=0,A=h.height;E<A;)for(q=E++,d=c.byteOffset+c.stride*q,g=h.byteOffset+h.stride*q,q=f.byteOffset+f.stride*q,x=0,Y=h.width;x<Y;){x++;L=r;v=n;null==v&&(v=!1);null==L&&(L=0);switch(L){case 0:w=(l[d]&255)<<24|(l[d+1]&255)<<16|(l[d+2]&255)<<8|l[d+3]&255;break;case 1:w=(l[d+1]&
255)<<24|(l[d+2]&255)<<16|(l[d+3]&255)<<8|l[d]&255;break;case 2:w=(l[d+2]&255)<<24|(l[d+1]&255)<<16|(l[d]&255)<<8|l[d+3]&255}v&&0!=(w&255)&&255!=(w&255)&&(K.unmult=255/(w&255),w=(K.__clamp[Math.round((w>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((w>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((w>>>8&255)*K.unmult)]&255)<<8|w&255);L=b;v=!1;null==v&&(v=!1);null==L&&(L=0);switch(L){case 0:k=(y[q]&255)<<24|(y[q+1]&255)<<16|(y[q+2]&255)<<8|y[q+3]&255;break;case 1:k=(y[q+1]&255)<<24|(y[q+
2]&255)<<16|(y[q+3]&255)<<8|y[q]&255;break;case 2:k=(y[q+2]&255)<<24|(y[q+1]&255)<<16|(y[q]&255)<<8|y[q+3]&255}v&&0!=(k&255)&&255!=(k&255)&&(K.unmult=255/(k&255),k=(K.__clamp[Math.round((k>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((k>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((k>>>8&255)*K.unmult)]&255)<<8|k&255);B=Math.round((k&255)/255*(w&255));w=(w>>>24&255)<<24|(w>>>16&255)<<16|(w>>>8&255)<<8|B&255;L=p;v=t;null==v&&(v=!1);null==L&&(L=0);v&&(0==(w&255)?0!=w&&(w=0):255!=(w&255)&&
(K.a16=K.__alpha16[w&255],w=((w>>>24&255)*K.a16>>16&255)<<24|((w>>>16&255)*K.a16>>16&255)<<16|((w>>>8&255)*K.a16>>16&255)<<8|w&255));switch(L){case 0:m[g]=w>>>24&255;m[g+1]=w>>>16&255;m[g+2]=w>>>8&255;m[g+3]=w&255;break;case 1:m[g]=w&255;m[g+1]=w>>>24&255;m[g+2]=w>>>16&255;m[g+3]=w>>>8&255;break;case 2:m[g]=w>>>8&255,m[g+1]=w>>>16&255,m[g+2]=w>>>24&255,m[g+3]=w&255}d+=4;g+=4;q+=4}else if(E)for(E=0,A=h.height;E<A;){q=E++;d=c.byteOffset+c.stride*q;g=h.byteOffset+h.stride*q;for(var x=0,Y=h.width;x<Y;){x++;
L=r;v=n;null==v&&(v=!1);null==L&&(L=0);switch(L){case 0:w=(l[d]&255)<<24|(l[d+1]&255)<<16|(l[d+2]&255)<<8|l[d+3]&255;break;case 1:w=(l[d+1]&255)<<24|(l[d+2]&255)<<16|(l[d+3]&255)<<8|l[d]&255;break;case 2:w=(l[d+2]&255)<<24|(l[d+1]&255)<<16|(l[d]&255)<<8|l[d+3]&255}v&&0!=(w&255)&&255!=(w&255)&&(K.unmult=255/(w&255),w=(K.__clamp[Math.round((w>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((w>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((w>>>8&255)*K.unmult)]&255)<<8|w&255);L=p;v=t;null==
v&&(v=!1);null==L&&(L=0);switch(L){case 0:u=(m[g]&255)<<24|(m[g+1]&255)<<16|(m[g+2]&255)<<8|m[g+3]&255;break;case 1:u=(m[g+1]&255)<<24|(m[g+2]&255)<<16|(m[g+3]&255)<<8|m[g]&255;break;case 2:u=(m[g+2]&255)<<24|(m[g+1]&255)<<16|(m[g]&255)<<8|m[g+3]&255}v&&0!=(u&255)&&255!=(u&255)&&(K.unmult=255/(u&255),u=(K.__clamp[Math.round((u>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((u>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((u>>>8&255)*K.unmult)]&255)<<8|u&255);v=(w&255)/255;C=(u&255)/255;
G=1-v;L=v+C*G;if(0==L)u=0;else{var B=K.__clamp[Math.round(((w>>>24&255)*v+(u>>>24&255)*C*G)/L)];u=(B&255)<<24|(u>>>16&255)<<16|(u>>>8&255)<<8|u&255;B=K.__clamp[Math.round(((w>>>16&255)*v+(u>>>16&255)*C*G)/L)];u=(u>>>24&255)<<24|(B&255)<<16|(u>>>8&255)<<8|u&255;v=K.__clamp[Math.round(((w>>>8&255)*v+(u>>>8&255)*C*G)/L)];u=(u>>>24&255)<<24|(u>>>16&255)<<16|(v&255)<<8|u&255;L=K.__clamp[Math.round(255*L)];u=(u>>>24&255)<<24|(u>>>16&255)<<16|(u>>>8&255)<<8|L&255}L=p;v=t;null==v&&(v=!1);null==L&&(L=0);v&&
(0==(u&255)?0!=u&&(u=0):255!=(u&255)&&(K.a16=K.__alpha16[u&255],u=((u>>>24&255)*K.a16>>16&255)<<24|((u>>>16&255)*K.a16>>16&255)<<16|((u>>>8&255)*K.a16>>16&255)<<8|u&255));switch(L){case 0:m[g]=u>>>24&255;m[g+1]=u>>>16&255;m[g+2]=u>>>8&255;m[g+3]=u&255;break;case 1:m[g]=u&255;m[g+1]=u>>>24&255;m[g+2]=u>>>16&255;m[g+3]=u>>>8&255;break;case 2:m[g]=u>>>8&255,m[g+1]=u>>>16&255,m[g+2]=u>>>24&255,m[g+3]=u&255}d+=4;g+=4}}else if(r==p&&n==t&&A==y)for(E=0,A=h.height;E<A;)q=E++,d=c.byteOffset+c.stride*q,g=h.byteOffset+
h.stride*q,m.set(l.subarray(d,d+h.width*y),g);else for(E=0,A=h.height;E<A;)for(q=E++,d=c.byteOffset+c.stride*q,g=h.byteOffset+h.stride*q,x=0,Y=h.width;x<Y;){x++;L=r;v=n;null==v&&(v=!1);null==L&&(L=0);switch(L){case 0:w=(l[d]&255)<<24|(l[d+1]&255)<<16|(l[d+2]&255)<<8|l[d+3]&255;break;case 1:w=(l[d+1]&255)<<24|(l[d+2]&255)<<16|(l[d+3]&255)<<8|l[d]&255;break;case 2:w=(l[d+2]&255)<<24|(l[d+1]&255)<<16|(l[d]&255)<<8|l[d+3]&255}v&&0!=(w&255)&&255!=(w&255)&&(K.unmult=255/(w&255),w=(K.__clamp[Math.round((w>>>
24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((w>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((w>>>8&255)*K.unmult)]&255)<<8|w&255);L=p;v=t;null==v&&(v=!1);null==L&&(L=0);v&&(0==(w&255)?0!=w&&(w=0):255!=(w&255)&&(K.a16=K.__alpha16[w&255],w=((w>>>24&255)*K.a16>>16&255)<<24|((w>>>16&255)*K.a16>>16&255)<<16|((w>>>8&255)*K.a16>>16&255)<<8|w&255));switch(L){case 0:m[g]=w>>>24&255;m[g+1]=w>>>16&255;m[g+2]=w>>>8&255;m[g+3]=w&255;break;case 1:m[g]=w&255;m[g+1]=w>>>24&255;m[g+2]=w>>>16&255;m[g+
3]=w>>>8&255;break;case 2:m[g]=w>>>8&255,m[g+1]=w>>>16&255,m[g+2]=w>>>24&255,m[g+3]=w&255}d+=4;g+=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);var f=a.buffer.data;if(null!=f){d=a.buffer.format;var g=a.buffer.premultiplied;g&&(0==(c&255)?0!=c&&(c=0):255!=(c&255)&&(K.a16=
K.__alpha16[c&255],c=((c>>>24&255)*K.a16>>16&255)<<24|((c>>>16&255)*K.a16>>16&255)<<16|((c>>>8&255)*K.a16>>16&255)<<8|c&255));b=new ae(a,b);for(var k,l=0,m=b.height;l<m;){g=l++;k=b.byteOffset+b.stride*g;for(var h=0,r=b.width;h<r;){g=h++;var p=k+4*g,w=d;g=!1;null==g&&(g=!1);null==w&&(w=0);g&&(0==(c&255)?0!=c&&(c=0):255!=(c&255)&&(K.a16=K.__alpha16[c&255],c=((c>>>24&255)*K.a16>>16&255)<<24|((c>>>16&255)*K.a16>>16&255)<<16|((c>>>8&255)*K.a16>>16&255)<<8|c&255));switch(w){case 0:f[p]=c>>>24&255;f[p+1]=
c>>>16&255;f[p+2]=c>>>8&255;f[p+3]=c&255;break;case 1:f[p]=c&255;f[p+1]=c>>>24&255;f[p+2]=c>>>16&255;f[p+3]=c>>>8&255;break;case 2:f[p]=c>>>8&255,f[p+1]=c>>>16&255,f[p+2]=c>>>24&255,f[p+3]=c&255}}}a.dirty=!0;a.version++}};Qa.floodFill=function(a,b,c,d,f){var g=a.buffer.data;if(null!=g){1==f&&(d=(d&16777215)<<8|d>>24&255);f=a.buffer.format;var k=a.buffer.premultiplied,l=0,m=4*(c+a.offsetY)*a.buffer.width+4*(b+a.offsetX),h=f,r=k;null==r&&(r=!1);null==h&&(h=0);switch(h){case 0:l=(g[m]&255)<<24|(g[m+
1]&255)<<16|(g[m+2]&255)<<8|g[m+3]&255;break;case 1:l=(g[m+1]&255)<<24|(g[m+2]&255)<<16|(g[m+3]&255)<<8|g[m]&255;break;case 2:l=(g[m+2]&255)<<24|(g[m+1]&255)<<16|(g[m]&255)<<8|g[m+3]&255}r&&0!=(l&255)&&255!=(l&255)&&(K.unmult=255/(l&255),l=(K.__clamp[Math.round((l>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((l>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((l>>>8&255)*K.unmult)]&255)<<8|l&255);a.get_transparent()||(d=(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|255,l=(l>>>24&255)<<
24|(l>>>16&255)<<16|(l>>>8&255)<<8|255);if(d!=l){k&&(0==(d&255)?0!=d&&(d=0):255!=(d&255)&&(K.a16=K.__alpha16[d&255],d=((d>>>24&255)*K.a16>>16&255)<<24|((d>>>16&255)*K.a16>>16&255)<<16|((d>>>8&255)*K.a16>>16&255)<<8|d&255));m=[0,-1,1,0];var p=[-1,0,0,1],w=-a.offsetX,u=-a.offsetY,n=w+a.width,t=u+a.height,A=[];A.push(b);A.push(c);for(var q,y,E,L=0;0<A.length;){c=A.pop();b=A.pop();for(var v=0;4>v;)if(h=v++,q=b+m[h],y=c+p[h],!(q<w||y<u||q>=n||y>=t)){E=4*(y*a.width+q);h=f;r=k;null==r&&(r=!1);null==h&&(h=
0);switch(h){case 0:L=(g[E]&255)<<24|(g[E+1]&255)<<16|(g[E+2]&255)<<8|g[E+3]&255;break;case 1:L=(g[E+1]&255)<<24|(g[E+2]&255)<<16|(g[E+3]&255)<<8|g[E]&255;break;case 2:L=(g[E+2]&255)<<24|(g[E+1]&255)<<16|(g[E]&255)<<8|g[E+3]&255}r&&0!=(L&255)&&255!=(L&255)&&(K.unmult=255/(L&255),L=(K.__clamp[Math.round((L>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((L>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((L>>>8&255)*K.unmult)]&255)<<8|L&255);if(L==l){h=f;r=!1;null==r&&(r=!1);null==h&&(h=0);
r&&(0==(d&255)?0!=d&&(d=0):255!=(d&255)&&(K.a16=K.__alpha16[d&255],d=((d>>>24&255)*K.a16>>16&255)<<24|((d>>>16&255)*K.a16>>16&255)<<16|((d>>>8&255)*K.a16>>16&255)<<8|d&255));switch(h){case 0:g[E]=d>>>24&255;g[E+1]=d>>>16&255;g[E+2]=d>>>8&255;g[E+3]=d&255;break;case 1:g[E]=d&255;g[E+1]=d>>>24&255;g[E+2]=d>>>16&255;g[E+3]=d>>>8&255;break;case 2:g[E]=d>>>8&255,g[E+1]=d>>>16&255,g[E+2]=d>>>24&255,g[E+3]=d&255}A.push(q);A.push(y)}}}a.dirty=!0;a.version++}}};Qa.gaussianBlur=function(a,b,c,d,f,g,k,l,m){null==
k&&(k=1);null==g&&(g=4);null==f&&(f=4);(l=a.get_premultiplied())&&a.set_premultiplied(!1);se.blur(a,b,c,d,f,g,k);a.dirty=!0;a.version++;l&&a.set_premultiplied(!0);return a};Qa.getColorBoundsRect=function(a,b,c,d,f){var g=a.width+1,k=0,l=a.height+1,m=0;switch(f){case 1:f=c;c=(f>>>16&255)<<24|(f>>>8&255)<<16|(f&255)<<8|f>>>24&255;f=b;b=(f>>>16&255)<<24|(f>>>8&255)<<16|(f&255)<<8|f>>>24&255;break;case 2:f=c,c=(f>>>8&255)<<24|(f>>>16&255)<<16|(f>>>24&255)<<8|f&255,f=b,b=(f>>>8&255)<<24|(f>>>16&255)<<
16|(f>>>24&255)<<8|f&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);f=0;for(var h=a.width;f<h;){var r=f++;var p=!1;for(var w=0,u=a.height;w<u;){var n=w++;p=a.getPixel32(r,n,0);if(p=d?(p&b)==c:(p&b)!=c){r<g&&(g=r);break}}if(p)break}f=0;for(h=a.width;f<h;){r=f++;r=a.width-1-r;p=!1;w=0;for(u=a.height;w<u;)if(n=w++,p=a.getPixel32(r,n,0),p=d?(p&b)==c:(p&b)!=c){r>k&&(k=r);break}if(p)break}f=0;for(h=a.height;f<h;){n=
f++;p=!1;w=0;for(u=a.width;w<u;)if(r=w++,p=a.getPixel32(r,n,0),p=d?(p&b)==c:(p&b)!=c){n<l&&(l=n);break}if(p)break}f=0;for(h=a.height;f<h;){n=f++;n=a.height-1-n;p=!1;w=0;for(u=a.width;w<u;)if(r=w++,p=a.getPixel32(r,n,0),p=d?(p&b)==c:(p&b)!=c){n>m&&(m=n);break}if(p)break}d=k-g;c=m-l;0<d&&++d;0<c&&++c;0>d&&(d=0);0>c&&(c=0);g==k&&(d=1);l==m&&(c=1);g>a.width&&(g=0);l>a.height&&(l=0);return new Uc(g,l,d,c)};Qa.getPixel=function(a,b,c,d){var f=0,g=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:f=(g[b]&255)<<24|(g[b+1]&255)<<16|(g[b+2]&255)<<8|g[b+3]&255;break;case 1:f=(g[b+1]&255)<<24|(g[b+2]&255)<<16|(g[b+3]&255)<<8|g[b]&255;break;case 2:f=(g[b+2]&255)<<24|(g[b+1]&255)<<16|(g[b]&255)<<8|g[b+3]&255}a&&0!=(f&255)&&255!=(f&255)&&(K.unmult=255/(f&255),f=(K.__clamp[Math.round((f>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((f>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((f>>>8&255)*K.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 f=0,g=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:f=(g[b]&255)<<24|(g[b+1]&255)<<16|(g[b+2]&255)<<8|g[b+3]&255;break;case 1:f=
(g[b+1]&255)<<24|(g[b+2]&255)<<16|(g[b+3]&255)<<8|g[b]&255;break;case 2:f=(g[b+2]&255)<<24|(g[b+1]&255)<<16|(g[b]&255)<<8|g[b+3]&255}a&&0!=(f&255)&&255!=(f&255)&&(K.unmult=255/(f&255),f=(K.__clamp[Math.round((f>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((f>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((f>>>8&255)*K.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 bb(new ArrayBuffer(4*(b.width*b.height|0))),f=a.buffer.data,g=a.buffer.format,k=a.buffer.premultiplied;a=new ae(a,b);for(var l,m,h=b=m=0,r=a.height;h<r;){l=h++;l=a.byteOffset+a.stride*l;for(var p=0,w=a.width;p<w;){p++;var u=g,n=k;null==n&&(n=!1);null==u&&(u=0);switch(u){case 0:m=(f[l]&255)<<24|(f[l+1]&255)<<16|(f[l+2]&255)<<8|f[l+3]&255;break;case 1:m=(f[l+1]&255)<<24|(f[l+2]&255)<<16|(f[l+3]&255)<<8|f[l]&
255;break;case 2:m=(f[l+2]&255)<<24|(f[l+1]&255)<<16|(f[l]&255)<<8|f[l+3]&255}n&&0!=(m&255)&&255!=(m&255)&&(K.unmult=255/(m&255),m=(K.__clamp[Math.round((m>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((m>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((m>>>8&255)*K.unmult)]&255)<<8|m&255);switch(c){case 1:m=(m&255)<<24|(m>>>24&255)<<16|(m>>>16&255)<<8|m>>>8&255;break;case 2:m=(m>>>8&255)<<24|(m>>>16&255)<<16|(m>>>24&255)<<8|m&255}d.b[b++]=m>>>24&255;d.b[b++]=m>>>16&255;d.b[b++]=m>>>8&255;
d.b[b++]=m&255;l+=4}}return d};Qa.merge=function(a,b,c,d,f,g,k,l){if(null!=a.buffer.data&&null!=b.buffer.data){c=new ae(b,c);d=new ae(a,new Uc(d.x,d.y,c.width,c.height));var m=b.buffer.data,h=a.buffer.data,r=b.buffer.format,p=a.buffer.format;b=b.buffer.premultiplied;for(var w=a.buffer.premultiplied,u,n,t=0,A=0,q=0,y=d.height;q<y;){n=q++;u=c.byteOffset+c.stride*n;n=d.byteOffset+d.stride*n;for(var E=0,L=d.width;E<L;){E++;var v=r,C=b;null==C&&(C=!1);null==v&&(v=0);switch(v){case 0:t=(m[u]&255)<<24|(m[u+
1]&255)<<16|(m[u+2]&255)<<8|m[u+3]&255;break;case 1:t=(m[u+1]&255)<<24|(m[u+2]&255)<<16|(m[u+3]&255)<<8|m[u]&255;break;case 2:t=(m[u+2]&255)<<24|(m[u+1]&255)<<16|(m[u]&255)<<8|m[u+3]&255}C&&0!=(t&255)&&255!=(t&255)&&(K.unmult=255/(t&255),t=(K.__clamp[Math.round((t>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((t>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((t>>>8&255)*K.unmult)]&255)<<8|t&255);v=p;C=w;null==C&&(C=!1);null==v&&(v=0);switch(v){case 0:A=(h[n]&255)<<24|(h[n+1]&255)<<16|(h[n+
2]&255)<<8|h[n+3]&255;break;case 1:A=(h[n+1]&255)<<24|(h[n+2]&255)<<16|(h[n+3]&255)<<8|h[n]&255;break;case 2:A=(h[n+2]&255)<<24|(h[n+1]&255)<<16|(h[n]&255)<<8|h[n+3]&255}C&&0!=(A&255)&&255!=(A&255)&&(K.unmult=255/(A&255),A=(K.__clamp[Math.round((A>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((A>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((A>>>8&255)*K.unmult)]&255)<<8|A&255);A=((((t>>>24&255)*f+(A>>>24&255)*(256-f))/256|0)&255)<<24|(A>>>16&255)<<16|(A>>>8&255)<<8|A&255;A=(A>>>24&255)<<
24|((((t>>>16&255)*g+(A>>>16&255)*(256-g))/256|0)&255)<<16|(A>>>8&255)<<8|A&255;A=(A>>>24&255)<<24|(A>>>16&255)<<16|((((t>>>8&255)*k+(A>>>8&255)*(256-k))/256|0)&255)<<8|A&255;A=(A>>>24&255)<<24|(A>>>16&255)<<16|(A>>>8&255)<<8|(((t&255)*l+(A&255)*(256-l))/256|0)&255;v=p;C=w;null==C&&(C=!1);null==v&&(v=0);C&&(0==(A&255)?0!=A&&(A=0):255!=(A&255)&&(K.a16=K.__alpha16[A&255],A=((A>>>24&255)*K.a16>>16&255)<<24|((A>>>16&255)*K.a16>>16&255)<<16|((A>>>8&255)*K.a16>>16&255)<<8|A&255));switch(v){case 0:h[n]=
A>>>24&255;h[n+1]=A>>>16&255;h[n+2]=A>>>8&255;h[n+3]=A&255;break;case 1:h[n]=A&255;h[n+1]=A>>>24&255;h[n+2]=A>>>16&255;h[n+3]=A>>>8&255;break;case 2:h[n]=A>>>8&255,h[n+1]=A>>>16&255,h[n+2]=A>>>24&255,h[n+3]=A&255}u+=4;n+=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=0,f=0,g=b.length/4|0;f<g;){var k=f++,l=4*k,m=c,h=!1;null==h&&(h=!1);null==m&&(m=0);switch(m){case 0:d=(b[l]&255)<<24|(b[l+1]&255)<<16|(b[l+2]&
255)<<8|b[l+3]&255;break;case 1:d=(b[l+1]&255)<<24|(b[l+2]&255)<<16|(b[l+3]&255)<<8|b[l]&255;break;case 2:d=(b[l+2]&255)<<24|(b[l+1]&255)<<16|(b[l]&255)<<8|b[l+3]&255}h&&0!=(d&255)&&255!=(d&255)&&(K.unmult=255/(d&255),d=(K.__clamp[Math.round((d>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((d>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((d>>>8&255)*K.unmult)]&255)<<8|d&255);k*=4;l=c;m=!0;null==m&&(m=!1);null==l&&(l=0);m&&(0==(d&255)?0!=d&&(d=0):255!=(d&255)&&(K.a16=K.__alpha16[d&255],
d=((d>>>24&255)*K.a16>>16&255)<<24|((d>>>16&255)*K.a16>>16&255)<<16|((d>>>8&255)*K.a16>>16&255)<<8|d&255));switch(l){case 0:b[k]=d>>>24&255;b[k+1]=d>>>16&255;b[k+2]=d>>>8&255;b[k+3]=d&255;break;case 1:b[k]=d&255;b[k+1]=d>>>24&255;b[k+2]=d>>>16&255;b[k+3]=d>>>8&255;break;case 2:b[k]=d>>>8&255,b[k+1]=d>>>16&255,b[k+2]=d>>>24&255,b[k+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 f=b*c*4;f=null!=f?new Uint8Array(f):
null;f=new mf(f,b,c);for(var g=a.width,k=a.height,l=a.get_data(),m=f.data,h,r,p,w,u,n,t,A,q,y=0;y<c;)for(var E=y++,v=0,C=b;v<C;)u=v++,A=(u+.5)/b*g-.5,q=(E+.5)/c*k-.5,n=A|0,t=q|0,h=4*(t*g+n),r=n<g-1?h+4:h,p=t<k-1?h+4*g:h,w=r!=h?p+4:p,u=4*(E*b+u),n=A-n,t=q-t,q=1-n,A=1-t,m[u]=(L.toFloat(l[h])*q+L.toFloat(l[r])*n)*A+(L.toFloat(l[p])*q+L.toFloat(l[w])*n)*t|0,m[u+1]=(L.toFloat(l[h+1])*q+L.toFloat(l[r+1])*n)*A+(L.toFloat(l[p+1])*q+L.toFloat(l[w+1])*n)*t|0,m[u+2]=(L.toFloat(l[h+2])*q+L.toFloat(l[r+2])*n)*
A+(L.toFloat(l[p+2])*q+L.toFloat(l[w+2])*n)*t|0,m[u+3]=0==l[r+3]||0==l[p+3]||0==l[w+3]?0:l[h+3];d.data=f.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,f=a.get_data(),g=b*c*4;g=null!=g?new Uint8Array(g):null;for(var k,l,m=0,h=d.height;m<h;)for(var r=m++,p=0,w=d.width;p<w;)l=p++,k=4*(r*d.width+l),l=4*(r*b+l),g[l]=f[k],g[l+1]=f[k+1],g[l+2]=f[k+2],g[l+3]=f[k+3];d.data=g;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 f=0;var g=1;var k=2;var l=3;break;case 1:f=1;g=2;k=3;l=0;break;case 2:f=2,g=1,k=0,l=3}switch(b){case 0:var m=0;var h=1;var r=2;var p=3;break;case 1:m=1;h=2;r=3;p=0;break;case 2:m=2,h=1,r=0,p=3}for(var w=0;w<d;){var u=4*w++;var n=c[u+f];var t=c[u+g];var A=c[u+k];var q=c[u+l];
c[u+m]=n;c[u+h]=t;c[u+r]=A;c[u+p]=q}a.buffer.format=b;a.dirty=!0;a.version++}};Qa.setPixel=function(a,b,c,d,f){switch(f){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}var g=0,k=a.buffer.data,l=4*(c+a.offsetY)*a.buffer.width+4*(b+a.offsetX);f=a.buffer.format;var m=a.buffer.premultiplied;null==m&&(m=!1);null==f&&(f=0);switch(f){case 0:g=(k[l]&255)<<24|(k[l+1]&255)<<16|(k[l+2]&255)<<8|k[l+3]&255;break;case 1:g=(k[l+
1]&255)<<24|(k[l+2]&255)<<16|(k[l+3]&255)<<8|k[l]&255;break;case 2:g=(k[l+2]&255)<<24|(k[l+1]&255)<<16|(k[l]&255)<<8|k[l+3]&255}m&&0!=(g&255)&&255!=(g&255)&&(K.unmult=255/(g&255),g=(K.__clamp[Math.round((g>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((g>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((g>>>8&255)*K.unmult)]&255)<<8|g&255);d=(d>>>24&255)<<24|(d>>>16&255)<<16|(d>>>8&255)<<8|g&255;k=a.buffer.data;l=4*(c+a.offsetY)*a.buffer.width+4*(b+a.offsetX);f=a.buffer.format;m=a.buffer.premultiplied;
null==m&&(m=!1);null==f&&(f=0);m&&(0==(d&255)?0!=d&&(d=0):255!=(d&255)&&(K.a16=K.__alpha16[d&255],d=((d>>>24&255)*K.a16>>16&255)<<24|((d>>>16&255)*K.a16>>16&255)<<16|((d>>>8&255)*K.a16>>16&255)<<8|d&255));switch(f){case 0:k[l]=d>>>24&255;k[l+1]=d>>>16&255;k[l+2]=d>>>8&255;k[l+3]=d&255;break;case 1:k[l]=d&255;k[l+1]=d>>>24&255;k[l+2]=d>>>16&255;k[l+3]=d>>>8&255;break;case 2:k[l]=d>>>8&255,k[l+1]=d>>>16&255,k[l+2]=d>>>24&255,k[l+3]=d&255}a.dirty=!0;a.version++};Qa.setPixel32=function(a,b,c,d,f){switch(f){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);var g=a.buffer.data;b=4*(c+a.offsetY)*a.buffer.width+4*(b+a.offsetX);f=a.buffer.format;c=a.buffer.premultiplied;null==c&&(c=!1);null==f&&(f=0);c&&(0==(d&255)?0!=d&&(d=0):255!=(d&255)&&(K.a16=K.__alpha16[d&255],d=((d>>>24&255)*K.a16>>16&255)<<24|((d>>>16&255)*K.a16>>16&255)<<16|((d>>>8&255)*K.a16>>
16&255)<<8|d&255));switch(f){case 0:g[b]=d>>>24&255;g[b+1]=d>>>16&255;g[b+2]=d>>>8&255;g[b+3]=d&255;break;case 1:g[b]=d&255;g[b+1]=d>>>24&255;g[b+2]=d>>>16&255;g[b+3]=d>>>8&255;break;case 2:g[b]=d>>>8&255,g[b+1]=d>>>16&255,g[b+2]=d>>>24&255,g[b+3]=d&255}a.dirty=!0;a.version++};Qa.setPixels=function(a,b,c,d,f){if(null!=a.buffer.data){var g=a.buffer.data,k=a.buffer.format,l=a.buffer.premultiplied;b=new ae(a,b);var m=a.get_transparent(),h=c.bytes;c=c.offset;f=f!=Xf.BIG_ENDIAN;for(var r=0,p=b.height;r<
p;){var w=r++;w=b.byteOffset+b.stride*w;for(var u=0,n=b.width;u<n;){var t=u++;var A=f?h.getInt32(c):h.b[c+3]|h.b[c+2]<<8|h.b[c+1]<<16|h.b[c]<<24;c+=4;switch(d){case 1:A=(A>>>16&255)<<24|(A>>>8&255)<<16|(A&255)<<8|A>>>24&255;break;case 2:A=(A>>>8&255)<<24|(A>>>16&255)<<16|(A>>>24&255)<<8|A&255}m||(A=(A>>>24&255)<<24|(A>>>16&255)<<16|(A>>>8&255)<<8|255);t=w+4*t;var q=k,y=l;null==y&&(y=!1);null==q&&(q=0);y&&(0==(A&255)?0!=A&&(A=0):255!=(A&255)&&(K.a16=K.__alpha16[A&255],A=((A>>>24&255)*K.a16>>16&255)<<
24|((A>>>16&255)*K.a16>>16&255)<<16|((A>>>8&255)*K.a16>>16&255)<<8|A&255));switch(q){case 0:g[t]=A>>>24&255;g[t+1]=A>>>16&255;g[t+2]=A>>>8&255;g[t+3]=A&255;break;case 1:g[t]=A&255;g[t+1]=A>>>24&255;g[t+2]=A>>>16&255;g[t+3]=A>>>8&255;break;case 2:g[t]=A>>>8&255,g[t+1]=A>>>16&255,g[t+2]=A>>>24&255,g[t+3]=A&255}}}a.dirty=!0;a.version++}};Qa.threshold=function(a,b,c,d,f,g,k,l,m,h){switch(h){case 1:var z=k;k=(z>>>16&255)<<24|(z>>>8&255)<<16|(z&255)<<8|z>>>24&255;z=l;l=(z>>>16&255)<<24|(z>>>8&255)<<16|
(z&255)<<8|z>>>24&255;z=g;g=(z>>>16&255)<<24|(z>>>8&255)<<16|(z&255)<<8|z>>>24&255;break;case 2:z=k,k=(z>>>8&255)<<24|(z>>>16&255)<<16|(z>>>24&255)<<8|z&255,z=l,l=(z>>>8&255)<<24|(z>>>16&255)<<16|(z>>>24&255)<<8|z&255,z=g,g=(z>>>8&255)<<24|(z>>>16&255)<<16|(z>>>24&255)<<8|z&255}switch(f){case "!=":f=0;break;case "<":f=2;break;case "<=":f=3;break;case "==":f=1;break;case ">":f=4;break;case ">=":f=5;break;default:f=-1}if(-1==f)return 0;z=b.buffer.data;var p=a.buffer.data;if(null==z||null==p)return 0;
var r=0;c=new ae(b,c);d=new ae(a,new Uc(d.x,d.y,c.width,c.height));var w=b.buffer.format,u=a.buffer.format;b=b.buffer.premultiplied;for(var n=a.buffer.premultiplied,t,A,q=0,y=0,E=d.height;y<E;){A=y++;t=c.byteOffset+c.stride*A;A=d.byteOffset+d.stride*A;for(var v=0,C=d.width;v<C;){v++;h=w;var x=b;null==x&&(x=!1);null==h&&(h=0);switch(h){case 0:q=(z[t]&255)<<24|(z[t+1]&255)<<16|(z[t+2]&255)<<8|z[t+3]&255;break;case 1:q=(z[t+1]&255)<<24|(z[t+2]&255)<<16|(z[t+3]&255)<<8|z[t]&255;break;case 2:q=(z[t+2]&
255)<<24|(z[t+1]&255)<<16|(z[t]&255)<<8|z[t+3]&255}x&&0!=(q&255)&&255!=(q&255)&&(K.unmult=255/(q&255),q=(K.__clamp[Math.round((q>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((q>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((q>>>8&255)*K.unmult)]&255)<<8|q&255);h=q&l;x=h>>>24&255;var G=g>>>24&255;x!=G?h=L.gt(x,G)?1:-1:(x=h>>>16&255,G=g>>>16&255,x!=G?h=L.gt(x,G)?1:-1:(x=h>>>8&255,G=g>>>8&255,x!=G?h=L.gt(x,G)?1:-1:(x=h&255,G=g&255,h=x!=G?L.gt(x,G)?1:-1:0)));switch(f){case 0:h=0!=h;break;
case 1:h=0==h;break;case 2:h=-1==h;break;case 3:h=0==h||-1==h;break;case 4:h=1==h;break;case 5:h=0==h||1==h;break;default:h=!1}if(h){h=u;x=n;null==x&&(x=!1);null==h&&(h=0);x&&(0==(k&255)?0!=k&&(k=0):255!=(k&255)&&(K.a16=K.__alpha16[k&255],k=((k>>>24&255)*K.a16>>16&255)<<24|((k>>>16&255)*K.a16>>16&255)<<16|((k>>>8&255)*K.a16>>16&255)<<8|k&255));switch(h){case 0:p[A]=k>>>24&255;p[A+1]=k>>>16&255;p[A+2]=k>>>8&255;p[A+3]=k&255;break;case 1:p[A]=k&255;p[A+1]=k>>>24&255;p[A+2]=k>>>16&255;p[A+3]=k>>>8&255;
break;case 2:p[A]=k>>>8&255,p[A+1]=k>>>16&255,p[A+2]=k>>>24&255,p[A+3]=k&255}++r}else if(m)switch(h=u,x=n,null==x&&(x=!1),null==h&&(h=0),x&&(0==(q&255)?0!=q&&(q=0):255!=(q&255)&&(K.a16=K.__alpha16[q&255],q=((q>>>24&255)*K.a16>>16&255)<<24|((q>>>16&255)*K.a16>>16&255)<<16|((q>>>8&255)*K.a16>>16&255)<<8|q&255)),h){case 0:p[A]=q>>>24&255;p[A+1]=q>>>16&255;p[A+2]=q>>>8&255;p[A+3]=q&255;break;case 1:p[A]=q&255;p[A+1]=q>>>24&255;p[A+2]=q>>>16&255;p[A+3]=q>>>8&255;break;case 2:p[A]=q>>>8&255,p[A+1]=q>>>
16&255,p[A+2]=q>>>24&255,p[A+3]=q&255}t+=4;A+=4}}0<r&&(a.dirty=!0,a.version++);return r};Qa.unmultiplyAlpha=function(a){var b=a.buffer.data;if(null!=b){for(var c=a.buffer.format,d=0,f=0,g=b.length/4|0;f<g;){var k=f++,l=4*k,m=c,h=!0;null==h&&(h=!1);null==m&&(m=0);switch(m){case 0:d=(b[l]&255)<<24|(b[l+1]&255)<<16|(b[l+2]&255)<<8|b[l+3]&255;break;case 1:d=(b[l+1]&255)<<24|(b[l+2]&255)<<16|(b[l+3]&255)<<8|b[l]&255;break;case 2:d=(b[l+2]&255)<<24|(b[l+1]&255)<<16|(b[l]&255)<<8|b[l+3]&255}h&&0!=(d&255)&&
255!=(d&255)&&(K.unmult=255/(d&255),d=(K.__clamp[Math.round((d>>>24&255)*K.unmult)]&255)<<24|(K.__clamp[Math.round((d>>>16&255)*K.unmult)]&255)<<16|(K.__clamp[Math.round((d>>>8&255)*K.unmult)]&255)<<8|d&255);k*=4;l=c;m=!1;null==m&&(m=!1);null==l&&(l=0);m&&(0==(d&255)?0!=d&&(d=0):255!=(d&255)&&(K.a16=K.__alpha16[d&255],d=((d>>>24&255)*K.a16>>16&255)<<24|((d>>>16&255)*K.a16>>16&255)<<16|((d>>>8&255)*K.a16>>16&255)<<8|d&255));switch(l){case 0:b[k]=d>>>24&255;b[k+1]=d>>>16&255;b[k+2]=d>>>8&255;b[k+3]=
d&255;break;case 1:b[k]=d&255;b[k+1]=d>>>24&255;b[k+2]=d>>>16&255;b[k+3]=d>>>8&255;break;case 2:b[k]=d>>>8&255,b[k+1]=d>>>16&255,b[k+2]=d>>>24&255,b[k+3]=d&255}}a.buffer.premultiplied=!1;a.dirty=!0;a.version++}};Qa.__boxBlur=function(a,b,c,d,f,g){b.set(a);f|=0;g|=0;Qa.__boxBlurH(b,a,c,d,f,0);Qa.__boxBlurH(b,a,c,d,f,1);Qa.__boxBlurH(b,a,c,d,f,2);Qa.__boxBlurH(b,a,c,d,f,3);f=1/(g+g+1);for(var k=4*c,l,m,h,r,p,w,u=0,n=c;u<n;){l=u++;m=l*=4;h=l+g*k;r=a[l];p=a[l+k*(d-1)];w=(g+1)*r;for(var t=0,A=g;t<A;){var q=
t++;w+=a[l+q*k]}t=0;for(A=g+1;t<A;)t++,w+=a[h]-r,b[l]=Math.round(L.toFloat(w)*f),h+=k,l+=k;r=g+1;for(t=d-g;r<t;)r++,w+=a[h]-a[m],b[l]=Math.round(L.toFloat(w)*f),m+=k,h+=k,l+=k;h=d-g;for(r=d;h<r;)h++,w+=p-a[m],b[l]=Math.round(L.toFloat(w)*f),m+=k,l+=k}f=1/(g+g+1);k=4*c;u=0;for(n=c;u<n;){l=u++;m=l=4*l+1;h=l+g*k;r=a[l];p=a[l+k*(d-1)];w=(g+1)*r;t=0;for(A=g;t<A;)q=t++,w+=a[l+q*k];t=0;for(A=g+1;t<A;)t++,w+=a[h]-r,b[l]=Math.round(L.toFloat(w)*f),h+=k,l+=k;r=g+1;for(t=d-g;r<t;)r++,w+=a[h]-a[m],b[l]=Math.round(L.toFloat(w)*
f),m+=k,h+=k,l+=k;h=d-g;for(r=d;h<r;)h++,w+=p-a[m],b[l]=Math.round(L.toFloat(w)*f),m+=k,l+=k}f=1/(g+g+1);k=4*c;u=0;for(n=c;u<n;){l=u++;m=l=4*l+2;h=l+g*k;r=a[l];p=a[l+k*(d-1)];w=(g+1)*r;t=0;for(A=g;t<A;)q=t++,w+=a[l+q*k];t=0;for(A=g+1;t<A;)t++,w+=a[h]-r,b[l]=Math.round(L.toFloat(w)*f),h+=k,l+=k;r=g+1;for(t=d-g;r<t;)r++,w+=a[h]-a[m],b[l]=Math.round(L.toFloat(w)*f),m+=k,h+=k,l+=k;h=d-g;for(r=d;h<r;)h++,w+=p-a[m],b[l]=Math.round(L.toFloat(w)*f),m+=k,l+=k}f=1/(g+g+1);k=4*c;u=0;for(n=c;u<n;){l=u++;m=l=
4*l+3;h=l+g*k;r=a[l];p=a[l+k*(d-1)];w=(g+1)*r;t=0;for(A=g;t<A;)q=t++,w+=a[l+q*k];t=0;for(A=g+1;t<A;)t++,w+=a[h]-r,b[l]=Math.round(L.toFloat(w)*f),h+=k,l+=k;r=g+1;for(t=d-g;r<t;)r++,w+=a[h]-a[m],b[l]=Math.round(L.toFloat(w)*f),m+=k,h+=k,l+=k;h=d-g;for(r=d;h<r;)h++,w+=p-a[m],b[l]=Math.round(L.toFloat(w)*f),m+=k,l+=k}};Qa.__boxBlurH=function(a,b,c,d,f,g){for(var k=1/(f+f+1),l,m,h,r,p,w,u=0;u<d;){m=l=u++*c;h=l+f;r=a[4*l+g];p=a[4*(l+c-1)+g];w=(f+1)*r;for(var n=0,t=f;n<t;){var A=n++;w+=a[4*(l+A)+g]}n=0;
for(t=f+1;n<t;)n++,w+=a[4*h+g]-r,b[4*l+g]=Math.round(L.toFloat(w)*k),++h,++l;r=f+1;for(n=c-f;r<n;)r++,w+=a[4*h+g]-a[4*m+g],b[4*l+g]=Math.round(L.toFloat(w)*k),++h,++m,++l;h=c-f;for(r=c;h<r;)h++,w+=p-a[4*m+g],b[4*l+g]=Math.round(L.toFloat(w)*k),++m,++l}};Qa.__boxBlurT=function(a,b,c,d,f,g){for(var k=1/(f+f+1),l=4*c,m,h,r,p,w,u,n=0;n<c;){h=m=4*n++ +g;r=m+f*l;p=a[m];w=a[m+l*(d-1)];u=(f+1)*p;for(var t=0,A=f;t<A;){var q=t++;u+=a[m+q*l]}t=0;for(A=f+1;t<A;)t++,u+=a[r]-p,b[m]=Math.round(L.toFloat(u)*k),r+=
l,m+=l;p=f+1;for(t=d-f;p<t;)p++,u+=a[r]-a[h],b[m]=Math.round(L.toFloat(u)*k),h+=l,r+=l,m+=l;r=d-f;for(p=d;r<p;)r++,u+=w-a[h],b[m]=Math.round(L.toFloat(u)*k),h+=l,m+=l}};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 f=[],g=0;g<b;){var k=g++;f.push(k<a?c:d)}return f};
Qa.__pixelCompare=function(a,b){var c=a>>>24&255,d=b>>>24&255;if(c!=d)return L.gt(c,d)?1:-1;c=a>>>16&255;d=b>>>16&255;if(c!=d)return L.gt(c,d)?1:-1;c=a>>>8&255;d=b>>>8&255;if(c!=d)return L.gt(c,d)?1:-1;c=a&255;d=b&255;return c!=d?L.gt(c,d)?1:-1:0};Qa.__translatePixel=function(a,b,c,d,f,g,k){c=4*(g*(c.width|0)+f);b=Qa.__calculateSourceOffset(b,d,f,g);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],k=L.toFloat(a[b+3])*k|0,a[c+3]=0>k?0:255<k?255:k)};var ae=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"]=ae;ae.__name__="lime._internal.graphics._ImageDataUtil.ImageDataView";ae.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 Uc);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__:ae};var se=function(){};h["lime._internal.graphics.StackBlur"]=se;se.__name__="lime._internal.graphics.StackBlur";se.blur=function(a,b,c,d,f,g,k){a.copyPixels(b,c,d);se.__stackBlurCanvasRGBA(a,c.width|0,c.height|0,f,g,k)};se.__stackBlurCanvasRGBA=function(a,b,c,d,f,g){d=
Math.round(d)>>1;f=Math.round(f)>>1;if(null!=se.MUL_TABLE&&(d>=se.MUL_TABLE.length&&(d=se.MUL_TABLE.length-1),f>=se.MUL_TABLE.length&&(f=se.MUL_TABLE.length-1),!(0>d||0>f))){1>g&&(g=1);3<g&&(g=3);a=a.get_data();var k,l=d+d+1;var m=f+f+1;var h=b-1,r=c-1,p=d+1,w=f+1,u=new li,n=u;var t=1;for(var A=l;t<A;)t++,n=n.n=new li;n.n=u;var q=l=new li;t=1;for(A=m;t<A;)t++,q=q.n=new li;q.n=l;for(var y=se.MUL_TABLE[d],E=se.SHG_TABLE[d],L=se.MUL_TABLE[f],v=se.SHG_TABLE[f];0<g;){--g;var C=k=0;var x=y,G=E;var Y=c;
do{var B=a[k];m=p*B;var H=a[k+1];var D=p*H;var J=a[k+2];var K=p*J;t=a[k+3];var qa=p*t;n=u;q=p;do n.r=B,n.g=H,n.b=J,n.a=t,n=n.n;while(-1<--q);t=1;for(A=p;t<A;)q=t++,q=k+((h<q?h:q)<<2),m+=n.r=a[q],D+=n.g=a[q+1],K+=n.b=a[q+2],qa+=n.a=a[q+3],n=n.n;A=u;n=0;for(t=b;n<t;)q=n++,a[k++]=m*x>>>G,a[k++]=D*x>>>G,a[k++]=K*x>>>G,a[k++]=qa*x>>>G,q=q+d+1,q=C+(q<h?q:h)<<2,m-=A.r-(A.r=a[q]),D-=A.g-(A.g=a[q+1]),K-=A.b-(A.b=a[q+2]),qa-=A.a-(A.a=a[q+3]),A=A.n;C+=b}while(0<--Y);x=L;G=v;Y=0;for(C=b;Y<C;){n=Y++;k=n<<2;B=
a[k];m=w*B;H=a[k+1];D=w*H;J=a[k+2];K=w*J;t=a[k+3];qa=w*t;q=l;k=0;for(A=w;k<A;)k++,q.r=B,q.g=H,q.b=J,q.a=t,q=q.n;t=b;A=1;for(B=f+1;A<B;)H=A++,k=t+n<<2,m+=q.r=a[k],D+=q.g=a[k+1],K+=q.b=a[k+2],qa+=q.a=a[k+3],q=q.n,H<r&&(t+=b);k=n;A=l;if(0<g)for(B=0,H=c;B<H;)J=B++,q=k<<2,t=qa*x>>>G,a[q+3]=t,0<t?(a[q]=m*x>>>G,a[q+1]=D*x>>>G,a[q+2]=K*x>>>G):a[q]=a[q+1]=a[q+2]=0,q=J+w,q=n+(q<r?q:r)*b<<2,m-=A.r-(A.r=a[q]),D-=A.g-(A.g=a[q+1]),K-=A.b-(A.b=a[q+2]),qa-=A.a-(A.a=a[q+3]),A=A.n,k+=b;else for(var va=0,X=c;va<X;){var N=
va++;q=k<<2;t=qa*x>>>G;a[q+3]=t;0<t?(t=255/t,B=(m*x>>>G)*t|0,H=(D*x>>>G)*t|0,J=(K*x>>>G)*t|0,a[q]=255<B?255:B,a[q+1]=255<H?255:H,a[q+2]=255<J?255:J):a[q]=a[q+1]=a[q+2]=0;q=N+w;q=n+(q<r?q:r)*b<<2;m-=A.r-(A.r=a[q]);D-=A.g-(A.g=a[q+1]);K-=A.b-(A.b=a[q+2]);qa-=A.a-(A.a=a[q+3]);A=A.n;k+=b}}}}};var li=function(){this.a=this.b=this.g=this.r=0;this.n=null};h["lime._internal.graphics.BlurStack"]=li;li.__name__="lime._internal.graphics.BlurStack";li.prototype={r:null,g:null,b:null,a:null,n:null,__class__:li};
var Wo=function(){};h["lime._internal.macros.AssetsMacro"]=Wo;Wo.__name__="lime._internal.macros.AssetsMacro";var ho=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app.Event"]=ho;ho.__name__="lime.app.Event";ho.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,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,
0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,
a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__class__:ho};var ob=function(a,b){if(null!=a)try{this.value=a(),this.isComplete=!0}catch(c){db.lastError=c,this.error=J.caught(c).unwrap(),this.isError=!0}};h["lime.app.Future"]=ob;ob.__name__="lime.app.Future";ob.ofEvents=function(a,b,c){var d=new od;a.add(q(d,d.complete),!0);null!=b&&b.add(q(d,d.error),!0);null!=c&&c.add(q(d,d.progress),!0);return d.future};ob.withError=function(a){var b=new ob;b.isError=!0;b.error=a;return b};ob.withValue=
function(a){var b=new ob;b.isComplete=!0;b.value=a;return b};ob.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){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 ob;b.isError=!0;b.error=this.error;return b}var c=new od;this.onError(q(c,c.error));this.onProgress(q(c,c.progress));
this.onComplete(function(b){b=a(b);b.onError(q(c,c.error));b.onComplete(q(c,c.complete))});return c.future},__class__:ob};var od=function(){this.future=new ob};h["lime.app.Promise"]=od;od.__name__="lime.app.Promise";od.prototype={future: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(q(this,this.complete));a.onError(q(this,this.error));a.onProgress(q(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 f=d[c];++c;f(a,b)}return this},get_isComplete:function(){return this.future.isComplete},get_isError:function(){return this.future.isError},__class__:od,__properties__:{get_isError:"get_isError",get_isComplete:"get_isComplete"}};var ln=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_Float_Float_Float_Void"]=ln;ln.__name__="lime.app._Event_Float_Float_Float_Void";ln.prototype={canceled:null,
__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},remove:function(a){for(var b=
this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b,c){this.canceled=!1;for(var d=this.__listeners,f=this.__repeat,g=0;g<d.length&&(d[g](a,b,c),f[g]?++g:this.remove(d[g]),!this.canceled););},__class__:ln};var mn=function(){this.canceled=
!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_Float_Float_Int_Void"]=mn;mn.__name__="lime.app._Event_Float_Float_Int_Void";mn.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,
b,c){this.canceled=!1;for(var d=this.__listeners,f=this.__repeat,g=0;g<d.length&&(d[g](a,b,c),f[g]?++g:this.remove(d[g]),!this.canceled););},__class__:mn};var lj=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_Float_Float_Void"]=lj;lj.__name__="lime.app._Event_Float_Float_Void";lj.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;
if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,
1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,f=0;f<c.length&&(c[f](a,b),d[f]?++f:this.remove(c[f]),!this.canceled););},__class__:lj};var nn=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_Float_Float_lime_ui_MouseButton_Void"]=nn;nn.__name__="lime.app._Event_Float_Float_lime_ui_MouseButton_Void";
nn.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},
remove:function(a){for(var b=this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b,c){this.canceled=!1;for(var d=this.__listeners,f=this.__repeat,g=0;g<d.length&&(d[g](a,b,c),f[g]?++g:this.remove(d[g]),!this.canceled););},__class__:nn};
var on=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_Float_Float_lime_ui_MouseWheelMode_Void"]=on;on.__name__="lime.app._Event_Float_Float_lime_ui_MouseWheelMode_Void";on.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,
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(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,
a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b,c){this.canceled=!1;for(var d=this.__listeners,f=this.__repeat,g=0;g<d.length&&(d[g](a,b,c),f[g]?++g:this.remove(d[g]),!this.canceled););},__class__:on};var pn=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_Int_Float_Void"]=pn;pn.__name__="lime.app._Event_Int_Float_Void";pn.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==
b&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,
1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,f=0;f<c.length&&(c[f](a,b),d[f]?++f:this.remove(c[f]),!this.canceled););},__class__:pn};var cl=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_Int_Int_Void"]=
cl;cl.__name__="lime.app._Event_Int_Int_Void";cl.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,f=0;f<c.length&&(c[f](a,b),d[f]?++f:this.remove(c[f]),!this.canceled););
},__class__:cl};var dh=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_Int_Void"]=dh;dh.__name__="lime.app._Event_Int_Void";dh.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__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__:dh};var qn=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_Int_lime_ui_JoystickHatPosition_Void"]=qn;qn.__name__="lime.app._Event_Int_lime_ui_JoystickHatPosition_Void";qn.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,f=this.__priorities.length;d<
f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,
1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,f=0;f<c.length&&(c[f](a,b),d[f]?++f:this.remove(c[f]),!this.canceled););},__class__:qn};var rn=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_String_Int_Int_Void"]=rn;rn.__name__="lime.app._Event_String_Int_Int_Void";
rn.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},
remove:function(a){for(var b=this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b,c){this.canceled=!1;for(var d=this.__listeners,f=this.__repeat,g=0;g<d.length&&(d[g](a,b,c),f[g]?++g:this.remove(d[g]),!this.canceled););},__class__:rn};
var dl=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_String_Void"]=dl;dl.__name__="lime.app._Event_String_Void";dl.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__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__:dl};var Zc=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_Void_Void"]=Zc;Zc.__name__="lime.app._Event_Void_Void";Zc.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,
0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;
this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__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__:Zc};var el=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_lime_graphics_RenderContext_Void"]=el;el.__name__="lime.app._Event_lime_graphics_RenderContext_Void";el.prototype={canceled:null,
__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},remove:function(a){for(var b=
this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__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__:el};var sn=function(){this.canceled=!1;this.__listeners=
[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_lime_system_State_Void"]=sn;sn.__name__="lime.app._Event_lime_system_State_Void";sn.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__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__:sn};var tn=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_lime_ui_GamepadAxis_Float_Void"]=tn;tn.__name__="lime.app._Event_lime_ui_GamepadAxis_Float_Void";tn.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=
d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,
1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,f=0;f<c.length&&(c[f](a,b),d[f]?++f:this.remove(c[f]),!this.canceled););},__class__:tn};var fl=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_lime_ui_GamepadButton_Void"]=fl;fl.__name__="lime.app._Event_lime_ui_GamepadButton_Void";
fl.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},
remove:function(a){for(var b=this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__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__:fl};var un=
function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_lime_ui_Gamepad_Void"]=un;un.__name__="lime.app._Event_lime_ui_Gamepad_Void";un.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__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__:un};var vn=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_lime_ui_Joystick_Void"]=vn;vn.__name__="lime.app._Event_lime_ui_Joystick_Void";vn.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,f=this.__priorities.length;d<
f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,
1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__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__:vn};var gl=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void"]=gl;gl.__name__="lime.app._Event_lime_ui_KeyCode_lime_ui_KeyModifier_Void";
gl.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},
remove:function(a){for(var b=this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__listeners:null,dispatch:function(a,b){this.canceled=!1;for(var c=this.__listeners,d=this.__repeat,f=0;f<c.length&&(c[f](a,b),d[f]?++f:this.remove(c[f]),!this.canceled););},__class__:gl};var mi=
function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_lime_ui_Touch_Void"]=mi;mi.__name__="lime.app._Event_lime_ui_Touch_Void";mi.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__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__:mi};var am=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_lime_ui_Window_Void"]=am;am.__name__="lime.app._Event_lime_ui_Window_Void";am.prototype={canceled:null,__repeat:null,__priorities:null,add:function(a,b,c){null==c&&(c=0);null==b&&(b=!1);for(var d=0,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,
0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;
this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__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__:am};var io=function(){this.canceled=!1;this.__listeners=[];this.__priorities=[];this.__repeat=[]};h["lime.app._Event_ofEvents_T_Void"]=io;io.__name__="lime.app._Event_ofEvents_T_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,f=this.__priorities.length;d<f;){var g=d++;if(c>this.__priorities[g]){this.__listeners.splice(g,0,a);this.__priorities.splice(g,0,c);this.__repeat.splice(g,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(d==a)return!0}return!1},remove:function(a){for(var b=this.__listeners.length;0<=
--b;)this.__listeners[b]==a&&(this.__listeners.splice(b,1),this.__priorities.splice(b,1),this.__repeat.splice(b,1))},removeAll:function(){var a=this.__listeners.length;this.__listeners.splice(0,a);this.__priorities.splice(0,a);this.__repeat.splice(0,a)},__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__:io};var Eb=function(a,b,c,d,f,g,k){null==f&&(f=-1);null==d&&(d=-1);
null==c&&(c=0);null==b&&(b=0);this.offsetX=b;this.offsetY=c;this.width=d;this.height=f;this.version=0;null==k&&(k=Kd.CANVAS,null!=Ab.__current.__worker||Ab.__isWorker)&&(k=Kd.DATA);this.type=k;if(null==a){if(0<d&&0<f)switch(this.type._hx_index){case 0:this.buffer=new mf(null,d,f);ya.createCanvas(this,d,f);null!=g&&0!=g&&this.fillRect(new Uc(0,0,d,f),g);break;case 1:a=d*f*4,a=null!=a?new Uint8Array(a):null,this.buffer=new mf(a,d,f),null!=g&&0!=g&&this.fillRect(new Uc(0,0,d,f),g)}}else this.__fromImageBuffer(a)};
h["lime.graphics.Image"]=Eb;Eb.__name__="lime.graphics.Image";Eb.fromBase64=function(a,b){if(null==a)return null;var c=new Eb;c.__fromBase64(a,b);return c};Eb.fromBitmapData=function(a){return null==a?null:a.image};Eb.fromBytes=function(a){if(null==a)return null;var b=new Eb;return b.__fromBytes(a)?b:null};Eb.fromCanvas=function(a){if(null==a)return null;var b=new mf(null,a.width,a.height);b.set_src(a);a=new Eb(b);a.type=Kd.CANVAS;return a};Eb.fromFile=function(a){if(null==a)return null;var b=new Eb;
return b.__fromFile(a)?b:null};Eb.fromImageElement=function(a){if(null==a)return null;var b=new mf(null,a.width,a.height);b.set_src(a);a=new Eb(b);a.type=Kd.CANVAS;return a};Eb.loadFromBase64=function(a,b){return null==a||null==b?ob.withValue(null):Sa.loadImage("data:"+b+";base64,"+a)};Eb.loadFromBytes=function(a){if(null==a)return ob.withValue(null);if(Eb.__isPNG(a))var b="image/png";else if(Eb.__isJPG(a))b="image/jpeg";else if(Eb.__isGIF(a))b="image/gif";else if(Eb.__isWebP(a))b="image/webp";else return ob.withValue(null);
return Sa.loadImageFromBytes(a,b)};Eb.loadFromFile=function(a){return null==a?ob.withValue(null):Sa.loadImage(a)};Eb.__isGIF=function(a){if(null==a||6>a.length)return!1;a=a.getString(0,6);return"GIF87a"!=a?"GIF89a"==a:!0};Eb.__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};Eb.__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};Eb.__isWebP=
function(a){return null==a||16>a.length?!1:"RIFF"==a.getString(0,4)?"WEBP"==a.getString(8,4):!1};Eb.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==Kd.CANVAS?ya.convertToCanvas(this):ya.convertToData(this);var a=new Eb(this.buffer.clone(),this.offsetX,this.offsetY,this.width,this.height,null,this.type);a.version=this.version;return a}return new Eb(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:ya.colorTransform(this,a,b);break;case 1:ya.convertToData(this);Qa.colorTransform(this,a,b);break;case 2:a.offset(this.offsetX,this.offsetY),this.buffer.__srcBitmapData.colorTransform(a.__toFlashRectangle(),gd.__toFlashColorTransform(b))}},copyChannel:function(a,b,c,d,f){b=this.__clipRect(b);if(null!=this.buffer&&null!=b&&!(f==ye.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:ya.copyChannel(this,a,b,c,d,f);break;case 1:ya.convertToData(this);ya.convertToData(a);Qa.copyChannel(this,a,b,c,d,f);break;case 2:switch(d._hx_index){case 0:var g=1;break;case 1:g=2;break;case 2:g=4;break;case 3:g=8}switch(f._hx_index){case 0:var k=1;break;case 1:k=2;break;case 2:k=4;break;case 3:k=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(),g,k)}},copyPixels:function(a,b,c,d,f,g){null==g&&(g=!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==f||0==f.x&&0==f.y)&&(f=d=null),this.type._hx_index){case 0:null!=d?(ya.convertToData(this),ya.convertToData(a),null!=d&&ya.convertToData(d),Qa.copyPixels(this,a,b,c,d,f,g)):(ya.convertToCanvas(this),ya.convertToCanvas(a),ya.copyPixels(this,a,b,c,d,f,g));break;case 1:ya.convertToData(this);ya.convertToData(a);null!=d&&ya.convertToData(d);Qa.copyPixels(this,
a,b,c,d,f,g);break;case 2:b.offset(a.offsetX,a.offsetY),c.offset(this.offsetX,this.offsetY),null!=d&&null!=f&&f.offset(d.offsetX,d.offsetY),this.buffer.__srcBitmapData.copyPixels(a.buffer.__srcBitmapData,b.__toFlashRectangle(),c.__toFlashPoint(),null!=d?d.buffer.get_src():null,null!=f?f.__toFlashPoint():null,g)}},encode:function(a,b){null==b&&(b=90);if(null==a)return kj.encode(this);switch(a._hx_index){case 0:return go.encode(this);case 1:return $k.encode(this,b);case 2:return kj.encode(this)}},fillRect:function(a,
b,c){a=this.__clipRect(a);if(null!=this.buffer&&null!=a)switch(this.type._hx_index){case 0:ya.fillRect(this,a,b,c);break;case 1:ya.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:ya.floodFill(this,a,b,c,d);break;case 1:ya.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 ya.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 Uc(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 ya.getPixel(this,a,b,c);case 1:return ya.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 ya.getPixel32(this,
a,b,c);case 1:return ya.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 ya.getPixels(this,
a,b);case 1:return ya.convertToData(this),Qa.getPixels(this,a,b);case 2:return null;default:return null}},merge:function(a,b,c,d,f,g,k){if(null!=this.buffer&&null!=a)switch(this.type._hx_index){case 0:ya.convertToCanvas(this);ya.merge(this,a,b,c,d,f,g,k);break;case 1:ya.convertToData(this);ya.convertToData(a);Qa.merge(this,a,b,c,d,f,g,k);break;case 2:b.offset(this.offsetX,this.offsetY),this.buffer.__srcBitmapData.merge(a.buffer.__srcBitmapData,b.__toFlashRectangle(),c.__toFlashPoint(),d,f,g,k)}},
resize:function(a,b){switch(this.type._hx_index){case 0:ya.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:ya.scroll(this,a,b);break;case 1:this.copyPixels(this,this.get_rect(),new yd(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:ya.setPixel(this,a,b,c,d);break;case 1:ya.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:ya.setPixel32(this,a,b,c,d);break;case 1:ya.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=Xf.BIG_ENDIAN),this.type._hx_index){case 0:ya.setPixels(this,a,b,c,d);break;case 1:ya.convertToData(this),Qa.setPixels(this,a,b,c,d)}},threshold:function(a,b,c,d,f,g,k,l,m){null==l&&(l=!1);null==k&&(k=-1);null==g&&(g=0);if(null==this.buffer||null==a||null==b)return 0;switch(this.type._hx_index){case 0:case 1:return ya.convertToData(this),ya.convertToData(a),Qa.threshold(this,a,b,c,d,f,g,k,l,m);case 2:if(null==
m){var h=g;g=(h&255)<<24|(h>>>24&255)<<16|(h>>>16&255)<<8|h>>>8&255}else switch(m){case 1:break;case 2:h=g;g=(h&255)<<24|(h>>>8&255)<<16|(h>>>16&255)<<8|h>>>24&255;break;default:h=g,g=(h&255)<<24|(h>>>24&255)<<16|(h>>>16&255)<<8|h>>>8&255}if(null==m)h=k,k=(h&255)<<24|(h>>>24&255)<<16|(h>>>16&255)<<8|h>>>8&255;else switch(m){case 1:break;case 2:h=k;k=(h&255)<<24|(h>>>8&255)<<16|(h>>>16&255)<<8|h>>>24&255;break;default:h=k,k=(h&255)<<24|(h>>>24&255)<<16|(h>>>16&255)<<8|h>>>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,f,g,k,l)}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,f=
new window.Image;f.addEventListener("load",function(a){d.buffer=new mf(null,f.width,f.height);d.buffer.__srcImage=f;d.offsetX=0;d.offsetY=0;d.width=d.buffer.width;d.height=d.buffer.height;null!=c&&c(d)},!1);f.src="data:"+b+";base64,"+a},__fromBytes:function(a,b){if(Eb.__isPNG(a))var c="image/png";else if(Eb.__isJPG(a))c="image/jpeg";else if(Eb.__isGIF(a))c="image/gif";else return!1;this.__fromBase64(lf.encode(a),c,b);return!0},__fromFile:function(a,b,c){var d=this,f=new window.Image;Sa.__isSameOrigin(a)||
(f.crossOrigin="Anonymous");f.onload=function(a){d.buffer=new mf(null,f.width,f.height);d.buffer.__srcImage=f;d.width=f.width;d.height=f.height;null!=b&&b(d)};f.onerror=function(a){null!=c&&c()};f.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&&ya.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:ya.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:ya.convertToData(this),Qa.multiplyAlpha(this)}else!a&&this.buffer.premultiplied&&1==this.type._hx_index&&(ya.convertToData(this),Qa.unmultiplyAlpha(this));
return a},get_rect:function(){return new Uc(0,0,this.width,this.height)},get_src:function(){null!=this.buffer.__srcCanvas||null==this.buffer.data&&this.type!=Kd.DATA||ya.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__:Eb,__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 mf=function(a,b,c,d,f){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==f?0:f;this.premultiplied=!1;this.transparent=!0};h["lime.graphics.ImageBuffer"]=
mf;mf.__name__="lime.graphics.ImageBuffer";mf.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 mf(this.data,this.width,this.height,this.bitsPerPixel);if(null!=this.data){var b=this.data.byteLength,c=null,d=null,f=null,g=null,k=null;b=null!=b?new Uint8Array(b):null!=c?new Uint8Array(c):null!=d?new Uint8Array(d.__array):
null!=f?new Uint8Array(f):null!=g?null==k?new Uint8Array(g,0):new Uint8Array(g,0,k):null;a.data=b;d=c=b=null;f=this.data;k=g=null;b=null!=b?new Uint8Array(b):null!=c?new Uint8Array(c):null!=d?new Uint8Array(d.__array):null!=f?new Uint8Array(f):null!=g?null==k?new Uint8Array(g,0):new Uint8Array(g,0,k):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__:mf,__properties__:{get_stride:"get_stride",set_src:"set_src",
get_src:"get_src"}};var ye=G["lime.graphics.ImageChannel"]={__ename__:"lime.graphics.ImageChannel",__constructs__:null,RED:{_hx_name:"RED",_hx_index:0,__enum__:"lime.graphics.ImageChannel",toString:t},GREEN:{_hx_name:"GREEN",_hx_index:1,__enum__:"lime.graphics.ImageChannel",toString:t},BLUE:{_hx_name:"BLUE",_hx_index:2,__enum__:"lime.graphics.ImageChannel",toString:t},ALPHA:{_hx_name:"ALPHA",_hx_index:3,__enum__:"lime.graphics.ImageChannel",toString:t}};ye.__constructs__=[ye.RED,ye.GREEN,ye.BLUE,
ye.ALPHA];var pk=G["lime.graphics.ImageFileFormat"]={__ename__:"lime.graphics.ImageFileFormat",__constructs__:null,BMP:{_hx_name:"BMP",_hx_index:0,__enum__:"lime.graphics.ImageFileFormat",toString:t},JPEG:{_hx_name:"JPEG",_hx_index:1,__enum__:"lime.graphics.ImageFileFormat",toString:t},PNG:{_hx_name:"PNG",_hx_index:2,__enum__:"lime.graphics.ImageFileFormat",toString:t}};pk.__constructs__=[pk.BMP,pk.JPEG,pk.PNG];var Kd=G["lime.graphics.ImageType"]={__ename__:"lime.graphics.ImageType",__constructs__:null,
CANVAS:{_hx_name:"CANVAS",_hx_index:0,__enum__:"lime.graphics.ImageType",toString:t},DATA:{_hx_name:"DATA",_hx_index:1,__enum__:"lime.graphics.ImageType",toString:t},FLASH:{_hx_name:"FLASH",_hx_index:2,__enum__:"lime.graphics.ImageType",toString:t},CUSTOM:{_hx_name:"CUSTOM",_hx_index:3,__enum__:"lime.graphics.ImageType",toString:t}};Kd.__constructs__=[Kd.CANVAS,Kd.DATA,Kd.FLASH,Kd.CUSTOM];var kn=function(){};h["lime.graphics.RenderContext"]=kn;kn.__name__="lime.graphics.RenderContext";kn.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__:kn};var Xo={bufferData:function(a,b,c,d,f,g){null!=f?a.bufferData(b,c,d,f,g):a.bufferData(b,c,d)},bufferSubData:function(a,b,c,d,f,g){null!=f?a.bufferSubData(b,c,d,f,g):a.bufferSubData(b,c,d)},compressedTexImage2D:function(a,b,c,d,f,g,k,l,m,h){null!=m?a.compressedTexImage2D(b,c,d,f,g,k,l,m,h):a.compressedTexImage2D(b,c,d,f,g,k,l)},compressedTexSubImage2D:function(a,
b,c,d,f,g,k,l,m,h,r){null!=h?a.compressedTexSubImage2D(b,c,d,f,g,k,l,m,h,r):a.compressedTexSubImage2D(b,c,d,f,g,k,l,m)},getBufferSubData:function(a,b,c,d,f,g){null!=f?a.getBufferSubData(b,c,d,f,g):a.getBufferSubData(b,c,d)},readPixels:function(a,b,c,d,f,g,k,l,m){null!=m?a.readPixels(b,c,d,f,g,k,l,m):a.readPixels(b,c,d,f,g,k,l)},texImage2D:function(a,b,c,d,f,g,k,l,m,h,r){null!=r?a.texImage2D(b,c,d,f,g,k,l,m,h,r):null!=l?a.texImage2D(b,c,d,f,g,k,l,m,h):a.texImage2D(b,c,d,f,g,k)},texSubImage2D:function(a,
b,c,d,f,g,k,l,m,h,r){null!=r?a.texSubImage2D(b,c,d,f,g,k,l,m,h,r):null!=m?a.texSubImage2D(b,c,d,f,g,k,l,m,h):a.texSubImage2D(b,c,d,f,g,k,l)},uniform1fv:function(a,b,c,d,f){null!=d?a.uniform1fv(b,c,d,f):a.uniform1fv(b,c)},uniform1iv:function(a,b,c,d,f){null!=d?a.uniform1iv(b,c,d,f):a.uniform1iv(b,c)},uniform2fv:function(a,b,c,d,f){null!=d?a.uniform2fv(b,c,d,f):a.uniform2fv(b,c)},uniform2iv:function(a,b,c,d,f){null!=d?a.uniform2iv(b,c,d,f):a.uniform2iv(b,c)},uniform3fv:function(a,b,c,d,f){null!=d?a.uniform3fv(b,
c,d,f):a.uniform3fv(b,c)},uniform3iv:function(a,b,c,d,f){null!=d?a.uniform3iv(b,c,d,f):a.uniform3iv(b,c)},uniform4fv:function(a,b,c,d,f){null!=d?a.uniform4fv(b,c,d,f):a.uniform4fv(b,c)},uniform4iv:function(a,b,c,d,f){null!=d?a.uniform4iv(b,c,d,f):a.uniform4iv(b,c)},uniformMatrix2fv:function(a,b,c,d,f,g){null!=f?a.uniformMatrix2fv(b,c,d,f,g):a.uniformMatrix2fv(b,c,d)},uniformMatrix3fv:function(a,b,c,d,f,g){null!=f?a.uniformMatrix3fv(b,c,d,f,g):a.uniformMatrix3fv(b,c,d)},uniformMatrix4fv:function(a,
b,c,d,f,g){null!=f?a.uniformMatrix4fv(b,c,d,f,g):a.uniformMatrix4fv(b,c,d)},fromGL:function(a){return null},fromRenderContext:function(a){return a.webgl2},toWebGLRenderContext:function(a){return a}},ec={bufferData:function(a,b,c,d){a.bufferData(b,c,d)},bufferSubData:function(a,b,c,d){a.bufferSubData(b,c,d)},compressedTexImage2D:function(a,b,c,d,f,g,k,l){a.compressedTexImage2D(b,c,d,f,g,k,l)},compressedTexSubImage2D:function(a,b,c,d,f,g,k,l,m){a.compressedTexSubImage2D(b,c,d,f,g,k,l,m)},readPixels:function(a,
b,c,d,f,g,k,l){a.readPixels(b,c,d,f,g,k,l)},texImage2D:function(a,b,c,d,f,g,k,l,m,h){null!=l?a.texImage2D(b,c,d,f,g,k,l,m,h):a.texImage2D(b,c,d,f,g,k)},texSubImage2D:function(a,b,c,d,f,g,k,l,m,h){null!=m?a.texSubImage2D(b,c,d,f,g,k,l,m,h):a.texSubImage2D(b,c,d,f,g,k,l)},uniformMatrix2fv:function(a,b,c,d){a.uniformMatrix2fv(b,c,d)},uniformMatrix3fv:function(a,b,c,d){a.uniformMatrix3fv(b,c,d)},uniformMatrix4fv:function(a,b,c,d){a.uniformMatrix4fv(b,c,d)},fromWebGL2RenderContext:function(a){return a},
fromRenderContext:function(a){return a.webgl},fromGL:function(a){return r.context}},Dh=function(a){};h["lime.graphics.cairo.Cairo"]=Dh;Dh.__name__="lime.graphics.cairo.Cairo";Dh.__properties__={get_versionString:"get_versionString",get_version:"get_version"};Dh.version=null;Dh.versionString=null;Dh.get_version=function(){return 0};Dh.get_versionString=function(){return""};Dh.prototype={target:null,userData:null,handle:null,arc:function(a,b,c,d,f){},arcNegative:function(a,b,c,d,f){},clip:function(){},
clipExtents:function(a,b,c,d){},clipPreserve:function(){},closePath:function(){},copyPage:function(){},curveTo:function(a,b,c,d,f,g){},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,f,g){},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__:Dh,__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 jo=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"]=jo;jo.__name__="lime.graphics.cairo.CairoGlyph";jo.prototype={index:null,x:null,y:null,__class__:jo};var ep={__properties__:{get_width:"get_width",get_stride:"get_stride",get_height:"get_height",get_format:"get_format",
get_data:"get_data"},_new:function(a,b,c){return 0},create:function(a,b,c,d,f){return 0},fromImage:function(a){return null},get_data:function(a){return Be.fromFloat(0)},get_format:function(a){return 0},get_height:function(a){return 0},get_stride:function(a){return 0},get_width:function(a){return 0}},wn={__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"},
_new:function(a){return a},addColorStopRGB:function(a,b,c,d,f){},addColorStopRGBA:function(a,b,c,d,f,g){},createForSurface:function(a){return 0},createLinear:function(a,b,c,d){return 0},createRadial:function(a,b,c,d,f,g){return 0},createRGB:function(a,b,c){return 0},createRGBA:function(a,b,c,d){return 0},get_colorStopCount:function(a){return 0},get_extend:function(a){return 0},set_extend:function(a,b){return b},get_filter:function(a){return 0},set_filter:function(a,b){return b},get_matrix:function(a){return null},
set_matrix:function(a,b){return b}},fp={flush:function(a){}},r=function(){};h["lime.graphics.opengl.GL"]=r;r.__name__="lime.graphics.opengl.GL";r.context=null;r.type=null;r.version=null;r.activeTexture=function(a){r.context.activeTexture(a)};r.attachShader=function(a,b){r.context.attachShader(a,b)};r.beginQuery=function(a,b){r.context.beginQuery(a,b)};r.beginTransformFeedback=function(a){r.context.beginTransformFeedback(a)};r.bindAttribLocation=function(a,b,c){r.context.bindAttribLocation(a,b,c)};
r.bindBuffer=function(a,b){r.context.bindBuffer(a,b)};r.bindBufferBase=function(a,b,c){r.context.bindBufferBase(a,b,c)};r.bindBufferRange=function(a,b,c,d,f){r.context.bindBufferRange(a,b,c,d,Be.fromFloat(f))};r.bindFramebuffer=function(a,b){r.context.bindFramebuffer(a,b)};r.bindRenderbuffer=function(a,b){r.context.bindRenderbuffer(a,b)};r.bindSampler=function(a,b){r.context.bindSampler(a,b)};r.bindTexture=function(a,b){r.context.bindTexture(a,b)};r.bindTransformFeedback=function(a,b){r.context.bindTransformFeedback(a,
b)};r.bindVertexArray=function(a){r.context.bindVertexArray(a)};r.blitFramebuffer=function(a,b,c,d,f,g,k,l,m,h){r.context.blitFramebuffer(a,b,c,d,f,g,k,l,m,h)};r.blendColor=function(a,b,c,d){r.context.blendColor(a,b,c,d)};r.blendEquation=function(a){r.context.blendEquation(a)};r.blendEquationSeparate=function(a,b){r.context.blendEquationSeparate(a,b)};r.blendFunc=function(a,b){r.context.blendFunc(a,b)};r.blendFuncSeparate=function(a,b,c,d){r.context.blendFuncSeparate(a,b,c,d)};r.bufferDataWEBGL=function(a,
b,c,d,f){var g=r.context;null!=d?g.bufferData(a,b,c,d,f):g.bufferData(a,b,c)};r.bufferSubDataWEBGL=function(a,b,c,d,f){var g=r.context;null!=d?g.bufferSubData(a,b,c,d,f):g.bufferSubData(a,b,c)};r.checkFramebufferStatus=function(a){return r.context.checkFramebufferStatus(a)};r.clear=function(a){r.context.clear(a)};r.clearBufferfi=function(a,b,c,d){r.context.clearBufferfi(a,b,c,d)};r.clearBufferfvWEBGL=function(a,b,c,d){r.context.clearBufferfv(a,b,c,d)};r.clearBufferivWEBGL=function(a,b,c,d){r.context.clearBufferiv(a,
b,c,d)};r.clearBufferuivWEBGL=function(a,b,c,d){r.context.clearBufferuiv(a,b,c,d)};r.clearColor=function(a,b,c,d){r.context.clearColor(a,b,c,d)};r.clearDepth=function(a){r.context.clearDepth(a)};r.clearStencil=function(a){r.context.clearStencil(a)};r.clientWaitSync=function(a,b,c){return r.context.clientWaitSync(a,b,c)};r.colorMask=function(a,b,c,d){r.context.colorMask(a,b,c,d)};r.compileShader=function(a){r.context.compileShader(a)};r.compressedTexImage2DWEBGL=function(a,b,c,d,f,g,k,l,m){var h=r.context;
null!=l?h.compressedTexImage2D(a,b,c,d,f,g,k,l,m):h.compressedTexImage2D(a,b,c,d,f,g,k)};r.compressedTexImage3DWEBGL=function(a,b,c,d,f,g,k,l,m,h){r.context.compressedTexImage3D(a,b,c,d,f,g,k,l,m,h)};r.compressedTexSubImage2DWEBGL=function(a,b,c,d,f,g,k,l,m,h){var z=r.context;null!=m?z.compressedTexSubImage2D(a,b,c,d,f,g,k,l,m,h):z.compressedTexSubImage2D(a,b,c,d,f,g,k,l)};r.compressedTexSubImage3DWEBGL=function(a,b,c,d,f,g,k,l,m,h,w,p){r.context.compressedTexSubImage3D(a,b,c,d,f,g,k,l,m,h,w,p)};
r.copyTexImage2D=function(a,b,c,d,f,g,k,l){r.context.copyTexImage2D(a,b,c,d,f,g,k,l)};r.copyTexSubImage2D=function(a,b,c,d,f,g,k,l){r.context.copyTexSubImage2D(a,b,c,d,f,g,k,l)};r.copyTexSubImage3D=function(a,b,c,d,f,g,k,l,m){r.context.copyTexSubImage3D(a,b,c,d,f,g,k,l,m)};r.createBuffer=function(){return r.context.createBuffer()};r.createFramebuffer=function(){return r.context.createFramebuffer()};r.createProgram=function(){return r.context.createProgram()};r.createQuery=function(){return r.context.createQuery()};
r.createRenderbuffer=function(){return r.context.createRenderbuffer()};r.createSampler=function(){return r.context.createSampler()};r.createShader=function(a){return r.context.createShader(a)};r.createTexture=function(){return r.context.createTexture()};r.createTransformFeedback=function(){return r.context.createTransformFeedback()};r.createVertexArray=function(){return r.context.createVertexArray()};r.cullFace=function(a){r.context.cullFace(a)};r.deleteBuffer=function(a){r.context.deleteBuffer(a)};
r.deleteFramebuffer=function(a){r.context.deleteFramebuffer(a)};r.deleteProgram=function(a){r.context.deleteProgram(a)};r.deleteQuery=function(a){r.context.deleteQuery(a)};r.deleteRenderbuffer=function(a){r.context.deleteRenderbuffer(a)};r.deleteSampler=function(a){r.context.deleteSampler(a)};r.deleteShader=function(a){r.context.deleteShader(a)};r.deleteSync=function(a){r.context.deleteSync(a)};r.deleteTexture=function(a){r.context.deleteTexture(a)};r.deleteTransformFeedback=function(a){r.context.deleteTransformFeedback(a)};
r.deleteVertexArray=function(a){r.context.deleteVertexArray(a)};r.depthFunc=function(a){r.context.depthFunc(a)};r.depthMask=function(a){r.context.depthMask(a)};r.depthRange=function(a,b){r.context.depthRange(a,b)};r.detachShader=function(a,b){r.context.detachShader(a,b)};r.disable=function(a){r.context.disable(a)};r.disableVertexAttribArray=function(a){r.context.disableVertexAttribArray(a)};r.drawArrays=function(a,b,c){r.context.drawArrays(a,b,c)};r.drawArraysInstanced=function(a,b,c,d){r.context.drawArraysInstanced(a,
b,c,d)};r.drawBuffers=function(a){r.context.drawBuffers(a)};r.drawElements=function(a,b,c,d){r.context.drawElements(a,b,c,d)};r.drawElementsInstanced=function(a,b,c,d,f){r.context.drawElementsInstanced(a,b,c,d,f)};r.drawRangeElements=function(a,b,c,d,f,g){r.context.drawRangeElements(a,b,c,d,f,g)};r.enable=function(a){r.context.enable(a)};r.enableVertexAttribArray=function(a){r.context.enableVertexAttribArray(a)};r.endQuery=function(a){r.context.endQuery(a)};r.endTransformFeedback=function(){r.context.endTransformFeedback()};
r.fenceSync=function(a,b){return r.context.fenceSync(a,b)};r.finish=function(){r.context.finish()};r.flush=function(){r.context.flush()};r.framebufferRenderbuffer=function(a,b,c,d){r.context.framebufferRenderbuffer(a,b,c,d)};r.framebufferTexture2D=function(a,b,c,d,f){r.context.framebufferTexture2D(a,b,c,d,f)};r.framebufferTextureLayer=function(a,b,c,d,f){r.context.framebufferTextureLayer(a,b,c,d,f)};r.frontFace=function(a){r.context.frontFace(a)};r.generateMipmap=function(a){r.context.generateMipmap(a)};
r.getActiveAttrib=function(a,b){return r.context.getActiveAttrib(a,b)};r.getActiveUniform=function(a,b){return r.context.getActiveUniform(a,b)};r.getActiveUniformBlockName=function(a,b){return r.context.getActiveUniformBlockName(a,b)};r.getActiveUniformBlockParameter=function(a,b,c){return r.context.getActiveUniformBlockParameter(a,b,c)};r.getActiveUniforms=function(a,b,c){return r.context.getActiveUniforms(a,b,c)};r.getAttachedShaders=function(a){return r.context.getAttachedShaders(a)};r.getAttribLocation=
function(a,b){return r.context.getAttribLocation(a,b)};r.getBufferParameter=function(a,b){return r.context.getBufferParameter(a,b)};r.getBufferSubDataWEBGL=function(a,b,c,d,f){var g=r.context;null!=d?g.getBufferSubData(a,b,c,d,f):g.getBufferSubData(a,b,c)};r.getContextAttributes=function(){return r.context.getContextAttributes()};r.getError=function(){return r.context.getError()};r.getExtension=function(a){return r.context.getExtension(a)};r.getFragDataLocation=function(a,b){return r.context.getFragDataLocation(a,
b)};r.getFramebufferAttachmentParameter=function(a,b,c){return r.context.getFramebufferAttachmentParameter(a,b,c)};r.getIndexedParameter=function(a,b){return r.context.getIndexedParameter(a,b)};r.getInternalformatParameter=function(a,b,c){return r.context.getInternalformatParameter(a,b,c)};r.getParameter=function(a){return r.context.getParameter(a)};r.getProgramInfoLog=function(a){return r.context.getProgramInfoLog(a)};r.getProgramParameter=function(a,b){return r.context.getProgramParameter(a,b)};
r.getQuery=function(a,b){return r.context.getQuery(a,b)};r.getQueryParameter=function(a,b){return r.context.getQueryParameter(a,b)};r.getRenderbufferParameter=function(a,b){return r.context.getRenderbufferParameter(a,b)};r.getSamplerParameter=function(a,b){return r.context.getSamplerParameter(a,b)};r.getShaderInfoLog=function(a){return r.context.getShaderInfoLog(a)};r.getShaderParameter=function(a,b){return r.context.getShaderParameter(a,b)};r.getShaderPrecisionFormat=function(a,b){return r.context.getShaderPrecisionFormat(a,
b)};r.getShaderSource=function(a){return r.context.getShaderSource(a)};r.getSupportedExtensions=function(){return r.context.getSupportedExtensions()};r.getSyncParameter=function(a,b){return r.context.getSyncParameter(a,b)};r.getTexParameter=function(a,b){return r.context.getTexParameter(a,b)};r.getTransformFeedbackVarying=function(a,b){return r.context.getTransformFeedbackVarying(a,b)};r.getUniform=function(a,b){return r.context.getUniform(a,b)};r.getUniformBlockIndex=function(a,b){return r.context.getUniformBlockIndex(a,
b)};r.getUniformIndices=function(a,b){return r.context.getUniformIndices(a,b)};r.getUniformLocation=function(a,b){return r.context.getUniformLocation(a,b)};r.getVertexAttrib=function(a,b){return r.context.getVertexAttrib(a,b)};r.getVertexAttribOffset=function(a,b){return Be.fromFloat(r.context.getVertexAttribOffset(a,b))};r.hint=function(a,b){r.context.hint(a,b)};r.invalidateFramebuffer=function(a,b){r.context.invalidateFramebuffer(a,b)};r.invalidateSubFramebuffer=function(a,b,c,d,f,g){r.context.invalidateSubFramebuffer(a,
b,c,d,f,g)};r.isBuffer=function(a){return r.context.isBuffer(a)};r.isContextLost=function(){return r.context.isContextLost()};r.isEnabled=function(a){return r.context.isEnabled(a)};r.isFramebuffer=function(a){return r.context.isFramebuffer(a)};r.isProgram=function(a){return r.context.isProgram(a)};r.isQuery=function(a){return r.context.isQuery(a)};r.isRenderbuffer=function(a){return r.context.isRenderbuffer(a)};r.isSampler=function(a){return r.context.isSampler(a)};r.isShader=function(a){return r.context.isShader(a)};
r.isSync=function(a){return r.context.isSync(a)};r.isTexture=function(a){return r.context.isTexture(a)};r.isTransformFeedback=function(a){return r.context.isTransformFeedback(a)};r.isVertexArray=function(a){return r.context.isVertexArray(a)};r.lineWidth=function(a){r.context.lineWidth(a)};r.linkProgram=function(a){r.context.linkProgram(a)};r.pauseTransformFeedback=function(){r.context.pauseTransformFeedback()};r.pixelStorei=function(a,b){r.context.pixelStorei(a,b)};r.polygonOffset=function(a,b){r.context.polygonOffset(a,
b)};r.readBuffer=function(a){r.context.readBuffer(a)};r.readPixelsWEBGL=function(a,b,c,d,f,g,k,l){var m=r.context;null!=l?m.readPixels(a,b,c,d,f,g,k,l):m.readPixels(a,b,c,d,f,g,k)};r.renderbufferStorage=function(a,b,c,d){r.context.renderbufferStorage(a,b,c,d)};r.renderbufferStorageMultisample=function(a,b,c,d,f){r.context.renderbufferStorageMultisample(a,b,c,d,f)};r.resumeTransformFeedback=function(){r.context.resumeTransformFeedback()};r.sampleCoverage=function(a,b){r.context.sampleCoverage(a,b)};
r.samplerParameterf=function(a,b,c){r.context.samplerParameterf(a,b,c)};r.samplerParameteri=function(a,b,c){r.context.samplerParameteri(a,b,c)};r.scissor=function(a,b,c,d){r.context.scissor(a,b,c,d)};r.shaderSource=function(a,b){r.context.shaderSource(a,b)};r.stencilFunc=function(a,b,c){r.context.stencilFunc(a,b,c)};r.stencilFuncSeparate=function(a,b,c,d){r.context.stencilFuncSeparate(a,b,c,d)};r.stencilMask=function(a){r.context.stencilMask(a)};r.stencilMaskSeparate=function(a,b){r.context.stencilMaskSeparate(a,
b)};r.stencilOp=function(a,b,c){r.context.stencilOp(a,b,c)};r.stencilOpSeparate=function(a,b,c,d){r.context.stencilOpSeparate(a,b,c,d)};r.texImage2DWEBGL=function(a,b,c,d,f,g,k,l,m,h){var z=r.context;null!=h?z.texImage2D(a,b,c,d,f,g,k,l,m,h):null!=k?z.texImage2D(a,b,c,d,f,g,k,l,m):z.texImage2D(a,b,c,d,f,g)};r.texImage3DWEBGL=function(a,b,c,d,f,g,k,l,m,h,w){r.context.texImage3D(a,b,c,d,f,g,k,l,m,h,w)};r.texStorage2D=function(a,b,c,d,f){r.context.texStorage2D(a,b,c,d,f)};r.texStorage3D=function(a,b,
c,d,f,g){r.context.texStorage3D(a,b,c,d,f,g)};r.texParameterf=function(a,b,c){r.context.texParameterf(a,b,c)};r.texParameteri=function(a,b,c){r.context.texParameteri(a,b,c)};r.texSubImage2DWEBGL=function(a,b,c,d,f,g,k,l,m,h){var z=r.context;null!=h?z.texSubImage2D(a,b,c,d,f,g,k,l,m,h):null!=l?z.texSubImage2D(a,b,c,d,f,g,k,l,m):z.texSubImage2D(a,b,c,d,f,g,k)};r.texSubImage3DWEBGL=function(a,b,c,d,f,g,k,l,m,h,w,p){r.context.texSubImage3D(a,b,c,d,f,g,k,l,m,h,w,p)};r.transformFeedbackVaryings=function(a,
b,c){r.context.transformFeedbackVaryings(a,b,c)};r.uniform1f=function(a,b){r.context.uniform1f(a,b)};r.uniform1fvWEBGL=function(a,b,c,d){var f=r.context;null!=c?f.uniform1fv(a,b,c,d):f.uniform1fv(a,b)};r.uniform1i=function(a,b){r.context.uniform1i(a,b)};r.uniform1ivWEBGL=function(a,b,c,d){var f=r.context;null!=c?f.uniform1iv(a,b,c,d):f.uniform1iv(a,b)};r.uniform1ui=function(a,b){r.context.uniform1ui(a,b)};r.uniform1uivWEBGL=function(a,b,c,d){r.context.uniform1uiv(a,b,c,d)};r.uniform2f=function(a,
b,c){r.context.uniform2f(a,b,c)};r.uniform2fvWEBGL=function(a,b,c,d){Xo.uniform2fv(r.context,a,b,c,d)};r.uniform2i=function(a,b,c){r.context.uniform2i(a,b,c)};r.uniform2ivWEBGL=function(a,b,c,d){var f=r.context;null!=c?f.uniform2iv(a,b,c,d):f.uniform2iv(a,b)};r.uniform2ui=function(a,b,c){r.context.uniform2ui(a,b,c)};r.uniform2uivWEBGL=function(a,b,c,d){r.context.uniform2uiv(a,b,c,d)};r.uniform3f=function(a,b,c,d){r.context.uniform3f(a,b,c,d)};r.uniform3fvWEBGL=function(a,b,c,d){var f=r.context;null!=
c?f.uniform3fv(a,b,c,d):f.uniform3fv(a,b)};r.uniform3i=function(a,b,c,d){r.context.uniform3i(a,b,c,d)};r.uniform3ivWEBGL=function(a,b,c,d){var f=r.context;null!=c?f.uniform3iv(a,b,c,d):f.uniform3iv(a,b)};r.uniform3ui=function(a,b,c,d){r.context.uniform3ui(a,b,c,d)};r.uniform3uivWEBGL=function(a,b,c,d){r.context.uniform3uiv(a,b,c,d)};r.uniform4f=function(a,b,c,d,f){r.context.uniform4f(a,b,c,d,f)};r.uniform4fvWEBGL=function(a,b,c,d){var f=r.context;null!=c?f.uniform4fv(a,b,c,d):f.uniform4fv(a,b)};r.uniform4i=
function(a,b,c,d,f){r.context.uniform4i(a,b,c,d,f)};r.uniform4ivWEBGL=function(a,b,c,d){var f=r.context;null!=c?f.uniform4iv(a,b,c,d):f.uniform4iv(a,b)};r.uniform4ui=function(a,b,c,d,f){r.context.uniform4ui(a,b,c,d,f)};r.uniform4uivWEBGL=function(a,b,c,d){r.context.uniform4uiv(a,b,c,d)};r.uniformBlockBinding=function(a,b,c){r.context.uniformBlockBinding(a,b,c)};r.uniformMatrix2fvWEBGL=function(a,b,c,d,f){var g=r.context;null!=d?g.uniformMatrix2fv(a,b,c,d,f):g.uniformMatrix2fv(a,b,c)};r.uniformMatrix2x3fvWEBGL=
function(a,b,c,d,f){r.context.uniformMatrix2x3fv(a,b,c,d,f)};r.uniformMatrix2x4fvWEBGL=function(a,b,c,d,f){r.context.uniformMatrix2x4fv(a,b,c,d,f)};r.uniformMatrix3fvWEBGL=function(a,b,c,d,f){var g=r.context;null!=d?g.uniformMatrix3fv(a,b,c,d,f):g.uniformMatrix3fv(a,b,c)};r.uniformMatrix3x2fvWEBGL=function(a,b,c,d,f){r.context.uniformMatrix3x2fv(a,b,c,d,f)};r.uniformMatrix3x4fvWEBGL=function(a,b,c,d,f){r.context.uniformMatrix3x4fv(a,b,c,d,f)};r.uniformMatrix4fvWEBGL=function(a,b,c,d,f){var g=r.context;
null!=d?g.uniformMatrix4fv(a,b,c,d,f):g.uniformMatrix4fv(a,b,c)};r.uniformMatrix4x2fvWEBGL=function(a,b,c,d,f){r.context.uniformMatrix4x2fv(a,b,c,d,f)};r.uniformMatrix4x3fvWEBGL=function(a,b,c,d,f){r.context.uniformMatrix4x3fv(a,b,c,d,f)};r.useProgram=function(a){r.context.useProgram(a)};r.validateProgram=function(a){r.context.validateProgram(a)};r.vertexAttrib1f=function(a,b){r.context.vertexAttrib1f(a,b)};r.vertexAttrib1fv=function(a,b){r.context.vertexAttrib1fv(a,b)};r.vertexAttrib1fvWEBGL=function(a,
b){r.context.vertexAttrib1fv(a,b)};r.vertexAttrib2f=function(a,b,c){r.context.vertexAttrib2f(a,b,c)};r.vertexAttrib2fv=function(a,b){r.context.vertexAttrib2fv(a,b)};r.vertexAttrib2fvWEBGL=function(a,b){r.context.vertexAttrib2fv(a,b)};r.vertexAttrib3f=function(a,b,c,d){r.context.vertexAttrib3f(a,b,c,d)};r.vertexAttrib3fv=function(a,b){r.context.vertexAttrib3fv(a,b)};r.vertexAttrib3fvWEBGL=function(a,b){r.context.vertexAttrib3fv(a,b)};r.vertexAttrib4f=function(a,b,c,d,f){r.context.vertexAttrib4f(a,
b,c,d,f)};r.vertexAttrib4fv=function(a,b){r.context.vertexAttrib4fv(a,b)};r.vertexAttrib4fvWEBGL=function(a,b){r.context.vertexAttrib4fv(a,b)};r.vertexAttribDivisor=function(a,b){r.context.vertexAttribDivisor(a,b)};r.vertexAttribI4i=function(a,b,c,d,f){r.context.vertexAttribI4i(a,b,c,d,f)};r.vertexAttribI4iv=function(a,b){r.context.vertexAttribI4iv(a,b)};r.vertexAttribI4ivWEBGL=function(a,b){r.context.vertexAttribI4iv(a,b)};r.vertexAttribI4ui=function(a,b,c,d,f){r.context.vertexAttribI4ui(a,b,c,d,
f)};r.vertexAttribI4uiv=function(a,b){r.context.vertexAttribI4uiv(a,b)};r.vertexAttribI4uivWEBGL=function(a,b){r.context.vertexAttribI4uiv(a,b)};r.vertexAttribIPointer=function(a,b,c,d,f){r.context.vertexAttribIPointer(a,b,c,d,f)};r.vertexAttribPointer=function(a,b,c,d,f,g){r.context.vertexAttribPointer(a,b,c,d,f,g)};r.viewport=function(a,b,c,d){r.context.viewport(a,b,c,d)};r.waitSync=function(a,b,c){r.context.waitSync(a,b,c)};r.__getObjectID=function(a){return null==a?0:a.id};var ko=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"]=ko;ko.__name__="lime.graphics.opengl.ext.KHR_debug";ko.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__:ko};var gd={__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"},__alphaTable:null,__blueTable:null,__greenTable:null,__redTable:null,_new:function(a){if(null==a||20!=a.length)a=gd.__identity,
a=null!=a?new Float32Array(a):null;return a},clone:function(a){a=qg.toArrayBufferView(a);a=null!=a?new Float32Array(a):null;return gd._new(a)},concat:function(a,b){a[0]+=b[0];a[6]+=b[6];a[12]+=b[12];a[18]+=b[18]},copyFrom:function(a,b){a.set(b)},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},getAlphaTable:function(a){null==gd.__alphaTable&&(gd.__alphaTable=new Uint8Array(256));
gd.__alphaTable[0]=0;for(var b=1;256>b;){var c=b++;var d=Math.floor(c*a[18]+255*a[19]);255<d&&(d=255);0>d&&(d=0);gd.__alphaTable[c]=d}return gd.__alphaTable},getBlueTable:function(a){null==gd.__blueTable&&(gd.__blueTable=new Uint8Array(256));for(var b,c=0;256>c;){var d=c++;b=Math.floor(d*a[12]+255*a[14]);255<b&&(b=255);0>b&&(b=0);gd.__blueTable[d]=b}return gd.__blueTable},getGreenTable:function(a){null==gd.__greenTable&&(gd.__greenTable=new Uint8Array(256));for(var b,c=0;256>c;){var d=c++;b=Math.floor(d*
a[6]+255*a[9]);255<b&&(b=255);0>b&&(b=0);gd.__greenTable[d]=b}return gd.__greenTable},getRedTable:function(a){null==gd.__redTable&&(gd.__redTable=new Uint8Array(256));for(var b,c=0;256>c;){var d=c++;b=Math.floor(d*a[0]+255*a[4]);255<b&&(b=255);0>b&&(b=0);gd.__redTable[d]=b}return gd.__redTable},__toFlashColorTransform:function(a){return null},get_alphaMultiplier:function(a){return a[18]},set_alphaMultiplier:function(a,b){return a[18]=b},get_alphaOffset:function(a){return 255*a[19]},set_alphaOffset:function(a,
b){return a[19]=b/255},get_blueMultiplier:function(a){return a[12]},set_blueMultiplier:function(a,b){return a[12]=b},get_blueOffset:function(a){return 255*a[14]},set_blueOffset:function(a,b){return a[14]=b/255},get_color:function(a){return(255*a[4]|0)<<16|(255*a[9]|0)<<8|255*a[14]|0},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 gd.get_color(a)},get_greenMultiplier:function(a){return a[6]},set_greenMultiplier:function(a,b){return a[6]=
b},get_greenOffset:function(a){return 255*a[9]},set_greenOffset:function(a,b){return a[9]=b/255},get_redMultiplier:function(a){return a[0]},set_redMultiplier:function(a,b){return a[0]=b},get_redOffset:function(a){return 255*a[4]},set_redOffset:function(a,b){return a[4]=b/255},get:function(a,b){return a[b]},set:function(a,b,c){return a[b]=c}},fm=function(a,b,c,d,f,g){null==g&&(g=0);null==f&&(f=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=
f;this.ty=g};h["lime.math.CairoMatrix3"]=fm;fm.__name__="lime.math.CairoMatrix3";fm.prototype={a:null,b:null,c:null,d:null,tx:null,ty:null,__class__:fm};var sa={__properties__:{set_position:"set_position",get_position:"get_position",get_determinant:"get_determinant"},_new:function(a){if(null==a||16!=a.length)a=sa.__identity,a=null!=a?new Float32Array(a):null;return a},append:function(a,b){var c=a[0],d=a[4],f=a[8],g=a[12],k=a[1],l=a[5],m=a[9],h=a[13],r=a[2],p=a[6],w=a[10],u=a[14],n=a[3],t=a[7],A=a[11],
q=a[15],y=sa.get(b,0),E=sa.get(b,4),L=sa.get(b,8),v=sa.get(b,12),C=sa.get(b,1),x=sa.get(b,5),G=sa.get(b,9),Y=sa.get(b,13),B=sa.get(b,2),H=sa.get(b,6),D=sa.get(b,10),J=sa.get(b,14),K=sa.get(b,3),qa=sa.get(b,7),va=sa.get(b,11);b=sa.get(b,15);a[0]=c*y+k*E+r*L+n*v;a[1]=c*C+k*x+r*G+n*Y;a[2]=c*B+k*H+r*D+n*J;a[3]=c*K+k*qa+r*va+n*b;a[4]=d*y+l*E+p*L+t*v;a[5]=d*C+l*x+p*G+t*Y;a[6]=d*B+l*H+p*D+t*J;a[7]=d*K+l*qa+p*va+t*b;a[8]=f*y+m*E+w*L+A*v;a[9]=f*C+m*x+w*G+A*Y;a[10]=f*B+m*H+w*D+A*J;a[11]=f*K+m*qa+w*va+A*b;a[12]=
g*y+h*E+u*L+q*v;a[13]=g*C+h*x+u*G+q*Y;a[14]=g*B+h*H+u*D+q*J;a[15]=g*K+h*qa+u*va+q*b},appendRotation:function(a,b,c,d){b=sa.__getAxisRotation(a,c.x,c.y,c.z,b);null!=d&&sa.appendTranslation(b,d.x,d.y,d.z);sa.append(a,b)},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;sa.append(a,sa._new(b))},appendTranslation:function(a,b,c,d){a[12]+=b;a[13]+=c;a[14]+=d},clone:function(a){a=qg.toArrayBufferView(a);a=null!=a?new Float32Array(a):null;return sa._new(a)},
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:Pa.error("Column "+b+" out of bounds [0, ..., 3]",{fileName:"lime/math/Matrix4.hx",lineNumber:187,className:"lime.math._Matrix4.Matrix4_Impl_",methodName:"copyColumnFrom"})}},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:Pa.error("Column "+b+" out of bounds [0, ..., 3]",{fileName:"lime/math/Matrix4.hx",lineNumber:225,className:"lime.math._Matrix4.Matrix4_Impl_",methodName:"copyColumnTo"})}},copyFrom:function(a,b){a.set(b)},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:Pa.error("Row "+b+" out of bounds [0, ..., 3]",{fileName:"lime/math/Matrix4.hx",lineNumber:272,className:"lime.math._Matrix4.Matrix4_Impl_",methodName:"copyRowFrom"})}},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:Pa.error("Row "+b+" out of bounds [0, ..., 3]",{fileName:"lime/math/Matrix4.hx",lineNumber:310,className:"lime.math._Matrix4.Matrix4_Impl_",methodName:"copyRowTo"})}},create2D:function(a,b,c,d,f,g,k){null==k&&(k=0);null==g&&(g=0);a[0]=b;a[1]=c;a[2]=0;a[3]=0;a[4]=d;a[5]=f;a[6]=0;a[7]=0;a[8]=0;a[9]=0;a[10]=1;a[11]=0;a[12]=g;a[13]=k;a[14]=0;a[15]=1},createOrtho:function(a,b,c,d,f,g,k){var l=1/(c-b),m=1/(f-d),h=1/(k-g);a[0]=2*l;a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=2*m;a[6]=
0;a[7]=0;a[8]=0;a[9]=0;a[10]=-2*h;a[11]=0;a[12]=-(b+c)*l;a[13]=-(d+f)*m;a[14]=-(g+k)*h;a[15]=1},createPerspective:function(a,b,c,d,f){if(-1E-7<c&&1E-7>c)throw J.thrown("Aspect ratio may not be 0");b*=d;var g=-b;c*=b;var k=-c;a[0]=2*d/(c-k);a[1]=0;a[2]=0;a[3]=0;a[4]=0;a[5]=2*d/(b-g);a[6]=0;a[7]=0;a[8]=(c+k)/(c-k);a[9]=(b+g)/(b-g);a[10]=-(f+d)/(f-d);a[11]=-1;a[12]=0;a[13]=0;a[14]=-2*f*d/(f-d);a[15]=1},deltaTransformVector:function(a,b,c){null==c&&(c=new tc);var d=b.x,f=b.y;b=b.z;c.x=d*a[0]+f*a[4]+b*
a[8]+a[3];c.y=d*a[1]+f*a[5]+b*a[9]+a[7];c.z=d*a[2]+f*a[6]+b*a[10]+a[11];return c},fromMatrix3:function(a){var b=sa._new();sa.create2D(b,a[0],a[1],a[3],a[4],a[6],a[7]);return b},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},interpolate:function(a,b,c,d){null==d&&(d=sa._new());for(var f=0;16>f;){var g=f++;sa.set(d,g,sa.get(a,g)+(sa.get(b,g)-sa.get(a,g))*c)}return d},interpolateTo:function(a,b,c){for(var d=
0;16>d;){var f=d++;a[f]+=(sa.get(b,f)-a[f])*c}},invert:function(a){var b=sa.get_determinant(a),c=1E-11<Math.abs(b);if(c){b=1/b;var d=a[0],f=a[4],g=a[8],k=a[12],l=a[1],m=a[5],h=a[9],r=a[13],p=a[2],w=a[6],u=a[10],n=a[14],t=a[3],A=a[7],q=a[11],y=a[15];a[0]=b*(m*(u*y-n*q)-h*(w*y-n*A)+r*(w*q-u*A));a[1]=-b*(l*(u*y-n*q)-h*(p*y-n*t)+r*(p*q-u*t));a[2]=b*(l*(w*y-n*A)-m*(p*y-n*t)+r*(p*A-w*t));a[3]=-b*(l*(w*q-u*A)-m*(p*q-u*t)+h*(p*A-w*t));a[4]=-b*(f*(u*y-n*q)-g*(w*y-n*A)+k*(w*q-u*A));a[5]=b*(d*(u*y-n*q)-g*(p*
y-n*t)+k*(p*q-u*t));a[6]=-b*(d*(w*y-n*A)-f*(p*y-n*t)+k*(p*A-w*t));a[7]=b*(d*(w*q-u*A)-f*(p*q-u*t)+g*(p*A-w*t));a[8]=b*(f*(h*y-r*q)-g*(m*y-r*A)+k*(m*q-h*A));a[9]=-b*(d*(h*y-r*q)-g*(l*y-r*t)+k*(l*q-h*t));a[10]=b*(d*(m*y-r*A)-f*(l*y-r*t)+k*(l*A-m*t));a[11]=-b*(d*(m*q-h*A)-f*(l*q-h*t)+g*(l*A-m*t));a[12]=-b*(f*(h*n-r*u)-g*(m*n-r*w)+k*(m*u-h*w));a[13]=b*(d*(h*n-r*u)-g*(l*n-r*p)+k*(l*u-h*p));a[14]=-b*(d*(m*n-r*w)-f*(l*n-r*p)+k*(l*w-m*p));a[15]=b*(d*(m*u-h*w)-f*(l*u-h*p)+g*(l*w-m*p))}return c},pointAt:function(a,
b,c,d){null==c&&(c=new tc(0,0,1));null==d&&(d=new tc(0,1,0));var f=null;null==f&&(f=new tc);f.x=b.x-c.x;f.y=b.y-c.y;f.z=b.z-c.z;c=f;d=new tc(d.x,d.y,d.z,d.w);f=Math.sqrt(c.x*c.x+c.y*c.y+c.z*c.z);0!=f&&(c.x/=f,c.y/=f,c.z/=f);f=Math.sqrt(d.x*d.x+d.y*d.y+d.z*d.z);0!=f&&(d.x/=f,d.y/=f,d.z/=f);var g=new tc(c.x,c.y,c.z,c.w);f=d.x*c.x+d.y*c.y+d.z*c.z;g.x*=f;g.y*=f;g.z*=f;f=null;null==f&&(f=new tc);f.x=d.x-g.x;f.y=d.y-g.y;f.z=d.z-g.z;d=f;0<Math.sqrt(d.x*d.x+d.y*d.y+d.z*d.z)?(f=Math.sqrt(d.x*d.x+d.y*d.y+d.z*
d.z),0!=f&&(d.x/=f,d.y/=f,d.z/=f)):d=0!=c.x?new tc(-c.y,c.x,0):new tc(1,0,0);f=null;null==f&&(f=new tc);g=d.z*c.x-d.x*c.z;var k=d.x*c.y-d.y*c.x;f.x=d.y*c.z-d.z*c.y;f.y=g;f.z=k;f.w=1;g=f;f=Math.sqrt(g.x*g.x+g.y*g.y+g.z*g.z);0!=f&&(g.x/=f,g.y/=f,g.z/=f);a[0]=g.x;a[4]=g.y;a[8]=g.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},prepend:function(a,b){var c=sa.get(b,0),d=sa.get(b,4),f=sa.get(b,8),g=sa.get(b,12),k=sa.get(b,1),l=sa.get(b,
5),m=sa.get(b,9),h=sa.get(b,13),r=sa.get(b,2),p=sa.get(b,6),w=sa.get(b,10),u=sa.get(b,14),n=sa.get(b,3),t=sa.get(b,7),A=sa.get(b,11);b=sa.get(b,15);var q=a[0],y=a[4],E=a[8],L=a[12],v=a[1],C=a[5],x=a[9],G=a[13],Y=a[2],B=a[6],H=a[10],D=a[14],J=a[3],K=a[7],qa=a[11],va=a[15];a[0]=c*q+k*y+r*E+n*L;a[1]=c*v+k*C+r*x+n*G;a[2]=c*Y+k*B+r*H+n*D;a[3]=c*J+k*K+r*qa+n*va;a[4]=d*q+l*y+p*E+t*L;a[5]=d*v+l*C+p*x+t*G;a[6]=d*Y+l*B+p*H+t*D;a[7]=d*J+l*K+p*qa+t*va;a[8]=f*q+m*y+w*E+A*L;a[9]=f*v+m*C+w*x+A*G;a[10]=f*Y+m*B+w*
H+A*D;a[11]=f*J+m*K+w*qa+A*va;a[12]=g*q+h*y+u*E+b*L;a[13]=g*v+h*C+u*x+b*G;a[14]=g*Y+h*B+u*H+b*D;a[15]=g*J+h*K+u*qa+b*va},prependRotation:function(a,b,c,d){b=sa.__getAxisRotation(a,c.x,c.y,c.z,b);null!=d&&sa.appendTranslation(b,d.x,d.y,d.z);sa.prepend(a,b)},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;sa.prepend(a,sa._new(b))},prependTranslation:function(a,b,c,d){var f=sa._new();sa.set_position(f,new tc(b,c,d));sa.prepend(a,f)},transformVector:function(a,
b,c){null==c&&(c=new tc);var d=b.x,f=b.y;b=b.z;c.x=d*a[0]+f*a[4]+b*a[8]+a[12];c.y=d*a[1]+f*a[5]+b*a[9]+a[13];c.z=d*a[2]+f*a[6]+b*a[10]+a[14];c.w=d*a[3]+f*a[7]+b*a[11]+a[15];return c},transformVectors:function(a,b,c){for(var d=0,f,g,k;d+3<=b.length;)f=b[d],g=b[d+1],k=b[d+2],c[d]=f*a[0]+g*a[4]+k*a[8]+a[12],c[d+1]=f*a[1]+g*a[5]+k*a[9]+a[13],c[d+2]=f*a[2]+g*a[6]+k*a[10]+a[14],d+=3},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},__getAxisRotation:function(a,b,c,d,f){a=sa._new();b=new tc(b,c,d);f=Math.PI/180*-f;d=Math.cos(f);f=Math.sin(f);c=1-d;sa.set(a,0,d+b.x*b.x*c);sa.set(a,5,d+b.y*b.y*c);sa.set(a,10,d+b.z*b.z*c);d=b.x*b.y*c;var g=b.z*f;sa.set(a,4,d+g);sa.set(a,1,d-g);d=b.x*b.z*c;g=b.y*f;sa.set(a,8,d-g);sa.set(a,2,d+g);d=b.y*b.z*c;g=b.x*f;sa.set(a,9,d+g);sa.set(a,6,d-g);return a},__swap:function(a,b,c){var d=a[b];a[b]=a[c];a[c]=d},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])},get_position:function(a){return new tc(a[12],a[13],a[14])},set_position:function(a,b){a[12]=b.x;a[13]=b.y;a[14]=b.z;return b},get:function(a,b){return a[b]},set:function(a,b,c){return a[b]=c}},K={__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"},__alpha16:null,__clamp:null,a16:null,unmult:null,_new:function(a){null==a&&(a=0);return a},create:function(a,b,c,d){return(a&255)<<24|(b&255)<<16|(c&255)<<8|d&255},multiplyAlpha:function(a){0!=(a&255)&&255!=(a&255)&&(K.a16=K.__alpha16[a&255])},readUInt8:function(a,b,c,d,f){null==f&&(f=!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}f&&0!=(a&255)&&255!=(a&255)&&(K.unmult=255/(a&255))},set:function(a,b,c,d,f){},unmultiplyAlpha:function(a){0!=(a&255)&&255!=(a&255)&&(K.unmult=255/(a&255))},writeUInt8:function(a,b,c,d,f){null==f&&(f=!1);null==d&&(d=0);f&&(0==(a&255)?0!=a&&(a=0):255!=(a&255)&&(K.a16=K.__alpha16[a&255],a=((a>>>24&255)*K.a16>>16&255)<<24|((a>>>16&255)*K.a16>>16&255)<<16|((a>>>8&255)*K.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}},__fromARGB:function(a){return(a>>>16&255)<<24|(a>>>8&255)<<16|(a&255)<<8|a>>>24&255},__fromBGRA:function(a){return(a>>>8&255)<<24|(a>>>16&255)<<16|(a>>>24&255)<<8|a&255},get_a:function(a){return a&255},set_a:function(a,b){return b},get_b:function(a){return a>>>
8&255},set_b:function(a,b){return b},get_g:function(a){return a>>>16&255},set_g:function(a,b){return b},get_r:function(a){return a>>>24&255},set_r:function(a,b){return b}},Uc=function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.x=a;this.y=b;this.width=c;this.height=d};h["lime.math.Rectangle"]=Uc;Uc.__name__="lime.math.Rectangle";Uc.prototype={height:null,width:null,x:null,y:null,clone:function(){return new Uc(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 Uc);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 f=this.y<a.y?a.y:this.y;a=this.get_bottom()>a.get_bottom()?a.get_bottom():this.get_bottom();
if(a<=f)return b.setEmpty(),b;b.x=c;b.y=f;b.width=d-c;b.height=a-f;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 Uc);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(),f=this.y>a.y?a.y:this.y;a=this.get_bottom()<a.get_bottom()?a.get_bottom():this.get_bottom();b.setTo(c,f,d-c,a-f)}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 yd(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 yd(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 yd(this.x,this.y)},set_topLeft:function(a){this.x=a.x;this.y=a.y;return a.clone()},__class__:Uc,__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 tc=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"]=tc;tc.__name__="lime.math.Vector4";tc.__properties__={get_Z_AXIS:"get_Z_AXIS",get_Y_AXIS:"get_Y_AXIS",get_X_AXIS:"get_X_AXIS"};tc.angleBetween=function(a,b){a=new tc(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 tc(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)};tc.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)};tc.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};tc.get_X_AXIS=function(){return new tc(1,0,0)};tc.get_Y_AXIS=function(){return new tc(0,1,0)};tc.get_Z_AXIS=function(){return new tc(0,0,1)};tc.prototype={w:null,x:null,y:null,z:null,add:function(a,b){null==b&&
(b=new tc);b.x=this.x+a.x;b.y=this.y+a.y;b.z=this.z+a.z;return b},clone:function(){return new tc(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 tc);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 tc);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__:tc,__properties__:{get_lengthSquared:"get_lengthSquared",
get_length:"get_length"}};var zc=function(){};h["lime.media.AudioBuffer"]=zc;zc.__name__="lime.media.AudioBuffer";zc.fromBase64=function(a){if(null==a)return null;-1==a.indexOf(",")&&(a="data:"+zc.__getCodec(lf.decode(a))+";base64,"+a);var b=new zc;b.set_src(new Howl({src:[a],html5:!0,preload:!1}));return b};zc.fromBytes=function(a){if(null==a)return null;var b=new zc;b.set_src(new Howl({src:["data:"+zc.__getCodec(a)+";base64,"+lf.encode(a)],html5:!0,preload:!1}));return b};zc.fromFile=function(a){if(null==
a)return null;var b=new zc;b.__srcHowl=new Howl({src:[a],preload:!1});return b};zc.fromFiles=function(a){var b=new zc;b.__srcHowl=new Howl({src:a,preload:!1});return b};zc.fromVorbisFile=function(a){return null};zc.loadFromFile=function(a){var b=new od,c=zc.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};zc.loadFromFiles=function(a){var b=new od,c=zc.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};zc.__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[1],c=a.b[2];switch(a.b[0]){case 73:if(68==b&&51==c)return"audio/mp3";break;case 255:switch(b){case 243:case 250:case 251:return"audio/mp3"}}break;case "fLaC":return"audio/flac";default:switch(b=
a.b[1],c=a.b[2],a.b[0]){case 73:if(68==b&&51==c)return"audio/mp3";break;case 255:switch(b){case 243:case 250:case 251:return"audio/mp3"}}}Pa.error("Unsupported sound format",{fileName:"lime/media/AudioBuffer.hx",lineNumber:440,className:"lime.media.AudioBuffer",methodName:"__getCodec"});return null};zc.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__:zc,__properties__:{set_src:"set_src",get_src:"get_src"}};var yn=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){db.lastError=b}null==this.web&&"web"!=a&&(this.html5=new xn,this.type="html5")}else this.type="custom"};h["lime.media.AudioContext"]=yn;yn.__name__="lime.media.AudioContext";
yn.prototype={custom:null,flash:null,html5:null,openal:null,type:null,web:null,__class__:yn};var ld=function(){};h["lime.media.AudioManager"]=ld;ld.__name__="lime.media.AudioManager";ld.context=null;ld.init=function(a){if(null==ld.context){if(null==a&&(ld.context=new yn,a=ld.context,"openal"==a.type)){var b=a.openal,c=b.openDevice();c=b.createContext(c);b.makeContextCurrent(c);b.processContext(c)}ld.context=a}};ld.resume=function(){if(null!=ld.context&&"openal"==ld.context.type){var a=ld.context.openal,
b=a.getCurrentContext();if(null!=b){var c=a.getContextsDevice(b);a.resumeDevice(c);a.processContext(b)}}};ld.shutdown=function(){if(null!=ld.context&&"openal"==ld.context.type){var a=ld.context.openal,b=a.getCurrentContext();if(null!=b){var c=a.getContextsDevice(b);a.makeContextCurrent(null);a.destroyContext(b);null!=c&&a.closeDevice(c)}}ld.context=null};ld.suspend=function(){if(null!=ld.context&&"openal"==ld.context.type){var a=ld.context.openal,b=a.getCurrentContext();null!=b&&(a.suspendContext(b),
b=a.getContextsDevice(b),null!=b&&a.pauseDevice(b))}};var zn=function(a,b,c,d){null==d&&(d=0);null==b&&(b=0);this.onComplete=new Zc;this.buffer=a;this.offset=b;this.__backend=new hn(this);null!=c&&0!=c&&this.set_length(c);this.set_loops(d);null!=a&&this.init()};h["lime.media.AudioSource"]=zn;zn.__name__="lime.media.AudioSource";zn.prototype={onComplete:null,buffer:null,offset:null,__backend:null,dispose:function(){this.__backend.dispose()},init:function(){this.__backend.init()},play:function(){this.__backend.play()},
pause:function(){this.__backend.pause()},stop:function(){this.__backend.stop()},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_pitch:function(){return this.__backend.getPitch()},set_pitch:function(a){return this.__backend.setPitch(a)},get_position:function(){return this.__backend.getPosition()},set_position:function(a){return this.__backend.setPosition(a)},__class__:zn,__properties__:{set_position:"set_position",get_position:"get_position",set_pitch:"set_pitch",get_pitch:"get_pitch",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 lo=function(){};h["lime.media.FlashAudioContext"]=lo;lo.__name__="lime.media.FlashAudioContext";lo.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,f,g){},play:function(a,b,c,d){return null},__class__:lo};var xn=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"]=xn;xn.__name__="lime.media.HTML5AudioContext";xn.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 zc;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__:xn};var mo=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"]=
mo;mo.__name__="lime.media.OpenALAudioContext";mo.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,f){H.bufferData(a,b,c,d,f)},buffer3f:function(a,b,c,d,f){H.buffer3f(a,b,c,d,f)},buffer3i:function(a,
b,c,d,f){H.buffer3i(a,b,c,d,f)},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 Ib.closeDevice(a)},createContext:function(a,b){return Ib.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&&Ib.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:Ib.getContextsDevice(a)},getCurrentContext:function(){return Ib.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():Ib.getError(a)},getErrorString:function(a){return null==a?H.getErrorString():Ib.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):Ib.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):Ib.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 Ib.makeContextCurrent(a)},openDevice:function(a){return Ib.openDevice(a)},
pauseDevice:function(a){Ib.pauseDevice(a)},processContext:function(a){Ib.processContext(a)},resumeDevice:function(a){Ib.resumeDevice(a)},source3f:function(a,b,c,d,f){H.source3f(a,b,c,d,f)},source3i:function(a,b,c,d,f){H.source3i(a,b,c,d,f)},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){Ib.suspendContext(a)},__class__:mo};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,f){};H.buffer3f=function(a,b,c,d,f){};H.buffer3i=function(a,b,c,d,f){};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,f){};H.source3i=function(a,b,c,d,f){};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 Ib=function(){};h["lime.media.openal.ALC"]=Ib;Ib.__name__="lime.media.openal.ALC";Ib.closeDevice=function(a){return!1};Ib.createContext=
function(a,b){return null};Ib.destroyContext=function(a){};Ib.getContextsDevice=function(a){return null};Ib.getCurrentContext=function(){return null};Ib.getError=function(a){return 0};Ib.getErrorString=function(a){switch(Ib.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""}};Ib.getIntegerv=function(a,b,c){return null};Ib.getString=function(a,b){return null};Ib.makeContextCurrent=function(a){return!1};Ib.openDevice=function(a){return null};Ib.pauseDevice=function(a){};Ib.processContext=function(a){};Ib.resumeDevice=function(a){};Ib.suspendContext=function(a){};var no=function(){};h["lime.media.vorbis.VorbisComment"]=no;no.__name__="lime.media.vorbis.VorbisComment";no.prototype={userComments:null,vendor:null,__class__:no};var hl=function(a){this.handle=
a};h["lime.media.vorbis.VorbisFile"]=hl;hl.__name__="lime.media.vorbis.VorbisFile";hl.fromBytes=function(a){return null};hl.fromFile=function(a){return null};hl.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 Gb(0,0)},pcmTotal:function(a){return new Gb(0,0)},rawSeek:function(a){return 0},rawSeekLap:function(a){return 0},rawTell:function(){return new Gb(0,0)},rawTotal:function(a){return new Gb(0,0)},read:function(a,b,c,d,f,g){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__:hl};var oo=function(){};h["lime.media.vorbis.VorbisInfo"]=oo;oo.__name__="lime.media.vorbis.VorbisInfo";oo.prototype={bitrateLower:null,bitrateNominal:null,bitrateUpper:null,channels:null,rate:null,version:null,__class__:oo};var il=function(){};h["lime.net._IHTTPRequest"]=il;il.__name__="lime.net._IHTTPRequest";il.__isInterface__=!0;il.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,manageCookies:null,cancel:null,__class__:il};var te=function(a){this.uri=a;this.contentType="application/x-www-form-urlencoded";this.followRedirects=!0;this.enableResponseHeaders=!1;this.formData=new Ba;this.headers=[];this.method="GET";this.timeout=3E4;this.withCredentials=!1;this.manageCookies=!0;this.__backend=new Sa;this.__backend.init(this)};h["lime.net._HTTPRequest.AbstractHTTPRequest"]=
te;te.__name__="lime.net._HTTPRequest.AbstractHTTPRequest";te.__interfaces__=[il];te.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,manageCookies:null,__backend:null,cancel:function(){this.__backend.cancel()},load:function(a){return null},__class__:te};var An=function(a){te.call(this,a)};h["lime.net.HTTPRequest"]=
An;An.__name__="lime.net.HTTPRequest";An.__super__=te;An.prototype=x(te.prototype,{__class__:An});var ag=function(a){te.call(this,a)};h["lime.net._HTTPRequest_Bytes"]=ag;ag.__name__="lime.net._HTTPRequest_Bytes";ag.__super__=te;ag.prototype=x(te.prototype,{fromBytes:function(a){return a},load:function(a){var b=this;null!=a&&(this.uri=a);var c=new od;a=this.__backend.loadData(this.uri);a.onProgress(q(c,c.progress));a.onError(function(a){b.responseData=a.responseData;c.error(a.error)});a.onComplete(function(a){b.responseData=
b.fromBytes(a);c.complete(b.responseData)});return c.future},__class__:ag});var ni=function(a){te.call(this,a)};h["lime.net._HTTPRequest_String"]=ni;ni.__name__="lime.net._HTTPRequest_String";ni.__super__=te;ni.prototype=x(te.prototype,{load:function(a){var b=this;null!=a&&(this.uri=a);var c=new od;a=this.__backend.loadText(this.uri);a.onProgress(q(c,c.progress));a.onError(function(a){b.responseData=a.responseData;c.error(a.error)});a.onComplete(function(a){b.responseData=a;c.complete(b.responseData)});
return c.future},__class__:ni});var ji=function(a,b){this.error=a;this.responseData=b};h["lime.net._HTTPRequestErrorResponse"]=ji;ji.__name__="lime.net._HTTPRequestErrorResponse";ji.prototype={error:null,responseData:null,__class__:ji};var Xk=function(a,b){null==b&&(b="");this.name=a;this.value=b};h["lime.net.HTTPRequestHeader"]=Xk;Xk.__name__="lime.net.HTTPRequestHeader";Xk.prototype={name:null,value:null,__class__:Xk};var Qj=function(a){te.call(this,a)};h["lime.net._HTTPRequest_lime_text_Font"]=
Qj;Qj.__name__="lime.net._HTTPRequest_lime_text_Font";Qj.__super__=ag;Qj.prototype=x(ag.prototype,{fromBytes:function(a){return eb.fromBytes(a)},__class__:Qj});var jl=function(a){te.call(this,a)};h["lime.net._HTTPRequest_lime_utils_Bytes"]=jl;jl.__name__="lime.net._HTTPRequest_lime_utils_Bytes";jl.__super__=ag;jl.prototype=x(ag.prototype,{fromBytes:function(a){return Jd.fromBytes(a)},__class__:jl});var kl=function(a){te.call(this,a)};h["lime.net._HTTPRequest_openfl_utils_ByteArray"]=kl;kl.__name__=
"lime.net._HTTPRequest_openfl_utils_ByteArray";kl.__super__=ag;kl.prototype=x(ag.prototype,{fromBytes:function(a){return kb.fromBytes(a)},__class__:kl});var Pe=function(){};h["lime.system.CFFI"]=Pe;Pe.__name__="lime.system.CFFI";Pe.available=null;Pe.enabled=null;Pe.load=function(a,b,c,d){null==d&&(d=!1);null==c&&(c=0);return Pe.enabled?null:la.makeVarArgs(function(a){return{}})};Pe.stringValue=function(a){return a};Pe.__findNDLLFolder=function(){return""};Pe.__loaderTrace=function(a){};Pe.__sysName=
function(){return null};Pe.__tryLoad=function(a,b,c,d){return null};var hd={_new:function(a){return a},get:function(a){return 0},equals:function(a,b){return hd.get(a)==b},equalsPointer:function(a,b){return hd.get(a)==hd.get(b)},greaterThan:function(a,b){return hd.get(a)>b},greaterThanPointer:function(a,b){return hd.get(a)>hd.get(b)},greaterThanOrEqual:function(a,b){return hd.get(a)>=b},greaterThanOrEqualPointer:function(a,b){return hd.get(a)>=hd.get(b)},lessThan:function(a,b){return hd.get(a)<b},
lessThanPointer:function(a,b){return hd.get(a)<hd.get(b)},lessThanOrEqual:function(a,b){return hd.get(a)<=b},lessThanOrEqualPointer:function(a,b){return hd.get(a)<=hd.get(b)},notEquals:function(a,b){return hd.get(a)!=b},notEqualsPointer:function(a,b){return hd.get(a)!=hd.get(b)}},Qc=function(){};h["lime.system.Clipboard"]=Qc;Qc.__name__="lime.system.Clipboard";Qc.__properties__={set_text:"set_text",get_text:"get_text"};Qc._text=null;Qc.__update=function(){var a=Qc._text;Qc._text=a;Qc.__updated=!0;
Qc._text!=a&&Qc.onUpdate.dispatch()};Qc.get_text=function(){Qc.__update();return Qc._text};Qc.set_text=function(a){var b=Qc._text;Qc._text=a;var c=F.current.__window;null!=c&&c.__backend.setClipboard(a);Qc._text!=b&&Qc.onUpdate.dispatch();return a};var Bn=function(){};h["lime.system.Display"]=Bn;Bn.__name__="lime.system.Display";Bn.prototype={bounds:null,currentMode:null,id:null,dpi:null,name:null,supportedModes:null,__class__:Bn};var Cn=function(a,b,c,d){this.width=a;this.height=b;this.refreshRate=
c;this.pixelFormat=d};h["lime.system.DisplayMode"]=Cn;Cn.__name__="lime.system.DisplayMode";Cn.prototype={height:null,pixelFormat:null,refreshRate:null,width:null,__class__:Cn};var Xf=G["lime.system.Endian"]={__ename__:"lime.system.Endian",__constructs__:null,LITTLE_ENDIAN:{_hx_name:"LITTLE_ENDIAN",_hx_index:0,__enum__:"lime.system.Endian",toString:t},BIG_ENDIAN:{_hx_name:"BIG_ENDIAN",_hx_index:1,__enum__:"lime.system.Endian",toString:t}};Xf.__constructs__=[Xf.LITTLE_ENDIAN,Xf.BIG_ENDIAN];var De=
function(a,b){this.onUpdate=new ln;this.type=a;this.id=b};h["lime.system.Sensor"]=De;De.__name__="lime.system.Sensor";De.getSensors=function(a){if(null==a)return De.sensors.slice();for(var b=[],c=0,d=De.sensors;c<d.length;){var f=d[c];++c;f.type==a&&b.push(f)}return b};De.registerSensor=function(a,b){a=new De(a,b);De.sensors.push(a);return De.sensorByID.h[b]=a};De.prototype={id:null,onUpdate:null,type:null,__class__:De};var Wn=G["lime.system.SensorType"]={__ename__:"lime.system.SensorType",__constructs__:null,
ACCELEROMETER:{_hx_name:"ACCELEROMETER",_hx_index:0,__enum__:"lime.system.SensorType",toString:t}};Wn.__constructs__=[Wn.ACCELEROMETER];var Fa=function(){};h["lime.system.System"]=Fa;Fa.__name__="lime.system.System";Fa.__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"};Fa.disableCFFI=null;Fa.__applicationDirectory=null;Fa.__applicationEntryPoint=null;Fa.__applicationStorageDirectory=null;Fa.__desktopDirectory=null;Fa.__deviceModel=null;Fa.__deviceVendor=
null;Fa.__documentsDirectory=null;Fa.__endianness=null;Fa.__fontsDirectory=null;Fa.__platformLabel=null;Fa.__platformName=null;Fa.__platformVersion=null;Fa.__userDirectory=null;Fa.embed=v.lime.embed=function(a,b,c,d,f){if(null!=Fa.__applicationEntryPoint&&Object.prototype.hasOwnProperty.call(Fa.__applicationEntryPoint.h,a)){var g="string"==typeof b?window.document.getElementById(b):null==b?window.document.createElement("div"):b;null==g?window.console.log("[lime.embed] ERROR: Cannot find target element: "+
M.string(b)):(null==c&&(c=0),null==d&&(d=0),null==f&&(f={}),Object.prototype.hasOwnProperty.call(f,"background")&&"string"==typeof f.background&&(b=O.replace(M.string(f.background),"#",""),-1<b.indexOf("0x")?f.background=M.parseInt(b):f.background=M.parseInt("0x"+b)),f.element=g,f.width=c,f.height=d,Fa.__applicationEntryPoint.h[a](f))}};Fa.exit=function(a){var b=F.current;if(null!=b&&(b.onExit.dispatch(a),b.onExit.canceled))return;null!=b&&null!=b.__window&&b.__window.close()};Fa.getDisplay=function(a){return 0==
a?(a=new Bn,a.id=0,a.name="Generic Display",a.dpi=96*window.devicePixelRatio,a.currentMode=new Cn(window.screen.width,window.screen.height,60,1),a.supportedModes=[a.currentMode],a.bounds=new Uc(0,0,a.currentMode.width,a.currentMode.height),a):null};Fa.getTimer=function(){return window.performance.now()|0};Fa.load=function(a,b,c,d){null==d&&(d=!1);null==c&&(c=0);return Pe.load(a,b,c,d)};Fa.openFile=function(a){null!=a&&window.open(a,"_blank")};Fa.openURL=function(a,b){null==b&&(b="_blank");null!=a&&
window.open(a,b)};Fa.__copyMissingFields=function(a,b){if(null!=b&&null!=a)for(var c=0,d=la.fields(b);c<d.length;){var f=d[c];++c;Object.prototype.hasOwnProperty.call(a,f)||(a[f]=la.field(b,f))}};Fa.__getDirectory=function(a){return null};Fa.__parseBool=function(a){return"true"==a};Fa.__registerEntryPoint=function(a,b){null==Fa.__applicationEntryPoint&&(Fa.__applicationEntryPoint=new Ba);Fa.__applicationEntryPoint.h[a]=b};Fa.__runProcess=function(a,b){return null};Fa.get_allowScreenTimeout=function(){return!0};
Fa.set_allowScreenTimeout=function(a){return!0};Fa.get_applicationDirectory=function(){null==Fa.__applicationDirectory&&(Fa.__applicationDirectory=Fa.__getDirectory(0));return Fa.__applicationDirectory};Fa.get_applicationStorageDirectory=function(){null==Fa.__applicationStorageDirectory&&(Fa.__applicationStorageDirectory=Fa.__getDirectory(1));return Fa.__applicationStorageDirectory};Fa.get_deviceModel=function(){return Fa.__deviceModel};Fa.get_deviceVendor=function(){return Fa.__deviceVendor};Fa.get_desktopDirectory=
function(){null==Fa.__desktopDirectory&&(Fa.__desktopDirectory=Fa.__getDirectory(2));return Fa.__desktopDirectory};Fa.get_documentsDirectory=function(){null==Fa.__documentsDirectory&&(Fa.__documentsDirectory=Fa.__getDirectory(3));return Fa.__documentsDirectory};Fa.get_endianness=function(){if(null==Fa.__endianness){var a=new ArrayBuffer(2),b=null,c=null,d=null,f=null,g=null,k=b=null!=b?new Uint8Array(b):null!=c?new Uint8Array(c):null!=d?new Uint8Array(d.__array):null!=f?new Uint8Array(f):null!=a?
null==g?new Uint8Array(a,0):new Uint8Array(a,0,g):null;g=f=d=c=b=null;b=null!=b?new Uint16Array(b):null!=c?new Uint16Array(c):null!=d?new Uint16Array(d.__array):null!=f?new Uint16Array(f):null!=a?null==g?new Uint16Array(a,0):new Uint16Array(a,0,g):null;k[0]=170;k[1]=187;Fa.__endianness=43707==b[0]?Xf.BIG_ENDIAN:Xf.LITTLE_ENDIAN}return Fa.__endianness};Fa.get_fontsDirectory=function(){null==Fa.__fontsDirectory&&(Fa.__fontsDirectory=Fa.__getDirectory(4));return Fa.__fontsDirectory};Fa.get_numDisplays=
function(){return 1};Fa.get_platformLabel=function(){if(null==Fa.__platformLabel){var a=Fa.get_platformName(),b=Fa.get_platformVersion();null!=a&&null!=b?Fa.__platformLabel=a+" "+b:null!=a&&(Fa.__platformLabel=a)}return Fa.__platformLabel};Fa.get_platformName=function(){null==Fa.__platformName&&(Fa.__platformName="HTML5");return Fa.__platformName};Fa.get_platformVersion=function(){return Fa.__platformVersion};Fa.get_userDirectory=function(){null==Fa.__userDirectory&&(Fa.__userDirectory=Fa.__getDirectory(5));
return Fa.__userDirectory};var Xg=function(a){this.__activeJob=new mj;this.__jobComplete=new mj;this.__jobOutput=new ib;this.workIterations=new mj;this.workIterations.value=0;this.__jobComplete.value=!1;this.__mode=null!=a&&a};h["lime.system.WorkOutput"]=Xg;Xg.__name__="lime.system.WorkOutput";Xg.prototype={workIterations:null,__mode:null,__jobOutput:null,__jobComplete:null,__activeJob:null,sendComplete:function(a,b){this.__jobComplete.value||(this.__jobComplete.value=!0,1==this.__mode?Ab.returnMessage({event:"COMPLETE",
message:a,jobID:this.__activeJob.value.id},b):this.__jobOutput.add({event:"COMPLETE",message:a,jobID:this.__activeJob.value.id}))},sendError:function(a,b){this.__jobComplete.value||(this.__jobComplete.value=!0,1==this.__mode?Ab.returnMessage({event:"ERROR",message:a,jobID:this.__activeJob.value.id},b):this.__jobOutput.add({event:"ERROR",message:a,jobID:this.__activeJob.value.id}))},sendProgress:function(a,b){this.__jobComplete.value||(1==this.__mode?Ab.returnMessage({event:"PROGRESS",message:a,jobID:this.__activeJob.value.id},
b):this.__jobOutput.add({event:"PROGRESS",message:a,jobID:this.__activeJob.value.id}))},resetJobProgress:function(){this.__jobComplete.value=!1;this.workIterations.value=0},createThread:function(a){var b=this;a=Ab.create(a);a.onMessage.add(function(a){b.__jobOutput.add(a)});return a},get_mode:function(){return this.__mode},get_activeJob:function(){return this.__activeJob.value},set_activeJob:function(a){return this.__activeJob.value=a},__class__:Xg,__properties__:{set_activeJob:"set_activeJob",get_activeJob:"get_activeJob",
get_mode:"get_mode"}};var tb=function(a,b,c){null==b&&(b=1);null==a&&(a=0);this.__jobQueue=new ll;this.workPriority=1;this.onRun=new sn;this.onProgress=new ki;this.onError=new ki;this.onComplete=new ki;Xg.call(this,c);this.__activeJobs=new ll(this);this.minThreads=a;this.maxThreads=b;1==this.__mode&&(this.__activeThreads=new hc,this.__idleThreads=[])};h["lime.system.ThreadPool"]=tb;tb.__name__="lime.system.ThreadPool";tb.isMainThread=function(){return Ab.__current==tb.__mainThread};tb.__executeThread=
function(){(function(){var a,b,c,d,f,g,k;return $jscomp.asyncExecutePromiseGeneratorProgram(function(l){switch(l.nextAddress){case 1:a=new Xg(!0),b=null;case 2:if(null!=b){l.jumpTo(4);break}case 5:return Ab.__messages.isEmpty()?l.yield(new Promise(function(a,b){Ab.__resolveMethods.add(a)}),11):l.yield((new Promise(function(a,b){B.setTimeout(a)})).then(function(a){return Ab.__messages.pop()}),10);case 10:c=l.yieldResult;l.jumpTo(9);break;case 11:c=l.yieldResult;case 9:b=c;if(null==b||!Object.prototype.hasOwnProperty.call(b,
"event")){l.jumpTo(5);break}a.__jobComplete.value=!1;a.workIterations.value=0;case 4:if("EXIT"==b.event)return Ab.__current.destroy(),l.return();if("WORK"!=b.event||null==b.job){b=null;l.jumpTo(2);break}a.__activeJob.value=b.job;d=null;l.setCatchFinallyBlocks(12);case 14:if(a.__jobComplete.value){f=!1;l.jumpTo(16);break}return l.yield((new Promise(function(a,b){B.setTimeout(a)})).then(function(a){return Ab.__messages.pop()}),17);case 17:d=l.yieldResult,f=null==d;case 16:if(!f){l.jumpTo(15);break}a.workIterations.value+=
1;jn.toFunction(b.job.doWork)(b.job.state,a);l.jumpTo(14);break;case 15:l.leaveTryBlock(13);break;case 12:g=l.enterCatchBlock(),k=J.caught(g),a.sendError(k);case 13:a.__activeJob.value=null,null==d||a.__jobComplete.value?b=d:Object.prototype.hasOwnProperty.call(d,"event")&&(b=d,a.__jobComplete.value=!1,a.workIterations.value=0),l.jumpTo(2)}})})()};tb.timestamp=function(){return(new Date).getTime()/1E3};tb.__super__=Xg;tb.prototype=x(Xg.prototype,{maxThreads:null,minThreads:null,onComplete:null,onError:null,
onProgress:null,onRun:null,workPriority:null,__doWork:null,__activeJobs:null,__activeThreads:null,__idleThreads:null,__jobQueue:null,cancel:function(a){if(Ab.__current!=tb.__mainThread)throw J.thrown("Call cancel() only from the main thread.");F.current.onUpdate.remove(q(this,this.__update));for(var b=this.__activeJobs;0<b.__jobs.length;){b.__index++;b.__index>=b.__jobs.length&&(b.__index=0);var c=b.__jobs[b.__index];if(1==this.__mode){var d=this.__activeThreads.h[c.id];this.__idleThreads.length<
this.minThreads?(d.sendMessage({event:"CANCEL"}),this.__idleThreads.push(d)):d.sendMessage({event:"EXIT"})}null!=a&&(0==c.duration&&(c.duration=(new Date).getTime()/1E3-c.startTime),this.__activeJob.value=c,this.onError.dispatch(a),this.__activeJob.value=null)}b=this.__activeJobs;b.__jobs.length=0;null!=b.pool&&0!=b.__addingWorkPriority&&Ab.__current==tb.__mainThread&&(tb.__totalWorkPriority-=b.pool.workPriority,b.__addingWorkPriority=!1);for(;this.__idleThreads.length>this.minThreads;)this.__idleThreads.pop().sendMessage({event:"EXIT"});
if(null!=a)for(b=this.__jobQueue;0<b.__jobs.length;)b.__index++,b.__index>=b.__jobs.length&&(b.__index=0),c=b.__jobs[b.__index],this.__activeJob.value=c,this.onError.dispatch(a);b=this.__jobQueue;b.__jobs.length=0;null!=b.pool&&0!=b.__addingWorkPriority&&Ab.__current==tb.__mainThread&&(tb.__totalWorkPriority-=b.pool.workPriority,b.__addingWorkPriority=!1);this.__jobComplete.value=!1;this.__activeJob.value=null},cancelJob:function(a){var b=this.__activeThreads.h[a];null!=b&&(b.sendMessage({event:"CANCEL"}),
this.__activeThreads.remove(a),this.__idleThreads.push(b));return this.__activeJobs.remove(this.__activeJobs.get(a))?!0:this.__jobQueue.remove(this.__jobQueue.get(a))},queue:function(a,b){return this.run(a,b)},run:function(a,b){if(Ab.__current!=tb.__mainThread)throw J.thrown("Call run() only from the main thread.");if(null==a){if(null==this.__doWork)throw J.thrown("run() requires doWork argument.");a=this.__doWork}null==b&&(b={});a=new nj(a,b);b=this.__jobQueue;b.__jobs.push(a);null!=b.pool&&1!=b.__addingWorkPriority&&
Ab.__current==tb.__mainThread&&(tb.__totalWorkPriority+=b.pool.workPriority,b.__addingWorkPriority=!0);F.current.onUpdate.has(q(this,this.__update))||F.current.onUpdate.add(q(this,this.__update));return a.id},__update:function(a){if(Ab.__current==tb.__mainThread){for(;0<this.__jobQueue.__jobs.length&&this.__activeJobs.__jobs.length<this.maxThreads;){var b=this.__jobQueue,c=b.__jobs.pop();a=0<b.__jobs.length;null!=b.pool&&b.__addingWorkPriority!=a&&Ab.__current==tb.__mainThread&&(tb.__totalWorkPriority=
a?tb.__totalWorkPriority+b.pool.workPriority:tb.__totalWorkPriority-b.pool.workPriority,b.__addingWorkPriority=a);a=c;a.startTime=(new Date).getTime()/1E3;b=this.__activeJobs;b.__jobs.push(a);null!=b.pool&&1!=b.__addingWorkPriority&&Ab.__current==tb.__mainThread&&(tb.__totalWorkPriority+=b.pool.workPriority,b.__addingWorkPriority=!0);1==this.__mode&&(jn.makePortable(a.doWork),b=0==this.__idleThreads.length?this.createThread({func:tb.__executeThread,classPath:"lime.system.ThreadPool",functionName:"__executeThread"}):
this.__idleThreads.pop(),this.__activeThreads.h[a.id]=b,b.sendMessage({event:"WORK",job:a}))}if(0==this.__mode&&0<this.__activeJobs.__jobs.length){b=this.__activeJobs;b.__index++;b.__index>=b.__jobs.length&&(b.__index=0);this.__activeJob.value=b.__jobs[b.__index];b=this.__activeJob.value.state;this.__jobComplete.value=!1;this.workIterations.value=0;c=this.workPriority*tb.workLoad/(tb.__totalWorkPriority*F.current.__window.__backend.getFrameRate());var d=(new Date).getTime()/1E3;a=0;try{do this.workIterations.value+=
1,jn.toFunction(this.__activeJob.value.doWork)(b,this),a=(new Date).getTime()/1E3-d;while(!this.__jobComplete.value&&a<c)}catch(f){b=J.caught(f),this.sendError(b)}this.__activeJob.value.duration+=a;this.__activeJob.value=null}for(;;){b=this.__jobOutput.pop();if(null==b)break;null!=b.jobID?(a=this.__activeJobs.get(b.jobID),this.__activeJob.value=a):this.__activeJob.value=b.job;if(null!=this.__activeJob.value&&null!=this.__activeJobs.get(this.__activeJob.value.id)){1==this.__mode&&(a=(new Date).getTime()/
1E3,this.__activeJob.value.duration=a-this.__activeJob.value.startTime);switch(b.event){case "COMPLETE":case "ERROR":"COMPLETE"==b.event?this.onComplete.dispatch(b.message):this.onError.dispatch(b.message);this.__activeJobs.remove(this.__activeJob.value);1==this.__mode&&(b=this.__activeThreads.h[this.__activeJob.value.id],this.__activeThreads.remove(this.__activeJob.value.id),this.__activeJobs.__jobs.length+this.__idleThreads.length>this.maxThreads||0==this.__jobQueue.__jobs.length&&this.__activeJobs.__jobs.length+
this.__idleThreads.length>this.minThreads?b.sendMessage({event:"EXIT"}):this.__idleThreads.push(b));break;case "PROGRESS":this.onProgress.dispatch(b.message);break;case "WORK":this.onRun.dispatch(b.message)}this.__activeJob.value=null}}0==this.__activeJobs.__jobs.length&&0==this.__jobQueue.__jobs.length&&F.current.onUpdate.remove(q(this,this.__update))}},createThread:function(a){return Xg.prototype.createThread.call(this,a)},get_activeJobs:function(){return this.__activeJobs.__jobs.length},get_idleThreads:function(){return this.__idleThreads.length},
get_currentThreads:function(){return this.__activeJobs.__jobs.length+this.__idleThreads.length},get_doWork:function(){return this},set_workPriority:function(a){0==this.__mode&&0<this.__activeJobs.__jobs.length&&(tb.__totalWorkPriority+=a-this.workPriority);return this.workPriority=a},__class__:tb,__properties__:x(Xg.prototype.__properties__,{get_doWork:"get_doWork",set_workPriority:"set_workPriority",get_idleThreads:"get_idleThreads",get_activeJobs:"get_activeJobs",get_currentThreads:"get_currentThreads"})});
var ll=function(a){this.__jobs=[];this.__index=0;this.pool=a;this.__addingWorkPriority=!1};h["lime.system.JobList"]=ll;ll.__name__="lime.system.JobList";ll.prototype={__addingWorkPriority:null,__index:null,__jobs:null,pool:null,clear:function(){this.__jobs.length=0;null!=this.pool&&0!=this.__addingWorkPriority&&Ab.__current==tb.__mainThread&&(tb.__totalWorkPriority-=this.pool.workPriority,this.__addingWorkPriority=!1)},exists:function(a){return null!=this.get(a.id)},hasNext:function(){return 0<this.__jobs.length},
next:function(){this.__index++;this.__index>=this.__jobs.length&&(this.__index=0);return this.__jobs[this.__index]},pop:function(){var a=this.__jobs.pop(),b=0<this.__jobs.length;null!=this.pool&&this.__addingWorkPriority!=b&&Ab.__current==tb.__mainThread&&(tb.__totalWorkPriority=b?tb.__totalWorkPriority+this.pool.workPriority:tb.__totalWorkPriority-this.pool.workPriority,this.__addingWorkPriority=b);return a},remove:function(a){if(y.remove(this.__jobs,a))return a=0<this.__jobs.length,null!=this.pool&&
this.__addingWorkPriority!=a&&Ab.__current==tb.__mainThread&&(tb.__totalWorkPriority=a?tb.__totalWorkPriority+this.pool.workPriority:tb.__totalWorkPriority-this.pool.workPriority,this.__addingWorkPriority=a),!0;y.remove(this.__jobs,this.get(a.id))?(a=0<this.__jobs.length,null!=this.pool&&this.__addingWorkPriority!=a&&Ab.__current==tb.__mainThread&&(tb.__totalWorkPriority=a?tb.__totalWorkPriority+this.pool.workPriority:tb.__totalWorkPriority-this.pool.workPriority,this.__addingWorkPriority=a),a=!0):
a=!1;return a?!0:!1},removeByID:function(a){return y.remove(this.__jobs,this.get(a))?(a=0<this.__jobs.length,null!=this.pool&&this.__addingWorkPriority!=a&&Ab.__current==tb.__mainThread&&(tb.__totalWorkPriority=a?tb.__totalWorkPriority+this.pool.workPriority:tb.__totalWorkPriority-this.pool.workPriority,this.__addingWorkPriority=a),!0):!1},get:function(a){for(var b=0,c=this.__jobs;b<c.length;){var d=c[b];++b;if(d.id==a)return d}return null},push:function(a){this.__jobs.push(a);null!=this.pool&&1!=
this.__addingWorkPriority&&Ab.__current==tb.__mainThread&&(tb.__totalWorkPriority+=this.pool.workPriority,this.__addingWorkPriority=!0)},set___addingWorkPriority:function(a){return null!=this.pool&&this.__addingWorkPriority!=a&&Ab.__current==tb.__mainThread?(tb.__totalWorkPriority=a?tb.__totalWorkPriority+this.pool.workPriority:tb.__totalWorkPriority-this.pool.workPriority,this.__addingWorkPriority=a):this.__addingWorkPriority},get_length:function(){return this.__jobs.length},__class__:ll,__properties__:{get_length:"get_length",
set___addingWorkPriority:"set___addingWorkPriority"}};var nj=function(a,b){this.duration=this.startTime=0;this.id=nj.nextID++;this.doWork=a;this.state=b};h["lime.system.JobData"]=nj;nj.__name__="lime.system.JobData";nj.prototype={id:null,doWork:null,state:null,duration:null,startTime:null,__class__:nj};var Yo=function(){};h["lime.system.JSAsync"]=Yo;Yo.__name__="lime.system.JSAsync";var mj=function(){};h["lime.system.Tls"]=mj;mj.__name__="lime.system.Tls";mj.prototype={value:null,__class__:mj};var po=
function(){};h["lime.text.GlyphMetrics"]=po;po.__name__="lime.text.GlyphMetrics";po.prototype={advance:null,height:null,horizontalBearing:null,verticalBearing:null,__class__:po};var Lo=function(){};h["lime.text.harfbuzz.HB"]=Lo;Lo.__name__="lime.text.harfbuzz.HB";Lo.shape=function(a,b,c){};var hp={__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"},_new:function(){return null},add:function(a,b,c){},
addCodepoints:function(a,b,c,d,f){},addUTF8:function(a,b,c,d){},addUTF16:function(a,b,c,d,f){},addUTF32:function(a,b,c,d,f){},clearContents:function(a){},getGlyphInfo:function(a){return null},getGlyphPositions:function(a){return null},guessSegmentProperties:function(a){},normalizeGlyphs:function(a){},preallocate:function(a,b){return!1},reset:function(a){},reverse:function(a){},reverseClusters:function(a){},get_allocationSuccessful:function(a){return!1},get_clusterLevel:function(a){return 0},set_clusterLevel:function(a,
b){return b},get_contentType:function(a){return 0},set_contentType:function(a,b){return b},get_direction:function(a){return 0},set_direction:function(a,b){return b},get_empty:function(){return null},get_flags:function(a){return 0},set_flags:function(a,b){return b},get_language:function(a){return null},set_language:function(a,b){return b},get_length:function(a){return 0},set_length:function(a,b){return b},get_replacementCodepoint:function(a){return 0},set_replacementCodepoint:function(a,b){return b},
get_script:function(a){return 0},set_script:function(a,b){return b},get_segmentProperties:function(a){return null},set_segmentProperties:function(a,b){return b}},qo=function(){};h["lime.text.harfbuzz.HBFeature"]=qo;qo.__name__="lime.text.harfbuzz.HBFeature";qo.prototype={__class__:qo};var ro=function(){};h["lime.text.harfbuzz.HBGlyphInfo"]=ro;ro.__name__="lime.text.harfbuzz.HBGlyphInfo";ro.prototype={codepoint:null,mask:null,cluster:null,__class__:ro};var so=function(){};h["lime.text.harfbuzz.HBGlyphPosition"]=
so;so.__name__="lime.text.harfbuzz.HBGlyphPosition";so.prototype={xAdvance:null,xOffset:null,yAdvance:null,yOffset:null,__class__:so};var Zo={_new:function(a){return null},toString:function(a){return null},fromString:function(a){return Zo._new(a)}},to=function(){};h["lime.text.harfbuzz.HBSegmentProperties"]=to;to.__name__="lime.text.harfbuzz.HBSegmentProperties";to.prototype={__class__:to};var $c=function(a){this.onDisconnect=new Zc;this.onButtonUp=new fl;this.onButtonDown=new fl;this.onAxisMove=
new tn;this.id=a;this.connected=!0};h["lime.ui.Gamepad"]=$c;$c.__name__="lime.ui.Gamepad";$c.addMappings=function(a){};$c.__connect=function(a){if(!$c.devices.h.hasOwnProperty(a)){var b=new $c(a);$c.devices.h[a]=b;$c.onConnect.dispatch(b)}};$c.__disconnect=function(a){var b=$c.devices.h[a];null!=b&&(b.connected=!1);$c.devices.remove(a);null!=b&&b.onDisconnect.dispatch()};$c.prototype={connected:null,id:null,onAxisMove:null,onButtonDown:null,onButtonUp:null,onDisconnect:null,get_guid:function(){return Fc.__getDeviceData()[this.id].id},
get_name:function(){return Fc.__getDeviceData()[this.id].id},__class__:$c,__properties__:{get_name:"get_name",get_guid:"get_guid"}};var Fc=function(a){this.onHatMove=new qn;this.onDisconnect=new Zc;this.onButtonUp=new dh;this.onButtonDown=new dh;this.onAxisMove=new pn;this.id=a;this.connected=!0};h["lime.ui.Joystick"]=Fc;Fc.__name__="lime.ui.Joystick";Fc.__connect=function(a){if(!Fc.devices.h.hasOwnProperty(a)){var b=new Fc(a);Fc.devices.h[a]=b;Fc.onConnect.dispatch(b)}};Fc.__disconnect=function(a){var b=
Fc.devices.h[a];null!=b&&(b.connected=!1);Fc.devices.remove(a);null!=b&&b.onDisconnect.dispatch()};Fc.__getDeviceData=function(){var a=null;try{a=navigator.getGamepads?navigator.getGamepads():navigator.webkitGetGamepads?navigator.webkitGetGamepads():null}catch(b){db.lastError=b}return a};Fc.prototype={connected:null,id:null,onAxisMove:null,onButtonDown:null,onButtonUp:null,onDisconnect:null,onHatMove:null,get_guid:function(){return Fc.__getDeviceData()[this.id].id},get_name:function(){return Fc.__getDeviceData()[this.id].id},
get_numAxes:function(){return Fc.__getDeviceData()[this.id].axes.length},get_numButtons:function(){return Fc.__getDeviceData()[this.id].buttons.length},get_numHats:function(){return 0},__class__:Fc,__properties__:{get_numHats:"get_numHats",get_numButtons:"get_numButtons",get_numAxes:"get_numAxes",get_name:"get_name",get_guid:"get_guid"}};var Ra={__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"},get_altKey:function(a){return 0>=(a&256)?0<(a&512):!0},set_altKey:function(a,b){return b},get_capsLock:function(a){return 0>=(a&8192)?0<(a&8192):!0},set_capsLock:function(a,b){return b},get_ctrlKey:function(a){return 0>=(a&64)?0<(a&128):!0},set_ctrlKey:function(a,b){return b},get_metaKey:function(a){return 0>=(a&1024)?0<(a&2048):!0},set_metaKey:function(a,
b){return b},get_numLock:function(a){return 0>=(a&4096)?0<(a&4096):!0},set_numLock:function(a,b){return b},get_shiftKey:function(a){return 0>=(a&1)?0<(a&2):!0},set_shiftKey:function(a,b){return b}},dc=G["lime.ui.MouseCursor"]={__ename__:"lime.ui.MouseCursor",__constructs__:null,ARROW:{_hx_name:"ARROW",_hx_index:0,__enum__:"lime.ui.MouseCursor",toString:t},CROSSHAIR:{_hx_name:"CROSSHAIR",_hx_index:1,__enum__:"lime.ui.MouseCursor",toString:t},DEFAULT:{_hx_name:"DEFAULT",_hx_index:2,__enum__:"lime.ui.MouseCursor",
toString:t},MOVE:{_hx_name:"MOVE",_hx_index:3,__enum__:"lime.ui.MouseCursor",toString:t},POINTER:{_hx_name:"POINTER",_hx_index:4,__enum__:"lime.ui.MouseCursor",toString:t},RESIZE_NESW:{_hx_name:"RESIZE_NESW",_hx_index:5,__enum__:"lime.ui.MouseCursor",toString:t},RESIZE_NS:{_hx_name:"RESIZE_NS",_hx_index:6,__enum__:"lime.ui.MouseCursor",toString:t},RESIZE_NWSE:{_hx_name:"RESIZE_NWSE",_hx_index:7,__enum__:"lime.ui.MouseCursor",toString:t},RESIZE_WE:{_hx_name:"RESIZE_WE",_hx_index:8,__enum__:"lime.ui.MouseCursor",
toString:t},TEXT:{_hx_name:"TEXT",_hx_index:9,__enum__:"lime.ui.MouseCursor",toString:t},WAIT:{_hx_name:"WAIT",_hx_index:10,__enum__:"lime.ui.MouseCursor",toString:t},WAIT_ARROW:{_hx_name:"WAIT_ARROW",_hx_index:11,__enum__:"lime.ui.MouseCursor",toString:t},CUSTOM:{_hx_name:"CUSTOM",_hx_index:12,__enum__:"lime.ui.MouseCursor",toString:t}};dc.__constructs__=[dc.ARROW,dc.CROSSHAIR,dc.DEFAULT,dc.MOVE,dc.POINTER,dc.RESIZE_NESW,dc.RESIZE_NS,dc.RESIZE_NWSE,dc.RESIZE_WE,dc.TEXT,dc.WAIT,dc.WAIT_ARROW,dc.CUSTOM];
var Wg=G["lime.ui.MouseWheelMode"]={__ename__:"lime.ui.MouseWheelMode",__constructs__:null,PIXELS:{_hx_name:"PIXELS",_hx_index:0,__enum__:"lime.ui.MouseWheelMode",toString:t},LINES:{_hx_name:"LINES",_hx_index:1,__enum__:"lime.ui.MouseWheelMode",toString:t},PAGES:{_hx_name:"PAGES",_hx_index:2,__enum__:"lime.ui.MouseWheelMode",toString:t},UNKNOWN:{_hx_name:"UNKNOWN",_hx_index:3,__enum__:"lime.ui.MouseWheelMode",toString:t}};Wg.__constructs__=[Wg.PIXELS,Wg.LINES,Wg.PAGES,Wg.UNKNOWN];var Nc=function(a,
b,c,d,f,g,k){this.x=a;this.y=b;this.id=c;this.dx=d;this.dy=f;this.pressure=g;this.device=k};h["lime.ui.Touch"]=Nc;Nc.__name__="lime.ui.Touch";Nc.prototype={device:null,dx:null,dy:null,id:null,pressure:null,x:null,y:null,__class__:Nc};var eh=function(a,b){this.__maxWidth=this.__maxHeight=2147483647;this.clickCount=this.__minWidth=this.__minHeight=0;this.onTextInput=new dl;this.onTextEdit=new rn;this.onShow=new Zc;this.onRestore=new Zc;this.onResize=new cl;this.onRenderContextRestored=new el;this.onRenderContextLost=
new Zc;this.onRender=new el;this.onMove=new lj;this.onMouseWheel=new on;this.onMouseUp=new mn;this.onMouseMoveRelative=new lj;this.onMouseMove=new lj;this.onMouseDown=new nn;this.onMinimize=new Zc;this.onMaximize=new Zc;this.onLeave=new Zc;this.onKeyUp=new gl;this.onKeyDown=new gl;this.onHide=new Zc;this.onFullscreen=new Zc;this.onFocusOut=new Zc;this.onFocusIn=new Zc;this.onExpose=new Zc;this.onEnter=new Zc;this.onDropFile=new dl;this.onDeactivate=new Zc;this.onClose=new Zc;this.onActivate=new Zc;
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=Object.prototype.hasOwnProperty.call(this.__attributes,"title")?this.__attributes.title:"";this.id=-1;this.__backend=new Ja(this)};h["lime.ui.Window"]=eh;eh.__name__="lime.ui.Window";eh.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,onHide: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,onShow:null,onTextEdit:null,onTextInput:null,
parameters:null,scale:null,stage:null,clickCount:null,__attributes:null,__backend:null,__borderless:null,__fullscreen:null,__height:null,__hidden:null,__maximized:null,__minimized:null,__resizable:null,__scale:null,__title:null,__visible:null,__width:null,__x:null,__y:null,__minWidth:null,__minHeight:null,__maxWidth:null,__maxHeight: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){a<this.__minWidth?a=this.__minWidth:a>this.__maxWidth&&(a=this.__maxWidth);b<this.__minHeight?b=this.__minHeight:b>this.__maxHeight&&(b=this.__maxHeight);this.__backend.resize(a,b);this.__width=a;this.__height=b},setMinSize:function(a,b){this.__backend.setMinSize(a,b);this.__minWidth=a;this.__minHeight=b;(this.__width<this.__minWidth||this.__height<this.__minHeight)&&this.resize(this.__width,
this.__height)},setMaxSize:function(a,b){this.__backend.setMaxSize(a,b);this.__maxWidth=a;this.__maxHeight=b;(this.__width>this.__maxWidth||this.__height>this.__maxHeight)&&this.resize(this.__width,this.__height)},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_maxHeight:function(){return this.__maxHeight},set_maxHeight:function(a){this.setMaxSize(this.__maxWidth,a);return this.__maxHeight},get_maximized:function(){return this.__maximized},set_maximized:function(a){this.__minimized=!1;return this.__maximized=this.__backend.setMaximized(a)},get_maxWidth:function(){return this.__maxWidth},
set_maxWidth:function(a){this.setMinSize(a,this.__maxHeight);return this.__maxWidth},get_minHeight:function(){return this.__minHeight},set_minHeight:function(a){this.setMinSize(this.__minWidth,a);return this.__minHeight},get_minimized:function(){return this.__minimized},set_minimized:function(a){this.__maximized=!1;return this.__minimized=this.__backend.setMinimized(a)},get_minWidth:function(){return this.__minWidth},set_minWidth:function(a){this.setMinSize(a,this.__minHeight);return this.__minWidth},
get_mouseLock:function(){return this.__backend.getMouseLock()},set_mouseLock:function(a){this.__backend.setMouseLock(a);return a},get_opacity:function(){return this.__backend.getOpacity()},set_opacity:function(a){this.__backend.setOpacity(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)},setTextInputRect:function(a){return this.__backend.setTextInputRect(a)},get_title:function(){return this.__title},set_title:function(a){return this.__title=this.__backend.setTitle(a)},get_visible:function(){return this.__visible},set_visible:function(a){return this.__visible=this.__backend.setVisible(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__:eh,__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_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_opacity:"set_opacity",get_opacity:"get_opacity",set_mouseLock:"set_mouseLock",get_mouseLock:"get_mouseLock",set_minWidth:"set_minWidth",get_minWidth:"get_minWidth",set_minimized:"set_minimized",get_minimized:"get_minimized",set_minHeight:"set_minHeight",get_minHeight:"get_minHeight",set_maxWidth:"set_maxWidth",get_maxWidth:"get_maxWidth",set_maximized:"set_maximized",get_maximized:"get_maximized",set_maxHeight:"set_maxHeight",get_maxHeight:"get_maxHeight",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"}};var $o=G["lime.utils.TAError"]={__ename__:"lime.utils.TAError",__constructs__:null,RangeError:{_hx_name:"RangeError",_hx_index:0,
__enum__:"lime.utils.TAError",toString:t}};$o.__constructs__=[$o.RangeError];var nf=function(){this.data=new Ba;this.paths=[]};h["lime.utils.AssetBundle"]=nf;nf.__name__="lime.utils.AssetBundle";nf.fromBytes=function(a){a=new og(a);return nf.__extractBundle(a)};nf.fromFile=function(a){return null};nf.loadFromBytes=function(a){return ob.withValue(nf.fromBytes(a))};nf.loadFromFile=function(a){return Jd.loadFromFile(a).then(nf.loadFromBytes)};nf.__extractBundle=function(a){var b=jj.readZip(a);a=new nf;
for(b=b.h;null!=b;){var c=b.item;b=b.next;if(c.compressed){var d=a.data,f=c.fileName,g=Jd.decompress(c.data,Yf.DEFLATE);d.h[f]=g}else a.data.h[c.fileName]=c.data;a.paths.push(c.fileName)}return a};nf.prototype={data:null,paths:null,__class__:nf};var Dn=function(){this.enabled=!0;this.audio=new Ba;this.font=new Ba;this.image=new Ba;this.version=454111};h["lime.utils.AssetCache"]=Dn;Dn.__name__="lime.utils.AssetCache";Dn.prototype={audio:null,enabled:null,image:null,font:null,version:null,exists:function(a,
b){return("IMAGE"==b||null==b)&&Object.prototype.hasOwnProperty.call(this.image.h,a)||("FONT"==b||null==b)&&Object.prototype.hasOwnProperty.call(this.font.h,a)||("SOUND"==b||"MUSIC"==b||null==b)&&Object.prototype.hasOwnProperty.call(this.audio.h,a)?!0:!1},set:function(a,b,c){switch(b){case "FONT":this.font.h[a]=c;break;case "IMAGE":if(!(c instanceof Eb))throw J.thrown("Cannot cache non-Image asset: "+M.string(c)+" as Image");this.image.h[a]=c;break;case "MUSIC":case "SOUND":if(!(c instanceof zc))throw J.thrown("Cannot cache non-AudioBuffer asset: "+
M.string(c)+" as AudioBuffer");this.audio.h[a]=c;break;default:throw J.thrown(b+" assets are not cachable");}},clear:function(a){if(null==a)this.audio=new Ba,this.font=new Ba,this.image=new Ba;else{var b=this.audio.h;b=Object.keys(b);for(var c=b.length,d=0;d<c;){var f=b[d++];if(O.startsWith(f,a)){var g=this.audio;Object.prototype.hasOwnProperty.call(g.h,f)&&delete g.h[f]}}b=this.font.h;b=Object.keys(b);c=b.length;for(d=0;d<c;)f=b[d++],O.startsWith(f,a)&&(g=this.font,Object.prototype.hasOwnProperty.call(g.h,
f)&&delete g.h[f]);b=this.image.h;b=Object.keys(b);c=b.length;for(d=0;d<c;)f=b[d++],O.startsWith(f,a)&&(g=this.image,Object.prototype.hasOwnProperty.call(g.h,f)&&delete g.h[f])}},__class__:Dn};var Yb=function(){this.types=new Ba;this.sizes=new Ba;this.preload=new Ba;this.paths=new Ba;this.pathGroups=new Ba;this.classTypes=new Ba;this.cachedText=new Ba;this.cachedImages=new Ba;this.cachedFonts=new Ba;this.cachedBytes=new Ba;this.cachedAudioBuffers=new Ba;this.onChange=new Zc;this.bytesTotal=this.bytesLoaded=
0};h["lime.utils.AssetLibrary"]=Yb;Yb.__name__="lime.utils.AssetLibrary";Yb.fromBytes=function(a,b){return Yb.fromManifest(Gc.fromBytes(a,b))};Yb.fromFile=function(a,b){return Yb.fromManifest(Gc.fromFile(a,b))};Yb.fromBundle=function(a){if(Object.prototype.hasOwnProperty.call(a.data.h,"library.json")){var b=Gc.fromBytes(a.data.h["library.json"]);if(null!=b){if(null==b.libraryType)var c=new Yb;else if(c=h[b.libraryType],null!=c)c=w.createInstance(c,b.libraryArgs);else return Pa.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 c=new Yb,c.__fromBundle(a),c;return null};Yb.fromManifest=function(a){if(null==a)return null;if(null==a.libraryType)var b=new Yb;else if(b=h[a.libraryType],null!=b)b=w.createInstance(b,a.libraryArgs);else return Pa.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};Yb.loadFromBytes=function(a,b){return Gc.loadFromBytes(a,b).then(function(a){return Yb.loadFromManifest(a)})};Yb.loadFromFile=function(a,b){return Gc.loadFromFile(a,b).then(function(a){return Yb.loadFromManifest(a)})};Yb.loadFromManifest=function(a){a=Yb.fromManifest(a);return null!=a?a.load():ob.withError("Could not load asset manifest")};Yb.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?na.__cast(b,String):null;a=this.types.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 J.thrown("Not sure how to get template: "+a);case "TEXT":return this.getText(a);default:throw J.thrown("Unknown asset type: "+b);}},getAudioBuffer:function(a){return Object.prototype.hasOwnProperty.call(this.cachedAudioBuffers.h,a)?this.cachedAudioBuffers.h[a]:Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?zc.fromBytes(na.__cast(w.createInstance(this.classTypes.h[a],[]),bb)):
zc.fromFile(this.getPath(a))},getBytes:function(a){if(Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a))return this.cachedBytes.h[a];if(Object.prototype.hasOwnProperty.call(this.cachedText.h,a)){var b=Jd.ofString(this.cachedText.h[a]);return this.cachedBytes.h[a]=b}return Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?na.__cast(w.createInstance(this.classTypes.h[a],[]),bb):Jd.fromFile(this.getPath(a))},getFont:function(a){return Object.prototype.hasOwnProperty.call(this.cachedFonts.h,
a)?this.cachedFonts.h[a]:Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?na.__cast(w.createInstance(this.classTypes.h[a],[]),eb):eb.fromFile(this.getPath(a))},getImage:function(a){return Object.prototype.hasOwnProperty.call(this.cachedImages.h,a)?this.cachedImages.h[a]:Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?na.__cast(w.createInstance(this.classTypes.h[a],[]),Eb):Eb.fromFile(this.getPath(a))},getPath:function(a){return Object.prototype.hasOwnProperty.call(this.paths.h,
a)?this.paths.h[a]:Object.prototype.hasOwnProperty.call(this.pathGroups.h,a)?this.pathGroups.h[a][0]:null},getText:function(a){if(Object.prototype.hasOwnProperty.call(this.cachedText.h,a))return this.cachedText.h[a];a=this.getBytes(a);return null==a?null:a.getString(0,a.length)},isLocal:function(a,b){if(Object.prototype.hasOwnProperty.call(this.classTypes.h,a))return!0;b=na.__cast(b,String);if(null==b)return Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a)||Object.prototype.hasOwnProperty.call(this.cachedText.h,
a)||Object.prototype.hasOwnProperty.call(this.cachedImages.h,a)||Object.prototype.hasOwnProperty.call(this.cachedAudioBuffers.h,a)?!0:Object.prototype.hasOwnProperty.call(this.cachedFonts.h,a);switch(b){case "FONT":return Object.prototype.hasOwnProperty.call(this.cachedFonts.h,a);case "IMAGE":return Object.prototype.hasOwnProperty.call(this.cachedImages.h,a);case "MUSIC":case "SOUND":return Object.prototype.hasOwnProperty.call(this.cachedAudioBuffers.h,a);default:return Object.prototype.hasOwnProperty.call(this.cachedBytes.h,
a)?!0:Object.prototype.hasOwnProperty.call(this.cachedText.h,a)}},list:function(a){for(var b=null!=a?na.__cast(a,String):null,c=[],d=Object.keys(this.types.h),f=d.length,g=0;g<f;){var k=d[g++];(null==b||this.exists(k,a))&&c.push(k)}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 J.thrown("Not sure how to load template: "+
a);case "TEXT":return this.loadText(a);default:throw J.thrown("Unknown asset type: "+b);}},load:function(){if(this.loaded)return ob.withValue(this);if(null==this.promise){this.promise=new od;this.bytesLoadedCache=new Ba;this.assetsLoaded=0;this.assetsTotal=1;for(var a=Object.keys(this.preload.h),b=a.length,c=0;c<b;){var d=a[c++];if(this.preload.h[d]){Pa.verbose("Preloading asset: "+d+" ["+this.types.h[d]+"]",{fileName:"lime/utils/AssetLibrary.hx",lineNumber:408,className:"lime.utils.AssetLibrary",
methodName:"load"});var f=this.types.h[d];if(null!=f)switch(f){case "BINARY":this.assetsTotal++;f=this.loadBytes(d);f.onProgress(function(a,b){return function(c,d){b[0].load_onProgress(a[0],c,d)}}([d],[this]));f.onError(function(a,b){return function(c){b[0].load_onError(a[0],c)}}([d],[this]));f.onComplete(function(a,b){return function(c){b[0].loadBytes_onComplete(a[0],c)}}([d],[this]));break;case "FONT":this.assetsTotal++;f=this.loadFont(d);f.onProgress(function(a,b){return function(c,d){b[0].load_onProgress(a[0],
c,d)}}([d],[this]));f.onError(function(a,b){return function(c){b[0].load_onError(a[0],c)}}([d],[this]));f.onComplete(function(a,b){return function(c){b[0].loadFont_onComplete(a[0],c)}}([d],[this]));break;case "IMAGE":this.assetsTotal++;f=this.loadImage(d);f.onProgress(function(a,b){return function(c,d){b[0].load_onProgress(a[0],c,d)}}([d],[this]));f.onError(function(a,b){return function(c){b[0].load_onError(a[0],c)}}([d],[this]));f.onComplete(function(a,b){return function(c){b[0].loadImage_onComplete(a[0],
c)}}([d],[this]));break;case "MUSIC":case "SOUND":this.assetsTotal++;f=this.loadAudioBuffer(d);f.onProgress(function(a,b){return function(c,d){b[0].load_onProgress(a[0],c,d)}}([d],[this]));f.onError(function(a,b){return function(c){b[0].loadAudioBuffer_onError(a[0],c)}}([d],[this]));f.onComplete(function(a,b){return function(c){b[0].loadAudioBuffer_onComplete(a[0],c)}}([d],[this]));break;case "TEXT":this.assetsTotal++,f=this.loadText(d),f.onProgress(function(a,b){return function(c,d){b[0].load_onProgress(a[0],
c,d)}}([d],[this])),f.onError(function(a,b){return function(c){b[0].load_onError(a[0],c)}}([d],[this])),f.onComplete(function(a,b){return function(c){b[0].loadText_onComplete(a[0],c)}}([d],[this]))}}}this.__assetLoaded(null)}return this.promise.future},loadAudioBuffer:function(a){return Object.prototype.hasOwnProperty.call(this.cachedAudioBuffers.h,a)?ob.withValue(this.cachedAudioBuffers.h[a]):Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?ob.withValue(zc.fromBytes(na.__cast(w.createInstance(this.classTypes.h[a],
[]),bb))):Object.prototype.hasOwnProperty.call(this.pathGroups.h,a)?zc.loadFromFiles(this.pathGroups.h[a]):zc.loadFromFile(this.paths.h[a])},loadBytes:function(a){return Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a)?ob.withValue(this.cachedBytes.h[a]):Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?ob.withValue(w.createInstance(this.classTypes.h[a],[])):Jd.loadFromFile(this.getPath(a))},loadFont:function(a){return Object.prototype.hasOwnProperty.call(this.cachedFonts.h,a)?ob.withValue(this.cachedFonts.h[a]):
Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?(a=w.createInstance(this.classTypes.h[a],[]),a.__loadFromName(a.name)):eb.loadFromName(this.getPath(a))},loadImage:function(a){var b=this;return Object.prototype.hasOwnProperty.call(this.cachedImages.h,a)?ob.withValue(this.cachedImages.h[a]):Object.prototype.hasOwnProperty.call(this.classTypes.h,a)?ob.withValue(w.createInstance(this.classTypes.h[a],[])):Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a)?Eb.loadFromBytes(this.cachedBytes.h[a]).then(function(c){var d=
b.cachedBytes;Object.prototype.hasOwnProperty.call(d.h,a)&&delete d.h[a];b.cachedImages.h[a]=c;return ob.withValue(c)}):Eb.loadFromFile(this.getPath(a))},loadText:function(a){if(Object.prototype.hasOwnProperty.call(this.cachedText.h,a))return ob.withValue(this.cachedText.h[a]);if(Object.prototype.hasOwnProperty.call(this.cachedBytes.h,a)||Object.prototype.hasOwnProperty.call(this.classTypes.h,a)){var b=this.getBytes(a);if(null==b)return ob.withValue(null);b=b.getString(0,b.length);this.cachedText.h[a]=
b;return ob.withValue(b)}return(new ni).load(this.getPath(a))},unload:function(){this.cachedBytes.h=Object.create(null);this.cachedFonts.h=Object.create(null);this.cachedImages.h=Object.create(null);this.cachedAudioBuffers.h=Object.create(null);this.cachedText.h=Object.create(null)},__assetLoaded:function(a){this.assetsLoaded++;null!=a&&Pa.verbose("Loaded asset: "+a+" ["+this.types.h[a]+"] ("+(this.assetsLoaded-1)+"/"+(this.assetsTotal-1)+")",{fileName:"lime/utils/AssetLibrary.hx",lineNumber:637,
className:"lime.utils.AssetLibrary",methodName:"__assetLoaded"});if(null!=a){var b=Object.prototype.hasOwnProperty.call(this.sizes.h,a)?this.sizes.h[a]:0;if(Object.prototype.hasOwnProperty.call(this.bytesLoadedCache.h,a)){var c=this.bytesLoadedCache.h[a];c<b&&(this.bytesLoaded+=b-c)}else this.bytesLoaded+=b;this.bytesLoadedCache.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 ra.__cacheBreak(a)},__fromBundle:function(a,b){if(null!=b){var c=0;for(b=b.assets;c<b.length;){var d=b[c];++c;var f=Object.prototype.hasOwnProperty.call(d,"id")?d.id:d.path;var g=a.data.h[d.path];if(Object.prototype.hasOwnProperty.call(d,"type")){var k=d.type;"TEXT"==k?this.cachedText.h[f]=null!=g?M.string(g):null:this.cachedBytes.h[f]=g;this.types.h[f]=d.type}else this.cachedBytes.h[f]=g,this.types.h[f]="BINARY"}}else for(c=0,b=a.paths;c<b.length;)f=b[c],++c,this.cachedBytes.h[f]=
a.data.h[f],this.types.h[f]="BINARY"},__fromManifest:function(a){var b=2<=a.version,c=a.rootPath;null==c&&(c="");""!=c&&(c+="/");for(var d=0,f=a.assets;d<f.length;){var g=f[d];++d;var k=b&&Object.prototype.hasOwnProperty.call(g,"size")?g.size:100;var l=Object.prototype.hasOwnProperty.call(g,"id")?g.id:g.path;if(Object.prototype.hasOwnProperty.call(g,"path")){var m=this.paths;var z=this.__cacheBreak(this.__resolvePath(c+M.string(la.field(g,"path"))));m.h[l]=z}if(Object.prototype.hasOwnProperty.call(g,
"pathGroup")){m=la.field(g,"pathGroup");z=0;for(var r=m.length;z<r;){var p=z++;m[p]=this.__cacheBreak(this.__resolvePath(c+m[p]))}this.pathGroups.h[l]=m}this.sizes.h[l]=k;this.types.h[l]=g.type;Object.prototype.hasOwnProperty.call(g,"preload")&&(this.preload.h[l]=la.field(g,"preload"));Object.prototype.hasOwnProperty.call(g,"className")&&(k=la.field(g,"className"),k=h[k],this.classTypes.h[l]=k)}d=this.bytesTotal=0;for(f=a.assets;d<f.length;)g=f[d],++d,l=Object.prototype.hasOwnProperty.call(g,"id")?
g.id:g.path,Object.prototype.hasOwnProperty.call(this.preload.h,l)&&this.preload.h[l]&&Object.prototype.hasOwnProperty.call(this.sizes.h,l)&&(this.bytesTotal+=this.sizes.h[l])},__resolvePath:function(a){a=O.replace(a,"\\","/");var b=a.indexOf(":");O.startsWith(a,"http")&&0<b?(b+=3,a=y.substr(a,0,b)+O.replace(y.substr(a,b,null),"//","/")):a=O.replace(a,"//","/");if(-1<a.indexOf("./")){a=a.split("/");b=[];for(var c=0,d=a.length;c<d;){var f=c++;".."==a[f]?0==f||".."==b[f-1]?b.push(".."):b.pop():"."==
a[f]?0==f&&b.push("."):b.push(a[f])}a=b.join("/")}return a},loadAudioBuffer_onComplete:function(a,b){this.cachedAudioBuffers.h[a]=b;if(Object.prototype.hasOwnProperty.call(this.pathGroups.h,a))for(var c=this.pathGroups.h[a],d=Object.keys(this.pathGroups.h),f=d.length,g=0;g<f;){var k=d[g++];if(k!=a)for(var l=0;l<c.length;){var m=c[l];++l;if(-1<this.pathGroups.h[k].indexOf(m)){this.cachedAudioBuffers.h[k]=b;break}}}this.__assetLoaded(a)},loadAudioBuffer_onError:function(a,b){null!=b&&""!=b?Pa.warn('Could not load "'+
a+'": '+M.string(b),{fileName:"lime/utils/AssetLibrary.hx",lineNumber:883,className:"lime.utils.AssetLibrary",methodName:"loadAudioBuffer_onError"}):Pa.warn('Could not load "'+a+'"',{fileName:"lime/utils/AssetLibrary.hx",lineNumber:887,className:"lime.utils.AssetLibrary",methodName:"loadAudioBuffer_onError"});this.loadAudioBuffer_onComplete(a,new zc)},loadBytes_onComplete:function(a,b){this.cachedBytes.h[a]=b;this.__assetLoaded(a)},loadFont_onComplete:function(a,b){this.cachedFonts.h[a]=b;this.__assetLoaded(a)},
loadImage_onComplete:function(a,b){this.cachedImages.h[a]=b;this.__assetLoaded(a)},loadText_onComplete:function(a,b){this.cachedText.h[a]=b;this.__assetLoaded(a)},load_onError:function(a,b){null!=b&&""!=b?this.promise.error('Error loading asset "'+a+'": '+M.string(b)):this.promise.error('Error loading asset "'+a+'"')},load_onProgress:function(a,b,c){if(0<b){var d=this.sizes.h[a];0<c?(b/=c,1<b&&(b=1),b=Math.floor(b*d)):b>d&&(b=d);Object.prototype.hasOwnProperty.call(this.bytesLoadedCache.h,a)?(d=this.bytesLoadedCache.h[a],
b!=d&&(this.bytesLoaded+=b-d)):this.bytesLoaded+=b;this.bytesLoadedCache.h[a]=b;this.promise.progress(this.bytesLoaded,this.bytesTotal)}},__class__:Yb};var Gc=function(){this.assets=[];this.libraryArgs=[];this.version=2};h["lime.utils.AssetManifest"]=Gc;Gc.__name__="lime.utils.AssetManifest";Gc.fromBytes=function(a,b){return null!=a?Gc.parse(a.getString(0,a.length),b):null};Gc.fromFile=function(a,b){a=Gc.__resolvePath(a);b=Gc.__resolveRootPath(b,a);return null==a?null:Gc.fromBytes(Jd.fromFile(a),
b)};Gc.loadFromBytes=function(a,b){return ob.withValue(Gc.fromBytes(a,b))};Gc.loadFromFile=function(a,b){a=Gc.__resolvePath(a);b=Gc.__resolveRootPath(b,a);return null==a?null:Jd.loadFromFile(a).then(function(a){return ob.withValue(Gc.fromBytes(a,b))})};Gc.parse=function(a,b){if(null==a||""==a)return null;a=JSON.parse(a);var c=new Gc;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=Pd.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};Gc.__resolvePath=function(a){if(null==a)return null;var b=a.indexOf("?");var c=-1<b?y.substr(a,0,b):a;for(c=O.replace(c,"\\","/");O.endsWith(c,
"/");)c=y.substr(c,0,c.length-1);return O.endsWith(c,".bundle")?-1<b?c+"/library.json"+y.substr(a,b,null):c+"/library.json":a};Gc.__resolveRootPath=function(a,b){if(null!=a)return a;a=b.indexOf("?");a=-1<a?y.substr(b,0,a):b;for(a=O.replace(a,"\\","/");O.endsWith(a,"/");){if("/"==a)return a;a=y.substr(a,0,a.length-1)}return O.endsWith(a,".bundle")?a:Vg.directory(a)};Gc.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=Qd.run(this.assets);a.rootPath=this.rootPath;return JSON.stringify(a)},__class__:Gc};var ra=function(){};h["lime.utils.Assets"]=ra;ra.__name__="lime.utils.Assets";ra.exists=function(a,b){null==b&&(b="BINARY");var c=a.indexOf(":"),d=a.substring(0,c);a=a.substring(c+1);d=ra.getLibrary(d);return null!=d?d.exists(a,b):!1};ra.getAsset=function(a,b,c){if(c&&ra.cache.enabled)switch(b){case "FONT":var d=ra.cache.font.h[a];
if(null!=d)return d;break;case "IMAGE":d=ra.cache.image.h[a];if(ra.isValidImage(d))return d;break;case "MUSIC":case "SOUND":d=ra.cache.audio.h[a];if(ra.isValidAudio(d))return d;break;case "TEMPLATE":throw J.thrown("Not sure how to get template: "+a);case "BINARY":case "TEXT":c=!1;break;default:return null}var f=a.indexOf(":");d=a.substring(0,f);f=a.substring(f+1);var g=ra.getLibrary(d);if(null!=g)if(g.exists(f,b)){if(g.isLocal(f,b))return d=g.getAsset(f,b),c&&ra.cache.enabled&&ra.cache.set(a,b,d),
d;Pa.error(b+' asset "'+a+'" exists, but only asynchronously',{fileName:"lime/utils/Assets.hx",lineNumber:133,className:"lime.utils.Assets",methodName:"getAsset"})}else Pa.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 Pa.error(ra.__libraryNotFound(d),{fileName:"lime/utils/Assets.hx",lineNumber:143,className:"lime.utils.Assets",methodName:"getAsset"});return null};ra.getAudioBuffer=function(a,
b){null==b&&(b=!0);return ra.getAsset(a,"SOUND",b)};ra.getBytes=function(a){return ra.getAsset(a,"BINARY",!1)};ra.getFont=function(a,b){null==b&&(b=!0);return ra.getAsset(a,"FONT",b)};ra.getImage=function(a,b){null==b&&(b=!0);return ra.getAsset(a,"IMAGE",b)};ra.getLibrary=function(a){if(null==a||""==a)a="default";return ra.libraries.h[a]};ra.getPath=function(a){var b=a.indexOf(":"),c=a.substring(0,b);b=a.substring(b+1);var d=ra.getLibrary(c);if(null!=d){if(d.exists(b,null))return d.getPath(b);Pa.error('There is no asset with an ID of "'+
a+'"',{fileName:"lime/utils/Assets.hx",lineNumber:224,className:"lime.utils.Assets",methodName:"getPath"})}else Pa.error(ra.__libraryNotFound(c),{fileName:"lime/utils/Assets.hx",lineNumber:229,className:"lime.utils.Assets",methodName:"getPath"});return null};ra.getText=function(a){return ra.getAsset(a,"TEXT",!1)};ra.hasLibrary=function(a){if(null==a||""==a)a="default";return Object.prototype.hasOwnProperty.call(ra.libraries.h,a)};ra.isLocal=function(a,b,c){null==c&&(c=!0);if(c&&ra.cache.enabled&&
ra.cache.exists(a,b))return!0;var d=a.indexOf(":");c=a.substring(0,d);a=a.substring(d+1);c=ra.getLibrary(c);return null!=c?c.isLocal(a,b):!1};ra.isValidAudio=function(a){return null!=a};ra.isValidImage=function(a){return null!=a?null!=a.buffer:!1};ra.list=function(a){for(var b=[],c=ra.libraries.h,d=Object.keys(c),f=d.length,g=0;g<f;){var k=c[d[g++]].list(a);null!=k&&(b=b.concat(k))}return b};ra.loadAsset=function(a,b,c){if(c&&ra.cache.enabled)switch(b){case "FONT":var d=ra.cache.font.h[a];if(null!=
d)return ob.withValue(d);break;case "IMAGE":d=ra.cache.image.h[a];if(ra.isValidImage(d))return ob.withValue(d);break;case "MUSIC":case "SOUND":d=ra.cache.audio.h[a];if(ra.isValidAudio(d))return ob.withValue(d);break;case "TEMPLATE":throw J.thrown("Not sure how to get template: "+a);case "BINARY":case "TEXT":c=!1;break;default:return null}var f=a.indexOf(":");d=a.substring(0,f);f=a.substring(f+1);var g=ra.getLibrary(d);if(null!=g){if(g.exists(f,b)){d=g.loadAsset(f,b);if(c&&ra.cache.enabled)d.onComplete(function(c){ra.cache.set(a,
b,c)});return d}return ob.withError("There is no "+b+' asset with an ID of "'+a+'"')}return ob.withError(ra.__libraryNotFound(d))};ra.loadAudioBuffer=function(a,b){null==b&&(b=!0);return ra.loadAsset(a,"SOUND",b)};ra.loadBytes=function(a){return ra.loadAsset(a,"BINARY",!1)};ra.loadFont=function(a,b){null==b&&(b=!0);return ra.loadAsset(a,"FONT",b)};ra.loadImage=function(a,b){null==b&&(b=!0);return ra.loadAsset(a,"IMAGE",b)};ra.loadLibrary=function(a){var b=new od,c=ra.getLibrary(a);if(null!=c)return c.load();
c=a;var d=null;if(Object.prototype.hasOwnProperty.call(ra.bundlePaths.h,a))nf.loadFromFile(ra.bundlePaths.h[a]).onComplete(function(c){null==c?b.error('Cannot load bundle for library "'+a+'"'):(c=Yb.fromBundle(c),null==c?b.error('Cannot open library "'+a+'"'):(ra.libraries.h[a]=c,c.onChange.add((n=ra.onChange,q(n,n.dispatch))),b.completeWith(c.load())))}).onError(function(c){b.error('There is no asset library with an ID of "'+a+'"')});else Object.prototype.hasOwnProperty.call(ra.libraryPaths.h,a)?
(c=ra.libraryPaths.h[a],d=Vg.directory(c)):(O.endsWith(c,".bundle")?(d=c,c+="/library.json"):d=Vg.directory(c),c=ra.__cacheBreak(c)),Gc.loadFromFile(c,d).onComplete(function(c){null==c?b.error('Cannot parse asset manifest for library "'+a+'"'):(c=Yb.fromManifest(c),null==c?b.error('Cannot open library "'+a+'"'):(ra.libraries.h[a]=c,c.onChange.add((n=ra.onChange,q(n,n.dispatch))),b.completeWith(c.load())))}).onError(function(c){b.error('There is no asset library with an ID of "'+a+'"')});return b.future};
ra.loadText=function(a){return ra.loadAsset(a,"TEXT",!1)};ra.registerLibrary=function(a,b){if(null==a||""==a)a="default";if(Object.prototype.hasOwnProperty.call(ra.libraries.h,a)){if(ra.libraries.h[a]==b)return;ra.unloadLibrary(a)}null!=b&&b.onChange.add(ra.library_onChange);ra.libraries.h[a]=b};ra.unloadLibrary=function(a){ra.removeLibrary(a,!0)};ra.removeLibrary=function(a,b){null==b&&(b=!0);if(null==a||""==a)a="default";var c=ra.libraries.h[a];null!=c&&(ra.cache.clear(a+":"),c.onChange.remove(ra.library_onChange),
b&&c.unload());b=ra.libraries;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]};ra.__cacheBreak=function(a){0<ra.cache.version&&(a=-1<a.indexOf("?")?a+("&"+ra.cache.version):a+("?"+ra.cache.version));return a};ra.__libraryNotFound=function(a){if(null==a||""==a)a="default";return null==F.current||null==F.current.__preloader||F.current.__preloader.complete?'There is no asset library named "'+a+'"':'There is no asset library named "'+a+'", or it is not yet preloaded'};ra.library_onChange=function(){ra.cache.clear();
ra.onChange.dispatch()};var uo=function(a){var b=a.indexOf(":");this.libraryName=a.substring(0,b);this.symbolName=a.substring(b+1);this.library=ra.getLibrary(this.libraryName)};h["lime.utils._Assets.LibrarySymbol"]=uo;uo.__name__="lime.utils._Assets.LibrarySymbol";uo.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__:uo};var ip={_new:function(a,b){null==
b&&(b=0);return new of(a,b)},set:function(a,b,c,d,f){null!=d&&(b=bb.ofData(d));null!=b||null==c?(a.bytes=b,a.offset=null!=f?f:0):(a.bytes=bb.ofData(c.buffer),a.offset=null!=f?c.byteOffset+f:c.byteOffset)},__arrayGet:function(a,b){return null!=a.bytes?a.bytes.b[b+a.offset]:0},__arraySet:function(a,b,c){null==a.bytes&&(a.bytes.b[b+a.offset]=c&255);return c},fromArrayBufferView:function(a){return null==a?null:new of(bb.ofData(a.buffer),a.byteOffset)},fromArrayBuffer:function(a){return null==a?null:new of(bb.ofData(a),
0)},fromBytes:function(a){return new of(a,0)},fromBytesData:function(a){return null==a?new of(null,0):new of(bb.ofData(a),0)},fromFile:function(a){return new of(Jd.fromFile(a),0)},fromLimeBytes:function(a){return new of(a,0)},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},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},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},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},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},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},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},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},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}},of=function(a,b){this.bytes=a;this.offset=b};h["lime.utils.BytePointerData"]=of;of.__name__="lime.utils.BytePointerData";of.prototype={bytes:null,offset:null,__class__:of};var Jd={_new:function(a,b){return new bb(b)},alloc:function(a){return new bb(new ArrayBuffer(a))},compress:function(a,b){switch(b._hx_index){case 0:return Yk.compress(a);case 1:return Zk.compress(a);case 2:return al.compress(a);
case 3:return bl.compress(a)}},decompress:function(a,b){switch(b._hx_index){case 0:return Yk.decompress(a);case 1:return Zk.decompress(a);case 2:return al.decompress(a);case 3:return bl.decompress(a)}},fastGet:function(a,b){return a.bytes[b]},fromBytes:function(a){return null==a?null:Jd._new(a.length,a.b.bufferValue)},fromFile:function(a){return null},loadFromBytes:function(a){return ob.withValue(Jd.fromBytes(a))},loadFromFile:function(a){return(new jl).load(a)},ofData:function(a){a=bb.ofData(a);
return Jd._new(a.length,a.b.bufferValue)},ofString:function(a){a=bb.ofString(a);return Jd._new(a.length,a.b.bufferValue)}},Yf=G["lime.utils.CompressionAlgorithm"]={__ename__:"lime.utils.CompressionAlgorithm",__constructs__:null,DEFLATE:{_hx_name:"DEFLATE",_hx_index:0,__enum__:"lime.utils.CompressionAlgorithm",toString:t},GZIP:{_hx_name:"GZIP",_hx_index:1,__enum__:"lime.utils.CompressionAlgorithm",toString:t},LZMA:{_hx_name:"LZMA",_hx_index:2,__enum__:"lime.utils.CompressionAlgorithm",toString:t},
ZLIB:{_hx_name:"ZLIB",_hx_index:3,__enum__:"lime.utils.CompressionAlgorithm",toString:t}};Yf.__constructs__=[Yf.DEFLATE,Yf.GZIP,Yf.LZMA,Yf.ZLIB];var Be={_new:function(a){return a},fromFloat:function(a){return a},fromBytesPointer:function(a){return Be.fromFloat(0)},fromArrayBufferView:function(a){return Be.fromFloat(0)},fromArrayBuffer:function(a){return Be.fromFloat(0)},fromBytes:function(a){return Be.fromFloat(0)},fromBytesData:function(a){return Be.fromFloat(0)},fromLimeBytes:function(a){return Be.fromBytes(a)},
fromCFFIPointer:function(a){return Be.fromFloat(0)},fromFile:function(a){return Be.fromFloat(0)},__withOffset:function(a,b){return Be.fromFloat(0)},equals:function(a,b){return a==b},equalsPointer:function(a,b){return a==b},greaterThan:function(a,b){return a>b},greaterThanPointer:function(a,b){return hd.get(a)>hd.get(b)},greaterThanOrEqual:function(a,b){return a>=b},greaterThanOrEqualPointer:function(a,b){return hd.get(a)>=hd.get(b)},lessThan:function(a,b){return a<b},lessThanPointer:function(a,b){return hd.get(a)<
hd.get(b)},lessThanOrEqual:function(a,b){return a<=b},lessThanOrEqualPointer:function(a,b){return hd.get(a)<=hd.get(b)},notEquals:function(a,b){return a!=b},notEqualsPointer:function(a,b){return a!=b},plus:function(a,b){return Be.__withOffset(a,b)},plusPointer:function(a,b){return Be.__withOffset(a,b|0)},minus:function(a,b){return Be.__withOffset(a,-b)},minusPointer:function(a,b){return Be.__withOffset(a,-(b|0))}},qg={toArrayBufferView:function(a){return a},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)},toBytes:function(a){return new bb(new Uint8Array(a.buffer))},toString:function(a){return null!=a?"Float32Array [byteLength:"+a.byteLength+", length:"+a.length+"]":null}},Pa=function(){};h["lime.utils.Log"]=Pa;Pa.__name__="lime.utils.Log";Pa.level=null;Pa.debug=function(a,b){4<=Pa.level&&console.debug("["+b.className+"] "+M.string(a))};Pa.error=function(a,b){if(1<=Pa.level){a=
"["+b.className+"] ERROR: "+M.string(a);if(Pa.throwErrors)throw J.thrown(a);console.error(a)}};Pa.info=function(a,b){3<=Pa.level&&console.info("["+b.className+"] "+M.string(a))};Pa.print=function(a){console.log(a)};Pa.println=function(a){console.log(a)};Pa.verbose=function(a,b){5<=Pa.level&&(a="["+b.className+"] "+M.string(a),console.log(a))};Pa.warn=function(a,b){2<=Pa.level&&console.warn("["+b.className+"] WARNING: "+M.string(a))};var bm=function(){this.bytesTotalCache=new Ba;this.bytesLoadedCache2=
new Ba;this.bytesLoadedCache=new Ga;this.onProgress=new cl;this.onComplete=new Zc;this.bytesTotal=this.bytesLoaded=0;this.libraries=[];this.libraryNames=[];this.onProgress.add(q(this,this.update))};h["lime.utils.Preloader"]=bm;bm.__name__="lime.utils.Preloader";bm.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,Pa.verbose("Preloading asset library",{fileName:"lime/utils/Preloader.hx",lineNumber:134,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|0)-a.bytesLoadedCache.h[b[0].__id__]);
a.loadedAssetLibrary()}}(d)).onError(function(){return function(a){Pa.error(a,{fileName:"lime/utils/Preloader.hx",lineNumber:170,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?Pa.verbose("Loaded asset library: "+
a+" ["+b+"/"+c+"]",{fileName:"lime/utils/Preloader.hx",lineNumber:197,className:"lime.utils.Preloader",methodName:"loadedAssetLibrary"}):Pa.verbose("Loaded asset library ["+b+"/"+c+"]",{fileName:"lime/utils/Preloader.hx",lineNumber:201,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;Pa.verbose("Preloading asset library: "+d[0],{fileName:"lime/utils/Preloader.hx",lineNumber:239,className:"lime.utils.Preloader",methodName:"updateProgress"});ra.loadLibrary(d[0]).onProgress(function(b){return function(c,d){0<d&&(Object.prototype.hasOwnProperty.call(a.bytesTotalCache.h,
b[0])||(a.bytesTotalCache.h[b[0]]=d,a.bytesTotal+=d-200),c>d&&(c=d),Object.prototype.hasOwnProperty.call(a.bytesLoadedCache2.h,b[0])?a.bytesLoaded+=c-a.bytesLoadedCache2.h[b[0]]:a.bytesLoaded+=c,a.bytesLoadedCache2.h[b[0]]=c,a.simulateProgress||a.onProgress.dispatch(a.bytesLoaded,a.bytesTotal))}}(d)).onComplete(function(b){return function(c){c=200;Object.prototype.hasOwnProperty.call(a.bytesTotalCache.h,b[0])&&(c=a.bytesTotalCache.h[b[0]]);Object.prototype.hasOwnProperty.call(a.bytesLoadedCache2.h,
b[0])?a.bytesLoaded+=c-a.bytesLoadedCache2.h[b[0]]:a.bytesLoaded+=c;a.loadedAssetLibrary(b[0])}}(d)).onError(function(){return function(a){Pa.error(a,{fileName:"lime/utils/Preloader.hx",lineNumber:293,className:"lime.utils.Preloader",methodName:"updateProgress"})}}())}}this.simulateProgress||this.loadedLibraries!=this.libraries.length+this.libraryNames.length||(this.preloadComplete||(this.preloadComplete=!0,Pa.verbose("Preload complete",{fileName:"lime/utils/Preloader.hx",lineNumber:306,className:"lime.utils.Preloader",
methodName:"updateProgress"})),this.start())},__class__:bm};var ap={exists:function(a,b){return a.exists(b)},get:function(a,b){return a.get(b)},keyValueIterator:function(a){return a.keyValueIterator()},remove:function(a,b){return a.remove(b)},set:function(a,b,c){a.set(b,c);return c},iterator:function(a){return a.keys()},each:function(a){return a.iterator()},toStringMap:function(a,b){return new Ba},toIntMap:function(a,b){return new hc},toFloatMap:function(a,b){return new oi},toEnumValueMapMap:function(a,
b){return new ng},toObjectMap:function(a,b){return new Ga},toUtilsObjectMap:function(a,b){return new pi},toClassMap:function(a,b){return new qi},fromStringMap:function(a){return a},fromIntMap:function(a){return a},fromFloatMap:function(a){return a},fromObjectMap:function(a){return a},fromUtilsObjectMap:function(a){return a},fromClassMap:function(a){return a}},ha=function(){};h["openfl.Lib"]=ha;ha.__name__="openfl.Lib";ha.__properties__={get_current:"get_current",get_application:"get_application"};
ha.as=function(a,b){return na.__instanceof(a,b)?a:null};ha.attach=function(a){return new Of};ha.clearInterval=function(a){ha.__timers.h.hasOwnProperty(a)&&(ha.__timers.h[a].stop(),ha.__timers.remove(a))};ha.clearTimeout=function(a){ha.__timers.h.hasOwnProperty(a)&&(ha.__timers.h[a].stop(),ha.__timers.remove(a))};ha.getDefinitionByName=function(a){if(null==a)return null;a=O.replace(a,"::",".");return h[a]};ha.getQualifiedClassName=function(a){if(null==a)return null;var b=na.__instanceof(a,$e)?a:na.getClass(a);
return null==b?"boolean"==typeof a||a==Po?"Bool":"number"==typeof a&&(a|0)===a||a==pm?"Int":"number"==typeof a||a==Qo?"Float":null:b.__name__};ha.getQualifiedSuperclassName=function(a){if(null==a)return null;a=na.__instanceof(a,$e)?a:na.getClass(a);if(null==a)return null;a=a.__super__;return null==a?null:a.__name__};ha.getTimer=function(){return Fa.getTimer()};ha.describeType=function(a){ha.notImplemented({fileName:"openfl/Lib.hx",lineNumber:272,className:"openfl.Lib",methodName:"describeType"});
return null};ha.getURL=function(a,b){ha.navigateToURL(a,b)};ha.navigateToURL=function(a,b){null==b&&(b="_blank");var c=a.url;if(w.typeof(a.data)==Tc.TObject){for(var d="",f=la.fields(a.data),g=0;g<f.length;){var k=f[g];++g;0<d.length&&(d+="&");var l=encodeURIComponent(k)+"=";k=M.string(la.field(a.data,k));d+=l+encodeURIComponent(k)}c=-1<c.indexOf("?")?c+("&"+d):c+("?"+d)}Fa.openURL(c,b)};ha.encodeURIComponent=function(a){return encodeURIComponent(a)};ha.decodeURIComponent=function(a){return decodeURIComponent(a.split("+").join(" "))};
ha.notImplemented=function(a){var b=a.className+"."+a.methodName;Object.prototype.hasOwnProperty.call(ha.__sentWarnings.h,b)||(ha.__sentWarnings.h[b]=!0,Pa.warn(a.methodName+" is not implemented",a))};ha.preventDefaultTouchMove=function(){window.document.addEventListener("touchmove",function(a){a.preventDefault()},!1)};ha.sendToURL=function(a){(new oj).load(a)};ha.setInterval=function(a,b,c){var d=++ha.__lastTimerID;b=new Sc(b);ha.__timers.h[d]=b;b.run=function(){if(null!=ha.get_current()&&null!=
ha.get_current().stage&&ha.get_current().stage.__uncaughtErrorEvents.__enabled)try{a.apply(a,null==c?[]:c)}catch(g){db.lastError=g;var b=J.caught(g).unwrap();ha.get_current().stage.__handleError(b)}else a.apply(a,null==c?[]:c)};return d};ha.setTimeout=function(a,b,c){var d=++ha.__lastTimerID,f=ha.__timers;b=Sc.delay(function(){ha.__timers.remove(d);if(null!=ha.get_current()&&null!=ha.get_current().stage&&ha.get_current().stage.__uncaughtErrorEvents.__enabled)try{a.apply(a,null==c?[]:c)}catch(k){db.lastError=
k;var b=J.caught(k).unwrap();ha.get_current().stage.__handleError(b)}else a.apply(a,null==c?[]:c)},b);f.h[d]=b;return d};ha.trace=function(a){gg.trace(a,{fileName:"openfl/Lib.hx",lineNumber:672,className:"openfl.Lib",methodName:"trace"})};ha.isXMLName=function(a){return null!=a&&(new E("^[a-zA-Z_]","")).match(a)&&!(new E("^[xX][mM][lL]","")).match(a)&&(new E("^[a-zA-Z0-9_\\-\\.]+$","")).match(a)?!0:!1};ha.getClassByAlias=function(a){if(!Object.prototype.hasOwnProperty.call(ha.__registeredClassAliases.h,
a))throw new sc("Class "+a+" could not be found.");return ha.__registeredClassAliases.h[a]};ha.registerClassAlias=function(a,b){if(null==b)throw new eg("Parameter classObject must be non-null");if(null==a)throw new eg("Parameter aliasName must be non-null");ha.__registeredClassAliases.h[a]=b;ha.__registeredClasses.set(b,a)};ha.get_application=function(){return Bc.application};ha.get_current=function(){null==Bc.current&&(Bc.current=new Of);return Bc.current};var vg=function(){};h["openfl._Vector.IVector"]=
vg;vg.__name__="openfl._Vector.IVector";vg.__isInterface__=!0;vg.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,__tempIndex:null,__class__:vg,__properties__:{set_length:"set_length",get_length:"get_length"}};var Ve=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"]=Ve;Ve.__name__="openfl._Vector.BoolVector";Ve.__interfaces__=[vg];Ve.prototype={fixed:null,__array:null,__tempIndex:null,concat:function(a){return null==a?new Ve(0,!1,this.__array.slice()):0<a.__array.length?new Ve(0,!1,this.__array.concat(a.__array)):new Ve(0,!1,this.__array.slice())},copy:function(){return new Ve(0,this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],
d=0,f=this.__array;d<f.length;){var g=f[d];++d;a(g)&&c.push(g)}return new Ve(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 new Ld(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 Ve(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new Ve(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__:Ve,__properties__:{set_length:"set_length",get_length:"get_length"}};var Xe=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 f=c.length;d<f;){var g=d++;this.__array[g]=c[g]}}}else null==c&&(c=[]),this.__array=c;0<a&&this.set_length(a);this.fixed=b};h["openfl._Vector.FloatVector"]=
Xe;Xe.__name__="openfl._Vector.FloatVector";Xe.__interfaces__=[vg];Xe.prototype={fixed:null,__array:null,__tempIndex:null,concat:function(a){return null==a?new Xe(0,!1,this.__array.slice()):0<a.__array.length?new Xe(0,!1,this.__array.concat(a.__array)):new Xe(0,!1,this.__array.slice())},copy:function(){return new Xe(0,this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],d=0,f=this.__array;d<f.length;){var g=f[d];++d;a(g)&&c.push(g)}return new Xe(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 new Ld(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 Xe(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},
splice:function(a,b){return new Xe(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__:Xe,__properties__:{set_length:"set_length",get_length:"get_length"}};var Ye=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"]=Ye;Ye.__name__="openfl._Vector.FunctionVector";Ye.__interfaces__=[vg];Ye.prototype={fixed:null,__array:null,__tempIndex:null,concat:function(a){return null==a?new Ye(0,!1,this.__array.slice()):0<a.__array.length?new Ye(0,!1,this.__array.concat(a.__array)):new Ye(0,
!1,this.__array.slice())},copy:function(){return new Ye(0,this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],d=0,f=this.__array;d<f.length;){var g=f[d];++d;a(g)&&c.push(g)}return new Ye(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(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 new Ld(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 Ye(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new Ye(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__:Ye,__properties__:{set_length:"set_length",get_length:"get_length"}};var We=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"]=
We;We.__name__="openfl._Vector.IntVector";We.__interfaces__=[vg];We.prototype={fixed:null,__array:null,__tempIndex:null,concat:function(a){return null==a?new We(0,!1,this.__array.slice()):0<a.__array.length?new We(0,!1,this.__array.concat(a.__array)):new We(0,!1,this.__array.slice())},copy:function(){return new We(0,this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],d=0,f=this.__array;d<f.length;){var g=f[d];++d;a(g)&&c.push(g)}return new We(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 new Ld(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 We(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},
splice:function(a,b){return new We(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__:We,
__properties__:{set_length:"set_length",get_length:"get_length"}};var Ee=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 f=c.length;d<f;){var g=d++;this.__array[g]=c[g]}}}else null==c&&(c=[]),this.__array=c;0<a&&this.set_length(a);this.fixed=b};h["openfl._Vector.ObjectVector"]=Ee;Ee.__name__="openfl._Vector.ObjectVector";Ee.__interfaces__=[vg];Ee.prototype={fixed:null,__array:null,__tempIndex:null,concat:function(a){return null==a?new Ee(0,
!1,this.__array.slice()):0<a.__array.length?new Ee(0,!1,this.__array.concat(a.__array)):new Ee(0,!1,this.__array.slice())},copy:function(){return new Ee(0,this.fixed,this.__array.slice())},filter:function(a){for(var b=this.fixed,c=[],d=0,f=this.__array;d<f.length;){var g=f[d];++d;a(g)&&c.push(g)}return new Ee(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 new Ld(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 Ee(0,!1,this.__array.slice(a,b))},sort:function(a){this.__array.sort(a)},splice:function(a,b){return new Ee(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__:Ee,__properties__:{set_length:"set_length",get_length:"get_length"}};var Hi=function(){F.call(this);null==Bc.application&&(Bc.application=this);
null==Bc.current&&(Bc.current=new Of);Bc.current.__loaderInfo=Mf.create(null);Bc.current.__loaderInfo.content=Bc.current};h["openfl.display.Application"]=Hi;Hi.__name__="openfl.display.Application";Hi.__super__=F;Hi.prototype=x(F.prototype,{createWindow:function(a){var b=new pj(this,a);this.__windows.push(b);this.__windowByID.h[b.id]=b;var c=this;b.onClose.add(function(){c.__onWindowClose(b)},!1,-1E4);null==this.__window&&(this.__window=b,b.onActivate.add(q(this,this.onWindowActivate)),b.onRenderContextLost.add(q(this,
this.onRenderContextLost)),b.onRenderContextRestored.add(q(this,this.onRenderContextRestored)),b.onDeactivate.add(q(this,this.onWindowDeactivate)),b.onDropFile.add(q(this,this.onWindowDropFile)),b.onEnter.add(q(this,this.onWindowEnter)),b.onExpose.add(q(this,this.onWindowExpose)),b.onFocusIn.add(q(this,this.onWindowFocusIn)),b.onFocusOut.add(q(this,this.onWindowFocusOut)),b.onFullscreen.add(q(this,this.onWindowFullscreen)),b.onKeyDown.add(q(this,this.onKeyDown)),b.onKeyUp.add(q(this,this.onKeyUp)),
b.onLeave.add(q(this,this.onWindowLeave)),b.onMinimize.add(q(this,this.onWindowMinimize)),b.onMouseDown.add(q(this,this.onMouseDown)),b.onMouseMove.add(q(this,this.onMouseMove)),b.onMouseMoveRelative.add(q(this,this.onMouseMoveRelative)),b.onMouseUp.add(q(this,this.onMouseUp)),b.onMouseWheel.add(q(this,this.onMouseWheel)),b.onMove.add(q(this,this.onWindowMove)),b.onRender.add(q(this,this.render)),b.onResize.add(q(this,this.onWindowResize)),b.onRestore.add(q(this,this.onWindowRestore)),b.onTextEdit.add(q(this,
this.onTextEdit)),b.onTextInput.add(q(this,this.onTextInput)),this.onWindowCreate());this.onCreateWindow.dispatch(b);return b},exec:function(){return F.prototype.exec.call(this)},__checkForAllWindowsClosed:function(){0<this.__windows.length||F.prototype.__checkForAllWindowsClosed.call(this)},__onModuleExit:function(a){this.onExit.canceled||(Bc.application==this&&(Bc.application=null),F.prototype.__onModuleExit.call(this,a))},__class__:Hi});var dd=function(a,b,c){null==c&&(c=!1);da.call(this);this.__drawableType=
2;this.__bitmapData=a;this.pixelSnapping=b;this.smoothing=c;null==b&&(this.pixelSnapping=1)};h["openfl.display.Bitmap"]=dd;dd.__name__="openfl.display.Bitmap";dd.__super__=da;dd.prototype=x(da.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){var c=ea.__pool.get();null!=this.__bitmapData?c.setTo(0,0,this.__bitmapData.width,this.__bitmapData.height):c.setTo(0,0,0,0);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);ea.__pool.release(c)},__hitTest:function(a,b,c,d,f,g){if(!g.get_visible()||this.__isMask||null==this.__bitmapData||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b))return!1;this.__getRenderTransform();var k=this.__renderTransform,l=k.a*k.d-k.b*k.c;c=0==l?-k.tx:1/l*(k.c*(k.ty-b)+k.d*(a-k.tx));k=this.__renderTransform;
l=k.a*k.d-k.b*k.c;a=0==l?-k.ty:1/l*(k.a*(b-k.ty)+k.b*(k.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||f||d.push(g);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,f=0==d?-c.tx:1/d*(c.c*(c.ty-b)+c.d*(a-c.tx));c=this.__renderTransform;d=c.a*c.d-c.b*c.c;a=0==d?-c.ty:1/d*(c.a*(b-c.ty)+
c.b*(c.tx-a));return 0<f&&0<a&&f<=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},set_height:function(a){null!=this.__bitmapData?this.set_scaleY(a/this.__bitmapData.height):this.set_scaleY(0);return a},set_width:function(a){null!=this.__bitmapData?this.set_scaleX(a/
this.__bitmapData.width):this.set_scaleX(0);return a},__class__:dd,__properties__:x(da.prototype.__properties__,{set_bitmapData:"set_bitmapData",get_bitmapData:"get_bitmapData"})});var he=function(){Da.call(this);this.__allowSmoothing=!0;this.__pixelRatio=1;this.__tempColorTransform=new Ub;this.__worldAlpha=1};h["openfl.display.DisplayObjectRenderer"]=he;he.__name__="openfl.display.DisplayObjectRenderer";he.__super__=Da;he.prototype=x(Da.prototype,{__allowSmoothing:null,__blendMode:null,__cleared:null,
__context:null,__overrideBlendMode:null,__pixelRatio:null,__roundPixels:null,__stage:null,__tempColorTransform:null,__transparent:null,__type:null,__worldAlpha:null,__worldColorTransform:null,__worldTransform:null,__clear:function(){},__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},__popMask:function(){},
__popMaskObject:function(a,b){},__popMaskRect:function(){},__pushMask:function(a){},__pushMaskObject:function(a,b){},__pushMaskRect:function(a,b){},__render:function(a){},__renderEvent:function(a){if(null!=a.__customRenderEvent&&a.__renderable){a.__customRenderEvent.allowSmoothing=this.__allowSmoothing;a.__customRenderEvent.objectMatrix.copyFrom(a.__renderTransform);a.__customRenderEvent.objectColorTransform.__copyFrom(a.__worldColorTransform);a.__customRenderEvent.renderer=this;switch(this.__type){case "cairo":a.__customRenderEvent.type=
"renderCairo";break;case "canvas":a.__customRenderEvent.type="renderCanvas";break;case "dom":a.__customRenderEvent.type=null!=a.stage&&a.__worldVisible?"renderDOM":"clearDOM";break;case "opengl":this.__cleared||this.__clear();this.setShader(a.__worldShader);this.__context3D.__flushGL();a.__customRenderEvent.type="renderOpenGL";break;default:return}this.__setBlendMode(a.__worldBlendMode);this.__pushMaskObject(a);a.dispatchEvent(a.__customRenderEvent);this.__popMaskObject(a);"opengl"==this.__type&&
this.setViewport()}},__resize:function(a,b){},__setBlendMode:function(a){},__shouldCacheHardware:function(a,b){if(null==a)return null;switch(a.__drawableType){case 4:case 5:if(1==b)return!0;b=this.__shouldCacheHardware_DisplayObject(a,b);if(1==b)return!0;if(null!=a.__children){var c=0;for(a=a.__children;c<a.length;){var d=a[c];++c;b=this.__shouldCacheHardware_DisplayObject(d,b);if(1==b)return!0}}return b;case 7:return 1==b?!0:!1;case 9:return!0;default:return this.__shouldCacheHardware_DisplayObject(a,
b)}},__shouldCacheHardware_DisplayObject:function(a,b){return 1==b||null!=a.__filters?!0:0==b||null!=a.__graphics&&!vc.isCompatible(a.__graphics)?!1:null},__updateCacheBitmap:function(a,b){if(null==a)return!1;switch(a.__drawableType){case 2:var c=a;if(null==c.__bitmapData||null==c.__filters&&"opengl"==this.__type&&null==c.__cacheBitmap)return!1;b=null!=c.__bitmapData.image&&c.__bitmapData.image.version!=c.__imageVersion;break;case 7:var d=a;if(null==d.__filters&&"opengl"==this.__type&&null==d.__cacheBitmap&&
!d.__domRender)return!1;b&&(d.__renderDirty=!0);b=b||d.__dirty;break;case 9:if(null==a.__filters&&"opengl"==this.__type&&null==a.__cacheBitmap)return!1}if(a.__isCacheBitmapRender)return!1;d=Ub.__pool.get();d.__copyFrom(a.__worldColorTransform);null!=this.__worldColorTransform&&d.__combine(this.__worldColorTransform);var f=!1;if(a.get_cacheAsBitmap()||"opengl"!=this.__type&&!d.__isDefault(!0)){f=null;var g=(b=null==a.__cacheBitmap||a.__renderDirty&&(b||null!=a.__children&&0<a.__children.length)||a.opaqueBackground!=
a.__cacheBitmapBackground)||null!=a.__graphics&&a.__graphics.__softwareDirty||!a.__cacheBitmapColorTransform.__equals(d,!0),k=b||null!=a.__graphics&&a.__graphics.__hardwareDirty,l=this.__type;if(g||k)"opengl"==l&&0==this.__shouldCacheHardware(a,null)&&(l="canvas"),!g||"canvas"!=l&&"cairo"!=l||(b=!0),k&&"opengl"==l&&(b=!0);g=b||!a.__cacheBitmap.__worldTransform.equals(a.__worldTransform);c=null!=a.__filters;if("dom"==this.__type&&!c)return!1;if(c&&!b)for(var m=0,h=a.__filters;m<h.length;){var r=h[m];
++m;if(r.__renderDirty){b=!0;break}}null==a.__cacheBitmapMatrix&&(a.__cacheBitmapMatrix=new wa);m=null!=a.__cacheAsBitmapMatrix?a.__cacheAsBitmapMatrix:a.__renderTransform;b||m.a==a.__cacheBitmapMatrix.a&&m.b==a.__cacheBitmapMatrix.b&&m.c==a.__cacheBitmapMatrix.c&&m.d==a.__cacheBitmapMatrix.d||(b=!0);!b&&"opengl"!=this.__type&&null!=a.__cacheBitmapData&&null!=a.__cacheBitmapData.image&&a.__cacheBitmapData.image.version<a.__cacheBitmapData.__textureVersion&&(b=!0);if(!b)for(k=a;null!=k;){if(null!=
k.get_scrollRect()){g=!0;break}k=k.parent}a.__cacheBitmapMatrix.copyFrom(m);a.__cacheBitmapMatrix.tx=0;var p=k=a.__cacheBitmapMatrix.ty=0,w=0,u=0,n=r=0;h=this.__pixelRatio;if(g||b)f=ea.__pool.get(),a.__getFilterBounds(f,a.__cacheBitmapMatrix),w=0<f.width?Math.ceil((f.width+1)*h):0,u=0<f.height?Math.ceil((f.height+1)*h):0,r=0<f.x?Math.ceil(f.x):Math.floor(f.x),n=0<f.y?Math.ceil(f.y):Math.floor(f.y),null!=a.__cacheBitmapData?w>a.__cacheBitmapData.width||u>a.__cacheBitmapData.height?(k=Math.ceil(Math.max(1.25*
w,a.__cacheBitmapData.width)),p=Math.ceil(Math.max(1.25*u,a.__cacheBitmapData.height)),b=!0):(k=a.__cacheBitmapData.width,p=a.__cacheBitmapData.height):(k=w,p=u);if(b)if(g=!0,a.__cacheBitmapBackground=a.opaqueBackground,.5<=w&&.5<=u){var t=null!=a.opaqueBackground&&(k!=w||p!=u),A=null!=a.opaqueBackground?-16777216|a.opaqueBackground:0,q=t?0:A,y="opengl"==this.__type;null==a.__cacheBitmapData||k>a.__cacheBitmapData.width||p>a.__cacheBitmapData.height?(a.__cacheBitmapData=new ma(k,p,!0,q),null==a.__cacheBitmap&&
(a.__cacheBitmap=new dd),a.__cacheBitmap.__bitmapData=a.__cacheBitmapData,a.__cacheBitmapRenderer=null):a.__cacheBitmapData.__fillRect(a.__cacheBitmapData.rect,q,y);t&&(f.setTo(0,0,w,u),a.__cacheBitmapData.__fillRect(f,A,y))}else return Ub.__pool.release(d),a.__cacheBitmap=null,a.__cacheBitmapData=null,a.__cacheBitmapData2=null,a.__cacheBitmapData3=null,a.__cacheBitmapRenderer=null,7==a.__drawableType&&(d=a,null!=d.__cacheBitmap&&(d.__cacheBitmap.__renderTransform.tx-=d.__offsetX*h,d.__cacheBitmap.__renderTransform.ty-=
d.__offsetY*h)),!0;else a.__cacheBitmapData=a.__cacheBitmap.get_bitmapData(),a.__cacheBitmapData2=null,a.__cacheBitmapData3=null;if(g||b)a.__cacheBitmap.__worldTransform.copyFrom(a.__worldTransform),m==a.__renderTransform?(a.__cacheBitmap.__renderTransform.identity(),a.__cacheBitmap.__renderTransform.scale(1/h,1/h),a.__cacheBitmap.__renderTransform.tx=a.__renderTransform.tx+r,a.__cacheBitmap.__renderTransform.ty=a.__renderTransform.ty+n):(a.__cacheBitmap.__renderTransform.copyFrom(a.__cacheBitmapMatrix),
a.__cacheBitmap.__renderTransform.invert(),a.__cacheBitmap.__renderTransform.concat(a.__renderTransform),a.__cacheBitmap.__renderTransform.a*=1/h,a.__cacheBitmap.__renderTransform.d*=1/h,a.__cacheBitmap.__renderTransform.tx+=r,a.__cacheBitmap.__renderTransform.ty+=n);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(b){if(null==a.__cacheBitmapRenderer||l!=a.__cacheBitmapRenderer.__type)"opengl"==l?a.__cacheBitmapRenderer=new Cb(na.__cast(this,Cb).__context3D,a.__cacheBitmapData):(null==a.__cacheBitmapData.image&&(a.__cacheBitmapData=new ma(k,p,!0,null!=a.opaqueBackground?-16777216|a.opaqueBackground:0),a.__cacheBitmap.__bitmapData=a.__cacheBitmapData),ya.convertToCanvas(a.__cacheBitmapData.image),a.__cacheBitmapRenderer=new pg(a.__cacheBitmapData.image.buffer.__srcContext)),
a.__cacheBitmapRenderer.__worldTransform=new wa,a.__cacheBitmapRenderer.__worldColorTransform=new Ub;null==a.__cacheBitmapColorTransform&&(a.__cacheBitmapColorTransform=new Ub);a.__cacheBitmapRenderer.__stage=a.stage;a.__cacheBitmapRenderer.__allowSmoothing=this.__allowSmoothing;a.__cacheBitmapRenderer.__setBlendMode(10);a.__cacheBitmapRenderer.__worldAlpha=1/a.__worldAlpha;a.__cacheBitmapRenderer.__worldTransform.copyFrom(a.__renderTransform);a.__cacheBitmapRenderer.__worldTransform.invert();a.__cacheBitmapRenderer.__worldTransform.concat(a.__cacheBitmapMatrix);
a.__cacheBitmapRenderer.__worldTransform.tx-=r;a.__cacheBitmapRenderer.__worldTransform.ty-=n;a.__cacheBitmapRenderer.__worldTransform.scale(h,h);a.__cacheBitmapRenderer.__pixelRatio=h;a.__cacheBitmapRenderer.__worldColorTransform.__copyFrom(d);a.__cacheBitmapRenderer.__worldColorTransform.__invert();a.__isCacheBitmapRender=!0;if("opengl"==a.__cacheBitmapRenderer.__type){t=a.__cacheBitmapRenderer;A=t.__context3D;q=A.__state.renderToTexture;y=A.__state.renderToTextureDepthStencil;var E=A.__state.renderToTextureAntiAlias,
L=A.__state.renderToTextureSurfaceSelector,v=this.__blendMode;this.__suspendClipAndMask();t.__copyShader(this);a.__cacheBitmapData.__setUVRect(A,0,0,w,u);t.__setRenderTarget(a.__cacheBitmapData);null!=a.__cacheBitmapData.image&&(a.__cacheBitmapData.__textureVersion=a.__cacheBitmapData.image.version+1);a.__cacheBitmapData.__drawGL(a,t);if(c){var C=!1;m=0;for(h=a.__filters;m<h.length;)r=h[m],++m,r.__preserveObject&&(C=!0);c=a.__cacheBitmapData;n=null;null==a.__cacheBitmapData2||k>a.__cacheBitmapData2.width||
p>a.__cacheBitmapData2.height?a.__cacheBitmapData2=new ma(k,p,!0,0):(a.__cacheBitmapData2.fillRect(a.__cacheBitmapData2.rect,0),null!=a.__cacheBitmapData2.image&&(a.__cacheBitmapData2.__textureVersion=a.__cacheBitmapData2.image.version+1));a.__cacheBitmapData2.__setUVRect(A,0,0,w,u);l=a.__cacheBitmapData2;C&&(null==a.__cacheBitmapData3||k>a.__cacheBitmapData3.width||p>a.__cacheBitmapData3.height?a.__cacheBitmapData3=new ma(k,p,!0,0):(a.__cacheBitmapData3.fillRect(a.__cacheBitmapData3.rect,0),null!=
a.__cacheBitmapData3.image&&(a.__cacheBitmapData3.__textureVersion=a.__cacheBitmapData3.image.version+1)),a.__cacheBitmapData3.__setUVRect(A,0,0,w,u),n=a.__cacheBitmapData3);t.__setBlendMode(10);t.__worldAlpha=1;t.__worldTransform.identity();t.__worldColorTransform.__identity();m=0;for(h=a.__filters;m<h.length;){r=h[m];++m;r.__preserveObject&&(t.__setRenderTarget(n),t.__renderFilterPass(c,t.__defaultDisplayShader,r.__smooth));p=0;for(w=r.__numShaderPasses;p<w;)k=p++,k=r.__initShader(t,k,r.__preserveObject?
n:null),t.__setBlendMode(r.__shaderBlendMode),t.__setRenderTarget(l),t.__renderFilterPass(c,k,r.__smooth),k=c,c=l,l=k;r.__renderDirty=!1}a.__cacheBitmap.__bitmapData=c}this.__blendMode=10;this.__setBlendMode(v);this.__copyShader(t);null!=q?A.setRenderToTexture(q,y,E,L):A.setRenderToBackBuffer();this.__resumeClipAndMask(t);this.setViewport();a.__cacheBitmapColorTransform.__copyFrom(d)}else{a.__cacheBitmapData.__drawCanvas(a,a.__cacheBitmapRenderer);if(c){C=w=!1;m=0;for(h=a.__filters;m<h.length;)r=
h[m],++m,r.__needSecondBitmapData&&(w=!0),r.__preserveObject&&(C=!0);c=a.__cacheBitmapData;n=null;w?(null==a.__cacheBitmapData2||null==a.__cacheBitmapData2.image||k>a.__cacheBitmapData2.width||p>a.__cacheBitmapData2.height?a.__cacheBitmapData2=new ma(k,p,!0,0):a.__cacheBitmapData2.fillRect(a.__cacheBitmapData2.rect,0),l=a.__cacheBitmapData2):l=c;C&&(null==a.__cacheBitmapData3||null==a.__cacheBitmapData3.image||k>a.__cacheBitmapData3.width||p>a.__cacheBitmapData3.height?a.__cacheBitmapData3=new ma(k,
p,!0,0):a.__cacheBitmapData3.fillRect(a.__cacheBitmapData3.rect,0),n=a.__cacheBitmapData3);null==a.__tempPoint&&(a.__tempPoint=new Ya);p=a.__tempPoint;m=0;for(h=a.__filters;m<h.length;)r=h[m],++m,r.__preserveObject&&n.copyPixels(c,c.rect,p),k=r.__applyFilter(l,c,c.rect,p),r.__preserveObject&&k.draw(n,null,null!=a.__objectTransform?a.__objectTransform.__colorTransform:null),r.__renderDirty=!1,w&&k==l&&(k=c,c=l,l=k);a.__cacheBitmapData!=c&&(k=a.__cacheBitmapData,a.__cacheBitmapData=c,a.__cacheBitmapData2=
k,a.__cacheBitmap.__bitmapData=a.__cacheBitmapData,a.__cacheBitmapRenderer=null);a.__cacheBitmap.__imageVersion=a.__cacheBitmapData.__textureVersion}a.__cacheBitmapColorTransform.__copyFrom(d);a.__cacheBitmapColorTransform.__isDefault(!0)||(a.__cacheBitmapColorTransform.alphaMultiplier=1,a.__cacheBitmapData.colorTransform(a.__cacheBitmapData.rect,a.__cacheBitmapColorTransform))}a.__isCacheBitmapRender=!1}(g||b)&&ea.__pool.release(f);f=g}else null!=a.__cacheBitmap&&("dom"==this.__type&&this.__renderDrawableClear(a.__cacheBitmap),
a.__cacheBitmap=null,a.__cacheBitmapData=null,a.__cacheBitmapData2=null,a.__cacheBitmapData3=null,a.__cacheBitmapColorTransform=null,a.__cacheBitmapRenderer=null,f=!0);Ub.__pool.release(d);f&&7==a.__drawableType&&(d=a,null!=d.__cacheBitmap&&(d.__cacheBitmap.__renderTransform.tx-=d.__offsetX,d.__cacheBitmap.__renderTransform.ty-=d.__offsetY));return f},__class__:he});var ml=function(a){he.call(this)};h["openfl.display.CairoRenderer"]=ml;ml.__name__="openfl.display.CairoRenderer";ml.__super__=he;ml.prototype=
x(he.prototype,{cairo:null,__matrix:null,__matrix3: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[0]=this.__matrix.a;this.__matrix3[1]=this.__matrix.b;this.__matrix3[3]=this.__matrix.c;this.__matrix3[4]=this.__matrix.d;this.__roundPixels?(this.__matrix3[6]=Math.round(this.__matrix.tx),this.__matrix3[7]=Math.round(this.__matrix.ty)):(this.__matrix3[6]=this.__matrix.tx,
this.__matrix3[7]=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)}},__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.__renderDrawableMask(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&&this.__renderDrawable(a)},__renderDrawable:function(a){if(null!=a)switch(a.__drawableType){case 6:!a.__renderable||0>=a.__worldAlpha||null==a.__currentState||(this.__pushMaskObject(a),this.__renderDrawable(a.__currentState),this.__popMaskObject(a),this.__renderEvent(a))}},__renderDrawableMask:function(a){if(null!=a)switch(a.__drawableType){case 2:this.cairo.rectangle(0,
0,a.get_width(),a.get_height());break;case 6:this.__renderDrawableMask(a.__currentState)}},__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)}},__class__:ml});var pg=function(a){he.call(this);this.context=a;this.__tempMatrix=new wa;this.__type="canvas"};h["openfl.display.CanvasRenderer"]=pg;pg.__name__="openfl.display.CanvasRenderer";pg.__super__=he;pg.prototype=x(he.prototype,{context:null,__isDOM:null,__tempMatrix:null,applySmoothing:function(a,b){a.imageSmoothingEnabled=b},setTransform:function(a,b){null==b?b=this.context:this.context==b&&
null!=this.__worldTransform&&(this.__tempMatrix.copyFrom(a),this.__tempMatrix.concat(this.__worldTransform),a=this.__tempMatrix);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)}},__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.__renderDrawableMask(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){this.__renderDrawable(a)},__renderDrawable:function(a){if(null!=a)switch(a.__drawableType){case 0:nl.renderDrawable(a,this);break;case 2:ri.renderDrawable(a,this);break;case 3:Yg.renderDrawable(a,this);break;case 4:case 5:ol.renderDrawable(a,this);break;case 6:pl.renderDrawable(a,this);break;case 7:U.renderDrawable(a,this);break;case 8:Eh.renderDrawable(a,
this);break;case 9:pf.renderDrawable(a,this)}},__renderDrawableMask:function(a){if(null!=a)switch(a.__drawableType){case 0:nl.renderDrawableMask(a,this);break;case 2:ri.renderDrawableMask(a,this);break;case 3:Yg.renderDrawableMask(a,this);break;case 4:case 5:ol.renderDrawableMask(a,this);break;case 6:pl.renderDrawableMask(a,this);break;case 7:U.renderDrawableMask(a,this);break;case 8:Eh.renderDrawableMask(a,this);break;case 9:pf.renderDrawableMask(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"}},__class__:pg});var vo={fromInt:function(a){return a},fromString:function(a){switch(a){case "none":return 0;case "round":return 1;case "square":return 2;default:return null}},toInt:function(a){return a},toString:function(a){switch(a){case 0:return"none";case 1:return"round";case 2:return"square";default:return null}}},ql=function(a){da.call(this);this.__drawableType=10;this.__element=
a};h["openfl.display.DOMElement"]=ql;ql.__name__="openfl.display.DOMElement";ql.__super__=da;ql.prototype=x(da.prototype,{__active:null,__element:null,__class__:ql});var qj=function(a){he.call(this);this.element=a;da.__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.__z=this.__numClipRects=0;this.__type="dom";this.__canvasRenderer=new pg(null);this.__canvasRenderer.__isDOM=!0};h["openfl.display.DOMRenderer"]=qj;qj.__name__="openfl.display.DOMRenderer";qj.__super__=he;qj.prototype=x(he.prototype,{element:null,__canvasRenderer:null,__clipRects: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 f=a.__style;if(b&&a.__renderTransformChanged){b=a.__renderTransform;var g=this.__roundPixels;null==g&&(g=!1);f.setProperty(this.__transformProperty,
g?"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,f.setProperty("z-index",null==a.__worldZ?"null":""+a.__worldZ,null));c&&a.__worldAlphaChanged&&(1>a.__worldAlpha?f.setProperty("opacity",null==a.__worldAlpha?"null":""+a.__worldAlpha,null):f.removeProperty("opacity"));d&&a.__worldClipChanged&&(null==
a.__worldClip?f.removeProperty("clip"):(a=a.__worldClip,f.setProperty("clip","rect("+a.y+"px, "+a.get_right()+"px, "+a.get_bottom()+"px, "+a.x+"px)",null)))},__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 ea);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;this.__renderDrawable(a)},__renderDrawable:function(a){if(null!=a)switch(a.__drawableType){case 2:pc.renderDrawable(a,this);break;case 3:be.renderDrawable(a,this);break;case 4:case 5:rl.renderDrawable(a,this);break;case 6:sl.renderDrawable(a,this);break;case 7:ce.renderDrawable(a,this);break;case 8:wg.renderDrawable(a,this);break;case 9:bg.renderDrawable(a,this);break;case 10: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),be.renderDrawable(a,this)}},__renderDrawableClear:function(a){if(null!=a)switch(a.__drawableType){case 2:pc.renderDrawableClear(a,this);break;case 3:be.renderDrawableClear(a,this);break;case 4:case 5:rl.renderDrawableClear(a,this);break;case 6:sl.renderDrawableClear(a,this);
break;case 7:ce.renderDrawableClear(a,this);break;case 8:wg.renderDrawableClear(a,this);break;case 9:bg.renderDrawableClear(a,this)}},__setBlendMode:function(a){null!=this.__overrideBlendMode&&(a=this.__overrideBlendMode);this.__blendMode!=a&&(this.__blendMode=a)},__updateClip:function(a){if(null==this.__currentClipRect)a.__worldClipChanged=null!=a.__worldClip,a.__worldClip=null;else{null==a.__worldClip&&(a.__worldClip=new ea);var b=ea.__pool.get(),c=wa.__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);ea.__pool.release(b);wa.__pool.release(c)}},__class__:qj});var tl=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}");
Ic.call(this,a);this.__isGenerated=!0;this.__initGL()};h["openfl.display.DisplayObjectShader"]=tl;tl.__name__="openfl.display.DisplayObjectShader";tl.__super__=Ic;tl.prototype=x(Ic.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__:tl});var En=function(a,b){Da.call(this);this.name=a;this.frame=b};h["openfl.display.FrameLabel"]=
En;En.__name__="openfl.display.FrameLabel";En.__super__=Da;En.prototype=x(Da.prototype,{frame:null,name:null,__class__:En});var wo=function(a,b){this.script=a;this.frame=b};h["openfl.display.FrameScript"]=wo;wo.__name__="openfl.display.FrameScript";wo.prototype={frame:null,script:null,__class__:wo};var Vd=function(a){this.__dirty=!0;this.__owner=a;this.__commands=new de;this.__positionY=this.__positionX=this.__strokePadding=0;this.__renderTransform=new wa;this.__usedShaderBuffers=new ib;this.__worldTransform=
new wa;this.__height=this.__width=0;this.__bitmapScale=1;this.__shaderBufferPool=new Jc(function(){return new ul});this.moveTo(0,0)};h["openfl.display.Graphics"]=Vd;Vd.__name__="openfl.display.Graphics";Vd.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,__bitmapScale: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,f,g,k,l){null==l&&(l=0);null==k&&(k=1);null==g&&(g=0);if(null!=b&&0!=b.length){if(null==c){c=[];for(var m=0,h=b.length;m<h;)m++,c.push(1)}if(null==d)for(d=[],m=0,h=b.length;m<h;){var r=m++;d.push(Math.ceil(r/(b.length-1)*255))}if(!(c.length<b.length||d.length<b.length))for(this.__commands.beginGradientFill(a,b,c,d,f,g,k,l),m=0;m<c.length;)if(a=c[m],++m,0<a){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,f,g){var k=this.__findExtrema(this.__positionX,a,c,f),l=this.__findExtrema(this.__positionY,b,d,g);this.__inflateBounds(k.min-this.__strokePadding,l.min-this.__strokePadding);
this.__inflateBounds(k.max+this.__strokePadding,l.max+this.__strokePadding);this.__positionX=f;this.__positionY=g;this.__commands.cubicCurveTo(a,b,c,d,f,g);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 f=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 g=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(f-this.__strokePadding,g-this.__strokePadding);this.__inflateBounds(f+this.__strokePadding,g+this.__strokePadding);this.__positionX=c;this.__positionY=d;this.__inflateBounds(this.__positionX-this.__strokePadding,this.__positionY-this.__strokePadding);this.__inflateBounds(this.__positionX+
this.__strokePadding,this.__positionY+this.__strokePadding);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,f=!1,g=!1,k=d?b.get_length():Math.floor(a.get_length()/4);if(0!=k){null!=c&&(c.get_length()>=6*k?g=f=!0:c.get_length()>=4*k?f=!0:
c.get_length()>=2*k&&(g=!0));for(var l=ea.__pool.get(),m=wa.__pool.get(),h=Infinity,r=Infinity,p=-Infinity,w=-Infinity,u,n=0;n<k;){var t=n++;u=d?4*b.get(t):4*t;0>u||(l.setTo(0,0,a.get(u+2),a.get(u+3)),0>=l.width||0>=l.height||(f&&g?(u=6*t,m.setTo(c.get(u),c.get(u+1),c.get(u+2),c.get(u+3),c.get(u+4),c.get(u+5))):f?(u=4*t,m.setTo(c.get(u),c.get(u+1),c.get(u+2),c.get(u+3),l.x,l.y)):g?(u=2*t,m.tx=c.get(u),m.ty=c.get(u+1)):(m.tx=l.x,m.ty=l.y),l.__transform(l,m),h>l.x&&(h=l.x),r>l.y&&(r=l.y),p<l.get_right()&&
(p=l.get_right()),w<l.get_bottom()&&(w=l.get_bottom())))}this.__inflateBounds(h,r);this.__inflateBounds(p,w);this.__commands.drawQuads(a,b,c);this.set___dirty(!0);this.__visible=!0;ea.__pool.release(l);wa.__pool.release(m)}}},drawRect:function(a,b,c,d){if(0!=c||0!=d){var f=0>c?-1:1,g=0>d?-1:1;this.__inflateBounds(a-this.__strokePadding*f,b-this.__strokePadding*g);this.__inflateBounds(a+c+this.__strokePadding*f,b+d+this.__strokePadding*g);this.__commands.drawRect(a,b,c,d);this.set___dirty(!0)}},drawRoundRect:function(a,
b,c,d,f,g){if(0!=c||0!=d){var k=0>c?-1:1,l=0>d?-1:1;this.__inflateBounds(a-this.__strokePadding*k,b-this.__strokePadding*l);this.__inflateBounds(a+c+this.__strokePadding*k,b+d+this.__strokePadding*l);this.__commands.drawRoundRect(a,b,c,d,f,g);this.set___dirty(!0)}},drawRoundRectComplex:function(a,b,c,d,f,g,k,l){if(!(0>=c||0>=d)){this.__inflateBounds(a-this.__strokePadding,b-this.__strokePadding);this.__inflateBounds(a+c+this.__strokePadding,b+d+this.__strokePadding);var m=a+c,h=b+d;c=c<d?2*c:2*d;
f<c||(f=c);g<c||(g=c);k<c||(k=c);l<c||(l=c);c=1-Math.sin(Math.PI/180*45);d=1-Math.tan(Math.PI/180*22.5);var r=l*c,p=l*d;this.moveTo(m,h-l);this.curveTo(m,h-p,m-r,h-r);this.curveTo(m-p,h,m-l,h);r=k*c;p=k*d;this.lineTo(a+k,h);this.curveTo(a+p,h,a+r,h-r);this.curveTo(a,h-p,a,h-k);r=f*c;p=f*d;this.lineTo(a,b+f);this.curveTo(a,b+p,a+r,b+r);this.curveTo(a+p,b,a+f,b);r=g*c;p=g*d;this.lineTo(m-g,b);this.curveTo(m-p,b,m-r,b+r);this.curveTo(m,b+p,m,b+g);this.lineTo(m,h-l);this.set___dirty(!0)}},drawTriangles:function(a,
b,c,d){null==d&&(d=1);if(null!=a&&0!=a.get_length()){var f=a.get_length()/2|0;if(null==b){if(0!=f%3)throw new Eg("Not enough vertices to close a triangle.");b=ia.toIntVector(null);for(var g=0,k=f;g<k;){var l=g++;b.push(l)}}null==d&&(d=1);var m=Infinity,h=Infinity,r=-Infinity,p=-Infinity;g=0;for(k=f;g<k;)l=g++,f=a.get(2*l),l=a.get(2*l+1),m>f&&(m=f),h>l&&(h=l),r<f&&(r=f),p<l&&(p=l);this.__inflateBounds(m,h);this.__inflateBounds(r,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,f,g,k,l){null==l&&(l=0);null==k&&(k=1);null==g&&(g=0);if(null==c){c=[];for(var m=0,h=b.length;m<h;)m++,c.push(1)}if(null==d)for(d=[],m=0,h=b.length;m<h;){var r=m++;d.push(Math.ceil(r/(b.length-1)*255))}this.__commands.lineGradientStyle(a,b,c,d,f,g,k,l)},lineStyle:function(a,b,c,d,f,g,k,
l){null==l&&(l=3);null==f&&(f=2);null==d&&(d=!1);null==c&&(c=1);null==b&&(b=0);null==g&&(g=1);null==k&&(k=2);null!=a&&(1==k?a>this.__strokePadding&&(this.__strokePadding=Math.ceil(a)):a/2>this.__strokePadding&&(this.__strokePadding=Math.ceil(a/2)));this.__commands.lineStyle(a,b,c,d,f,g,k,l);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=ia.toObjectVector(null);this.__owner.__readGraphicsData(b,a);return b},__calculateBezierCubicPoint:function(a,b,c,d,f){var g=1-a;return b*g*g*g+3*c*a*g*g+3*d*g*a*a+f*a*a*a},__calculateBezierQuadPoint:function(a,b,c,d){var f=1-a;return f*f*b+2*f*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=ea.__pool.get();this.__bounds.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);ea.__pool.release(c)}},__hitTest:function(a,b,c,d){if(null==this.__bounds)return!1;var f=d.a*d.d-d.b*d.c,g=0==f?-d.tx:1/f*(d.c*(d.ty-b)+d.d*(a-d.tx));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 g>this.__bounds.x&&a>this.__bounds.y&&this.__bounds.contains(g,a)?c?C.hitTest(this,g,a):!0:!1},__findExtrema:function(a,b,c,d){var f=[];if(!(b<d&&b>a||b>d&&b<a)||!(c<d&&c>a||c>
d&&c<a)){var g=-a+3*b+d-3*c,k=2*a-4*b+2*c,l=b-a,m=k*k-4*g*l;0==g?(g=-l/k,0<g&&1>g&&f.push(this.__calculateBezierCubicPoint(g,a,b,c,d))):0<=m&&(l=(-k+Math.sqrt(m))/(2*g),g=(-k-Math.sqrt(m))/(2*g),0<l&&1>l&&f.push(this.__calculateBezierCubicPoint(l,a,b,c,d)),0<g&&1>g&&f.push(this.__calculateBezierCubicPoint(g,a,b,c,d)))}b=a;f.push(d);for(d=0;d<f.length;)c=f[d],++d,c<b&&(b=c),c>a&&(a=c);return{min:b,max:a}},__inflateBounds:function(a,b){null==this.__bounds?(this.__bounds=new ea(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 qf(this.__commands),c=null,d,f=0,g=this.__commands.types;f<g.length;){d=g[f];++f;switch(d._hx_index){case 4:case 5:case 6:case 7:case 9:case 10:case 17:case 18:null==
c&&(c=new si);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=Z.BEGIN_BITMAP_FILL;d=b;a.push(new vl(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=Z.BEGIN_FILL;d=b;a.push(new rj(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=Z.BEGIN_GRADIENT_FILL;d=b;a.push(new wl(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=Z.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=Z.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=Z.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=Z.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=Z.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=Z.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=Z.END_FILL;a.push(new xl);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=Z.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=Z.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=Z.LINE_STYLE;var k=b;d=new yl(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 rj(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=Z.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=Z.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,b){if(!(null==this.__bounds||0>=this.__bounds.width||0>=this.__bounds.height)){var c=
this.__owner.__renderTransform;if(null!=c){var d=b,f=b;null==this.__owner.__worldScale9Grid&&(d=0==c.b?Math.abs(c.a):Math.sqrt(c.a*c.a+c.b*c.b),f=0==c.c?Math.abs(c.d):Math.sqrt(c.c*c.c+c.d*c.d),null!=a&&(d=0==a.b?d*a.a:d*Math.sqrt(a.a*a.a+a.b*a.b),f=0==a.c?f*a.d:f*Math.sqrt(a.c*a.c+a.d*a.d)));a=this.__bounds.width*d;f*=this.__bounds.height;if(1>a||1>f)(1<=this.__width||1<=this.__height)&&this.set___dirty(!0),this.__height=this.__width=0;else{null!=Vd.maxTextureWidth&&a>Vd.maxTextureWidth&&(a=Vd.maxTextureWidth);
null!=Vd.maxTextureWidth&&f>Vd.maxTextureHeight&&(f=Vd.maxTextureHeight);if(null!=this.__owner.__worldScale9Grid){this.__renderTransform.a=b;this.__renderTransform.d=b;d=1/b;var g=1/b}else this.__renderTransform.a=a/this.__bounds.width,this.__renderTransform.d=f/this.__bounds.height,d=1/this.__renderTransform.a,g=1/this.__renderTransform.d;this.__worldTransform.a=d*c.a;this.__worldTransform.b=d*c.b;this.__worldTransform.c=g*c.c;this.__worldTransform.d=g*c.d;g=this.__bounds.x;var k=this.__bounds.y;
d=g*c.a+k*c.c+c.tx;c=g*c.b+k*c.d+c.ty;1<b?(b=1/b,this.__worldTransform.tx=Math.round(d/b)*b,this.__worldTransform.ty=Math.round(c/b)*b):(this.__worldTransform.tx=Math.round(d),this.__worldTransform.ty=Math.round(c));b=this.__worldTransform;g=b.a*b.d-b.b*b.c;this.__renderTransform.tx=0==g?-b.tx:1/g*(b.c*(b.ty-c)+b.d*(d-b.tx));b=this.__worldTransform;g=b.a*b.d-b.b*b.c;this.__renderTransform.ty=0==g?-b.ty:1/g*(b.a*(c-b.ty)+b.b*(b.tx-d));a=Math.ceil(a+1);f=Math.ceil(f+1);a==this.__width&&f==this.__height||
this.set___dirty(!0);this.__width=a;this.__height=f}}}},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__:Vd,__properties__:{set___dirty:"set___dirty"}};var Zg=function(){};h["openfl.display.IGraphicsFill"]=Zg;Zg.__name__="openfl.display.IGraphicsFill";Zg.__isInterface__=!0;Zg.prototype={__graphicsFillType:null,__class__:Zg};var rf=
function(){};h["openfl.display.IGraphicsData"]=rf;rf.__name__="openfl.display.IGraphicsData";rf.__isInterface__=!0;rf.prototype={__graphicsDataType:null,__class__:rf};var vl=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"]=vl;vl.__name__="openfl.display.GraphicsBitmapFill";vl.__interfaces__=[Zg,rf];vl.prototype={bitmapData:null,matrix:null,repeat:null,
smooth:null,__graphicsDataType:null,__graphicsFillType:null,__class__:vl};var xl=function(){this.__graphicsDataType=5;this.__graphicsFillType=3};h["openfl.display.GraphicsEndFill"]=xl;xl.__name__="openfl.display.GraphicsEndFill";xl.__interfaces__=[Zg,rf];xl.prototype={__graphicsDataType:null,__graphicsFillType:null,__class__:xl};var wl=function(a,b,c,d,f,g,k,l){null==l&&(l=0);null==a&&(a=0);null==g&&(g=0);null==k&&(k=1);this.type=a;this.colors=b;this.alphas=c;this.ratios=d;this.matrix=f;this.spreadMethod=
g;this.interpolationMethod=k;this.focalPointRatio=l;this.__graphicsDataType=2;this.__graphicsFillType=1};h["openfl.display.GraphicsGradientFill"]=wl;wl.__name__="openfl.display.GraphicsGradientFill";wl.__interfaces__=[Zg,rf];wl.prototype={alphas:null,colors:null,focalPointRatio:null,interpolationMethod:null,matrix:null,ratios:null,spreadMethod:null,type:null,__graphicsDataType:null,__graphicsFillType:null,__class__:wl};var zl=function(){};h["openfl.display.IGraphicsPath"]=zl;zl.__name__="openfl.display.IGraphicsPath";
zl.__isInterface__=!0;var si=function(a,b,c){null==c&&(c=0);this.commands=a;this.data=b;this.winding=c;this.__graphicsDataType=3};h["openfl.display.GraphicsPath"]=si;si.__name__="openfl.display.GraphicsPath";si.__interfaces__=[zl,rf];si.prototype={commands:null,data:null,winding:null,__graphicsDataType:null,cubicCurveTo:function(a,b,c,d,f,g){null==this.commands&&(this.commands=ia.toIntVector(null));null==this.data&&(this.data=ia.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(f);this.data.push(g)},curveTo:function(a,b,c,d){null==this.commands&&(this.commands=ia.toIntVector(null));null==this.data&&(this.data=ia.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=ia.toIntVector(null));null==this.data&&(this.data=ia.toFloatVector(null));this.commands.push(2);this.data.push(a);this.data.push(b)},moveTo:function(a,
b){null==this.commands&&(this.commands=ia.toIntVector(null));null==this.data&&(this.data=ia.toFloatVector(null));this.commands.push(1);this.data.push(a);this.data.push(b)},wideLineTo:function(a,b){null==this.commands&&(this.commands=ia.toIntVector(null));null==this.data&&(this.data=ia.toFloatVector(null));this.commands.push(2);this.data.push(a);this.data.push(b)},wideMoveTo:function(a,b){null==this.commands&&(this.commands=ia.toIntVector(null));null==this.data&&(this.data=ia.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,f,g){f*=.5;g*=.5;f>c/2&&(f=c/2);g>d/2&&(g=d/2);c=a+c;d=b+d;var k=-f+.7071067811865476*f,l=-f+.41421356237309503*f,m=-g+.7071067811865476*g,h=-g+
.41421356237309503*g;this.moveTo(c,d-g);this.curveTo(c,d+h,c+k,d+m);this.curveTo(c+l,d,c-f,d);this.lineTo(a+f,d);this.curveTo(a-l,d,a-k,d+m);this.curveTo(a,d+h,a,d-g);this.lineTo(a,b+g);this.curveTo(a,b-h,a-k,b-m);this.curveTo(a-l,b,a+f,b);this.lineTo(c-f,b);this.curveTo(c+l,b,c+k,b-m);this.curveTo(c,b-h,c,b+g);this.lineTo(c,d-g)},__class__:si};var Fn=function(a,b,c){this.rects=a;this.indices=b;this.transforms=c;this.__graphicsDataType=6};h["openfl.display.GraphicsQuadPath"]=Fn;Fn.__name__="openfl.display.GraphicsQuadPath";
Fn.__interfaces__=[zl,rf];Fn.prototype={indices:null,rects:null,transforms:null,__graphicsDataType:null,__class__:Fn};var Gn=function(a,b){this.shader=a;this.matrix=b;this.__graphicsDataType=8;this.__graphicsFillType=4};h["openfl.display.GraphicsShaderFill"]=Gn;Gn.__name__="openfl.display.GraphicsShaderFill";Gn.__interfaces__=[Zg,rf];Gn.prototype={matrix:null,shader:null,__graphicsDataType:null,__graphicsFillType:null,__class__:Gn};var rj=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"]=rj;rj.__name__="openfl.display.GraphicsSolidFill";rj.__interfaces__=[Zg,rf];rj.prototype={alpha:null,color:null,__graphicsDataType:null,__graphicsFillType:null,__class__:rj};var xo=function(){};h["openfl.display.IGraphicsStroke"]=xo;xo.__name__="openfl.display.IGraphicsStroke";xo.__isInterface__=!0;var yl=function(a,b,c,d,f,g,k){null==g&&(g=3);null==f&&(f=2);null==d&&(d=0);null==c&&(c=2);null==b&&(b=!1);null==
a&&(a=NaN);this.caps=d;this.fill=k;this.joints=f;this.miterLimit=g;this.pixelHinting=b;this.scaleMode=c;this.thickness=a;this.__graphicsDataType=0};h["openfl.display.GraphicsStroke"]=yl;yl.__name__="openfl.display.GraphicsStroke";yl.__interfaces__=[xo,rf];yl.prototype={caps:null,fill:null,joints:null,miterLimit:null,pixelHinting:null,scaleMode:null,thickness:null,__graphicsDataType:null,__class__:yl};var Hn=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"]=Hn;Hn.__name__="openfl.display.GraphicsTrianglePath";Hn.__interfaces__=[zl,rf];Hn.prototype={culling:null,indices:null,uvtData:null,vertices:null,__graphicsDataType:null,__class__:Hn};var sj=function(){};h["openfl.display.ITileContainer"]=sj;sj.__name__="openfl.display.ITileContainer";sj.__isInterface__=!0;sj.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__:sj,__properties__:{get_numTiles:"get_numTiles"}};var qk=function(a){null==a&&(a=80);this.quality=a};h["openfl.display.JPEGEncoderOptions"]=qk;qk.__name__="openfl.display.JPEGEncoderOptions";qk.prototype={quality:null,__class__:qk};var yo={fromInt:function(a){return a},fromString:function(a){switch(a){case "bevel":return 0;case "miter":return 1;case "round":return 2;default:return null}},toInt:function(a){return a},
toString:function(a){switch(a){case 0:return"bevel";case 1:return"miter";case 2:return"round";default:return null}}},Al=function(){Ta.call(this);this.__drawableType=4;this.contentLoaderInfo=Mf.create(this);this.uncaughtErrorEvents=this.contentLoaderInfo.uncaughtErrorEvents;this.__unloaded=!0};h["openfl.display.Loader"]=Al;Al.__name__="openfl.display.Loader";Al.__super__=Ta;Al.prototype=x(Ta.prototype,{content:null,contentLoaderInfo:null,uncaughtErrorEvents:null,__library:null,__path:null,__unloaded:null,
addChild:function(a){throw new sc("Error #2069: The Loader class does not implement this method.",2069);},addChildAt:function(a,b){throw new sc("Error #2069: The Loader class does not implement this method.",2069);},close:function(){Bc.notImplemented({fileName:"openfl/display/Loader.hx",lineNumber:229,className:"openfl.display.Loader",methodName:"close"})},load:function(a,b){this.unload();b=new fa("open");this.contentLoaderInfo.dispatchEvent(b);this.contentLoaderInfo.loaderURL=ha.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(;O.endsWith(this.__path,"/");)this.__path=this.__path.substring(0,this.__path.length-1);O.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)ma.loadFromFile(a.url).onComplete(q(this,
this.BitmapData_onLoad)).onError(q(this,this.BitmapData_onError)).onProgress(q(this,this.BitmapData_onProgress));else{b=new oj;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",q(this,this.loader_onComplete));b.addEventListener("ioError",q(this,this.loader_onError));b.addEventListener("progress",q(this,this.loader_onProgress));
b.load(a)}},loadBytes:function(a,b){ma.loadFromBytes(a).onComplete(q(this,this.BitmapData_onLoad)).onError(q(this,this.BitmapData_onError))},removeChild:function(a){if(a==this.content)return Ta.prototype.removeChild.call(this,this.content);throw new sc("Error #2069: The Loader class does not implement this method.",2069);},removeChildAt:function(a){throw new sc("Error #2069: The Loader class does not implement this method.",2069);},setChildIndex:function(a,b){throw new sc("Error #2069: The Loader class does not implement this method.",
2069);},unload:function(){this.__unloaded||(null!=this.content&&this.content.parent==this&&Ta.prototype.removeChild.call(this,this.content),null!=this.__library&&(xa.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 fa("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 Nf("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&&
Ta.prototype.addChildAt.call(this,a,0)},BitmapData_onError:function(a){this.__dispatchError(M.string(a))},BitmapData_onLoad:function(a){null==a?this.__dispatchError("Unknown error"):(this.__setContent(new dd(a),a.width,a.height),this.contentLoaderInfo.dispatchEvent(new fa("complete")))},BitmapData_onProgress:function(a,b){var c=new Qe("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=Gc.parse(a.data,Vg.directory(this.__path));if(null==c)this.__dispatchError("Cannot parse asset manifest");else{var d=Yb.fromManifest(c);if(null==d)this.__dispatchError("Cannot open library");else if(d instanceof id)d.load().onComplete(function(a){b.__library=d;xa.registerLibrary(b.contentLoaderInfo.url,b.__library);null==c.name||xa.hasLibrary(c.name)||xa.registerLibrary(c.name,b.__library);a=b.__library.getMovieClip("");b.__setContent(a,
a.get_width()|0,a.get_height()|0);b.contentLoaderInfo.dispatchEvent(new fa("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 Ka,0,0),eval("(function () {"+M.string(a.data)+"})()"),this.contentLoaderInfo.dispatchEvent(new fa("complete"))):(this.contentLoaderInfo.bytes=a.data,ma.loadFromBytes(a.data).onComplete(q(this,
this.BitmapData_onLoad)).onError(q(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__:Al});var Mf=function(){Da.call(this);this.applicationDomain=ti.currentDomain;this.bytesTotal=this.bytesLoaded=0;this.childAllowsParent=!0;this.parameters={}};h["openfl.display.LoaderInfo"]=Mf;Mf.__name__="openfl.display.LoaderInfo";
Mf.create=function(a){var b=new Mf;b.uncaughtErrorEvents=new Bl;null!=a?b.loader=a:b.url=Mf.__rootURL;return b};Mf.__super__=Da;Mf.prototype=x(Da.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 fa("complete")))},__update:function(a,b){this.bytesLoaded=a;this.bytesTotal=b;this.dispatchEvent(new Qe("progress",!1,!1,a,b))},__class__:Mf});var Of=function(){Ka.call(this);this.__enabled=!0};h["openfl.display.MovieClip"]=Of;Of.__name__="openfl.display.MovieClip";Of.fromTimeline=function(a){var b=new Of;b.attachTimeline(a);return b};Of.__super__=
Ka;Of.prototype=x(Ka.prototype,{__enabled:null,__hasDown:null,__hasOver:null,__hasUp:null,__mouseIsDown:null,__scene:null,__timeline:null,addFrameScript:function(a,b){null!=this.__timeline&&this.__timeline.__addFrameScript(a,b)},attachTimeline:function(a){this.__timeline=a;null!=a&&(a.__attachMovieClip(this),this.play())},gotoAndPlay:function(a,b){null!=this.__timeline&&this.__timeline.__gotoAndPlay(a,b)},gotoAndStop:function(a,b){null!=this.__timeline&&this.__timeline.__gotoAndStop(a,b)},nextFrame:function(){null!=
this.__timeline&&this.__timeline.__nextFrame()},nextScene:function(){null!=this.__timeline&&this.__timeline.__nextScene()},play:function(){null!=this.__timeline&&this.__timeline.__play()},prevFrame:function(){null!=this.__timeline&&this.__timeline.__prevFrame()},prevScene:function(){null!=this.__timeline&&this.__timeline.__prevScene()},stop:function(){null!=this.__timeline&&this.__timeline.__stop()},__enterFrame:function(a){null!=this.__timeline&&this.__timeline.__enterFrame(a);for(var b=0,c=this.__children;b<
c.length;){var d=c[b];++b;d.__enterFrame(a)}},__stopAllMovieClips:function(){Ka.prototype.__stopAllMovieClips.call(this);this.stop()},__tabTest:function(a){this.__enabled&&Ka.prototype.__tabTest.call(this,a)},__onMouseDown:function(a){this.__enabled&&this.__hasDown&&this.gotoAndStop("_down");this.__mouseIsDown=!0;null!=this.stage&&this.stage.addEventListener("mouseUp",q(this,this.__onMouseUp),!0)},__onMouseUp:function(a){this.__mouseIsDown=!1;null!=this.stage&&this.stage.removeEventListener("mouseUp",
q(this,this.__onMouseUp));this.__buttonMode&&(Bd.__eq(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.get_currentLabels();b<c.length;){var d=c[b];++b;switch(d.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",q(this,this.__onRollOver)),this.addEventListener("rollOut",q(this,this.__onRollOut)),this.addEventListener("mouseDown",q(this,this.__onMouseDown))}else this.removeEventListener("rollOver",q(this,this.__onRollOver)),this.removeEventListener("rollOut",
q(this,this.__onRollOut)),this.removeEventListener("mouseDown",q(this,this.__onMouseDown));this.__buttonMode=a}return a},get_currentFrame:function(){return null!=this.__timeline?this.__timeline.__currentFrame:1},get_currentFrameLabel:function(){return null!=this.__timeline?this.__timeline.__currentFrameLabel:null},get_currentLabel:function(){return null!=this.__timeline?this.__timeline.__currentLabel:null},get_currentLabels:function(){return null!=this.__timeline?this.__timeline.__currentLabels.slice():
[]},get_currentScene:function(){if(null!=this.__timeline)return this.__timeline.__currentScene;null==this.__scene&&(this.__scene=new In("",[],1));return this.__scene},get_enabled:function(){return this.__enabled},set_enabled:function(a){return this.__enabled=a},get_framesLoaded:function(){return null!=this.__timeline?this.__timeline.__framesLoaded:1},get_isPlaying:function(){return null!=this.__timeline?this.__timeline.__isPlaying:!1},get_scenes:function(){return null!=this.__timeline?this.__timeline.scenes.slice():
[this.get_currentScene()]},get_totalFrames:function(){return null!=this.__timeline?this.__timeline.__totalFrames:1},__class__:Of,__properties__:x(Ka.prototype.__properties__,{get_totalFrames:"get_totalFrames",get_scenes:"get_scenes",get_isPlaying:"get_isPlaying",get_framesLoaded:"get_framesLoaded",set_enabled:"set_enabled",get_enabled:"get_enabled",get_currentScene:"get_currentScene",get_currentLabels:"get_currentLabels",get_currentLabel:"get_currentLabel",get_currentFrameLabel:"get_currentFrameLabel",
get_currentFrame:"get_currentFrame"})});var Cb=function(a,b){he.call(this);this.__context3D=a;this.__context=a.__context;this.__gl=this.gl=a.__context.webgl;this.__defaultRenderTarget=b;this.__flipped=null==this.__defaultRenderTarget;null==Vd.maxTextureWidth&&(Vd.maxTextureWidth=Vd.maxTextureHeight=this.__gl.getParameter(this.__gl.MAX_TEXTURE_SIZE));this.__matrix=sa._new();this.__values=[];this.__softwareRenderer=new pg(null);this.__type="opengl";this.__setBlendMode(10);this.__context3D.__setGLBlend(!0);
this.__clipRects=[];this.__maskObjects=[];this.__numClipRects=0;this.__projection=sa._new();this.__projectionFlipped=sa._new();this.__stencilReference=0;this.__tempRect=new ea;this.__defaultDisplayShader=new tl;this.__defaultGraphicsShader=new Qb;this.__defaultShader=this.__defaultDisplayShader;this.__initShader(this.__defaultShader);this.__scrollRectMasks=new Jc(function(){return new Sg});this.__maskShader=new Fh};h["openfl.display.OpenGLRenderer"]=Cb;Cb.__name__="openfl.display.OpenGLRenderer";
Cb.__super__=he;Cb.prototype=x(he.prototype,{gl:null,__context3D:null,__clipRects: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,__tempRect:null,__updatedStencil:null,__upscaled:null,__values:null,__width:null,applyAlpha:function(a){Cb.__alphaValue[0]=a*this.__worldAlpha;null!=this.__currentShaderBuffer?this.__currentShaderBuffer.addFloatOverride("openfl_Alpha",Cb.__alphaValue):null!=this.__currentShader&&null!=this.__currentShader.__alpha&&(this.__currentShader.__alpha.value=Cb.__alphaValue)},applyBitmapData:function(a,
b,c){null==c&&(c=!1);null!=this.__currentShaderBuffer?null!=a&&(Cb.__textureSizeValue[0]=a.__textureWidth,Cb.__textureSizeValue[1]=a.__textureHeight,this.__currentShaderBuffer.addFloatOverride("openfl_TextureSize",Cb.__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?(Cb.__textureSizeValue[0]=a.__textureWidth,Cb.__textureSizeValue[1]=a.__textureHeight,this.__currentShader.__textureSize.value=Cb.__textureSizeValue):this.__currentShader.__textureSize.value=null))},applyColorTransform:function(a){var b=null!=a&&!a.__isDefault(!0);
this.applyHasColorTransform(b);b?(a.__setArrays(Cb.__colorMultipliersValue,Cb.__colorOffsetsValue),null!=this.__currentShaderBuffer?(this.__currentShaderBuffer.addFloatOverride("openfl_ColorMultiplier",Cb.__colorMultipliersValue),this.__currentShaderBuffer.addFloatOverride("openfl_ColorOffset",Cb.__colorOffsetsValue)):null!=this.__currentShader&&(null!=this.__currentShader.__colorMultiplier&&(this.__currentShader.__colorMultiplier.value=Cb.__colorMultipliersValue),null!=this.__currentShader.__colorOffset&&
(this.__currentShader.__colorOffset.value=Cb.__colorOffsetsValue))):null!=this.__currentShaderBuffer?(this.__currentShaderBuffer.addFloatOverride("openfl_ColorMultiplier",Cb.__emptyColorValue),this.__currentShaderBuffer.addFloatOverride("openfl_ColorOffset",Cb.__emptyColorValue)):null!=this.__currentShader&&(null!=this.__currentShader.__colorMultiplier&&(this.__currentShader.__colorMultiplier.value=Cb.__emptyColorValue),null!=this.__currentShader.__colorOffset&&(this.__currentShader.__colorOffset.value=
Cb.__emptyColorValue))},applyHasColorTransform:function(a){Cb.__hasColorTransformValue[0]=a;null!=this.__currentShaderBuffer?this.__currentShaderBuffer.addBoolOverride("openfl_HasColorTransform",Cb.__hasColorTransformValue):null!=this.__currentShader&&null!=this.__currentShader.__hasColorTransform&&(this.__currentShader.__hasColorTransform.value=Cb.__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),sa.set(this.__matrix,0,a[0]),sa.set(this.__matrix,1,a[1]),sa.set(this.__matrix,2,a[2]),sa.set(this.__matrix,3,a[3]),sa.set(this.__matrix,4,a[4]),sa.set(this.__matrix,5,a[5]),sa.set(this.__matrix,6,a[6]),sa.set(this.__matrix,7,a[7]),sa.set(this.__matrix,8,a[8]),sa.set(this.__matrix,9,a[9]),sa.set(this.__matrix,10,a[10]),sa.set(this.__matrix,
11,a[11]),sa.set(this.__matrix,12,a[12]),sa.set(this.__matrix,13,a[13]),sa.set(this.__matrix,14,a[14]),sa.set(this.__matrix,15,a[15])):(sa.identity(this.__matrix),sa.set(this.__matrix,0,a.a),sa.set(this.__matrix,1,a.b),sa.set(this.__matrix,4,a.c),sa.set(this.__matrix,5,a.d),sa.set(this.__matrix,12,a.tx),sa.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},__getMatrix:function(a,b){var c=wa.__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);sa.identity(this.__matrix);sa.set(this.__matrix,0,c.a);sa.set(this.__matrix,1,c.b);sa.set(this.__matrix,4,c.c);sa.set(this.__matrix,5,c.d);sa.set(this.__matrix,12,c.tx);sa.set(this.__matrix,13,c.ty);sa.append(this.__matrix,this.__flipped?this.__projectionFlipped:this.__projection);this.__values[0]=sa.get(this.__matrix,0);this.__values[1]=sa.get(this.__matrix,1);this.__values[2]=sa.get(this.__matrix,
2);this.__values[3]=sa.get(this.__matrix,3);this.__values[4]=sa.get(this.__matrix,4);this.__values[5]=sa.get(this.__matrix,5);this.__values[6]=sa.get(this.__matrix,6);this.__values[7]=sa.get(this.__matrix,7);this.__values[8]=sa.get(this.__matrix,8);this.__values[9]=sa.get(this.__matrix,9);this.__values[10]=sa.get(this.__matrix,10);this.__values[11]=sa.get(this.__matrix,11);this.__values[12]=sa.get(this.__matrix,12);this.__values[13]=sa.get(this.__matrix,13);this.__values[14]=sa.get(this.__matrix,
14);this.__values[15]=sa.get(this.__matrix,15);wa.__pool.release(c);return this.__values},__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.__renderDrawableMask(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())},__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.__renderDrawableMask(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 ea);var c=wa.__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);
wa.__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(this.__context3D.__backBufferWantsBestResolution?Cb.__scissorRectangle.setTo(this.__offsetX/
this.__pixelRatio,this.__offsetY/this.__pixelRatio,this.__displayWidth/this.__pixelRatio,this.__displayHeight/this.__pixelRatio):Cb.__scissorRectangle.setTo(this.__offsetX,this.__offsetY,this.__displayWidth,this.__displayHeight),this.__context3D.setScissorRectangle(Cb.__scissorRectangle),this.__upscaled=1!=this.__worldTransform.a||1!=this.__worldTransform.d,this.__renderDrawable(a),0<this.__offsetX||0<this.__offsetY)0<this.__offsetX&&(Cb.__scissorRectangle.setTo(0,0,this.__offsetX,this.__height),
this.__context3D.setScissorRectangle(Cb.__scissorRectangle),this.__context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT),Cb.__scissorRectangle.setTo(this.__offsetX+this.__displayWidth,0,this.__width,this.__height),this.__context3D.setScissorRectangle(Cb.__scissorRectangle),this.__context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT)),0<this.__offsetY&&(Cb.__scissorRectangle.setTo(0,0,this.__width,this.__offsetY),this.__context3D.setScissorRectangle(Cb.__scissorRectangle),
this.__context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT),Cb.__scissorRectangle.setTo(0,this.__offsetY+this.__displayHeight,this.__width,this.__height),this.__context3D.setScissorRectangle(Cb.__scissorRectangle),this.__context3D.__flushGL(),this.__gl.clearColor(0,0,0,1),this.__gl.clear(this.__gl.COLOR_BUFFER_BIT)),this.__context3D.setScissorRectangle(null)}else{this.__context3D.__backBufferWantsBestResolution?Cb.__scissorRectangle.setTo(this.__offsetX/
this.__pixelRatio,this.__offsetY/this.__pixelRatio,this.__displayWidth/this.__pixelRatio,this.__displayHeight/this.__pixelRatio):Cb.__scissorRectangle.setTo(this.__offsetX,this.__offsetY,this.__displayWidth,this.__displayHeight);this.__context3D.setScissorRectangle(Cb.__scissorRectangle);var b=a.__mask,c=a.__scrollRect;a.__mask=null;a.__scrollRect=null;this.__renderDrawable(a);a.__mask=b;a.__scrollRect=c}this.__context3D.present()},__renderDrawable:function(a){if(null!=a)switch(a.__drawableType){case 0:Cl.renderDrawable(a,
this);break;case 2:Re.renderDrawable(a,this);break;case 3:xg.renderDrawable(a,this);break;case 4:case 5:Dl.renderDrawable(a,this);break;case 6:El.renderDrawable(a,this);break;case 7:yg.renderDrawable(a,this);break;case 8:Se.renderDrawable(a,this);break;case 9:aa.renderDrawable(a,this)}},__renderDrawableMask:function(a){if(null!=a)switch(a.__drawableType){case 0:Cl.renderDrawableMask(a,this);break;case 2:Re.renderDrawableMask(a,this);break;case 3:xg.renderDrawableMask(a,this);break;case 4:case 5:Dl.renderDrawableMask(a,
this);break;case 6:El.renderDrawableMask(a,this);break;case 7:yg.renderDrawableMask(a,this);break;case 8:Se.renderDrawableMask(a,this);break;case 9:aa.renderDrawableMask(a,this)}},__renderFilterPass:function(a,b,c,d){null==d&&(d=!0);if(null!=a&&null!=b&&null!=this.__defaultRenderTarget){var f=this.__context3D.__state.renderToTexture,g=this.__context3D.__state.renderToTextureDepthStencil,k=this.__context3D.__state.renderToTextureAntiAlias,l=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!=f?this.__context3D.setRenderToTexture(f,g,k,l):this.__context3D.setRenderToBackBuffer();this.__clearShader()}},__resize:function(a,b){this.__width=a;this.__height=b;a=null==this.__defaultRenderTarget?this.__stage.stageWidth:this.__defaultRenderTarget.width;b=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,c=Math.round(a*c.a+0*c.c+c.tx-this.__offsetX)):c=a;this.__displayWidth=c;null==this.__defaultRenderTarget?(c=this.__worldTransform,c=Math.round(0*c.b+b*c.d+c.ty-this.__offsetY)):c=b;this.__displayHeight=c;sa.createOrtho(this.__projection,0,this.__displayWidth+2*this.__offsetX,0,this.__displayHeight+2*this.__offsetY,-1E3,1E3);sa.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,f=0<a.height?Math.ceil(a.get_bottom())-c:0;this.__context3D.__backBufferWantsBestResolution&&(f=1.5/this.__pixelRatio,b=a.x/this.__pixelRatio,c=a.y/this.__pixelRatio,d=0<a.width?a.get_right()/this.__pixelRatio-b+f:0,f=0<a.height?a.get_bottom()/this.__pixelRatio-c+f:0);0>d&&(d=0);0>f&&(f=0);Cb.__scissorRectangle.setTo(b,c,d,f);this.__context3D.setScissorRectangle(Cb.__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},__suspendClipAndMask:function(){0<this.__stencilReference&&(this.__context3D.setStencilActions(),this.__context3D.setStencilReferenceValue(0,0,0));0<this.__numClipRects&&this.__scissorRect()},__updateShaderBuffer:function(a){null!=this.__currentShader&&null!=this.__currentShaderBuffer&&this.__currentShader.__updateFromBuffer(this.__currentShaderBuffer,
a)},__class__:Cb});var Hm=function(a){null==a&&(a=!1);this.fastCompression=a};h["openfl.display.PNGEncoderOptions"]=Hm;Hm.__name__="openfl.display.PNGEncoderOptions";Hm.prototype={fastCompression:null,__class__:Hm};var Gj=function(a){this.onComplete=new Zc;this.display=a;null!=a&&(a.addEventListener("unload",q(this,this.display_onUnload)),ha.get_current().addChild(a))};h["openfl.display.Preloader"]=Gj;Gj.__name__="openfl.display.Preloader";Gj.prototype={onComplete:null,complete:null,display:null,
ready:null,start:function(){this.ready=!0;ha.get_current().get_loaderInfo().__complete();if(null!=this.display){var a=new fa("complete",!0,!0);this.display.dispatchEvent(a);a.isDefaultPrevented()||this.display.dispatchEvent(new fa("unload"))}else this.complete||(this.complete=!0,this.onComplete.dispatch())},update:function(a,b){ha.get_current().get_loaderInfo().__update(a,b);null!=this.display&&this.display.dispatchEvent(new Qe("progress",!0,!0,a,b))},display_onUnload:function(a){null!=this.display&&
(this.display.removeEventListener("unload",q(this,this.display_onUnload)),this.display.parent==ha.get_current()&&ha.get_current().removeChild(this.display),ha.get_current().stage.set_focus(null),this.display=null);this.ready&&!this.complete&&(this.complete=!0,this.onComplete.dispatch())},__class__:Gj};var Fl=function(){Ka.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 Sg;
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 Sg;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=ha.getTimer()+100;this.endAnimation=this.startAnimation+
1E3;this.addEventListener("addedToStage",q(this,this.this_onAddedToStage))};h["openfl.display.DefaultPreloader"]=Fl;Fl.__name__="openfl.display.DefaultPreloader";Fl.__super__=Ka;Fl.prototype=x(Ka.prototype,{endAnimation:null,outline:null,progress:null,startAnimation:null,getBackgroundColor:function(){var a=ha.get_current().stage.window.context.attributes;return Object.prototype.hasOwnProperty.call(a,"background")&&null!=a.background?a.background:0},getHeight:function(){var a=ha.get_current().stage.window.__height;
return 0<a?a:ha.get_current().stage.stageHeight},getWidth:function(){var a=ha.get_current().stage.window.__width;return 0<a?a:ha.get_current().stage.stageWidth},onInit:function(){this.addEventListener("enterFrame",q(this,this.this_onEnterFrame))},onLoaded:function(){this.removeEventListener("enterFrame",q(this,this.this_onEnterFrame));this.dispatchEvent(new fa("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",
q(this,this.this_onAddedToStage));this.onInit();this.onUpdate(this.get_loaderInfo().bytesLoaded,this.get_loaderInfo().bytesTotal);this.addEventListener("progress",q(this,this.this_onProgress));this.addEventListener("complete",q(this,this.this_onComplete))},this_onComplete:function(a){a.preventDefault();this.removeEventListener("progress",q(this,this.this_onProgress));this.removeEventListener("complete",q(this,this.this_onComplete));this.onLoaded()},this_onEnterFrame:function(a){a=(ha.getTimer()-this.startAnimation)/
(this.endAnimation-this.startAnimation);0>a&&(a=0);1<a&&(a=1);this.outline.set_alpha(this.progress.set_alpha(a))},this_onProgress:function(a){this.onUpdate(a.bytesLoaded|0,a.bytesTotal|0)},__class__:Fl});var In=function(a,b,c){this.name=a;this.labels=b;this.numFrames=c};h["openfl.display.Scene"]=In;In.__name__="openfl.display.Scene";In.prototype={labels:null,name:null,numFrames:null,__class__:In};var Oo={_new:function(a){return{}}},Oj=function(){this.channels=0;this.filter=5;this.index=this.height=
0;this.mipFilter=2;this.wrap=this.width=0};h["openfl.display.ShaderInput"]=Oj;Oj.__name__="openfl.display.ShaderInput";Oj.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){0>b||a.setTextureAt(b,null)},__updateGL:function(a,b,c,d,f,g){c=null!=c?c:this.input;d=null!=d?d:this.filter;f=null!=f?f:this.mipFilter;g=null!=g?g:this.wrap;null!=c?(a.setTextureAt(b,c.getTexture(a)),a.setSamplerStateAt(b,
g,d,f)):a.setTextureAt(b,null)},__class__:Oj};var Qh=function(){this.index=0};h["openfl.display.ShaderParameter"]=Qh;Qh.__name__="openfl.display.ShaderParameter";Qh.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){if(!(0>this.index||(a=a.gl,this.__isUniform)))for(var b=0,c=this.__arrayLength;b<c;){var d=b++;a.disableVertexAttribArray(this.index+
d)}},__updateGL:function(a,b){if(!(0>this.index)){a=a.gl;b=null!=b?b:this.value;var c=this.__isBool?b:null,d=this.__isFloat?b:null,f=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,f[0]);break;case 9:a.uniform2i(this.index,f[0],f[1]);break;case 10:a.uniform3i(this.index,f[0],f[1],f[2]);break;case 11:a.uniform4i(this.index,f[0],f[1],f[2],f[3]);break;case 12:this.__uniformMatrix[0]=d[0];this.__uniformMatrix[1]=d[1];this.__uniformMatrix[2]=d[2];this.__uniformMatrix[3]=d[3];ec.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];ec.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],ec.uniformMatrix4fv(a,this.index,!1,this.__uniformMatrix)}else switch(this.type){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 1:case 9:a.uniform2i(this.index,0,0);break;case 2:case 10:a.uniform3i(this.index,0,0,0);break;case 3:case 11:a.uniform4i(this.index,0,0,0,0);break;case 12:this.__uniformMatrix[0]=0;this.__uniformMatrix[1]=0;this.__uniformMatrix[2]=0;this.__uniformMatrix[3]=0;ec.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;ec.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,ec.uniformMatrix4fv(a,this.index,!1,this.__uniformMatrix)}else if(this.__useArray||null!=b&&b.length!=this.__length)for(g=0,k=this.__arrayLength;g<k;)l=g++,a.enableVertexAttribArray(this.index+l);else{for(var g=0,k=this.__arrayLength;g<k;){var l=g++;a.disableVertexAttribArray(this.index+l)}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,f[0]);break;case 9:a.vertexAttrib2f(this.index,
f[0],f[1]);break;case 10:a.vertexAttrib3f(this.index,f[0],f[1],f[2]);break;case 11:a.vertexAttrib4f(this.index,f[0],f[1],f[2],f[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 0:case 4:case 8:a.vertexAttrib1f(this.index,0);break;case 1:case 5:case 9:a.vertexAttrib2f(this.index,0,0);break;case 2:case 6:case 10:a.vertexAttrib3f(this.index,0,0,0);break;case 3:case 7:case 11:a.vertexAttrib4f(this.index,0,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,f){if(!(0>this.index))if(a=a.gl,this.__isUniform){if(d>=this.__length)switch(this.type){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 1:case 9:a.uniform2i(this.index,b[c]|0,b[c+1]|0);break;case 2:case 10:a.uniform3i(this.index,b[c]|0,b[c+1]|0,b[c+2]|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 12:this.__uniformMatrix[0]=b[c];this.__uniformMatrix[1]=b[c+1];this.__uniformMatrix[2]=b[c+2];this.__uniformMatrix[3]=b[c+3];ec.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];ec.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],ec.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);g=0;for(k=
this.__arrayLength;g<k;)l=g++,a.enableVertexAttribArray(this.index+l);if(0<d)for(g=0,k=this.__arrayLength;g<k;)l=g++,a.vertexAttribPointer(this.index+l,this.__length,b,!1,4*this.__length,4*(c+f*this.__length+l*this.__arrayLength))}else{for(var g=0,k=this.__arrayLength;g<k;){var l=g++;a.disableVertexAttribArray(this.index+l)}if(0<d)switch(this.type){case 0:case 4:case 8:a.vertexAttrib1f(this.index,b[c]);break;case 1:case 5:case 9:a.vertexAttrib2f(this.index,b[c],b[c+1]);break;case 2:case 6:case 10:a.vertexAttrib3f(this.index,
b[c],b[c+1],b[c+2]);break;case 3:case 7:case 11:a.vertexAttrib4f(this.index,b[c],b[c+1],b[c+2],b[c+3]);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 0:case 4:case 8:a.vertexAttrib1f(this.index,0);break;case 1:case 5:case 9:a.vertexAttrib2f(this.index,0,0);break;case 2:case 6:case 10:a.vertexAttrib3f(this.index,0,0,0);break;case 3:case 7:case 11:a.vertexAttrib4f(this.index,0,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=O.startsWith(a,"openfl_");return this.name=a},__class__:Qh,__properties__:{set_name:"set_name"}};var Sg=function(){da.call(this);this.__drawableType=3};h["openfl.display.Shape"]=
Sg;Sg.__name__="openfl.display.Shape";Sg.__super__=da;Sg.prototype=x(da.prototype,{get_graphics:function(){null==this.__graphics&&(this.__graphics=new Vd(this));return this.__graphics},__class__:Sg,__properties__:x(da.prototype.__properties__,{get_graphics:"get_graphics"})});var Gh=function(a,b,c,d){Aa.call(this);this.__drawableType=6;this.enabled=!0;this.trackAsMenu=!1;this.useHandCursor=!0;this.__upState=null!=a?a:new da;this.__overState=b;this.__downState=c;this.set_hitTestState(null!=d?d:new da);
this.addEventListener("mouseDown",q(this,this.__this_onMouseDown));this.addEventListener("mouseOut",q(this,this.__this_onMouseOut));this.addEventListener("mouseOver",q(this,this.__this_onMouseOver));this.addEventListener("mouseUp",q(this,this.__this_onMouseUp));this.__tabEnabled=!0;this.set___currentState(this.__upState);null!=Gh.__constructor&&(a=Gh.__constructor,Gh.__constructor=null,a(this))};h["openfl.display.SimpleButton"]=Gh;Gh.__name__="openfl.display.SimpleButton";Gh.__constructor=null;Gh.__super__=
Aa;Gh.prototype=x(Aa.prototype,{enabled:null,trackAsMenu:null,useHandCursor:null,__currentState:null,__downState:null,__hitTestState:null,__ignoreEvent:null,__overState:null,__previousStates:null,__soundTransform:null,__upState:null,__getBounds:function(a,b){Aa.prototype.__getBounds.call(this,a,b);var c=wa.__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);wa.__pool.release(c)},__getRenderBounds:function(a,b){if(null!=this.__scrollRect)Aa.prototype.__getRenderBounds.call(this,a,b);else{Aa.prototype.__getBounds.call(this,a,b);var c=wa.__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);wa.__pool.release(c)}},__getCursor:function(){return this.useHandCursor&&!this.__ignoreEvent&&
this.enabled?"button":null},__hitTest:function(a,b,c,d,f,g){var k=!1;null!=this.get_hitTestState()?this.get_hitTestState().__hitTest(a,b,c,d,f,g)&&(null!=d&&(0==d.length?d[0]=g:d[d.length-1]=g),k=!f||this.mouseEnabled):null!=this.__currentState&&(!g.get_visible()||this.__isMask||f&&!this.mouseEnabled||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b)?k=!1:this.__currentState.__hitTest(a,b,c,d,f,g)&&(k=f));if(null!=d)for(;1<d.length&&d[d.length-1]==d[d.length-2];)d.pop();return k},__hitTestMask:function(a,
b){var c=!1;this.__currentState.__hitTestMask(a,b)&&(c=!0);return c},__setStageReference:function(a){Aa.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(){Aa.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){Aa.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){Aa.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 gf);return new gf(this.__soundTransform.volume,
this.__soundTransform.pan)},set_soundTransform:function(a){this.__soundTransform=new gf(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);da.__supportDOM&&
null==this.__previousStates&&(this.__previousStates=ia.toObjectVector(null));if(a!=this.__currentState){if(da.__supportDOM){null!=this.__currentState&&(this.__currentState.__setStageReference(null),this.__previousStates.push(this.__currentState));var b=this.__previousStates.indexOf(a,0);if(-1<b){var c=this.__previousStates;c.__tempIndex=b;b=0;for(var d=[];b<d.length;){var f=d[b++];c.insertAt(c.__tempIndex,f);c.__tempIndex++}c.splice(c.__tempIndex,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__:Gh,__properties__:x(Aa.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 ui=function(a,b){Ta.call(this);this.__drawableType=5;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 wa;this.__displayRect=new ea;this.__renderDirty=!0;this.stage3Ds=ia.toObjectVector(null);this.stage3Ds.push(new $g(this));this.stage3Ds.push(new $g(this));this.stage3Ds.push(new $g(this));this.stage3Ds.push(new $g(this));this.stage=this;this.align=6;this.allowsFullScreenInteractive=this.allowsFullScreen=!0;this.__quality=1;this.__scaleMode=2;this.showDefaultContextMenu=!0;this.softKeyboardRect=new ea;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 hc;null==ha.get_current().__loaderInfo&&(ha.get_current().__loaderInfo=Mf.create(null),ha.get_current().__loaderInfo.content=ha.get_current());this.__uncaughtErrorEvents=ha.get_current().__loaderInfo.uncaughtErrorEvents;this.application=a.application;this.window=
a;this.set_color(b);this.__contentsScaleFactor=a.__scale;this.__wasFullscreen=a.__fullscreen;this.__resize();null==ha.get_current().stage&&this.stage.addChild(ha.get_current())};h["openfl.display.Stage"]=ui;ui.__name__="openfl.display.Stage";ui.__interfaces__=[Kb];ui.__super__=Ta;ui.prototype=x(Ta.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,__lastClickTarget: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,__uncaughtErrorEvents:null,__wasDirty:null,__wasFullscreen:null,__primaryTouch:null,invalidate:function(){this.__renderDirty=
this.__invalidated=!0},localToGlobal:function(a){return a.clone()},__broadcastEvent:function(a){if(Object.prototype.hasOwnProperty.call(da.__broadcastEvents.h,a.type))for(var b=da.__broadcastEvents.h[a.type],c=0;c<b.length;){var d=b[c];++c;if(d.stage==this||null==d.stage)if(this.__uncaughtErrorEvents.__enabled)try{d.__dispatch(a)}catch(f){db.lastError=f,d=J.caught(f).unwrap(),this.__handleError(d)}else d.__dispatch(a)}},__createRenderer:function(){var a=this.window.__width*this.window.__scale|0,b=
this.window.__height*this.window.__scale|0;switch(this.window.context.type){case "canvas":this.__renderer=new pg(this.window.context.canvas2D);break;case "dom":this.__renderer=new qj(this.window.context.dom);break;case "opengl":case "opengles":case "webgl":this.context3D=new Ob(this),this.context3D.configureBackBuffer(this.stageWidth,this.stageHeight,0,!0,!0,!0),this.context3D.present(),this.__renderer=new Cb(this.context3D)}if(null!=this.__renderer){var c=this.get_quality();this.__renderer.__allowSmoothing=
2!=c;this.__renderer.__pixelRatio=this.window.__scale;this.__renderer.__worldTransform=this.__displayMatrix;this.__renderer.__stage=this;this.__renderer.__resize(a,b)}},__dispatchEvent:function(a){if(this.__uncaughtErrorEvents.__enabled)try{var b=Ta.prototype.__dispatchEvent.call(this,a)}catch(c){db.lastError=c,a=J.caught(c).unwrap(),this.__handleError(a),b=!1}else b=Ta.prototype.__dispatchEvent.call(this,a);return b},__dispatchPendingMouseEvent:function(){this.__pendingMouseEvent&&(this.__onMouse("mouseMove",
this.__pendingMouseX,this.__pendingMouseY,0),this.__pendingMouseEvent=!1)},__dispatchStack:function(a,b){if(this.__uncaughtErrorEvents.__enabled)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 f=0,g=c-1;f<g;){var k=f++;b[k].__dispatch(a);if(a.__isCanceled)return}a.eventPhase=2;d=a.target;d.__dispatch(a);if(!a.__isCanceled&&a.bubbles)for(a.eventPhase=3,k=c-2;0<=k;){b[k].__dispatch(a);if(a.__isCanceled)break;--k}}}catch(l){db.lastError=
l,a=J.caught(l).unwrap(),this.__handleError(a)}else if(c=b.length,0==c)a.eventPhase=2,d=a.target,d.__dispatch(a);else{a.eventPhase=1;a.target=b[b.length-1];f=0;for(g=c-1;f<g;)if(k=f++,b[k].__dispatch(a),a.__isCanceled)return;a.eventPhase=2;d=a.target;d.__dispatch(a);if(!a.__isCanceled&&a.bubbles)for(a.eventPhase=3,k=c-2;0<=k;){b[k].__dispatch(a);if(a.__isCanceled)break;--k}}},__dispatchTarget:function(a,b){if(this.__uncaughtErrorEvents.__enabled)try{return a.__dispatchEvent(b)}catch(c){return db.lastError=
c,a=J.caught(c).unwrap(),this.__handleError(a),!1}else return a.__dispatchEvent(b)},__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 Cg("uncaughtError",!0,!0,a);ha.get_current().__loaderInfo.uncaughtErrorEvents.dispatchEvent(b);if(!b.__preventDefault){b=$f.toString($f.exceptionStack());console.log(b);b=M.string(a);
console.log(b);try{if(null!=a&&Object.prototype.hasOwnProperty.call(a,"stack")&&null!=a.stack&&""!=a.stack)console.log(a.stack),a.stack=a.stack;else{var c=$f.toString($f.callStack());console.log(c)}}catch(d){db.lastError=d}throw a;}},__onKey:function(a,b,c){this.__dispatchPendingMouseEvent();vb.__altKey=Ra.get_altKey(c);vb.__commandKey=Ra.get_metaKey(c);vb.__controlKey=Ra.get_ctrlKey(c)&&!Ra.get_metaKey(c);vb.__ctrlKey=Ra.get_ctrlKey(c);vb.__shiftKey=Ra.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 f=3;break;case 1073742048:case 1073742049:case 1073742050:case 1073742051:f=1;break;case 1073742052:case 1073742053:case 1073742054:case 1073742055:f=
2;break;default:f=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 g=za.__getCharCode(b,Ra.get_shiftKey(c));if("keyUp"==a&&(32==b||13==b)&&this.__focus instanceof Ka){var k=na.__cast(this.__focus,
Ka);if(k.get_buttonMode()&&1==k.focusRect){var l=Ya.__pool.get(),m=Ya.__pool.get();m.x=this.__mouseX;m.y=this.__mouseY;k=vb.__create("click",0,0,this.__mouseX,this.__mouseY,k.__globalToLocal(m,l),k);this.__dispatchStack(k,d);k.__updateAfterEventFlag&&this.__renderAfterEvent();Ya.__pool.release(m);Ya.__pool.release(l)}}f=new Hh(a,!0,!0,g,b,f,this.__macKeyboard?Ra.get_ctrlKey(c)||Ra.get_metaKey(c):Ra.get_ctrlKey(c),Ra.get_altKey(c),Ra.get_shiftKey(c),Ra.get_ctrlKey(c),Ra.get_metaKey(c));d.reverse();
this.__dispatchStack(f,d);if(f.__preventDefault)"keyDown"==a?this.window.onKeyDown.cancel():this.window.onKeyUp.cancel();else if("keyDown"==a&&9==b){d=[];this.__tabTest(d);g=-1;a=null;b=Ra.get_shiftKey(c)?-1:1;if(1<d.length){pd.sort(d,function(a,b){return a.get_tabIndex()-b.get_tabIndex()});if(-1!=d[d.length-1].get_tabIndex())for(m=0;m<d.length;){if(-1<d[m].get_tabIndex()){0<m&&d.splice(0,m);break}++m}if(null!=this.get_focus()){m=this.get_focus();for(l=d.indexOf(m);-1==l&&null!=m;){g=m.parent;if(null!=
g&&g.get_tabChildren()){m=g.getChildIndex(m);if(-1==m){m=g;continue}for(m+=b;Ra.get_shiftKey(c)?0<=m:m<g.get_numChildren();){k=g.getChildAt(m);if(k instanceof Aa&&(l=na.__cast(k,Aa),l=d.indexOf(l),-1!=l)){b=0;break}m+=b}}else Ra.get_shiftKey(c)&&(l=d.indexOf(g),-1!=l&&(b=0));m=g}g=0>l?0:l+b}else g=this.__currentTabOrderIndex}else 1==d.length&&(a=d[0],this.get_focus()==a&&(a=null));l=0<=g&&g<d.length;1==d.length||0==d.length&&null!=this.get_focus()?g=0:1<d.length&&(0>g&&(g+=d.length),g%=d.length,a=
d[g],a==this.get_focus()&&(g+=b,0>g&&(g+=d.length),g%=d.length,a=d[g]));b=null;null!=this.get_focus()&&(b=new sf("keyFocusChange",!0,!0,a,Ra.get_shiftKey(c),0),d=[],this.get_focus().__getInteractive(d),d.reverse(),this.__dispatchStack(b,d),b.isDefaultPrevented()&&this.window.onKeyDown.cancel());null!=b&&b.isDefaultPrevented()||(this.__currentTabOrderIndex=g,null!=a&&this.set_focus(a),l&&this.window.onKeyDown.cancel())}else if("keyDown"==a&&null!=this.get_focus()&&!(this.get_focus()instanceof zd)&&
(this.__macKeyboard?Ra.get_ctrlKey(c)||Ra.get_metaKey(c):Ra.get_ctrlKey(c))&&!Ra.get_altKey(c)&&!Ra.get_shiftKey(c))switch(b){case 65:c=new fa("selectAll",!0,!0);this.get_focus().dispatchEvent(c);break;case 67:c=new fa("copy",!0,!0);this.get_focus().dispatchEvent(c);break;case 86:c=new fa("paste",!0,!0);this.get_focus().dispatchEvent(c);break;case 88:c=new fa("cut",!0,!0),this.get_focus().dispatchEvent(c)}f.__updateAfterEventFlag&&this.__renderAfterEvent()}},__onLimeCreateWindow:function(a){if(this.window==
a){var b=this;a.onActivate.add(function(){b.__onLimeWindowActivate(a)});var c=this;a.onClose.add(function(){c.__onLimeWindowClose(a)},!1,-9E3);var d=this;a.onDeactivate.add(function(){d.__onLimeWindowDeactivate(a)});var f=this;var g=function(b){f.__onLimeWindowDropFile(a,b)};a.onDropFile.add(g);var k=this;a.onEnter.add(function(){k.__onLimeWindowEnter(a)});var l=this;a.onExpose.add(function(){l.__onLimeWindowExpose(a)});var m=this;a.onFocusIn.add(function(){m.__onLimeWindowFocusIn(a)});var h=this;
a.onFocusOut.add(function(){h.__onLimeWindowFocusOut(a)});var r=this;a.onFullscreen.add(function(){r.__onLimeWindowFullscreen(a)});var p=this;g=function(b,c){p.__onLimeKeyDown(a,b,c)};a.onKeyDown.add(g);var w=this;g=function(b,c){w.__onLimeKeyUp(a,b,c)};a.onKeyUp.add(g);var u=this;a.onLeave.add(function(){u.__onLimeWindowLeave(a)});var n=this;a.onMinimize.add(function(){n.__onLimeWindowMinimize(a)});var t=this;g=function(b,c,d){t.__onLimeMouseDown(a,b,c,d)};a.onMouseDown.add(g);var A=this;g=function(b,
c){A.__onLimeMouseMove(a,b,c)};a.onMouseMove.add(g);var y=this;g=function(b,c){y.__onLimeMouseMoveRelative(a,b,c)};a.onMouseMoveRelative.add(g);var E=this;g=function(b,c,d){E.__onLimeMouseUp(a,b,c,d)};a.onMouseUp.add(g);var L=this;g=function(b,c,d){L.__onLimeMouseWheel(a,b,c,d)};a.onMouseWheel.add(g);var v=this;g=function(b,c){v.__onLimeWindowMove(a,b,c)};a.onMove.add(g);a.onRender.add(q(this,this.__onLimeRender));a.onRenderContextLost.add(q(this,this.__onLimeRenderContextLost));a.onRenderContextRestored.add(q(this,
this.__onLimeRenderContextRestored));var C=this;g=function(b,c){C.__onLimeWindowResize(a,b,c)};a.onResize.add(g);var x=this;a.onRestore.add(function(){x.__onLimeWindowRestore(a)});var G=this;g=function(b,c,d){G.__onLimeTextEdit(a,b,c,d)};a.onTextEdit.add(g);var Y=this;g=function(b){Y.__onLimeTextInput(a,b)};a.onTextInput.add(g);this.__onLimeWindowCreate(a)}},__onLimeGamepadAxisMove:function(a,b,c){if(this.__uncaughtErrorEvents.__enabled)try{Db.__onGamepadAxisMove(a,b,c)}catch(d){db.lastError=d,a=
J.caught(d).unwrap(),this.__handleError(a)}else Db.__onGamepadAxisMove(a,b,c)},__onLimeGamepadButtonDown:function(a,b){if(this.__uncaughtErrorEvents.__enabled)try{Db.__onGamepadButtonDown(a,b)}catch(c){db.lastError=c,a=J.caught(c).unwrap(),this.__handleError(a)}else Db.__onGamepadButtonDown(a,b)},__onLimeGamepadButtonUp:function(a,b){if(this.__uncaughtErrorEvents.__enabled)try{Db.__onGamepadButtonUp(a,b)}catch(c){db.lastError=c,a=J.caught(c).unwrap(),this.__handleError(a)}else Db.__onGamepadButtonUp(a,
b)},__onLimeGamepadConnect:function(a){if(this.__uncaughtErrorEvents.__enabled)try{Db.__onGamepadConnect(a)}catch(k){db.lastError=k;var b=J.caught(k).unwrap();this.__handleError(b)}else Db.__onGamepadConnect(a);var c=this;b=function(b,d){c.__onLimeGamepadAxisMove(a,b,d)};a.onAxisMove.add(b);var d=this;b=function(b){d.__onLimeGamepadButtonDown(a,b)};a.onButtonDown.add(b);var f=this;b=function(b){f.__onLimeGamepadButtonUp(a,b)};a.onButtonUp.add(b);var g=this;a.onDisconnect.add(function(){g.__onLimeGamepadDisconnect(a)})},
__onLimeGamepadDisconnect:function(a){if(this.__uncaughtErrorEvents.__enabled)try{Db.__onGamepadDisconnect(a)}catch(b){db.lastError=b,a=J.caught(b).unwrap(),this.__handleError(a)}else Db.__onGamepadDisconnect(a)},__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 fa("deactivate"),this.__broadcastEvent(a))},
__onLimeMouseDown:function(a,b,c,d){if(null!=this.window&&this.window==a){this.__dispatchPendingMouseEvent();switch(d){case 1:var f="middleMouseDown";break;case 2:f="rightMouseDown";break;default:f="mouseDown"}this.__onMouse(f,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 f="middleMouseUp";break;case 2:f="rightMouseUp";break;default:f="mouseUp"}this.__onMouse(f,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==Wg.PIXELS?this.__onMouseWheel(b*a.__scale|0,c*a.__scale|0,d):this.__onMouseWheel(b|
0,c|0,d))},__renderAfterEvent:function(){this.__render(this.window.context)},__render:function(a){a=!1;var b=null!=this.__renderer&&(this.__renderDirty||this.__forceRender);if(this.__invalidated&&b){this.__invalidated=!1;var c=new fa("render");this.__broadcastEvent(c)}this.__update(!1,!0);if(null!=this.__renderer){if(null!=this.context3D){for(c=this.stage3Ds.iterator();c.hasNext();){var d=c.next();this.context3D.__renderStage3D(d)}this.context3D.__present&&(b=!0)}b?(null==this.context3D&&this.__renderer.__clear(),
this.__renderer.__render(this)):null==this.context3D&&(a=!0);null!=this.context3D&&(this.context3D.__present?(this.__renderer.__cleared||this.__renderer.__clear(),this.context3D.__present=!1,this.context3D.__cleared=!1):a=!0);this.__renderer.__cleared=!1}return a},__onLimeRender:function(a){this.__rendering||(this.__rendering=!0,this.__broadcastEvent(new fa("enterFrame")),this.__broadcastEvent(new fa("frameConstructed")),this.__broadcastEvent(new fa("exitFrame")),this.__renderable=!0,this.__enterFrame(this.__deltaTime),
this.__deltaTime=0,this.__render(a)&&this.window.onRender.cancel(),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 fe("textInput",!0,!0,b);0<c.length?(c.reverse(),this.__dispatchStack(b,c)):this.__dispatchEvent(b);b.isDefaultPrevented()&&a.onTextInput.cancel()}},__onLimeTouchCancel:function(a){var b=this.__primaryTouch==a;b&&(this.__primaryTouch=null);this.__onTouch("touchEnd",a,b)},__onLimeTouchMove:function(a){this.__onTouch("touchMove",a,this.__primaryTouch==a)},__onLimeTouchEnd:function(a){var b=this.__primaryTouch==a;b&&(this.__primaryTouch=
null);this.__onTouch("touchEnd",a,b)},__onLimeTouchStart:function(a){null==this.__primaryTouch&&(this.__primaryTouch=a);this.__onTouch("touchBegin",a,this.__primaryTouch==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 fa("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 fa("activate"),this.__broadcastEvent(a),this.set_focus(this.__cacheFocus))},__onLimeWindowFocusOut:function(a){null!=this.window&&this.window==a&&(this.__primaryTouch=
null,a=new fa("deactivate"),this.__broadcastEvent(a),a=this.get_focus(),this.set_focus(null),this.__cacheFocus=a,vb.__altKey=!1,vb.__commandKey=!1,vb.__ctrlKey=!1,vb.__shiftKey=!1)},__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 uf("fullScreen",!1,!1,!0,!0))))},__onLimeWindowLeave:function(a){null==this.window||this.window!=a||vb.__buttonDown||
(this.__dispatchPendingMouseEvent(),a=new fa("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 uf("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 uf("fullScreen",!1,!1,!1,!0)))},__onMouse:function(a,b,c,d){if(!(2<d)){var f=Ya.__pool.get();f.setTo(b,c);b=this.__displayMatrix;c=b.a*b.d-b.b*b.c;if(0==c)f.x=-b.tx,f.y=-b.ty;else{var g=1/c*(b.c*(b.ty-f.y)+b.d*(f.x-b.tx));f.y=1/c*(b.a*(f.y-b.ty)+b.b*(b.tx-f.x));f.x=g}this.__mouseX=f.x;this.__mouseY=f.y;b=[];this.__hitTest(this.__mouseX,this.__mouseY,!0,b,!0,this)?g=b[b.length-1]:(g=this,b=[this]);null==g&&(g=this);var k=null,l=!1;switch(a){case "middleMouseDown":this.__mouseDownMiddle=
g;l=!0;break;case "middleMouseUp":this.__mouseDownMiddle==g&&(k="middleClick");this.__mouseDownMiddle=null;l=!0;break;case "mouseDown":null!=this.get_focus()?this.get_focus()!=g&&(c=new sf("mouseFocusChange",!0,!0,g,!1,0),this.get_focus().dispatchEvent(c),c.isDefaultPrevented()||(g.__allowMouseFocus()?this.set_focus(g):this.set_focus(null))):g.__allowMouseFocus()?this.set_focus(g):this.set_focus(null);this.__mouseDownLeft=g;this.__lastClickTarget!=g&&(this.__lastClickTarget=null,this.__lastClickTime=
0);l=vb.__buttonDown=!0;break;case "mouseUp":null!=this.__mouseDownLeft&&(vb.__buttonDown=!1,this.__mouseDownLeft==g?k="click":(l=vb.__create("releaseOutside",1,0,this.__mouseX,this.__mouseY,new Ya(this.__mouseX,this.__mouseY),this),this.__mouseDownLeft.dispatchEvent(l)),this.__mouseDownLeft=null);l=!0;break;case "rightMouseDown":this.__mouseDownRight=g;l=!0;break;case "rightMouseUp":this.__mouseDownRight==g&&(k="rightClick"),this.__mouseDownRight=null,l=!0}c=Ya.__pool.get();l=vb.__create(a,d,l?this.window.clickCount:
0,this.__mouseX,this.__mouseY,g.__globalToLocal(f,c),g);this.__dispatchStack(l,b);l.__updateAfterEventFlag&&this.__renderAfterEvent();null!=k&&(l=vb.__create(k,d,0,this.__mouseX,this.__mouseY,g.__globalToLocal(f,c),g),this.__dispatchStack(l,b),l.__updateAfterEventFlag&&this.__renderAfterEvent(),"mouseUp"==a&&(g.doubleClickEnabled?(a=ha.getTimer(),500>a-this.__lastClickTime&&g==this.__lastClickTarget?(l=vb.__create("doubleClick",d,0,this.__mouseX,this.__mouseY,g.__globalToLocal(f,c),g),this.__dispatchStack(l,
b),l.__updateAfterEventFlag&&this.__renderAfterEvent(),this.__lastClickTime=0,this.__lastClickTarget=null):(this.__lastClickTarget=g,this.__lastClickTime=a)):(this.__lastClickTarget=null,this.__lastClickTime=0)));if("auto"==Kc.__cursor&&!Kc.__hidden){l=null;if(null!=this.__mouseDownLeft)l=this.__mouseDownLeft.__getCursor();else for(a=0;a<b.length;)if(l=b[a],++a,l=l.__getCursor(),null!=l&&null!=this.window){this.window.set_cursor(Te.toLimeCursor(l));break}null==l&&null!=this.window&&this.window.set_cursor(dc.ARROW)}g!=
this.__mouseOverTarget&&null!=this.__mouseOverTarget&&(l=vb.__create("mouseOut",d,0,this.__mouseX,this.__mouseY,this.__mouseOverTarget.__globalToLocal(f,c),this.__mouseOverTarget),this.__dispatchStack(l,this.__mouseOutStack),l.__updateAfterEventFlag&&this.__renderAfterEvent());for(a=0;a<this.__rollOutStack.length;)k=this.__rollOutStack[a],-1==b.indexOf(k)?(y.remove(this.__rollOutStack,k),l=vb.__create("rollOut",d,0,this.__mouseX,this.__mouseY,this.__mouseOverTarget.__globalToLocal(f,c),k),l.bubbles=
!1,this.__dispatchTarget(k,l),l.__updateAfterEventFlag&&this.__renderAfterEvent()):++a;for(a=0;a<b.length;)k=b[a],++a,-1==this.__rollOutStack.indexOf(k)&&null!=this.__mouseOverTarget&&(k.hasEventListener("rollOver")&&(l=vb.__create("rollOver",d,0,this.__mouseX,this.__mouseY,this.__mouseOverTarget.__globalToLocal(f,c),k),l.bubbles=!1,this.__dispatchTarget(k,l),l.__updateAfterEventFlag&&this.__renderAfterEvent()),(k.hasEventListener("rollOut")||k.hasEventListener("rollOver"))&&this.__rollOutStack.push(k));
g!=this.__mouseOverTarget&&(null!=g&&(l=vb.__create("mouseOver",d,0,this.__mouseX,this.__mouseY,g.__globalToLocal(f,c),g),this.__dispatchStack(l,b),l.__updateAfterEventFlag&&this.__renderAfterEvent()),this.__mouseOverTarget=g,this.__mouseOutStack=b);null!=this.__dragObject&&(this.__drag(f),d=null,this.__mouseOverTarget==this.__dragObject?(g=this.__dragObject.mouseEnabled,a=this.__dragObject.mouseChildren,this.__dragObject.mouseEnabled=!1,this.__dragObject.mouseChildren=!1,b=[],this.__hitTest(this.__mouseX,
this.__mouseY,!0,b,!0,this)&&(d=b[b.length-1]),this.__dragObject.mouseEnabled=g,this.__dragObject.mouseChildren=a):this.__mouseOverTarget!=this&&(d=this.__mouseOverTarget),this.__dragObject.dropTarget=d);Ya.__pool.release(f);Ya.__pool.release(c)}},__onMouseWheel:function(a,b,c){var d=this.__mouseX,f=this.__mouseY;a=[];if(this.__hitTest(this.__mouseX,this.__mouseY,!0,a,!0,this))var g=a[a.length-1];else g=this,a=[this];null==g&&(g=this);c=Ya.__pool.get();c.setTo(d,f);d=this.__displayMatrix;f=d.a*d.d-
d.b*d.c;if(0==f)c.x=-d.tx,c.y=-d.ty;else{var k=1/f*(d.c*(d.ty-c.y)+d.d*(c.x-d.tx));c.y=1/f*(d.a*(c.y-d.ty)+d.b*(d.tx-c.x));c.x=k}b|=0;b=vb.__create("mouseWheel",0,0,this.__mouseX,this.__mouseY,g.__globalToLocal(c,c),g,b);b.cancelable=!0;this.__dispatchStack(b,a);b.isDefaultPrevented()&&this.window.onMouseWheel.cancel();b.__updateAfterEventFlag&&this.__renderAfterEvent();Ya.__pool.release(c)},__onTouch:function(a,b,c){var d=Ya.__pool.get();d.setTo(Math.round(b.x*this.window.__width*this.window.__scale),
Math.round(b.y*this.window.__height*this.window.__scale));var f=this.__displayMatrix,g=f.a*f.d-f.b*f.c;if(0==g)d.x=-f.tx,d.y=-f.ty;else{var k=1/g*(f.c*(f.ty-d.y)+f.d*(d.x-f.tx));d.y=1/g*(f.a*(d.y-f.ty)+f.b*(f.tx-d.x));d.x=k}f=d.x;g=d.y;k=[];if(this.__hitTest(f,g,!1,k,!0,this))var l=k[k.length-1];else l=this,k=[this];null==l&&(l=this);var m=b.id;if(this.__touchData.h.hasOwnProperty(m))var h=this.__touchData.h[m];else h=Ih.__pool.get(),h.reset(),h.touch=b,this.__touchData.h[m]=h;var r=null,p=!1;switch(a){case "touchBegin":h.touchDownTarget=
l;break;case "touchEnd":h.touchDownTarget==l&&(r="touchTap"),h.touchDownTarget=null,p=!0}var w=Ya.__pool.get();a=wd.__create(a,null,f,g,l.__globalToLocal(d,w),l);a.touchPointID=m;a.isPrimaryTouchPoint=c;a.pressure=b.pressure;this.__dispatchStack(a,k);a.__updateAfterEventFlag&&this.__renderAfterEvent();null!=r&&(a=wd.__create(r,null,f,g,l.__globalToLocal(d,w),l),a.touchPointID=m,a.isPrimaryTouchPoint=c,a.pressure=b.pressure,this.__dispatchStack(a,k),a.__updateAfterEventFlag&&this.__renderAfterEvent());
r=h.touchOverTarget;l!=r&&null!=r&&(a=wd.__create("touchOut",null,f,g,r.__globalToLocal(d,w),r),a.touchPointID=m,a.isPrimaryTouchPoint=c,a.pressure=b.pressure,this.__dispatchTarget(r,a),a.__updateAfterEventFlag&&this.__renderAfterEvent());for(var u=h.rollOutStack,n,t=0;t<u.length;)n=u[t],-1==k.indexOf(n)?(y.remove(u,n),a=wd.__create("touchRollOut",null,f,g,r.__globalToLocal(d,w),r),a.touchPointID=m,a.isPrimaryTouchPoint=c,a.bubbles=!1,a.pressure=b.pressure,this.__dispatchTarget(n,a),a.__updateAfterEventFlag&&
this.__renderAfterEvent()):++t;for(t=0;t<k.length;)n=k[t],++t,-1==u.indexOf(n)&&(n.hasEventListener("touchRollOver")&&(a=wd.__create("touchRollOver",null,f,g,r.__globalToLocal(d,w),n),a.touchPointID=m,a.isPrimaryTouchPoint=c,a.bubbles=!1,a.pressure=b.pressure,this.__dispatchTarget(n,a),a.__updateAfterEventFlag&&this.__renderAfterEvent()),n.hasEventListener("touchRollOut")&&u.push(n));l!=r&&(null!=l&&(a=wd.__create("touchOver",null,f,g,l.__globalToLocal(d,w),l),a.touchPointID=m,a.isPrimaryTouchPoint=
c,a.bubbles=!0,a.pressure=b.pressure,this.__dispatchTarget(l,a),a.__updateAfterEventFlag&&this.__renderAfterEvent()),h.touchOverTarget=l);Ya.__pool.release(d);Ya.__pool.release(w);p&&(this.__touchData.remove(m),h.reset(),Ih.__pool.release(h))},__registerLimeModule:function(a){a.onCreateWindow.add(q(this,this.__onLimeCreateWindow));a.onUpdate.add(q(this,this.__onLimeUpdate));a.onExit.add(q(this,this.__onLimeModuleExit),!1,0);for(a=$c.devices.iterator();a.hasNext();){var b=a.next();this.__onLimeGamepadConnect(b)}$c.onConnect.add(q(this,
this.__onLimeGamepadConnect));Nc.onStart.add(q(this,this.__onLimeTouchStart));Nc.onMove.add(q(this,this.__onLimeTouchMove));Nc.onEnd.add(q(this,this.__onLimeTouchEnd));Nc.onCancel.add(q(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.__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 f=c/this.stageWidth,g=d/this.stageHeight;this.__displayMatrix.translate(-this.get_fullScreenSourceRect().x,-this.get_fullScreenSourceRect().y);this.__displayMatrix.scale(f,g);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||2==this.get_scaleMode()||
0==c||0==d)this.stageWidth=Math.round(c/this.window.__scale),this.stageHeight=Math.round(d/this.window.__scale),this.__displayMatrix.scale(this.window.__scale,this.window.__scale),this.__displayRect.setTo(0,0,this.stageWidth,this.stageHeight);else switch(this.stageWidth=this.__logicalWidth,this.stageHeight=this.__logicalHeight,this.get_scaleMode()){case 0:f=c/this.stageWidth;g=d/this.stageHeight;this.__displayMatrix.scale(f,g);this.__displayRect.setTo(0,0,this.stageWidth,this.stageHeight);break;case 1:f=
c/this.stageWidth;g=d/this.stageHeight;f=Math.max(f,g);g=this.stageWidth*f;var k=this.stageHeight*f;g=this.stageWidth-Math.round((g-c)/f);k=this.stageHeight-Math.round((k-d)/f);var l=Math.round((this.stageWidth-g)/2),m=Math.round((this.stageHeight-k)/2);this.__displayMatrix.translate(-l,-m);this.__displayMatrix.scale(f,f);this.__displayRect.setTo(l,m,g,k);break;default:f=c/this.stageWidth,g=d/this.stageHeight,f=Math.min(f,g),g=this.stageWidth*f,k=this.stageHeight*f,g=this.stageWidth-Math.round((g-
c)/f),k=this.stageHeight-Math.round((k-d)/f),l=Math.round((this.stageWidth-g)/2),m=Math.round((this.stageHeight-k)/2),this.__displayMatrix.translate(-l,-m),this.__displayMatrix.scale(f,f),this.__displayRect.setTo(l,m,g,k)}null!=this.context3D&&this.context3D.configureBackBuffer(this.stageWidth,this.stageHeight,0,!0,!0,!0);for(f=this.stage3Ds.iterator();f.hasNext();)f.next().__resize(c,d);null!=this.__renderer&&this.__renderer.__resize(c,d);this.__renderDirty=!0;if(this.stageWidth!=a||this.stageHeight!=
b)this.__setTransformDirty(),a=new fa("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 ea;var d=c.get_right(),f=c.get_bottom();this.__dragBounds.x=d<c.x?d:c.x;this.__dragBounds.y=f<c.y?f: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=Ya.__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,Ya.__pool.release(a)))},__stopDrag:function(a){this.__dragObject=this.__dragBounds=null},__unregisterLimeModule:function(a){a.onCreateWindow.remove(q(this,
this.__onLimeCreateWindow));a.onUpdate.remove(q(this,this.__onLimeUpdate));a.onExit.remove(q(this,this.__onLimeModuleExit));$c.onConnect.remove(q(this,this.__onLimeGamepadConnect));Nc.onStart.remove(q(this,this.__onLimeTouchStart));Nc.onMove.remove(q(this,this.__onLimeTouchMove));Nc.onEnd.remove(q(this,this.__onLimeTouchEnd));Nc.onCancel.remove(q(this,this.__onLimeTouchCancel))},__update:function(a,b){a?this.__transformDirty&&(Ta.prototype.__update.call(this,!0,b),b&&(this.__transformDirty=!1)):this.__transformDirty||
this.__renderDirty?(Ta.prototype.__update.call(this,!1,b),b&&da.__supportDOM&&(this.__wasDirty=!0)):!this.__renderDirty&&this.__wasDirty&&(Ta.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="#"+O.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||null==a&&null!=this.__cacheFocus){var b=
this.__focus;this.__cacheFocus=this.__focus=a;if(null!=b){var c=new sf("focusOut",!0,!1,a,!1,0),d=[];b.__getInteractive(d);d.reverse();this.__dispatchStack(c,d)}null!=a&&(c=new sf("focusIn",!0,!1,b,!1,0),d=[],a.__getInteractive(d),d.reverse(),this.__dispatchStack(c,d))}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){a!=this.__scaleMode&&(this.__scaleMode=a,this.__resize());return a},set_scaleX:function(a){return 0},set_scaleY:function(a){return 0},
get_tabEnabled:function(){return!1},set_tabEnabled:function(a){throw new Lc("Error: The Stage class does not implement this property or method.");},get_tabIndex:function(){return-1},set_tabIndex:function(a){throw new Lc("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__:ui,__properties__:x(Ta.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 $g=function(a){Da.call(this);this.__stage=a;this.__height=0;this.__projectionTransform=new jd;this.__renderTransform=new jd;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"]=$g;$g.__name__="openfl.display.Stage3D";$g.__active=null;$g.__super__=Da;$g.prototype=x(Da.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,Sc.delay(q(this,this.__dispatchCreate),1)):this.__contextRequested||(this.__contextRequested=!0,Sc.delay(q(this,this.__createContext),1))},requestContext3DMatchingProfiles:function(a){this.requestContext3D()},
__createContext:function(){var a=this.__stage,b=a.__renderer;if("cairo"==b.__type||"canvas"==b.__type)this.__dispatchError();else if("opengl"==b.__type)this.context3D=new Ob(a,a.context3D.__contextState,this),this.__dispatchCreate();else if("dom"==b.__type)if(null==a.context3D){this.__canvas=window.document.createElement("canvas");this.__canvas.width=a.stageWidth;this.__canvas.height=a.stageHeight;var c=a.window.context.attributes,d=Object.prototype.hasOwnProperty.call(c,"background")&&null==c.background,
f=Object.prototype.hasOwnProperty.call(c,"colorDepth")?c.colorDepth:32;c=Object.prototype.hasOwnProperty.call(c,"antialiasing")&&0<c.antialiasing;this.__webgl=eo.getContextWebGL(this.__canvas,{alpha:d||16<f,antialias:c,depth:!0,premultipliedAlpha:!0,stencil:!0,preserveDrawingBuffer:!1});null!=this.__webgl&&(null==r.context&&(r.context=this.__webgl,r.type="webgl",r.version=1),a.context3D=new Ob(a),a.context3D.configureBackBuffer(a.window.__width,a.window.__height,0,!0,!0,!0),a.context3D.present(),
b.element.appendChild(this.__canvas),this.__style=this.__canvas.style,this.__style.setProperty("position","absolute",null),this.__style.setProperty("top","0",null),this.__style.setProperty("left","0",null),this.__style.setProperty(b.__transformOriginProperty,"0 0 0",null),this.__style.setProperty("z-index","-1",null));null!=a.context3D&&(this.context3D=new Ob(a,a.context3D.__contextState,this));this.__dispatchCreate()}else this.__dispatchError()},__dispatchError:function(){this.__contextRequested=
!1;this.dispatchEvent(new ie("error",!1,!1,"Context3D not available"))},__dispatchCreate:function(){this.__contextRequested&&(this.__contextRequested=!1,this.dispatchEvent(new fa("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(ia.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__:$g,__properties__:{set_y:"set_y",get_y:"get_y",set_x:"set_x",get_x:"get_x"}});var ah=function(a,b,c,d,f,g,k,l){null==l&&(l=0);null==k&&(k=0);null==g&&(g=0);null==
f&&(f=1);null==d&&(d=1);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.__id=a;this.__matrix=new wa;0!=b&&this.set_x(b);0!=c&&this.set_y(c);1!=d&&this.set_scaleX(d);1!=f&&this.set_scaleY(f);0!=g&&this.set_rotation(g);this.__dirty=!0;this.__length=0;this.__originX=k;this.__originY=l;this.__alpha=1;this.__blendMode=null;this.__visible=!0};h["openfl.display.Tile"]=ah;ah.__name__="openfl.display.Tile";ah.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 ah(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 ea;this.__findTileRect(b);var c=wa.__pool.get();if(null!=a&&a!=this){c.copyFrom(this.__getWorldTransform());var d=wa.__pool.get();d.copyFrom(a.__getWorldTransform());d.invert();c.concat(d);wa.__pool.release(d)}else c.identity();this.__getBounds(b,c);wa.__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 tj?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=ea.__pool.get();this.__findTileRect(a);this.__getBounds(a,this.get_matrix());var b=a.height;ea.__pool.release(a);return b},set_height:function(a){var b=ea.__pool.get();this.__findTileRect(b);0!=
b.height&&this.set_scaleY(a/b.height);ea.__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=ea.__pool.get();this.__findTileRect(a);this.__getBounds(a,this.get_matrix());var b=a.width;ea.__pool.release(a);return b},set_width:function(a){var b=ea.__pool.get();this.__findTileRect(b);0!=
b.width&&this.set_scaleX(a/b.width);ea.__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__:ah,__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 vi=function(a,b,c,d,f,g,k){null==k&&(k=0);null==g&&(g=0);null==f&&(f=0);null==d&&(d=1);null==c&&(c=1);null==b&&(b=0);null==a&&(a=0);ah.call(this,-1,a,b,c,d,f,g,k);this.__tiles=[];this.__length=0};h["openfl.display.TileContainer"]=vi;vi.__name__="openfl.display.TileContainer";vi.__interfaces__=[sj];vi.__super__=
ah;vi.prototype=x(ah.prototype,{__tiles:null,addTile:function(a){if(null==a)return null;a.parent==this&&(y.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&&(y.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 vi,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 ea,c,d=0,f=this.__tiles;d<f.length;)c=f[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,y.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&&(y.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=ea.__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;ea.__pool.release(a);return c},set_height:function(a){for(var b=ea.__pool.get(),c,d=0,f=this.__tiles;d<f.length;)c=f[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);
ea.__pool.release(b);return a},get_width:function(){for(var a=ea.__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;ea.__pool.release(a);return c},set_width:function(a){for(var b=ea.__pool.get(),c,d=0,f=this.__tiles;d<f.length;)c=f[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);ea.__pool.release(b);return a},__class__:vi,__properties__:x(ah.prototype.__properties__,
{get_numTiles:"get_numTiles"})});var tj=function(a,b,c,d){null==d&&(d=!0);da.call(this);this.__drawableType=9;this.__tileset=c;this.smoothing=d;this.tileColorTransformEnabled=this.tileBlendModeEnabled=this.tileAlphaEnabled=!0;this.__group=new vi;this.__group.set_tileset(c);this.__width=a;this.__height=b};h["openfl.display.Tilemap"]=tj;tj.__name__="openfl.display.Tilemap";tj.__interfaces__=[sj];tj.__super__=da;tj.prototype=x(da.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(c=a.__tiles;b<c.length;)d=c[b],++b,this.addTile(d)},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=ea.__pool.get();c.setTo(0,0,this.__width,this.__height);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);ea.__pool.release(c)},__hitTest:function(a,b,c,d,f,g){if(!g.get_visible()||this.__isMask||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b))return!1;this.__getRenderTransform();var k=this.__renderTransform,
l=k.a*k.d-k.b*k.c;c=0==l?-k.tx:1/l*(k.c*(k.ty-b)+k.d*(a-k.tx));k=this.__renderTransform;l=k.a*k.d-k.b*k.c;a=0==l?-k.ty:1/l*(k.a*(b-k.ty)+k.b*(k.tx-a));return 0<c&&0<a&&c<=this.__width&&a<=this.__height?(null==d||f||d.push(g),!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__:tj,__properties__:x(da.prototype.__properties__,{set_tileset:"set_tileset",get_tileset:"get_tileset",get_numTiles:"get_numTiles"})});var Jn=function(a,
b){this.__bitmapData=a;this.rectData=ia.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"]=Jn;Jn.__name__="openfl.display.Tileset";Jn.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 Gl(a);a.__update(this.__bitmapData);this.__data.push(a);return this.__data.length-1},
clone:function(){for(var a=new Jn(this.__bitmapData,null),b=ea.__pool.get(),c=0,d=this.__data;c<d.length;){var f=d[c];++c;b.setTo(f.x,f.y,f.width,f.height);a.addRect(b)}ea.__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 ea(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 f=c++;b=this.__data[f];if(a.x==b.x&&a.y==b.y&&a.width==b.width&&a.height==b.height)return f}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__:Jn,__properties__:{get_numRects:"get_numRects",set_bitmapData:"set_bitmapData",get_bitmapData:"get_bitmapData"}};
var Gl=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.TileData"]=Gl;Gl.__name__="openfl.display.TileData";Gl.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__:Gl};var zo=function(){this.__totalFrames=
this.__framesLoaded=1;this.__currentLabels=[];this.__currentFrame=1;this.__lastFrameUpdate=this.__lastFrameScriptEval=-1};h["openfl.display.Timeline"]=zo;zo.__name__="openfl.display.Timeline";zo.prototype={frameRate:null,scenes:null,scripts:null,__currentFrame:null,__currentFrameLabel:null,__currentLabel:null,__currentLabels:null,__currentScene:null,__frameScripts:null,__framesLoaded:null,__frameTime:null,__isPlaying:null,__lastFrameScriptEval:null,__lastFrameUpdate:null,__scope:null,__timeElapsed:null,
__totalFrames:null,attachMovieClip:function(a){},enterFrame:function(a){},initializeSprite:function(a){},__addFrameScript:function(a,b){0>a||(a+=1,null!=b?(null==this.__frameScripts&&(this.__frameScripts=new hc),this.__frameScripts.h[a]=function(a){b()}):null!=this.__frameScripts&&this.__frameScripts.remove(a))},__attachMovieClip:function(a){this.__scope=a;this.__framesLoaded=this.__totalFrames=0;if(null!=this.scenes&&0<this.scenes.length){for(var b=0,c=this.scenes;b<c.length;){var d=c[b];++b;this.__totalFrames+=
d.numFrames;this.__framesLoaded+=d.numFrames;null!=d.labels&&(this.__currentLabels=this.__currentLabels.concat(d.labels))}this.__currentScene=this.scenes[0]}if(null!=this.scripts&&0<this.scripts.length)for(this.__frameScripts=new hc,b=0,c=this.scripts;b<c.length;)d=c[b],++b,this.__frameScripts.h.hasOwnProperty(d.frame)?this.__frameScripts.h[d.frame]=function(a,b){return function(c){b[0](c);a[0](c)}}([d.script],[this.__frameScripts.h[d.frame]]):this.__frameScripts.h[d.frame]=d.script;this.attachMovieClip(a)},
__enterFrame:function(a){if(this.__isPlaying){a=this.__getNextFrame(a);if(this.__lastFrameScriptEval==a)return;if(null!=this.__frameScripts){if(a<this.__currentFrame){if(!this.__evaluateFrameScripts(this.__totalFrames))return;this.__currentFrame=1}if(!this.__evaluateFrameScripts(a))return}else this.__currentFrame=a}this.__updateSymbol(this.__currentFrame)},__evaluateFrameScripts:function(a){if(null==this.__frameScripts)return!0;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.__scope),this.__currentFrame!=c)||!this.__isPlaying))return!1}return!0},__getNextFrame:function(a){null!=this.frameRate?(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):(a=this.__currentFrame+1,
a>this.__totalFrames&&(a=1));return a},__goto:function(a){1>a?a=1:a>this.__totalFrames&&(a=this.__totalFrames);this.__lastFrameScriptEval=-1;this.__currentFrame=a;this.__updateSymbol(this.__currentFrame);this.__evaluateFrameScripts(this.__currentFrame)},__gotoAndPlay:function(a,b){this.__play();this.__goto(this.__resolveFrameReference(a))},__gotoAndStop:function(a,b){this.__stop();this.__goto(this.__resolveFrameReference(a))},__nextFrame:function(){this.__stop();this.__goto(this.__currentFrame+1)},
__nextScene:function(){},__play:function(){this.__isPlaying||2>this.__totalFrames||(this.__isPlaying=!0,null!=this.frameRate&&(this.__frameTime=1E3/this.frameRate|0,this.__timeElapsed=0))},__prevFrame:function(){this.__stop();this.__goto(this.__currentFrame-1)},__prevScene:function(){},__stop:function(){this.__isPlaying=!1},__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.name==
a)return d.frame}throw new Eg("Error #2109: Frame label "+a+" not found in scene.");}throw J.thrown("Invalid type for frame "+a.__name__);},__updateFrameLabel:function(){this.__currentFrameLabel=this.__currentLabel=null;for(var a=0,b=this.__currentLabels;a<b.length;){var c=b[a];++a;if(c.frame<this.__currentFrame)this.__currentLabel=c.name;else if(c.frame==this.__currentFrame)this.__currentFrameLabel=this.__currentLabel=c.name;else break}},__updateSymbol:function(a){this.__currentFrame!=this.__lastFrameUpdate&&
(this.__updateFrameLabel(),this.enterFrame(a),this.__lastFrameUpdate=this.__currentFrame)},__class__:zo};var pj=function(a,b){eh.call(this,a,b);this.stage=new ui(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){db.lastError=c}this.stage.__setLogicalSize(b.width,b.height);Object.prototype.hasOwnProperty.call(b,"resizable")&&!b.resizable&&
this.stage.set_scaleMode(3);a.addModule(this.stage)};h["openfl.display.Window"]=pj;pj.__name__="openfl.display.Window";pj.__super__=eh;pj.prototype=x(eh.prototype,{close:function(){eh.prototype.close.call(this);this.onClose.canceled||null==this.stage||(this.application.removeModule(this.stage),this.stage=null)},__class__:pj});var wi=function(a,b,c,d,f,g,k){null==k&&(k=.05);null==g&&(g=!1);this.stitch=g;this.stitch_threshold=k;this.octaves=b;this.channels=c;this.grayscale=d;this.calculateOctaves(f)};
h["openfl.display._internal.AbstractNoise"]=wi;wi.__name__="openfl.display._internal.AbstractNoise";wi.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,f,g,k,l){var m=b>>16&255,h=b>>8&255;b&=255;if(k-f<c){var r=a.getPixel32(k-c,d),p=r>>8&255,w=r&255;f=(k-c)/f;m=this.mixI(r>>16&255,m,f);h=this.mixI(p,h,f);b=this.mixI(w,b,f)}l-g<d&&(r=a.getPixel32(c,
l-d),p=r>>8&255,w=r&255,f=(l-d)/g,m=this.mixI(r>>16&255,m,f),h=this.mixI(p,h,f),b=this.mixI(w,b,f));return-16777216|m<<16|h<<8|b},color:function(a,b,c){var d=0,f=0,g=0;null!=a&&(d=this.noiseToColor(a));null!=b&&(f=this.noiseToColor(b));null!=c&&(g=this.noiseToColor(c));return-16777216|d<<16|f<<8|g},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 f=Math.pow(2,d);d=Math.pow(a,d);this.persistence_max+=d;this.octaves_frequencies.push(f);this.octaves_persistences.push(d)}this.persistence_max=1/this.persistence_max},__class__:wi};var Hl=function(){};h["openfl.display._internal.CairoBitmap"]=
Hl;Hl.__name__="openfl.display._internal.CairoBitmap";Hl.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 f=a.__bitmapData.getSurface();null!=f&&(f=wn.createForSurface(f),wn.set_filter(f,b.__allowSmoothing&&a.smoothing?1:3),d.set_source(f),1==c?d.paint():d.paintWithAlpha(c));b.__popMaskObject(a);b.__setBlendMode(10)}}};
Hl.renderDrawable=function(a,b){};Hl.renderDrawableMask=function(a,b){b.cairo.rectangle(0,0,a.get_width(),a.get_height())};var Ao=function(){};h["openfl.display._internal.CairoBitmapData"]=Ao;Ao.__name__="openfl.display._internal.CairoBitmapData";Ao.renderDrawable=function(a,b){};Ao.renderDrawableMask=function(a,b){};var Il=function(){};h["openfl.display._internal.CairoDisplayObject"]=Il;Il.__name__="openfl.display._internal.CairoDisplayObject";Il.render=function(a,b){};Il.renderDrawable=function(a,
b){};Il.renderDrawableMask=function(a,b){};var Bo=function(){};h["openfl.display._internal.CairoDisplayObjectContainer"]=Bo;Bo.__name__="openfl.display._internal.CairoDisplayObjectContainer";Bo.renderDrawable=function(a,b){};Bo.renderDrawableMask=function(a,b){};var Jl=function(){};h["openfl.display._internal.CairoGraphics"]=Jl;Jl.__name__="openfl.display._internal.CairoGraphics";Jl.hitTest=function(a,b,c){return!1};Jl.render=function(a,b){};Jl.renderMask=function(a,b){};var Kl=function(){};h["openfl.display._internal.CairoShape"]=
Kl;Kl.__name__="openfl.display._internal.CairoShape";Kl.render=function(a,b){};Kl.renderDrawable=function(a,b){};Kl.renderDrawableMask=function(a,b){};var Co=function(){};h["openfl.display._internal.CairoSimpleButton"]=Co;Co.__name__="openfl.display._internal.CairoSimpleButton";Co.renderDrawable=function(a,b){!a.__renderable||0>=a.__worldAlpha||null==a.__currentState||(b.__pushMaskObject(a),b.__renderDrawable(a.__currentState),b.__popMaskObject(a),b.__renderEvent(a))};Co.renderDrawableMask=function(a,
b){b.__renderDrawableMask(a.__currentState)};var Ll=function(){};h["openfl.display._internal.CairoTextField"]=Ll;Ll.__name__="openfl.display._internal.CairoTextField";Ll.render=function(a,b,c){};Ll.renderDrawable=function(a,b){};Ll.renderDrawableMask=function(a,b){};var Jh=function(){};h["openfl.display._internal.CairoTilemap"]=Jh;Jh.__name__="openfl.display._internal.CairoTilemap";Jh.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=ea.__pool.get();d.setTo(0,0,a.__width,a.__height);b.__pushMaskRect(d,a.__renderTransform);Jh.renderTileContainer(a.__group,b,a.__renderTransform,a.__tileset,b.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,c,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,null,d,em._new());b.__popMaskRect();b.__popMaskObject(a);ea.__pool.release(d)}}};Jh.renderTileContainer=function(a,b,c,d,f,g,k,l,m,h,r,p,w,u){var z=b.cairo,n=wa.__pool.get();a=a.__tiles;for(var t,A,q,y=null,E,L=
0;L<a.length;)if(E=a[L],++L,n.setTo(1,0,0,1,-E.get_originX(),-E.get_originY()),n.concat(E.get_matrix()),n.concat(c),t=null!=E.get_tileset()?E.get_tileset():d,A=E.get_alpha()*k,(q=E.get_visible())&&!(0>=A))if(g||(A=1),l&&(y=null!=E.__blendMode?E.__blendMode:m),0<E.__length)Jh.renderTileContainer(E,b,n,t,f,g,A,l,y,h,r,p,w,u);else if(null!=t){q=E.get_id();if(-1==q){if(E=E.__rect,null==E||0>=E.width||0>=E.height)continue}else{E=t.__data[q];if(null==E)continue;w.setTo(E.x,E.y,E.width,E.height);E=w}t=t.__bitmapData;
null!=t&&null!=t.image&&(t!=h&&(r=t.getSurface(),p=wn.createForSurface(r),wn.set_filter(p,f?1:3),z.set_source(p),h=t),l&&b.__setBlendMode(y),b.applyMatrix(n,z),u[6]=E.x,u[7]=E.y,wn.set_matrix(p,u),z.set_source(p),z.save(),z.newPath(),z.rectangle(0,0,E.width,E.height),z.clip(),1==A?z.paint():z.paintWithAlpha(A),z.restore())}wa.__pool.release(n)};Jh.renderDrawable=function(a,b){};Jh.renderDrawableMask=function(a,b){};var ri=function(){};h["openfl.display._internal.CanvasBitmap"]=ri;ri.__name__="openfl.display._internal.CanvasBitmap";
ri.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);ya.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,c.x,c.y,c.width,c.height);b.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=!0);b.__popMaskObject(a,!1)}}};ri.renderDrawable=function(a,b){b.__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||(A=b.__getAlpha(a.__worldAlpha),0>=A))){if(null!=
a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);q=b.context;b.setTransform(a.__renderTransform,q);var c=a.opaqueBackground;q.fillStyle="rgb("+(c>>>16&255)+","+(c>>>8&255)+","+(c&255)+")";q.fillRect(0,0,a.get_width(),a.get_height());b.__popMaskObject(a)}if(null!=a.__graphics&&a.__renderable&&(A=b.__getAlpha(a.__worldAlpha),!(0>=A))){var d=a.__graphics;if(null!=d){C.render(d,b);var f=d.__width,g=d.__height;c=
d.__canvas;if(null!=c&&d.__visible&&1<=f&&1<=g){var k=d.__worldTransform;q=b.context;y=a.__scrollRect;var l=a.__worldScale9Grid;if(null==y||0<y.width&&0<y.height){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);q.globalAlpha=A;if(null!=l&&0==k.b&&0==k.c){var m=b.__pixelRatio;A=wa.__pool.get();A.translate(k.tx,k.ty);b.setTransform(A,q);wa.__pool.release(A);A=d.__bounds;var h=d.__renderTransform.a/d.__bitmapScale,r=d.__renderTransform.d/d.__bitmapScale,p=h*k.a,w=r*k.d;k=Math.max(1,Math.round(l.x*
h));d=Math.round(l.y*r);y=Math.max(1,Math.round((A.get_right()-l.get_right())*h));var u=Math.round((A.get_bottom()-l.get_bottom())*r);h=Math.round(l.width*h);l=Math.round(l.height*r);r=Math.round(k/m);var n=Math.round(d/m),t=Math.round(y/m);m=Math.round(u/m);p=A.width*p-r-t;A=A.height*w-n-m;b.applySmoothing(q,!1);0!=h&&0!=l?(q.drawImage(c,0,0,k,d,0,0,r,n),q.drawImage(c,k,0,h,d,r,0,p,n),q.drawImage(c,k+h,0,y,d,r+p,0,t,n),q.drawImage(c,0,d,k,l,0,n,r,A),q.drawImage(c,k,d,h,l,r,n,p,A),q.drawImage(c,k+
h,d,y,l,r+p,n,t,A),q.drawImage(c,0,d+l,k,u,0,n+A,r,m),q.drawImage(c,k,d+l,h,u,r,n+A,p,m),q.drawImage(c,k+h,d+l,y,u,r+p,n+A,t,m)):0==h&&0!=l?(g=r+p+t,q.drawImage(c,0,0,f,d,0,0,g,n),q.drawImage(c,0,d,f,l,0,n,g,A),q.drawImage(c,0,d+l,f,u,0,n+A,g,m)):0==l&&0!=h&&(f=n+A+m,q.drawImage(c,0,0,k,g,0,0,r,f),q.drawImage(c,k,0,h,g,r,0,p,f),q.drawImage(c,k+h,0,y,g,r+p,0,t,f))}else b.setTransform(k,q),q.drawImage(c,0,0,f,g);b.__popMaskObject(a)}}}}}a.__renderable&&(A=b.__getAlpha(a.__worldAlpha),0<A&&null!=a.__bitmapData&&
a.__bitmapData.__isValid&&a.__bitmapData.readable&&(q=b.context,b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a,!1),ya.convertToCanvas(a.__bitmapData.image),q.globalAlpha=A,y=a.__scrollRect,b.setTransform(a.__renderTransform,q),b.__allowSmoothing&&a.smoothing||(q.imageSmoothingEnabled=!1),null==y?q.drawImage(a.__bitmapData.image.get_src(),0,0,a.__bitmapData.image.width,a.__bitmapData.image.height):q.drawImage(a.__bitmapData.image.get_src(),y.x,y.y,y.width,y.height,y.x,y.y,y.width,y.height),
b.__allowSmoothing&&a.smoothing||(q.imageSmoothingEnabled=!0),b.__popMaskObject(a,!1)))}else if(c=a.__cacheBitmap,c.__renderable){var A=b.__getAlpha(c.__worldAlpha);if(0<A&&null!=c.__bitmapData&&c.__bitmapData.__isValid&&c.__bitmapData.readable){var q=b.context;b.__setBlendMode(c.__worldBlendMode);b.__pushMaskObject(c,!1);ya.convertToCanvas(c.__bitmapData.image);q.globalAlpha=A;var y=c.__scrollRect;b.setTransform(c.__renderTransform,q);b.__allowSmoothing&&c.smoothing||(q.imageSmoothingEnabled=!1);
null==y?q.drawImage(c.__bitmapData.image.get_src(),0,0,c.__bitmapData.image.width,c.__bitmapData.image.height):q.drawImage(c.__bitmapData.image.get_src(),y.x,y.y,y.width,y.height,y.x,y.y,y.width,y.height);b.__allowSmoothing&&c.smoothing||(q.imageSmoothingEnabled=!0);b.__popMaskObject(c,!1)}}b.__renderEvent(a)};ri.renderDrawableMask=function(a,b){b.context.rect(0,0,a.get_width(),a.get_height())};var nl=function(){};h["openfl.display._internal.CanvasBitmapData"]=nl;nl.__name__="openfl.display._internal.CanvasBitmapData";
nl.renderDrawable=function(a,b){if(a.readable){var c=a.image;c.type==Kd.DATA&&ya.convertToCanvas(c);var d=b.context;d.globalAlpha=1;b.setTransform(a.__renderTransform,d);d.drawImage(c.get_src(),0,0,c.width,c.height)}};nl.renderDrawableMask=function(a,b){};var Yg=function(){};h["openfl.display._internal.CanvasDisplayObject"]=Yg;Yg.__name__="openfl.display._internal.CanvasDisplayObject";Yg.render=function(a,b){if((null!=a.opaqueBackground||null!=a.__graphics)&&a.__renderable){var c=b.__getAlpha(a.__worldAlpha);
if(!(0>=c)){if(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var d=b.context;b.setTransform(a.__renderTransform,d);var f=a.opaqueBackground;d.fillStyle="rgb("+(f>>>16&255)+","+(f>>>8&255)+","+(f&255)+")";d.fillRect(0,0,a.get_width(),a.get_height());b.__popMaskObject(a)}if(null!=a.__graphics&&a.__renderable&&(c=b.__getAlpha(a.__worldAlpha),!(0>=c))){var g=a.__graphics;if(null!=g){C.render(g,b);var k=
g.__width,l=g.__height;f=g.__canvas;if(null!=f&&g.__visible&&1<=k&&1<=l){var m=g.__worldTransform;d=b.context;var h=a.__scrollRect,r=a.__worldScale9Grid;if(null==h||0<h.width&&0<h.height){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);d.globalAlpha=c;if(null!=r&&0==m.b&&0==m.c){var p=b.__pixelRatio;c=wa.__pool.get();c.translate(m.tx,m.ty);b.setTransform(c,d);wa.__pool.release(c);c=g.__bounds;var w=g.__renderTransform.a/g.__bitmapScale,u=g.__renderTransform.d/g.__bitmapScale,n=w*m.a,t=
u*m.d;m=Math.max(1,Math.round(r.x*w));g=Math.round(r.y*u);h=Math.max(1,Math.round((c.get_right()-r.get_right())*w));var A=Math.round((c.get_bottom()-r.get_bottom())*u);w=Math.round(r.width*w);r=Math.round(r.height*u);u=Math.round(m/p);var q=Math.round(g/p),y=Math.round(h/p);p=Math.round(A/p);n=c.width*n-u-y;c=c.height*t-q-p;b.applySmoothing(d,!1);0!=w&&0!=r?(d.drawImage(f,0,0,m,g,0,0,u,q),d.drawImage(f,m,0,w,g,u,0,n,q),d.drawImage(f,m+w,0,h,g,u+n,0,y,q),d.drawImage(f,0,g,m,r,0,q,u,c),d.drawImage(f,
m,g,w,r,u,q,n,c),d.drawImage(f,m+w,g,h,r,u+n,q,y,c),d.drawImage(f,0,g+r,m,A,0,q+c,u,p),d.drawImage(f,m,g+r,w,A,u,q+c,n,p),d.drawImage(f,m+w,g+r,h,A,u+n,q+c,y,p)):0==w&&0!=r?(l=u+n+y,d.drawImage(f,0,0,k,g,0,0,l,q),d.drawImage(f,0,g,k,r,0,q,l,c),d.drawImage(f,0,g+r,k,A,0,q+c,l,p)):0==r&&0!=w&&(k=q+c+p,d.drawImage(f,0,0,m,l,0,0,u,k),d.drawImage(f,m,0,w,l,u,0,n,k),d.drawImage(f,m+w,0,h,l,u+n,0,y,k))}else b.setTransform(m,d),d.drawImage(f,0,0,k,l);b.__popMaskObject(a)}}}}}}};Yg.renderDrawable=function(a,
b){if(null==a.get_mask()||0<a.get_mask().get_width()&&0<a.get_mask().get_height())if(b.__updateCacheBitmap(a,!1),null!=a.__cacheBitmap&&!a.__isCacheBitmapRender){var c=a.__cacheBitmap;if(c.__renderable){var d=b.__getAlpha(c.__worldAlpha);if(0<d&&null!=c.__bitmapData&&c.__bitmapData.__isValid&&c.__bitmapData.readable){var f=b.context;b.__setBlendMode(c.__worldBlendMode);b.__pushMaskObject(c,!1);ya.convertToCanvas(c.__bitmapData.image);f.globalAlpha=d;var g=c.__scrollRect;b.setTransform(c.__renderTransform,
f);b.__allowSmoothing&&c.smoothing||(f.imageSmoothingEnabled=!1);null==g?f.drawImage(c.__bitmapData.image.get_src(),0,0,c.__bitmapData.image.width,c.__bitmapData.image.height):f.drawImage(c.__bitmapData.image.get_src(),g.x,g.y,g.width,g.height,g.x,g.y,g.width,g.height);b.__allowSmoothing&&c.smoothing||(f.imageSmoothingEnabled=!0);b.__popMaskObject(c,!1)}}}else if(!(null==a.opaqueBackground&&null==a.__graphics||!a.__renderable||(d=b.__getAlpha(a.__worldAlpha),0>=d||(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&
0<a.get_width()&&0<a.get_height()&&(b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),f=b.context,b.setTransform(a.__renderTransform,f),c=a.opaqueBackground,f.fillStyle="rgb("+(c>>>16&255)+","+(c>>>8&255)+","+(c&255)+")",f.fillRect(0,0,a.get_width(),a.get_height()),b.__popMaskObject(a)),null==a.__graphics||!a.__renderable||(d=b.__getAlpha(a.__worldAlpha),0>=d))))){var k=a.__graphics;if(null!=k){C.render(k,b);var l=k.__width,m=k.__height;c=k.__canvas;if(null!=c&&k.__visible&&1<=l&&1<=m){var h=
k.__worldTransform;f=b.context;g=a.__scrollRect;var r=a.__worldScale9Grid;if(null==g||0<g.width&&0<g.height){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);f.globalAlpha=d;if(null!=r&&0==h.b&&0==h.c){var p=b.__pixelRatio;d=wa.__pool.get();d.translate(h.tx,h.ty);b.setTransform(d,f);wa.__pool.release(d);d=k.__bounds;var w=k.__renderTransform.a/k.__bitmapScale,u=k.__renderTransform.d/k.__bitmapScale,n=w*h.a,t=u*h.d;h=Math.max(1,Math.round(r.x*w));k=Math.round(r.y*u);g=Math.max(1,Math.round((d.get_right()-
r.get_right())*w));var A=Math.round((d.get_bottom()-r.get_bottom())*u);w=Math.round(r.width*w);r=Math.round(r.height*u);u=Math.round(h/p);var q=Math.round(k/p),y=Math.round(g/p);p=Math.round(A/p);n=d.width*n-u-y;d=d.height*t-q-p;b.applySmoothing(f,!1);0!=w&&0!=r?(f.drawImage(c,0,0,h,k,0,0,u,q),f.drawImage(c,h,0,w,k,u,0,n,q),f.drawImage(c,h+w,0,g,k,u+n,0,y,q),f.drawImage(c,0,k,h,r,0,q,u,d),f.drawImage(c,h,k,w,r,u,q,n,d),f.drawImage(c,h+w,k,g,r,u+n,q,y,d),f.drawImage(c,0,k+r,h,A,0,q+d,u,p),f.drawImage(c,
h,k+r,w,A,u,q+d,n,p),f.drawImage(c,h+w,k+r,g,A,u+n,q+d,y,p)):0==w&&0!=r?(m=u+n+y,f.drawImage(c,0,0,l,k,0,0,m,q),f.drawImage(c,0,k,l,r,0,q,m,d),f.drawImage(c,0,k+r,l,A,0,q+d,m,p)):0==r&&0!=w&&(l=q+d+p,f.drawImage(c,0,0,h,m,0,0,u,l),f.drawImage(c,h,0,w,m,u,0,n,l),f.drawImage(c,h+w,0,g,m,u+n,0,y,l))}else b.setTransform(h,f),f.drawImage(c,0,0,l,m);b.__popMaskObject(a)}}}}b.__renderEvent(a)};Yg.renderDrawableMask=function(a,b){null!=a.__graphics&&C.renderMask(a.__graphics,b)};var ol=function(){};h["openfl.display._internal.CanvasDisplayObjectContainer"]=
ol;ol.__name__="openfl.display._internal.CanvasDisplayObjectContainer";ol.renderDrawable=function(a,b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=c.next();null==d.stage&&d.__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()))&&(Yg.renderDrawable(a,b),null==a.__cacheBitmap||a.__isCacheBitmapRender)){b.__pushMaskObject(a);if(null!=b.__stage){c=0;for(d=a.__children;c<d.length;){var f=
d[c];++c;b.__renderDrawable(f);f.__renderDirty=!1}a.__renderDirty=!1}else for(c=0,d=a.__children;c<d.length;)f=d[c],++c,b.__renderDrawable(f);b.__popMaskObject(a)}};ol.renderDrawableMask=function(a,b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=c.next();null==d.stage&&d.__cleanup()}a.__removedChildren.set_length(0);null!=a.__graphics&&C.renderMask(a.__graphics,b);c=0;for(a=a.__children;c<a.length;)d=a[c],++c,b.__renderDrawableMask(d)};var de=function(){null==de.empty?(this.types=
[],this.b=[],this.i=[],this.f=[],this.o=[],this.ff=[],this.ii=[],this.copyOnWrite=!0):this.clear()};h["openfl.display._internal.DrawCommandBuffer"]=de;de.__name__="openfl.display._internal.DrawCommandBuffer";de.prototype={types:null,b:null,copyOnWrite:null,f:null,ff:null,i:null,ii:null,o: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.copyOnWrite=a.copyOnWrite=!0,a;for(var b=new qf(a),c=0,d=a.types;c<
d.length;){var f=d[c];++c;switch(f._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=Z.BEGIN_BITMAP_FILL;f=b;this.beginBitmapFill(f.buffer.o[f.oPos],f.buffer.o[f.oPos+1],f.buffer.b[f.bPos],f.buffer.b[f.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=Z.BEGIN_FILL;f=b;this.beginFill(f.buffer.i[f.iPos],f.buffer.f[f.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=Z.BEGIN_GRADIENT_FILL;f=b;this.beginGradientFill(f.buffer.o[f.oPos],f.buffer.ii[f.iiPos],f.buffer.ff[f.ffPos],f.buffer.ii[f.iiPos+1],f.buffer.o[f.oPos+1],f.buffer.o[f.oPos+2],f.buffer.o[f.oPos+3],f.buffer.f[f.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=Z.BEGIN_SHADER_FILL;f=b;this.beginShaderFill(f.buffer.o[f.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=Z.CUBIC_CURVE_TO;f=b;this.cubicCurveTo(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+2],f.buffer.f[f.fPos+3],f.buffer.f[f.fPos+4],f.buffer.f[f.fPos+5]);break;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=Z.CURVE_TO;f=b;this.curveTo(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+2],f.buffer.f[f.fPos+3]);break;case 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=Z.DRAW_CIRCLE;f=b;this.drawCircle(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.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=Z.DRAW_ELLIPSE;f=b;this.drawEllipse(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+2],f.buffer.f[f.fPos+3]);break;case 8: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=Z.DRAW_QUADS;
f=b;this.drawQuads(f.buffer.o[f.oPos],f.buffer.o[f.oPos+1],f.buffer.o[f.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=Z.DRAW_RECT;f=b;this.drawRect(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],f.buffer.f[f.fPos+2],f.buffer.f[f.fPos+3]);break;case 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=Z.DRAW_ROUND_RECT;f=b;this.drawRoundRect(f.buffer.f[f.fPos],f.buffer.f[f.fPos+1],
f.buffer.f[f.fPos+2],f.buffer.f[f.fPos+3],f.buffer.f[f.fPos+4],f.buffer.o[f.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=Z.DRAW_TRIANGLES;f=b;this.drawTriangles(f.buffer.o[f.oPos],f.buffer.o[f.oPos+1],f.buffer.o[f.oPos+2],f.buffer.o[f.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=Z.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=Z.LINE_BITMAP_STYLE;f=b;this.lineBitmapStyle(f.buffer.o[f.oPos],f.buffer.o[f.oPos+1],f.buffer.b[f.bPos],f.buffer.b[f.bPos+1]);break;case 15: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=Z.LINE_GRADIENT_STYLE;f=b;this.lineGradientStyle(f.buffer.o[f.oPos],f.buffer.ii[f.iiPos],f.buffer.ff[f.ffPos],f.buffer.ii[f.iiPos+1],f.buffer.o[f.oPos+1],f.buffer.o[f.oPos+2],f.buffer.o[f.oPos+3],f.buffer.f[f.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=Z.LINE_STYLE;f=b;this.lineStyle(f.buffer.o[f.oPos],f.buffer.i[f.iPos],f.buffer.f[f.fPos],f.buffer.b[f.bPos],f.buffer.o[f.oPos+1],f.buffer.o[f.oPos+2],f.buffer.o[f.oPos+3],f.buffer.f[f.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=Z.LINE_TO;f=b;this.lineTo(f.buffer.f[f.fPos],f.buffer.f[f.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=Z.MOVE_TO;f=b;this.moveTo(f.buffer.f[f.fPos],f.buffer.f[f.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=Z.OVERRIDE_MATRIX;f=b;this.overrideMatrix(f.buffer.o[f.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=Z.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=Z.WINDING_NON_ZERO;this.windingNonZero()}}b.destroy();return a},beginBitmapFill:function(a,b,c,d){this.prepareWrite();this.types.push(Z.BEGIN_BITMAP_FILL);this.o.push(a);this.o.push(b);this.b.push(c);this.b.push(d)},beginFill:function(a,b){this.prepareWrite();this.types.push(Z.BEGIN_FILL);this.i.push(a);this.f.push(b)},beginGradientFill:function(a,b,c,d,f,g,k,l){this.prepareWrite();this.types.push(Z.BEGIN_GRADIENT_FILL);this.o.push(a);this.ii.push(b);
this.ff.push(c);this.ii.push(d);this.o.push(f);this.o.push(g);this.o.push(k);this.f.push(l)},beginShaderFill:function(a){this.prepareWrite();this.types.push(Z.BEGIN_SHADER_FILL);this.o.push(a)},clear:function(){this.types=de.empty.types;this.b=de.empty.b;this.i=de.empty.i;this.f=de.empty.f;this.o=de.empty.o;this.ff=de.empty.ff;this.ii=de.empty.ii;this.copyOnWrite=!0},copy:function(){var a=new de;a.append(this);return a},cubicCurveTo:function(a,b,c,d,f,g){this.prepareWrite();this.types.push(Z.CUBIC_CURVE_TO);
this.f.push(a);this.f.push(b);this.f.push(c);this.f.push(d);this.f.push(f);this.f.push(g)},curveTo:function(a,b,c,d){this.prepareWrite();this.types.push(Z.CURVE_TO);this.f.push(a);this.f.push(b);this.f.push(c);this.f.push(d)},destroy:function(){this.clear();this.ii=this.ff=this.o=this.f=this.i=this.b=this.types=null},drawCircle:function(a,b,c){this.prepareWrite();this.types.push(Z.DRAW_CIRCLE);this.f.push(a);this.f.push(b);this.f.push(c)},drawEllipse:function(a,b,c,d){this.prepareWrite();this.types.push(Z.DRAW_ELLIPSE);
this.f.push(a);this.f.push(b);this.f.push(c);this.f.push(d)},drawQuads:function(a,b,c){this.prepareWrite();this.types.push(Z.DRAW_QUADS);this.o.push(a);this.o.push(b);this.o.push(c)},drawRect:function(a,b,c,d){this.prepareWrite();this.types.push(Z.DRAW_RECT);this.f.push(a);this.f.push(b);this.f.push(c);this.f.push(d)},drawRoundRect:function(a,b,c,d,f,g){this.prepareWrite();this.types.push(Z.DRAW_ROUND_RECT);this.f.push(a);this.f.push(b);this.f.push(c);this.f.push(d);this.f.push(f);this.o.push(g)},
drawTriangles:function(a,b,c,d){this.prepareWrite();this.types.push(Z.DRAW_TRIANGLES);this.o.push(a);this.o.push(b);this.o.push(c);this.o.push(d)},endFill:function(){this.prepareWrite();this.types.push(Z.END_FILL)},lineBitmapStyle:function(a,b,c,d){this.prepareWrite();this.types.push(Z.LINE_BITMAP_STYLE);this.o.push(a);this.o.push(b);this.b.push(c);this.b.push(d)},lineGradientStyle:function(a,b,c,d,f,g,k,l){this.prepareWrite();this.types.push(Z.LINE_GRADIENT_STYLE);this.o.push(a);this.ii.push(b);
this.ff.push(c);this.ii.push(d);this.o.push(f);this.o.push(g);this.o.push(k);this.f.push(l)},lineStyle:function(a,b,c,d,f,g,k,l){this.prepareWrite();this.types.push(Z.LINE_STYLE);this.o.push(a);this.i.push(b);this.f.push(c);this.b.push(d);this.o.push(f);this.o.push(g);this.o.push(k);this.f.push(l)},lineTo:function(a,b){this.prepareWrite();this.types.push(Z.LINE_TO);this.f.push(a);this.f.push(b)},moveTo:function(a,b){this.prepareWrite();this.types.push(Z.MOVE_TO);this.f.push(a);this.f.push(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.copyOnWrite=!1)},overrideBlendMode:function(a){this.prepareWrite();this.types.push(Z.OVERRIDE_BLEND_MODE);this.o.push(a)},overrideMatrix:function(a){this.prepareWrite();this.types.push(Z.OVERRIDE_MATRIX);this.o.push(a)},windingEvenOdd:function(){this.prepareWrite();this.types.push(Z.WINDING_EVEN_ODD)},windingNonZero:function(){this.prepareWrite();
this.types.push(Z.WINDING_NON_ZERO)},get_length:function(){return this.types.length},__class__:de,__properties__:{get_length:"get_length"}};var C=function(){};h["openfl.display._internal.CanvasGraphics"]=C;C.__name__="openfl.display._internal.CanvasGraphics";C.allowSmoothing=null;C.bitmapFill=null;C.bitmapStroke=null;C.bitmapRepeat=null;C.bounds=null;C.graphics=null;C.hasFill=null;C.hasStroke=null;C.hitTesting=null;C.inversePendingMatrix=null;C.pendingMatrix=null;C.windingRule=null;C.worldAlpha=null;
C.context=null;C.hitTestCanvas=null;C.hitTestContext=null;C.closePath=function(a){null==a&&(a=!1);null!=C.context.strokeStyle&&(a||C.context.closePath(),C.context.stroke(),a&&C.context.closePath(),C.context.beginPath())};C.createBitmapFill=function(a,b,c){ya.convertToCanvas(a.image);C.setSmoothing(c);return C.context.createPattern(a.image.get_src(),b?"repeat":"no-repeat")};C.createGradientPattern=function(a,b,c,d,f,g,k,l){k=!1;null==f&&(f=wa.__pool.get(),f.identity(),k=!0);switch(a){case 0:if(0==
g){a=C.context.createLinearGradient(-819.2,0,819.2,0);C.pendingMatrix=f.clone();C.inversePendingMatrix=f.clone();C.inversePendingMatrix.invert();for(var m=0,h=b.length;m<h;){var r=m++;g=d[r]/255;0>g?g=0:1<g&&(g=1);a.addColorStop(g,C.getRGBA(b[r],c[r]))}k&&wa.__pool.release(f);return a}a=819.2*((0==g?1:25)-1);k=window.document.createElement("canvas");l=k.getContext("2d");var p=C.getDimensions(f);k.width=C.context.canvas.width;k.height=C.context.canvas.height;a=C.context.createLinearGradient(-819.2-
a,0,819.2+a,0);if(1==g)for(var w=0,u=.04;1>w;){m=0;for(h=b.length;m<h;)r=m++,g=d[r]/255,g=w+g*u,0>g?g=0:1<g&&(g=1),a.addColorStop(g,C.getRGBA(b[r],c[r]));w+=u;for(m=b.length-1;0<=m;)g=d[m]/255,g=w+(1-g)*u,0>g?g=0:1<g&&(g=1),a.addColorStop(g,C.getRGBA(b[m],c[m])),--m;w+=u}else if(2==g)for(w=0,u=.04;1>w;){m=0;for(h=b.length;m<h;)r=m++,g=d[r]/255,g=w+g*u,0>g?g=0:1<g&&(g=.999),a.addColorStop(g,C.getRGBA(b[r],c[r]));g=w+.001;0>g?g=0:1<g&&(g=1);a.addColorStop(g-.001,C.getRGBA(b[b.length-1],c[c.length-1]));
a.addColorStop(g,C.getRGBA(b[0],c[0]));w+=u}C.pendingMatrix=new wa;C.pendingMatrix.tx=f.tx-p.width/2;C.pendingMatrix.ty=f.ty-p.height/2;C.inversePendingMatrix=C.pendingMatrix.clone();C.inversePendingMatrix.invert();b=new Path2D;b.rect(0,0,k.width,k.height);b.closePath();f=new DOMMatrix([f.a,f.b,f.c,f.d,f.tx,f.ty]);c=f.inverse();d=new Path2D;d.addPath(b,c);l.fillStyle=a;l.setTransform(f);l.fill(d);return C.context.createPattern(k,"no-repeat");case 1:1<l?l=1:-1>l&&(l=-1);a=C.context.createRadialGradient(819.2*
l,0,0,0,0,819.2);C.pendingMatrix=f.clone();C.inversePendingMatrix=f.clone();C.inversePendingMatrix.invert();m=0;for(h=b.length;m<h;)r=m++,g=d[r]/255,0>g?g=0:1<g&&(g=1),a.addColorStop(g,C.getRGBA(b[r],c[r]));k&&wa.__pool.release(f);return a}};C.getRGBA=function(a,b){var c=(a&16711680)>>>16,d=(a&65280)>>>8;a&=255;return"rgba("+(null==c?"null":M.string(L.toFloat(c)))+", "+(null==d?"null":M.string(L.toFloat(d)))+", "+(null==a?"null":M.string(L.toFloat(a)))+", "+b+")"};C.getDimensions=function(a){var b=
Math.cos(Math.atan2(a.c,a.a)),c=a.a/b*1638.4;a=a.d/b*1638.4;0==c&&0==a&&(c=a=819.2);return{width:c,height:a}};C.createTempPatternCanvas=function(a,b,c,d){var f=window.document.createElement("canvas"),g=f.getContext("2d");f.width=c;f.height=d;a=a.image.get_src();g.fillStyle=g.createPattern(a,b?"repeat":"no-repeat");g.beginPath();g.moveTo(0,0);g.lineTo(0,d);g.lineTo(c,d);g.lineTo(c,0);g.lineTo(0,0);g.closePath();C.hitTesting||g.fill(C.windingRule);return f};C.drawRoundRect=function(a,b,c,d,f,g){null==
g&&(g=f);f*=.5;g*=.5;f>c/2&&(f=c/2);g>d/2&&(g=d/2);c=a+c;d=b+d;var k=-f+.7071067811865476*f,l=-f+.41421356237309503*f,m=-g+.7071067811865476*g,h=-g+.41421356237309503*g;C.context.moveTo(c,d-g);C.context.quadraticCurveTo(c,d+h,c+k,d+m);C.context.quadraticCurveTo(c+l,d,c-f,d);C.context.lineTo(a+f,d);C.context.quadraticCurveTo(a-l,d,a-k,d+m);C.context.quadraticCurveTo(a,d+h,a,d-g);C.context.lineTo(a,b+g);C.context.quadraticCurveTo(a,b-h,a-k,b-m);C.context.quadraticCurveTo(a-l,b,a+f,b);C.context.lineTo(c-
f,b);C.context.quadraticCurveTo(c+l,b,c+k,b-m);C.context.quadraticCurveTo(c,b-h,c,b+g);C.context.lineTo(c,d-g)};C.endFill=function(){C.context.beginPath();C.playCommands(C.fillCommands,!1);C.fillCommands.clear()};C.endStroke=function(){C.context.beginPath();C.playCommands(C.strokeCommands,!0);C.context.closePath();C.strokeCommands.clear()};C.hitTest=function(a,b,c){C.bounds=a.__bounds;C.graphics=a;if(0==a.__commands.get_length()||null==C.bounds||0>=C.bounds.width||0>=C.bounds.height)return C.graphics=
null,!1;C.hitTesting=!0;var d=a.__renderTransform,f=b*d.b+c*d.d+d.ty;b=b*d.a+c*d.c+d.tx-(C.bounds.x*d.a+C.bounds.y*d.c+d.tx);c=f-(C.bounds.x*d.b+C.bounds.y*d.d+d.ty);f=a.__canvas;var g=a.__context;a.__canvas=C.hitTestCanvas;a.__context=C.hitTestContext;C.context=a.__context;C.context.setTransform(d.a,d.b,d.c,d.d,d.tx,d.ty);C.fillCommands.clear();C.strokeCommands.clear();C.hasFill=!1;C.hasStroke=!1;C.bitmapFill=null;C.bitmapRepeat=!1;C.windingRule="evenodd";d=new qf(a.__commands);for(var k=0,l=a.__commands.types;k<
l.length;){var m=l[k];++k;switch(m._hx_index){case 0:case 1:case 2:case 3:C.endFill();if(C.hasFill&&C.context.isPointInPath(b,c,C.windingRule))return d.destroy(),a.__canvas=f,a.__context=g,C.graphics=null,!0;C.endStroke();if(C.hasStroke&&C.context.isPointInStroke(b,c))return d.destroy(),a.__canvas=f,a.__context=g,C.graphics=null,!0;if(m==Z.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=Z.BEGIN_BITMAP_FILL;m=d;C.fillCommands.beginBitmapFill(m.buffer.o[m.oPos],
m.buffer.o[m.oPos+1],m.buffer.b[m.bPos],m.buffer.b[m.bPos+1]);C.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==Z.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=Z.BEGIN_GRADIENT_FILL;m=d;C.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]);C.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==Z.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=Z.BEGIN_SHADER_FILL;m=d;C.fillCommands.beginShaderFill(m.buffer.o[m.oPos]);C.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=Z.BEGIN_FILL;m=d;C.fillCommands.beginFill(m.buffer.i[m.iPos],1);C.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=Z.CUBIC_CURVE_TO;m=d;C.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]);C.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=Z.CURVE_TO;m=d;C.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]);C.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=Z.DRAW_CIRCLE;m=d;C.fillCommands.drawCircle(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2]);C.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=Z.DRAW_ELLIPSE;m=d;C.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]);C.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=Z.DRAW_RECT;m=d;C.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]);C.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=Z.DRAW_ROUND_RECT;m=d;C.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]);C.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=Z.END_FILL;C.endFill();if(C.hasFill&&
C.context.isPointInPath(b,c,C.windingRule))return d.destroy(),a.__canvas=f,a.__context=g,C.graphics=null,!0;C.endStroke();if(C.hasStroke&&C.context.isPointInStroke(b,c))return d.destroy(),a.__canvas=f,a.__context=g,C.graphics=null,!0;C.hasFill=!1;C.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=Z.LINE_BITMAP_STYLE;m=d;C.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=Z.LINE_GRADIENT_STYLE;m=d;C.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:C.endStroke();if(C.hasStroke&&C.context.isPointInStroke(b,c))return d.destroy(),a.__canvas=f,a.__context=g,C.graphics=null,!0;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=Z.LINE_STYLE;m=d;C.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=Z.LINE_TO;m=d;C.fillCommands.lineTo(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1]);C.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=Z.MOVE_TO;m=d;C.fillCommands.moveTo(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1]);C.strokeCommands.moveTo(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1]);break;case 21:C.windingRule="evenodd";break;case 22:C.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}}k=!1;0<C.fillCommands.get_length()&&C.endFill();C.hasFill&&
C.context.isPointInPath(b,c,C.windingRule)&&(k=!0);0<C.strokeCommands.get_length()&&C.endStroke();C.hasStroke&&C.context.isPointInStroke(b,c)&&(k=!0);d.destroy();a.__canvas=f;a.__context=g;C.graphics=null;return k};C.isCCW=function(a,b,c,d,f,g){return 0>(c-a)*(g-b)-(d-b)*(f-a)};C.normalizeUVT=function(a,b){null==b&&(b=!1);for(var c=-Infinity,d,f=a.get_length(),g=1,k=f+1;g<k;)d=g++,b&&0==d%3||(d=a.get(d-1),c<d&&(c=d));if(!b)return{max:c,uvt:a};var l=ia.toFloatVector(null);g=1;for(k=f+1;g<k;)d=g++,
b&&0==d%3||l.push(a.get(d-1));return{max:c,uvt:l}};C.playCommands=function(a,b){null==b&&(b=!1);C.bounds=C.graphics.__bounds;var c=C.bounds.x,d=C.bounds.y,f=0,g=0,k=!1,l=0,m=0,h=!1;C.windingRule="evenodd";C.setSmoothing(!0);var r=!1,p=new qf(a),w,u,n,t=null,A=null,q=0,y=a.types;a:for(;q<y.length;){var E=y[q];++q;switch(E._hx_index){case 0:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=
1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=Z.BEGIN_BITMAP_FILL;var L=p;C.bitmapFill=L.buffer.o[L.oPos];
if(L.buffer.o[L.oPos].readable)C.context.fillStyle=C.createBitmapFill(L.buffer.o[L.oPos],L.buffer.b[L.bPos],L.buffer.b[L.bPos+1]);else{var v=O.hex(0,6);C.context.fillStyle="#"+v}C.hasFill=!0;null!=L.buffer.o[L.oPos+1]?(C.pendingMatrix=L.buffer.o[L.oPos+1],C.inversePendingMatrix=L.buffer.o[L.oPos+1].clone(),C.inversePendingMatrix.invert()):(C.pendingMatrix=null,C.inversePendingMatrix=null);break;case 1:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=
4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=Z.BEGIN_FILL;
var x=p;if(.005>x.buffer.f[x.fPos])C.hasFill=!1;else{if(1==x.buffer.f[x.fPos]){var G=O.hex(x.buffer.i[x.iPos]&16777215,6);C.context.fillStyle="#"+G}else{var Y=(x.buffer.i[x.iPos]&16711680)>>>16;var B=(x.buffer.i[x.iPos]&65280)>>>8;var H=x.buffer.i[x.iPos]&255;C.context.fillStyle="rgba("+Y+", "+B+", "+H+", "+x.buffer.f[x.fPos]+")"}C.bitmapFill=null;C.setSmoothing(!0);C.hasFill=!0}break;case 2:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=
4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=Z.BEGIN_GRADIENT_FILL;
var D=p;C.context.fillStyle=C.createGradientPattern(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]);C.bitmapFill=null;C.setSmoothing(!0);C.hasFill=!0;break;case 3:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=
3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=Z.BEGIN_SHADER_FILL;var J=p,K=J.buffer.o[J.oPos];if(0<K.inputCount){C.bitmapFill=K.inputs[0];if(C.bitmapFill.readable)C.context.fillStyle=
C.createBitmapFill(C.bitmapFill,0!=K.inputWrap[0],5!=K.inputFilter[0]);else{var qa=O.hex(0,6);C.context.fillStyle="#"+qa}C.hasFill=!0;C.pendingMatrix=null;C.inversePendingMatrix=null}break;case 4:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;
case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=Z.CUBIC_CURVE_TO;var va=p;r=!0;C.context.bezierCurveTo(va.buffer.f[va.fPos]-c,va.buffer.f[va.fPos+1]-d,va.buffer.f[va.fPos+2]-c,va.buffer.f[va.fPos+3]-d,va.buffer.f[va.fPos+4]-c,va.buffer.f[va.fPos+5]-d);
f=va.buffer.f[va.fPos+4];g=va.buffer.f[va.fPos+5];break;case 5:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;
p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=Z.CURVE_TO;var X=p;r=!0;C.context.quadraticCurveTo(X.buffer.f[X.fPos]-c,X.buffer.f[X.fPos+1]-d,X.buffer.f[X.fPos+2]-c,X.buffer.f[X.fPos+3]-d);f=X.buffer.f[X.fPos+2];g=X.buffer.f[X.fPos+3];break;case 6:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=
1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=Z.DRAW_CIRCLE;var N=p;r=!0;C.context.moveTo(N.buffer.f[N.fPos]-
c+N.buffer.f[N.fPos+2],N.buffer.f[N.fPos+1]-d);C.context.arc(N.buffer.f[N.fPos]-c,N.buffer.f[N.fPos+1]-d,N.buffer.f[N.fPos+2],0,2*Math.PI,!0);break;case 7:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=
4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=Z.DRAW_ELLIPSE;var M=p;r=!0;var nb=M.buffer.f[M.fPos];var ta=M.buffer.f[M.fPos+1];var Bb=M.buffer.f[M.fPos+2];var P=M.buffer.f[M.fPos+3];nb-=c;ta-=d;var F=Bb/2*.5522848;var Kb=P/2*.5522848;var S=nb+Bb;var U=ta+P;var I=nb+Bb/2;var W=ta+P/2;C.context.moveTo(nb,
W);C.context.bezierCurveTo(nb,W-Kb,I-F,ta,I,ta);C.context.bezierCurveTo(I+F,ta,S,W-Kb,S,W);C.context.bezierCurveTo(S,W+Kb,I+F,U,I,U);C.context.bezierCurveTo(I-F,U,nb,W+Kb,nb,W);break;case 8:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=
5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=Z.DRAW_QUADS;var V=p,R=V.buffer.o[V.oPos],ca=V.buffer.o[V.oPos+1],Oa=V.buffer.o[V.oPos+2],Mc=null!=ca,aa=!1,le=!1,da=Mc?ca.get_length():Math.floor(R.get_length()/4);if(0==da)return;null!=Oa&&(Oa.get_length()>=6*da?le=aa=
!0:Oa.get_length()>=4*da?aa=!0:Oa.get_length()>=2*da&&(le=!0));var yb=ea.__pool.get(),wb=wa.__pool.get(),ba=C.graphics.__renderTransform;C.context.save();for(var oa=0,ha=da;oa<ha;){var fa=oa++;var Rb=Mc?4*ca.get(fa):4*fa;if(!(0>Rb||(yb.setTo(R.get(Rb),R.get(Rb+1),R.get(Rb+2),R.get(Rb+3)),0>=yb.width||0>=yb.height))){if(aa&&le){var Q=6*fa;wb.setTo(Oa.get(Q),Oa.get(Q+1),Oa.get(Q+2),Oa.get(Q+3),Oa.get(Q+4),Oa.get(Q+5))}else aa?(Q=4*fa,wb.setTo(Oa.get(Q),Oa.get(Q+1),Oa.get(Q+2),Oa.get(Q+3),yb.x,yb.y)):
le?(Q=2*fa,wb.tx=Oa.get(Q),wb.ty=Oa.get(Q+1)):(wb.tx=yb.x,wb.ty=yb.y);wb.tx+=f-c;wb.ty+=g-d;wb.concat(ba);C.context.setTransform(wb.a,wb.b,wb.c,wb.d,wb.tx,wb.ty);null!=C.bitmapFill&&C.bitmapFill.readable?C.context.drawImage(C.bitmapFill.image.get_src(),yb.x,yb.y,yb.width,yb.height,0,0,yb.width,yb.height):C.context.fillRect(0,0,yb.width,yb.height)}}ea.__pool.release(yb);wa.__pool.release(wb);C.context.restore();break;case 9:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;
p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;
case 20:p.oPos+=1}p.prev=Z.DRAW_RECT;var T=p;var ph=!1;if(null!=C.bitmapFill&&C.bitmapFill.readable&&!C.hitTesting){var Aa=n=u=w=0;var ma=!0;if(null!=C.pendingMatrix)if(0!=C.pendingMatrix.b||0!=C.pendingMatrix.c)ma=!1;else{null==t&&(t=Ya.__pool.get());null==A&&(A=Ya.__pool.get());t.setTo(T.buffer.f[T.fPos],T.buffer.f[T.fPos+1]);var ka=C.inversePendingMatrix,na=t.x,ja=t.y;t.x=na*ka.a+ja*ka.c+ka.tx;t.y=na*ka.b+ja*ka.d+ka.ty;A.setTo(T.buffer.f[T.fPos]+T.buffer.f[T.fPos+2],T.buffer.f[T.fPos+1]+T.buffer.f[T.fPos+
3]);var ib=C.inversePendingMatrix,Cd=A.x,ra=A.y;A.x=Cd*ib.a+ra*ib.c+ib.tx;A.y=Cd*ib.b+ra*ib.d+ib.ty;w=t.y;Aa=t.x;n=A.y;u=A.x}else w=T.buffer.f[T.fPos+1],Aa=T.buffer.f[T.fPos],n=T.buffer.f[T.fPos+1]+T.buffer.f[T.fPos+3],u=T.buffer.f[T.fPos]+T.buffer.f[T.fPos+2];ma&&0<=w&&0<=Aa&&u<=C.bitmapFill.width&&n<=C.bitmapFill.height&&(ph=!0,C.hitTesting||C.context.drawImage(C.bitmapFill.image.get_src(),Aa,w,u-Aa,n-w,T.buffer.f[T.fPos]-c,T.buffer.f[T.fPos+1]-d,T.buffer.f[T.fPos+2],T.buffer.f[T.fPos+3]))}ph||
(r=!0,C.context.rect(T.buffer.f[T.fPos]-c,T.buffer.f[T.fPos+1]-d,T.buffer.f[T.fPos+2],T.buffer.f[T.fPos+3]));break;case 10:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=
2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=Z.DRAW_ROUND_RECT;var $b=p;r=!0;C.drawRoundRect($b.buffer.f[$b.fPos]-c,$b.buffer.f[$b.fPos+1]-d,$b.buffer.f[$b.fPos+2],$b.buffer.f[$b.fPos+3],$b.buffer.f[$b.fPos+4],$b.buffer.o[$b.oPos]);break;case 12:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;
p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;
case 20:p.oPos+=1}p.prev=Z.DRAW_TRIANGLES;var pa=p,la=pa.buffer.o[pa.oPos],ua=pa.buffer.o[pa.oPos+1],sa=pa.buffer.o[pa.oPos+2],Ga=null,xa=null==C.bitmapFill;if(xa&&null!=sa)break a;if(!xa){if(null==sa){sa=ia.toFloatVector(null);for(var Da=0,ya=la.get_length()/2|0;Da<ya;){var za=Da++;sa.push(la.get(2*za)-c/C.bitmapFill.width);sa.push(la.get(2*za+1)-d/C.bitmapFill.height)}}var Ba=sa.get_length()!=la.get_length(),Ca=C.normalizeUVT(sa,Ba),Ea=Ca.max;sa=Ca.uvt;Ga=1<Ea?C.createTempPatternCanvas(C.bitmapFill,
C.bitmapRepeat,C.bounds.width|0,C.bounds.height|0):C.createTempPatternCanvas(C.bitmapFill,C.bitmapRepeat,C.bitmapFill.width,C.bitmapFill.height)}for(var ve=0,Hg=ua.get_length(),Fa,Rf,La,Ma,Ha,Ia,nd,$a,Sa,ub,Ka,Na,eb,Pa,Qa,Wa,Xa,Ta,Ra,Ua,jb,Za,bb,cb,Lb,db,fb,gb;ve<Hg;){Fa=ve;Rf=ve+1;La=ve+2;Ma=2*ua.get(Fa);Ha=2*ua.get(Fa)+1;Ia=2*ua.get(Rf);nd=2*ua.get(Rf)+1;$a=2*ua.get(La);Sa=2*ua.get(La)+1;ub=la.get(Ma)-c;Ka=la.get(Ha)-d;Na=la.get(Ia)-c;eb=la.get(nd)-d;Pa=la.get($a)-c;Qa=la.get(Sa)-d;switch(pa.buffer.o[pa.oPos+
3]){case 0:if(0>(Na-ub)*(Qa-Ka)-(eb-Ka)*(Pa-ub)){ve+=3;continue}break;case 2:if(!(0>(Na-ub)*(Qa-Ka)-(eb-Ka)*(Pa-ub))){ve+=3;continue}}xa?(C.context.beginPath(),C.context.moveTo(ub,Ka),C.context.lineTo(Na,eb),C.context.lineTo(Pa,Qa),C.context.closePath(),C.hitTesting||C.context.fill(C.windingRule),ve+=3):(Wa=sa.get(Ma)*Ga.width,Ta=sa.get(Ia)*Ga.width,Ua=sa.get($a)*Ga.width,Xa=sa.get(Ha)*Ga.height,Ra=sa.get(nd)*Ga.height,jb=sa.get(Sa)*Ga.height,Za=Wa*(jb-Ra)-Ta*jb+Ua*Ra+(Ta-Ua)*Xa,0==Za?(ve+=3,C.context.restore()):
(C.context.save(),C.context.beginPath(),C.context.moveTo(ub,Ka),C.context.lineTo(Na,eb),C.context.lineTo(Pa,Qa),C.context.closePath(),C.context.clip(),bb=-(Xa*(Pa-Na)-Ra*Pa+jb*Na+(Ra-jb)*ub)/Za,cb=(Ra*Qa+Xa*(eb-Qa)-jb*eb+(jb-Ra)*Ka)/Za,Lb=(Wa*(Pa-Na)-Ta*Pa+Ua*Na+(Ta-Ua)*ub)/Za,db=-(Ta*Qa+Wa*(eb-Qa)-Ua*eb+(Ua-Ta)*Ka)/Za,fb=(Wa*(jb*Na-Ra*Pa)+Xa*(Ta*Pa-Ua*Na)+(Ua*Ra-Ta*jb)*ub)/Za,gb=(Wa*(jb*eb-Ra*Qa)+Xa*(Ta*Qa-Ua*eb)+(Ua*Ra-Ta*jb)*Ka)/Za,C.context.transform(bb,cb,Lb,db,fb,gb),C.context.drawImage(Ga,
0,0,Ga.width,Ga.height),C.context.restore(),ve+=3))}break;case 14:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=
1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=Z.LINE_BITMAP_STYLE;var Fb=p;b&&C.hasStroke&&C.closePath(!0);C.context.moveTo(f-c,g-d);if(Fb.buffer.o[Fb.oPos].readable)C.context.strokeStyle=C.createBitmapFill(Fb.buffer.o[Fb.oPos],Fb.buffer.b[Fb.bPos],Fb.buffer.b[Fb.bPos+1]);else{var hb=O.hex(0,6);C.context.strokeStyle="#"+hb}C.hasStroke=!0;break;case 15:switch(p.prev._hx_index){case 0:p.oPos+=
2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=
2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=Z.LINE_GRADIENT_STYLE;var Va=p;b&&C.hasStroke&&C.closePath(!0);C.context.moveTo(f-c,g-d);C.context.strokeStyle=C.createGradientPattern(Va.buffer.o[Va.oPos],Va.buffer.ii[Va.iiPos],Va.buffer.ff[Va.ffPos],Va.buffer.ii[Va.iiPos+1],Va.buffer.o[Va.oPos+1],Va.buffer.o[Va.oPos+2],Va.buffer.o[Va.oPos+3],Va.buffer.f[Va.fPos]);C.setSmoothing(!0);C.hasStroke=!0;break;case 16:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=
1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=
1}p.prev=Z.LINE_STYLE;var Ja=p;b&&C.hasStroke&&C.closePath(!0);C.context.moveTo(f-c,g-d);if(null==Ja.buffer.o[Ja.oPos])C.hasStroke=!1;else{C.context.lineWidth=0<Ja.buffer.o[Ja.oPos]?Ja.buffer.o[Ja.oPos]:1;var vd=null==Ja.buffer.o[Ja.oPos+3]?"round":(null==Ja.buffer.o[Ja.oPos+3]?"null":yo.toString(Ja.buffer.o[Ja.oPos+3])).toLowerCase();C.context.lineJoin=vd;var kb=null==Ja.buffer.o[Ja.oPos+2]?"round":0==Ja.buffer.o[Ja.oPos+2]?"butt":(null==Ja.buffer.o[Ja.oPos+2]?"null":vo.toString(Ja.buffer.o[Ja.oPos+
2])).toLowerCase();C.context.lineCap=kb;C.context.miterLimit=Ja.buffer.f[Ja.fPos+1];if(1==Ja.buffer.f[Ja.fPos]){var lb=O.hex(Ja.buffer.i[Ja.iPos]&16777215,6);C.context.strokeStyle="#"+lb}else Y=(Ja.buffer.i[Ja.iPos]&16711680)>>>16,B=(Ja.buffer.i[Ja.iPos]&65280)>>>8,H=Ja.buffer.i[Ja.iPos]&255,C.context.strokeStyle="rgba("+Y+", "+B+", "+H+", "+Ja.buffer.f[Ja.fPos]+")";C.setSmoothing(!0);C.hasStroke=!0}break;case 17:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;
break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=
1}p.prev=Z.LINE_TO;var Ub=p;r=!0;C.context.lineTo(Ub.buffer.f[Ub.fPos]-c,Ub.buffer.f[Ub.fPos+1]-d);f=Ub.buffer.f[Ub.fPos];g=Ub.buffer.f[Ub.fPos+1];f==l&&g==m&&(k=!0);break;case 18:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=
5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=Z.MOVE_TO;var ab=p;C.context.moveTo(ab.buffer.f[ab.fPos]-c,ab.buffer.f[ab.fPos+1]-d);f=ab.buffer.f[ab.fPos];g=ab.buffer.f[ab.fPos+1];h&&ab.buffer.f[ab.fPos]!=l&&ab.buffer.f[ab.fPos+1]!=m&&(k=!0);l=ab.buffer.f[ab.fPos];
m=ab.buffer.f[ab.fPos+1];h=!0;break;case 21:C.windingRule="evenodd";break;case 22:C.windingRule="nonzero";break;default:switch(p.prev._hx_index){case 0:p.oPos+=2;p.bPos+=2;break;case 1:p.iPos+=1;p.fPos+=1;break;case 2:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 3:p.oPos+=1;break;case 4:p.fPos+=6;break;case 5:p.fPos+=4;break;case 6:p.fPos+=3;break;case 7:p.fPos+=4;break;case 8:p.oPos+=3;break;case 9:p.fPos+=4;break;case 10:p.fPos+=5;p.oPos+=1;break;case 12:p.oPos+=4;break;case 14:p.oPos+=
2;p.bPos+=2;break;case 15:p.oPos+=4;p.iiPos+=2;p.ffPos+=1;p.fPos+=1;break;case 16:p.oPos+=4;p.iPos+=1;p.fPos+=2;p.bPos+=1;break;case 17:p.fPos+=2;break;case 18:p.fPos+=2;break;case 19:p.oPos+=1;break;case 20:p.oPos+=1}p.prev=E}}null!=t&&Ya.__pool.release(t);null!=A&&Ya.__pool.release(A);p.destroy();if(r){if(b&&C.hasStroke){if(C.hasFill){if(f!=l||g!=m)C.context.lineTo(l-c,m-d),k=!0;k&&C.closePath(!0)}else k&&f==l&&g==m&&C.closePath(!0);C.hitTesting||C.context.stroke()}b||!C.hasFill&&null==C.bitmapFill||
(C.context.translate(-C.bounds.x,-C.bounds.y),null!=C.pendingMatrix?(C.context.transform(C.pendingMatrix.a,C.pendingMatrix.b,C.pendingMatrix.c,C.pendingMatrix.d,C.pendingMatrix.tx,C.pendingMatrix.ty),C.hitTesting||C.context.fill(C.windingRule),C.context.transform(C.inversePendingMatrix.a,C.inversePendingMatrix.b,C.inversePendingMatrix.c,C.inversePendingMatrix.d,C.inversePendingMatrix.tx,C.inversePendingMatrix.ty)):C.hitTesting||C.context.fill(C.windingRule),C.context.translate(C.bounds.x,C.bounds.y),
C.context.closePath())}};C.render=function(a,b){a.__update(b.__worldTransform,b.__pixelRatio);if(a.__softwareDirty){C.hitTesting=!1;C.graphics=a;C.allowSmoothing=b.__allowSmoothing;C.worldAlpha=b.__getAlpha(a.__owner.__worldAlpha);C.bounds=a.__bounds;var c=a.__width,d=a.__height;if(!a.__visible||0==a.__commands.get_length()||null==C.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"));
C.context=a.__context;var f=a.__renderTransform,g=a.__canvas,k=b.__pixelRatio,l=c*k|0,m=d*k|0;b.__setBlendModeContext(C.context,10);b.__isDOM?(g.width==l&&g.height==m?C.context.clearRect(0,0,l,m):(g.width=l,g.height=m,g.style.width=c+"px",g.style.height=d+"px"),c=a.__renderTransform,C.context.setTransform(c.a*k,c.b*k,c.c*k,c.d*k,c.tx*k,c.ty*k)):(g.width==l&&g.height==m?(C.context.closePath(),C.context.setTransform(1,0,0,1,0,0),C.context.clearRect(0,0,l,m)):(g.width=c,g.height=d),C.context.setTransform(f.a,
f.b,f.c,f.d,f.tx,f.ty));C.fillCommands.clear();C.strokeCommands.clear();C.hasFill=!1;C.hasStroke=!1;C.bitmapFill=null;k=C.bitmapRepeat=!1;d=c=0;C.windingRule="evenodd";f=new qf(a.__commands);g=0;for(l=a.__commands.types;g<l.length;)switch(m=l[g],++g,m._hx_index){case 0:case 1:case 2:case 3:C.endFill();C.endStroke();if(m==Z.BEGIN_BITMAP_FILL){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=Z.BEGIN_BITMAP_FILL;m=f;C.fillCommands.beginBitmapFill(m.buffer.o[m.oPos],
m.buffer.o[m.oPos+1],m.buffer.b[m.bPos],m.buffer.b[m.bPos+1]);C.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==Z.BEGIN_GRADIENT_FILL){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=Z.BEGIN_GRADIENT_FILL;m=f;C.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]);C.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==Z.BEGIN_SHADER_FILL){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=Z.BEGIN_SHADER_FILL;m=f;C.fillCommands.beginShaderFill(m.buffer.o[m.oPos]);C.strokeCommands.beginShaderFill(m.buffer.o[m.oPos])}else{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=Z.BEGIN_FILL;m=f;C.fillCommands.beginFill(m.buffer.i[m.iPos],m.buffer.f[m.fPos]);C.strokeCommands.beginFill(m.buffer.i[m.iPos],m.buffer.f[m.fPos])}break;case 4: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=Z.CUBIC_CURVE_TO;m=f;C.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]);k?C.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(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=Z.CURVE_TO;m=f;C.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]);k?C.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(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=Z.DRAW_CIRCLE;m=f;C.fillCommands.drawCircle(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2]);k&&C.strokeCommands.drawCircle(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1],m.buffer.f[m.fPos+2]);break;case 7: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=Z.DRAW_ELLIPSE;m=f;C.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]);k&&C.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(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=Z.DRAW_QUADS;m=f;C.fillCommands.drawQuads(m.buffer.o[m.oPos],m.buffer.o[m.oPos+1],m.buffer.o[m.oPos+2]);break;case 9: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=Z.DRAW_RECT;
m=f;C.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]);k&&C.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(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=Z.DRAW_ROUND_RECT;m=f;C.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]);
k&&C.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(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=Z.DRAW_TRIANGLES;m=f;C.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(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=Z.END_FILL;C.endFill();C.endStroke();k=C.hasFill=!1;C.bitmapFill=null;d=c=0;break;case 14: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=Z.LINE_BITMAP_STYLE;m=f;k||0==c&&0==d||(C.strokeCommands.moveTo(c,d),d=c=0);k=!0;C.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(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=Z.LINE_GRADIENT_STYLE;
m=f;k||0==c&&0==d||(C.strokeCommands.moveTo(c,d),d=c=0);k=!0;C.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(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=Z.LINE_STYLE;m=f;k||null==m.buffer.o[m.oPos]||0==c&&0==d||(C.strokeCommands.moveTo(c,d),d=c=0);k=null!=m.buffer.o[m.oPos];C.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(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=Z.LINE_TO;m=f;C.fillCommands.lineTo(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1]);k?C.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(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=Z.MOVE_TO;m=f;C.fillCommands.moveTo(m.buffer.f[m.fPos],m.buffer.f[m.fPos+1]);k?C.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(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=Z.OVERRIDE_BLEND_MODE;m=f;b.__setBlendModeContext(C.context,m.buffer.o[m.oPos]);break;case 21: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=Z.WINDING_EVEN_ODD;C.fillCommands.windingEvenOdd();C.windingRule="evenodd";break;case 22: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=Z.WINDING_NON_ZERO;C.fillCommands.windingNonZero();C.windingRule="nonzero";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=m}0<C.fillCommands.get_length()&&C.endFill();0<C.strokeCommands.get_length()&&C.endStroke();
f.destroy();a.__bitmap=ma.fromCanvas(a.__canvas)}a.__softwareDirty=!1;a.set___dirty(!1);C.graphics=null}};C.renderMask=function(a,b){if(0!=a.__commands.get_length()){C.context=b.context;b=new qf(a.__commands);var c=0;for(a=a.__commands.types;c<a.length;){var d=a[c];++c;switch(d._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=Z.CUBIC_CURVE_TO;d=b;C.context.bezierCurveTo(d.buffer.f[d.fPos]-0,d.buffer.f[d.fPos+1]-0,d.buffer.f[d.fPos+
2]-0,d.buffer.f[d.fPos+3]-0,d.buffer.f[d.fPos+4]-0,d.buffer.f[d.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=Z.CURVE_TO;d=b;C.context.quadraticCurveTo(d.buffer.f[d.fPos]-0,d.buffer.f[d.fPos+1]-0,d.buffer.f[d.fPos+2]-0,d.buffer.f[d.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=Z.DRAW_CIRCLE;d=b;C.context.arc(d.buffer.f[d.fPos]-0,d.buffer.f[d.fPos+
1]-0,d.buffer.f[d.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=Z.DRAW_ELLIPSE;var f=b;d=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];d-=0;g-=0;f=k/2*.5522848;var m=l/2*.5522848;var h=d+k;var r=g+l;k=d+k/2;l=g+l/2;C.context.moveTo(d,l);C.context.bezierCurveTo(d,l-m,k-f,g,k,g);C.context.bezierCurveTo(k+f,g,h,l-m,h,l);C.context.bezierCurveTo(h,l+m,k+f,
r,k,r);C.context.bezierCurveTo(k-f,r,d,l+m,d,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=Z.DRAW_RECT;d=b;C.context.beginPath();C.context.rect(d.buffer.f[d.fPos]-0,d.buffer.f[d.fPos+1]-0,d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3]);C.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=Z.DRAW_ROUND_RECT;d=b;C.drawRoundRect(d.buffer.f[d.fPos]-0,d.buffer.f[d.fPos+
1]-0,d.buffer.f[d.fPos+2],d.buffer.f[d.fPos+3],d.buffer.f[d.fPos+4],d.buffer.o[d.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=Z.LINE_TO;d=b;C.context.lineTo(d.buffer.f[d.fPos]-0,d.buffer.f[d.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=Z.MOVE_TO;d=b;C.context.moveTo(d.buffer.f[d.fPos]-0,d.buffer.f[d.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=d}}b.destroy()}};C.setSmoothing=function(a){C.allowSmoothing||(a=!1);C.context.imageSmoothingEnabled!=a&&(C.context.imageSmoothingEnabled=a)};var Do=function(){};h["openfl.display._internal.CanvasShape"]=Do;Do.__name__="openfl.display._internal.CanvasShape";Do.render=function(a,b){if(a.__renderable){var c=b.__getAlpha(a.__worldAlpha);if(!(0>=c)){var d=a.__graphics;if(null!=d){C.render(d,b);var f=d.__width,g=d.__height,k=d.__canvas;if(null!=
k&&d.__visible&&1<=f&&1<=g){var l=d.__worldTransform,m=b.context,h=a.__scrollRect,r=a.__worldScale9Grid;if(null==h||0<h.width&&0<h.height){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);m.globalAlpha=c;if(null!=r&&0==l.b&&0==l.c){var p=b.__pixelRatio;c=wa.__pool.get();c.translate(l.tx,l.ty);b.setTransform(c,m);wa.__pool.release(c);c=d.__bounds;var w=d.__renderTransform.a/d.__bitmapScale,u=d.__renderTransform.d/d.__bitmapScale,n=w*l.a,t=u*l.d;l=Math.max(1,Math.round(r.x*w));d=Math.round(r.y*
u);h=Math.max(1,Math.round((c.get_right()-r.get_right())*w));var A=Math.round((c.get_bottom()-r.get_bottom())*u);w=Math.round(r.width*w);r=Math.round(r.height*u);u=Math.round(l/p);var q=Math.round(d/p),y=Math.round(h/p);p=Math.round(A/p);n=c.width*n-u-y;c=c.height*t-q-p;b.applySmoothing(m,!1);0!=w&&0!=r?(m.drawImage(k,0,0,l,d,0,0,u,q),m.drawImage(k,l,0,w,d,u,0,n,q),m.drawImage(k,l+w,0,h,d,u+n,0,y,q),m.drawImage(k,0,d,l,r,0,q,u,c),m.drawImage(k,l,d,w,r,u,q,n,c),m.drawImage(k,l+w,d,h,r,u+n,q,y,c),m.drawImage(k,
0,d+r,l,A,0,q+c,u,p),m.drawImage(k,l,d+r,w,A,u,q+c,n,p),m.drawImage(k,l+w,d+r,h,A,u+n,q+c,y,p)):0==w&&0!=r?(g=u+n+y,m.drawImage(k,0,0,f,d,0,0,g,q),m.drawImage(k,0,d,f,r,0,q,g,c),m.drawImage(k,0,d+r,f,A,0,q+c,g,p)):0==r&&0!=w&&(f=q+c+p,m.drawImage(k,0,0,l,g,0,0,u,f),m.drawImage(k,l,0,w,g,u,0,n,f),m.drawImage(k,l+w,0,h,g,u+n,0,y,f))}else b.setTransform(l,m),m.drawImage(k,0,0,f,g);b.__popMaskObject(a)}}}}}};var pl=function(){};h["openfl.display._internal.CanvasSimpleButton"]=pl;pl.__name__="openfl.display._internal.CanvasSimpleButton";
pl.renderDrawable=function(a,b){!a.__renderable||0>=a.__worldAlpha||null==a.__currentState||(b.__pushMaskObject(a),b.__renderDrawable(a.__currentState),b.__popMaskObject(a),b.__renderEvent(a))};pl.renderDrawableMask=function(a,b){b.__renderDrawableMask(a.__currentState)};var U=function(){};h["openfl.display._internal.CanvasTextField"]=U;U.__name__="openfl.display._internal.CanvasTextField";U.context=null;U.clearRect=null;U.render=function(a,b,c){c=a.__textEngine;var d=!(c.background||c.border),f=
d?c.textBounds:c.bounds,g=a.__graphics,k=0;if(a.__dirty){a.__updateLayout();null==g.__bounds&&(g.__bounds=new ea);if(0==a.get_text().length){k=c.bounds.width-4;var l=a.get_defaultTextFormat().align;k=3==l?0:4==l?k:k/2;switch(l){case 0:k+=a.get_defaultTextFormat().leftMargin/2;k-=a.get_defaultTextFormat().rightMargin/2;k+=a.get_defaultTextFormat().indent/2;k+=a.get_defaultTextFormat().blockIndent/2;break;case 2:k+=a.get_defaultTextFormat().leftMargin;k+=a.get_defaultTextFormat().indent;k+=a.get_defaultTextFormat().blockIndent;
break;case 3:k+=a.get_defaultTextFormat().leftMargin;k+=a.get_defaultTextFormat().indent;k+=a.get_defaultTextFormat().blockIndent;break;case 4:k-=a.get_defaultTextFormat().rightMargin}d&&(f.y=c.bounds.y,f.x=k)}g.__bounds.copyFrom(f)}l=b.__pixelRatio;g.__update(b.__worldTransform,l);if(a.__dirty||g.__softwareDirty){var m=Math.round(g.__width*l),h=Math.round(g.__height*l);if(!(null!=c.text&&""!=c.text||c.background||c.border||c.__hasFocus||1==c.type&&c.selectable)||(0>=c.width||0>=c.height)&&2!=c.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"));U.context=g.__context;g.__canvas.width=m;g.__canvas.height=h;b.__isDOM&&(g.__canvas.style.width=Math.round(m/l)+"px",g.__canvas.style.height=Math.round(h/l)+"px");m=wa.__pool.get();m.scale(l,l);m.concat(g.__renderTransform);
U.context.setTransform(m.a,m.b,m.c,m.d,m.tx,m.ty);wa.__pool.release(m);null==U.clearRect&&(U.clearRect="undefined"!==typeof navigator&&"undefined"!==typeof navigator.isCocoonJS);U.clearRect&&U.context.clearRect(0,0,g.__canvas.width,g.__canvas.height);if(null!=c.text&&""!=c.text||c.__hasFocus){d=c.text;g.__context.imageSmoothingEnabled=!b.__allowSmoothing||0==c.antiAliasType&&400==c.sharpness?!1:!0;if(c.border||c.background){U.context.rect(.5,.5,f.width-1,f.height-1);if(c.background){var r=O.hex(c.backgroundColor&
16777215,6);U.context.fillStyle="#"+r;U.context.fill()}c.border&&(U.context.lineWidth=1,r=O.hex(c.borderColor&16777215,6),U.context.strokeStyle="#"+r,U.context.stroke())}U.context.textBaseline="alphabetic";U.context.textAlign="start";b=-a.get_scrollH();var p=k=0;for(r=a.get_scrollV()-1;p<r;){var w=p++;k-=c.lineHeights.get(w)}var u;for(m=c.layoutGroups.iterator();m.hasNext();)if(h=m.next(),!(h.lineIndex<a.get_scrollV()-1)){if(h.lineIndex>c.get_bottomScrollV()-1)break;var n="#"+O.hex(h.format.color&
16777215,6);U.context.font=Jb.getFont(h.format);U.context.fillStyle=n;U.context.fillText(d.substring(h.startIndex,h.endIndex),h.offsetX+b-f.x,h.offsetY+h.ascent+k-f.y);if(-1<a.__caretIndex&&c.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&h.startIndex<=a.__caretIndex&&h.endIndex>=a.__caretIndex){p=u=0;for(r=a.__caretIndex-h.startIndex;p<r;){w=p++;if(h.positions.length<=w)break;u+=h.positions[w]}p=0;r=a.get_scrollV();for(w=h.lineIndex+1;r<w;){var t=r++;p+=c.lineHeights.get(t-
1)}U.context.beginPath();r=O.hex(h.format.color&16777215,6);U.context.strokeStyle="#"+r;U.context.moveTo(h.offsetX+u-a.get_scrollH()-f.x,p+2-f.y);U.context.lineWidth=1;U.context.lineTo(h.offsetX+u-a.get_scrollH()-f.x,p+Jb.getFormatHeight(a.get_defaultTextFormat())-1-f.y);U.context.stroke();U.context.closePath()}}else if(h.startIndex<=a.__caretIndex&&h.endIndex>=a.__caretIndex||h.startIndex<=a.__selectionIndex&&h.endIndex>=a.__selectionIndex||h.startIndex>a.__caretIndex&&h.endIndex<a.__selectionIndex||
h.startIndex>a.__selectionIndex&&h.endIndex<a.__caretIndex)u=Math.min(a.__selectionIndex,a.__caretIndex)|0,p=Math.max(a.__selectionIndex,a.__caretIndex)|0,h.startIndex>u&&(u=h.startIndex),h.endIndex<p&&(p=h.endIndex),w=a.getCharBoundaries(u),p>=h.endIndex?(r=a.getCharBoundaries(h.endIndex-1),null!=r&&(r.x+=r.width+2)):r=a.getCharBoundaries(p),null!=w&&null!=r&&(U.context.fillStyle="#000000",U.context.fillRect(w.x+b-f.x,w.y+k,r.x-w.x,h.height),U.context.fillStyle="#FFFFFF",U.context.fillText(d.substring(u,
p),b+w.x-f.x,h.offsetY+h.ascent+k));h.format.underline&&(U.context.beginPath(),U.context.strokeStyle=n,U.context.lineWidth=1,n=h.offsetX+b-f.x,u=Math.ceil(h.offsetY+k+h.ascent-f.y)+Math.floor(.185*h.ascent)+.5,U.context.moveTo(n,u),U.context.lineTo(n+h.width,u),U.context.stroke(),U.context.closePath())}}else{if(c.border||c.background)c.border?U.context.rect(.5,.5,f.width-1,f.height-1):U.context.rect(0,0,f.width,f.height),c.background&&(r=O.hex(c.backgroundColor&16777215,6),U.context.fillStyle="#"+
r,U.context.fill()),c.border&&(U.context.lineWidth=1,U.context.lineCap="square",r=O.hex(c.borderColor&16777215,6),U.context.strokeStyle="#"+r,U.context.stroke());if(-1<a.__caretIndex&&c.selectable&&a.__showCursor){b=-a.get_scrollH()+(d?0:k);p=k=0;for(r=a.get_scrollV()-1;p<r;)w=p++,k+=c.lineHeights.get(w);U.context.beginPath();r=O.hex(a.get_defaultTextFormat().color&16777215,6);U.context.strokeStyle="#"+r;U.context.moveTo(b+2.5,k+2.5);U.context.lineWidth=1;U.context.lineTo(b+2.5,k+Jb.getFormatHeight(a.get_defaultTextFormat())-
1);U.context.stroke();U.context.closePath()}}g.__bitmap=ma.fromCanvas(a.__graphics.__canvas);g.__bitmapScale=l;g.__visible=!0;a.__dirty=!1;g.__softwareDirty=!1;g.set___dirty(!1)}}};U.renderDrawable=function(a,b){b.__isDOM&&!a.__renderedOnCanvasWhileOnDOM&&(a.__renderedOnCanvasWhileOnDOM=!0,1==a.get_type()&&a.replaceText(0,a.__text.length,a.__text),a.__isHTML&&a.__updateText(gb.parse(a.__text,a.get_multiline(),a.__styleSheet,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(b.__updateCacheBitmap(a,a.__dirty),null==a.__cacheBitmap||a.__isCacheBitmapRender){var c=a.__textEngine,d=!(c.background||c.border),f=d?c.textBounds:c.bounds,g=a.__graphics,k=0;if(a.__dirty){a.__updateLayout();null==g.__bounds&&(g.__bounds=new ea);if(0==a.get_text().length){var l=c.bounds.width-4,m=a.get_defaultTextFormat().align;k=3==m?0:4==m?l:l/
2;switch(m){case 0:k+=a.get_defaultTextFormat().leftMargin/2;k-=a.get_defaultTextFormat().rightMargin/2;k+=a.get_defaultTextFormat().indent/2;k+=a.get_defaultTextFormat().blockIndent/2;break;case 2:k+=a.get_defaultTextFormat().leftMargin;k+=a.get_defaultTextFormat().indent;k+=a.get_defaultTextFormat().blockIndent;break;case 3:k+=a.get_defaultTextFormat().leftMargin;k+=a.get_defaultTextFormat().indent;k+=a.get_defaultTextFormat().blockIndent;break;case 4:k-=a.get_defaultTextFormat().rightMargin}d&&
(f.y=c.bounds.y,f.x=k)}g.__bounds.copyFrom(f)}m=b.__pixelRatio;g.__update(b.__worldTransform,m);if(a.__dirty||g.__softwareDirty){l=Math.round(g.__width*m);var h=Math.round(g.__height*m);if(!(null!=c.text&&""!=c.text||c.background||c.border||c.__hasFocus||1==c.type&&c.selectable)||(0>=c.width||0>=c.height)&&2!=c.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"));U.context=g.__context;g.__canvas.width=l;g.__canvas.height=h;b.__isDOM&&(g.__canvas.style.width=Math.round(l/m)+"px",g.__canvas.style.height=Math.round(h/m)+"px");var r=wa.__pool.get();r.scale(m,m);r.concat(g.__renderTransform);U.context.setTransform(r.a,r.b,r.c,r.d,r.tx,r.ty);wa.__pool.release(r);null==U.clearRect&&(U.clearRect="undefined"!==typeof navigator&&"undefined"!==
typeof navigator.isCocoonJS);U.clearRect&&U.context.clearRect(0,0,g.__canvas.width,g.__canvas.height);if(null!=c.text&&""!=c.text||c.__hasFocus){l=c.text;g.__context.imageSmoothingEnabled=!b.__allowSmoothing||0==c.antiAliasType&&400==c.sharpness?!1:!0;if(c.border||c.background){U.context.rect(.5,.5,f.width-1,f.height-1);if(c.background){var p=O.hex(c.backgroundColor&16777215,6);U.context.fillStyle="#"+p;U.context.fill()}c.border&&(U.context.lineWidth=1,p=O.hex(c.borderColor&16777215,6),U.context.strokeStyle=
"#"+p,U.context.stroke())}U.context.textBaseline="alphabetic";U.context.textAlign="start";h=-a.get_scrollH();var w=d=0;for(p=a.get_scrollV()-1;w<p;){var u=w++;d-=c.lineHeights.get(u)}var n;for(k=c.layoutGroups.iterator();k.hasNext();){var t=k.next();if(!(t.lineIndex<a.get_scrollV()-1)){if(t.lineIndex>c.get_bottomScrollV()-1)break;r="#"+O.hex(t.format.color&16777215,6);U.context.font=Jb.getFont(t.format);U.context.fillStyle=r;U.context.fillText(l.substring(t.startIndex,t.endIndex),t.offsetX+h-f.x,
t.offsetY+t.ascent+d-f.y);if(-1<a.__caretIndex&&c.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&t.startIndex<=a.__caretIndex&&t.endIndex>=a.__caretIndex){w=n=0;for(p=a.__caretIndex-t.startIndex;w<p;){u=w++;if(t.positions.length<=u)break;n+=t.positions[u]}w=0;p=a.get_scrollV();for(u=t.lineIndex+1;p<u;){var A=p++;w+=c.lineHeights.get(A-1)}U.context.beginPath();p=O.hex(t.format.color&16777215,6);U.context.strokeStyle="#"+p;U.context.moveTo(t.offsetX+n-a.get_scrollH()-f.x,w+2-f.y);
U.context.lineWidth=1;U.context.lineTo(t.offsetX+n-a.get_scrollH()-f.x,w+Jb.getFormatHeight(a.get_defaultTextFormat())-1-f.y);U.context.stroke();U.context.closePath()}}else if(t.startIndex<=a.__caretIndex&&t.endIndex>=a.__caretIndex||t.startIndex<=a.__selectionIndex&&t.endIndex>=a.__selectionIndex||t.startIndex>a.__caretIndex&&t.endIndex<a.__selectionIndex||t.startIndex>a.__selectionIndex&&t.endIndex<a.__caretIndex)n=Math.min(a.__selectionIndex,a.__caretIndex)|0,w=Math.max(a.__selectionIndex,a.__caretIndex)|
0,t.startIndex>n&&(n=t.startIndex),t.endIndex<w&&(w=t.endIndex),u=a.getCharBoundaries(n),w>=t.endIndex?(p=a.getCharBoundaries(t.endIndex-1),null!=p&&(p.x+=p.width+2)):p=a.getCharBoundaries(w),null!=u&&null!=p&&(U.context.fillStyle="#000000",U.context.fillRect(u.x+h-f.x,u.y+d,p.x-u.x,t.height),U.context.fillStyle="#FFFFFF",U.context.fillText(l.substring(n,w),h+u.x-f.x,t.offsetY+t.ascent+d));t.format.underline&&(U.context.beginPath(),U.context.strokeStyle=r,U.context.lineWidth=1,r=t.offsetX+h-f.x,n=
Math.ceil(t.offsetY+d+t.ascent-f.y)+Math.floor(.185*t.ascent)+.5,U.context.moveTo(r,n),U.context.lineTo(r+t.width,n),U.context.stroke(),U.context.closePath())}}}else{if(c.border||c.background)c.border?U.context.rect(.5,.5,f.width-1,f.height-1):U.context.rect(0,0,f.width,f.height),c.background&&(p=O.hex(c.backgroundColor&16777215,6),U.context.fillStyle="#"+p,U.context.fill()),c.border&&(U.context.lineWidth=1,U.context.lineCap="square",p=O.hex(c.borderColor&16777215,6),U.context.strokeStyle="#"+p,U.context.stroke());
if(-1<a.__caretIndex&&c.selectable&&a.__showCursor){h=-a.get_scrollH()+(d?0:k);w=d=0;for(p=a.get_scrollV()-1;w<p;)u=w++,d+=c.lineHeights.get(u);U.context.beginPath();p=O.hex(a.get_defaultTextFormat().color&16777215,6);U.context.strokeStyle="#"+p;U.context.moveTo(h+2.5,d+2.5);U.context.lineWidth=1;U.context.lineTo(h+2.5,d+Jb.getFormatHeight(a.get_defaultTextFormat())-1);U.context.stroke();U.context.closePath()}}g.__bitmap=ma.fromCanvas(a.__graphics.__canvas);g.__bitmapScale=m;g.__visible=!0;a.__dirty=
!1;g.__softwareDirty=!1;g.set___dirty(!1)}}d=!1;0==a.__textEngine.antiAliasType&&1==a.__textEngine.gridFitType&&(d=b.context.imageSmoothingEnabled)&&(b.context.imageSmoothingEnabled=!1);if((null!=a.opaqueBackground||null!=a.__graphics)&&a.__renderable&&(f=b.__getAlpha(a.__worldAlpha),!(0>=f)&&(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()&&(b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),c=b.context,b.setTransform(a.__renderTransform,c),r=a.opaqueBackground,
c.fillStyle="rgb("+(r>>>16&255)+","+(r>>>8&255)+","+(r&255)+")",c.fillRect(0,0,a.get_width(),a.get_height()),b.__popMaskObject(a)),null!=a.__graphics&&a.__renderable&&(f=b.__getAlpha(a.__worldAlpha),!(0>=f)&&(g=a.__graphics,null!=g&&(C.render(g,b),l=g.__width,h=g.__height,k=g.__canvas,null!=k&&g.__visible&&1<=l&&1<=h&&(t=g.__worldTransform,c=b.context,m=a.__scrollRect,A=a.__worldScale9Grid,null==m||0<m.width&&0<m.height))))))){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);c.globalAlpha=
f;if(null!=A&&0==t.b&&0==t.c){m=b.__pixelRatio;r=wa.__pool.get();r.translate(t.tx,t.ty);b.setTransform(r,c);wa.__pool.release(r);f=g.__bounds;w=g.__renderTransform.a/g.__bitmapScale;var q=g.__renderTransform.d/g.__bitmapScale;p=w*t.a;u=q*t.d;g=Math.max(1,Math.round(A.x*w));t=Math.round(A.y*q);r=Math.max(1,Math.round((f.get_right()-A.get_right())*w));n=Math.round((f.get_bottom()-A.get_bottom())*q);w=Math.round(A.width*w);A=Math.round(A.height*q);q=Math.round(g/m);var y=Math.round(t/m),E=Math.round(r/
m);m=Math.round(n/m);p=f.width*p-q-E;f=f.height*u-y-m;b.applySmoothing(c,!1);0!=w&&0!=A?(c.drawImage(k,0,0,g,t,0,0,q,y),c.drawImage(k,g,0,w,t,q,0,p,y),c.drawImage(k,g+w,0,r,t,q+p,0,E,y),c.drawImage(k,0,t,g,A,0,y,q,f),c.drawImage(k,g,t,w,A,q,y,p,f),c.drawImage(k,g+w,t,r,A,q+p,y,E,f),c.drawImage(k,0,t+A,g,n,0,y+f,q,m),c.drawImage(k,g,t+A,w,n,q,y+f,p,m),c.drawImage(k,g+w,t+A,r,n,q+p,y+f,E,m)):0==w&&0!=A?(g=q+p+E,c.drawImage(k,0,0,l,t,0,0,g,y),c.drawImage(k,0,t,l,A,0,y,g,f),c.drawImage(k,0,t+A,l,n,0,
y+f,g,m)):0==A&&0!=w&&(f=y+f+m,c.drawImage(k,0,0,g,h,0,0,q,f),c.drawImage(k,g,0,w,h,q,0,p,f),c.drawImage(k,g+w,0,r,h,q+p,0,E,f))}else b.setTransform(t,c),c.drawImage(k,0,0,l,h);b.__popMaskObject(a)}d&&(b.context.imageSmoothingEnabled=!0)}else a=a.__cacheBitmap,a.__renderable&&(f=b.__getAlpha(a.__worldAlpha),0<f&&null!=a.__bitmapData&&a.__bitmapData.__isValid&&a.__bitmapData.readable&&(c=b.context,b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a,!1),ya.convertToCanvas(a.__bitmapData.image),
c.globalAlpha=f,m=a.__scrollRect,b.setTransform(a.__renderTransform,c),b.__allowSmoothing&&a.smoothing||(c.imageSmoothingEnabled=!1),null==m?c.drawImage(a.__bitmapData.image.get_src(),0,0,a.__bitmapData.image.width,a.__bitmapData.image.height):c.drawImage(a.__bitmapData.image.get_src(),m.x,m.y,m.width,m.height,m.x,m.y,m.width,m.height),b.__allowSmoothing&&a.smoothing||(c.imageSmoothingEnabled=!0),b.__popMaskObject(a,!1)))};U.renderDrawableMask=function(a,b){Yg.renderDrawableMask(a,b)};var pf=function(){};
h["openfl.display._internal.CanvasTilemap"]=pf;pf.__name__="openfl.display._internal.CanvasTilemap";pf.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 f=ea.__pool.get();f.setTo(0,0,a.__width,a.__height);b.__pushMaskRect(f,a.__renderTransform);b.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=!1);pf.renderTileContainer(a.__group,b,a.__renderTransform,
a.__tileset,b.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,c,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,f);b.__allowSmoothing&&a.smoothing||(d.imageSmoothingEnabled=!0);b.__popMaskRect();b.__popMaskObject(a);ea.__pool.release(f)}}};pf.renderTileContainer=function(a,b,c,d,f,g,k,l,m,h,r,p){var w=b.context,u=b.__roundPixels,z=wa.__pool.get(),n=a.__tiles,t,A=null,q=0;for(a=a.__length;q<a;){var y=q++;var E=n[y];z.setTo(1,0,0,1,-E.get_originX(),-E.get_originY());z.concat(E.get_matrix());z.concat(c);
u&&(z.tx=Math.round(z.tx),z.ty=Math.round(z.ty));var L=null!=E.get_tileset()?E.get_tileset():d;y=E.get_alpha()*k;if((t=E.get_visible())&&!(0>=y))if(g||(y=1),l&&(A=null!=E.__blendMode?E.__blendMode:m),0<E.__length)pf.renderTileContainer(E,b,z,L,f,g,y,l,A,h,r,p);else if(null!=L){t=E.get_id();if(-1==t){if(E=E.__rect,null==E||0>=E.width||0>=E.height)continue}else{E=L.__data[t];if(null==E)continue;p.setTo(E.x,E.y,E.width,E.height);E=p}L=L.__bitmapData;null!=L&&null!=L.image&&(L!=h&&(null==L.image.buffer.__srcImage&&
ya.convertToCanvas(L.image),r=L.image.get_src(),h=L),w.globalAlpha=y,l&&b.__setBlendMode(A),b.setTransform(z,w),w.drawImage(r,E.x,E.y,E.width,E.height,0,0,E.width,E.height))}}wa.__pool.release(z)};pf.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){if(!(null==a.opaqueBackground&&null==a.__graphics||!a.__renderable||(A=b.__getAlpha(a.__worldAlpha),0>=A))){if(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){b.__setBlendMode(a.__worldBlendMode);
b.__pushMaskObject(a);q=b.context;b.setTransform(a.__renderTransform,q);var c=a.opaqueBackground;q.fillStyle="rgb("+(c>>>16&255)+","+(c>>>8&255)+","+(c&255)+")";q.fillRect(0,0,a.get_width(),a.get_height());b.__popMaskObject(a)}if(null!=a.__graphics&&a.__renderable&&(A=b.__getAlpha(a.__worldAlpha),!(0>=A))){var d=a.__graphics;if(null!=d){C.render(d,b);var f=d.__width,g=d.__height;c=d.__canvas;if(null!=c&&d.__visible&&1<=f&&1<=g){var k=d.__worldTransform;q=b.context;y=a.__scrollRect;var l=a.__worldScale9Grid;
if(null==y||0<y.width&&0<y.height){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);q.globalAlpha=A;if(null!=l&&0==k.b&&0==k.c){var m=b.__pixelRatio;A=wa.__pool.get();A.translate(k.tx,k.ty);b.setTransform(A,q);wa.__pool.release(A);A=d.__bounds;var h=d.__renderTransform.a/d.__bitmapScale,r=d.__renderTransform.d/d.__bitmapScale,p=h*k.a,w=r*k.d;k=Math.max(1,Math.round(l.x*h));d=Math.round(l.y*r);y=Math.max(1,Math.round((A.get_right()-l.get_right())*h));var u=Math.round((A.get_bottom()-l.get_bottom())*
r);h=Math.round(l.width*h);l=Math.round(l.height*r);r=Math.round(k/m);var n=Math.round(d/m),t=Math.round(y/m);m=Math.round(u/m);p=A.width*p-r-t;A=A.height*w-n-m;b.applySmoothing(q,!1);0!=h&&0!=l?(q.drawImage(c,0,0,k,d,0,0,r,n),q.drawImage(c,k,0,h,d,r,0,p,n),q.drawImage(c,k+h,0,y,d,r+p,0,t,n),q.drawImage(c,0,d,k,l,0,n,r,A),q.drawImage(c,k,d,h,l,r,n,p,A),q.drawImage(c,k+h,d,y,l,r+p,n,t,A),q.drawImage(c,0,d+l,k,u,0,n+A,r,m),q.drawImage(c,k,d+l,h,u,r,n+A,p,m),q.drawImage(c,k+h,d+l,y,u,r+p,n+A,t,m)):0==
h&&0!=l?(g=r+p+t,q.drawImage(c,0,0,f,d,0,0,g,n),q.drawImage(c,0,d,f,l,0,n,g,A),q.drawImage(c,0,d+l,f,u,0,n+A,g,m)):0==l&&0!=h&&(f=n+A+m,q.drawImage(c,0,0,k,g,0,0,r,f),q.drawImage(c,k,0,h,g,r,0,p,f),q.drawImage(c,k+h,0,y,g,r+p,0,t,f))}else b.setTransform(k,q),q.drawImage(c,0,0,f,g);b.__popMaskObject(a)}}}}}a.__renderable&&0!=a.__group.__tiles.length&&(A=b.__getAlpha(a.__worldAlpha),0>=A||(q=b.context,b.__setBlendMode(a.__worldBlendMode),b.__pushMaskObject(a),c=ea.__pool.get(),c.setTo(0,0,a.__width,
a.__height),b.__pushMaskRect(c,a.__renderTransform),b.__allowSmoothing&&a.smoothing||(q.imageSmoothingEnabled=!1),pf.renderTileContainer(a.__group,b,a.__renderTransform,a.__tileset,b.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,A,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,c),b.__allowSmoothing&&a.smoothing||(q.imageSmoothingEnabled=!0),b.__popMaskRect(),b.__popMaskObject(a),ea.__pool.release(c)))}else if(c=a.__cacheBitmap,c.__renderable){var A=b.__getAlpha(c.__worldAlpha);if(0<A&&null!=
c.__bitmapData&&c.__bitmapData.__isValid&&c.__bitmapData.readable){var q=b.context;b.__setBlendMode(c.__worldBlendMode);b.__pushMaskObject(c,!1);ya.convertToCanvas(c.__bitmapData.image);q.globalAlpha=A;var y=c.__scrollRect;b.setTransform(c.__renderTransform,q);b.__allowSmoothing&&c.smoothing||(q.imageSmoothingEnabled=!1);null==y?q.drawImage(c.__bitmapData.image.get_src(),0,0,c.__bitmapData.image.width,c.__bitmapData.image.height):q.drawImage(c.__bitmapData.image.get_src(),y.x,y.y,y.width,y.height,
y.x,y.y,y.width,y.height);b.__allowSmoothing&&c.smoothing||(q.imageSmoothingEnabled=!0);b.__popMaskObject(c,!1)}}b.__renderEvent(a)};pf.renderDrawableMask=function(a,b){};var Eh=function(){};h["openfl.display._internal.CanvasVideo"]=Eh;Eh.__name__="openfl.display._internal.CanvasVideo";Eh.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 f=a.smoothing;b.setTransform(a.__worldTransform,d);f||(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);f||(d.imageSmoothingEnabled=!0);b.__popMaskObject(a)}}}};Eh.renderDrawable=function(a,b){Eh.render(a,b);b.__renderEvent(a)};Eh.renderDrawableMask=function(a,b){};var Re=function(){};h["openfl.display._internal.Context3DBitmap"]=Re;Re.__name__=
"openfl.display._internal.Context3DBitmap";Re.render=function(a,b){if(a.__renderable&&!(0>=a.__worldAlpha)&&null!=a.__bitmapData&&a.__bitmapData.__isValid){var c=b.__context3D;b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var d=b.__initDisplayShader(a.__worldShader);b.setShader(d);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);
b.updateShader();var f=a.__bitmapData.getVertexBuffer(c);null!=d.__position&&c.setVertexBufferAt(d.__position.index,f,0,3);null!=d.__textureCoord&&c.setVertexBufferAt(d.__textureCoord.index,f,3,2);d=a.__bitmapData.getIndexBuffer(c);c.drawTriangles(d);b.__clearShader();b.__popMaskObject(a)}};Re.renderDrawable=function(a,b){b.__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()){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var c=b.__context3D,d=ea.__pool.get();d.setTo(0,0,a.get_width(),a.get_height());b.__pushMaskRect(d,a.__renderTransform);var f=a.opaqueBackground;c.clear((f>>>16&255)/255,(f>>>8&255)/255,(f&255)/255,1,0,0,1);b.__popMaskRect();b.__popMaskObject(a);ea.__pool.release(d)}null!=a.__graphics&&
tf.render(a,b)}Re.render(a,b)}else Re.render(a.__cacheBitmap,b);b.__renderEvent(a)};Re.renderDrawableMask=function(a,b){Re.renderMask(a,b)};Re.renderMask=function(a,b){if(null!=a.__bitmapData&&a.__bitmapData.__isValid){var c=b.__context3D,d=b.__maskShader;b.setShader(d);b.applyBitmapData(Fh.opaqueBitmapData,!0);b.applyMatrix(b.__getMatrix(a.__renderTransform,a.pixelSnapping));b.updateShader();var f=a.__bitmapData.getVertexBuffer(c);null!=d.__position&&c.setVertexBufferAt(d.__position.index,f,0,3);
null!=d.__textureCoord&&c.setVertexBufferAt(d.__textureCoord.index,f,3,2);a=a.__bitmapData.getIndexBuffer(c);c.drawTriangles(a);b.__clearShader()}};var Cl=function(){};h["openfl.display._internal.Context3DBitmapData"]=Cl;Cl.__name__="openfl.display._internal.Context3DBitmapData";Cl.renderDrawable=function(a,b){var c=b.__context3D;b.__setBlendMode(10);var d=b.__defaultDisplayShader;b.setShader(d);b.applyBitmapData(a,b.__upscaled);b.applyMatrix(b.__getMatrix(a.__worldTransform,1));b.applyAlpha(a.__worldAlpha);
b.applyColorTransform(a.__worldColorTransform);b.updateShader();var f=a.getVertexBuffer(c);null!=d.__position&&c.setVertexBufferAt(d.__position.index,f,0,3);null!=d.__textureCoord&&c.setVertexBufferAt(d.__textureCoord.index,f,3,2);a=a.getIndexBuffer(c);c.drawTriangles(a);b.__clearShader()};Cl.renderDrawableMask=function(a,b){var c=b.__context3D,d=b.__maskShader;b.setShader(d);b.applyBitmapData(a,b.__upscaled);b.applyMatrix(b.__getMatrix(a.__worldTransform,1));b.updateShader();var f=a.getVertexBuffer(c);
null!=d.__position&&c.setVertexBufferAt(d.__position.index,f,0,3);null!=d.__textureCoord&&c.setVertexBufferAt(d.__textureCoord.index,f,3,2);a=a.getIndexBuffer(c);c.drawTriangles(a);b.__clearShader()};var bh=function(a,b,c,d){this.context3D=a;this.elementType=b;this.dataPerVertex=d;this.vertexCount=this.indexCount=0;this.resize(c)};h["openfl.display._internal.Context3DBuffer"]=bh;bh.__name__="openfl.display._internal.Context3DBuffer";bh.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(qg.toArrayBufferView(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}b*=c;if(null==this.vertexBufferData){var d=c=null,f=null,g=null,k=null;this.vertexBufferData=b=null!=b?new Float32Array(b):null!=c?new Float32Array(c):null!=d?new Float32Array(d.__array):null!=f?new Float32Array(f):null!=g?null==k?new Float32Array(g,0):new Float32Array(g,0,k):null}else b>this.vertexBufferData.length&&(a=this.vertexBufferData,k=g=f=d=c=null,this.vertexBufferData=b=null!=b?new Float32Array(b):null!=
c?new Float32Array(c):null!=d?new Float32Array(d.__array):null!=f?new Float32Array(f):null!=g?null==k?new Float32Array(g,0):new Float32Array(g,0,k):null,this.vertexBufferData.set(a))},__class__:bh};var Ml=G["openfl.display._internal.Context3DElementType"]={__ename__:"openfl.display._internal.Context3DElementType",__constructs__:null,QUADS:{_hx_name:"QUADS",_hx_index:0,__enum__:"openfl.display._internal.Context3DElementType",toString:t},TRIANGLES:{_hx_name:"TRIANGLES",_hx_index:1,__enum__:"openfl.display._internal.Context3DElementType",
toString:t},TRIANGLE_INDICES:{_hx_name:"TRIANGLE_INDICES",_hx_index:2,__enum__:"openfl.display._internal.Context3DElementType",toString:t}};Ml.__constructs__=[Ml.QUADS,Ml.TRIANGLES,Ml.TRIANGLE_INDICES];var xg=function(){};h["openfl.display._internal.Context3DDisplayObject"]=xg;xg.__name__="openfl.display._internal.Context3DDisplayObject";xg.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=ea.__pool.get();d.setTo(0,0,a.get_width(),a.get_height());b.__pushMaskRect(d,a.__renderTransform);var f=a.opaqueBackground;c.clear((f>>>16&255)/255,(f>>>8&255)/255,(f&255)/255,1,0,0,1);b.__popMaskRect();b.__popMaskObject(a);ea.__pool.release(d)}null!=a.__graphics&&tf.render(a,b)}};xg.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(null!=a.__cacheBitmap&&!a.__isCacheBitmapRender)Re.render(a.__cacheBitmap,
b);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()){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var c=b.__context3D,d=ea.__pool.get();d.setTo(0,0,a.get_width(),a.get_height());b.__pushMaskRect(d,a.__renderTransform);var f=a.opaqueBackground;c.clear((f>>>16&255)/255,(f>>>8&255)/255,(f&255)/255,1,0,0,1);b.__popMaskRect();b.__popMaskObject(a);ea.__pool.release(d)}null!=
a.__graphics&&tf.render(a,b)}b.__renderEvent(a)};xg.renderDrawableMask=function(a,b){null!=a.__graphics&&tf.renderMask(a,b)};xg.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&&tf.renderMask(a,b)};var Dl=function(){};h["openfl.display._internal.Context3DDisplayObjectContainer"]=Dl;Dl.__name__="openfl.display._internal.Context3DDisplayObjectContainer";Dl.renderDrawable=function(a,
b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=c.next();null==d.stage&&d.__cleanup()}a.__removedChildren.set_length(0);if(a.__renderable&&!(0>=a.__worldAlpha)&&(xg.renderDrawable(a,b),null==a.__cacheBitmap||a.__isCacheBitmapRender)){if(0<a.__children.length)if(b.__pushMaskObject(a),null!=b.__stage){c=0;for(d=a.__children;c<d.length;){var f=d[c];++c;b.__renderDrawable(f);f.__renderDirty=!1}a.__renderDirty=!1}else for(c=0,d=a.__children;c<d.length;)f=d[c],++c,b.__renderDrawable(f);
0<a.__children.length&&b.__popMaskObject(a)}};Dl.renderDrawableMask=function(a,b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=c.next();null==d.stage&&d.__cleanup()}a.__removedChildren.set_length(0);null!=a.__graphics&&tf.renderMask(a,b);c=0;for(a=a.__children;c<a.length;)d=a[c],++c,b.__renderDrawableMask(d)};var vc=function(){};h["openfl.display._internal.Context3DGraphics"]=vc;vc.__name__="openfl.display._internal.Context3DGraphics";vc.maskRender=null;vc.buildBuffer=function(a,b){var c,
d=c=0,f=0,g=new qf(a.__commands);b=b.__context3D;for(var k=ea.__pool.get(),l=wa.__pool.get(),m=null,h=0,r=a.__commands.types;h<r.length;){var p=r[h];++h;switch(p._hx_index){case 0:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=
5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=Z.BEGIN_BITMAP_FILL;m=g;m=m.buffer.o[m.oPos];break;case 1:m=null;switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=
1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=p;break;case 3:switch(g.prev._hx_index){case 0:g.oPos+=2;
g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=
2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=Z.BEGIN_SHADER_FILL;m=g;p=m.buffer.o[m.oPos];m=null;if(null!=p)for(var w=0,u=p.inputCount;w<u;){var n=w++;if("bitmap"==p.inputRefs[n].name){m=p.inputs[n];break}}break;case 8:if(null!=m){switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;
case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=Z.DRAW_QUADS;u=g;p=u.buffer.o[u.oPos];w=u.buffer.o[u.oPos+1];u=u.buffer.o[u.oPos+2];n=null!=w;var t=!1,A=!1,q=n?w.get_length():Math.floor(p.get_length()/4);
if(0==q)return;null!=u&&(u.get_length()>=6*q?A=t=!0:u.get_length()>=4*q?t=!0:u.get_length()>=2*q&&(A=!0));null==a.__quadBuffer?a.__quadBuffer=new bh(b,Ml.QUADS,q,4):a.__quadBuffer.resize(c+q,4);for(var y,E,L,v,x,C,G,Y,B,H,D,J,K,qa,va=a.__quadBuffer.vertexBufferData,X=m.width,N=m.height,M=0,nb=q;M<nb;)v=M++,y=16*(c+v),E=n?4*w.get(v):4*v,0>E||(k.setTo(p.get(E),p.get(E+1),p.get(E+2),p.get(E+3)),E=k.width,L=k.height,0>=E||0>=L||(t&&A?(v*=6,l.setTo(u.get(v),u.get(v+1),u.get(v+2),u.get(v+3),u.get(v+4),
u.get(v+5))):t?(v*=4,l.setTo(u.get(v),u.get(v+1),u.get(v+2),u.get(v+3),k.x,k.y)):A?(v*=2,l.tx=u.get(v),l.ty=u.get(v+1)):(l.tx=k.x,l.ty=k.y),v=k.x/X,x=k.y/N,C=k.get_right()/X,G=k.get_bottom()/N,Y=0*l.a+0*l.c+l.tx,B=0*l.b+0*l.d+l.ty,H=E*l.a+0*l.c+l.tx,D=E*l.b+0*l.d+l.ty,J=0*l.a+L*l.c+l.tx,K=0*l.b+L*l.d+l.ty,qa=E*l.a+L*l.c+l.tx,E=E*l.b+L*l.d+l.ty,va[y]=Y,va[y+1]=B,va[y+2]=v,va[y+3]=x,va[y+4]=H,va[y+4+1]=D,va[y+4+2]=C,va[y+4+3]=x,va[y+8]=J,va[y+8+1]=K,va[y+8+2]=v,va[y+8+3]=G,va[y+12]=qa,va[y+12+1]=E,
va[y+12+2]=C,va[y+12+3]=G));c+=q}break;case 12:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;
case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=Z.DRAW_TRIANGLES;u=g;p=u.buffer.o[u.oPos];w=u.buffer.o[u.oPos+1];u=u.buffer.o[u.oPos+2];n=null!=w;q=Math.floor(p.get_length()/2);t=n?w.get_length():q;y=(q=(A=null!=u)&&u.get_length()>=3*q)?4:2;va=q?3:2;X=y+2;N=q?f:d;vc.resizeVertexBuffer(a,q,N+t*X);M=q?a.__vertexBufferDataUVT:a.__vertexBufferData;L=0;for(v=t;L<v;)x=L++,nb=N+x*X,E=n?2*w.get(x):2*x,x=
n?w.get(x)*va:x*va,q?(C=u.get(x+2),M[nb]=p.get(E)/C,M[nb+1]=p.get(E+1)/C,M[nb+2]=0,M[nb+3]=1/C):(M[nb]=p.get(E),M[nb+1]=p.get(E+1)),M[nb+y]=A?u.get(x):0,M[nb+y+1]=A?u.get(x+1):0;q?f+=t*X:d+=t*X;break;case 13:m=null;break;default:switch(g.prev._hx_index){case 0:g.oPos+=2;g.bPos+=2;break;case 1:g.iPos+=1;g.fPos+=1;break;case 2:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 3:g.oPos+=1;break;case 4:g.fPos+=6;break;case 5:g.fPos+=4;break;case 6:g.fPos+=3;break;case 7:g.fPos+=4;break;case 8:g.oPos+=
3;break;case 9:g.fPos+=4;break;case 10:g.fPos+=5;g.oPos+=1;break;case 12:g.oPos+=4;break;case 14:g.oPos+=2;g.bPos+=2;break;case 15:g.oPos+=4;g.iiPos+=2;g.ffPos+=1;g.fPos+=1;break;case 16:g.oPos+=4;g.iPos+=1;g.fPos+=2;g.bPos+=1;break;case 17:g.fPos+=2;break;case 18:g.fPos+=2;break;case 19:g.oPos+=1;break;case 20:g.oPos+=1}g.prev=p}}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(qg.toArrayBufferView(a.__vertexBufferData))}if(0<f){c=a.__vertexBufferUVT;if(null==c||f>a.__vertexBufferCountUVT)c=b.createVertexBuffer(f,6,0),a.__vertexBufferUVT=c,a.__vertexBufferCountUVT=f;c.uploadFromTypedArray(qg.toArrayBufferView(a.__vertexBufferDataUVT))}ea.__pool.release(k);wa.__pool.release(l)};vc.isCompatible=function(a){if(null!=a.__owner.__worldScale9Grid)return!1;var b=new qf(a.__commands),c=!1,d=!1,f=!1,g=0;for(a=a.__commands.types;g<a.length;){var k=a[g];++g;
switch(k._hx_index){case 0:d=!0;f=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=k;break;case 1:d=!1;c=!0;f=!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=k;break;case 3:c=d=!1;f=!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=k;break;case 8:if(d||f){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=k}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=k}else return b.destroy(),!1;break;case 12:if(d||f){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=k}else return b.destroy(),!1;break;case 13:f=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=k;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=k;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=k;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)){b.__softwareRenderer.__pixelRatio=b.__pixelRatio;var c=b.__softwareRenderer.__worldTransform;b.__softwareRenderer.__worldTransform=7==a.__owner.__drawableType?
wa.__identity:b.__worldTransform;C.render(a,b.__softwareRenderer);b.__softwareRenderer.__worldTransform=c}else{a.__bitmap=null;a.__update(b.__worldTransform,b.__pixelRatio);var d=a.__width,f=a.__height;if(null!=a.__bounds&&1<=d&&1<=f){(a.__hardwareDirty||null==a.__quadBuffer&&null==a.__vertexBuffer&&null==a.__vertexBufferUVT)&&vc.buildBuffer(a,b);c=new qf(a.__commands);for(var g=b.__context3D,k=wa.__pool.get(),l=null,m=null,h=!1,r=!1,p=null,w=0,u=0,n=0,t=0,A=0,q=a.__commands.types;A<q.length;)switch(d=
q[A],++A,d._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=Z.BEGIN_BITMAP_FILL;r=c;m=r.buffer.o[r.oPos];h=r.buffer.b[r.bPos];r=r.buffer.b[r.bPos+1];p=l=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=Z.BEGIN_FILL;m=c;p=(m.buffer.i[m.iPos]|0)&16777215|(255*m.buffer.f[m.fPos]|0)<<24;m=l=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=Z.BEGIN_SHADER_FILL;u=c;l=u.buffer.o[u.oPos];u=0;m=null==l||null==l.shader||null==l.shader.__bitmap?null:l.shader.__bitmap.input;p=null;break;case 8: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=Z.DRAW_QUADS;var y=c;d=y.buffer.o[y.oPos];y=y.buffer.o[y.oPos+1];d=null!=y?y.get_length():Math.floor(d.get_length()/4);var E=b.__getMatrix(a.__owner.__renderTransform,1);null==l||vc.maskRender?(y=
vc.maskRender?b.__maskShader:b.__initGraphicsShader(null),b.setShader(y),b.applyMatrix(E),b.applyBitmapData(m,r,h),b.applyAlpha(a.__owner.__worldAlpha),b.applyColorTransform(a.__owner.__worldColorTransform),b.updateShader()):(y=b.__initShaderBuffer(l),b.__setShaderBuffer(l),b.applyMatrix(E),b.applyBitmapData(m,!1,h),b.applyAlpha(a.__owner.__worldAlpha),b.applyColorTransform(a.__owner.__worldColorTransform));for(E=w+d;w<E;){d=Math.min(E-w,g.__quadIndexBufferElements)|0;if(0>=d)break;null==l||vc.maskRender||
b.__updateShaderBuffer(u);null!=y.__position&&g.setVertexBufferAt(y.__position.index,a.__quadBuffer.vertexBuffer,16*w,2);null!=y.__textureCoord&&g.setVertexBufferAt(y.__textureCoord.index,a.__quadBuffer.vertexBuffer,16*w+2,2);g.drawTriangles(g.__quadIndexBuffer,0,2*d);u+=4*d;w+=d}b.__clearShader()}break;case 9:if(null!=p){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=Z.DRAW_RECT;var L=c;y=L.buffer.f[L.fPos];E=L.buffer.f[L.fPos+1];d=L.buffer.f[L.fPos+
2];f=L.buffer.f[L.fPos+3];L=p;vc.tempColorTransform.redOffset=L>>>16&255;vc.tempColorTransform.greenOffset=L>>>8&255;vc.tempColorTransform.blueOffset=L&255;vc.tempColorTransform.__combine(a.__owner.__worldColorTransform);k.identity();k.scale(d,f);k.tx=y;k.ty=E;k.concat(a.__owner.__renderTransform);d=vc.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(d);b.applyMatrix(b.__getMatrix(k,1));b.applyBitmapData(vc.blankBitmapData,!0,h);b.applyAlpha((L>>>24&255)/255*a.__owner.__worldAlpha);
b.applyColorTransform(vc.tempColorTransform);b.updateShader();y=vc.blankBitmapData.getVertexBuffer(g);null!=d.__position&&g.setVertexBufferAt(d.__position.index,y,0,3);null!=d.__textureCoord&&g.setVertexBufferAt(d.__textureCoord.index,y,3,2);d=vc.blankBitmapData.getIndexBuffer(g);g.drawTriangles(d);u+=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=Z.DRAW_TRIANGLES;f=c;y=f.buffer.o[f.oPos+1];E=f.buffer.o[f.oPos+
2];d=f.buffer.o[f.oPos+3];L=null!=y;f=Math.floor(f.buffer.o[f.oPos].get_length()/2);y=L?y.get_length():f;L=(E=null!=E&&E.get_length()>=3*f)?4:2;f=L+2;var v=E?a.__vertexBufferUVT:a.__vertexBuffer,x=E?t:n,G=b.__getMatrix(a.__owner.__renderTransform,1);if(null==l||vc.maskRender){var Y=vc.maskRender?b.__maskShader:b.__initGraphicsShader(null);b.setShader(Y);b.applyMatrix(G);b.applyBitmapData(m,r,h);b.applyAlpha(a.__owner.__worldAlpha);b.applyColorTransform(a.__owner.__worldColorTransform);b.updateShader()}else Y=
b.__initShaderBuffer(l),b.__setShaderBuffer(l),b.applyMatrix(G),b.applyBitmapData(m,!1,h),b.applyAlpha(1),b.applyColorTransform(null),b.__updateShaderBuffer(u);null!=Y.__position&&g.setVertexBufferAt(Y.__position.index,v,x,E?4:2);null!=Y.__textureCoord&&g.setVertexBufferAt(Y.__textureCoord.index,v,x+L,2);switch(d){case 0:g.setCulling(0);break;case 1:g.setCulling(3);break;case 2:g.setCulling(1)}g.__drawTriangles(0,y);u+=y;E?t+=f*y:n+=f*y;switch(d){case 1:case 2:g.setCulling(0)}b.__clearShader();break;
case 13:l=p=m=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=d;g.setCulling(3);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=Z.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=Z.OVERRIDE_BLEND_MODE;d=c;b.__setBlendMode(d.buffer.o[d.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=d}wa.__pool.release(k)}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,f=null;if(null==d){var g=f=null,k=null,l=null,m=null;f=c=null!=c?new Uint16Array(c):null!=f?new Uint16Array(f):null!=g?new Uint16Array(g.__array):null!=k?new Uint16Array(k):null!=l?null==m?new Uint16Array(l,0):new Uint16Array(l,
0,m):null}else c>d.length&&(m=l=k=g=f=null,f=c=null!=c?new Uint16Array(c):null!=f?new Uint16Array(f):null!=g?new Uint16Array(g.__array):null!=k?new Uint16Array(k):null!=l?null==m?new Uint16Array(l,0):new Uint16Array(l,0,m):null,f.set(d));null==f||b||(a.__triangleIndexBufferData=f)}};vc.resizeVertexBuffer=function(a,b,c){var d=b?a.__vertexBufferDataUVT:a.__vertexBufferData,f=null;if(null==d){var g=f=null,k=null,l=null,m=null;f=c=null!=c?new Float32Array(c):null!=f?new Float32Array(f):null!=g?new Float32Array(g.__array):
null!=k?new Float32Array(k):null!=l?null==m?new Float32Array(l,0):new Float32Array(l,0,m):null}else c>d.length&&(m=l=k=g=f=null,f=c=null!=c?new Float32Array(c):null!=f?new Float32Array(f):null!=g?new Float32Array(g.__array):null!=k?new Float32Array(k):null!=l?null==m?new Float32Array(l,0):new Float32Array(l,0,m):null,f.set(d));null!=f&&(b?a.__vertexBufferDataUVT=f:a.__vertexBufferData=f)};var Fh=function(){null==this.__glFragmentSource&&(this.__glFragmentSource="varying vec2 openfl_TextureCoordv;\n\n\t\tuniform sampler2D openfl_Texture;\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\tdiscard;\n\n\t\t\t} else {\n\n\t\t\t\tgl_FragColor = color;\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\t\tvarying vec2 openfl_TextureCoordv;\n\n\t\tuniform mat4 openfl_Matrix;\n\n\t\tvoid main(void) {\n\n\t\t\topenfl_TextureCoordv = openfl_TextureCoord;\n\n\t\t\tgl_Position = openfl_Matrix * openfl_Position;\n\n\t\t}");Ic.call(this);this.__isGenerated=!0;this.__initGL()};h["openfl.display._internal.Context3DMaskShader"]=Fh;Fh.__name__="openfl.display._internal.Context3DMaskShader";
Fh.__super__=Ic;Fh.prototype=x(Ic.prototype,{openfl_Position:null,openfl_TextureCoord:null,openfl_Matrix:null,openfl_Texture:null,__class__:Fh});var tf=function(){};h["openfl.display._internal.Context3DShape"]=tf;tf.__name__="openfl.display._internal.Context3DShape";tf.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,f=b.__initDisplayShader(a.__worldShader);
b.setShader(f);b.applyBitmapData(c.__bitmap,!0);var g=wa.__pool.get();g.scale(1/c.__bitmapScale,1/c.__bitmapScale);g.concat(c.__worldTransform);b.applyMatrix(b.__getMatrix(g,1));wa.__pool.release(g);b.applyAlpha(a.__worldAlpha);b.applyColorTransform(a.__worldColorTransform);b.updateShader();g=c.__bitmap.getVertexBuffer(d);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);d.drawTriangles(c);
b.__clearShader()}b.__popMaskObject(a)}}};tf.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 f=c.__bitmap.getVertexBuffer(a);null!=d.__position&&a.setVertexBufferAt(d.__position.index,f,0,3);null!=d.__textureCoord&&a.setVertexBufferAt(d.__textureCoord.index,f,3,2);c=c.__bitmap.getIndexBuffer(a);a.drawTriangles(c);
b.__clearShader()}};var El=function(){};h["openfl.display._internal.Context3DSimpleButton"]=El;El.__name__="openfl.display._internal.Context3DSimpleButton";El.renderDrawable=function(a,b){!a.__renderable||0>=a.__worldAlpha||null==a.__currentState||(b.__pushMaskObject(a),b.__renderDrawable(a.__currentState),b.__popMaskObject(a),b.__renderEvent(a))};El.renderDrawableMask=function(a,b){null!=a.__currentState&&b.__renderDrawableMask(a.__currentState)};var yg=function(){};h["openfl.display._internal.Context3DTextField"]=
yg;yg.__name__="openfl.display._internal.Context3DTextField";yg.render=function(a,b){b.__softwareRenderer.__pixelRatio=b.__pixelRatio;var c=b.__softwareRenderer;b=a.__textEngine;var d=!(b.background||b.border),f=d?b.textBounds:b.bounds,g=a.__graphics,k=0;if(a.__dirty){a.__updateLayout();null==g.__bounds&&(g.__bounds=new ea);if(0==a.get_text().length){k=b.bounds.width-4;var l=a.get_defaultTextFormat().align;k=3==l?0:4==l?k:k/2;switch(l){case 0:k+=a.get_defaultTextFormat().leftMargin/2;k-=a.get_defaultTextFormat().rightMargin/
2;k+=a.get_defaultTextFormat().indent/2;k+=a.get_defaultTextFormat().blockIndent/2;break;case 2:k+=a.get_defaultTextFormat().leftMargin;k+=a.get_defaultTextFormat().indent;k+=a.get_defaultTextFormat().blockIndent;break;case 3:k+=a.get_defaultTextFormat().leftMargin;k+=a.get_defaultTextFormat().indent;k+=a.get_defaultTextFormat().blockIndent;break;case 4:k-=a.get_defaultTextFormat().rightMargin}d&&(f.y=b.bounds.y,f.x=k)}g.__bounds.copyFrom(f)}l=c.__pixelRatio;g.__update(c.__worldTransform,l);if(a.__dirty||
g.__softwareDirty){var m=Math.round(g.__width*l),h=Math.round(g.__height*l);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"));
U.context=g.__context;g.__canvas.width=m;g.__canvas.height=h;c.__isDOM&&(g.__canvas.style.width=Math.round(m/l)+"px",g.__canvas.style.height=Math.round(h/l)+"px");m=wa.__pool.get();m.scale(l,l);m.concat(g.__renderTransform);U.context.setTransform(m.a,m.b,m.c,m.d,m.tx,m.ty);wa.__pool.release(m);null==U.clearRect&&(U.clearRect="undefined"!==typeof navigator&&"undefined"!==typeof navigator.isCocoonJS);U.clearRect&&U.context.clearRect(0,0,g.__canvas.width,g.__canvas.height);if(null!=b.text&&""!=b.text||
b.__hasFocus){d=b.text;g.__context.imageSmoothingEnabled=!c.__allowSmoothing||0==b.antiAliasType&&400==b.sharpness?!1:!0;if(b.border||b.background){U.context.rect(.5,.5,f.width-1,f.height-1);if(b.background){var r=O.hex(b.backgroundColor&16777215,6);U.context.fillStyle="#"+r;U.context.fill()}b.border&&(U.context.lineWidth=1,r=O.hex(b.borderColor&16777215,6),U.context.strokeStyle="#"+r,U.context.stroke())}U.context.textBaseline="alphabetic";U.context.textAlign="start";c=-a.get_scrollH();var p=k=0;
for(r=a.get_scrollV()-1;p<r;){var w=p++;k-=b.lineHeights.get(w)}var u;for(m=b.layoutGroups.iterator();m.hasNext();)if(h=m.next(),!(h.lineIndex<a.get_scrollV()-1)){if(h.lineIndex>b.get_bottomScrollV()-1)break;var n="#"+O.hex(h.format.color&16777215,6);U.context.font=Jb.getFont(h.format);U.context.fillStyle=n;U.context.fillText(d.substring(h.startIndex,h.endIndex),h.offsetX+c-f.x,h.offsetY+h.ascent+k-f.y);if(-1<a.__caretIndex&&b.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&h.startIndex<=
a.__caretIndex&&h.endIndex>=a.__caretIndex){p=u=0;for(r=a.__caretIndex-h.startIndex;p<r;){w=p++;if(h.positions.length<=w)break;u+=h.positions[w]}p=0;r=a.get_scrollV();for(w=h.lineIndex+1;r<w;){var t=r++;p+=b.lineHeights.get(t-1)}U.context.beginPath();r=O.hex(h.format.color&16777215,6);U.context.strokeStyle="#"+r;U.context.moveTo(h.offsetX+u-a.get_scrollH()-f.x,p+2-f.y);U.context.lineWidth=1;U.context.lineTo(h.offsetX+u-a.get_scrollH()-f.x,p+Jb.getFormatHeight(a.get_defaultTextFormat())-1-f.y);U.context.stroke();
U.context.closePath()}}else if(h.startIndex<=a.__caretIndex&&h.endIndex>=a.__caretIndex||h.startIndex<=a.__selectionIndex&&h.endIndex>=a.__selectionIndex||h.startIndex>a.__caretIndex&&h.endIndex<a.__selectionIndex||h.startIndex>a.__selectionIndex&&h.endIndex<a.__caretIndex)u=Math.min(a.__selectionIndex,a.__caretIndex)|0,p=Math.max(a.__selectionIndex,a.__caretIndex)|0,h.startIndex>u&&(u=h.startIndex),h.endIndex<p&&(p=h.endIndex),w=a.getCharBoundaries(u),p>=h.endIndex?(r=a.getCharBoundaries(h.endIndex-
1),null!=r&&(r.x+=r.width+2)):r=a.getCharBoundaries(p),null!=w&&null!=r&&(U.context.fillStyle="#000000",U.context.fillRect(w.x+c-f.x,w.y+k,r.x-w.x,h.height),U.context.fillStyle="#FFFFFF",U.context.fillText(d.substring(u,p),c+w.x-f.x,h.offsetY+h.ascent+k));h.format.underline&&(U.context.beginPath(),U.context.strokeStyle=n,U.context.lineWidth=1,n=h.offsetX+c-f.x,u=Math.ceil(h.offsetY+k+h.ascent-f.y)+Math.floor(.185*h.ascent)+.5,U.context.moveTo(n,u),U.context.lineTo(n+h.width,u),U.context.stroke(),
U.context.closePath())}}else{if(b.border||b.background)b.border?U.context.rect(.5,.5,f.width-1,f.height-1):U.context.rect(0,0,f.width,f.height),b.background&&(r=O.hex(b.backgroundColor&16777215,6),U.context.fillStyle="#"+r,U.context.fill()),b.border&&(U.context.lineWidth=1,U.context.lineCap="square",r=O.hex(b.borderColor&16777215,6),U.context.strokeStyle="#"+r,U.context.stroke());if(-1<a.__caretIndex&&b.selectable&&a.__showCursor){c=-a.get_scrollH()+(d?0:k);p=k=0;for(r=a.get_scrollV()-1;p<r;)w=p++,
k+=b.lineHeights.get(w);U.context.beginPath();r=O.hex(a.get_defaultTextFormat().color&16777215,6);U.context.strokeStyle="#"+r;U.context.moveTo(c+2.5,k+2.5);U.context.lineWidth=1;U.context.lineTo(c+2.5,k+Jb.getFormatHeight(a.get_defaultTextFormat())-1);U.context.stroke();U.context.closePath()}}g.__bitmap=ma.fromCanvas(a.__graphics.__canvas);g.__bitmapScale=l;g.__visible=!0;a.__dirty=!1;g.__softwareDirty=!1;g.set___dirty(!1)}}a.__graphics.__hardwareDirty=!1};yg.renderDrawable=function(a,b){b.__updateCacheBitmap(a,
!1);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){if(yg.render(a,b),!(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=ea.__pool.get();d.setTo(0,0,a.get_width(),a.get_height());b.__pushMaskRect(d,a.__renderTransform);var f=a.opaqueBackground;c.clear((f>>>16&255)/255,(f>>>8&255)/255,(f&255)/
255,1,0,0,1);b.__popMaskRect();b.__popMaskObject(a);ea.__pool.release(d)}null!=a.__graphics&&tf.render(a,b)}}else Re.render(a.__cacheBitmap,b);b.__renderEvent(a)};yg.renderDrawableMask=function(a,b){yg.renderMask(a,b);xg.renderDrawableMask(a,b)};yg.renderMask=function(a,b){var c=b.__softwareRenderer;b=a.__textEngine;var d=!(b.background||b.border),f=d?b.textBounds:b.bounds,g=a.__graphics,k=0;if(a.__dirty){a.__updateLayout();null==g.__bounds&&(g.__bounds=new ea);if(0==a.get_text().length){k=b.bounds.width-
4;var l=a.get_defaultTextFormat().align;k=3==l?0:4==l?k:k/2;switch(l){case 0:k+=a.get_defaultTextFormat().leftMargin/2;k-=a.get_defaultTextFormat().rightMargin/2;k+=a.get_defaultTextFormat().indent/2;k+=a.get_defaultTextFormat().blockIndent/2;break;case 2:k+=a.get_defaultTextFormat().leftMargin;k+=a.get_defaultTextFormat().indent;k+=a.get_defaultTextFormat().blockIndent;break;case 3:k+=a.get_defaultTextFormat().leftMargin;k+=a.get_defaultTextFormat().indent;k+=a.get_defaultTextFormat().blockIndent;
break;case 4:k-=a.get_defaultTextFormat().rightMargin}d&&(f.y=b.bounds.y,f.x=k)}g.__bounds.copyFrom(f)}l=c.__pixelRatio;g.__update(c.__worldTransform,l);if(a.__dirty||g.__softwareDirty){var m=Math.round(g.__width*l),h=Math.round(g.__height*l);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"));U.context=g.__context;g.__canvas.width=m;g.__canvas.height=h;c.__isDOM&&(g.__canvas.style.width=Math.round(m/l)+"px",g.__canvas.style.height=Math.round(h/l)+"px");m=wa.__pool.get();m.scale(l,l);m.concat(g.__renderTransform);U.context.setTransform(m.a,m.b,m.c,m.d,m.tx,m.ty);wa.__pool.release(m);null==U.clearRect&&(U.clearRect="undefined"!==
typeof navigator&&"undefined"!==typeof navigator.isCocoonJS);U.clearRect&&U.context.clearRect(0,0,g.__canvas.width,g.__canvas.height);if(null!=b.text&&""!=b.text||b.__hasFocus){d=b.text;g.__context.imageSmoothingEnabled=!c.__allowSmoothing||0==b.antiAliasType&&400==b.sharpness?!1:!0;if(b.border||b.background){U.context.rect(.5,.5,f.width-1,f.height-1);if(b.background){var r=O.hex(b.backgroundColor&16777215,6);U.context.fillStyle="#"+r;U.context.fill()}b.border&&(U.context.lineWidth=1,r=O.hex(b.borderColor&
16777215,6),U.context.strokeStyle="#"+r,U.context.stroke())}U.context.textBaseline="alphabetic";U.context.textAlign="start";c=-a.get_scrollH();var p=k=0;for(r=a.get_scrollV()-1;p<r;){var w=p++;k-=b.lineHeights.get(w)}var u;for(m=b.layoutGroups.iterator();m.hasNext();)if(h=m.next(),!(h.lineIndex<a.get_scrollV()-1)){if(h.lineIndex>b.get_bottomScrollV()-1)break;var n="#"+O.hex(h.format.color&16777215,6);U.context.font=Jb.getFont(h.format);U.context.fillStyle=n;U.context.fillText(d.substring(h.startIndex,
h.endIndex),h.offsetX+c-f.x,h.offsetY+h.ascent+k-f.y);if(-1<a.__caretIndex&&b.selectable)if(a.__selectionIndex==a.__caretIndex){if(a.__showCursor&&h.startIndex<=a.__caretIndex&&h.endIndex>=a.__caretIndex){p=u=0;for(r=a.__caretIndex-h.startIndex;p<r;){w=p++;if(h.positions.length<=w)break;u+=h.positions[w]}p=0;r=a.get_scrollV();for(w=h.lineIndex+1;r<w;){var t=r++;p+=b.lineHeights.get(t-1)}U.context.beginPath();r=O.hex(h.format.color&16777215,6);U.context.strokeStyle="#"+r;U.context.moveTo(h.offsetX+
u-a.get_scrollH()-f.x,p+2-f.y);U.context.lineWidth=1;U.context.lineTo(h.offsetX+u-a.get_scrollH()-f.x,p+Jb.getFormatHeight(a.get_defaultTextFormat())-1-f.y);U.context.stroke();U.context.closePath()}}else if(h.startIndex<=a.__caretIndex&&h.endIndex>=a.__caretIndex||h.startIndex<=a.__selectionIndex&&h.endIndex>=a.__selectionIndex||h.startIndex>a.__caretIndex&&h.endIndex<a.__selectionIndex||h.startIndex>a.__selectionIndex&&h.endIndex<a.__caretIndex)u=Math.min(a.__selectionIndex,a.__caretIndex)|0,p=Math.max(a.__selectionIndex,
a.__caretIndex)|0,h.startIndex>u&&(u=h.startIndex),h.endIndex<p&&(p=h.endIndex),w=a.getCharBoundaries(u),p>=h.endIndex?(r=a.getCharBoundaries(h.endIndex-1),null!=r&&(r.x+=r.width+2)):r=a.getCharBoundaries(p),null!=w&&null!=r&&(U.context.fillStyle="#000000",U.context.fillRect(w.x+c-f.x,w.y+k,r.x-w.x,h.height),U.context.fillStyle="#FFFFFF",U.context.fillText(d.substring(u,p),c+w.x-f.x,h.offsetY+h.ascent+k));h.format.underline&&(U.context.beginPath(),U.context.strokeStyle=n,U.context.lineWidth=1,n=h.offsetX+
c-f.x,u=Math.ceil(h.offsetY+k+h.ascent-f.y)+Math.floor(.185*h.ascent)+.5,U.context.moveTo(n,u),U.context.lineTo(n+h.width,u),U.context.stroke(),U.context.closePath())}}else{if(b.border||b.background)b.border?U.context.rect(.5,.5,f.width-1,f.height-1):U.context.rect(0,0,f.width,f.height),b.background&&(r=O.hex(b.backgroundColor&16777215,6),U.context.fillStyle="#"+r,U.context.fill()),b.border&&(U.context.lineWidth=1,U.context.lineCap="square",r=O.hex(b.borderColor&16777215,6),U.context.strokeStyle=
"#"+r,U.context.stroke());if(-1<a.__caretIndex&&b.selectable&&a.__showCursor){c=-a.get_scrollH()+(d?0:k);p=k=0;for(r=a.get_scrollV()-1;p<r;)w=p++,k+=b.lineHeights.get(w);U.context.beginPath();r=O.hex(a.get_defaultTextFormat().color&16777215,6);U.context.strokeStyle="#"+r;U.context.moveTo(c+2.5,k+2.5);U.context.lineWidth=1;U.context.lineTo(c+2.5,k+Jb.getFormatHeight(a.get_defaultTextFormat())-1);U.context.stroke();U.context.closePath()}}g.__bitmap=ma.fromCanvas(a.__graphics.__canvas);g.__bitmapScale=
l;g.__visible=!0;a.__dirty=!1;g.__softwareDirty=!1;g.set___dirty(!1)}}a.__graphics.__hardwareDirty=!1};var aa=function(){};h["openfl.display._internal.Context3DTilemap"]=aa;aa.__name__="openfl.display._internal.Context3DTilemap";aa.cacheColorTransform=null;aa.context=null;aa.dataPerVertex=null;aa.currentBitmapData=null;aa.currentBlendMode=null;aa.currentShader=null;aa.bufferPosition=null;aa.lastFlushedPosition=null;aa.lastUsedBitmapData=null;aa.lastUsedShader=null;aa.numTiles=null;aa.vertexBufferData=
null;aa.vertexDataPosition=null;aa.buildBuffer=function(a,b){if(!a.__renderable||0==a.__group.__tiles.length||0>=a.__worldAlpha)a.__group.__dirty=!1;else{aa.numTiles=0;aa.vertexBufferData=null!=a.__buffer?a.__buffer.vertexBufferData:null;aa.vertexDataPosition=0;var c=ea.__pool.get(),d=wa.__pool.get(),f=wa.__pool.get();aa.dataPerVertex=4;a.tileAlphaEnabled&&aa.dataPerVertex++;a.tileColorTransformEnabled&&(aa.dataPerVertex+=8);aa.buildBufferTileContainer(a,a.__group,b,f,a.__tileset,a.tileAlphaEnabled,
a.__worldAlpha,a.tileColorTransformEnabled,a.__worldColorTransform,null,c,d);a.__buffer.flushVertexBufferData();ea.__pool.release(c);wa.__pool.release(d);wa.__pool.release(f)}};aa.buildBufferTileContainer=function(a,b,c,d,f,g,k,l,m,h,r,p,w){null==w&&(w=!0);var u=wa.__pool.get(),n=c.__roundPixels,z=b.__tiles;w&&aa.resizeBuffer(a,aa.numTiles+aa.getRecursiveLength(b));w=null;for(var t,A,q,y,E,L,v,x,C,G,Y,B=g?5:4,H=0;H<z.length;){y=z[H];++H;u.setTo(1,0,0,1,-y.get_originX(),-y.get_originY());u.concat(y.get_matrix());
u.concat(d);n&&(u.tx=Math.round(u.tx),u.ty=Math.round(u.ty));var D=null!=y.get_tileset()?y.get_tileset():f;var J=y.get_alpha()*k;var K=y.get_visible();y.__dirty=!1;if(K&&!(0>=J))if(l&&(null!=y.get_colorTransform()?null==m?w=y.get_colorTransform():(null==aa.cacheColorTransform&&(aa.cacheColorTransform=new Ub),w=aa.cacheColorTransform,w.redMultiplier=m.redMultiplier*y.get_colorTransform().redMultiplier,w.greenMultiplier=m.greenMultiplier*y.get_colorTransform().greenMultiplier,w.blueMultiplier=m.blueMultiplier*
y.get_colorTransform().blueMultiplier,w.alphaMultiplier=m.alphaMultiplier*y.get_colorTransform().alphaMultiplier,w.redOffset=m.redOffset+y.get_colorTransform().redOffset,w.greenOffset=m.greenOffset+y.get_colorTransform().greenOffset,w.blueOffset=m.blueOffset+y.get_colorTransform().blueOffset,w.alphaOffset=m.alphaOffset+y.get_colorTransform().alphaOffset):w=m),g||(J=1),0<y.__length)aa.buildBufferTileContainer(a,y,c,u,D,g,J,l,w,h,r,p,!1);else if(null!=D&&(K=y.get_id(),t=D.__bitmapData,null!=t)){if(-1==
K){A=y.__rect;if(null==A||0>=A.width||0>=A.height)continue;D=A.x/t.width;y=A.y/t.height;K=A.get_right()/t.width;E=A.get_bottom()/t.height}else{t=D.__data[K];if(null==t)continue;r.setTo(t.x,t.y,t.width,t.height);A=r;D=t.__uvX;y=t.__uvY;K=t.__uvWidth;E=t.__uvHeight}t=A.width;q=A.height;A=0*u.a+0*u.c+u.tx;L=0*u.b+0*u.d+u.ty;v=t*u.a+0*u.c+u.tx;x=t*u.b+0*u.d+u.ty;C=0*u.a+q*u.c+u.tx;G=0*u.b+q*u.d+u.ty;Y=t*u.a+q*u.c+u.tx;q=t*u.b+q*u.d+u.ty;t=aa.vertexDataPosition;aa.vertexBufferData[t]=A;aa.vertexBufferData[t+
1]=L;aa.vertexBufferData[t+2]=D;aa.vertexBufferData[t+3]=y;aa.vertexBufferData[t+aa.dataPerVertex]=v;aa.vertexBufferData[t+aa.dataPerVertex+1]=x;aa.vertexBufferData[t+aa.dataPerVertex+2]=K;aa.vertexBufferData[t+aa.dataPerVertex+3]=y;aa.vertexBufferData[t+2*aa.dataPerVertex]=C;aa.vertexBufferData[t+2*aa.dataPerVertex+1]=G;aa.vertexBufferData[t+2*aa.dataPerVertex+2]=D;aa.vertexBufferData[t+2*aa.dataPerVertex+3]=E;aa.vertexBufferData[t+3*aa.dataPerVertex]=Y;aa.vertexBufferData[t+3*aa.dataPerVertex+1]=
q;aa.vertexBufferData[t+3*aa.dataPerVertex+2]=K;aa.vertexBufferData[t+3*aa.dataPerVertex+3]=E;g&&(aa.vertexBufferData[t+0*aa.dataPerVertex+4]=J,aa.vertexBufferData[t+aa.dataPerVertex+4]=J,aa.vertexBufferData[t+2*aa.dataPerVertex+4]=J,aa.vertexBufferData[t+3*aa.dataPerVertex+4]=J);if(l)if(null!=w)for(J=0;4>J;)D=J++,aa.vertexBufferData[t+aa.dataPerVertex*D+B]=w.redMultiplier,aa.vertexBufferData[t+aa.dataPerVertex*D+B+1]=w.greenMultiplier,aa.vertexBufferData[t+aa.dataPerVertex*D+B+2]=w.blueMultiplier,
aa.vertexBufferData[t+aa.dataPerVertex*D+B+3]=w.alphaMultiplier,aa.vertexBufferData[t+aa.dataPerVertex*D+B+4]=w.redOffset,aa.vertexBufferData[t+aa.dataPerVertex*D+B+5]=w.greenOffset,aa.vertexBufferData[t+aa.dataPerVertex*D+B+6]=w.blueOffset,aa.vertexBufferData[t+aa.dataPerVertex*D+B+7]=w.alphaOffset;else for(J=0;4>J;)D=J++,aa.vertexBufferData[t+aa.dataPerVertex*D+B]=1,aa.vertexBufferData[t+aa.dataPerVertex*D+B+1]=1,aa.vertexBufferData[t+aa.dataPerVertex*D+B+2]=1,aa.vertexBufferData[t+aa.dataPerVertex*
D+B+3]=1,aa.vertexBufferData[t+aa.dataPerVertex*D+B+4]=0,aa.vertexBufferData[t+aa.dataPerVertex*D+B+5]=0,aa.vertexBufferData[t+aa.dataPerVertex*D+B+6]=0,aa.vertexBufferData[t+aa.dataPerVertex*D+B+7]=0;aa.vertexDataPosition+=4*aa.dataPerVertex}}b.__dirty=!1;wa.__pool.release(u)};aa.flush=function(a,b,c){null==aa.currentShader&&(aa.currentShader=b.__defaultDisplayShader);if(aa.bufferPosition>aa.lastFlushedPosition&&null!=aa.currentBitmapData&&null!=aa.currentShader){var d=b.__initDisplayShader(aa.currentShader);
b.setShader(d);b.applyBitmapData(aa.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 f=aa.lastFlushedPosition*aa.dataPerVertex*4,g;aa.lastFlushedPosition<aa.bufferPosition;){g=
Math.min(aa.bufferPosition-aa.lastFlushedPosition,aa.context.__quadIndexBufferElements)|0;if(0>=g)break;null!=d.__position&&aa.context.setVertexBufferAt(d.__position.index,c,f,2);null!=d.__textureCoord&&aa.context.setVertexBufferAt(d.__textureCoord.index,c,f+2,2);a.tileAlphaEnabled&&null!=d.__alpha&&aa.context.setVertexBufferAt(d.__alpha.index,c,f+4,1);if(a.tileColorTransformEnabled){var k=a.tileAlphaEnabled?5:4;null!=d.__colorMultiplier&&aa.context.setVertexBufferAt(d.__colorMultiplier.index,c,f+
k,4);null!=d.__colorOffset&&aa.context.setVertexBufferAt(d.__colorOffset.index,c,f+k+4,4)}aa.context.drawTriangles(aa.context.__quadIndexBuffer,0,2*g);aa.lastFlushedPosition+=g}b.__clearShader()}aa.lastUsedBitmapData=aa.currentBitmapData;aa.lastUsedShader=aa.currentShader};aa.getRecursiveLength=function(a){a=a.__tiles;for(var b=0,c=0;c<a.length;){var d=a[c];++c;0<d.__length?b+=aa.getRecursiveLength(d):++b}return b};aa.render=function(a,b){if(a.__renderable&&!(0>=a.__worldAlpha)&&(aa.context=b.__context3D,
aa.buildBuffer(a,b),0!=aa.numTiles)){aa.bufferPosition=0;aa.lastFlushedPosition=0;aa.lastUsedBitmapData=null;aa.lastUsedShader=null;aa.currentBitmapData=null;aa.currentShader=null;aa.currentBlendMode=a.__worldBlendMode;a.tileBlendModeEnabled||b.__setBlendMode(aa.currentBlendMode);b.__pushMaskObject(a);var c=ea.__pool.get();c.setTo(0,0,a.__width,a.__height);b.__pushMaskRect(c,a.__renderTransform);aa.renderTileContainer(a,b,a.__group,a.__worldShader,a.__tileset,a.__worldAlpha,a.tileBlendModeEnabled,
aa.currentBlendMode,null);aa.flush(a,b,aa.currentBlendMode);b.__popMaskRect();b.__popMaskObject(a);ea.__pool.release(c)}};aa.renderDrawable=function(a,b){b.__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()){b.__setBlendMode(a.__worldBlendMode);b.__pushMaskObject(a);var c=b.__context3D,d=ea.__pool.get();
d.setTo(0,0,a.get_width(),a.get_height());b.__pushMaskRect(d,a.__renderTransform);var f=a.opaqueBackground;c.clear((f>>>16&255)/255,(f>>>8&255)/255,(f&255)/255,1,0,0,1);b.__popMaskRect();b.__popMaskObject(a);ea.__pool.release(d)}null!=a.__graphics&&tf.render(a,b)}aa.render(a,b)}else Re.render(a.__cacheBitmap,b);b.__renderEvent(a)};aa.renderDrawableMask=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&&tf.renderMask(a,b);aa.renderMask(a,b)};aa.renderTileContainer=function(a,b,c,d,f,g,k,l,m){c=c.__tiles;for(var h,r,p,w=null,u,t=0;t<c.length;){var n=c[t];++t;h=null!=n.get_tileset()?n.get_tileset():f;r=n.get_alpha()*g;if((p=n.get_visible())&&!(0>=r))if(p=null!=n.get_shader()?n.get_shader():d,k&&(w=null!=n.__blendMode?n.__blendMode:l),0<n.__length)aa.renderTileContainer(a,b,n,p,h,r,k,w,m);else if(null!=h&&(u=n.get_id(),r=h.__bitmapData,null!=r)){if(-1==u){if(h=n.__rect,null==h||
0>=h.width||0>=h.height)continue}else if(h=h.__data[u],null==h)continue;(p!=aa.currentShader||r!=aa.currentBitmapData&&null!=aa.currentBitmapData||aa.currentBlendMode!=w)&&aa.flush(a,b,aa.currentBlendMode);aa.currentBitmapData=r;aa.currentShader=p;aa.currentBlendMode=w;aa.bufferPosition++}}};aa.renderMask=function(a,b){};aa.resizeBuffer=function(a,b){aa.numTiles=b;null==a.__buffer?a.__buffer=new bh(aa.context,Ml.QUADS,aa.numTiles,aa.dataPerVertex):a.__buffer.resize(aa.numTiles,aa.dataPerVertex);aa.vertexBufferData=
a.__buffer.vertexBufferData};var Se=function(){};h["openfl.display._internal.Context3DVideo"]=Se;Se.__name__="openfl.display._internal.Context3DVideo";Se.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 f=b.__initDisplayShader(a.__worldShader);b.setShader(f);b.applyBitmapData(null,!0,!1);b.applyMatrix(b.__getMatrix(a.__renderTransform,
1));b.applyAlpha(a.__worldAlpha);b.applyColorTransform(a.__worldColorTransform);null!=f.__textureSize&&(Se.__textureSizeValue[0]=null!=a.__stream?a.__stream.__video.videoWidth:0,Se.__textureSizeValue[1]=null!=a.__stream?a.__stream.__video.videoHeight:0,f.__textureSize.value=Se.__textureSizeValue);b.updateShader();c.setTextureAt(0,a.__getTexture(c));c.__flushGLTextures();d.uniform1i(f.__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!=f.__position&&c.setVertexBufferAt(f.__position.index,d,0,3);null!=f.__textureCoord&&c.setVertexBufferAt(f.__textureCoord.index,d,3,2);f=a.__getIndexBuffer(c);c.drawTriangles(f);b.__clearShader();b.__popMaskObject(a)}}};Se.renderDrawable=function(a,b){Se.render(a,b);b.__renderEvent(a)};Se.renderDrawableMask=function(a,
b){Se.renderMask(a,b)};Se.renderMask=function(a,b){if(null!=a.__stream&&null!=a.__stream.__video){var c=b.__context3D,d=b.__maskShader;b.setShader(d);b.applyBitmapData(Fh.opaqueBitmapData,!0);b.applyMatrix(b.__getMatrix(a.__renderTransform,1));b.updateShader();var f=a.__getVertexBuffer(c);null!=d.__position&&c.setVertexBufferAt(d.__position.index,f,0,3);null!=d.__textureCoord&&c.setVertexBufferAt(d.__textureCoord.index,f,3,2);a=a.__getIndexBuffer(c);c.drawTriangles(a);b.__clearShader()}};var pc=function(){};
h["openfl.display._internal.DOMBitmap"]=pc;pc.__name__="openfl.display._internal.DOMBitmap";pc.clear=function(a,b){be.clear(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)};pc.render=function(a,b){if(null!=a.stage&&a.__worldVisible&&a.__renderable&&null!=a.__bitmapData&&a.__bitmapData.__isValid&&a.__bitmapData.readable){b.__pushMaskObject(a);if(null!=a.__bitmapData.image.buffer.__srcImage){var c=
a.__bitmapData.image.buffer.__srcImage.src;O.startsWith(c,"data:")||O.startsWith(c,"blob:")?pc.renderCanvas(a,b):pc.renderImage(a,b)}else pc.renderCanvas(a,b);b.__popMaskObject(a)}else pc.clear(a,b)};pc.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&&(ya.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)};pc.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){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){C.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)):Ue.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 Ue.clear(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?(d=a.__bitmapData.image.buffer.__srcImage.src,O.startsWith(d,"data:")||O.startsWith(d,"blob:")?pc.renderCanvas(a,
b):pc.renderImage(a,b)):pc.renderCanvas(a,b),b.__popMaskObject(a)):pc.clear(a,b)}else b.__renderDrawableClear(a),a.__cacheBitmap.stage=a.stage,c=a.__cacheBitmap,null!=c.stage&&c.__worldVisible&&c.__renderable&&null!=c.__bitmapData&&c.__bitmapData.__isValid&&c.__bitmapData.readable?(b.__pushMaskObject(c),null!=c.__bitmapData.image.buffer.__srcImage?(d=c.__bitmapData.image.buffer.__srcImage.src,O.startsWith(d,"data:")||O.startsWith(d,"blob:")?pc.renderCanvas(c,b):pc.renderImage(c,b)):pc.renderCanvas(c,
b),b.__popMaskObject(c)):pc.clear(c,b);b.__renderEvent(a)};pc.renderDrawableClear=function(a,b){pc.clear(a,b)};pc.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 be=function(){};h["openfl.display._internal.DOMDisplayObject"]=
be;be.__name__="openfl.display._internal.DOMDisplayObject";be.clear=function(a,b){null!=a.__cacheBitmap&&pc.clear(a.__cacheBitmap,b);Ue.clear(a,b)};be.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){C.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)):Ue.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 Ue.clear(a,b)};be.renderDrawable=function(a,b){b.__updateCacheBitmap(a,!1);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){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){C.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)):Ue.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 Ue.clear(a,b)}else b.__renderDrawableClear(a),a.__cacheBitmap.stage=a.stage,c=a.__cacheBitmap,null!=c.stage&&c.__worldVisible&&c.__renderable&&null!=c.__bitmapData&&c.__bitmapData.__isValid&&c.__bitmapData.readable?(b.__pushMaskObject(c),null!=c.__bitmapData.image.buffer.__srcImage?(d=c.__bitmapData.image.buffer.__srcImage.src,
O.startsWith(d,"data:")||O.startsWith(d,"blob:")?pc.renderCanvas(c,b):pc.renderImage(c,b)):pc.renderCanvas(c,b),b.__popMaskObject(c)):pc.clear(c,b);b.__renderEvent(a)};be.renderDrawableClear=function(a,b){be.clear(a,b)};var rl=function(){};h["openfl.display._internal.DOMDisplayObjectContainer"]=rl;rl.__name__="openfl.display._internal.DOMDisplayObjectContainer";rl.renderDrawable=function(a,b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=c.next();null==d.stage&&b.__renderDrawable(d)}for(c=
a.__removedChildren.iterator();c.hasNext();)d=c.next(),null==d.stage&&d.__cleanup();a.__removedChildren.set_length(0);be.renderDrawable(a,b);if(null==a.__cacheBitmap||a.__isCacheBitmapRender){b.__pushMaskObject(a);if(null!=b.__stage){c=0;for(d=a.__children;c<d.length;)f=d[c],++c,b.__renderDrawable(f),f.__renderDirty=!1;a.__renderDirty=!1}else for(c=0,d=a.__children;c<d.length;)f=d[c],++c,b.__renderDrawable(f);b.__popMaskObject(a)}else{c=0;for(d=a.__children;c<d.length;){var f=d[c];++c;b.__renderDrawableClear(f)}Ue.clear(a,
b);a.__cacheBitmap.stage=a.stage}};rl.renderDrawableClear=function(a,b){for(var c=a.__removedChildren.iterator();c.hasNext();){var d=c.next();null==d.stage&&b.__renderDrawableClear(d)}for(c=a.__removedChildren.iterator();c.hasNext();)d=c.next(),null==d.stage&&d.__cleanup();a.__removedChildren.set_length(0);c=0;for(d=a.__children;c<d.length;){var f=d[c];++c;b.__renderDrawableClear(f)}be.clear(a,b)};var Ue=function(){};h["openfl.display._internal.DOMShape"]=Ue;Ue.__name__="openfl.display._internal.DOMShape";
Ue.clear=function(a,b){null!=a.__canvas&&(b.element.removeChild(a.__canvas),a.__canvas=null,a.__style=null)};Ue.render=function(a,b){var c=a.__graphics;if(null!=a.stage&&a.__worldVisible&&a.__renderable&&null!=c){C.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)):Ue.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 Ue.clear(a,b)};var sl=function(){};h["openfl.display._internal.DOMSimpleButton"]=sl;sl.__name__="openfl.display._internal.DOMSimpleButton";sl.renderDrawable=function(a,b){b.__pushMaskObject(a);for(var c=a.__previousStates.iterator();c.hasNext();){var d=
c.next();b.__renderDrawable(d)}a.__previousStates.set_length(0);null!=a.__currentState&&(a.__currentState.stage!=a.stage&&a.__currentState.__setStageReference(a.stage),b.__renderDrawable(a.__currentState));b.__popMaskObject(a);b.__renderEvent(a)};sl.renderDrawableClear=function(a,b){be.renderDrawableClear(a,b)};var ce=function(){};h["openfl.display._internal.DOMTextField"]=ce;ce.__name__="openfl.display._internal.DOMTextField";ce.clear=function(a,b){be.clear(a,b);null!=a.__div&&(b.element.removeChild(a.__div),
a.__div=null,a.__style=null)};ce.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",Jb.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=M.string(b.width-4)+"px");b.__measuredHeight=c.clientHeight;null==a.__div&&
window.document.body.removeChild(c)};ce.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){a.__updateLayout();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,a.dispatchEvent(new fe("textInput",!1,!1,a.get_htmlText())))},!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","#"+O.hex(c.backgroundColor&16777215,6),null):d.removeProperty("background-color");var f=c.width,g=c.height,k="";a.__isHTML&&a.__updateText(gb.parse(a.__text,a.get_multiline(),a.__styleSheet,a.__textFormat,a.__textEngine.textFormatRanges));for(var l=-a.get_scrollH(),m=c.layoutGroups.iterator();m.hasNext();){var h=m.next();if(!(h.lineIndex<a.get_scrollV()-
1)){if(h.lineIndex>c.get_bottomScrollV()-1)break;k+='<div style="';null!=h.format.font&&(k+="font: "+Jb.getFont(h.format)+"; ");null!=h.format.color&&(k+="color: #"+O.hex(h.format.color&16777215,6)+"; ");1==h.format.underline&&(k+="text-decoration: underline; ");if(null!=h.format.align)switch(h.format.align){case 0:k+="text-align: center; ";break;case 2:k+="text-align: justify; ";break;case 4:k+="text-align: right; ";break;default:k+="text-align: left; "}null!=h.format.leftMargin&&(k+="padding-left: "+
1*h.format.leftMargin+"px; ");null!=h.format.rightMargin&&(k+="padding-right: "+1*h.format.rightMargin+"px; ");null!=h.format.indent&&(k+="text-indent: "+1*h.format.indent+"px; ");k+="left: "+(h.offsetX+l)+"px; top: "+(h.offsetY+0+3)+'px; vertical-align: top; position: absolute;">';if(null!=h.format.url&&""!=h.format.url){var r="text-decoration: underline; ";null!=h.format.color&&(r+="color: #"+O.hex(h.format.color&16777215,6)+"; ");k+="<a style='"+r+"' href='"+h.format.url+"' target='"+h.format.target+
"'>"}k=a.__isHTML?k+O.replace(c.text.substring(h.startIndex,h.endIndex)," ","&nbsp;"):k+O.replace(O.htmlEscape(c.text.substring(h.startIndex,h.endIndex))," ","&nbsp;");null!=h.format.url&&""!=h.format.url&&(k+="</a>");k+="</div>"}}c.border?(d.setProperty("border","solid 1px #"+O.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("width",
f+"px",null);d.setProperty("height",g+"px",null);a.__div.innerHTML=k;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 ce.clear(a,b)};ce.renderDrawable=function(a,b){a.__domRender=!0;b.__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.__htmlText&&(a.__updateText(a.__htmlText),a.__dirty=!0,a.__layoutDirty=!0,a.__renderDirty||(a.__renderDirty=!0,a.__setParentRenderDirty())));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){a.__updateLayout();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,a.dispatchEvent(new fe("textInput",!1,!1,a.get_htmlText())))},!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","#"+O.hex(c.backgroundColor&16777215,6),null):d.removeProperty("background-color");var f=c.width,g=c.height,k="";a.__isHTML&&a.__updateText(gb.parse(a.__text,a.get_multiline(),a.__styleSheet,a.__textFormat,
a.__textEngine.textFormatRanges));for(var l=-a.get_scrollH(),m=c.layoutGroups.iterator();m.hasNext();){var h=m.next();if(!(h.lineIndex<a.get_scrollV()-1)){if(h.lineIndex>c.get_bottomScrollV()-1)break;k+='<div style="';null!=h.format.font&&(k+="font: "+Jb.getFont(h.format)+"; ");null!=h.format.color&&(k+="color: #"+O.hex(h.format.color&16777215,6)+"; ");1==h.format.underline&&(k+="text-decoration: underline; ");if(null!=h.format.align)switch(h.format.align){case 0:k+="text-align: center; ";break;case 2:k+=
"text-align: justify; ";break;case 4:k+="text-align: right; ";break;default:k+="text-align: left; "}null!=h.format.leftMargin&&(k+="padding-left: "+1*h.format.leftMargin+"px; ");null!=h.format.rightMargin&&(k+="padding-right: "+1*h.format.rightMargin+"px; ");null!=h.format.indent&&(k+="text-indent: "+1*h.format.indent+"px; ");k+="left: "+(h.offsetX+l)+"px; top: "+(h.offsetY+0+3)+'px; vertical-align: top; position: absolute;">';if(null!=h.format.url&&""!=h.format.url){var r="text-decoration: underline; ";
null!=h.format.color&&(r+="color: #"+O.hex(h.format.color&16777215,6)+"; ");k+="<a style='"+r+"' href='"+h.format.url+"' target='"+h.format.target+"'>"}k=a.__isHTML?k+O.replace(c.text.substring(h.startIndex,h.endIndex)," ","&nbsp;"):k+O.replace(O.htmlEscape(c.text.substring(h.startIndex,h.endIndex))," ","&nbsp;");null!=h.format.url&&""!=h.format.url&&(k+="</a>");k+="</div>"}}c.border?(d.setProperty("border","solid 1px #"+O.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("width",f+"px",null);d.setProperty("height",g+"px",null);a.__div.innerHTML=k;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 ce.clear(a,b)}else b.__renderDrawableClear(a),a.__cacheBitmap.stage=a.stage,c=a.__cacheBitmap,null!=c.stage&&c.__worldVisible&&
c.__renderable&&null!=c.__bitmapData&&c.__bitmapData.__isValid&&c.__bitmapData.readable?(b.__pushMaskObject(c),null!=c.__bitmapData.image.buffer.__srcImage?(d=c.__bitmapData.image.buffer.__srcImage.src,O.startsWith(d,"data:")||O.startsWith(d,"blob:")?pc.renderCanvas(c,b):pc.renderImage(c,b)):pc.renderCanvas(c,b),b.__popMaskObject(c)):pc.clear(c,b);b.__renderEvent(a)};ce.renderDrawableClear=function(a,b){ce.clear(a,b)};ce.__getAttributeMatch=function(a){return null!=a.matched(2)?a.matched(2):a.matched(3)};
var bg=function(){};h["openfl.display._internal.DOMTilemap"]=bg;bg.__name__="openfl.display._internal.DOMTilemap";bg.clear=function(a,b){be.clear(a,b);null!=a.__canvas&&(b.element.removeChild(a.__canvas),a.__canvas=null,a.__style=null)};bg.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=a.__renderTransform;a.__renderTransform=wa.__identity;var d=b.__canvasRenderer;if((null!=a.opaqueBackground||null!=a.__graphics)&&a.__renderable){var f=d.__getAlpha(a.__worldAlpha);if(!(0>=f)){if(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){d.__setBlendMode(a.__worldBlendMode);d.__pushMaskObject(a);var g=d.context;d.setTransform(a.__renderTransform,g);var k=a.opaqueBackground;
g.fillStyle="rgb("+(k>>>16&255)+","+(k>>>8&255)+","+(k&255)+")";g.fillRect(0,0,a.get_width(),a.get_height());d.__popMaskObject(a)}if(null!=a.__graphics&&a.__renderable&&(f=d.__getAlpha(a.__worldAlpha),!(0>=f))){var l=a.__graphics;if(null!=l){C.render(l,d);var m=l.__width,h=l.__height;k=l.__canvas;if(null!=k&&l.__visible&&1<=m&&1<=h){var r=l.__worldTransform;g=d.context;var p=a.__scrollRect,w=a.__worldScale9Grid;if(null==p||0<p.width&&0<p.height){d.__setBlendMode(a.__worldBlendMode);d.__pushMaskObject(a);
g.globalAlpha=f;if(null!=w&&0==r.b&&0==r.c){var u=d.__pixelRatio;f=wa.__pool.get();f.translate(r.tx,r.ty);d.setTransform(f,g);wa.__pool.release(f);f=l.__bounds;var n=l.__renderTransform.a/l.__bitmapScale,t=l.__renderTransform.d/l.__bitmapScale,A=n*r.a,q=t*r.d;r=Math.max(1,Math.round(w.x*n));l=Math.round(w.y*t);p=Math.max(1,Math.round((f.get_right()-w.get_right())*n));var y=Math.round((f.get_bottom()-w.get_bottom())*t);n=Math.round(w.width*n);w=Math.round(w.height*t);t=Math.round(r/u);var E=Math.round(l/
u),L=Math.round(p/u);u=Math.round(y/u);A=f.width*A-t-L;f=f.height*q-E-u;d.applySmoothing(g,!1);0!=n&&0!=w?(g.drawImage(k,0,0,r,l,0,0,t,E),g.drawImage(k,r,0,n,l,t,0,A,E),g.drawImage(k,r+n,0,p,l,t+A,0,L,E),g.drawImage(k,0,l,r,w,0,E,t,f),g.drawImage(k,r,l,n,w,t,E,A,f),g.drawImage(k,r+n,l,p,w,t+A,E,L,f),g.drawImage(k,0,l+w,r,y,0,E+f,t,u),g.drawImage(k,r,l+w,n,y,t,E+f,A,u),g.drawImage(k,r+n,l+w,p,y,t+A,E+f,L,u)):0==n&&0!=w?(h=t+A+L,g.drawImage(k,0,0,m,l,0,0,h,E),g.drawImage(k,0,l,m,w,0,E,h,f),g.drawImage(k,
0,l+w,m,y,0,E+f,h,u)):0==w&&0!=n&&(m=E+f+u,g.drawImage(k,0,0,r,h,0,0,t,m),g.drawImage(k,r,0,n,h,t,0,A,m),g.drawImage(k,r+n,0,p,h,t+A,0,L,m))}else d.setTransform(r,g),g.drawImage(k,0,0,m,h);d.__popMaskObject(a)}}}}}}d=b.__canvasRenderer;a.__renderable&&0!=a.__group.__tiles.length&&(f=d.__getAlpha(a.__worldAlpha),0>=f||(g=d.context,d.__setBlendMode(a.__worldBlendMode),d.__pushMaskObject(a),k=ea.__pool.get(),k.setTo(0,0,a.__width,a.__height),d.__pushMaskRect(k,a.__renderTransform),d.__allowSmoothing&&
a.smoothing||(g.imageSmoothingEnabled=!1),pf.renderTileContainer(a.__group,d,a.__renderTransform,a.__tileset,d.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,f,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,k),d.__allowSmoothing&&a.smoothing||(g.imageSmoothingEnabled=!0),d.__popMaskRect(),d.__popMaskObject(a),ea.__pool.release(k)));a.__renderTransform=c;b.__canvasRenderer.context=null;b.__updateClip(a);b.__applyStyle(a,!0,!1,!0)}else bg.clear(a,b)};bg.renderDrawable=function(a,b){b.__updateCacheBitmap(a,
!1);if(null==a.__cacheBitmap||a.__isCacheBitmapRender)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=a.__renderTransform;a.__renderTransform=wa.__identity;var d=b.__canvasRenderer;if((null!=a.opaqueBackground||null!=a.__graphics)&&
a.__renderable){var f=d.__getAlpha(a.__worldAlpha);if(!(0>=f)){if(null!=a.opaqueBackground&&!a.__isCacheBitmapRender&&0<a.get_width()&&0<a.get_height()){d.__setBlendMode(a.__worldBlendMode);d.__pushMaskObject(a);var g=d.context;d.setTransform(a.__renderTransform,g);var k=a.opaqueBackground;g.fillStyle="rgb("+(k>>>16&255)+","+(k>>>8&255)+","+(k&255)+")";g.fillRect(0,0,a.get_width(),a.get_height());d.__popMaskObject(a)}if(null!=a.__graphics&&a.__renderable&&(f=d.__getAlpha(a.__worldAlpha),!(0>=f))){var l=
a.__graphics;if(null!=l){C.render(l,d);var m=l.__width,h=l.__height;k=l.__canvas;if(null!=k&&l.__visible&&1<=m&&1<=h){var r=l.__worldTransform;g=d.context;var p=a.__scrollRect,w=a.__worldScale9Grid;if(null==p||0<p.width&&0<p.height){d.__setBlendMode(a.__worldBlendMode);d.__pushMaskObject(a);g.globalAlpha=f;if(null!=w&&0==r.b&&0==r.c){var u=d.__pixelRatio;f=wa.__pool.get();f.translate(r.tx,r.ty);d.setTransform(f,g);wa.__pool.release(f);f=l.__bounds;var n=l.__renderTransform.a/l.__bitmapScale,t=l.__renderTransform.d/
l.__bitmapScale,A=n*r.a,q=t*r.d;r=Math.max(1,Math.round(w.x*n));l=Math.round(w.y*t);p=Math.max(1,Math.round((f.get_right()-w.get_right())*n));var y=Math.round((f.get_bottom()-w.get_bottom())*t);n=Math.round(w.width*n);w=Math.round(w.height*t);t=Math.round(r/u);var E=Math.round(l/u),L=Math.round(p/u);u=Math.round(y/u);A=f.width*A-t-L;f=f.height*q-E-u;d.applySmoothing(g,!1);0!=n&&0!=w?(g.drawImage(k,0,0,r,l,0,0,t,E),g.drawImage(k,r,0,n,l,t,0,A,E),g.drawImage(k,r+n,0,p,l,t+A,0,L,E),g.drawImage(k,0,l,
r,w,0,E,t,f),g.drawImage(k,r,l,n,w,t,E,A,f),g.drawImage(k,r+n,l,p,w,t+A,E,L,f),g.drawImage(k,0,l+w,r,y,0,E+f,t,u),g.drawImage(k,r,l+w,n,y,t,E+f,A,u),g.drawImage(k,r+n,l+w,p,y,t+A,E+f,L,u)):0==n&&0!=w?(h=t+A+L,g.drawImage(k,0,0,m,l,0,0,h,E),g.drawImage(k,0,l,m,w,0,E,h,f),g.drawImage(k,0,l+w,m,y,0,E+f,h,u)):0==w&&0!=n&&(m=E+f+u,g.drawImage(k,0,0,r,h,0,0,t,m),g.drawImage(k,r,0,n,h,t,0,A,m),g.drawImage(k,r+n,0,p,h,t+A,0,L,m))}else d.setTransform(r,g),g.drawImage(k,0,0,m,h);d.__popMaskObject(a)}}}}}}d=
b.__canvasRenderer;a.__renderable&&0!=a.__group.__tiles.length&&(f=d.__getAlpha(a.__worldAlpha),0>=f||(g=d.context,d.__setBlendMode(a.__worldBlendMode),d.__pushMaskObject(a),k=ea.__pool.get(),k.setTo(0,0,a.__width,a.__height),d.__pushMaskRect(k,a.__renderTransform),d.__allowSmoothing&&a.smoothing||(g.imageSmoothingEnabled=!1),pf.renderTileContainer(a.__group,d,a.__renderTransform,a.__tileset,d.__allowSmoothing&&a.smoothing,a.tileAlphaEnabled,f,a.tileBlendModeEnabled,a.__worldBlendMode,null,null,k),
d.__allowSmoothing&&a.smoothing||(g.imageSmoothingEnabled=!0),d.__popMaskRect(),d.__popMaskObject(a),ea.__pool.release(k)));a.__renderTransform=c;b.__canvasRenderer.context=null;b.__updateClip(a);b.__applyStyle(a,!0,!1,!0)}else bg.clear(a,b);else b.__renderDrawableClear(a),a.__cacheBitmap.stage=a.stage,c=a.__cacheBitmap,null!=c.stage&&c.__worldVisible&&c.__renderable&&null!=c.__bitmapData&&c.__bitmapData.__isValid&&c.__bitmapData.readable?(b.__pushMaskObject(c),null!=c.__bitmapData.image.buffer.__srcImage?
(d=c.__bitmapData.image.buffer.__srcImage.src,O.startsWith(d,"data:")||O.startsWith(d,"blob:")?pc.renderCanvas(c,b):pc.renderImage(c,b)):pc.renderCanvas(c,b),b.__popMaskObject(c)):pc.clear(c,b);b.__renderEvent(a)};bg.renderDrawableClear=function(a,b){bg.clear(a,b)};var wg=function(){};h["openfl.display._internal.DOMVideo"]=wg;wg.__name__="openfl.display._internal.DOMVideo";wg.clear=function(a,b){be.clear(a,b);a.__active&&(b.element.removeChild(a.__stream.__video),a.__active=!1)};wg.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)):wg.clear(a,b)};wg.renderDrawable=function(a,b){wg.render(a,b);b.__renderEvent(a)};wg.renderDrawableClear=function(a,b){be.renderDrawableClear(a,b)};var qf=function(a){this.buffer=a;this.bPos=this.iPos=
this.fPos=this.oPos=this.ffPos=this.iiPos=this.tsPos=0;this.prev=Z.UNKNOWN};h["openfl.display._internal.DrawCommandReader"]=qf;qf.__name__="openfl.display._internal.DrawCommandReader";qf.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=Z.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=Z.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=Z.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=Z.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=Z.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=Z.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=Z.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=Z.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=Z.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=Z.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=Z.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=Z.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=Z.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=Z.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=Z.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=Z.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=Z.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=Z.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=Z.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=Z.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=Z.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=Z.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__:qf};var Z=G["openfl.display._internal.DrawCommandType"]={__ename__:"openfl.display._internal.DrawCommandType",__constructs__:null,BEGIN_BITMAP_FILL:{_hx_name:"BEGIN_BITMAP_FILL",_hx_index:0,__enum__:"openfl.display._internal.DrawCommandType",
toString:t},BEGIN_FILL:{_hx_name:"BEGIN_FILL",_hx_index:1,__enum__:"openfl.display._internal.DrawCommandType",toString:t},BEGIN_GRADIENT_FILL:{_hx_name:"BEGIN_GRADIENT_FILL",_hx_index:2,__enum__:"openfl.display._internal.DrawCommandType",toString:t},BEGIN_SHADER_FILL:{_hx_name:"BEGIN_SHADER_FILL",_hx_index:3,__enum__:"openfl.display._internal.DrawCommandType",toString:t},CUBIC_CURVE_TO:{_hx_name:"CUBIC_CURVE_TO",_hx_index:4,__enum__:"openfl.display._internal.DrawCommandType",toString:t},CURVE_TO:{_hx_name:"CURVE_TO",
_hx_index:5,__enum__:"openfl.display._internal.DrawCommandType",toString:t},DRAW_CIRCLE:{_hx_name:"DRAW_CIRCLE",_hx_index:6,__enum__:"openfl.display._internal.DrawCommandType",toString:t},DRAW_ELLIPSE:{_hx_name:"DRAW_ELLIPSE",_hx_index:7,__enum__:"openfl.display._internal.DrawCommandType",toString:t},DRAW_QUADS:{_hx_name:"DRAW_QUADS",_hx_index:8,__enum__:"openfl.display._internal.DrawCommandType",toString:t},DRAW_RECT:{_hx_name:"DRAW_RECT",_hx_index:9,__enum__:"openfl.display._internal.DrawCommandType",
toString:t},DRAW_ROUND_RECT:{_hx_name:"DRAW_ROUND_RECT",_hx_index:10,__enum__:"openfl.display._internal.DrawCommandType",toString:t},DRAW_TILES:{_hx_name:"DRAW_TILES",_hx_index:11,__enum__:"openfl.display._internal.DrawCommandType",toString:t},DRAW_TRIANGLES:{_hx_name:"DRAW_TRIANGLES",_hx_index:12,__enum__:"openfl.display._internal.DrawCommandType",toString:t},END_FILL:{_hx_name:"END_FILL",_hx_index:13,__enum__:"openfl.display._internal.DrawCommandType",toString:t},LINE_BITMAP_STYLE:{_hx_name:"LINE_BITMAP_STYLE",
_hx_index:14,__enum__:"openfl.display._internal.DrawCommandType",toString:t},LINE_GRADIENT_STYLE:{_hx_name:"LINE_GRADIENT_STYLE",_hx_index:15,__enum__:"openfl.display._internal.DrawCommandType",toString:t},LINE_STYLE:{_hx_name:"LINE_STYLE",_hx_index:16,__enum__:"openfl.display._internal.DrawCommandType",toString:t},LINE_TO:{_hx_name:"LINE_TO",_hx_index:17,__enum__:"openfl.display._internal.DrawCommandType",toString:t},MOVE_TO:{_hx_name:"MOVE_TO",_hx_index:18,__enum__:"openfl.display._internal.DrawCommandType",
toString:t},OVERRIDE_BLEND_MODE:{_hx_name:"OVERRIDE_BLEND_MODE",_hx_index:19,__enum__:"openfl.display._internal.DrawCommandType",toString:t},OVERRIDE_MATRIX:{_hx_name:"OVERRIDE_MATRIX",_hx_index:20,__enum__:"openfl.display._internal.DrawCommandType",toString:t},WINDING_EVEN_ODD:{_hx_name:"WINDING_EVEN_ODD",_hx_index:21,__enum__:"openfl.display._internal.DrawCommandType",toString:t},WINDING_NON_ZERO:{_hx_name:"WINDING_NON_ZERO",_hx_index:22,__enum__:"openfl.display._internal.DrawCommandType",toString:t},
UNKNOWN:{_hx_name:"UNKNOWN",_hx_index:23,__enum__:"openfl.display._internal.DrawCommandType",toString:t}};Z.__constructs__=[Z.BEGIN_BITMAP_FILL,Z.BEGIN_FILL,Z.BEGIN_GRADIENT_FILL,Z.BEGIN_SHADER_FILL,Z.CUBIC_CURVE_TO,Z.CURVE_TO,Z.DRAW_CIRCLE,Z.DRAW_ELLIPSE,Z.DRAW_QUADS,Z.DRAW_RECT,Z.DRAW_ROUND_RECT,Z.DRAW_TILES,Z.DRAW_TRIANGLES,Z.END_FILL,Z.LINE_BITMAP_STYLE,Z.LINE_GRADIENT_STYLE,Z.LINE_STYLE,Z.LINE_TO,Z.MOVE_TO,Z.OVERRIDE_BLEND_MODE,Z.OVERRIDE_MATRIX,Z.WINDING_EVEN_ODD,Z.WINDING_NON_ZERO,Z.UNKNOWN];
var zg=function(){};h["openfl.display._internal.FlashRenderer"]=zg;zg.__name__="openfl.display._internal.FlashRenderer";zg.instances=null;zg.register=function(a){null==zg.instances&&(zg.instances=ap.toObjectMap(null,!0),ha.get_current().stage.addEventListener("enterFrame",zg.render,!1,-2147483648));zg.instances.set(a,!0)};zg.render=function(a){for(a=zg.instances.keys();a.hasNext();)a.next().__renderFlash()};var Kn=function(){};h["openfl.display._internal.IDisplayObject"]=Kn;Kn.__name__="openfl.display._internal.IDisplayObject";
Kn.__isInterface__=!0;Kn.prototype={__renderFlash:null,__class__:Kn};var Kh=function(){};h["openfl.display._internal.FlashTilemap"]=Kh;Kh.__name__="openfl.display._internal.FlashTilemap";Kh.render=function(a){};Kh.renderTileContainer=function(a,b,c,d,f,g,k,l,m,h,r,p){};var wh=function(a,b,c,d,f,g,k){null==k&&(k=.05);null==g&&(g=!1);wi.call(this,a,b,c,d,f,g,k);this.p_perm=[];for(b=0;512>b;)c=b++,this.p_perm[c]=wh.P[c&255];this.base_factor=.03125;this.setSeed(a)};h["openfl.display._internal.PerlinNoise"]=
wh;wh.__name__="openfl.display._internal.PerlinNoise";wh.__super__=wi;wh.prototype=x(wi.prototype,{p_perm:null,x_offset:null,y_offset:null,z_offset:null,base_factor:null,fill:function(a,b,c,d){var f=a.width,g=a.height,k=this.octaves,l=this.octaves_frequencies,m=this.octaves_persistences,h=1==(1&this.channels),r=2==(2&this.channels),p=4==(4&this.channels),w=0;h&&++w;r&&++w;p&&++w;var u=this.grayscale,t=this.stitch_threshold*f|0,n=this.stitch_threshold*g|0,A=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 q=0;q<g;){var y=q++;b=A;for(var E=0,L=f;E<L;){for(var v=E++,x=0,C=0,G=0,Y=0,B=k;Y<B;){var H=Y++,D=l[H];H=m[H];x+=this.noise(b*D,c*D,d*D)*H;u||(1<w&&(C+=this.noise((b+1)*D,(c+1)*D,d*D)*H),2<w&&(G+=this.noise((b+2)*D,(c+2)*D,d*D)*H))}Y=0;u?Y=this.color(x,x,x):h&&r&&p?Y=this.color(x,C,G):h&&r?Y=this.color(x,C,null):h&&p?Y=this.color(x,null,C):r&&p?Y=this.color(null,x,C):h?Y=this.color(x,null,null):r?Y=this.color(null,x,null):p&&(Y=this.color(null,
null,x));this.stitch&&(Y=this.stitching(a,Y,v,y,t,n,f,g));a.setPixel32(v,y,Y);b+=this.base_factor}c+=this.base_factor}},noise:function(a,b,c){var d=a-a%1,f=b-b%1,g=c-c%1;a-=d;b-=f;c-=g;var k=(d|0)&255,l=(f|0)&255,m=(g|0)&255;g=this.fade(a);f=this.fade(b);d=this.fade(c);var h=this.p_perm[k]+l,r=this.p_perm[h]+m;h=this.p_perm[h+1]+m;l=this.p_perm[k+1]+l;k=this.p_perm[l]+m;var p=this.p_perm[l+1]+m,w=a-1,u=b-1,t=c-1,n=this.p_perm[p+1]&15;m=(0==(n&1)?8>n?w:u:8>n?-w:-u)+(0==(n&2)?4>n?u:12==n?w:t:4>n?-u:
14==n?-w:-t);n=this.p_perm[h+1]&15;l=(0==(n&1)?8>n?a:u:8>n?-a:-u)+(0==(n&2)?4>n?u:12==n?a:t:4>n?-u:14==n?-a:-t);n=this.p_perm[k+1]&15;var A=(0==(n&1)?8>n?w:b:8>n?-w:-b)+(0==(n&2)?4>n?b:12==n?w:t:4>n?-b:14==n?-w:-t);n=this.p_perm[r+1]&15;t=(0==(n&1)?8>n?a:b:8>n?-a:-b)+(0==(n&2)?4>n?b:12==n?a:t:4>n?-b:14==n?-a:-t);n=this.p_perm[p]&15;p=(0==(n&1)?8>n?w:u:8>n?-w:-u)+(0==(n&2)?4>n?u:12==n?w:c:4>n?-u:14==n?-w:-c);n=this.p_perm[h]&15;h=(0==(n&1)?8>n?a:u:8>n?-a:-u)+(0==(n&2)?4>n?u:12==n?a:c:4>n?-u:14==n?
-a:-c);n=this.p_perm[k]&15;k=(0==(n&1)?8>n?w:b:8>n?-w:-b)+(0==(n&2)?4>n?b:12==n?w:c:4>n?-b:14==n?-w:-c);n=this.p_perm[r]&15;a=(0==(n&1)?8>n?a:b:8>n?-a:-b)+(0==(n&2)?4>n?b:12==n?a:c:4>n?-b:14==n?-a:-c);t+=g*(A-t);a+=g*(k-a);a+=f*(h+g*(p-h)-a);return a+d*(t+f*(l+g*(m-l)-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__:wh});var Lh=function(a,b,c,d,f,g,k){null==k&&(k=!1);null==g&&(g=!1);null==f&&(f=!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=f;this.centroid=g;this.textureAlpha=k};h["openfl.display._internal.SamplerState"]=Lh;Lh.__name__="openfl.display._internal.SamplerState";Lh.prototype={centroid:null,filter:null,ignoreSampler:null,lodBias:null,mipfilter:null,mipmapGenerated:null,textureAlpha:null,wrap:null,clone:function(){var a=new Lh(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__:Lh};var ul=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.display._internal.ShaderBuffer"]=ul;ul.__name__="openfl.display._internal.ShaderBuffer";ul.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 f=c++;b=a.__inputBitmapData[f];this.inputs[f]=b.input;this.inputFilter[f]=b.filter;this.inputMipFilter[f]=b.mipFilter;this.inputRefs[f]=
b;this.inputWrap[f]=b.wrap}b=a.__paramBool.length;var g=a.__paramFloat.length,k=a.__paramInt.length;this.paramCount=b+g+k;this.paramBoolCount=b;this.paramFloatCount=g;this.paramIntCount=k;var l=0;c=0;for(d=b;c<d;){f=c++;var m=a.__paramBool[f];this.paramPositions[l]=this.paramDataLength;var h=null!=m.value?m.value.length:0;this.paramLengths[l]=h;this.paramDataLength+=h;this.paramTypes[l]=0;this.paramRefs_Bool[f]=m;++l}c=0;for(d=g;c<d;)f=c++,m=a.__paramFloat[f],this.paramPositions[l]=this.paramDataLength,
h=null!=m.value?m.value.length:0,this.paramLengths[l]=h,this.paramDataLength+=h,this.paramTypes[l]=1,this.paramRefs_Float[f]=m,++l;c=0;for(d=k;c<d;)f=c++,m=a.__paramInt[f],this.paramPositions[l]=this.paramDataLength,h=null!=m.value?m.value.length:0,this.paramLengths[l]=h,this.paramDataLength+=h,this.paramTypes[l]=2,this.paramRefs_Int[f]=m,++l;if(0<this.paramDataLength)if(null==this.paramData){c=this.paramDataLength;var r=m=l=k=d=null;this.paramData=c=null!=c?new Float32Array(c):null!=d?new Float32Array(d):
null!=k?new Float32Array(k.__array):null!=l?new Float32Array(l):null!=m?null==r?new Float32Array(m,0):new Float32Array(m,0,r):null}else this.paramDataLength>this.paramData.length&&(c=this.paramDataLength,r=m=l=k=d=null,c=null!=c?new Float32Array(c):null!=d?new Float32Array(d):null!=k?new Float32Array(k.__array):null!=l?new Float32Array(l):null!=m?null==r?new Float32Array(m,0):new Float32Array(m,0,r):null,c.set(this.paramData),this.paramData=c);c=r=m=l=k=0;for(d=this.paramCount;c<d;)if(f=c++,h=this.paramLengths[f],
f<b){f=this.paramRefs_Bool[k];++k;for(var p=0;p<h;){var w=p++;this.paramData[r]=f.value[w]?1:0;++r}}else if(f<b+g)for(f=this.paramRefs_Float[l],++l,p=0;p<h;)w=p++,this.paramData[r]=f.value[w],++r;else for(f=this.paramRefs_Int[m],++m,p=0;p<h;)w=p++,this.paramData[r]=f.value[w],++r;this.shader=a}},__class__:ul};var Ob=function(a,b,c){this.profile=3;this.driverInfo="OpenGL (Direct blitting)";this.backBufferHeight=this.backBufferWidth=0;Da.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 uj);this.__state=new uj;var d;this.__vertexConstants=new Float32Array(512);this.__fragmentConstants=new Float32Array(512);var f=null;a=[1,1,1,1];var g=d=c=b=null;this.__positionScale=a=null!=f?new Float32Array(f):null!=a?new Float32Array(a):null!=b?new Float32Array(b.__array):null!=c?new Float32Array(c):null!=d?null==g?new Float32Array(d,0):new Float32Array(d,0,g):null;this.__programs=
new Ba;-1==Ob.__glMaxViewportDims&&(Ob.__glMaxViewportDims=this.gl.getParameter(this.gl.MAX_VIEWPORT_DIMS));this.maxBackBufferHeight=this.maxBackBufferWidth=Ob.__glMaxViewportDims;-1==Ob.__glMaxTextureMaxAnisotropy&&(a=this.gl.getExtension("EXT_texture_filter_anisotropic"),null!=a&&Object.prototype.hasOwnProperty.call(a,"MAX_TEXTURE_MAX_ANISOTROPY_EXT")||(a=this.gl.getExtension("MOZ_EXT_texture_filter_anisotropic")),null!=a&&Object.prototype.hasOwnProperty.call(a,"MAX_TEXTURE_MAX_ANISOTROPY_EXT")||
(a=this.gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic")),null!=a?(Ob.__glTextureMaxAnisotropy=a.TEXTURE_MAX_ANISOTROPY_EXT,Ob.__glMaxTextureMaxAnisotropy=this.gl.getParameter(a.MAX_TEXTURE_MAX_ANISOTROPY_EXT)):(Ob.__glTextureMaxAnisotropy=0,Ob.__glMaxTextureMaxAnisotropy=0));-1==Ob.__glDepthStencil&&(Ob.__glDepthStencil=this.gl.DEPTH_STENCIL);-1==Ob.__glMemoryTotalAvailable&&(a=this.gl.getExtension("NVX_gpu_memory_info"),null!=a&&(Ob.__glMemoryTotalAvailable=a.GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX,
Ob.__glMemoryCurrentAvailable=a.GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX));null==Ob.__driverInfo&&(a=this.gl.getParameter(this.gl.VENDOR),b=this.gl.getParameter(this.gl.VERSION),c=this.gl.getParameter(this.gl.RENDERER),d=this.gl.getParameter(this.gl.SHADING_LANGUAGE_VERSION),Ob.__driverInfo="OpenGL Vendor="+a+" Version="+b+" Renderer="+c+" GLSL="+d);this.driverInfo=Ob.__driverInfo;this.__quadIndexBufferElements=16383;f=this.__quadIndexBufferCount=6*this.__quadIndexBufferElements;g=d=c=b=a=null;
a=null!=f?new Uint16Array(f):null!=a?new Uint16Array(a):null!=b?new Uint16Array(b.__array):null!=c?new Uint16Array(c):null!=d?null==g?new Uint16Array(d,0):new Uint16Array(d,0,g):null;d=c=b=0;for(g=this.__quadIndexBufferElements;d<g;)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)};h["openfl.display3D.Context3D"]=Ob;Ob.__name__="openfl.display3D.Context3D";
Ob.__driverInfo=null;Ob.__super__=Da;Ob.prototype=x(Da.prototype,{backBufferHeight:null,backBufferWidth:null,driverInfo:null,maxBackBufferHeight:null,maxBackBufferWidth:null,profile:null,gl:null,__backBufferAntiAlias:null,__backBufferTexture:null,__backBufferWantsBestResolution:null,__backBufferWantsBestResolutionOnBrowserZoom: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,f,g,k){null==k&&(k=7);null==g&&(g=0);null==f&&(f=1);null==d&&(d=1);null==c&&(c=0);null==b&&(b=0);null==a&&(a=0);this.__flushGLFramebuffer();this.__flushGLViewport();var l=0;if(0!=(k&1)){null==this.__state.renderToTexture&&(this.__stage.context3D!=this||this.__stage.__renderer.__cleared||(this.__stage.__renderer.__cleared=
!0),this.__cleared=!0);l|=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!=(k&2)&&(l|=this.gl.DEPTH_BUFFER_BIT,1!=this.__contextState.depthMask&&(this.gl.depthMask(!0),
this.__contextState.depthMask=!0),this.gl.clearDepth(f));0!=(k&4)&&(l|=this.gl.STENCIL_BUFFER_BIT,255!=this.__contextState.stencilWriteMask&&(this.gl.stencilMask(255),this.__contextState.stencilWriteMask=255),this.gl.clearStencil(g),this.__contextState.stencilWriteMask=255);0!=l&&(this.__setGLScissorTest(!1),this.gl.clear(l))},configureBackBuffer:function(a,b,c,d,f,g){null==g&&(g=!1);null==f&&(f=!1);null==d&&(d=!0);f&&(a=a*this.__stage.window.__scale|0,b=b*this.__stage.window.__scale|0);if(null==
this.__stage3D)this.backBufferWidth=a,this.backBufferHeight=b,this.__backBufferAntiAlias=c,this.__state.backBufferEnableDepthAndStencil=d,this.__backBufferWantsBestResolution=f,this.__backBufferWantsBestResolutionOnBrowserZoom=g;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 k=f?a:a*this.__stage.window.__scale|0,l=f?b:b*this.__stage.window.__scale|0;k=ia.toFloatVector(null,null,null,[k,l,0,1,1,0,l,0,0,1,k,0,0,1,0,0,0,0,0,0]);this.__stage3D.__vertexBuffer.uploadFromVector(k,0,20);null==this.__stage3D.__indexBuffer&&(this.__stage3D.__indexBuffer=this.createIndexBuffer(6),k=ia.toIntVector(null,null,
null,[0,1,2,2,1,3]),this.__stage3D.__indexBuffer.uploadFromVector(k,0,6))}this.backBufferWidth=a;this.backBufferHeight=b;this.__backBufferAntiAlias=c;this.__state.backBufferEnableDepthAndStencil=d;this.__backBufferWantsBestResolution=f;this.__backBufferWantsBestResolutionOnBrowserZoom=g;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 xi(this,a,
b,c,d)},createIndexBuffer:function(a,b){null==b&&(b=1);return new Ln(this,a,b)},createProgram:function(a){null==a&&(a=0);return new Mn(this,a)},createRectangleTexture:function(a,b,c,d){return new vj(this,a,b,wj.toString(c),d)},createTexture:function(a,b,c,d,f){null==f&&(f=0);return new Mh(this,a,b,c,d,f)},createVertexBuffer:function(a,b,c){null==c&&(c=1);return new Nn(this,a,b,Eo.toString(c))},createVideoTexture:function(){return new Nl(this)},dispose:function(a){this.gl=null;this.__dispose()},drawToBitmapData:function(a,
b,c){if(null!=a)if(b=null!=b?b.__toLimeRectangle():new Uc(0,0,this.backBufferWidth,this.backBufferHeight),c=null!=c?c.__toLimeVector2():new yd,this.__stage.context3D==this){if(null!=this.__stage.window){if(null!=this.__stage3D){var d=-this.__stage3D.get_x()|0,f=-this.__stage3D.get_y()|0;c.x=d;c.y=f}f=this.__stage.window.readPixels();a.image.copyPixels(f,b,c)}}else if(null!=this.__backBufferTexture){d=this.__state.renderToTexture;this.setRenderToBackBuffer();this.__flushGLFramebuffer();this.__flushGLViewport();
f=this.backBufferWidth*this.backBufferHeight*4;var g=f=null!=f?new Uint8Array(f):null;f=this.gl;f.readPixels(0,0,this.backBufferWidth,this.backBufferHeight,this.__backBufferTexture.__format,this.gl.UNSIGNED_BYTE,g);f=new Eb(new mf(g,this.backBufferWidth,this.backBufferHeight,32,2));a.image.copyPixels(f,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,f){if(0!=c&&null!=this.__state.program&&(null==this.__state.program||1!=this.__state.program.__format)){-1==c&&(c=(kb.get_length(d)>>>2)-f);var g=(a=1==a)?this.__vertexConstants:this.__fragmentConstants;d=kb.toBytes(d);var k=0;null==k&&(k=0);d=null==
k?new Float32Array(d.b.bufferValue):new Float32Array(d.b.bufferValue,k);k=4*b;f=L.toFloat(f)/L.toFloat(4)|0;for(var l=0,m=4*c;l<m;){var h=l++;g[k+h]=d[f+h]}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),ec.uniformMatrix4fv(this.gl,b,d,a);else{var f=(a=1==a)?this.__vertexConstants:this.__fragmentConstants;c=c.rawData;var g=4*b;d?(f[g++]=c.get(0),f[g++]=c.get(4),f[g++]=c.get(8),f[g++]=c.get(12),f[g++]=c.get(1),f[g++]=c.get(5),f[g++]=c.get(9),f[g++]=
c.get(13),f[g++]=c.get(2),f[g++]=c.get(6),f[g++]=c.get(10),f[g++]=c.get(14),f[g++]=c.get(3),f[g++]=c.get(7),f[g++]=c.get(11)):(f[g++]=c.get(0),f[g++]=c.get(1),f[g++]=c.get(2),f[g++]=c.get(3),f[g++]=c.get(4),f[g++]=c.get(5),f[g++]=c.get(6),f[g++]=c.get(7),f[g++]=c.get(8),f[g++]=c.get(9),f[g++]=c.get(10),f[g++]=c.get(11),f[g++]=c.get(12),f[g++]=c.get(13),f[g++]=c.get(14));f[g++]=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 f=(a=1==a)?this.__vertexConstants:this.__fragmentConstants,g=0,k=4*b,l=0,m=d;l<m;)l++,f[k++]=c.get(g++),f[k++]=c.get(g++),f[k++]=c.get(g++),f[k++]=c.get(g++);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 Lh);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,f){null==f&&(f=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=f},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(!(0>a))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 Lc;}},__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 Lc;}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 Lc;}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 sc("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;this.__backBufferWantsBestResolution&&(a=this.__state.scissorRectangle.x*this.__stage.window.__scale|0,b=this.__state.scissorRectangle.y*this.__stage.window.__scale|0,c=
this.__state.scissorRectangle.width*this.__stage.window.__scale|0,d=this.__state.scissorRectangle.height*this.__stage.window.__scale|0);null==this.__state.renderToTexture&&null==this.__stage3D&&(b=(this.__stage.window.__height*this.__stage.window.__scale|0)-d-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,f=this.__state.textures.length;d<f;){var g=d++;b=this.__state.textures[g];c=this.__state.samplerStates[g];null==c&&(this.__state.samplerStates[g]=new Lh,c=this.__state.samplerStates[g]);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[g]=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),null!=this.__state.program.__agalAlphaSamplerEnabled[a]&&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=this.backBufferWidth,b=this.backBufferHeight;null!=this.__stage3D||this.__backBufferWantsBestResolution||(a=this.backBufferWidth*this.__stage.window.__scale|0,b=this.backBufferHeight*this.__stage.window.__scale|0);var c=
null==this.__stage3D?0:this.__stage3D.get_x()|0,d=this.__stage.window.__height*this.__stage.window.__scale-b-(null==this.__stage3D?0:this.__stage3D.get_y())|0;this.gl.viewport(c,d,a,b)}else this.gl.viewport(0,0,this.backBufferWidth,this.backBufferHeight);else b=a=0,this.__state.renderToTexture instanceof Mh?(b=this.__state.renderToTexture,a=b.__width,b=b.__height):this.__state.renderToTexture instanceof vj?(b=this.__state.renderToTexture,a=b.__width,b=b.__height):this.__state.renderToTexture instanceof
xi&&(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 Lc;}},__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 S;c.assemble(Fo.toString(1),"m44 op, va0, vc0\nmov v0, va1");var d=
new S;d.assemble(Fo.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},get_totalGPUMemory:function(){if(-1!=
Ob.__glMemoryCurrentAvailable){var a=this.gl.getParameter(Ob.__glMemoryCurrentAvailable),b=this.gl.getParameter(Ob.__glMemoryTotalAvailable);if(0<b)return 1024*(b-a)}return 0},__class__:Ob,__properties__:{get_totalGPUMemory:"get_totalGPUMemory",set_enableErrorChecking:"set_enableErrorChecking",get_enableErrorChecking:"get_enableErrorChecking"}});var Eo={fromString:function(a){switch(a){case "dynamicDraw":return 0;case "staticDraw":return 1;default:return null}},toString:function(a){switch(a){case 0:return"dynamicDraw";
case 1:return"staticDraw";default:return null}}},Fo={fromString:function(a){switch(a){case "fragment":return 0;case "vertex":return 1;default:return null}},toString:function(a){switch(a){case 0:return"fragment";case 1:return"vertex";default:return null}}},wj={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}},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}}},Ln=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"]=Ln;Ln.__name__="openfl.display3D.IndexBuffer3D";Ln.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=kb.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),ec.bufferData(b,b.ELEMENT_ARRAY_BUFFER,a,this.__usage))},uploadFromVector:function(a,b,c){if(null!=a){var d=b+c,f=this.__tempUInt16Array;if(null==
this.__tempUInt16Array||this.__tempUInt16Array.length<c)this.__tempUInt16Array=null!=c?new Uint16Array(c):null,null!=f&&this.__tempUInt16Array.set(f);for(c=b;c<d;)f=c++,this.__tempUInt16Array[f-b]=a.get(f);this.uploadFromTypedArray(this.__tempUInt16Array)}},__class__:Ln};var Mn=function(a,b){this.__context=a;this.__format=b;0==this.__format?(this.__agalSamplerUsageMask=0,this.__agalUniforms=new ib,this.__agalSamplerUniforms=new ib,this.__agalAlphaSamplerUniforms=new ib,this.__agalAlphaSamplerEnabled=
[]):(this.__glslAttribNames=[],this.__glslAttribTypes=[],this.__glslSamplerNames=[],this.__glslUniformLocations=[],this.__glslUniformNames=[],this.__glslUniformTypes=[]);this.__samplerStates=[]};h["openfl.display3D.Program3D"]=Mn;Mn.__name__="openfl.display3D.Program3D";Mn.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 O.startsWith(a,"va")?M.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 O.startsWith(a,"vc")?M.parseInt(a.substring(2)):O.startsWith(a,"fc")?M.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=Ud.convertToGLSL(a,null);b=Ud.convertToGLSL(b,c);5==Pa.level&&(Pa.info(a,{fileName:"openfl/display3D/Program3D.hx",
lineNumber:399,className:"openfl.display3D.Program3D",methodName:"upload"}),Pa.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 f=this.__glslSamplerNames;d=this.__glslAttribNames;var g=this.__glslAttribTypes;a=this.__glslUniformNames;this.__glslSamplerNames=
[];this.__glslAttribNames=[];this.__glslAttribTypes=[];this.__glslUniformLocations=[];b=this.__context.gl;for(c=0;c<f.length;){var k=f[c];++c;var l=b.getUniformLocation(this.__glProgram,k);this.__glslSamplerNames[l]=k}c=0;for(f=d.length;c<f;)k=c++,l=b.getAttribLocation(this.__glProgram,d[k]),this.__glslAttribNames[l]=d[k],this.__glslAttribTypes[l]=g[k];c=0;for(f=a.length;c<f;)k=c++,d=b.getUniformLocation(this.__glProgram,a[k]),this.__glslUniformLocations[k]=d}}},__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 ib,d=new ib,f=0;f<b;){var g=f++,k=a.getActiveUniform(this.__glProgram,g),l=k.name,m=k.size,h=k.type;k=new Ol(this.__context);k.name=l;k.size=m;k.type=h;k.location=a.getUniformLocation(this.__glProgram,k.name);l=k.name.indexOf("[");
0<=l&&(k.name=k.name.substring(0,l));switch(k.type){case 35674:k.regCount=2;break;case 35675:k.regCount=3;break;case 35676:k.regCount=4;break;default:k.regCount=1}k.regCount*=k.size;this.__agalUniforms.add(k);if("vcPositionScale"==k.name)this.__agalPositionScale=k;else if(O.startsWith(k.name,"vc"))k.regIndex=M.parseInt(k.name.substring(2)),k.regData=this.__context.__vertexConstants,c.add(k);else if(O.startsWith(k.name,"fc"))k.regIndex=M.parseInt(k.name.substring(2)),k.regData=this.__context.__fragmentConstants,
d.add(k);else if(O.startsWith(k.name,"sampler")&&-1==k.name.indexOf("alpha"))for(k.regIndex=M.parseInt(k.name.substring(7)),this.__agalSamplerUniforms.add(k),l=0,m=k.regCount;l<m;)h=l++,this.__agalSamplerUsageMask|=1<<k.regIndex+h;else O.startsWith(k.name,"sampler")&&O.endsWith(k.name,"_alpha")?(l=k.name.indexOf("_")-7,k.regIndex=M.parseInt(k.name.substring(7,7+l))+4,this.__agalAlphaSamplerUniforms.add(k)):O.startsWith(k.name,"sampler")&&O.endsWith(k.name,"_alphaEnabled")&&(k.regIndex=M.parseInt(k.name.substring(7)),
this.__agalAlphaSamplerEnabled[k.regIndex]=k);5==Pa.level&&Pa.verbose(""+g+" name:"+k.name+" type:"+k.type+" size:"+k.size+" location:"+M.string(k.location),{fileName:"openfl/display3D/Program3D.hx",lineNumber:577,className:"openfl.display3D.Program3D",methodName:"__buildAGALUniformList"})}this.__agalVertexUniformMap=new xj(le.array(c));this.__agalFragmentUniformMap=new xj(le.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 Lc("!!! 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 Lc("!!! 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 E("uniform ([A-Za-z0-9]+) ([A-Za-z0-9_]+)",""):new E("attribute ([A-Za-z0-9]+) ([A-Za-z0-9_]+)","");d.matchSub(a,c);){var f=d.matched(1);var g=d.matched(2);if(!O.startsWith(g,"gl_")){if(O.startsWith(f,"sampler"))this.__glslSamplerNames.push(g);else{switch(f){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 "dvec4":case "vec4":c=7;break;case "double":case "float":c=
4;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 "mat4x2":c=18;break;case "mat4x3":c=19;break;case "mat4":case "mat4x4":c=20;break;case "int":case "uint":c=8;break;case "ivec2":case "uvec2":c=9;break;case "ivec3":case "uvec3":c=10;break;case "ivec4":case "uvec4":c=11;break;default:c=null}"uniform"==b?(this.__glslUniformNames.push(g),this.__glslUniformTypes.push(c)):
(this.__glslAttribNames.push(g),this.__glslAttribTypes.push(c))}g=d.matchedPos();c=g.pos+g.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);Pa.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),Pa.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;){var f=b++;d="va"+f;-1!=a.indexOf(" "+d)&&c.bindAttribLocation(this.__glProgram,f,d)}else for(b=0,a=this.__glslAttribNames;b<a.length;)if(d=a[b],++b,-1<d.indexOf("Position")&&O.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)&&(d="Unable to initialize the shader program\n"+c.getProgramInfoLog(this.__glProgram),Pa.error(d,{fileName:"openfl/display3D/Program3D.hx",lineNumber:922,className:"openfl.display3D.Program3D",methodName:"__uploadFromGLSL"}))},__class__:Mn};
var Ol=function(a){this.context=a;this.isDirty=!0;this.regDataPointer=new of(null,0)};h["openfl.display3D.Uniform"]=Ol;Ol.__name__="openfl.display3D.Uniform";Ol.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:Xo.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);var d=null;null!=d?a.uniform3fv(c,b,d,null):a.uniform3fv(c,b);break;case 35666:c=this.location;b=this.regData.subarray(b,b+4*this.regCount);d=null;null!=d?a.uniform4fv(c,b,d,null):a.uniform4fv(c,b);break;case 35674:ec.uniformMatrix2fv(a,this.location,!1,this.regData.subarray(b,b+4*this.size));break;case 35675:ec.uniformMatrix3fv(a,this.location,!1,this.regData.subarray(b,b+9*this.size));break;case 35676:ec.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),d=null,null!=d?a.uniform4fv(c,b,d,null):a.uniform4fv(c,b)}},__getUniformRegisters:function(a,b){return this.regData.subarray(a,a+b)},__class__:Ol};var xj=function(a){this.__uniforms=a;this.__uniforms.sort(function(a,b){return la.compare(a.regIndex,b.regIndex)});var b=0;a=0;for(var c=this.__uniforms;a<c.length;){var d=c[a];++a;d.regIndex+d.regCount>b&&(b=d.regIndex+d.regCount)}this.__registerLookup=ia.toObjectVector(null,
b);a=0;for(c=this.__uniforms;a<c.length;){d=c[a];++a;b=0;for(var f=d.regCount;b<f;){var g=b++;this.__registerLookup.set(d.regIndex+g,d)}}this.__anyDirty=this.__allDirty=!0};h["openfl.display3D.UniformMap"]=xj;xj.__name__="openfl.display3D.UniformMap";xj.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__:xj};var Nn=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==Eo.fromString(d)?
a.DYNAMIC_DRAW:a.STATIC_DRAW};h["openfl.display3D.VertexBuffer3D"]=Nn;Nn.__name__="openfl.display3D.VertexBuffer3D";Nn.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=kb.toArrayBuffer(a);null==b&&(b=0);a=null!=a?null==d?new Float32Array(a,b):new Float32Array(a,
b,d):null;this.uploadFromTypedArray(qg.toArrayBufferView(a))},uploadFromTypedArray:function(a,b){null!=a&&(b=this.__context.gl,this.__context.__bindGLArrayBuffer(this.__id),ec.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 f=this.__tempFloat32Array;if(null==this.__tempFloat32Array||this.__tempFloat32Array.length<d)this.__tempFloat32Array=null!=d?new Float32Array(d):null,null!=f&&this.__tempFloat32Array.set(f);
for(d=b;d<c;)f=d++,this.__tempFloat32Array[f-b]=a.get(f);this.uploadFromTypedArray(qg.toArrayBufferView(this.__tempFloat32Array))}},__class__:Nn};var Ud=function(){};h["openfl.display3D._internal.AGALConverter"]=Ud;Ud.__name__="openfl.display3D._internal.AGALConverter";Ud.prefixFromType=function(a,b){switch(a){case 0:return"va";case 1:return b==cg.VERTEX?"vc":"fc";case 2:return b==cg.VERTEX?"vt":"ft";case 3:return"output_";case 4:return"v";case 5:return"sampler";default:throw new Lc("Invalid data!");
}};Ud.readUInt64=function(a){var b=a.readInt();a=a.readInt();return new Gb(a,b)};Ud.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 Lc("Magic value must be 0xA0, may not be AGAL");var d=a.readInt();if(1!=d)throw new Lc("Version must be 1");if(161!=(a.readByte()&255))throw new Lc("Shader type ID must be 0xA1");c=0==(a.readByte()&255)?cg.VERTEX:cg.FRAGMENT;for(var f=new Pl,g="";;){d=a.position;if(!L.gt(kb.get_length(a),d))break;
var k=a.readInt();d=a.readUnsignedInt();var l=Ud.readUInt64(a),m=Ud.readUInt64(a);d=yi.parse(d,c);l=Nh.parse(l,c,d.mask);var h=Nh.parse(m,c,d.mask);g+="\t";switch(k){case 0:g+=M.string(d.toGLSL()+" = "+l.toGLSL()+"; // mov");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);break;case 1:g+=M.string(d.toGLSL()+" = "+l.toGLSL()+" + "+h.toGLSL()+"; // add");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);f.addSR(h,ua.VECTOR_4);break;case 2:g+=M.string(d.toGLSL()+" = "+l.toGLSL()+" - "+h.toGLSL()+"; // sub");
f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);f.addSR(h,ua.VECTOR_4);break;case 3:g+=M.string(d.toGLSL()+" = "+l.toGLSL()+" * "+h.toGLSL()+"; // mul");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);f.addSR(h,ua.VECTOR_4);break;case 4:g+=M.string(d.toGLSL()+" = "+l.toGLSL()+" / "+h.toGLSL()+"; // div");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);f.addSR(h,ua.VECTOR_4);break;case 5:g=-1<l.toGLSL().indexOf(".")?g+M.string(d.toGLSL()+" = 1.0 / "+l.toGLSL()+"; // rcp"):g+M.string(d.toGLSL()+" = vec4(1) / "+
l.toGLSL()+"; // rcp");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);break;case 6:g+=M.string(d.toGLSL()+" = min("+l.toGLSL()+", "+h.toGLSL()+"); // min");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);f.addSR(h,ua.VECTOR_4);break;case 7:g+=M.string(d.toGLSL()+" = max("+l.toGLSL()+", "+h.toGLSL()+"); // max");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);f.addSR(h,ua.VECTOR_4);break;case 8:g+=M.string(d.toGLSL()+" = fract("+l.toGLSL()+"); // frc");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);break;
case 9:g+=M.string(d.toGLSL()+" = sqrt("+l.toGLSL()+"); // sqrt");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);break;case 10:g+=M.string(d.toGLSL()+" = inversesqrt("+l.toGLSL()+"); // rsq");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);break;case 11:g+=M.string(d.toGLSL()+" = pow("+l.toGLSL()+", "+h.toGLSL()+"); // pow");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);f.addSR(h,ua.VECTOR_4);break;case 12:g+=M.string(d.toGLSL()+" = log2("+l.toGLSL()+"); // log");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);
break;case 13:g+=M.string(d.toGLSL()+" = exp2("+l.toGLSL()+"); // exp");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);break;case 14:g+=M.string(d.toGLSL()+" = normalize("+l.toGLSL()+"); // normalize");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);break;case 15:g+=M.string(d.toGLSL()+" = sin("+l.toGLSL()+"); // sin");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);break;case 16:g+=M.string(d.toGLSL()+" = cos("+l.toGLSL()+"); // cos");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);break;case 17:l.sourceMask=
h.sourceMask=7;g+=M.string(d.toGLSL()+" = cross(vec3("+l.toGLSL()+"), vec3("+h.toGLSL()+")); // crs");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);f.addSR(h,ua.VECTOR_4);break;case 18:l.sourceMask=h.sourceMask=7;g+=M.string(d.toGLSL()+" = vec4(dot(vec3("+l.toGLSL()+"), vec3("+h.toGLSL()+")))"+d.getWriteMask()+"; // dp3");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);f.addSR(h,ua.VECTOR_4);break;case 19:l.sourceMask=h.sourceMask=15;g+=M.string(d.toGLSL()+" = vec4(dot(vec4("+l.toGLSL()+"), vec4("+
h.toGLSL()+")))"+d.getWriteMask()+"; // dp4");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);f.addSR(h,ua.VECTOR_4);break;case 20:g+=M.string(d.toGLSL()+" = abs("+l.toGLSL()+"); // abs");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);break;case 21:g+=M.string(d.toGLSL()+" = -"+l.toGLSL()+"; // neg");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);break;case 22:g+=M.string(d.toGLSL()+" = clamp("+l.toGLSL()+", 0.0, 1.0); // saturate");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);break;case 23:k=f.getRegisterUsage(h);
k!=ua.VECTOR_4&&k!=ua.VECTOR_4_ARRAY?(g+=M.string(d.toGLSL()+" = "+l.toGLSL()+" * mat3("+h.toGLSL(!1)+"); // m33"),f.addDR(d,ua.VECTOR_4),f.addSR(l,ua.VECTOR_4),f.addSR(h,ua.MATRIX_4_4)):(l.sourceMask=h.sourceMask=7,g+=M.string(d.toGLSL()+" = vec3(dot("+l.toGLSL(!0)+","+h.toGLSL(!0,0)+"), dot("+l.toGLSL(!0)+","+h.toGLSL(!0,1)+"),dot("+l.toGLSL(!0)+","+h.toGLSL(!0,2)+")); // m33"),f.addDR(d,ua.VECTOR_4),f.addSR(l,ua.VECTOR_4),f.addSR(h,ua.VECTOR_4,0),f.addSR(h,ua.VECTOR_4,1),f.addSR(h,ua.VECTOR_4,
2));break;case 24:k=f.getRegisterUsage(h);k!=ua.VECTOR_4&&k!=ua.VECTOR_4_ARRAY?(g+=M.string(d.toGLSL()+" = "+l.toGLSL()+" * "+h.toGLSL(!1)+"; // m44"),f.addDR(d,ua.VECTOR_4),f.addSR(l,ua.VECTOR_4),f.addSR(h,ua.MATRIX_4_4)):(l.sourceMask=h.sourceMask=15,g+=M.string(d.toGLSL()+" = vec4(dot("+l.toGLSL(!0)+","+h.toGLSL(!0,0)+"), dot("+l.toGLSL(!0)+","+h.toGLSL(!0,1)+"), dot("+l.toGLSL(!0)+","+h.toGLSL(!0,2)+"), dot("+l.toGLSL(!0)+","+h.toGLSL(!0,3)+")); // m44"),f.addDR(d,ua.VECTOR_4),f.addSR(l,ua.VECTOR_4),
f.addSR(h,ua.VECTOR_4,0),f.addSR(h,ua.VECTOR_4,1),f.addSR(h,ua.VECTOR_4,2),f.addSR(h,ua.VECTOR_4,3));break;case 25:d.mask&=7;k=f.getRegisterUsage(h);k!=ua.VECTOR_4&&k!=ua.VECTOR_4_ARRAY?(g+=M.string(d.toGLSL()+" = "+l.toGLSL()+" * "+h.toGLSL(!1)+"; // m34"),f.addDR(d,ua.VECTOR_4),f.addSR(l,ua.VECTOR_4),f.addSR(h,ua.MATRIX_4_4)):(l.sourceMask=h.sourceMask=15,g+=M.string(d.toGLSL()+" = vec3(dot("+l.toGLSL(!0)+","+h.toGLSL(!0,0)+"), dot("+l.toGLSL(!0)+","+h.toGLSL(!0,1)+"),dot("+l.toGLSL(!0)+","+h.toGLSL(!0,
2)+")); // m34"),f.addDR(d,ua.VECTOR_4),f.addSR(l,ua.VECTOR_4),f.addSR(h,ua.VECTOR_4,0),f.addSR(h,ua.VECTOR_4,1),f.addSR(h,ua.VECTOR_4,2));break;case 39:l.sourceMask=15;g+=M.string("if (any(lessThan("+l.toGLSL()+", vec4(0)))) discard;");f.addSR(l,ua.VECTOR_4);break;case 40:h=zi.parse(m,c);switch(h.d){case 0:2==h.t?(l.sourceMask=3,f.addSaR(h,ua.SAMPLER_2D_ALPHA),g+=M.string("if ("+h.toGLSL()+"_alphaEnabled) {\n"),g+=M.string("\t\t"+d.toGLSL()+" = vec4(texture2D("+h.toGLSL()+", "+l.toGLSL()+").xyz, texture2D("+
h.toGLSL()+"_alpha, "+l.toGLSL()+").x); // tex + alpha\n"),g+="\t} else {\n",g+=M.string("\t\t"+d.toGLSL()+" = texture2D("+h.toGLSL()+", "+l.toGLSL()+"); // tex\n"),g+="\t}"):(l.sourceMask=3,f.addSaR(h,ua.SAMPLER_2D),g+=M.string(d.toGLSL()+" = texture2D("+h.toGLSL()+", "+l.toGLSL()+"); // tex"));break;case 1:2==h.t?(l.sourceMask=7,f.addSaR(h,ua.SAMPLER_CUBE_ALPHA),g+=M.string("if ("+h.toGLSL()+"_alphaEnabled) {\n"),g+=M.string("\t\t"+d.toGLSL()+" = vec4(textureCube("+h.toGLSL()+", "+l.toGLSL()+").xyz, textureCube("+
h.toGLSL()+"_alpha, "+l.toGLSL()+").x); // tex + alpha\n"),g+="\t} else {\n",g+=M.string("\t\t"+d.toGLSL()+" = textureCube("+h.toGLSL()+", "+l.toGLSL()+"); // tex"),g+="\t}"):(l.sourceMask=7,g+=M.string(d.toGLSL()+" = textureCube("+h.toGLSL()+", "+l.toGLSL()+"); // tex"),f.addSaR(h,ua.SAMPLER_CUBE))}f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);null!=b&&(b[h.n]=h.toSamplerState());break;case 41:l.sourceMask=h.sourceMask=15;g+=M.string(d.toGLSL()+" = vec4(greaterThanEqual("+l.toGLSL()+", "+h.toGLSL()+
"))"+d.getWriteMask()+"; // ste");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);f.addSR(h,ua.VECTOR_4);break;case 42:l.sourceMask=h.sourceMask=15;g+=M.string(d.toGLSL()+" = vec4(lessThan("+l.toGLSL()+", "+h.toGLSL()+"))"+d.getWriteMask()+"; // slt");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);f.addSR(h,ua.VECTOR_4);break;case 44:l.sourceMask=h.sourceMask=15;g+=M.string(d.toGLSL()+" = vec4(equal("+l.toGLSL()+", "+h.toGLSL()+"))"+d.getWriteMask()+"; // seq");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);
f.addSR(h,ua.VECTOR_4);break;case 45:l.sourceMask=h.sourceMask=15;g+=M.string(d.toGLSL()+" = vec4(notEqual("+l.toGLSL()+", "+h.toGLSL()+"))"+d.getWriteMask()+"; // sne");f.addDR(d,ua.VECTOR_4);f.addSR(l,ua.VECTOR_4);f.addSR(h,ua.VECTOR_4);break;default:throw new Lc("Opcode "+k);}g+="\n"}null==Ud.limitedProfile&&(d=r.context.getParameter(7938),Ud.limitedProfile=-1<d.indexOf("OpenGL ES")||-1<d.indexOf("WebGL"));a=""+M.string("// AGAL "+(c==cg.VERTEX?"vertex":"fragment")+" shader\n");a=Ud.limitedProfile?
a+"#version 100\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n":a+"#version 120\n";a+=M.string(f.toGLSL(!1));c==cg.VERTEX&&(a+="uniform vec4 vcPositionScale;\n");a=a+"void main() {\n"+M.string(f.toGLSL(!0));a+=M.string(g);c==cg.VERTEX&&(a+="\tgl_Position *= vcPositionScale;\n");return a+"}\n"};var yi=function(){};h["openfl.display3D._internal._AGALConverter.DestRegister"]=yi;yi.__name__="openfl.display3D._internal._AGALConverter.DestRegister";
yi.parse=function(a,b){var c=new yi;c.programType=b;c.type=a>>>24&15;c.mask=a>>>16&15;c.n=a&65535;return c};yi.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==cg.VERTEX?"gl_Position":"gl_FragColor":Ud.prefixFromType(this.type,this.programType)+this.n;a&&15!=this.mask&&(b+=
this.getWriteMask());return b},__class__:yi};var cg=G["openfl.display3D._internal._AGALConverter.ProgramType"]={__ename__:"openfl.display3D._internal._AGALConverter.ProgramType",__constructs__:null,VERTEX:{_hx_name:"VERTEX",_hx_index:0,__enum__:"openfl.display3D._internal._AGALConverter.ProgramType",toString:t},FRAGMENT:{_hx_name:"FRAGMENT",_hx_index:1,__enum__:"openfl.display3D._internal._AGALConverter.ProgramType",toString:t}};cg.__constructs__=[cg.VERTEX,cg.FRAGMENT];var Pl=function(){this.mEntries=
[]};h["openfl.display3D._internal.RegisterMap"]=Pl;Pl.__name__="openfl.display3D._internal.RegisterMap";Pl.prototype={mEntries:null,add:function(a,b,c,d){for(var f=0,g=this.mEntries;f<g.length;){var k=g[f];++f;if(k.type==a&&k.name==b&&k.number==c){if(k.usage!=d)throw new Lc("Cannot use register in multiple ways yet (mat4/vec4)");return}}k=new On;k.type=a;k.name=b;k.number=c;k.usage=d;this.mEntries.push(k)},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,Ud.prefixFromType(a.itype,a.programType)+a.n,a.n,ua.VECTOR_4),this.add(a.type,Ud.prefixFromType(a.type,a.programType)+a.o,a.o,ua.VECTOR_4_ARRAY)):this.add(a.type,a.toGLSL(!1,c),a.n+c,b)},getRegisterUsage:function(a){return 0!=a.d?ua.VECTOR_4_ARRAY:this.getUsage(a.type,a.toGLSL(!1),a.n)},getUsage:function(a,b,c){for(var d=0,f=this.mEntries;d<f.length;){var g=f[d];++d;if(g.type==a&&g.name==b&&g.number==c)return g.usage}return ua.UNUSED},
toGLSL:function(a){this.mEntries.sort(function(a,b){return a.number-b.number});this.mEntries.sort(function(a,b){return na.__cast(a.type,pm)-na.__cast(b.type,pm)});for(var b="",c=0,d=this.mEntries.length;c<d;){var f=c++;f=this.mEntries[f];if(!(a&&2!=f.type||!a&&2==f.type)&&3!=f.type){switch(f.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 Lc;}switch(f.usage._hx_index){case 0:Pa.info("Missing switch patten: RegisterUsage.UNUSED",
{fileName:"openfl/display3D/_internal/AGALConverter.hx",lineNumber:751,className:"openfl.display3D._internal.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 "}f.usage==ua.SAMPLER_2D_ALPHA?(b+="sampler2D ",b+=M.string(f.name),b+=";\n",b+="uniform ",b+="sampler2D ",b+=M.string(f.name+"_alpha"),b+=";\n",b+="uniform ",b+="bool ",b+=M.string(f.name+"_alphaEnabled")):f.usage==ua.SAMPLER_CUBE_ALPHA?
(b+="samplerCube ",b+=M.string(f.name),b+=";\n",b+="uniform ",b+="samplerCube ",b+=M.string(f.name+"_alpha"),b+=";\n",b+="uniform ",b+="bool ",b+=M.string(f.name+"_alphaEnabled")):b=f.usage==ua.VECTOR_4_ARRAY?b+M.string(f.name+"[128]"):b+M.string(f.name);b+=";\n"}}return b},__class__:Pl};var On=function(){};h["openfl.display3D._internal._AGALConverter.RegisterMapEntry"]=On;On.__name__="openfl.display3D._internal._AGALConverter.RegisterMapEntry";On.prototype={name:null,number:null,type:null,usage:null,
__class__:On};var ua=G["openfl.display3D._internal._AGALConverter.RegisterUsage"]={__ename__:"openfl.display3D._internal._AGALConverter.RegisterUsage",__constructs__:null,UNUSED:{_hx_name:"UNUSED",_hx_index:0,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:t},VECTOR_4:{_hx_name:"VECTOR_4",_hx_index:1,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:t},MATRIX_4_4:{_hx_name:"MATRIX_4_4",_hx_index:2,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",
toString:t},SAMPLER_2D:{_hx_name:"SAMPLER_2D",_hx_index:3,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:t},SAMPLER_2D_ALPHA:{_hx_name:"SAMPLER_2D_ALPHA",_hx_index:4,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:t},SAMPLER_CUBE:{_hx_name:"SAMPLER_CUBE",_hx_index:5,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:t},SAMPLER_CUBE_ALPHA:{_hx_name:"SAMPLER_CUBE_ALPHA",_hx_index:6,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",
toString:t},VECTOR_4_ARRAY:{_hx_name:"VECTOR_4_ARRAY",_hx_index:7,__enum__:"openfl.display3D._internal._AGALConverter.RegisterUsage",toString:t}};ua.__constructs__=[ua.UNUSED,ua.VECTOR_4,ua.MATRIX_4_4,ua.SAMPLER_2D,ua.SAMPLER_2D_ALPHA,ua.SAMPLER_CUBE,ua.SAMPLER_CUBE_ALPHA,ua.VECTOR_4_ARRAY];var zi=function(){};h["openfl.display3D._internal._AGALConverter.SamplerRegister"]=zi;zi.__name__="openfl.display3D._internal._AGALConverter.SamplerRegister";zi.parse=function(a,b){var c=new zi;c.programType=b;
b=60;b=0==b?new Gb(a.high,a.low):32>b?new Gb(a.high>>b,a.high<<32-b|a.low>>>b):new Gb(a.high>>31,a.high>>b-32);b=b.low&15;c.f=b;b=56;b=0==b?new Gb(a.high,a.low):32>b?new Gb(a.high>>b,a.high<<32-b|a.low>>>b):new Gb(a.high>>31,a.high>>b-32);b=b.low&15;c.m=b;b=52;b=0==b?new Gb(a.high,a.low):32>b?new Gb(a.high>>b,a.high<<32-b|a.low>>>b):new Gb(a.high>>31,a.high>>b-32);b=b.low&15;c.w=b;b=48;b=0==b?new Gb(a.high,a.low):32>b?new Gb(a.high>>b,a.high<<32-b|a.low>>>b):new Gb(a.high>>31,a.high>>b-32);b=b.low&
15;c.s=b;b=44;b=0==b?new Gb(a.high,a.low):32>b?new Gb(a.high>>b,a.high<<32-b|a.low>>>b):new Gb(a.high>>31,a.high>>b-32);b=b.low&15;c.d=b;b=40;b=0==b?new Gb(a.high,a.low):32>b?new Gb(a.high>>b,a.high<<32-b|a.low>>>b):new Gb(a.high>>31,a.high>>b-32);b=b.low&15;c.t=b;b=32;b=0==b?new Gb(a.high,a.low):32>b?new Gb(a.high>>b,a.high<<32-b|a.low>>>b):new Gb(a.high>>31,a.high>>b-32);b=b.low&15;c.type=b;b=16;b=0==b?new Gb(a.high,a.low):32>b?new Gb(a.high>>b,a.high<<32-b|a.low>>>b):new Gb(a.high>>31,a.high>>
b-32);b=b.low&255;c.b=b;b=a.low&65535;c.n=b;return c};zi.prototype={b:null,d:null,f:null,m:null,n:null,programType:null,s:null,t:null,type:null,w:null,toGLSL:function(){return Ud.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 Lc;}switch(this.m){case 0:var b=2;break;case 1:b=1;break;case 2:b=0;break;default:throw new Lc;}switch(this.w){case 0:var c=0;break;case 1:c=2;break;default:throw new Lc;}return new Lh(c,
a,b,(this.b<<24>>24)/8,4==(this.s&4),1==(this.s&1),2==this.t)},__class__:zi};var Nh=function(){};h["openfl.display3D._internal._AGALConverter.SourceRegister"]=Nh;Nh.__name__="openfl.display3D._internal._AGALConverter.SourceRegister";Nh.parse=function(a,b,c){var d=new Nh;d.programType=b;b=63;b=0==b?new Gb(a.high,a.low):32>b?new Gb(a.high>>b,a.high<<32-b|a.low>>>b):new Gb(a.high>>31,a.high>>b-32);b=b.low&1;d.d=b;b=48;b=0==b?new Gb(a.high,a.low):32>b?new Gb(a.high>>b,a.high<<32-b|a.low>>>b):new Gb(a.high>>
31,a.high>>b-32);b=b.low&3;d.q=b;b=40;b=0==b?new Gb(a.high,a.low):32>b?new Gb(a.high>>b,a.high<<32-b|a.low>>>b):new Gb(a.high>>31,a.high>>b-32);b=b.low&15;d.itype=b;b=32;b=0==b?new Gb(a.high,a.low):32>b?new Gb(a.high>>b,a.high<<32-b|a.low>>>b):new Gb(a.high>>31,a.high>>b-32);b=b.low&15;d.type=b;b=24;b=0==b?new Gb(a.high,a.low):32>b?new Gb(a.high>>b,a.high<<32-b|a.low>>>b):new Gb(a.high>>31,a.high>>b-32);b=b.low&255;d.s=b;b=16;b=0==b?new Gb(a.high,a.low):32>b?new Gb(a.high>>b,a.high<<32-b|a.low>>>
b):new Gb(a.high>>31,a.high>>b-32);b=b.low&255;d.o=b;b=a.low&65535;d.n=b;d.sourceMask=c;return d};Nh.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==cg.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=Ud.prefixFromType(this.type,this.programType);if(0==this.d)c+=this.n+b;else{c+=this.o;var f="";switch(this.q){case 0:f="x";break;
case 1:f="y";break;case 2:f="z";break;case 3:f="w"}f=Ud.prefixFromType(this.itype,this.programType)+this.n+"."+f;c+="[ int("+f+") +"+b+"]"}a&&""!=d&&(c+="."+d);return c},__class__:Nh};var yj=function(a,b){this.version=0;a.position=b;var c=a.readUTFBytes(3);a.position=b;if("ATF"!=c)throw new Lc("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(L.gt(na.__cast(b+c,pm),kb.get_length(a)))throw new Lc("ATF length exceeds byte array length");
this.data=a};h["openfl.display3D._internal.ATFReader"]=yj;yj.__name__="openfl.display3D._internal.ATFReader";yj.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(),f=d>>>7;if(!c&&0!=f)throw new Lc("ATF Cube map not expected");if(c&&1!=f)throw new Lc("ATF Cube map expected");this.cubeMap=c;this.atfFormat=d&127;3!=this.atfFormat&&5!=this.atfFormat&&Pa.warn("Only ATF block compressed textures without JPEG-XR+LZMA are supported",
{fileName:"openfl/display3D/_internal/ATFReader.hx",lineNumber:97,className:"openfl.display3D._internal.ATFReader",methodName:"readHeader"});this.width=1<<this.data.readUnsignedByte();this.height=1<<this.data.readUnsignedByte();if(this.width!=a||this.height!=b)throw new Lc("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 f=c++,g=0,k=this.mipCount;g<k;)for(var l=
g++,m=0,h=b;m<h;){var r=m++,p=0==this.version?this.__readUInt24(this.data):this.__readUInt32(this.data);if(L.gt(this.data.position+p,kb.get_length(this.data)))throw new Lc("Block length exceeds ATF file length");if(L.gt(p,0)){var w=new bb(new ArrayBuffer(p)),u=this.data,n=kb.fromBytes(w),t=0,A=p;null==A&&(A=0);null==t&&(t=0);u.readBytes(n,t,A);a(f,l,r,this.width>>l,this.height>>l,p,w)}}},__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__:yj};var uj=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 ea;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.display3D._internal.Context3DState"]=uj;uj.__name__="openfl.display3D._internal.Context3DState";uj.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__:uj};var Tb=
function(a){Da.call(this);this.__context=a;var b=this.__context.gl;this.__textureID=b.createTexture();this.__textureContext=this.__context.__context;if(null==Tb.__supportsBGRA){Tb.__textureInternalFormat=b.RGBA;Tb.__supportsBGRA=!1;Tb.__textureFormat=b.RGBA;Tb.__compressedFormats=new hc;Tb.__compressedFormatsAlpha=new hc;a=b.getExtension("WEBGL_compressed_texture_s3tc");var c=b.getExtension("WEBGL_compressed_texture_etc1");b=b.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");if(null!=a){var d=
a.COMPRESSED_RGBA_S3TC_DXT1_EXT;Tb.__compressedFormats.h[0]=d;d=a.COMPRESSED_RGBA_S3TC_DXT5_EXT;Tb.__compressedFormatsAlpha.h[0]=d}null!=c&&(d=c.COMPRESSED_RGB_ETC1_WEBGL,Tb.__compressedFormats.h[2]=d,d=c.COMPRESSED_RGB_ETC1_WEBGL,Tb.__compressedFormatsAlpha.h[2]=d);null!=b&&(d=b.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,Tb.__compressedFormats.h[1]=d,d=b.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,Tb.__compressedFormatsAlpha.h[1]=d)}this.__internalFormat=Tb.__textureInternalFormat;this.__format=Tb.__textureFormat};h["openfl.display3D.textures.TextureBase"]=
Tb;Tb.__name__="openfl.display3D.textures.TextureBase";Tb.__compressedFormats=null;Tb.__compressedFormatsAlpha=null;Tb.__textureFormat=null;Tb.__textureInternalFormat=null;Tb.__super__=Da;Tb.prototype=x(Da.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(),this.__alphaTexture=null);null!=this.__textureID&&(a.deleteTexture(this.__textureID),this.__textureID=null);null!=this.__glFramebuffer&&(a.deleteFramebuffer(this.__glFramebuffer),this.__glFramebuffer=null);null!=this.__glDepthRenderbuffer&&(a.deleteRenderbuffer(this.__glDepthRenderbuffer),this.__glDepthRenderbuffer=null);null!=this.__glStencilRenderbuffer&&(a.deleteRenderbuffer(this.__glStencilRenderbuffer),
this.__glStencilRenderbuffer=null)},__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&&Pa.warn("Error: Context3D.setRenderToTexture status:"+c+" width:"+this.__width+" height:"+
this.__height,{fileName:"openfl/display3D/textures/TextureBase.hx",lineNumber:201,className:"openfl.display3D.textures.TextureBase",methodName:"__getGLFramebuffer"})));a&&null==this.__glDepthRenderbuffer&&(this.__context.__bindGLFramebuffer(this.__glFramebuffer),0!=Ob.__glDepthStencil?(this.__glStencilRenderbuffer=this.__glDepthRenderbuffer=b.createRenderbuffer(),b.bindRenderbuffer(b.RENDERBUFFER,this.__glDepthRenderbuffer),b.renderbufferStorage(b.RENDERBUFFER,Ob.__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&&(c=b.checkFramebufferStatus(b.FRAMEBUFFER),c!=b.FRAMEBUFFER_COMPLETE&&Pa.warn("Error: Context3D.setRenderToTexture status:"+c+" width:"+this.__width+" height:"+this.__height,{fileName:"openfl/display3D/textures/TextureBase.hx",lineNumber:239,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;ya.sync(b,!1);a=this.__context.gl;b.type==Kd.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 sc("wrap bad enum");
}var f=5==a.filter?b.NEAREST:b.LINEAR;switch(a.mipfilter){case 0:var g=5==a.filter?b.NEAREST_MIPMAP_LINEAR:b.LINEAR_MIPMAP_LINEAR;break;case 1:g=5==a.filter?b.NEAREST_MIPMAP_NEAREST:b.LINEAR_MIPMAP_NEAREST;break;case 2:g=5==a.filter?b.NEAREST:b.LINEAR;break;default:throw new sc("mipfiter bad enum");}b.texParameteri(this.__textureTarget,b.TEXTURE_MIN_FILTER,g);b.texParameteri(this.__textureTarget,b.TEXTURE_MAG_FILTER,f);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=Tb.__textureInternalFormat,d=Tb.__textureFormat;this.__context.__bindGLTexture2D(this.__textureID);a.type==Kd.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==Kd.DATA?ec.texImage2D(b,b.TEXTURE_2D,0,c,a.buffer.width,a.buffer.height,0,d,b.UNSIGNED_BYTE,a.get_data()):ec.texImage2D(b,b.TEXTURE_2D,0,c,d,b.UNSIGNED_BYTE,a.get_src());this.__context.__bindGLTexture2D(null)}},__class__:Tb});var xi=function(a,b,c,d,f){Tb.call(this,a);this.__width=this.__height=this.__size=b;this.__optimizeForRenderToTexture=d;this.__streamingLevels=f;this.__textureTarget=this.__context.gl.TEXTURE_CUBE_MAP;this.__uploadedSides=
0};h["openfl.display3D.textures.CubeTexture"]=xi;xi.__name__="openfl.display3D.textures.CubeTexture";xi.__super__=Tb;xi.prototype=x(Tb.prototype,{__framebufferSurface:null,__size:null,__uploadedSides:null,uploadCompressedTextureFromByteArray:function(a,b,c){null==c&&(c=!1);var d=this;c?Sc.delay(function(){d.__uploadCompressedTextureFromByteArray(a,b);var c=new fa("textureReady");d.dispatchEvent(c)},1):this.__uploadCompressedTextureFromByteArray(a,b)},uploadFromBitmapData:function(a,b,c,d){null==c&&
(c=0);if(null!=a&&(d=this.__size>>c,0!=d&&(a=this.__getImage(a),null!=a)))if(0==c&&null!=a.buffer&&null==a.buffer.data&&null!=a.buffer.get_src()){var f=this.__context.gl;d=this.__size>>c;0!=d&&(d=this.__sideToTarget(b),this.__context.__bindGLTextureCubeMap(this.__textureID),ec.texImage2D(f,d,c,this.__internalFormat,this.__format,f.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=kb.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,f=this.__size>>c;if(0!=f){var g=this.__sideToTarget(b);this.__context.__bindGLTextureCubeMap(this.__textureID);ec.texImage2D(d,g,c,this.__internalFormat,f,f,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 f=d.checkFramebufferStatus(d.FRAMEBUFFER);f!=d.FRAMEBUFFER_COMPLETE&&
Pa.error("Error: Context3D.setRenderToTexture status:"+f+" width:"+this.__width+" height:"+this.__height,{fileName:"openfl/display3D/textures/CubeTexture.hx",lineNumber:279,className:"openfl.display3D.textures.CubeTexture",methodName:"__getGLFramebuffer"})}return Tb.prototype.__getGLFramebuffer.call(this,a,b,c)},__setSamplerState:function(a){if(Tb.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!=Ob.__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>Ob.__glMaxTextureMaxAnisotropy&&(a=Ob.__glMaxTextureMaxAnisotropy);b.texParameterf(b.TEXTURE_CUBE_MAP,Ob.__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 Lc;}},__uploadCompressedTextureFromByteArray:function(a,b){var c=this;a=new yj(a,b);var d=a.readHeader(this.__size,this.__size,!0),f=this.__context.gl;this.__context.__bindGLTextureCubeMap(this.__textureID);var g=!1;a.readTextures(function(a,b,k,l,m,h,r){var p=d?Tb.__compressedFormatsAlpha.h[k]:Tb.__compressedFormats.h[k];if(0!=p)if(g=!0,a=c.__sideToTarget(a),
c.__format=p,c.__internalFormat=p,d&&2==k){h=h/2|0;var w=k=null,u=null,n=null,t=r.b.buffer,A=0;null==A&&(A=0);k=null!=k?new Uint8Array(k):null!=w?new Uint8Array(w):null!=u?new Uint8Array(u.__array):null!=n?new Uint8Array(n):null!=t?null==h?new Uint8Array(t,A):new Uint8Array(t,A,h):null;ec.compressedTexImage2D(f,a,b,c.__internalFormat,l,m,0,k);var q=new xi(c.__context,c.__size,3,c.__optimizeForRenderToTexture,c.__streamingLevels);q.__format=p;q.__internalFormat=p;c.__context.__bindGLTextureCubeMap(q.__textureID);
n=u=w=k=null;t=r.b.buffer;A=h;null==A&&(A=0);k=null!=k?new Uint8Array(k):null!=w?new Uint8Array(w):null!=u?new Uint8Array(u.__array):null!=n?new Uint8Array(n):null!=t?null==h?new Uint8Array(t,A):new Uint8Array(t,A,h):null;ec.compressedTexImage2D(f,a,b,q.__internalFormat,l,m,0,k);c.__alphaTexture=q}else n=u=w=k=null,t=r.b.buffer,A=0,null==A&&(A=0),k=null!=k?new Uint8Array(k):null!=w?new Uint8Array(w):null!=u?new Uint8Array(u.__array):null!=n?new Uint8Array(n):null!=t?null==h?new Uint8Array(t,A):new Uint8Array(t,
A,h):null,ec.compressedTexImage2D(f,a,b,c.__internalFormat,l,m,0,k)});if(!g){a=this.__size*this.__size*4;var k=b=null,l=null,m=null,h=null;a=null!=a?new Uint8Array(a):null!=b?new Uint8Array(b):null!=k?new Uint8Array(k.__array):null!=l?new Uint8Array(l):null!=m?null==h?new Uint8Array(m,0):new Uint8Array(m,0,h):null;ec.texImage2D(f,this.__sideToTarget(0),0,this.__internalFormat,this.__size,this.__size,0,this.__format,f.UNSIGNED_BYTE,a);a=this.__size*this.__size*4;h=m=l=k=b=null;a=null!=a?new Uint8Array(a):
null!=b?new Uint8Array(b):null!=k?new Uint8Array(k.__array):null!=l?new Uint8Array(l):null!=m?null==h?new Uint8Array(m,0):new Uint8Array(m,0,h):null;ec.texImage2D(f,this.__sideToTarget(1),0,this.__internalFormat,this.__size,this.__size,0,this.__format,f.UNSIGNED_BYTE,a);a=this.__size*this.__size*4;h=m=l=k=b=null;a=null!=a?new Uint8Array(a):null!=b?new Uint8Array(b):null!=k?new Uint8Array(k.__array):null!=l?new Uint8Array(l):null!=m?null==h?new Uint8Array(m,0):new Uint8Array(m,0,h):null;ec.texImage2D(f,
this.__sideToTarget(2),0,this.__internalFormat,this.__size,this.__size,0,this.__format,f.UNSIGNED_BYTE,a);a=this.__size*this.__size*4;h=m=l=k=b=null;a=null!=a?new Uint8Array(a):null!=b?new Uint8Array(b):null!=k?new Uint8Array(k.__array):null!=l?new Uint8Array(l):null!=m?null==h?new Uint8Array(m,0):new Uint8Array(m,0,h):null;ec.texImage2D(f,this.__sideToTarget(3),0,this.__internalFormat,this.__size,this.__size,0,this.__format,f.UNSIGNED_BYTE,a);a=this.__size*this.__size*4;h=m=l=k=b=null;a=null!=a?
new Uint8Array(a):null!=b?new Uint8Array(b):null!=k?new Uint8Array(k.__array):null!=l?new Uint8Array(l):null!=m?null==h?new Uint8Array(m,0):new Uint8Array(m,0,h):null;ec.texImage2D(f,this.__sideToTarget(4),0,this.__internalFormat,this.__size,this.__size,0,this.__format,f.UNSIGNED_BYTE,a);a=this.__size*this.__size*4;h=m=l=k=b=null;a=null!=a?new Uint8Array(a):null!=b?new Uint8Array(b):null!=k?new Uint8Array(k.__array):null!=l?new Uint8Array(l):null!=m?null==h?new Uint8Array(m,0):new Uint8Array(m,0,
h):null;ec.texImage2D(f,this.__sideToTarget(5),0,this.__internalFormat,this.__size,this.__size,0,this.__format,f.UNSIGNED_BYTE,a)}this.__context.__bindGLTextureCubeMap(null)},__class__:xi});var vj=function(a,b,c,d,f){Tb.call(this,a);this.__width=b;this.__height=c;this.__optimizeForRenderToTexture=f;this.__textureTarget=this.__context.gl.TEXTURE_2D;this.uploadFromTypedArray(null);f&&this.__getGLFramebuffer(!0,0,0)};h["openfl.display3D.textures.RectangleTexture"]=vj;vj.__name__="openfl.display3D.textures.RectangleTexture";
vj.__super__=Tb;vj.prototype=x(Tb.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);ec.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=kb.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);ec.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(Tb.prototype.__setSamplerState.call(this,a)){var b=this.__context.gl;if(0!=Ob.__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>Ob.__glMaxTextureMaxAnisotropy&&(a=Ob.__glMaxTextureMaxAnisotropy);b.texParameterf(b.TEXTURE_2D,Ob.__glTextureMaxAnisotropy,a)}return!0}return!1},__class__:vj});var Mh=function(a,b,c,d,f,g){Tb.call(this,a);this.__width=b;this.__height=c;this.__optimizeForRenderToTexture=f;this.__streamingLevels=g;a=this.__context.gl;this.__textureTarget=a.TEXTURE_2D;this.__context.__bindGLTexture2D(this.__textureID);ec.texImage2D(a,this.__textureTarget,
0,this.__internalFormat,this.__width,this.__height,0,this.__format,a.UNSIGNED_BYTE,null);this.__context.__bindGLTexture2D(null);f&&this.__getGLFramebuffer(!0,0,0)};h["openfl.display3D.textures.Texture"]=Mh;Mh.__name__="openfl.display3D.textures.Texture";Mh.__super__=Tb;Mh.prototype=x(Tb.prototype,{uploadCompressedTextureFromByteArray:function(a,b,c){null==c&&(c=!1);var d=this;c?Sc.delay(function(){d.__uploadCompressedTextureFromByteArray(a,b);var c=new fa("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 ma(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()){var f=this.__context.gl;c=this.__width>>b;d=this.__height>>b;if(0!=c||0!=d)this.__context.__bindGLTexture2D(this.__textureID),ec.texImage2D(f,this.__textureTarget,b,this.__internalFormat,this.__format,
f.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=kb.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,f=this.__height>>b;if(0!=d||0!=f)0==d&&(d=1),0==f&&(f=1),this.__context.__bindGLTexture2D(this.__textureID),
ec.texImage2D(c,this.__textureTarget,b,this.__internalFormat,d,f,0,this.__format,c.UNSIGNED_BYTE,a),this.__context.__bindGLTexture2D(null)}},__setSamplerState:function(a){if(Tb.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!=Ob.__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>Ob.__glMaxTextureMaxAnisotropy&&(a=Ob.__glMaxTextureMaxAnisotropy);b.texParameterf(b.TEXTURE_2D,Ob.__glTextureMaxAnisotropy,a)}return!0}return!1},__uploadCompressedTextureFromByteArray:function(a,b){var c=this;a=new yj(a,b);var d=a.readHeader(this.__width,this.__height,!1),f=this.__context.gl;this.__context.__bindGLTexture2D(this.__textureID);var g=!1;a.readTextures(function(a,b,m,h,r,p,w){a=d?Tb.__compressedFormatsAlpha.h[m]:Tb.__compressedFormats.h[m];if(0!=a)if(g=!0,c.__format=a,c.__internalFormat=
a,d&&2==m){p=p/2|0;var k=m=null,l=null,u=null,n=w.b.buffer,t=0;null==t&&(t=0);m=null!=m?new Uint8Array(m):null!=k?new Uint8Array(k):null!=l?new Uint8Array(l.__array):null!=u?new Uint8Array(u):null!=n?null==p?new Uint8Array(n,t):new Uint8Array(n,t,p):null;ec.compressedTexImage2D(f,c.__textureTarget,b,c.__internalFormat,h,r,0,m);var A=new Mh(c.__context,c.__width,c.__height,3,c.__optimizeForRenderToTexture,c.__streamingLevels);A.__format=a;A.__internalFormat=a;c.__context.__bindGLTexture2D(A.__textureID);
u=l=k=m=null;n=w.b.buffer;t=p;null==t&&(t=0);m=null!=m?new Uint8Array(m):null!=k?new Uint8Array(k):null!=l?new Uint8Array(l.__array):null!=u?new Uint8Array(u):null!=n?null==p?new Uint8Array(n,t):new Uint8Array(n,t,p):null;ec.compressedTexImage2D(f,A.__textureTarget,b,A.__internalFormat,h,r,0,m);c.__alphaTexture=A}else u=l=k=m=null,n=w.b.buffer,t=0,null==t&&(t=0),m=null!=m?new Uint8Array(m):null!=k?new Uint8Array(k):null!=l?new Uint8Array(l.__array):null!=u?new Uint8Array(u):null!=n?null==p?new Uint8Array(n,
t):new Uint8Array(n,t,p):null,ec.compressedTexImage2D(f,c.__textureTarget,b,c.__internalFormat,h,r,0,m)});g||(a=this.__width*this.__height*4,a=null!=a?new Uint8Array(a):null,ec.texImage2D(f,this.__textureTarget,0,this.__internalFormat,this.__width,this.__height,0,this.__format,f.UNSIGNED_BYTE,a));this.__context.__bindGLTexture2D(null)},__class__:Mh});var Nl=function(a){Tb.call(this,a);this.__textureTarget=this.__context.gl.TEXTURE_2D};h["openfl.display3D.textures.VideoTexture"]=Nl;Nl.__name__="openfl.display3D.textures.VideoTexture";
Nl.__super__=Tb;Nl.prototype=x(Tb.prototype,{videoHeight:null,videoWidth:null,__cacheTime:null,__netStream:null,attachNetStream:function(a){var b=this;null!=this.__netStream&&this.__netStream.__video.removeEventListener("canplay",q(this,this.__onCanPlay),!1);this.__cacheTime=-1;this.__netStream=a;null!=this.__netStream&&(2<=this.__netStream.__video.readyState?Sc.delay(function(){b.__textureReady()},0):this.__netStream.__video.addEventListener("canplay",q(this,this.__onCanPlay),!1))},dispose:function(){null!=
this.__netStream&&null!=this.__netStream.__video&&this.__netStream.__video.removeEventListener("timeupdate",q(this,this.__onTimeUpdate));Tb.prototype.dispose.call(this)},__onCanPlay:function(a){this.__netStream.__video.addEventListener("timeupdate",q(this,this.__onTimeUpdate));this.__textureReady()},__onTimeUpdate:function(a){null!=this.__netStream&&this.__netStream.__video.currentTime!=this.__cacheTime&&2<=this.__netStream.__video.readyState&&this.__textureReady()},__getTexture:function(){if(this.__netStream.__video.currentTime!=
this.__cacheTime&&2<=this.__netStream.__video.readyState){var a=this.__context.gl;this.__context.__bindGLTexture2D(this.__textureID);ec.texImage2D(a,a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,this.__netStream.__video);this.__cacheTime=this.__netStream.__video.currentTime}return this.__textureID},__textureReady:function(){this.videoWidth=this.__netStream.__video.videoWidth;this.videoHeight=this.__netStream.__video.videoHeight;var a=new fa("textureReady");this.dispatchEvent(a)},__class__:Nl});var sc=
function(a,b){null==b&&(b=0);null==a&&(a="");J.call(this,a);this.errorID=b;this.name="Error";this.__skipStack++};h["openfl.errors.Error"]=sc;sc.__name__="openfl.errors.Error";sc.__super__=J;sc.prototype=x(J.prototype,{errorID:null,name:null,getStackTrace:function(){return $f.toString($f.exceptionStack())},toString:function(){return null!=this.get_message()?this.get_message():"Error"},__class__:sc});var Eg=function(a){null==a&&(a="");sc.call(this,a);this.name="ArgumentError";this.__skipStack++};h["openfl.errors.ArgumentError"]=
Eg;Eg.__name__="openfl.errors.ArgumentError";Eg.__super__=sc;Eg.prototype=x(sc.prototype,{__class__:Eg});var Oh=function(a){null==a&&(a="");sc.call(this,a);this.name="IOError";this.__skipStack++};h["openfl.errors.IOError"]=Oh;Oh.__name__="openfl.errors.IOError";Oh.__super__=sc;Oh.prototype=x(sc.prototype,{__class__:Oh});var Zf=function(a,b){Oh.call(this,"End of file was encountered");this.name="EOFError";this.errorID=2030;this.__skipStack++};h["openfl.errors.EOFError"]=Zf;Zf.__name__="openfl.errors.EOFError";
Zf.__super__=Oh;Zf.prototype=x(Oh.prototype,{__class__:Zf});var Lc=function(a){null==a&&(a="");sc.call(this,a,0);this.name="IllegalOperationError";this.__skipStack++};h["openfl.errors.IllegalOperationError"]=Lc;Lc.__name__="openfl.errors.IllegalOperationError";Lc.__super__=sc;Lc.prototype=x(sc.prototype,{__class__:Lc});var gh=function(a){null==a&&(a="");sc.call(this,a,0);this.name="RangeError";this.__skipStack++};h["openfl.errors.RangeError"]=gh;gh.__name__="openfl.errors.RangeError";gh.__super__=
sc;gh.prototype=x(sc.prototype,{__class__:gh});var eg=function(a){null==a&&(a="");sc.call(this,a,0);this.name="TypeError";this.__skipStack++};h["openfl.errors.TypeError"]=eg;eg.__name__="openfl.errors.TypeError";eg.__super__=sc;eg.prototype=x(sc.prototype,{__class__:eg});var fa=function(a,b,c){null==c&&(c=!1);null==b&&(b=!1);this.type=a;this.bubbles=b;this.cancelable=c;this.eventPhase=2};h["openfl.events.Event"]=fa;fa.__name__="openfl.events.Event";fa.prototype={bubbles:null,cancelable:null,currentTarget:null,
eventPhase:null,target:null,type:null,__isCanceled:null,__isCanceledNow:null,__preventDefault:null,clone:function(){var a=new fa(this.type,this.bubbles,this.cancelable);a.eventPhase=this.eventPhase;a.target=this.target;a.currentTarget=this.currentTarget;return a},formatToString:function(a,b,c,d,f,g){var k=[];null!=b&&k.push(b);null!=c&&k.push(c);null!=d&&k.push(d);null!=f&&k.push(f);null!=g&&k.push(g);return q(this,this.__formatToString).apply(this,[a,k])},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 f=b[d];++d;c=la.field(this,f);a="string"==typeof c?a+(" "+f+'="'+M.string(c)+'"'):a+(" "+f+"="+M.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__:fa};var Ai=function(a,b,c,d,f,g,k){null==k&&(k=0);null==g&&(g=0);null==f&&(f=0);null==d&&(d=0);null==c&&(c=!1);null==b&&(b=!1);fa.call(this,a,b,c);this.timestamp=d;this.accelerationX=f;this.accelerationY=g;this.accelerationZ=k};h["openfl.events.AccelerometerEvent"]=Ai;Ai.__name__="openfl.events.AccelerometerEvent";Ai.__super__=fa;Ai.prototype=x(fa.prototype,
{accelerationX:null,accelerationY:null,accelerationZ:null,timestamp:null,clone:function(){var a=new Ai(this.type,this.bubbles,this.cancelable,this.timestamp,this.accelerationX,this.accelerationY,this.accelerationZ);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;return a},toString:function(){return this.__formatToString("AccelerometerEvent","type bubbles cancelable timestamp accelerationX accelerationY accelerationZ".split(" "))},__init:function(){fa.prototype.__init.call(this);
this.accelerationZ=this.accelerationY=this.accelerationX=this.timestamp=0},__class__:Ai});var Ag=function(a,b,c,d){null==d&&(d=!1);null==c&&(c=!1);null==b&&(b=!1);fa.call(this,a,b,c);this.activating=d};h["openfl.events.ActivityEvent"]=Ag;Ag.__name__="openfl.events.ActivityEvent";Ag.__super__=fa;Ag.prototype=x(fa.prototype,{activating:null,clone:function(){var a=new Ag(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(){fa.prototype.__init.call(this);this.activating=!1},__class__:Ag});var fe=function(a,b,c,d){null==d&&(d="");null==c&&(c=!1);null==b&&(b=!1);fa.call(this,a,b,c);this.text=d};h["openfl.events.TextEvent"]=fe;fe.__name__="openfl.events.TextEvent";fe.__super__=fa;fe.prototype=x(fa.prototype,{text:null,clone:function(){var a=new fe(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(){fa.prototype.__init.call(this);this.text=""},__class__:fe});var ie=function(a,b,c,d,f){null==f&&(f=0);null==d&&(d="");null==c&&(c=!1);null==b&&(b=!1);fe.call(this,a,b,c,d);this.errorID=f};h["openfl.events.ErrorEvent"]=ie;ie.__name__="openfl.events.ErrorEvent";ie.__super__=fe;
ie.prototype=x(fe.prototype,{errorID:null,clone:function(){var a=new ie(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(){fe.prototype.__init.call(this);this.errorID=0},__class__:ie});var Ii=function(a){this.active=!1;this.reset(a)};h["openfl.events._EventDispatcher.DispatchIterator"]=
Ii;Ii.__name__="openfl.events._EventDispatcher.DispatchIterator";Ii.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__:Ii};var fh=function(a,b,c,d){d&&fh.supportsWeakReference?this.weakRefCallback=new WeakRef(a):this.callback=a;this.useCapture=b;this.priority=c;this.useWeakReference=d};h["openfl.events._EventDispatcher.Listener"]=fh;fh.__name__="openfl.events._EventDispatcher.Listener";fh.prototype={callback:null,weakRefCallback:null,priority:null,useCapture:null,useWeakReference:null,match:function(a,b){var c=
this.callback;return null!=this.weakRefCallback&&(c=this.weakRefCallback.deref(),null==c)?!1:c==a?this.useCapture==b:!1},__class__:fh};var sf=function(a,b,c,d,f,g){null==g&&(g=0);null==f&&(f=!1);null==c&&(c=!1);null==b&&(b=!1);fa.call(this,a,b,c);this.keyCode=g;this.shiftKey=f;this.relatedObject=d};h["openfl.events.FocusEvent"]=sf;sf.__name__="openfl.events.FocusEvent";sf.__super__=fa;sf.prototype=x(fa.prototype,{keyCode:null,relatedObject:null,shiftKey:null,clone:function(){var a=new sf(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(){fa.prototype.__init.call(this);this.keyCode=0;this.shiftKey=!1;this.relatedObject=null},__class__:sf});var uf=function(a,b,c,d,f){null==f&&(f=!1);null==d&&(d=!1);null==c&&(c=!1);null==
b&&(b=!1);Ag.call(this,a,b,c);this.fullScreen=d;this.interactive=f};h["openfl.events.FullScreenEvent"]=uf;uf.__name__="openfl.events.FullScreenEvent";uf.__super__=Ag;uf.prototype=x(Ag.prototype,{fullScreen:null,interactive:null,clone:function(){var a=new uf(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(){Ag.prototype.__init.call(this);this.interactive=this.fullScreen=!1},__class__:uf});var Vf=function(a,b,c,d){null==c&&(c=!1);null==b&&(b=!0);fa.call(this,a,b,c);this.device=d};h["openfl.events.GameInputEvent"]=Vf;Vf.__name__="openfl.events.GameInputEvent";Vf.__super__=fa;Vf.prototype=x(fa.prototype,{device:null,clone:function(){var a=new Vf(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(){fa.prototype.__init.call(this);this.device=null},__class__:Vf});var ch=function(a,b,c,d,f){null==f&&(f=!1);null==d&&(d=0);null==c&&(c=!1);null==b&&(b=!1);this.responseHeaders=[];this.status=d;this.redirected=f;fa.call(this,a,b,c)};h["openfl.events.HTTPStatusEvent"]=ch;ch.__name__="openfl.events.HTTPStatusEvent";ch.__super__=
fa;ch.prototype=x(fa.prototype,{redirected:null,responseHeaders:null,responseURL:null,status:null,clone:function(){var a=new ch(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(){fa.prototype.__init.call(this);this.status=0;this.redirected=!1},__class__:ch});
var Nf=function(a,b,c,d,f){null==f&&(f=0);null==d&&(d="");null==c&&(c=!1);null==b&&(b=!0);ie.call(this,a,b,c,d,f)};h["openfl.events.IOErrorEvent"]=Nf;Nf.__name__="openfl.events.IOErrorEvent";Nf.__super__=ie;Nf.prototype=x(ie.prototype,{clone:function(){var a=new Nf(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__:Nf});var Hh=function(a,b,c,d,f,g,k,l,m,h,r){null==r&&(r=!1);null==h&&(h=!1);null==m&&(m=!1);null==l&&(l=!1);null==k&&(k=!1);null==f&&(f=0);null==d&&(d=0);null==c&&(c=!1);null==b&&(b=!1);fa.call(this,a,b,c);this.charCode=d;this.keyCode=f;this.keyLocation=null!=g?g:0;this.ctrlKey=k;this.altKey=l;this.shiftKey=m;this.controlKey=h;this.commandKey=r;this.__updateAfterEventFlag=!1};h["openfl.events.KeyboardEvent"]=Hh;Hh.__name__="openfl.events.KeyboardEvent";Hh.__super__=
fa;Hh.prototype=x(fa.prototype,{altKey:null,charCode:null,commandKey:null,controlKey:null,ctrlKey:null,keyCode:null,keyLocation:null,shiftKey:null,__updateAfterEventFlag:null,clone:function(){var a=new Hh(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(" "))},updateAfterEvent:function(){this.__updateAfterEventFlag=!0},__init:function(){fa.prototype.__init.call(this);this.keyLocation=this.keyCode=this.charCode=0;this.__updateAfterEventFlag=this.commandKey=this.controlKey=this.shiftKey=this.altKey=this.ctrlKey=!1},__class__:Hh});var vb=function(a,b,c,d,f,g,k,l,m,h,r,p,w,u){null==u&&(u=0);null==w&&(w=!1);null==p&&(p=!1);null==r&&(r=0);null==h&&(h=!1);null==m&&(m=!1);
null==l&&(l=!1);null==k&&(k=!1);null==f&&(f=0);null==d&&(d=0);null==c&&(c=!1);null==b&&(b=!0);fa.call(this,a,b,c);this.shiftKey=m;this.altKey=l;this.ctrlKey=k;this.bubbles=b;this.relatedObject=g;this.delta=r;this.localX=d;this.localY=f;this.buttonDown=h;this.commandKey=p;this.controlKey=w;this.clickCount=u;this.isRelatedObjectInaccessible=!1;this.stageY=this.stageX=NaN;this.__updateAfterEventFlag=!1};h["openfl.events.MouseEvent"]=vb;vb.__name__="openfl.events.MouseEvent";vb.__altKey=null;vb.__buttonDown=
null;vb.__commandKey=null;vb.__controlKey=null;vb.__ctrlKey=null;vb.__shiftKey=null;vb.__create=function(a,b,c,d,f,g,k,l){null==l&&(l=0);a=new vb(a,!0,!1,g.x,g.y,null,vb.__ctrlKey,vb.__altKey,vb.__shiftKey,vb.__buttonDown,l,vb.__commandKey,vb.__controlKey,c);a.stageX=d;a.stageY=f;a.target=k;return a};vb.__super__=fa;vb.prototype=x(fa.prototype,{altKey:null,buttonDown:null,commandKey:null,controlKey:null,clickCount:null,ctrlKey:null,delta:null,isRelatedObjectInaccessible:null,localX:null,localY:null,
relatedObject:null,shiftKey:null,stageX:null,stageY:null,__updateAfterEventFlag:null,clone:function(){var a=new vb(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.controlKey,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(){this.__updateAfterEventFlag=!0},__init:function(){fa.prototype.__init.call(this);this.bubbles=this.ctrlKey=this.altKey=this.shiftKey=!1;this.relatedObject=null;this.localY=this.localX=this.delta=0;this.controlKey=this.commandKey=this.buttonDown=!1;this.clickCount=0;this.isRelatedObjectInaccessible=!1;this.stageY=this.stageX=NaN;this.__updateAfterEventFlag=!1},__class__:vb});var Ph=function(a,b,c,d){null==c&&(c=!1);null==b&&(b=!1);this.info=d;fa.call(this,a,b,c)};h["openfl.events.NetStatusEvent"]=
Ph;Ph.__name__="openfl.events.NetStatusEvent";Ph.__super__=fa;Ph.prototype=x(fa.prototype,{info:null,clone:function(){var a=new Ph(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(){fa.prototype.__init.call(this);this.info=null},__class__:Ph});var Qe=function(a,b,c,d,f){null==f&&(f=
0);null==d&&(d=0);null==c&&(c=!1);null==b&&(b=!1);fa.call(this,a,b,c);this.bytesLoaded=d;this.bytesTotal=f};h["openfl.events.ProgressEvent"]=Qe;Qe.__name__="openfl.events.ProgressEvent";Qe.__super__=fa;Qe.prototype=x(fa.prototype,{bytesLoaded:null,bytesTotal:null,clone:function(){var a=new Qe(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(){fa.prototype.__init.call(this);this.bytesTotal=this.bytesLoaded=0},__class__:Qe});var Pf=function(a,b,c,d,f,g){null==g&&(g=!0);null==c&&(c=!1);null==b&&(b=!1);fa.call(this,a,b,c);this.objectMatrix=d;this.objectColorTransform=f;this.allowSmoothing=g};h["openfl.events.RenderEvent"]=Pf;Pf.__name__="openfl.events.RenderEvent";Pf.__super__=fa;Pf.prototype=x(fa.prototype,{allowSmoothing:null,objectColorTransform:null,objectMatrix:null,
renderer:null,clone:function(){var a=new Pf(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(){fa.prototype.__init.call(this);this.objectColorTransform=this.objectMatrix=null;this.allowSmoothing=!1;this.renderer=null},__class__:Pf});
var Bi=function(a,b,c){null==c&&(c=!1);null==b&&(b=!1);fa.call(this,a,b,c);this.data=new Sb(0);this.data.__endian=1;this.position=0};h["openfl.events.SampleDataEvent"]=Bi;Bi.__name__="openfl.events.SampleDataEvent";Bi.__super__=fa;Bi.prototype=x(fa.prototype,{data:null,position:null,tempBuffer:null,leftChannel:null,rightChannel:null,clone:function(){var a=new Bi(this.type,this.bubbles,this.cancelable);a.target=this.target;a.currentTarget=this.currentTarget;a.eventPhase=this.eventPhase;a.data=this.data;
a.position=this.position;return a},toString:function(){return this.__formatToString("SampleDataEvent",["type","bubbles","cancelable"])},__init:function(){fa.prototype.__init.call(this);this.data=new Sb(0);this.data.__endian=1;this.position=0},getBufferSize:function(){var a=L.toFloat(kb.get_length(this.data))/L.toFloat(4)/2|0;if(0<a){if(0!=a&&0==(a&a-1)&&2048<=a&&8192>=a)return this.tempBuffer=new Float32Array(2*a),a;throw new sc("To be consistent with flash the listener function registered to SampleDataEvent has to provide 2048, 4096 or 8192 samples if targeting HTML5.");
}return 0},getSamples:function(a){this.data.position=0;this.tempBuffer=gp.fromBytes(kb.toBytes(this.data));this.leftChannel=a.outputBuffer.getChannelData(0);this.rightChannel=a.outputBuffer.getChannelData(1);for(var b=a=0,c=L.toFloat(kb.get_length(this.data))/L.toFloat(2)|0;b<c;){var d=b++;this.leftChannel[d]=this.tempBuffer[a++];this.rightChannel[d]=this.tempBuffer[a++]}},__class__:Bi});var Ci=function(a,b,c,d,f){null==f&&(f=0);null==d&&(d="");null==c&&(c=!1);null==b&&(b=!1);ie.call(this,a,b,c,d,
f)};h["openfl.events.SecurityErrorEvent"]=Ci;Ci.__name__="openfl.events.SecurityErrorEvent";Ci.__super__=ie;Ci.prototype=x(ie.prototype,{clone:function(){var a=new Ci(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__:Ci});var wd=function(a,b,c,d,f,g,k,l,m,h,r,p,
w,u,n,t,A,q,y,E){null==t&&(t=!1);null==n&&(n=!1);null==u&&(u=!1);null==w&&(w=!1);null==p&&(p=!1);null==h&&(h=0);null==m&&(m=0);null==l&&(l=0);null==k&&(k=0);null==g&&(g=0);null==f&&(f=!1);null==d&&(d=0);null==c&&(c=!1);null==b&&(b=!0);fa.call(this,a,b,c);this.touchPointID=d;this.isPrimaryTouchPoint=f;this.localX=g;this.localY=k;this.sizeX=l;this.sizeY=m;this.pressure=h;this.relatedObject=r;this.ctrlKey=p;this.altKey=w;this.shiftKey=u;this.commandKey=n;this.controlKey=t;this.stageY=this.stageX=NaN;
this.__updateAfterEventFlag=!1};h["openfl.events.TouchEvent"]=wd;wd.__name__="openfl.events.TouchEvent";wd.__create=function(a,b,c,d,f,g){a=new wd(a,!0,!1,0,!0,f.x,f.y,1,1,1);a.stageX=c;a.stageY=d;a.target=g;return a};wd.__super__=fa;wd.prototype=x(fa.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,__updateAfterEventFlag:null,
clone:function(){var a=new wd(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(){this.__updateAfterEventFlag=!0},__init:function(){fa.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;this.__updateAfterEventFlag=!1},__class__:wd});var Cg=function(a,b,c,d){null==c&&(c=!0);null==b&&(b=!0);ie.call(this,a,b,c);this.error=d};h["openfl.events.UncaughtErrorEvent"]=
Cg;Cg.__name__="openfl.events.UncaughtErrorEvent";Cg.__super__=ie;Cg.prototype=x(ie.prototype,{error:null,clone:function(){var a=new Cg(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(){ie.prototype.__init.call(this);this.error=null},__class__:Cg});var Bl=function(){this.__enabled=
!0;Da.call(this)};h["openfl.events.UncaughtErrorEvents"]=Bl;Bl.__name__="openfl.events.UncaughtErrorEvents";Bl.__super__=Da;Bl.prototype=x(Da.prototype,{__enabled:null,addEventListener:function(a,b,c,d,f){null==f&&(f=!1);null==d&&(d=0);null==c&&(c=!1);Da.prototype.addEventListener.call(this,a,b,c,d,f);Object.prototype.hasOwnProperty.call(this.__eventMap.h,"uncaughtError")&&(this.__enabled=!0)},removeEventListener:function(a,b,c){null==c&&(c=!1);Da.prototype.removeEventListener.call(this,a,b,c);Object.prototype.hasOwnProperty.call(this.__eventMap.h,
"uncaughtError")||(this.__enabled=!1)},__class__:Bl});var Di=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"]=Di;Di.__name__="openfl.filters.BitmapFilter";Di.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 Di},__applyFilter:function(a,b,c,d){return b},__initShader:function(a,b,c){return null},__class__:Di};var Rh=function(a){this.blendMode=10;Di.call(this);this.shader=a;this.__numShaderPasses=1};h["openfl.filters.ShaderFilter"]=Rh;Rh.__name__="openfl.filters.ShaderFilter";Rh.__super__=Di;Rh.prototype=x(Di.prototype,{blendMode:null,shader:null,clone:function(){var a=new Rh(this.shader);a.set_bottomExtension(this.get_bottomExtension());
a.set_leftExtension(this.get_leftExtension());a.set_rightExtension(this.get_rightExtension());a.set_topExtension(this.get_topExtension());a.blendMode=this.blendMode;return a},invalidate:function(){this.__renderDirty=!0},get_topExtension:function(){return this.__topExtension},set_topExtension:function(a){return this.__topExtension=a},get_bottomExtension:function(){return this.__bottomExtension},set_bottomExtension:function(a){return this.__bottomExtension=a},get_leftExtension:function(){return this.__leftExtension},
set_leftExtension:function(a){return this.__leftExtension=a},get_rightExtension:function(){return this.__rightExtension},set_rightExtension:function(a){return this.__rightExtension=a},__initShader:function(a,b,c){this.__shaderBlendMode=this.blendMode;return this.shader},__class__:Rh,__properties__:{set_topExtension:"set_topExtension",get_topExtension:"get_topExtension",set_rightExtension:"set_rightExtension",get_rightExtension:"get_rightExtension",set_leftExtension:"set_leftExtension",get_leftExtension:"get_leftExtension",
set_bottomExtension:"set_bottomExtension",get_bottomExtension:"get_bottomExtension"}});var jd=function(a){null!=a&&16==a.get_length()?this.rawData=a.concat(null):this.rawData=ia.toFloatVector(null,null,null,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};h["openfl.geom.Matrix3D"]=jd;jd.__name__="openfl.geom.Matrix3D";jd.create2D=function(a,b,c,d){null==d&&(d=0);null==c&&(c=1);var f=d*Math.PI/180;d=Math.cos(f);f=Math.sin(f);return new jd(ia.toFloatVector(null,null,null,[d*c,-f*c,0,0,f*c,d*c,0,0,0,0,1,0,a,b,0,
1]))};jd.createABCD=function(a,b,c,d,f,g){return new jd(ia.toFloatVector(null,null,null,[a,b,0,0,c,d,0,0,0,0,1,0,f,g,0,1]))};jd.createOrtho=function(a,b,c,d,f,g){var k=1/(b-a),l=1/(d-c),m=1/(g-f);return new jd(ia.toFloatVector(null,null,null,[2*k,0,0,0,0,2*l,0,0,0,0,-2*m,0,-(a+b)*k,-(c+d)*l,-(f+g)*m,1]))};jd.interpolate=function(a,b,c){for(var d=new jd,f=0;16>f;){var g=f++;d.rawData.set(g,a.rawData.get(g)+(b.rawData.get(g)-a.rawData.get(g))*c)}return d};jd.interpolateToOutput=function(a,b,c,d){null==
d&&(d=new jd);for(var f=0;16>f;){var g=f++;d.rawData.set(g,a.rawData.get(g)+(b.rawData.get(g)-a.rawData.get(g))*c)}return d};jd.__getAxisRotation=function(a,b,c,d){var f=new jd;a=new qc(a,b,c);d=Math.PI/180*-d;c=Math.cos(d);d=Math.sin(d);b=1-c;f.rawData.set(0,c+a.x*a.x*b);f.rawData.set(5,c+a.y*a.y*b);f.rawData.set(10,c+a.z*a.z*b);c=a.x*a.y*b;var g=a.z*d;f.rawData.set(4,c+g);f.rawData.set(1,c-g);c=a.x*a.z*b;g=a.y*d;f.rawData.set(8,c-g);f.rawData.set(2,c+g);c=a.y*a.z*b;g=a.x*d;f.rawData.set(9,c+g);
f.rawData.set(6,c-g);return f};jd.prototype={rawData:null,append:function(a){var b=this.rawData.get(0),c=this.rawData.get(4),d=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),h=this.rawData.get(2),r=this.rawData.get(6),p=this.rawData.get(10),w=this.rawData.get(14),u=this.rawData.get(3),n=this.rawData.get(7),t=this.rawData.get(11),A=this.rawData.get(15),q=a.rawData.get(0),y=a.rawData.get(4),E=a.rawData.get(8),L=a.rawData.get(12),
v=a.rawData.get(1),x=a.rawData.get(5),C=a.rawData.get(9),G=a.rawData.get(13),Y=a.rawData.get(2),B=a.rawData.get(6),H=a.rawData.get(10),D=a.rawData.get(14),J=a.rawData.get(3),K=a.rawData.get(7),qa=a.rawData.get(11);a=a.rawData.get(15);this.rawData.set(0,b*q+g*y+h*E+u*L);this.rawData.set(1,b*v+g*x+h*C+u*G);this.rawData.set(2,b*Y+g*B+h*H+u*D);this.rawData.set(3,b*J+g*K+h*qa+u*a);this.rawData.set(4,c*q+k*y+r*E+n*L);this.rawData.set(5,c*v+k*x+r*C+n*G);this.rawData.set(6,c*Y+k*B+r*H+n*D);this.rawData.set(7,
c*J+k*K+r*qa+n*a);this.rawData.set(8,d*q+l*y+p*E+t*L);this.rawData.set(9,d*v+l*x+p*C+t*G);this.rawData.set(10,d*Y+l*B+p*H+t*D);this.rawData.set(11,d*J+l*K+p*qa+t*a);this.rawData.set(12,f*q+m*y+w*E+A*L);this.rawData.set(13,f*v+m*x+w*C+A*G);this.rawData.set(14,f*Y+m*B+w*H+A*D);this.rawData.set(15,f*J+m*K+w*qa+A*a)},appendRotation:function(a,b,c){var d=0,f=d,g=f;null!=c&&(g=c.x,f=c.y,d=c.z);c=a*Math.PI/180;a=Math.cos(c);c=Math.sin(c);var k=b.x,l=b.y;b=b.z;var m=k*k,h=l*l,r=b*b,p=m+h+r;if(0!=p){var w=
Math.sqrt(p);k/=w;l/=w;b/=w;m/=p;h/=p;r/=p}p=1-a;w=new jd;var u=w.rawData;u.set(0,m+(h+r)*a);u.set(1,k*l*p+b*c);u.set(2,k*b*p-l*c);u.set(4,k*l*p-b*c);u.set(5,h+(m+r)*a);u.set(6,l*b*p+k*c);u.set(8,k*b*p+l*c);u.set(9,l*b*p-k*c);u.set(10,r+(m+h)*a);u.set(12,(g*(h+r)-k*(f*l+d*b))*p+(f*b-d*l)*c);u.set(13,(f*(m+r)-l*(g*k+d*b))*p+(d*k-g*b)*c);u.set(14,(d*(m+h)-b*(g*k+f*l))*p+(g*l-f*k)*c);this.append(w)},appendScale:function(a,b,c){this.append(new jd(ia.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);d=this.rawData;d.set(13,d.get(13)+b);d=this.rawData;d.set(14,d.get(14)+c)},clone:function(){return new jd(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,f=a.get_length()-b;d<f;){var g=d++;this.rawData.set(g,a.get(g+b))}c&&this.transpose()},copyRawDataTo:function(a,b,c){null==c&&(c=!1);null==b&&(b=0);c&&this.transpose();for(var d=0,f=this.rawData.get_length();d<
f;){var g=d++;a.set(g+b,this.rawData.get(g))}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=ia.toObjectVector(null),c=this.clone().rawData.copy(),d=new qc(c.get(12),c.get(13),c.get(14));c.set(12,0);c.set(13,0);c.set(14,0);var f=new qc;f.x=Math.sqrt(c.get(0)*c.get(0)+c.get(1)*c.get(1)+c.get(2)*c.get(2));f.y=Math.sqrt(c.get(4)*c.get(4)+c.get(5)*c.get(5)+c.get(6)*c.get(6));f.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))&&(f.z=-f.z);var g=c;g.set(0,g.get(0)/f.x);g=c;g.set(1,g.get(1)/f.x);g=c;g.set(2,g.get(2)/f.x);g=c;g.set(4,g.get(4)/f.y);g=c;g.set(5,g.get(5)/f.y);g=c;g.set(6,g.get(6)/f.y);g=c;g.set(8,g.get(8)/f.z);g=c;g.set(9,g.get(9)/f.z);g=c;g.set(10,g.get(10)/f.z);g=new qc;switch(a){case 0:g.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?(g.x=(c.get(6)-c.get(9))/a,g.y=(c.get(8)-c.get(2))/a,g.z=(c.get(1)-c.get(4))/a):g.x=g.y=g.z=0;break;case 1:g.y=Math.asin(-c.get(2));1!=c.get(2)&&-1!=c.get(2)?(g.x=Math.atan2(c.get(6),c.get(10)),g.z=Math.atan2(c.get(1),c.get(0))):(g.z=0,g.x=Math.atan2(c.get(4),c.get(5)));break;case 2:a=c.get(0)+c.get(5)+c.get(10),0<a?(g.w=Math.sqrt(1+a)/2,g.x=(c.get(6)-c.get(9))/(4*g.w),g.y=(c.get(8)-c.get(2))/(4*g.w),g.z=(c.get(1)-c.get(4))/(4*g.w)):c.get(0)>
c.get(5)&&c.get(0)>c.get(10)?(g.x=Math.sqrt(1+c.get(0)-c.get(5)-c.get(10))/2,g.w=(c.get(6)-c.get(9))/(4*g.x),g.y=(c.get(1)+c.get(4))/(4*g.x),g.z=(c.get(8)+c.get(2))/(4*g.x)):c.get(5)>c.get(10)?(g.y=Math.sqrt(1+c.get(5)-c.get(0)-c.get(10))/2,g.x=(c.get(1)+c.get(4))/(4*g.y),g.w=(c.get(8)-c.get(2))/(4*g.y),g.z=(c.get(6)+c.get(9))/(4*g.y)):(g.z=Math.sqrt(1+c.get(10)-c.get(0)-c.get(5))/2,g.x=(c.get(8)+c.get(2))/(4*g.z),g.y=(c.get(6)+c.get(9))/(4*g.z),g.w=(c.get(1)-c.get(4))/(4*g.z))}b.push(d);b.push(g);
b.push(f);return b},decomposeToOutput:function(a,b){null==a&&(a=1);null==b&&(b=ia.toObjectVector(null));var c=this.clone().rawData.copy(),d=b.get(0);null==d?d=new qc(c.get(12),c.get(13),c.get(14)):d.setTo(c.get(12),c.get(13),c.get(14));c.set(12,0);c.set(13,0);c.set(14,0);var f=b.get(1);null==f&&(f=new qc);f.x=Math.sqrt(c.get(0)*c.get(0)+c.get(1)*c.get(1)+c.get(2)*c.get(2));f.y=Math.sqrt(c.get(4)*c.get(4)+c.get(5)*c.get(5)+c.get(6)*c.get(6));f.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))&&(f.z=-f.z);var g=c;g.set(0,g.get(0)/f.x);g=c;g.set(1,g.get(1)/f.x);g=c;g.set(2,g.get(2)/f.x);g=c;g.set(4,g.get(4)/f.y);g=c;g.set(5,g.get(5)/f.y);g=c;g.set(6,g.get(6)/f.y);g=c;g.set(8,g.get(8)/f.z);g=c;g.set(9,g.get(9)/f.z);g=c;g.set(10,g.get(10)/f.z);g=b.get(2);null==g&&(g=new qc);switch(a){case 0:g.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?(g.x=(c.get(6)-c.get(9))/a,g.y=(c.get(8)-c.get(2))/a,g.z=(c.get(1)-c.get(4))/a):g.x=g.y=g.z=0;break;case 1:g.y=Math.asin(-c.get(2));1!=c.get(2)&&-1!=c.get(2)?(g.x=Math.atan2(c.get(6),c.get(10)),g.z=Math.atan2(c.get(1),c.get(0))):(g.z=0,g.x=Math.atan2(c.get(4),c.get(5)));break;case 2:a=c.get(0)+c.get(5)+c.get(10),0<a?(g.w=Math.sqrt(1+a)/2,g.x=(c.get(6)-c.get(9))/
(4*g.w),g.y=(c.get(8)-c.get(2))/(4*g.w),g.z=(c.get(1)-c.get(4))/(4*g.w)):c.get(0)>c.get(5)&&c.get(0)>c.get(10)?(g.x=Math.sqrt(1+c.get(0)-c.get(5)-c.get(10))/2,g.w=(c.get(6)-c.get(9))/(4*g.x),g.y=(c.get(1)+c.get(4))/(4*g.x),g.z=(c.get(8)+c.get(2))/(4*g.x)):c.get(5)>c.get(10)?(g.y=Math.sqrt(1+c.get(5)-c.get(0)-c.get(10))/2,g.x=(c.get(1)+c.get(4))/(4*g.y),g.w=(c.get(8)-c.get(2))/(4*g.y),g.z=(c.get(6)+c.get(9))/(4*g.y)):(g.z=Math.sqrt(1+c.get(10)-c.get(0)-c.get(5))/2,g.x=(c.get(8)+c.get(2))/(4*g.z),g.y=
(c.get(6)+c.get(9))/(4*g.z),g.w=(c.get(1)-c.get(4))/(4*g.z))}b.set(0,d);b.set(1,g);b.set(2,f);return b},deltaTransformVector:function(a){var b=a.x,c=a.y;a=a.z;return new qc(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))},deltaTransformVectorToOutput:function(a,b){var c=a.x,d=a.y;a=
a.z;return null!=b?(b.setTo(c*this.rawData.get(0)+d*this.rawData.get(4)+a*this.rawData.get(8),c*this.rawData.get(1)+d*this.rawData.get(5)+a*this.rawData.get(9),c*this.rawData.get(2)+d*this.rawData.get(6)+a*this.rawData.get(10)),b.w=c*this.rawData.get(3)+d*this.rawData.get(7)+a*this.rawData.get(11),b):new qc(c*this.rawData.get(0)+d*this.rawData.get(4)+a*this.rawData.get(8),c*this.rawData.get(1)+d*this.rawData.get(5)+a*this.rawData.get(9),c*this.rawData.get(2)+d*this.rawData.get(6)+a*this.rawData.get(10),
c*this.rawData.get(3)+d*this.rawData.get(7)+a*this.rawData.get(11))},identity:function(){this.rawData=ia.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),f=this.rawData.get(8),g=this.rawData.get(12),k=this.rawData.get(1),
l=this.rawData.get(5),h=this.rawData.get(9),r=this.rawData.get(13),w=this.rawData.get(2),p=this.rawData.get(6),u=this.rawData.get(10),n=this.rawData.get(14),t=this.rawData.get(3),A=this.rawData.get(7),q=this.rawData.get(11),y=this.rawData.get(15);this.rawData.set(0,a*(l*(u*y-n*q)-h*(p*y-n*A)+r*(p*q-u*A)));this.rawData.set(1,-a*(k*(u*y-n*q)-h*(w*y-n*t)+r*(w*q-u*t)));this.rawData.set(2,a*(k*(p*y-n*A)-l*(w*y-n*t)+r*(w*A-p*t)));this.rawData.set(3,-a*(k*(p*q-u*A)-l*(w*q-u*t)+h*(w*A-p*t)));this.rawData.set(4,
-a*(d*(u*y-n*q)-f*(p*y-n*A)+g*(p*q-u*A)));this.rawData.set(5,a*(c*(u*y-n*q)-f*(w*y-n*t)+g*(w*q-u*t)));this.rawData.set(6,-a*(c*(p*y-n*A)-d*(w*y-n*t)+g*(w*A-p*t)));this.rawData.set(7,a*(c*(p*q-u*A)-d*(w*q-u*t)+f*(w*A-p*t)));this.rawData.set(8,a*(d*(h*y-r*q)-f*(l*y-r*A)+g*(l*q-h*A)));this.rawData.set(9,-a*(c*(h*y-r*q)-f*(k*y-r*t)+g*(k*q-h*t)));this.rawData.set(10,a*(c*(l*y-r*A)-d*(k*y-r*t)+g*(k*A-l*t)));this.rawData.set(11,-a*(c*(l*q-h*A)-d*(k*q-h*t)+f*(k*A-l*t)));this.rawData.set(12,-a*(d*(h*n-r*u)-
f*(l*n-r*p)+g*(l*u-h*p)));this.rawData.set(13,a*(c*(h*n-r*u)-f*(k*n-r*w)+g*(k*u-h*w)));this.rawData.set(14,-a*(c*(l*n-r*p)-d*(k*n-r*w)+g*(k*p-l*w)));this.rawData.set(15,a*(c*(l*u-h*p)-d*(k*u-h*w)+f*(k*p-l*w)))}return b},pointAt:function(a,b,c){null==b&&(b=new qc(0,0,-1));null==c&&(c=new qc(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 qc(-b.y,b.x,0):new qc(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),f=a.rawData.get(12),g=a.rawData.get(1),
k=a.rawData.get(5),l=a.rawData.get(9),h=a.rawData.get(13),r=a.rawData.get(2),w=a.rawData.get(6),p=a.rawData.get(10),u=a.rawData.get(14),n=a.rawData.get(3),t=a.rawData.get(7),A=a.rawData.get(11);a=a.rawData.get(15);var q=this.rawData.get(0),y=this.rawData.get(4),E=this.rawData.get(8),L=this.rawData.get(12),v=this.rawData.get(1),x=this.rawData.get(5),C=this.rawData.get(9),G=this.rawData.get(13),Y=this.rawData.get(2),B=this.rawData.get(6),H=this.rawData.get(10),D=this.rawData.get(14),J=this.rawData.get(3),
K=this.rawData.get(7),qa=this.rawData.get(11),va=this.rawData.get(15);this.rawData.set(0,b*q+g*y+r*E+n*L);this.rawData.set(1,b*v+g*x+r*C+n*G);this.rawData.set(2,b*Y+g*B+r*H+n*D);this.rawData.set(3,b*J+g*K+r*qa+n*va);this.rawData.set(4,c*q+k*y+w*E+t*L);this.rawData.set(5,c*v+k*x+w*C+t*G);this.rawData.set(6,c*Y+k*B+w*H+t*D);this.rawData.set(7,c*J+k*K+w*qa+t*va);this.rawData.set(8,d*q+l*y+p*E+A*L);this.rawData.set(9,d*v+l*x+p*C+A*G);this.rawData.set(10,d*Y+l*B+p*H+A*D);this.rawData.set(11,d*J+l*K+p*
qa+A*va);this.rawData.set(12,f*q+h*y+u*E+a*L);this.rawData.set(13,f*v+h*x+u*C+a*G);this.rawData.set(14,f*Y+h*B+u*H+a*D);this.rawData.set(15,f*J+h*K+u*qa+a*va)},prependRotation:function(a,b,c){var d=0,f=d,g=f;null!=c&&(g=c.x,f=c.y,d=c.z);c=a*Math.PI/180;a=Math.cos(c);c=Math.sin(c);var k=b.x,l=b.y;b=b.z;var h=k*k,r=l*l,w=b*b,p=h+r+w;if(0!=p){var u=Math.sqrt(p);k/=u;l/=u;b/=u;h/=p;r/=p;w/=p}p=1-a;u=new jd;var n=u.rawData;n.set(0,h+(r+w)*a);n.set(1,k*l*p+b*c);n.set(2,k*b*p-l*c);n.set(4,k*l*p-b*c);n.set(5,
r+(h+w)*a);n.set(6,l*b*p+k*c);n.set(8,k*b*p+l*c);n.set(9,l*b*p-k*c);n.set(10,w+(h+r)*a);n.set(12,(g*(r+w)-k*(f*l+d*b))*p+(f*b-d*l)*c);n.set(13,(f*(h+w)-l*(g*k+d*b))*p+(d*k-g*b)*c);n.set(14,(d*(h+r)-b*(g*k+f*l))*p+(g*l-f*k)*c);this.prepend(u)},prependScale:function(a,b,c){this.prepend(new jd(ia.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 jd;d.set_position(new qc(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),f=Math.cos(a.get(1).z),g=Math.sin(a.get(1).x),k=Math.sin(a.get(1).y),l=Math.sin(a.get(1).z);this.rawData.set(0,d*f*c[0]);this.rawData.set(1,d*l*c[1]);this.rawData.set(2,-k*c[2]);this.rawData.set(3,0);this.rawData.set(4,(g*k*f-b*l)*c[4]);this.rawData.set(5,(g*k*l+b*f)*c[5]);
this.rawData.set(6,g*d*c[6]);this.rawData.set(7,0);this.rawData.set(8,(b*k*f+g*l)*c[8]);this.rawData.set(9,(b*k*l-g*f)*c[9]);this.rawData.set(10,b*d*c[10])}else d=a.get(1).x,f=a.get(1).y,g=a.get(1).z,k=a.get(1).w,0==b&&(d*=Math.sin(k/2),f*=Math.sin(k/2),g*=Math.sin(k/2),k=Math.cos(k/2)),this.rawData.set(0,(1-2*f*f-2*g*g)*c[0]),this.rawData.set(1,(2*d*f+2*k*g)*c[1]),this.rawData.set(2,(2*d*g-2*k*f)*c[2]),this.rawData.set(3,0),this.rawData.set(4,(2*d*f-2*k*g)*c[4]),this.rawData.set(5,(1-2*d*d-2*g*g)*
c[5]),this.rawData.set(6,(2*f*g+2*k*d)*c[6]),this.rawData.set(7,0),this.rawData.set(8,(2*d*g+2*k*f)*c[8]),this.rawData.set(9,(2*f*g-2*k*d)*c[9]),this.rawData.set(10,(1-2*d*d-2*f*f)*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 qc(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))},transformVectorToOutput:function(a,b){var c=a.x,d=a.y;a=a.z;return null!=b?(b.setTo(c*
this.rawData.get(0)+d*this.rawData.get(4)+a*this.rawData.get(8)+this.rawData.get(12),c*this.rawData.get(1)+d*this.rawData.get(5)+a*this.rawData.get(9)+this.rawData.get(13),c*this.rawData.get(2)+d*this.rawData.get(6)+a*this.rawData.get(10)+this.rawData.get(14)),b.w=c*this.rawData.get(3)+d*this.rawData.get(7)+a*this.rawData.get(11)+this.rawData.get(15),b):new qc(c*this.rawData.get(0)+d*this.rawData.get(4)+a*this.rawData.get(8)+this.rawData.get(12),c*this.rawData.get(1)+d*this.rawData.get(5)+a*this.rawData.get(9)+
this.rawData.get(13),c*this.rawData.get(2)+d*this.rawData.get(6)+a*this.rawData.get(10)+this.rawData.get(14),c*this.rawData.get(3)+d*this.rawData.get(7)+a*this.rawData.get(11)+this.rawData.get(15))},transformVectors:function(a,b){for(var c=0,d,f,g;c+3<=a.get_length();)d=a.get(c),f=a.get(c+1),g=a.get(c+2),b.set(c,d*this.rawData.get(0)+f*this.rawData.get(4)+g*this.rawData.get(8)+this.rawData.get(12)),b.set(c+1,d*this.rawData.get(1)+f*this.rawData.get(5)+g*this.rawData.get(9)+this.rawData.get(13)),b.set(c+
2,d*this.rawData.get(2)+f*this.rawData.get(6)+g*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 qc(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__:jd,__properties__:{set_position:"set_position",get_position:"get_position",get_determinant:"get_determinant"}};var Jj=function(a){this.__colorTransform=new Ub;this.concatenatedColorTransform=new Ub;this.pixelBounds=new ea;this.__displayObject=a;this.__hasMatrix=!0};h["openfl.geom.Transform"]=
Jj;Jj.__name__="openfl.geom.Transform";Jj.prototype={concatenatedColorTransform:null,pixelBounds:null,__colorTransform:null,__displayObject:null,__hasMatrix:null,__hasMatrix3D:null,get_colorTransform:function(){return this.__colorTransform.__clone()},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 jd(ia.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(4),a.rawData.get(5),a.rawData.get(12),a.rawData.get(13));return a},__setTransform:function(a,b,c,d,f,g){if(null!=this.__displayObject){var k=this.__displayObject.__transform;if(k.a!=a||k.b!=b||k.c!=c||k.d!=d||k.tx!=
f||k.ty!=g){var l=0==b?a:Math.sqrt(a*a+b*b);var h=0==c?d:Math.sqrt(c*c+d*d);this.__displayObject.__scaleX=l;this.__displayObject.__scaleY=h;l=180/Math.PI*Math.atan2(d,c)-90;l!=this.__displayObject.__rotation&&(this.__displayObject.__rotation=l,l*=Math.PI/180,this.__displayObject.__rotationSine=Math.sin(l),this.__displayObject.__rotationCosine=Math.cos(l));k.a=a;k.b=b;k.c=c;k.d=d;k.tx=f;k.ty=g;this.__displayObject.__setTransformDirty()}}},__class__:Jj,__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 qc=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"]=qc;qc.__name__="openfl.geom.Vector3D";qc.__properties__={get_Z_AXIS:"get_Z_AXIS",get_Y_AXIS:"get_Y_AXIS",get_X_AXIS:"get_X_AXIS"};qc.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)};qc.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)};qc.get_X_AXIS=function(){return new qc(1,0,0)};qc.get_Y_AXIS=function(){return new qc(0,1,0)};qc.get_Z_AXIS=function(){return new qc(0,0,1)};qc.prototype={w:null,x:null,y:null,z:null,add:function(a){return new qc(this.x+a.x,this.y+a.y,this.z+a.z)},addToOutput:function(a,b){return null!=b?(b.setTo(this.x+a.x,this.y+a.y,this.z+a.z),
b):new qc(this.x+a.x,this.y+a.y,this.z+a.z)},clone:function(){return new qc(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 qc(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)},crossProductToOutput:function(a,b){return null!=b?(b.setTo(this.y*a.z-this.z*a.y,this.z*a.x-this.x*a.z,this.x*a.y-this.y*a.x),b.w=1,b):new qc(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 qc(this.x-a.x,this.y-a.y,this.z-a.z)},subtractToOutput:function(a,b){return null!=b?(b.setTo(this.x-a.x,this.y-a.y,this.z-a.z),b):new qc(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__:qc,__properties__:{get_lengthSquared:"get_lengthSquared",get_length:"get_length"}};var Pn=function(){};h["openfl.media.ID3Info"]=Pn;Pn.__name__="openfl.media.ID3Info";Pn.prototype={album:null,artist:null,comment:null,genre:null,songName:null,track:null,year:null,__class__:Pn};var ne=function(a,b){this.__webAudioContext=null;this.__urlLoading=!1;Da.call(this,this);this.bytesTotal=
this.bytesLoaded=0;this.isBuffering=!1;this.url=null;null!=a&&this.load(a,b);null==a&&null!=ld.context&&"web"==ld.context.type&&(this.__webAudioContext=ld.context.web)};h["openfl.media.Sound"]=ne;ne.__name__="openfl.media.Sound";ne.fromAudioBuffer=function(a){var b=new ne;b.__buffer=a;return b};ne.fromFile=function(a){var b=zc.fromFile(a);if(null==b)throw new Oh("Error loading sound from file: "+a);return ne.fromAudioBuffer(b)};ne.loadFromFile=function(a){return zc.loadFromFile(a).then(function(a){return ob.withValue(ne.fromAudioBuffer(a))})};
ne.loadFromFiles=function(a){return zc.loadFromFiles(a).then(function(a){return ob.withValue(ne.fromAudioBuffer(a))})};ne.__super__=Da;ne.prototype=x(Da.prototype,{bytesLoaded:null,bytesTotal:null,isBuffering:null,url:null,__urlLoading:null,__pendingSoundChannel:null,__pendingAudioSource:null,__buffer:null,__webAudioContext:null,close:function(){null!=this.__buffer&&(Ac.__unregisterSoundChannelByBuffer(this.__buffer),this.__buffer.dispose(),this.__buffer=null)},load:function(a,b){var c=this;this.url=
a.url;this.__urlLoading=!0;this.dispatchEvent(new fa("open"));a=ra.getLibrary("default");if(null!=a&&Object.prototype.hasOwnProperty.call(a.cachedAudioBuffers.h,this.url))a=a.cachedAudioBuffers.h[this.url],b=null!=a&&null!=a.data?a.data.byteLength:0,this.AudioBuffer_onURLProgress(b,b),this.AudioBuffer_onURLLoad(a);else zc.loadFromFile(this.url).onProgress(q(this,this.AudioBuffer_onURLProgress)).onComplete(q(this,this.AudioBuffer_onURLLoad)).onError(function(a){c.AudioBuffer_onURLLoad(null)})},loadCompressedDataFromByteArray:function(a,
b){if(null==a||0>=b)this.dispatchEvent(new Nf("ioError"));else{if(L.gt(a.position,0)||L.gt(kb.get_length(a),b)){var c=b;null==c&&(c=0);var d=new Sb(c),f=a.position;c=b;null==c&&(c=0);null==f&&(f=0);d.writeBytes(a,f,c);a=d}this.__buffer=zc.fromBytes(kb.toBytes(a));null==this.__buffer?this.dispatchEvent(new Nf("ioError")):(this.dispatchEvent(new fa("open")),this.dispatchEvent(new Qe("progress",!1,!1,L.toFloat(kb.get_length(a)),L.toFloat(kb.get_length(a)))),this.dispatchEvent(new fa("complete")))}},
loadPCMFromByteArray:function(a,b,c,d,f){null==f&&(f=44100);null==d&&(d=!0);null==c&&(c="float");if(null==a)this.dispatchEvent(new Nf("ioError"));else{c="float"==c?32:16;d=d?2:1;b=c/8*d*b|0;if(L.gt(a.position,0)||L.gt(kb.get_length(a),b)){var g=b;null==g&&(g=0);var k=new Sb(g),l=a.position;g=b;null==g&&(g=0);null==l&&(l=0);k.writeBytes(a,l,g);a=k}b=new zc;b.bitsPerSample=c;b.channels=d;c=kb.toArrayBuffer(a);c=null!=c?new Uint8Array(c,0):null;b.data=c;b.sampleRate=f|0;this.__buffer=b;this.dispatchEvent(new fa("open"));
this.dispatchEvent(new Qe("progress",!1,!1,L.toFloat(kb.get_length(a)),L.toFloat(kb.get_length(a))));this.dispatchEvent(new fa("complete"))}},play:function(a,b,c){null==b&&(b=0);null==a&&(a=0);if(32<=Ac.__soundChannels.length)return null;c=null==c?new gf:c.clone();var d=Ac.__soundTransform.pan+c.pan;1<d&&(d=1);-1>d&&(d=-1);var f=Ac.__soundTransform.volume*c.volume,g=new zn(this.__buffer);g.offset=a|0;1<b&&g.set_loops(b-1);g.set_gain(f);a=g.get_position();a.x=d;a.z=-1*Math.sqrt(1-Math.pow(d,2));g.set_position(a);
c=new Ql(this,this.__urlLoading?null:g,c);this.__urlLoading?(this.__pendingAudioSource=g,this.__pendingSoundChannel=c):null==this.__buffer&&null!=this.__webAudioContext&&c.__startSampleData();return c},get_sampleRate:function(){return this.__webAudioContext.sampleRate|0},get_id3:function(){return new Pn},get_length:function(){return null!=this.__buffer?1E3*this.__buffer.get_src().duration()|0:0},AudioBuffer_onURLLoad:function(a){this.__urlLoading=!1;null==a?this.dispatchEvent(new Nf("ioError")):(this.__buffer=
a,this.dispatchEvent(new fa("complete")),null!=this.__pendingSoundChannel&&(this.__pendingAudioSource.buffer=this.__buffer,this.__pendingAudioSource.init(),this.__pendingSoundChannel.__initAudioSource(this.__pendingAudioSource)));this.__pendingAudioSource=this.__pendingSoundChannel=null},AudioBuffer_onURLProgress:function(a,b){var c=new Qe("progress");c.bytesLoaded=a;c.bytesTotal=b;this.dispatchEvent(c)},__class__:ne,__properties__:{get_sampleRate:"get_sampleRate",get_length:"get_length",get_id3:"get_id3"}});
var Ql=function(a,b,c){this.__firstRun=!0;Da.call(this,this);this.__sound=a;this.rightPeak=this.leftPeak=1;this.__soundTransform=null!=c?c:new gf;this.__initAudioSource(b);Ac.__registerSoundChannel(this)};h["openfl.media.SoundChannel"]=Ql;Ql.__name__="openfl.media.SoundChannel";Ql.__super__=Da;Ql.prototype=x(Da.prototype,{leftPeak:null,rightPeak:null,__sound:null,__isValid:null,__soundTransform:null,__audioSource:null,__sampleDataEvent:null,__processor:null,__firstRun:null,stop:function(){Ac.__unregisterSoundChannel(this);
this.__isValid&&(null!=this.__processor&&(this.__processor.disconnect(),this.__processor=this.__processor.onaudioprocess=null),this.__audioSource.stop(),this.__dispose())},__dispose:function(){this.__isValid&&(this.__audioSource.onComplete.remove(q(this,this.audioSource_onComplete)),this.__audioSource.dispose(),this.__audioSource=null,this.__isValid=!1)},__startSampleData:function(){var a=this,b=this.__sound.__webAudioContext;if(null!=b){this.__sampleDataEvent=new Bi("sampleData");this.__sound.dispatchEvent(this.__sampleDataEvent);
var c=this.__sampleDataEvent.getBufferSize();0==c?ha.setTimeout(function(){a.stop();a.dispatchEvent(new fa("soundComplete"))},1):(this.__processor=b.createScriptProcessor(c,0,2),this.__processor.connect(b.destination),this.__processor.onaudioprocess=q(this,this.onSample),b.resume())}},__updateTransform:function(){this.set_soundTransform(this.get_soundTransform())},__initAudioSource:function(a){this.__audioSource=a;null!=this.__audioSource&&(this.__audioSource.onComplete.add(q(this,this.audioSource_onComplete)),
this.__isValid=!0,this.__audioSource.play())},get_position:function(){return this.__isValid?this.__audioSource.get_currentTime()+this.__audioSource.offset:0},set_position:function(a){if(!this.__isValid)return 0;this.__audioSource.set_currentTime((a|0)-this.__audioSource.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=Ac.__soundTransform.pan+this.__soundTransform.pan;
-1>b&&(b=-1);1<b&&(b=1);var c=Ac.__soundTransform.volume*this.__soundTransform.volume;this.__isValid&&(this.__audioSource.set_gain(c),c=this.__audioSource.get_position(),c.x=b,c.z=-1*Math.sqrt(1-Math.pow(b,2)),this.__audioSource.set_position(c))}return a},audioSource_onComplete:function(){Ac.__unregisterSoundChannel(this);this.__dispose();this.dispatchEvent(new fa("soundComplete"))},onSample:function(a){if(this.__firstRun){var b=!0;this.__firstRun=!1}else kb.set_length(this.__sampleDataEvent.data,
0),this.__sound.dispatchEvent(this.__sampleDataEvent),b=L.gt(kb.get_length(this.__sampleDataEvent.data),0);b?this.__sampleDataEvent.getSamples(a):(this.stop(),this.dispatchEvent(new fa("soundComplete")))},__class__:Ql,__properties__:{set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform",set_position:"set_position",get_position:"get_position"}});var Go=function(a,b){null==b&&(b=!1);null==a&&(a=1E3);this.bufferTime=a;this.checkPolicyFile=b};h["openfl.media.SoundLoaderContext"]=
Go;Go.__name__="openfl.media.SoundLoaderContext";Go.prototype={bufferTime:null,checkPolicyFile:null,__class__:Go};var gf=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"]=gf;gf.__name__="openfl.media.SoundTransform";gf.prototype={leftToLeft:null,leftToRight:null,pan:null,rightToLeft:null,rightToRight:null,volume:null,clone:function(){return new gf(this.volume,this.pan)},__class__:gf};
var Ac=function(){};h["openfl.media.SoundMixer"]=Ac;Ac.__name__="openfl.media.SoundMixer";Ac.__properties__={set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform"};Ac.bufferTime=null;Ac.areSoundsInaccessible=function(){return!1};Ac.stopAll=function(){for(var a=Ac.__soundChannels.length;0<a;)--a,Ac.__soundChannels[a].stop()};Ac.__registerSoundChannel=function(a){Ac.__soundChannels.push(a)};Ac.__unregisterSoundChannel=function(a){y.remove(Ac.__soundChannels,a)};Ac.get_soundTransform=
function(){return Ac.__soundTransform};Ac.__unregisterSoundChannelByBuffer=function(a){for(var b=Ac.__soundChannels.length;0<b;){--b;var c=Ac.__soundChannels[b];c.__audioSource.buffer==a&&c.stop()}};Ac.set_soundTransform=function(a){Ac.__soundTransform=a.clone();for(var b=0,c=Ac.__soundChannels;b<c.length;){var d=c[b];++b;d.__updateTransform()}return a};var Rl=function(a,b){null==b&&(b=240);null==a&&(a=320);da.call(this);this.__drawableType=8;this.__width=a;this.__height=b;this.__textureTime=-1;this.smoothing=
!1;this.deblocking=0};h["openfl.media.Video"]=Rl;Rl.__name__="openfl.media.Video";Rl.__super__=da;Rl.prototype=x(da.prototype,{deblocking:null,smoothing:null,__active:null,__buffer:null,__bufferAlpha:null,__bufferColorTransform:null,__bufferContext:null,__bufferData:null,__currentWidth:null,__currentHeight: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=ea.__pool.get();c.setTo(0,0,this.__width,this.__height);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);ea.__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),ec.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.__currentWidth!=this.get_width()||this.__currentHeight!=this.get_height())this.__currentWidth=this.get_width(),this.__currentHeight=this.get_height(),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(qg.toArrayBufferView(this.__vertexBufferData));return this.__vertexBuffer},__hitTest:function(a,b,c,d,f,g){if(!g.get_visible()||this.__isMask||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b))return!1;this.__getRenderTransform();var k=this.__renderTransform,l=k.a*k.d-k.b*k.c;c=0==l?-k.tx:
1/l*(k.c*(k.ty-b)+k.d*(a-k.tx));k=this.__renderTransform;l=k.a*k.d-k.b*k.c;a=0==l?-k.ty:1/l*(k.a*(b-k.ty)+k.b*(k.tx-a));return 0<c&&0<a&&c<=this.__width&&a<=this.__height?(null==d||f||d.push(g),!0):!1},__hitTestMask:function(a,b){var c=Ya.__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;Ya.__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__:Rl,__properties__:x(da.prototype.__properties__,{get_videoWidth:"get_videoWidth",get_videoHeight:"get_videoHeight"})});var Qn=function(){};h["openfl.net.IDynamicPropertyOutput"]=Qn;Qn.__name__="openfl.net.IDynamicPropertyOutput";Qn.__isInterface__=!0;Qn.prototype={writeDynamicProperty:null,__class__:Qn};var Rn=function(){};h["openfl.net.IDynamicPropertyWriter"]=Rn;Rn.__name__="openfl.net.IDynamicPropertyWriter";Rn.__isInterface__=!0;Rn.prototype={writeDynamicProperties:null,__class__:Rn};
var zj=function(){Da.call(this)};h["openfl.net.NetConnection"]=zj;zj.__name__="openfl.net.NetConnection";zj.__super__=Da;zj.prototype=x(Da.prototype,{connect:function(a,b,c,d,f,g){if(null!=a)throw J.thrown('Error: Can only connect in "HTTP streaming" mode');this.dispatchEvent(new Ph("netStatus",!1,!0,{code:"NetConnection.Connect.Success"}))},__class__:zj});var Sl=function(a,b){Da.call(this);this.__connection=a;this.__soundTransform=new gf;this.__video=window.document.createElement("video");this.__video.setAttribute("playsinline",
"");this.__video.setAttribute("webkit-playsinline","");this.__video.setAttribute("crossorigin","anonymous");this.__video.addEventListener("error",q(this,this.video_onError),!1);this.__video.addEventListener("waiting",q(this,this.video_onWaiting),!1);this.__video.addEventListener("ended",q(this,this.video_onEnd),!1);this.__video.addEventListener("pause",q(this,this.video_onPause),!1);this.__video.addEventListener("seeking",q(this,this.video_onSeeking),!1);this.__video.addEventListener("playing",q(this,
this.video_onPlaying),!1);this.__video.addEventListener("timeupdate",q(this,this.video_onTimeUpdate),!1);this.__video.addEventListener("loadstart",q(this,this.video_onLoadStart),!1);this.__video.addEventListener("stalled",q(this,this.video_onStalled),!1);this.__video.addEventListener("durationchanged",q(this,this.video_onDurationChanged),!1);this.__video.addEventListener("canplay",q(this,this.video_onCanPlay),!1);this.__video.addEventListener("canplaythrough",q(this,this.video_onCanPlayThrough),!1);
this.__video.addEventListener("loadedmetadata",q(this,this.video_onLoadMetaData),!1)};h["openfl.net.NetStream"]=Sl;Sl.__name__="openfl.net.NetStream";Sl.__super__=Da;Sl.prototype=x(Da.prototype,{audioCodec:null,bufferLength:null,bufferTime:null,bytesLoaded:null,bytesTotal:null,checkPolicyFile:null,client:null,currentFPS:null,decodedFrames:null,liveDelay:null,objectEncoding:null,time:null,videoCode:null,__closed:null,__connection:null,__soundTransform:null,__timer: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,f,g){null!=this.__video&&(this.__video.volume=Ac.__soundTransform.volume*this.__soundTransform.volume,"string"==typeof a?this.__video.src=a:this.__video.srcObject=a,this.__video.play())},requestVideoStatus:function(){var a=this;null!=this.__video&&(null==this.__timer&&(this.__timer=
new Sc(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.__dispatchStatus("NetStream.SeekStart.Notify"),this.__video.currentTime=a)},togglePause:function(){null!=this.__video&&(this.__video.paused?this.__video.play():this.__video.pause())},__dispatchStatus:function(a){a=
new Ph("netStatus",!1,!1,{code:a});this.__connection.dispatchEvent(a);this.dispatchEvent(a)},__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){db.lastError=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.__dispatchStatus("NetStream.Play.Stop");this.__dispatchStatus("NetStream.Play.Complete");this.__playStatus("NetStream.Play.Complete")},video_onError:function(a){this.__dispatchStatus("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){db.lastError=c}},video_onLoadStart:function(a){this.__playStatus("NetStream.Play.loadstart")},video_onPause:function(a){this.__playStatus("NetStream.Play.pause")},video_onPlaying:function(a){this.__dispatchStatus("NetStream.Play.Start");this.__playStatus("NetStream.Play.playing")},video_onSeeking:function(a){this.__playStatus("NetStream.Play.seeking");this.__dispatchStatus("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_soundTransform:function(){return this.__soundTransform.clone()},set_soundTransform:function(a){null!=a&&(this.__soundTransform.pan=a.pan,this.__soundTransform.volume=a.volume,null!=this.__video&&(this.__video.volume=Ac.__soundTransform.volume*this.__soundTransform.volume));return a},get_speed:function(){return null!=
this.__video?this.__video.playbackRate:1},set_speed:function(a){return null!=this.__video?this.__video.playbackRate=a:a},__class__:Sl,__properties__:{set_speed:"set_speed",get_speed:"get_speed",set_soundTransform:"set_soundTransform",get_soundTransform:"get_soundTransform"}});var oj=function(a){Da.call(this);this.bytesTotal=this.bytesLoaded=0;this.dataFormat=1;null!=a&&this.load(a)};h["openfl.net.URLLoader"]=oj;oj.__name__="openfl.net.URLLoader";oj.__super__=Da;oj.prototype=x(Da.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,c=new fa("open");this.dispatchEvent(c);0==this.dataFormat?(c=new kl,this.__prepareRequest(c,a),c.load().onProgress(q(this,this.httpRequest_onProgress)).onError(q(this,this.httpRequest_onError)).onComplete(function(a){b.__dispatchResponseStatus();b.__dispatchStatus();b.data=a;a=new fa("complete");b.dispatchEvent(a)})):(c=new ni,this.__prepareRequest(c,
a),c.load().onProgress(q(this,this.httpRequest_onProgress)).onError(q(this,this.httpRequest_onError)).onComplete(function(a){b.__dispatchResponseStatus();b.__dispatchStatus();b.data=2==b.dataFormat?Mo._new(a):a;a=new fa("complete");b.dispatchEvent(a)}))},__dispatchResponseStatus:function(){var a=new ch("httpResponseStatus",!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 f=d[c];++c;b.push(new Sn(f.name,f.value))}a.responseHeaders=b;this.dispatchEvent(a)},__dispatchStatus:function(){var a=new ch("httpStatus",!1,!1,this.__httpRequest.responseStatus);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(w.typeof(b.data)==Tc.TObject){var c=la.fields(b.data);for(a=0;a<c.length;){var d=c[a];++a;this.__httpRequest.formData.h[d]=
la.field(b.data,d)}}else this.__httpRequest.data=b.data instanceof bb?b.data:bb.ofString(M.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 Xk(d.name,d.value));this.__httpRequest.followRedirects=b.followRedirects;this.__httpRequest.timeout=b.idleTimeout|0;this.__httpRequest.manageCookies=b.manageCookies;this.__httpRequest.withCredentials=b.withCredentials;this.__httpRequest.userAgent=
b.userAgent;this.__httpRequest.enableResponseHeaders=!0},httpRequest_onError:function(a){this.__dispatchResponseStatus();this.__dispatchStatus();this.__httpRequest instanceof ag?this.data=this.__httpRequest.responseData:this.__httpRequest instanceof ni&&(this.data=this.__httpRequest.responseData);var b=403==a?new Ci("securityError"):new Nf("ioError");b.text=M.string(a);this.dispatchEvent(b)},httpRequest_onProgress:function(a,b){var c=new Qe("progress");c.bytesLoaded=a;c.bytesTotal=b;this.dispatchEvent(c)},
__class__:oj});var qh=function(a){this.withCredentials=!1;null!=a&&(this.url=a);this.contentType=null;this.followRedirects=Bg.followRedirects;this.idleTimeout=0<Bg.idleTimeout?Bg.idleTimeout:3E4;this.manageCookies=Bg.manageCookies;this.method="GET";this.requestHeaders=[];this.userAgent=Bg.userAgent};h["openfl.net.URLRequest"]=qh;qh.__name__="openfl.net.URLRequest";qh.prototype={contentType:null,data:null,followRedirects:null,idleTimeout:null,manageCookies:null,withCredentials:null,method:null,requestHeaders:null,
url:null,userAgent:null,__class__:qh};var Bg=function(){};h["openfl.net.URLRequestDefaults"]=Bg;Bg.__name__="openfl.net.URLRequestDefaults";Bg.userAgent=null;var Sn=function(a,b){null==b&&(b="");null==a&&(a="");this.name=a;this.value=b};h["openfl.net.URLRequestHeader"]=Sn;Sn.__name__="openfl.net.URLRequestHeader";Sn.prototype={name:null,value:null,__class__:Sn};var Mo={_new:function(a){var b={};null!=a&&Mo.decode(b,a);return b},decode:function(a,b){for(var c=la.fields(a),d=0;d<c.length;){var f=c[d];
++d;la.deleteField(a,f)}c=b.split(";").join("&").split("&");for(d=0;d<c.length;)if(f=c[d],++d,b=f.indexOf("="),0<b){var g=y.substr(f,0,b);g=decodeURIComponent(g.split("+").join(" "));f=y.substr(f,b+1,null);a[g]=decodeURIComponent(f.split("+").join(" "))}else 0!=b&&(a[decodeURIComponent(f.split("+").join(" "))]="")},toString:function(a){for(var b=[],c=la.fields(a),d=0;d<c.length;){var f=c[d];++d;var g=la.field(a,f);if(-1<f.indexOf("[]")&&g instanceof Array){var k=[];for(g=P(g);g.hasNext();){var l=
g.next();k.push(encodeURIComponent(l))}k=k.join("&amp;"+f+"=");b.push(encodeURIComponent(f)+"="+k)}else f=encodeURIComponent(f)+"=",k=M.string(g),b.push(f+encodeURIComponent(k))}return b.join("&")},__get:function(a,b){return la.field(a,b)},__set:function(a,b,c){a[b]=c}},xc=function(){Da.call(this);xc.initialize();this.__interval=0;this.__muted=!1;this.setRequestedUpdateInterval(xc.defaultInterval)};h["openfl.sensors.Accelerometer"]=xc;xc.__name__="openfl.sensors.Accelerometer";xc.__properties__={get_isSupported:"get_isSupported"};
xc.initialize=function(){if(!xc.initialized){var a=De.getSensors(Wn.ACCELEROMETER);0<a.length&&(a[0].onUpdate.add(xc.accelerometer_onUpdate),xc.supported=!0);xc.initialized=!0}};xc.accelerometer_onUpdate=function(a,b,c){xc.currentX=a;xc.currentY=b;xc.currentZ=c};xc.get_isSupported=function(){xc.initialize();return xc.supported};xc.__super__=Da;xc.prototype=x(Da.prototype,{__interval:null,__muted:null,__timer:null,addEventListener:function(a,b,c,d,f){null==f&&(f=!1);null==d&&(d=0);null==c&&(c=!1);
Da.prototype.addEventListener.call(this,a,b,c,d,f);this.update()},setRequestedUpdateInterval:function(a){this.__interval=a;if(0>this.__interval)throw new Eg;0==this.__interval&&(this.__interval=xc.defaultInterval);null!=this.__timer&&(this.__timer.stop(),this.__timer=null);xc.supported&&!this.get_muted()&&(this.__timer=new Sc(this.__interval),this.__timer.run=q(this,this.update))},update:function(){var a=new Ai("update");a.timestamp=(new Date).getTime()/1E3;a.accelerationX=xc.currentX;a.accelerationY=
xc.currentY;a.accelerationZ=xc.currentZ;this.dispatchEvent(a)},get_muted:function(){return this.__muted},set_muted:function(a){this.__muted=a;this.setRequestedUpdateInterval(this.__interval);return a},__class__:xc,__properties__:{set_muted:"set_muted",get_muted:"get_muted"}});var ti=function(a){this.parentDomain=null!=a?a:ti.currentDomain};h["openfl.system.ApplicationDomain"]=ti;ti.__name__="openfl.system.ApplicationDomain";ti.prototype={parentDomain:null,getDefinition:function(a){return h[a]},hasDefinition:function(a){return null!=
h[a]},__class__:ti};var Ho=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"]=Ho;Ho.__name__="openfl.system.LoaderContext";Ho.prototype={allowCodeImport:null,allowLoadBytesCodeExecution:null,applicationDomain:null,checkPolicyFile:null,securityDomain:null,__class__:Ho};var Aj=function(){};h["openfl.system.SecurityDomain"]=Aj;Aj.__name__="openfl.system.SecurityDomain";
Aj.prototype={__class__:Aj};var Tl=function(){Da.call(this);this.clear()};h["openfl.text.StyleSheet"]=Tl;Tl.__name__="openfl.text.StyleSheet";Tl.__super__=Da;Tl.prototype=x(Da.prototype,{__styleNames:null,__styleNamesDirty:null,__styles:null,clear:function(){this.__styleNamesDirty=!1;this.__styleNames=null;this.__styles=new Ba},getStyle:function(a){a=a.toLowerCase();return Object.prototype.hasOwnProperty.call(this.__styles.h,a)?this.__styles.h[a]:null},parseCSS:function(a){var b=new Ba;b.h.silent=
!0;b=(new Tn(b)).parse(a);if(null!=b)for(a=b.h.rules,b=0;b<a.length;){var c=a[b];++b;var d=Object.prototype.hasOwnProperty.call(c.h,"selectors")?c.h.selectors:null;if(null!=d&&(d=d.toLowerCase(),Object.prototype.hasOwnProperty.call(this.__styles.h,d)||(this.__styles.h[d]={},this.__styleNamesDirty=!0),d=this.__styles.h[d],c=c.h.declarations,null!=c))for(var f=0;f<c.length;){var g=c[f];++f;var k=g.h.property;g=M.string(g.h.value);if(null!=k)if(null==k)d[k]=g;else switch(k){case "font-family":g=O.replace(g,
'"',"");k=d;null!=k&&la.setProperty(k,"fontFamily",g);break;case "font-size":k=d;null!=k&&la.setProperty(k,"fontSize",g);break;case "font-style":k=d;null!=k&&la.setProperty(k,"fontStyle",g);break;case "font-weight":k=d;null!=k&&la.setProperty(k,"fontWeight",g);break;case "letter-spacing":k=d;null!=k&&la.setProperty(k,"letterSpacing",g);break;case "margin-left":k=d;null!=k&&la.setProperty(k,"marginLeft",g);break;case "text-align":k=d;null!=k&&la.setProperty(k,"textAlign",g);break;case "text-decoration":k=
d;null!=k&&la.setProperty(k,"textDecoration",g);break;case "text-indent":k=d;null!=k&&la.setProperty(k,"textIndent",g);break;default:d[k]=g}}}},setStyle:function(a,b){a=a.toLowerCase();if(null==b)Object.prototype.hasOwnProperty.call(this.__styles.h,a)&&(b=this.__styles,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a]);else{for(var c={},d=0,f=la.fields(b);d<f.length;){var g=f[d];++d;c[g]=la.field(b,g)}this.__styles.h[a]=c}},transform:function(a){var b=new Id;this.__applyStyleObject(a,b);
return b},__applyStyle:function(a,b){a=a.toLowerCase();Object.prototype.hasOwnProperty.call(this.__styles.h,a)&&this.__applyStyleObject(this.__styles.h[a],b)},__applyStyleObject:function(a,b){if(null!=a){var c=new E("[0-9A-Fa-f]+",""),d=new E("[0-9]+","");var f=a;null!=f&&Object.prototype.hasOwnProperty.call(f,"color")?(f=Bd.__get(a,"color"),f=c.match(null==f?null:M.string(f))):f=!1;f&&(b.color=M.parseInt("0x"+c.matched(0)));f=a;null!=f&&Object.prototype.hasOwnProperty.call(f,"fontFamily")&&(f=Bd.__get(a,
"fontFamily"),b.font=this.__parseFont(null==f?null:M.string(f)));f=a;null!=f&&Object.prototype.hasOwnProperty.call(f,"fontSize")?(f=Bd.__get(a,"fontSize"),f=d.match(null==f?null:M.string(f))):f=!1;f&&(b.size=M.parseInt(d.matched(0)));f=a;if(null!=f&&Object.prototype.hasOwnProperty.call(f,"fontStyle"))switch(Bd.__get(a,"fontStyle")){case "italic":b.italic=!0;break;case "normal":b.italic=!1}f=a;if(null!=f&&Object.prototype.hasOwnProperty.call(f,"fontWeight"))switch(Bd.__get(a,"fontWeight")){case "bold":b.bold=
!0;break;case "normal":b.bold=!1}f=a;null!=f&&Object.prototype.hasOwnProperty.call(f,"leading")?(f=Bd.__get(a,"leading"),f=d.match(null==f?null:M.string(f))):f=!1;f&&(b.leading=M.parseInt(d.matched(0)));f=a;null!=f&&Object.prototype.hasOwnProperty.call(f,"letterSpacing")?(f=Bd.__get(a,"letterSpacing"),f=d.match(null==f?null:M.string(f))):f=!1;f&&(b.letterSpacing=parseFloat(d.matched(0)));f=a;null!=f&&Object.prototype.hasOwnProperty.call(f,"marginLeft")?(f=Bd.__get(a,"marginLeft"),f=d.match(null==
f?null:M.string(f))):f=!1;f&&(b.leftMargin=M.parseInt(d.matched(0)));f=a;null!=f&&Object.prototype.hasOwnProperty.call(f,"marginRight")?(f=Bd.__get(a,"marginRight"),f=d.match(null==f?null:M.string(f))):f=!1;f&&(b.rightMargin=M.parseInt(d.matched(0)));f=a;if(null!=f&&Object.prototype.hasOwnProperty.call(f,"textAlign"))switch(Bd.__get(a,"textAlign")){case "center":b.align=0;break;case "justify":b.align=2;break;case "left":b.align=3;break;case "right":b.align=4}f=a;if(null!=f&&Object.prototype.hasOwnProperty.call(f,
"textDecoration"))switch(Bd.__get(a,"textDecoration")){case "none":b.underline=!1;break;case "underline":b.underline=!0}f=a;null!=f&&Object.prototype.hasOwnProperty.call(f,"textIndent")?(f=Bd.__get(a,"textIndent"),f=d.match(null==f?null:M.string(f))):f=!1;f&&(b.blockIndent=M.parseInt(d.matched(0)))}},__parseFont:function(a){if(null==a)return null;-1<a.indexOf(",")&&(a=y.substr(a,0,a.indexOf(",")));switch(a){case "mono":return"_typewriter";case "sans-serif":return"_sans";case "serif":return"_serif";
default:return a}},get_styleNames:function(){if(null==this.__styleNames||this.__styleNamesDirty){this.__styleNames=[];for(var a=Object.keys(this.__styles.h),b=a.length,c=0;c<b;){var d=a[c++];this.__styleNames.push(d)}this.__styleNamesDirty=!1}return this.__styleNames},__class__:Tl,__properties__:{get_styleNames:"get_styleNames"}});var zd=function(){this.__renderedOnCanvasWhileOnDOM=this.__forceCachedBitmapUpdate=!1;this.__mouseScrollVCounter=0;this.condenseWhite=!1;Aa.call(this);this.__wordSelection=
!1;this.__drawableType=7;this.__selectionIndex=this.__caretIndex=-1;this.__displayAsPassword=!1;this.__graphics=new Vd(this);this.__textEngine=new Jb(this);this.__layoutDirty=!0;this.__offsetY=this.__offsetX=0;this.__mouseWheelEnabled=!0;this.__text="";null==zd.__defaultTextFormat&&(zd.__defaultTextFormat=new Id("Times New Roman",12,0,!1,!1,!1,"","",3,0,0,0,0),zd.__defaultTextFormat.blockIndent=0,zd.__defaultTextFormat.bullet=!1,zd.__defaultTextFormat.letterSpacing=0,zd.__defaultTextFormat.kerning=
!1);this.__textFormat=zd.__defaultTextFormat.clone();this.__textEngine.textFormatRanges.push(new je(this.__textFormat,0,0));this.addEventListener("mouseDown",q(this,this.this_onMouseDown));this.addEventListener("focusIn",q(this,this.this_onFocusIn));this.addEventListener("focusOut",q(this,this.this_onFocusOut));this.addEventListener("keyDown",q(this,this.this_onKeyDown));this.addEventListener("mouseWheel",q(this,this.this_onMouseWheel))};h["openfl.text.TextField"]=zd;zd.__name__="openfl.text.TextField";
zd.__defaultTextFormat=null;zd.__super__=Aa;zd.prototype=x(Aa.prototype,{condenseWhite:null,__wordSelection:null,__lineSelection:null,__specialSelectionInitialIndex:null,__bounds:null,__caretIndex:null,__cursorTimer:null,__dirty:null,__displayAsPassword:null,__domRender:null,__inputEnabled:null,__isHTML:null,__layoutDirty:null,__mouseScrollVCounter:null,__mouseWheelEnabled:null,__offsetX:null,__offsetY:null,__selectionIndex:null,__showCursor:null,__styleSheet:null,__text:null,__htmlText:null,__textEngine:null,
__textFormat:null,__div:null,__renderedOnCanvasWhileOnDOM: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.__selectionIndex=this.__caretIndex=this.__textEngine.textFormatRanges.get(this.__textEngine.textFormatRanges.get_length()-1).end=this.__text.length)},getCharBoundaries:function(a){if(0>a||a>this.__text.length-1)return null;
var b=new ea;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 f=c++;b+=this.__textEngine.lineHeights.get(f)}for(c=this.__textEngine.layoutGroups.iterator();c.hasNext();){var g=c.next();if(b>=g.offsetY&&b<=g.offsetY+g.height&&a>=g.offsetX&&a<=g.offsetX+g.width){c=b=0;for(d=g.positions.length;c<d;)if(f=c++,b+=g.positions[f],
a<=g.offsetX+b)return g.startIndex+f;return g.endIndex}}return-1},getFirstCharInParagraph:function(a){if(0>a||a>this.get_text().length)return-1;if(0==this.__textEngine.lineBreaks.get_length())return 0;for(var b=0,c=this.__textEngine.lineBreaks.get_length();b<c;){var d=b++;if(a<=this.__textEngine.lineBreaks.get(d))return 0==d?0:this.__textEngine.lineBreaks.get(d-1)+1}return this.__textEngine.lineBreaks.get(this.__textEngine.lineBreaks.get_length()-1)+1},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 f=d.next();if(f.lineIndex==a)-1==b&&(b=f.startIndex);else if(f.lineIndex==a+1){c=f.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),
f=this.__textEngine.lineHeights.get(a);a=this.__textEngine.lineWidths.get(a);switch(this.__textFormat.align){case 0:var g=(this.__textEngine.width-a)/2;break;case 1:case 4:g=this.__textEngine.width-a-2;break;case 2:case 3:case 5:g=2}return new Un(g,a,f,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 f=d.next();if(f.lineIndex==a)-1==b&&(b=f.startIndex);else if(f.lineIndex==a+1){c=f.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 gh("The supplied index is out of bounds");-1==a&&(a=0);-1==b&&(b=this.get_text().length);if(a>=b)return new Id;for(var d=this.__textEngine.textFormatRanges.iterator();d.hasNext();){var f=d.next();if(f.start<=a&&f.end>a||f.start<b&&f.end>=b)null==c?c=f.format.clone():(f.format.font!=c.font&&(c.font=null),f.format.size!=
c.size&&(c.size=null),f.format.color!=c.color&&(c.color=null),f.format.bold!=c.bold&&(c.bold=null),f.format.italic!=c.italic&&(c.italic=null),f.format.underline!=c.underline&&(c.underline=null),f.format.url!=c.url&&(c.url=null),f.format.target!=c.target&&(c.target=null),f.format.align!=c.align&&(c.align=null),f.format.leftMargin!=c.leftMargin&&(c.leftMargin=null),f.format.rightMargin!=c.rightMargin&&(c.rightMargin=null),f.format.indent!=c.indent&&(c.indent=null),f.format.leading!=c.leading&&(c.leading=
null),f.format.blockIndent!=c.blockIndent&&(c.blockIndent=null),f.format.bullet!=c.bullet&&(c.bullet=null),f.format.kerning!=c.kerning&&(c.kerning=null),f.format.letterSpacing!=c.letterSpacing&&(c.letterSpacing=null),f.format.tabStops!=c.tabStops&&(c.tabStops=null))}null==c&&(c=new Id);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.__updateScrollH();null!=this.stage&&this.stage.get_focus()==this&&(this.__stopCursorTimer(),this.__startCursorTimer())},setTextFormat:function(a,b,c){null==c&&(c=-1);null==b&&(b=-1);var d=this.get_text().length;-1==b?(-1==c&&(c=d),b=0):-1==c&&(c=b+1);if(b!=c){if(0>b||0>=c||c<b||b>=d||c>d)throw new gh;if(0==b&&c==d){this.__textEngine.textFormatRanges.set_length(1);var f=this.__textEngine.textFormatRanges.get(0);f.start=0;f.end=d;f.format.__merge(a)}else{d=0;for(var g;d<this.__textEngine.textFormatRanges.get_length();)if(f=
this.__textEngine.textFormatRanges.get(d),f.end<=b)++d;else if(f.start>=c)break;else if(f.start<=b&&f.end>=c)if(f.start==b&&f.end==c){f.format=f.format.clone();f.format.__merge(a);break}else if(f.start==b)g=new je(f.format.clone(),b,c),g.format.__merge(a),this.__textEngine.textFormatRanges.insertAt(d,g),f.start=c,d+=2;else{f.end==c?(g=new je(f.format.clone(),b,c),g.format.__merge(a),this.__textEngine.textFormatRanges.insertAt(d+1,g)):(g=new je(f.format.clone(),b,c),g.format.__merge(a),this.__textEngine.textFormatRanges.insertAt(d+
1,g),g=new je(f.format.clone(),c,f.end),this.__textEngine.textFormatRanges.insertAt(d+2,g));f.end=b;break}else if(f.start>=b&&f.end<=c)f.start==b?(f.format=f.format.clone(),f.format.__merge(a),f.end=c):this.__textEngine.textFormatRanges.removeAt(d);else if(f.start>b&&f.end>b){f.start=c;break}else f.start<b&&f.end<=c?(g=new je(f.format.clone(),b,c),g.format.__merge(a),this.__textEngine.textFormatRanges.insertAt(d+1,g),f.end=b,d+=2):(++d,Pa.warn("You found a bug in OpenFL's text code! Please save a copy of your project and create an issue on GitHub so we can fix this.",
{fileName:"openfl/text/TextField.hx",lineNumber:1610,className:"openfl.text.TextField",methodName:"setTextFormat"}))}this.__layoutDirty=this.__dirty=!0;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())}},__setStageReference:function(a){this.__stopTextInput();Aa.prototype.__setStageReference.call(this,a)},__allowMouseFocus:function(){return this.mouseEnabled},__caretBeginningOfLine:function(){this.__caretIndex=this.getLineOffset(this.getLineIndexOfChar(this.__caretIndex))},
__caretBeginningOfNextLine:function(){var a=this.getLineIndexOfChar(this.__caretIndex);this.__caretIndex=a<this.__textEngine.numLines-1?this.getLineOffset(a+1):this.__text.length},__caretBeginningOfPreviousLine:function(){var a=this.getLineIndexOfChar(this.__caretIndex);if(0<a){var b=this.getLineOffset(this.getLineIndexOfChar(this.__caretIndex));this.__caretIndex=this.__caretIndex==b?this.getLineOffset(a-1):b}},__caretEndOfLine:function(){var a=this.getLineIndexOfChar(this.__caretIndex);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(){var a=this.getLineIndexOfChar(this.__caretIndex);a<this.__textEngine.numLines-1&&(this.__caretIndex=this.__getCharIndexOnDifferentLine(this.get_caretIndex(),a+1))},__caretPreviousCharacter:function(){0<this.__caretIndex&&this.__caretIndex--},__caretPreviousLine:function(){var a=this.getLineIndexOfChar(this.__caretIndex);
0<a&&(this.__caretIndex=this.__getCharIndexOnDifferentLine(this.get_caretIndex(),a-1))},__disableInput:function(){this.__inputEnabled&&null!=this.stage&&(this.stage.window.__backend.setTextInputEnabled(!1),this.stage.window.onTextInput.remove(q(this,this.window_onTextInput)),this.stage.window.onKeyDown.remove(q(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&&(O.startsWith(b,"event:")?this.dispatchEvent(new fe("link",!0,!1,y.substr(b,6,null))):ha.getURL(new qh(b))))}return Aa.prototype.__dispatch.call(this,a)},__enableInput:function(){if(null!=this.stage){var a=this.getBounds(this.stage);a=new Uc(a.x,a.y,a.width,a.height);this.stage.window.setTextInputRect(a);this.stage.window.__backend.setTextInputEnabled(!0);this.__inputEnabled||(this.stage.window.__backend.setTextInputEnabled(!0),this.stage.window.onTextInput.has(q(this,
this.window_onTextInput))||(this.stage.window.onTextInput.add(q(this,this.window_onTextInput)),this.stage.window.onKeyDown.add(q(this,this.window_onKeyDown))),this.__inputEnabled=!0,this.__stopCursorTimer(),this.__startCursorTimer())}},__getAdvance:function(a){return a},__getBounds:function(a,b){this.__updateLayout();var c=ea.__pool.get();c.copyFrom(this.__textEngine.bounds);c.offset(this.__offsetX,this.__offsetY);c.__transform(c,b);a.__expand(c.x,c.y,c.width,c.height);ea.__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 f=d.offsetX,g=0,k=a-d.startIndex;g<k;){var l=g++;f+=d.positions[l]}b.setTo(f,d.offsetY,d.positions[a-d.startIndex],d.ascent+d.descent);return!0}catch(m){db.lastError=m}}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,f=this.__textEngine.layoutGroups.iterator();f.hasNext();){var g=f.next();if(a>=g.startIndex&&a<=g.endIndex){c=g.offsetX;for(var k=0,l=a-g.startIndex;k<l;){var h=k++;c+=g.positions[h]}if(null!=d)return this.__getPosition(c,d)}if(g.lineIndex==b){d=g.offsetY+g.height/2;g=0;for(k=this.get_scrollV()-1;g<k;)l=g++,d-=this.__textEngine.lineHeights.get(l);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,f=this.get_scrollV()-1;d<f;){var g=d++;b+=this.__textEngine.lineHeights.get(g)}!c&&b>this.__textEngine.textHeight&&(b=this.__textEngine.textHeight);var k=!0;d=0;for(f=this.__textEngine.layoutGroups.get_length();d<f;){g=d++;var l=this.__textEngine.layoutGroups.get(g);g=g<this.__textEngine.layoutGroups.get_length()-1?this.__textEngine.layoutGroups.get(g+
1):null;k&&(b<l.offsetY&&(b=l.offsetY),a<l.offsetX&&(a=l.offsetX),k=!1);if(b>=l.offsetY&&b<=l.offsetY+l.height||!c&&null==g)if(a>=l.offsetX&&a<=l.offsetX+l.width||!c&&(null==g||g.lineIndex!=l.lineIndex))return l}return null},__getPosition:function(a,b){b=this.__getGroup(a,b);if(null==b)return this.__text.length;for(var c=0,d=0,f=b.positions.length;d<f;){var g=d++;c+=b.positions[g];if(a<=b.offsetX+c){if(a<=b.offsetX+(c-b.positions[g])+b.positions[g]/2)return b.startIndex+g;if(b.startIndex+g<b.endIndex)return b.startIndex+
g+1;break}}return b.endIndex},__getPositionByIdentifier:function(a,b,c){a=this.__getPosition(a,b);c=c?"\n":" .,;:!?()[]{}<>/\\|-=+*&^%$#@~`'\"";b=this.__text.charAt(a);if(this.__specialSelectionInitialIndex<=a)for(;-1==c.indexOf(b)&&a<this.__text.length;)++a,b=this.__text.charAt(a);else{for(;-1==c.indexOf(b)&&0<a;)--a,b=this.__text.charAt(a);if(0==a)return a;++a}return a},__getOppositeIdentifierBound:function(a,b){b=b?"\n":" .,;:!?()[]{}<>/\\|-=+*&^%$#@~`'\"";var c=this.__text.charAt(a);if(a<=this.__caretIndex){for(;-1==
b.indexOf(c)&&0<a;)--a,c=this.__text.charAt(a);if(0==a)return a;++a}else for(;-1==b.indexOf(c)&&a<this.__text.length;)++a,c=this.__text.charAt(a);return a},__hitTest:function(a,b,c,d,f,g){if(!g.get_visible()||this.__isMask||f&&!this.mouseEnabled||null!=this.get_mask()&&!this.get_mask().__hitTestMask(a,b))return!1;this.__getRenderTransform();this.__updateLayout();c=this.__renderTransform;f=c.a*c.d-c.b*c.c;var k=0==f?-c.tx:1/f*(c.c*(c.ty-b)+c.d*(a-c.tx));c=this.__renderTransform;f=c.a*c.d-c.b*c.c;return this.__textEngine.bounds.contains(k,
0==f?-c.ty:1/f*(c.a*(b-c.ty)+c.b*(c.tx-a)))?(null!=d&&d.push(g),!0):!1},__hitTestMask:function(a,b){this.__getRenderTransform();this.__updateLayout();var c=this.__renderTransform,d=c.a*c.d-c.b*c.c,f=0==d?-c.tx:1/d*(c.c*(c.ty-b)+c.d*(a-c.tx));c=this.__renderTransform;d=c.a*c.d-c.b*c.c;return this.__textEngine.bounds.contains(f,0==d?-c.ty:1/d*(c.a*(b-c.ty)+c.b*(c.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 f=d;d=c;c=f}0>c&&(c=0);this.__replaceText(c,d,a,b)}}},__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=y.substr(c,0,d))));this.__updateText(this.__text.substring(0,a)+c+this.__text.substring(b));d=c.length-(b-a);for(var f=0,g;f<this.__textEngine.textFormatRanges.get_length();){g=this.__textEngine.textFormatRanges.get(f);if(a==b)g.start==g.end?0!=g.start?Pa.warn("You found a bug in OpenFL's text code! Please save a copy of your project and create an issue on GitHub so we can fix this.",{fileName:"openfl/text/TextField.hx",
lineNumber:2184,className:"openfl.text.TextField",methodName:"__replaceText"}):g.end+=d:g.end>=a&&(g.start>=a?(g.start+=d,g.end+=d):g.start<a&&g.end>=b&&(g.end+=d));else if(g.end>a)if(g.start>b)g.start+=d,g.end+=d;else if(g.start<=a&&g.end>b)g.end+=d;else if(g.start>=a&&g.end<=b){g=this.__textEngine.textFormatRanges;g.__tempIndex=f--;for(var k=0,l=[];k<l.length;){var h=l[k++];g.insertAt(g.__tempIndex,h);g.__tempIndex++}g.splice(g.__tempIndex,1)}else g.end>b&&g.start>a&&g.start<=b?(g.start=a,g.end+=
d):g.start<a&&g.end>a&&g.end<=b&&(g.end=a);++f}0==this.__textEngine.textFormatRanges.get_length()?this.__textEngine.textFormatRanges.push(new je(this.get_defaultTextFormat().clone(),0,c.length)):a==b&&0<this.__textEngine.textFormatRanges.get(0).start?this.__textEngine.textFormatRanges.unshift(new je(this.get_defaultTextFormat().clone(),0,this.__textEngine.textFormatRanges.get(0).start)):a!=b&&this.__textEngine.textFormatRanges.get(this.__textEngine.textFormatRanges.get_length()-1).end<this.__text.length&&
this.__textEngine.textFormatRanges.push(new je(this.get_defaultTextFormat().clone(),this.__textEngine.textFormatRanges.get(this.__textEngine.textFormatRanges.get_length()-1).end,this.__text.length));this.__selectionIndex=this.__caretIndex=a+c.length;this.__layoutDirty=this.__dirty=!0;this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())}},__startCursorTimer:function(){1==this.get_type()?(this.__inputEnabled&&(this.__cursorTimer=Sc.delay(q(this,this.__startCursorTimer),600),this.__showCursor=
!this.__showCursor),this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty())):this.get_selectable()&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()))},__startTextInput:function(){0>this.__caretIndex&&(this.__selectionIndex=this.__caretIndex=this.__text.length);(da.__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(){(da.__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;this.setSelection(this.__selectionIndex,this.__caretIndex)}},__updateMouseDrag:function(){if(null!=this.stage){var a=this.getBounds(this);this.get_mouseX()>a.width-1?this.set_scrollH(this.get_scrollH()+(Math.max(Math.min(.1*(this.get_mouseX()-a.width),10),1)|0)):1>this.get_mouseX()&&this.set_scrollH(this.get_scrollH()-(Math.max(Math.min(-.1*this.get_mouseX(),10),1)|0));this.__mouseScrollVCounter++;
this.__mouseScrollVCounter>this.stage.get_frameRate()/10&&(this.get_mouseY()>a.height-2?this.set_scrollV(Math.min(this.get_scrollV()+Math.max(Math.min(.03*(this.get_mouseY()-a.height),5),1),this.get_maxScrollV())|0):2>this.get_mouseY()&&this.set_scrollV(this.get_scrollV()-(Math.max(Math.min(-.03*this.get_mouseY(),5),1)|0)),this.__mouseScrollVCounter=0);this.stage_onMouseMove(null)}},__updateScrollH:function(){this.__updateLayout();var a=this.getBounds(this);if(this.get_textWidth()<=a.width-4)this.set_scrollH(0);
else{var b=this.get_scrollH();if(0==this.__caretIndex||this.getLineOffset(this.getLineIndexOfChar(this.__caretIndex))==this.__caretIndex)b=0;else{var c=ea.__pool.get(),d=!1;this.__caretIndex<this.__text.length&&(d=this.__getCharBoundaries(this.__caretIndex,c));d||(this.__getCharBoundaries(this.__caretIndex-1,c),c.x+=c.width);for(;c.x<b&&0<b;)b-=24;for(;c.x>b+a.width-4;)b+=24;ea.__pool.release(c)}0<b&&1!=this.get_type()&&(c=this.getLineLength(this.getLineIndexOfChar(this.__caretIndex)),this.get_scrollH()+
a.width-4>c&&this.set_scrollH(Math.ceil(c-a.width+4)));0>b?this.set_scrollH(0):b>this.get_maxScrollH()?this.set_scrollH(this.get_maxScrollH()):this.set_scrollH(b)}},__updateScrollV:function(){this.__updateLayout();if(this.get_textHeight()<=this.get_height()-4)this.set_scrollV(1);else{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()){var b=
0;for(a>=this.__textEngine.lineHeights.get_length()&&(a=this.__textEngine.lineHeights.get_length()-1);0<=a;){b+=this.__textEngine.lineHeights.get(a);if(b>this.get_height()-4){a+=0>b-this.get_height()?1:2;break}--a}this.set_scrollV(a)}else this.set_scrollV(this.get_scrollV())}},__updateText:function(a){da.__supportDOM&&this.__renderedOnCanvasWhileOnDOM&&(this.__forceCachedBitmapUpdate=this.__text!=a);this.__textEngine.set_text(a);this.__text=this.__textEngine.text;null!=this.stage&&this.stage.get_focus()==
this?(this.__text.length<this.__selectionIndex&&(this.__selectionIndex=this.__text.length),this.__text.length<this.__caretIndex&&(this.__caretIndex=this.__text.length)):this.__isHTML?this.__selectionIndex=this.__caretIndex=this.__text.length:this.__caretIndex=this.__selectionIndex=0;if(!this.__displayAsPassword||da.__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){Aa.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.__htmlText:this.__text},set_htmlText:function(a){if(null==a)throw a=
new eg("Error #2007: Parameter text must be non-null."),a.errorID=2007,a;this.__isHTML&&this.__text==a||(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));this.__isHTML=!0;this.condenseWhite&&(a=a.replace(/\s+/g," "));this.__htmlText=a;a=gb.parse(a,this.get_multiline(),this.__styleSheet,this.__textFormat,this.__textEngine.textFormatRanges);this.__updateText(a);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){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.__textEngine.scrollH=a,this.dispatchEvent(new fa("scroll")));return this.__textEngine.scrollH},get_scrollV:function(){return this.__textEngine.get_scrollV()},set_scrollV:function(a){this.__updateLayout();a>this.__textEngine.get_maxScrollV()&&(a=this.__textEngine.get_maxScrollV());
1>a&&(a=1);if(a!=this.__textEngine.get_scrollV()||0==this.__textEngine.get_scrollV())this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.__textEngine.set_scrollV(a),this.dispatchEvent(new fa("scroll"));return this.__textEngine.get_scrollV()},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_styleSheet:function(){return this.__styleSheet},
set_styleSheet:function(a){null!=this.__styleSheet&&null==a||null==a||(this.__isHTML&&a!=this.__styleSheet&&(this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()),this.set_htmlText(this.__htmlText)),this.set_type(0));return this.__styleSheet=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(null==a)throw a=new eg("Error #2007: Parameter text must be non-null."),
a.errorID=2007,a;if(null!=this.__styleSheet)return this.set_htmlText(a);if(this.__isHTML||this.__text!=a)this.__layoutDirty=this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty());else return a;if(1<this.__textEngine.textFormatRanges.get_length()){var b=this.__textEngine.textFormatRanges,c=this.__textEngine.textFormatRanges.get_length()-1;b.__tempIndex=1;for(var d=0,f=[];d<f.length;){var g=f[d++];b.insertAt(b.__tempIndex,g);b.__tempIndex++}b.splice(b.__tempIndex,
c)}b=this.__textEngine.textFormatRanges.get(0);b.format=this.__textFormat;b.start=0;b.end=a.length;this.__isHTML=!1;this.__updateText(a);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){null!=this.__styleSheet&&(a=0);a!=this.__textEngine.type&&(this.__textEngine.type=a,1==a?(this.addEventListener("addedToStage",q(this,this.this_onAddedToStage)),this.this_onFocusIn(null),this.__textEngine.__useIntAdvances=!0):(this.removeEventListener("addedToStage",q(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},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();this.__transform.tx=a-this.__offsetX;return a},get_y:function(){return this.__transform.ty+
this.__offsetY},set_y:function(a){a!=this.__transform.ty+this.__offsetY&&this.__setTransformDirty();this.__transform.ty=a-this.__offsetY;return a},stage_onMouseMove:function(a){if(null!=this.stage&&this.get_selectable()&&0<=this.__selectionIndex&&(this.__updateLayout(),a=this.__lineSelection?this.__getPositionByIdentifier(this.get_mouseX()+this.get_scrollH(),this.get_mouseY(),!0):this.__wordSelection?this.__getPositionByIdentifier(this.get_mouseX()+this.get_scrollH(),this.get_mouseY(),!1):this.__getPosition(this.get_mouseX()+
this.get_scrollH(),this.get_mouseY()),a!=this.__caretIndex)){this.__caretIndex=a;if(this.__wordSelection||this.__lineSelection)this.__selectionIndex=this.__getOppositeIdentifierBound(this.__specialSelectionInitialIndex,this.__lineSelection);a=!0;da.__supportDOM&&(this.__renderedOnCanvasWhileOnDOM&&(this.__forceCachedBitmapUpdate=!0),a=!1);a&&(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()))}},stage_onMouseUp:function(a){a=a.currentTarget;a.removeEventListener("enterFrame",
q(this,this.this_onEnterFrame));a.removeEventListener("mouseMove",q(this,this.stage_onMouseMove));a.removeEventListener("mouseUp",q(this,this.stage_onMouseUp));if(this.stage==a&&a.get_focus()==this){this.__getWorldTransform();this.__updateLayout();a=this.__lineSelection?this.__getPositionByIdentifier(this.get_mouseX()+this.get_scrollH(),this.get_mouseY(),!0):this.__wordSelection?this.__getPositionByIdentifier(this.get_mouseX()+this.get_scrollH(),this.get_mouseY(),!1):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.__wordSelection=this.__lineSelection=!1;this.__inputEnabled&&(this.this_onFocusIn(null),this.__stopCursorTimer(),this.__startCursorTimer(),da.__supportDOM&&this.__renderedOnCanvasWhileOnDOM&&(this.__forceCachedBitmapUpdate=!0))}},this_onAddedToStage:function(a){this.this_onFocusIn(null)},this_onEnterFrame:function(a){this.__updateMouseDrag()},
this_onFocusIn:function(a){1==this.get_type()&&null!=this.stage&&this.stage.get_focus()==this?this.__startTextInput():1!=this.get_type()&&this.get_selectable()&&null!=this.stage&&this.stage.get_focus()==this&&this.__startCursorTimer()},this_onFocusOut:function(a){this.__stopCursorTimer();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||this.get_displayAsPassword()||Qc.set_text(this.__text.substring(this.__caretIndex,this.__selectionIndex)))},this_onMouseDown:function(a){if(this.get_selectable()||1==this.get_type()){this.__lineSelection=3==a.clickCount;this.__wordSelection=2==a.clickCount;if(this.__lineSelection){var b=this.__caretIndex;this.__caretIndex=this.__getPositionByIdentifier(a.stageX+this.get_scrollH(),a.stageY,!0);
this.__selectionIndex=this.__getOppositeIdentifierBound(b,!0)}else this.__wordSelection?(b=this.__caretIndex,this.__caretIndex=this.__getPositionByIdentifier(a.stageX+this.get_scrollH(),a.stageY,!1),this.__selectionIndex=this.__getOppositeIdentifierBound(b,!1),this.__specialSelectionInitialIndex=b):this.__selectionIndex=this.__caretIndex=this.__getPosition(this.get_mouseX()+this.get_scrollH(),this.get_mouseY());this.setSelection(this.__caretIndex,this.__selectionIndex);this.__updateLayout();da.__supportDOM||
(this.__dirty=!0,this.__renderDirty||(this.__renderDirty=!0,this.__setParentRenderDirty()));null!=this.stage&&(this.stage.addEventListener("enterFrame",q(this,this.this_onEnterFrame)),this.stage.addEventListener("mouseMove",q(this,this.stage_onMouseMove)),this.stage.addEventListener("mouseUp",q(this,this.stage_onMouseUp)))}},this_onMouseWheel:function(a){this.get_mouseWheelEnabled()&&this.set_scrollV(Math.min(this.get_scrollV()-a.delta,this.get_maxScrollV())|0)},window_onKeyDown:function(a,b){switch(a){case 8:this.__selectionIndex==
this.__caretIndex&&0<this.__caretIndex&&(this.__selectionIndex=this.__caretIndex-1);this.__selectionIndex!=this.__caretIndex?(this.replaceSelectedText(""),this.__selectionIndex=this.__caretIndex,this.dispatchEvent(new fa("change",!0))):(this.__stopCursorTimer(),this.__startCursorTimer());break;case 97:this.get_selectable()&&(Ra.get_metaKey(b)||Ra.get_ctrlKey(b))&&this.setSelection(0,this.__text.length);break;case 99:if(Ra.get_metaKey(b)||Ra.get_ctrlKey(b))this.__caretIndex==this.__selectionIndex||
this.get_displayAsPassword()||Qc.set_text(this.__text.substring(this.__caretIndex,this.__selectionIndex));break;case 120:!Ra.get_metaKey(b)&&!Ra.get_ctrlKey(b)||this.__caretIndex==this.__selectionIndex||this.get_displayAsPassword()||(Qc.set_text(this.__text.substring(this.__caretIndex,this.__selectionIndex)),this.replaceSelectedText(""),this.dispatchEvent(new fa("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 fa("change",!0))):(this.__stopCursorTimer(),this.__startCursorTimer());break;case 1073741898:this.get_selectable()&&(Ra.get_metaKey(b)||Ra.get_ctrlKey(b)?this.__caretIndex=0:this.__caretBeginningOfLine(),Ra.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 1073741901:this.get_selectable()&&
(Ra.get_metaKey(b)||Ra.get_ctrlKey(b)?this.__caretIndex=this.__text.length:this.__caretEndOfLine(),Ra.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 1073741903:this.get_selectable()&&(Ra.get_metaKey(b)||Ra.get_ctrlKey(b)?this.__caretBeginningOfNextLine():this.__caretNextCharacter(),Ra.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 1073741904:this.get_selectable()&&
(Ra.get_metaKey(b)||Ra.get_ctrlKey(b)?this.__caretBeginningOfPreviousLine():this.__caretPreviousCharacter(),Ra.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 1073741905:this.get_selectable()&&(Ra.get_metaKey(b)||Ra.get_ctrlKey(b)?this.__caretIndex=this.__text.length:this.__caretNextLine(),Ra.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;
case 1073741906:this.get_selectable()&&(Ra.get_metaKey(b)||Ra.get_ctrlKey(b)?this.__caretIndex=0:this.__caretPreviousLine(),Ra.get_shiftKey(b)||(this.__selectionIndex=this.__caretIndex),this.setSelection(this.__selectionIndex,this.__caretIndex));break;case 13:case 1073741912:this.__textEngine.multiline?(a=new fe("textInput",!0,!0,"\n"),this.dispatchEvent(a),a.isDefaultPrevented()||(this.__replaceSelectedText("\n",!0),this.dispatchEvent(new fa("change",!0)))):(this.__stopCursorTimer(),this.__startCursorTimer())}},
window_onTextInput:function(a){this.__replaceSelectedText(a,!0);this.dispatchEvent(new fa("change",!0))},__class__:zd,__properties__:x(Aa.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_styleSheet:"set_styleSheet",get_styleSheet:"get_styleSheet",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 Id=function(a,b,c,d,f,g,k,l,
h,r,w,p,u){this.font=a;this.size=b;this.color=c;this.bold=d;this.italic=f;this.underline=g;this.url=k;this.target=l;this.align=h;this.leftMargin=r;this.rightMargin=w;this.indent=p;this.leading=u};h["openfl.text.TextFormat"]=Id;Id.__name__="openfl.text.TextFormat";Id.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,__cacheKey:null,clone:function(){var a=new Id(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;a.__cacheKey=this.__toCacheKey();
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);this.__toCacheKey()},__toCacheKey:function(){return this.__cacheKey=""+this.font+this.size+M.string(this.bold)+M.string(this.italic)},
__class__:Id};var Bj={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}},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}}},Un=function(a,b,c,d,f,g){this.x=a;this.width=b;this.height=c;this.ascent=d;this.descent=f;this.leading=g};h["openfl.text.TextLineMetrics"]=
Un;Un.__name__="openfl.text.TextLineMetrics";Un.prototype={ascent:null,descent:null,height:null,leading:null,width:null,x:null,__class__:Un};var Tn=function(a){this.importRegex=new E("@import .*?;","ig");this.commentRegex="(\\/\\*[\\s\\S]*?\\*\\/)";this.combinedCSSRegex="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)*?})";this.keyframeRegex="((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})";this.mediaQueryRegex="((@media [\\s\\S]*?){([\\s\\S]*?}\\s*?)})";
this.cssRegex=new E("([\\s\\S]*?){([\\s\\S]*?)*}","ig");this.keyframeStatements=[];this.importStatements=[]};h["openfl.text._internal.CSSParser"]=Tn;Tn.__name__="openfl.text._internal.CSSParser";Tn.prototype={source:null,options:null,importStatements:null,keyframeStatements:null,cssRegex:null,mediaQueryRegex:null,keyframeRegex:null,combinedCSSRegex:null,commentRegex:null,importRegex:null,stripComments:function(a){return a.replace(new RegExp(this.commentRegex,"ig"),"")},parseRules:function(a){for(var b=
new E("(\\*?[-#/\\*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)+((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^\\)]*?\\)|[^};])+)","g"),c=this.getMatches(b,a),d=[],f=0,g=c.length;f<g;){a=f++;if(!b.match(c[a]))return null;var k=a=b.matched(0).split("\r\n").join("\n");k=O.trim(k);if(-1!=k.indexOf(":")){if(a=O.trim(k.split(":")[0]),k=O.trim(k.split(":")[1]),!(1>a.length||1>k.length)){var l=new Ba;l.h.type="declaration";l.h.property=a;l.h.value=k;d.push(l)}}else"base64,"==y.substr(O.trim(k),0,7)?(a=k+O.trim(k),d[d.length-
1].h.value=a):0<k.length&&(a=new Ba,a.h.type="declaration",a.h.property="",a.h.value=k,a.h.defective=!0,d.push(a))}return d},findCorrespondingRule:function(a,b,c){for(var d=null,f=0,g=a.length;f<g;){var k=f++;if(a[k].h.directive==b&&(d=a[k],c==a[k].h.value))break}return d},findBySelector:function(a,b,c){null==c&&(c=!1);for(var d=[],f=0,g=a.length;f<g;){var k=f++;0==c?a[k].h.selector==b&&d.push(a[k]):-1!=na.__cast(a[k].h.selector,String).indexOf(b)&&d.push(a[k])}if("@imports"==b||2>d.length)return d;
a=d[0];f=0;for(g=d.length;f<g;)k=f++,this.intelligentCSSPush([a],d[k]);return[a]},deleteBySelector:function(a,b){for(var c=[],d=0,f=a.length;d<f;){var g=d++;a[g].h.selector!=b&&c.push(a[g])}return c},compress:function(a){for(var b=[],c=Object.create(null),d=0,f=a.length;d<f;){var g=d++;g=a[g];1!=c[g.h.selector]&&(g=this.findBySelector(a,g.h.selector),0!=g.length&&(b=b.concat(g),c.selector=!0))}return b},diff:function(a,b){if(a.h.selector==b.h.selector||"media"==a.h.type||"media"==b.h.type)return null;
var c=new Ba;c.h.selector=a.h.selector;c.h.rules=[];var d=c;new Ba;new Ba;var f=na.__cast(a.h.rules,Array).length;var g=na.__cast(b.h.rules,Array).length;c=0;for(var k=f;c<k;){c++;f=na.__cast(a.h.rules,Array)[1];var l=this.findCorrespondingRule(b.h.rules,a.h.directive,a.h.value);null==l?na.__cast(d.h.rules,Array).push(f):f.h.value!=l.h.value&&na.__cast(d.h.rules,Array).push(f)}c=0;for(k=g;c<k;)c++,l=na.__cast(a.h.rules,Array)[1],f=this.findCorrespondingRule(a.h.rules,b.h.directive),null==f&&(l.h.type=
"DELETED",na.__cast(d.h.rules,Array).push(l));return 0==na.__cast(d.h.rules,Array).length?null:d},intelligentMerge:function(a,b,c){null==c&&(c=!1);for(var d=0,f=b.length;d<f;){var g=d++;this.intelligentCSSPush(a,b[g],c)}d=0;for(f=a.length;d<f;)g=d++,b=a[g],"media"!=b.h.type&&"keyframes"!=b.h.type&&(c=this.compactRules(b.h.rules),b.h.rules=c)},intelligentCSSPush:function(a,b,c){null==c&&(c=!1);var d=null;if(0==c){c=0;for(var f=a.length;c<f;){var g=c++;if(a[g].h.selector==b.h.selector){d=a[g];break}}}else for(c=
a.length-1;-1<c;){if(a[c].h.selector==b.h.selector){d=a[c];break}--c}if(null==d)a.push(b);else if("media"!=b.h.type)for(a=b.h.rules,c=0,f=a.length;c<f;)g=c++,b=a[g],g=this.findCorrespondingRule(d.h.rules,b.h.directive),null==g?d.h.rules.push(b):"DELETED"==b.h.type?g.h.type="DELETED":g.h.value=b.h.value;else c=na.__cast(d.h.subStyles,Array).concat(b.h.subStyles),d.h.value=c},compactRules:function(a){for(var b=[],c=0,d=a.length;c<d;){var f=c++;"DELETED"!=a[f].h.type&&b.push(a[f])}return b},getImports:function(a){for(var b=
[],c=0,d=a.length;c<d;){var f=c++;"imports"==a[f].h.type&&b.push(a[f].h.styles)}return b},parse:function(a){if(null==a)return null;var b=/^\s+|\s+$/g;a=a.replace(b,"");for(var c=[],d=this.importRegex.match(a);d;){var f=this.importRegex.matched(0);if(null!=f){this.importStatements.push(f);var g=new Ba;g.h.selector="@imports";g.h.type="imports";g.h.styles=f;c.push(g)}else break}a=a.replace(this.importRegex.r,"");for(f=new E(this.keyframeRegex,"gi");f.match(a);){d=this.getMatches(f,a);if(null==d)break;
g=new Ba;g.h.selectors="@keyframes";g.h.type="keyframes";var k=f.matchedRight();g.h.styles=k;c.push(g)}a=a.replace(f.r,"");for(g=new E(this.combinedCSSRegex,"gi");g.match(a);){d=this.getMatches(g,a);if(null==d)break;a="";g=0;for(f=d.length;g<f;){var l=g++;k=new E("^([^{]+)","");if(k.match(d[l]))null!=k.matched(0)&&(a=O.trim(k.matched(0).split("\r\n").join("\n"))),b=new E(this.commentRegex,"gi"),l=this.getMatches(b,a),null!=l&&(a=O.trim(a.replace(b.r,""))),b=/\n+/,a=a.replace(b,"\n"),-1!=a.indexOf("@media")?
(b=new Ba,b.h.selectors=a,b.h.type="media",k=this.parse(k.matchedRight()+"\n}"),b.h.subStyles=k,k=b,null!=l&&(k.h.comments=l[0]),c.push(k)):null!=k.matchedRight()&&(k=this.parseRules(k.matchedRight()),b=new Ba,b.h.selectors=a,b.h.type="rule",b.h.declarations=k,k=b,"@font-face"==a&&(k.h.type="font-face"),null!=l&&(k.h.comments=l[0]),c.push(k));else break}break}g=new Ba;g.h.type="stylesheet";g.h.rules=c;g.h.parsingErrors=[];return g},getMatches:function(a,b,c){null==c&&(c=0);for(var d=[];a.match(b);)b=
O.trim(a.matched(c)),d.push(b),b=O.trim(a.matchedRight());return 0==d.length?null:d},__class__:Tn};var Cj=function(a,b){this.__collisions=[];this.__wordMap=new hc;this.set(a,b)};h["openfl.text._internal.CacheMeasurement"]=Cj;Cj.__name__="openfl.text._internal.CacheMeasurement";Cj.prototype={__collisions:null,__wordMap:null,hash:null,set:function(a,b){this.__addCollision(a,b)},get:function(a){return 1<this.__collisions.length?this.__wordMap.h[this.__collisions.indexOf(a)]:this.__wordMap.h[0]},__addCollision:function(a,
b){if(!this.exists(a)){var c=this.__wordMap;a=this.__collisions.push(a)-1;c.h[a]=b}},exists:function(a){return 0==this.__collisions.length?!1:-1<this.__collisions.indexOf(a)},__class__:Cj};var Vn=function(a,b,c){this.glyph=a;this.advance=b;this.offset=null!=c?c:new yd};h["openfl.text._internal.GlyphPosition"]=Vn;Vn.__name__="openfl.text._internal.GlyphPosition";Vn.prototype={advance:null,glyph:null,offset:null,__class__:Vn};var gb=function(){};h["openfl.text._internal.HTMLParser"]=gb;gb.__name__=
"openfl.text._internal.HTMLParser";gb.parse=function(a,b,c,d,f){a=b?a.replace(gb.__regexBreakTag.r,"\n"):a.replace(gb.__regexBreakTag.r,"");a=a.replace(gb.__regexEntityNbsp.r," ");a=gb.__regexCharEntity.map(a,function(a){var b=a.matched(1),c=a.matched(2);return null!=b&&(b=M.parseInt(b),null!=b)?String.fromCodePoint(b):null!=c&&(c=M.parseInt("0"+c),null!=c)?String.fromCodePoint(c):a.matched(0)});var g=a.split("<");if(1==g.length){a=gb.__htmlUnescape(a.replace(gb.__regexHTMLTag.r,""));if(1<f.get_length()){var k=
f.get_length()-1;f.__tempIndex=1;for(var l=0,h=[];l<h.length;){var r=h[l++];f.insertAt(f.__tempIndex,r);f.__tempIndex++}f.splice(f.__tempIndex,k)}b=f.get(0);b.format=d;b.start=0;b.end=a.length}else{k=f.get_length();l=f.__tempIndex=0;for(h=[];l<h.length;)r=h[l++],f.insertAt(f.__tempIndex,r),f.__tempIndex++;f.splice(f.__tempIndex,k);a="";k=[d.clone()];l=[];r=!1;for(h=0;h<g.length;){var w=g[h];++h;if(""!=w){var p="/"==y.substr(w,0,1),u=w.indexOf(">"),n=u+1,t=w.indexOf(" ");t=w.substring(p?1:0,-1<t&&
t<u?t:u).toLowerCase();if(p)0!=l.length&&t==l[l.length-1]&&(l.pop(),k.pop(),p=k[k.length-1].clone(),("p"==t||"li"==t)&&0<f.get_length()&&(b&&(a+="\n"),r=!0),n<w.length&&(r=gb.__htmlUnescape(y.substr(w,n,null)),f.push(new je(p,a.length,a.length+r.length)),a+=r,r=!1));else if(p=k[k.length-1].clone(),-1<u){null!=c&&(c.__applyStyle(t,p),gb.__regexClass.match(w)&&(c.__applyStyle("."+gb.__getAttributeMatch(gb.__regexClass),p),c.__applyStyle(t+"."+gb.__getAttributeMatch(gb.__regexClass),p)));switch(t){case "a":null!=
c&&c.__applyStyle("a:link",p);gb.__regexHref.match(w)&&(p.url=gb.__getAttributeMatch(gb.__regexHref));break;case "b":p.bold=!0;break;case "em":case "i":p.italic=!0;break;case "font":gb.__regexFace.match(w)&&(p.font=gb.__getAttributeMatch(gb.__regexFace));gb.__regexColor.match(w)&&(p.color=M.parseInt("0x"+gb.__getAttributeMatch(gb.__regexColor)));if(gb.__regexSize.match(w)){u=gb.__getAttributeMatch(gb.__regexSize);var A=y.cca(u,0);p.size=43==A||45==A?(2<=k.length?k[k.length-2]:d).size+M.parseInt(u):
M.parseInt(u)}break;case "li":0<f.get_length()&&!r&&(a+="\n");u=p.clone();u.underline=!1;f.push(new je(u,a.length,a.length+2));a+="\u2022 ";break;case "p":0<f.get_length()&&!r&&(a+="\n");gb.__regexAlign.match(w)&&(u=gb.__getAttributeMatch(gb.__regexAlign).toLowerCase(),p.align=Bj.fromString(u));break;case "textformat":gb.__regexBlockIndent.match(w)&&(p.blockIndent=M.parseInt(gb.__getAttributeMatch(gb.__regexBlockIndent)));gb.__regexIndent.match(w)&&(p.indent=M.parseInt(gb.__getAttributeMatch(gb.__regexIndent)));
gb.__regexLeading.match(w)&&(p.leading=M.parseInt(gb.__getAttributeMatch(gb.__regexLeading)));gb.__regexLeftMargin.match(w)&&(p.leftMargin=M.parseInt(gb.__getAttributeMatch(gb.__regexLeftMargin)));gb.__regexRightMargin.match(w)&&(p.rightMargin=M.parseInt(gb.__getAttributeMatch(gb.__regexRightMargin)));if(gb.__regexTabStops.match(w)){u=gb.__getAttributeMatch(gb.__regexTabStops).split(" ");A=[];for(var q=0;q<u.length;){var E=u[q];++q;A.push(M.parseInt(E))}p.tabStops=A}break;case "u":p.underline=!0}k.push(p);
l.push(t);n<w.length&&(r=gb.__htmlUnescape(w.substring(n)),f.push(new je(p,a.length,a.length+r.length)),a+=r,r=!1)}else r=gb.__htmlUnescape(w),f.push(new je(p,a.length,a.length+r.length)),a+=r,r=!1}}0==f.get_length()&&f.push(new je(k[0],0,0))}return a};gb.__getAttributeMatch=function(a){return null!=a.matched(2)?a.matched(2):a.matched(3)};gb.__htmlUnescape=function(a){a=a.replace(gb.__regexEntityApos.r,"'");return O.htmlUnescape(a)};var Ei=function(){this.__shortWordMap=new Ba;this.__longWordMap=
new Ba};h["openfl.text._internal.ShapeCache"]=Ei;Ei.__name__="openfl.text._internal.ShapeCache";Ei.hashFunction=function(a){for(var b=0,c,d=0,f=a.length;d<f;)c=d++,c=y.cca(a,c),b=(b<<5)-b+c,b|=0;return b};Ei.prototype={__shortWordMap:null,__longWordMap:null,cache:function(a,b,c){a=a.format.__cacheKey;return 15<c.length?this.__cacheLongWord(c,a,b):this.__cacheShortWord(c,a,b)},__cacheShortWord:function(a,b,c){if(Object.prototype.hasOwnProperty.call(this.__shortWordMap.h,b)){var d=this.__shortWordMap.h[b];
if(Object.prototype.hasOwnProperty.call(d.h,a))return d.h[a];var f=c();d.h[a]=f}else d=new Ba,f=c(),d.h[a]=f,this.__shortWordMap.h[b]=d;return c()},__cacheLongWord:function(a,b,c){var d=Ei.hashFunction(a);if(Object.prototype.hasOwnProperty.call(this.__longWordMap.h,b)){var f=this.__longWordMap.h[b];if(f.h.hasOwnProperty(d)){var g=f.h[d];if(g.exists(a))return g.get(a);g.set(a,c())}else g=new Cj(a,c()),f.h[d]=g}else f=new hc,g=new Cj(a,c()),g.hash=d,f.h[d]=g,this.__longWordMap.h[b]=f;return c()},__class__:Ei};
var Jb=function(a){this.__shapeCache=new Ei;this.textField=a;this.height=this.width=100;this.set_text("");this.bounds=new ea(0,0,0,0);this.textBounds=new ea(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=ia.toFloatVector(null);this.lineBreaks=
ia.toIntVector(null);this.lineDescents=ia.toFloatVector(null);this.lineLeadings=ia.toFloatVector(null);this.lineHeights=ia.toFloatVector(null);this.lineWidths=ia.toFloatVector(null);this.layoutGroups=ia.toObjectVector(null);this.textFormatRanges=ia.toObjectVector(null);null==Jb.__context&&(Jb.__context=window.document.createElement("canvas").getContext("2d"))};h["openfl.text._internal.TextEngine"]=Jb;Jb.__name__="openfl.text._internal.TextEngine";Jb.__defaultFonts=null;Jb.__context=null;Jb.__div=
null;Jb.findFont=function(a){return Xb.__fontByName.h[a]};Jb.findFontVariant=function(a){var b=a.font,c=a.bold;a=a.italic;null==b&&(b="_serif");var d=O.replace(O.replace(b," Normal","")," Regular","");return c&&a&&Object.prototype.hasOwnProperty.call(Xb.__fontByName.h,d+" Bold Italic")?Jb.findFont(d+" Bold Italic"):c&&Object.prototype.hasOwnProperty.call(Xb.__fontByName.h,d+" Bold")?Jb.findFont(d+" Bold"):a&&Object.prototype.hasOwnProperty.call(Xb.__fontByName.h,d+" Italic")?Jb.findFont(d+" Italic"):
Jb.findFont(b)};Jb.getDefaultFont=function(a,b,c){null==Jb.__defaultFonts&&(Jb.__defaultFonts=new Ba);a=Jb.__defaultFonts.h[a];return null==a?null:b&&c&&null!=a.boldItalic?a.boldItalic:c&&null!=a.italic?a.italic:b&&null!=a.bold?a.bold:a.normal};Jb.getFormatHeight=function(a){var b=Jb.getFont(a);Jb.__context.font=b;b=Jb.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};Jb.getFont=function(a){var b=a.font,c=a.bold,d=a.italic;null==b&&(b="_serif");var f=O.replace(O.replace(b," Normal","")," Regular","");c&&d&&Object.prototype.hasOwnProperty.call(Xb.__fontByName.h,f+" Bold Italic")?(b=f+" Bold Italic",d=c=!1):c&&Object.prototype.hasOwnProperty.call(Xb.__fontByName.h,f+" Bold")?(b=f+" Bold",c=!1):d&&Object.prototype.hasOwnProperty.call(Xb.__fontByName.h,f+" Italic")?(b=f+" Italic",d=!1):(c&&(-1<b.indexOf(" Bold ")||
O.endsWith(b," Bold"))&&(c=!1),d&&(-1<b.indexOf(" Italic ")||O.endsWith(b," Italic"))&&(d=!1));c=(d?"italic ":"normal ")+"normal "+(c?"bold ":"normal ");c+=a.size+"px";c+="/"+(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};Jb.getFontInstance=function(a){return Jb.findFontVariant(a)};Jb.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,__shapeCache:null,__showCursor:null,__textFormat:null,__textLayout:null,__texture:null,__useIntAdvances:null,__cairoFont:null,__font:null,createRestrictRegexp:function(a){var b="",c=!1;a=(new E("\\^([^\\^]+)","gu")).map(a,function(a){if(c)return c=!c,a.matched(1);b+=a.matched(1);c=!c;return""});var d=[];0<a.length&&d.push("[^"+a+"]");
0<b.length&&d.push("["+b+"]");return new E("("+d.join("|")+")","g")},getBounds:function(){var a=this.border?1:0;this.bounds.width=this.width+a;this.bounds.height=this.height+a;a=this.width;for(var b=this.height,c=this.layoutGroups.get_length()-1,d=0,f=this.layoutGroups.get_length();d<f;){var g=d++,k=this.layoutGroups.get(g);if(g!=c||k.startIndex!=k.endIndex||1==this.type)k.offsetX<a&&(a=k.offsetX),k.offsetY<b&&(b=k.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),Math.min(1.185*this.textHeight+4,this.bounds.height))},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))},getLineBreaks:function(){this.lineBreaks.set_length(0);for(var a=-1,b;a<this.text.length;)if(b=this.text.indexOf("\n",a+1),a=this.text.indexOf("\r",a+1),a=-1==a?b:-1==b?a:a<b?a:b,-1<a)this.lineBreaks.push(a);
else break},getLineBreakIndex:function(a){null==a&&(a=0);for(var b=this.lineBreaks.iterator();b.hasNext();){var c=b.next();if(c>=a)return c}return-1},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,f=0;this.textHeight=this.textWidth=0;this.numLines=1;this.maxScrollH=0;for(var g=this.layoutGroups.get_length()-1,k=0,l=this.layoutGroups.get_length();k<
l;){var h=k++;var r=this.layoutGroups.get(h);if(h!=g||r.startIndex!=r.endIndex||1==this.type){for(;r.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(f),b=a=0,c=null,f=d=0,this.numLines++;a=Math.max(a,r.ascent);b=Math.max(b,r.descent);c=null==c?r.leading:Math.max(c,r.leading)|0;d=Math.max(d,r.height);f=r.offsetX-2+r.width;f>this.textWidth&&(this.textWidth=f);h=Math.ceil(r.offsetY-2+r.ascent+
r.descent);h>this.textHeight&&(this.textHeight=h)}}0==this.textHeight&&null!=this.textField&&1==this.type&&(a=this.textField.__textFormat,b=Jb.getFontInstance(a),null!=a.__ascent?(g=a.size*a.__ascent,k=a.size*a.__descent):null!=b&&0!=b.unitsPerEM?(g=b.ascender/b.unitsPerEM*a.size,k=Math.abs(b.descender/b.unitsPerEM*a.size)):(g=a.size,k=.185*a.size),c=a.leading,a=g,b=k,this.textHeight=h=Math.ceil(g+k));this.lineAscents.push(a);this.lineDescents.push(b);this.lineLeadings.push(null!=c?c:0);this.lineHeights.push(d);
this.lineWidths.push(f);1==this.numLines&&0<c&&(this.textHeight+=c);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,
f=zd.__defaultTextFormat.clone(),g=0,k=0,l=0,h=0,r=3,w=0,p=0,u=0,n=0,t=!0,A=null,q=null,L=0,v=0,x=0,C=-2,G=-1,Y=this.text.indexOf(" "),H=0,D=H<this.lineBreaks.get_length()?this.lineBreaks.get(H):-1,J=0,K=0,qa=0,va=0,X=function(b,d,g){var k=function(){var c=[];if(null==a.__useIntAdvances){var f=new E("Trident/7.0","");a.__useIntAdvances=f.match(B.navigator.userAgent)}if(a.__useIntAdvances){var k=0;f=d;for(var l=g;f<l;){var h=f++;h=a.measureText(b.substring(d,h+1));c.push(h-k);k=h}}else for(f=d,l=g;f<
l;)h=f++,h<b.length-1?(k=a.measureText(b.charAt(h+1)),k=a.measureText(y.substr(b,h,2))-k):k=Jb.__context.measureText(b.charAt(h)).width,c.push(k);return c};return 2==f.align?k():a.__shapeCache.cache(c,k,b.substring(d,g))},N=function(a){for(var b=0,c=0;c<a.length;){var d=a[c];++c;b+=d}return b},M=function(){return 2+u+w+(t?p:0)},nb=function(){return a.width-2-n-M()},ta=function(b,d){null==A||A.startIndex!=A.endIndex?(A=new Ul(c.format,b,d),a.layoutGroups.push(A)):(A.format=c.format,A.startIndex=b,
A.endIndex=d)},O=function(){null!=f.__ascent?(k=f.size*f.__ascent,h=f.size*f.__descent):null!=d&&0!=d.unitsPerEM?(k=d.ascender/d.unitsPerEM*f.size,h=Math.abs(d.descender/d.unitsPerEM*f.size)):(k=f.size,h=.185*f.size);g=f.leading;v=Math.ceil(k+h+g);v>x&&(x=v);k>l&&(l=k)},Bb=function(){t=!0;r=null!=f.align?f.align:3;w=null!=f.blockIndent?f.blockIndent:0;p=null!=f.indent?f.indent:0;u=null!=f.leftMargin?f.leftMargin:0;n=null!=f.rightMargin?f.rightMargin:0},P=function(){if(b<a.textFormatRanges.get_length()-
1){b+=1;c=a.textFormatRanges.get(b);f.__merge(c.format);var g=Jb.getFont(f);Jb.__context.font=g;d=Jb.getFontInstance(f);return!0}return!1},F=function(d,f){if(d>=f)q=[],L=0;else if(f<=c.end)q=X(a.text,d,f),L=N(q);else{var g=d;d=c.end;var k=0;q=[];for(L=0;;)if(g!=d&&(g=X(a.text,g,d),q=q.concat(g)),d!=f){if(!P()){Pa.warn("You found a bug in OpenFL's text code! Please save a copy of your project and create an issue on GitHub so we can fix this.",{fileName:"openfl/text/_internal/TextEngine.hx",lineNumber:1121,
className:"openfl.text._internal.TextEngine",methodName:"getLayoutGroups"});break}g=d;d=f<c.end?f:c.end;++k}else{L=N(q);break}b-=k+1;P()}},Kb=function(b){if(b<=c.end){q=X(a.text,qa,b);L=N(q);ta(qa,b);A.positions=q;var d=J,f=M();A.offsetX=d+f;A.ascent=k;A.descent=h;A.leading=g;A.lineIndex=va;A.offsetY=K+2;A.width=L;A.height=v;J+=L;b==c.end&&(A=null,P(),O())}else for(;;){var l=b<c.end?b:c.end;qa!=l&&(q=X(a.text,qa,l),L=N(q),ta(qa,l),A.positions=q,d=J,f=M(),A.offsetX=d+f,A.ascent=k,A.descent=h,A.leading=
g,A.lineIndex=va,A.offsetY=K+2,A.width=L,A.height=v,J+=L,qa=l);l==c.end&&(A=null);if(l==b)break;if(!P()){Pa.warn("You found a bug in OpenFL's text code! Please save a copy of your project and create an issue on GitHub so we can fix this.",{fileName:"openfl/text/_internal/TextEngine.hx",lineNumber:1209,className:"openfl.text._internal.TextEngine",methodName:"getLayoutGroups"});break}O()}qa=b},S=function(){O();for(var b=a.layoutGroups.get_length();-1<--b;){var c=a.layoutGroups.get(b);if(c.lineIndex<
va)break;c.lineIndex>va||(c.ascent=l,c.height=x)}K+=x;x=l=0;va+=1;J=0;t=!1},U=function(b){if(4<=a.width&&a.wordWrap){var c=q;var d=N(c);for(var f=c.length-1;0<=f;){var g=y.cca(a.text,qa+f);if(32!=g&&9!=g)break;d-=c[f];--f}for(;0<c.length&&J+d>nb();){for(g=f=d=0;J+g<nb();){var k=c[f];0==k?(++f,++d):(g+=k,++f)}if(f==d)f=d+1;else for(;1<f&&J+g>nb();)--f,0<f-d?(F(qa,qa+f-d),g=L):(f=1,d=0,F(qa,qa+1),g=0);c=qa+f-d;Kb(c);S();F(c,b);c=q;d=L}}Kb(b)};P();Bb();O();for(var I,W=this.text.length+1;qa<W;)if(-1<
D&&(-1==Y||D<Y))qa<=D?(F(qa,D),U(D),A=null):null!=A&&A.startIndex!=A.endIndex&&(A.endIndex==Y&&(A.width-=A.positions[A.positions.length-1]),A=null),S(),c.end==D&&(P(),O()),qa=D+1,G=D,++H,D=H<this.lineBreaks.get_length()?this.lineBreaks.get(H):-1,Bb();else if(-1<Y)for(null!=A&&A.startIndex!=A.endIndex&&(A=null),I=!1;qa<this.text.length;){var V=-1;-1==Y?V=D:(V=Y+1,-1<D&&D<V&&(V=D));-1==V&&(V=this.text.length);F(qa,V);if(2==r){if(0<q.length&&qa==C){qa+=1;var Oa=q.shift();L-=Oa;J+=Oa}0<q.length&&V==Y+
1&&(--V,Oa=q.pop(),L-=Oa)}this.wordWrap&&J+L>nb()&&(I=!0,0<q.length&&V==Y+1&&J+L-q[q.length-1]<=nb()&&(I=!1));if(I){2!=r&&(null!=A||0<this.layoutGroups.get_length())&&(I=A,null==I&&(I=this.layoutGroups.get(this.layoutGroups.get_length()-1)),I.width-=I.positions[I.positions.length-1],I.endIndex--);I=this.layoutGroups.get_length()-1;for(Oa=0;0<=I;){A=this.layoutGroups.get(I);if(0<I&&A.startIndex>C)++Oa;else break;--I}qa==C+1&&S();J=0;if(0<Oa){I=this.layoutGroups.get(this.layoutGroups.get_length()-Oa).offsetX;
Oa=this.layoutGroups.get_length()-Oa;for(var R=this.layoutGroups.get_length();Oa<R;){var ca=Oa++;A=this.layoutGroups.get(ca);A.offsetX-=I;A.offsetY=K+2;A.lineIndex=va;J+=A.width}}U(V);I=!1}else null!=A&&qa==Y&&C!=Y-1?(2!=r&&(A.endIndex=Y,A.positions=A.positions.concat(q),A.width+=L),J+=L,qa=V):null==A||2==r?(U(V),V==this.text.length&&S()):(Oa=V<c.end?V:c.end,Oa<V&&(q=X(this.text,qa,Oa),L=N(q)),A.endIndex=Oa,A.positions=A.positions.concat(q),A.width+=L,J+=L,Oa==c.end&&(A=null,P(),O(),qa=Oa,Oa!=V&&
Kb(V)),D==V&&++V,qa=V,V==this.text.length&&(S(),-1!=D&&(G=D,++H,D=H<this.lineBreaks.get_length()?this.lineBreaks.get(H):-1)));V=this.text.indexOf(" ",qa);D==C&&(A.endIndex=D,0>D-A.startIndex-A.positions.length&&A.positions.push(0),qa=D+1);C=Y;Y=V;if(-1<D&&D<=qa&&(Y>D||-1==Y)||qa>this.text.length)break}else qa<this.text.length&&(F(qa,this.text.length),U(this.text.length),S()),qa+=1;G==qa-2&&-1<G&&(ta(qa-1,qa-1),A.positions=[],A.ascent=k,A.descent=h,A.leading=g,A.lineIndex=va,A.offsetX=M(),A.offsetY=
K+2,A.width=0,A.height=v)}},measureText:function(a){return Jb.__context.measureText(a).width},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,d,f=!1,g=0,k=this.layoutGroups.get_length();g<k;){var l=g++;c=this.layoutGroups.get(l);if(c.lineIndex!=a)switch(a=c.lineIndex,b=this.width-4-c.format.rightMargin,c.format.align){case 0:b=this.lineWidths.get(a)<b?Math.round((b-this.lineWidths.get(a))/
2):0;break;case 2:if(this.lineWidths.get(a)<b){d=1;for(var h=l+1,r=this.layoutGroups.get_length();h<r;){var w=h++;if(this.layoutGroups.get(w).lineIndex==a)0!=w&&32!=y.cca(this.text,this.layoutGroups.get(w).startIndex-1)||++d;else break}if(1<d&&(c=this.layoutGroups.get(l+d-1),h=y.cca(this.text,c.endIndex),c.endIndex<this.text.length&&10!=h&&13!=h)){b=(b-this.lineWidths.get(a))/(d-1);f=!0;h=1;do this.layoutGroups.get(l+h).offsetX+=b*h;while(++h<d)}}b=0;break;case 4:b=this.lineWidths.get(a)<b?Math.round(b-
this.lineWidths.get(a)):0;break;default:b=0}0<b&&(c.offsetX+=b)}f&&this.getLineMeasurements()},trimText:function(a){if(null==a)return a;0<this.maxChars&&a.length>this.maxChars&&(a=y.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.getLineBreaks(),this.getLayoutGroups(),this.getLineMeasurements(),this.setTextAlignment());this.getBounds()},get_bottomScrollV:function(){if(1==this.numLines||null==this.lineHeights)return 1;for(var a=this.lineHeights.get_length(),b=this.lineLeadings.get_length()==a?-this.lineLeadings.get(a-1):0,c=(0<this.get_scrollV()?this.get_scrollV():1)-1,d=this.lineHeights.get_length();c<d;){var f=c++,
g=this.lineHeights.get(f);b+=g;if(b>this.height-4){a=f+(0<=b-this.height?0:1);break}}return a<this.get_scrollV()?this.get_scrollV():a},get_maxScrollV:function(){if(1==this.numLines||null==this.lineHeights)return 1;for(var a=this.numLines-1,b=0;0<=a;){b+=this.lineHeights.get(a);if(b>this.height-4){a+=0>b-this.height?1:2;break}--a}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:a>this.get_maxScrollV()&&(a=this.get_maxScrollV());return this.scrollV=a},set_text:function(a){return this.text=a},__class__:Jb,__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 Io=function(a,b,c,d){this.normal=a;this.bold=b;this.italic=c;this.boldItalic=d};h["openfl.text._internal._TextEngine.DefaultFontSet"]=Io;Io.__name__="openfl.text._internal._TextEngine.DefaultFontSet";Io.prototype={bold:null,boldItalic:null,italic:null,normal:null,getFont:function(a,b){return a&&b&&null!=this.boldItalic?this.boldItalic:b&&null!=this.italic?this.italic:a&&null!=this.bold?this.bold:this.normal},__class__:Io};var je=function(a,b,c){this.format=
a;this.start=b;this.end=c};h["openfl.text._internal.TextFormatRange"]=je;je.__name__="openfl.text._internal.TextFormatRange";je.prototype={end:null,format:null,start:null,__class__:je};var ud=function(a,b,c,d,f,g){null==g&&(g="en");null==f&&(f="Zyyy");null==d&&(d=4);null==c&&(c=12);null==a&&(a="");this.__hbFontSize=-1;this.letterSpacing=0;this.set_text(a);this.set_font(b);this.set_size(c);this.__direction=d;this.__script=f;this.__language=g;this.positions=[];this.__dirty=!0;this.__create(this.__direction,
this.__script,this.__language)};h["openfl.text._internal.TextLayout"]=ud;ud.__name__="openfl.text._internal.TextLayout";ud.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,__hbFontSize:null,__create:function(a,b,c){4==c.length&&(this.__hbBuffer=hp._new(),Zo._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__:ud,__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 Ul=function(a,b,c){this.format=a;this.startIndex=b;this.endIndex=c};h["openfl.text._internal.TextLayoutGroup"]=Ul;Ul.__name__="openfl.text._internal.TextLayoutGroup";Ul.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__:Ul};var Ke=function(a,b,c,d,f){null==f&&(f=0);Da.call(this);this.device=a;this.id=b;this.minValue=c;this.maxValue=d;this.value=f};h["openfl.ui.GameInputControl"]=Ke;Ke.__name__="openfl.ui.GameInputControl";Ke.__super__=Da;Ke.prototype=x(Da.prototype,{device:null,id:null,maxValue:null,minValue:null,value:null,__class__:Ke});var mk=function(a,b){this.__controls=[];this.__button=new hc;this.__axis=new hc;this.id=a;this.name=b;a=new Ke(this,"AXIS_0",-1,1);this.__axis.h[0]=a;this.__controls.push(a);
a=new Ke(this,"AXIS_1",-1,1);this.__axis.h[1]=a;this.__controls.push(a);a=new Ke(this,"AXIS_2",-1,1);this.__axis.h[2]=a;this.__controls.push(a);a=new Ke(this,"AXIS_3",-1,1);this.__axis.h[3]=a;this.__controls.push(a);a=new Ke(this,"AXIS_4",-1,1);this.__axis.h[4]=a;this.__controls.push(a);a=new Ke(this,"AXIS_5",-1,1);this.__axis.h[5]=a;this.__controls.push(a);for(b=0;15>b;){var c=b++;a=new Ke(this,"BUTTON_"+c,0,1);this.__button.h[c]=a;this.__controls.push(a)}};h["openfl.ui.GameInputDevice"]=mk;mk.__name__=
"openfl.ui.GameInputDevice";mk.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__:mk,__properties__:{get_numControls:"get_numControls"}};var za=function(){};h["openfl.ui.Keyboard"]=
za;za.__name__="openfl.ui.Keyboard";za.capsLock=null;za.numLock=null;za.isAccessible=function(){return!1};za.__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}};za.__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};za.__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 Kc=function(){};h["openfl.ui.Mouse"]=Kc;Kc.__name__="openfl.ui.Mouse";Kc.__properties__={set_cursor:"set_cursor",get_cursor:"get_cursor"};Kc.__hidden=null;Kc.hide=function(){Kc.__hidden=!0;for(var a=0,b=F.current.__windows;a<b.length;){var c=b[a];++a;c.set_cursor(null)}};Kc.show=function(){Kc.__hidden=!1;var a=Kc.__cursor;Kc.__cursor=
null;Kc.set_cursor(a)};Kc.get_cursor=function(){return Kc.__cursor};Kc.set_cursor=function(a){null==a&&(a="auto");var b=null;switch(a){case "arrow":b=dc.ARROW;break;case "button":b=dc.POINTER;break;case "crosshair":b=dc.CROSSHAIR;break;case "custom":b=dc.CUSTOM;break;case "hand":b=dc.MOVE;break;case "ibeam":b=dc.TEXT;break;case "resize_nesw":b=dc.RESIZE_NESW;break;case "resize_ns":b=dc.RESIZE_NS;break;case "resize_nwse":b=dc.RESIZE_NWSE;break;case "resize_we":b=dc.RESIZE_WE;break;case "wait":b=dc.WAIT;
break;case "waitarrow":b=dc.WAIT_ARROW}if(null!=b&&!Kc.__hidden)for(var c=0,d=F.current.__windows;c<d.length;){var f=d[c];++c;f.set_cursor(b)}return Kc.__cursor=a};var Te={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"}},
toLimeCursor:function(a){switch(a){case "arrow":return dc.ARROW;case "auto":return dc.DEFAULT;case "button":return dc.POINTER;case "crosshair":return dc.CROSSHAIR;case "custom":return dc.CUSTOM;case "hand":return dc.MOVE;case "ibeam":return dc.TEXT;case "resize_nesw":return dc.RESIZE_NESW;case "resize_ns":return dc.RESIZE_NS;case "resize_nwse":return dc.RESIZE_NWSE;case "resize_we":return dc.RESIZE_WE;case "wait":return dc.WAIT;case "waitarrow":return dc.WAIT_ARROW;default:return dc.DEFAULT}}},ff=
function(){};h["openfl.ui.Multitouch"]=ff;ff.__name__="openfl.ui.Multitouch";ff.__properties__={get_supportsTouchEvents:"get_supportsTouchEvents"};ff.inputMode=null;ff.maxTouchPoints=null;ff.supportedGestures=null;ff.supportsGestureEvents=null;ff.get_supportsTouchEvents=function(){return"ontouchstart"in document.documentElement||window.DocumentTouch&&document instanceof DocumentTouch?!0:!1};var S=function(a){null==a&&(a=!1);this.debugEnabled=a;S.initialized||S.init()};h["openfl.utils.AGALMiniAssembler"]=
S;S.__name__="openfl.utils.AGALMiniAssembler";S.init=function(){S.initialized=!0;var a=S.OPMAP,b=new Zb("mov",2,0,0);a.h.mov=b;a=S.OPMAP;b=new Zb("add",3,1,0);a.h.add=b;a=S.OPMAP;b=new Zb("sub",3,2,0);a.h.sub=b;a=S.OPMAP;b=new Zb("mul",3,3,0);a.h.mul=b;a=S.OPMAP;b=new Zb("div",3,4,0);a.h.div=b;a=S.OPMAP;b=new Zb("rcp",2,5,0);a.h.rcp=b;a=S.OPMAP;b=new Zb("min",3,6,0);a.h.min=b;a=S.OPMAP;b=new Zb("max",3,7,0);a.h.max=b;a=S.OPMAP;b=new Zb("frc",2,8,0);a.h.frc=b;a=S.OPMAP;b=new Zb("sqt",2,9,0);a.h.sqt=
b;a=S.OPMAP;b=new Zb("rsq",2,10,0);a.h.rsq=b;a=S.OPMAP;b=new Zb("pow",3,11,0);a.h.pow=b;a=S.OPMAP;b=new Zb("log",2,12,0);a.h.log=b;a=S.OPMAP;b=new Zb("exp",2,13,0);a.h.exp=b;a=S.OPMAP;b=new Zb("nrm",2,14,0);a.h.nrm=b;a=S.OPMAP;b=new Zb("sin",2,15,0);a.h.sin=b;a=S.OPMAP;b=new Zb("cos",2,16,0);a.h.cos=b;a=S.OPMAP;b=new Zb("crs",3,17,0);a.h.crs=b;a=S.OPMAP;b=new Zb("dp3",3,18,0);a.h.dp3=b;a=S.OPMAP;b=new Zb("dp4",3,19,0);a.h.dp4=b;a=S.OPMAP;b=new Zb("abs",2,20,0);a.h.abs=b;a=S.OPMAP;b=new Zb("neg",2,
21,0);a.h.neg=b;a=S.OPMAP;b=new Zb("sat",2,22,0);a.h.sat=b;a=S.OPMAP;b=new Zb("m33",3,23,16);a.h.m33=b;a=S.OPMAP;b=new Zb("m44",3,24,16);a.h.m44=b;a=S.OPMAP;b=new Zb("m34",3,25,16);a.h.m34=b;a=S.OPMAP;b=new Zb("ddx",2,26,288);a.h.ddx=b;a=S.OPMAP;b=new Zb("ddy",2,27,288);a.h.ddy=b;a=S.OPMAP;b=new Zb("ife",2,28,897);a.h.ife=b;a=S.OPMAP;b=new Zb("ine",2,29,897);a.h.ine=b;a=S.OPMAP;b=new Zb("ifg",2,30,897);a.h.ifg=b;a=S.OPMAP;b=new Zb("ifl",2,31,897);a.h.ifl=b;a=S.OPMAP;b=new Zb("els",0,32,1921);a.h.els=
b;a=S.OPMAP;b=new Zb("eif",0,33,1409);a.h.eif=b;a=S.OPMAP;b=new Zb("kil",1,39,160);a.h.kil=b;a=S.OPMAP;b=new Zb("tex",3,40,40);a.h.tex=b;a=S.OPMAP;b=new Zb("sge",3,41,0);a.h.sge=b;a=S.OPMAP;b=new Zb("slt",3,42,0);a.h.slt=b;a=S.OPMAP;b=new Zb("sgn",2,43,0);a.h.sgn=b;a=S.OPMAP;b=new Zb("seq",3,44,0);a.h.seq=b;a=S.OPMAP;b=new Zb("sne",3,45,0);a.h.sne=b;a=S.SAMPLEMAP;b=new Hc("rgba",8,0);a.h.rgba=b;a=S.SAMPLEMAP;b=new Hc("compressed",8,1);a.h.compressed=b;a=S.SAMPLEMAP;b=new Hc("compressedalpha",8,2);
a.h.compressedalpha=b;a=S.SAMPLEMAP;b=new Hc("dxt1",8,1);a.h.dxt1=b;a=S.SAMPLEMAP;b=new Hc("dxt5",8,2);a.h.dxt5=b;a=S.SAMPLEMAP;b=new Hc("video",8,3);a.h.video=b;a=S.SAMPLEMAP;b=new Hc("2d",12,0);a.h["2d"]=b;a=S.SAMPLEMAP;b=new Hc("3d",12,2);a.h["3d"]=b;a=S.SAMPLEMAP;b=new Hc("cube",12,1);a.h.cube=b;a=S.SAMPLEMAP;b=new Hc("mipnearest",24,1);a.h.mipnearest=b;a=S.SAMPLEMAP;b=new Hc("miplinear",24,2);a.h.miplinear=b;a=S.SAMPLEMAP;b=new Hc("mipnone",24,0);a.h.mipnone=b;a=S.SAMPLEMAP;b=new Hc("nomip",
24,0);a.h.nomip=b;a=S.SAMPLEMAP;b=new Hc("nearest",28,0);a.h.nearest=b;a=S.SAMPLEMAP;b=new Hc("linear",28,1);a.h.linear=b;a=S.SAMPLEMAP;b=new Hc("anisotropic2x",28,2);a.h.anisotropic2x=b;a=S.SAMPLEMAP;b=new Hc("anisotropic4x",28,3);a.h.anisotropic4x=b;a=S.SAMPLEMAP;b=new Hc("anisotropic8x",28,4);a.h.anisotropic8x=b;a=S.SAMPLEMAP;b=new Hc("anisotropic16x",28,5);a.h.anisotropic16x=b;a=S.SAMPLEMAP;b=new Hc("centroid",16,1);a.h.centroid=b;a=S.SAMPLEMAP;b=new Hc("single",16,2);a.h.single=b;a=S.SAMPLEMAP;
b=new Hc("ignoresampler",16,4);a.h.ignoresampler=b;a=S.SAMPLEMAP;b=new Hc("repeat",20,1);a.h.repeat=b;a=S.SAMPLEMAP;b=new Hc("wrap",20,1);a.h.wrap=b;a=S.SAMPLEMAP;b=new Hc("clamp",20,0);a.h.clamp=b;a=S.SAMPLEMAP;b=new Hc("clamp_u_repeat_v",20,2);a.h.clamp_u_repeat_v=b;a=S.SAMPLEMAP;b=new Hc("repeat_u_clamp_v",20,3);a.h.repeat_u_clamp_v=b};S.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 f=ha.getTimer();this.agalcode=new Sb(0);this.error="";var g=!1;"fragment"==a?g=!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(g?1:0);this.initregmap(c,d);a=O.replace(b,"\r","\n").split("\n");b=0;d=a.length;for(var k=
new E("<.*>","g"),l=new E("([\\w\\.\\-\\+]+)","gi"),h=new E("^\\w{3}","ig"),r=new E("vc\\[([vofi][acostdip]?[d]?)(\\d*)?(\\.[xyzw](\\+\\d{1,3})?)?\\](\\.[xyzw]{1,4})?|([vofi][acostdip]?[d]?)(\\d*)?(\\.[xyzw]{1,4})?","gi"),w=new E("\\[.*\\]","ig"),p=new E("^\\b[A-Za-z]{1,3}","ig"),u=new E("\\d+",""),n=new E("(\\.[xyzw]{1,4})",""),t=new E("[A-Za-z]{1,3}","ig"),A=new E("(\\.[xyzw]{1,1})",""),q=new E("\\+\\d{1,3}","ig"),v=0;v<d&&""==this.error;){var x=O.trim(a[v]),C=x.indexOf("//");-1!=C&&(x=y.substr(x,
0,C));var G=k.match(x)?k.matchedPos().pos:-1;C=null;-1!=G&&(C=this.match(y.substr(x,G,null),l),x=y.substr(x,0,G));var Y=null;h.match(x)&&(G=h.matched(0),Y=S.OPMAP.h[G]);if(null==Y)3<=x.length&&Pa.warn("warning: bad line "+v+": "+a[v],{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:262,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});else if(this.debugEnabled&&Pa.info(Y,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:272,className:"openfl.utils.AGALMiniAssembler",
methodName:"assemble"}),null==Y)3<=x.length&&Pa.warn("warning: bad line "+v+": "+a[v],{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:279,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});else{x=y.substr(x,x.indexOf(Y.name)+Y.name.length,null);if(0!=(Y.flags&256)&&2>c){this.error="error: opcode requires version 2.";break}if(0!=(Y.flags&64)&&g){this.error="error: opcode is only allowed in vertex programs.";break}if(0!=(Y.flags&32)&&!g){this.error="error: opcode is only allowed in fragment programs.";
break}this.verbose&&Pa.info("emit opcode="+M.string(Y),{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:308,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});this.agalcode.writeUnsignedInt(Y.emitCode);++b;if(4096<b){this.error="error: too many opcodes. maximum is 4096.";break}var B=this.match(x,r);if(B.length!=Y.numRegister){this.error="error: wrong number of operands. found "+B.length+" but expected "+Y.numRegister+".";break}var D=!1,H=160;x=0;for(G=B.length;x<G;){var J=
x++,K=!1,qa=this.match(B[J],w);0<qa.length&&(B[J]=O.replace(B[J],qa[0],"0"),this.verbose&&Pa.info("IS REL",{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:344,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"}),K=!0);var va=this.match(B[J],p);if(0==va.length){this.error="error: could not parse operand "+J+" ("+B[J]+").";D=!0;break}var X=S.REGMAP.h[va[0]];this.debugEnabled&&Pa.info(X,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:363,className:"openfl.utils.AGALMiniAssembler",
methodName:"assemble"});if(null==X){this.error="error: could not find register name for operand "+J+" ("+B[J]+").";D=!0;break}if(g){if(0==(X.flags&32)){this.error="error: register operand "+J+" ("+B[J]+") only allowed in vertex programs.";D=!0;break}if(K){this.error="error: register operand "+J+" ("+B[J]+") relative adressing not allowed in fragment programs.";D=!0;break}}else if(0==(X.flags&64)){this.error="error: register operand "+J+" ("+B[J]+") only allowed in fragment programs.";D=!0;break}B[J]=
y.substr(B[J],B[J].indexOf(X.name)+X.name.length,null);var N=K?this.match(qa[0],u):this.match(B[J],u);va=0;0<N.length&&(va=M.parseInt(N[0]));if(L.gt(va,X.range)){x=X.range+1;this.error="error: register operand "+J+" ("+B[J]+") index exceeds limit of "+(null==x?"null":M.string(L.toFloat(x)))+".";D=!0;break}var nb=this.match(B[J],n),ta=0==J&&0==(Y.flags&128),Bb=2==J&&0!=(Y.flags&8),P=0,F=0,I=0;if(ta&&K){this.error="error: relative can not be destination";D=!0;break}if(0<nb.length){for(var V=N=0,Kb=
nb[0].length,Oa=1;Oa<Kb;)V=y.cca(nb[0],Oa)-120,L.gt(V,2)&&(V=3),N=ta?N|1<<V:N|V<<(Oa-1<<1),++Oa;if(!ta)for(;4>=Oa;)N|=V<<(Oa-1<<1),++Oa}else N=ta?15:228;if(K){nb=this.match(qa[0],t);P=S.REGMAP.h[nb[0]];if(null==P){this.error="error: bad index register";D=!0;break}P=P.emitCode;V=this.match(qa[0],A);if(0==V.length){this.error="error: bad index register select";D=!0;break}F=y.cca(V[0],1)-120;L.gt(F,2)&&(F=3);qa=this.match(qa[0],q);0<qa.length&&(I=M.parseInt(qa[0]));if(0>I||255<I){this.error="error: index offset "+
I+" out of bounds. [0..255]";D=!0;break}this.verbose&&Pa.info("RELATIVE: type="+P+"=="+nb[0]+" sel="+(null==F?"null":M.string(L.toFloat(F)))+"=="+V[0]+" idx="+(null==va?"null":M.string(L.toFloat(va)))+" offset="+I,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:518,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}this.verbose&&Pa.info("  emit argcode="+M.string(X)+"["+(null==va?"null":M.string(L.toFloat(va)))+"]["+N+"]",{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:525,
className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});if(ta)this.agalcode.writeShort(va),this.agalcode.writeByte(N),this.agalcode.writeByte(X.emitCode),H-=32;else{if(Bb){this.verbose&&Pa.info("  emit sampler",{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:541,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});J=5;qa=K=0;for(X=null==C?0:C.length;qa<X;)N=qa++,this.verbose&&Pa.info("    opt: "+C[N],{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:552,className:"openfl.utils.AGALMiniAssembler",
methodName:"assemble"}),ta=S.SAMPLEMAP.h[C[N]],null==ta?(K=parseFloat(C[N]),this.verbose&&Pa.info("    bias: "+K,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:565,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})):(16!=ta.flag&&(J&=~(15<<ta.flag)),J|=ta.mask<<ta.flag);this.agalcode.writeShort(va);this.agalcode.writeByte(8*K|0);this.agalcode.writeByte(0);this.agalcode.writeUnsignedInt(J);this.verbose&&Pa.info("    bits: "+(J-5),{fileName:"openfl/utils/AGALMiniAssembler.hx",
lineNumber:586,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}else 0==J&&(this.agalcode.writeUnsignedInt(0),H-=32),this.agalcode.writeShort(va),this.agalcode.writeByte(I),this.agalcode.writeByte(N),this.agalcode.writeByte(X.emitCode),this.agalcode.writeByte(P),this.agalcode.writeShort(K?F|32768:0);H-=64}}for(x=0;x<H;)this.agalcode.writeByte(0),x+=8;if(D)break}++v}""!=this.error&&(this.error+="\n  at line "+v+" "+a[v],kb.set_length(this.agalcode,0),Pa.info(this.error,{fileName:"openfl/utils/AGALMiniAssembler.hx",
lineNumber:631,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"}));if(this.debugEnabled){c="generated bytecode:";g=kb.get_length(this.agalcode);x=0;for(G=g;x<G;)g=x++,0==g%16&&(c+="\n"),0==g%4&&(c+=" "),g=O.hex(this.agalcode.b[g],2),2>g.length&&(g="0"+g),c+=g;Pa.info(c,{fileName:"openfl/utils/AGALMiniAssembler.hx",lineNumber:662,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"})}this.verbose&&Pa.info("AGALMiniAssembler.assemble time: "+(ha.getTimer()-f)/1E3+"s",{fileName:"openfl/utils/AGALMiniAssembler.hx",
lineNumber:667,className:"openfl.utils.AGALMiniAssembler",methodName:"assemble"});return this.agalcode},initregmap:function(a,b){var c=S.REGMAP,d=new Ce("va","vertex attribute",0,b?1024:1==a||2==a?7:15,66);c.h.va=d;c=S.REGMAP;d=new Ce("vc","vertex constant",1,b?1024:1==a?127:249,66);c.h.vc=d;c=S.REGMAP;d=new Ce("vt","vertex temporary",2,b?1024:1==a?7:25,67);c.h.vt=d;c=S.REGMAP;d=new Ce("vo","vertex output",3,b?1024:0,65);c.h.vo=d;c=S.REGMAP;d=new Ce("vi","varying",4,b?1024:1==a?7:9,99);c.h.vi=d;c=
S.REGMAP;d=new Ce("fc","fragment constant",1,b?1024:1==a?27:2==a?63:199,34);c.h.fc=d;c=S.REGMAP;d=new Ce("ft","fragment temporary",2,b?1024:1==a?7:25,35);c.h.ft=d;c=S.REGMAP;d=new Ce("fs","texture sampler",5,b?1024:7,34);c.h.fs=d;c=S.REGMAP;d=new Ce("fo","fragment output",3,b?1024:1==a?0:3,33);c.h.fo=d;c=S.REGMAP;d=new Ce("fd","fragment depth output",6,b?1024:1==a?-1:0,33);c.h.fd=d;c=S.REGMAP;d=new Ce("iid","instance id",7,b?1024:0,66);c.h.iid=d;d=S.REGMAP.h.vo;S.REGMAP.h.op=d;d=S.REGMAP.h.vi;S.REGMAP.h.i=
d;d=S.REGMAP.h.vi;S.REGMAP.h.v=d;d=S.REGMAP.h.fo;S.REGMAP.h.oc=d;d=S.REGMAP.h.fd;S.REGMAP.h.od=d;d=S.REGMAP.h.vi;S.REGMAP.h.fi=d},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__:S};var Zb=function(a,b,c,d){this.name=a;this.numRegister=b;this.emitCode=c;this.flags=d};h["openfl.utils._AGALMiniAssembler.OpCode"]=Zb;Zb.__name__="openfl.utils._AGALMiniAssembler.OpCode";Zb.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__:Zb};var Ce=function(a,b,c,d,f){this.name=a;this.longName=b;this.emitCode=c;this.range=d;this.flags=f};h["openfl.utils._AGALMiniAssembler.Register"]=Ce;Ce.__name__="openfl.utils._AGALMiniAssembler.Register";Ce.prototype={emitCode:null,name:null,longName:null,flags:null,range:null,toString:function(){return'[Register name="'+this.name+'", longName="'+
this.longName+'", emitCode='+(null==this.emitCode?"null":M.string(L.toFloat(this.emitCode)))+", range="+(null==this.range?"null":M.string(L.toFloat(this.range)))+", flags="+(null==this.flags?"null":M.string(L.toFloat(this.flags)))+"]"},__class__:Ce};var Hc=function(a,b,c){this.name=a;this.flag=b;this.mask=c};h["openfl.utils._AGALMiniAssembler.Sampler"]=Hc;Hc.__name__="openfl.utils._AGALMiniAssembler.Sampler";Hc.prototype={flag:null,mask:null,name:null,toString:function(){return'[Sampler name="'+this.name+
'", flag="'+(null==this.flag?"null":M.string(L.toFloat(this.flag)))+'", mask='+(null==this.mask?"null":M.string(L.toFloat(this.mask)))+"]"},__class__:Hc};var Vl=function(){};h["openfl.utils.IAssetCache"]=Vl;Vl.__name__="openfl.utils.IAssetCache";Vl.__isInterface__=!0;Vl.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__:Vl,__properties__:{set_enabled:"set_enabled",get_enabled:"get_enabled"}};var Wl=function(){this.__enabled=!0;this.bitmapData=new Ba;this.font=new Ba;this.sound=new Ba};h["openfl.utils.AssetCache"]=Wl;Wl.__name__="openfl.utils.AssetCache";Wl.__interfaces__=[Vl];Wl.prototype={bitmapData:null,font:null,sound:null,__enabled:null,clear:function(a){if(null==a)this.bitmapData=new Ba,this.font=new Ba,this.sound=new Ba;else{var b=this.bitmapData.h;b=Object.keys(b);for(var c=b.length,
d=0;d<c;){var f=b[d++];O.startsWith(f,a)&&this.removeBitmapData(f)}b=this.font.h;b=Object.keys(b);c=b.length;for(d=0;d<c;)f=b[d++],O.startsWith(f,a)&&this.removeFont(f);b=this.sound.h;b=Object.keys(b);c=b.length;for(d=0;d<c;)f=b[d++],O.startsWith(f,a)&&this.removeSound(f)}},getBitmapData:function(a){return this.bitmapData.h[a]},getFont:function(a){return this.font.h[a]},getSound:function(a){return this.sound.h[a]},hasBitmapData:function(a){return Object.prototype.hasOwnProperty.call(this.bitmapData.h,
a)},hasFont:function(a){return Object.prototype.hasOwnProperty.call(this.font.h,a)},hasSound:function(a){return Object.prototype.hasOwnProperty.call(this.sound.h,a)},removeBitmapData:function(a){var b=ra.cache.image;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a];b=this.bitmapData;return Object.prototype.hasOwnProperty.call(b.h,a)?(delete b.h[a],!0):!1},removeFont:function(a){var b=ra.cache.font;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a];b=this.font;return Object.prototype.hasOwnProperty.call(b.h,
a)?(delete b.h[a],!0):!1},removeSound:function(a){var b=ra.cache.audio;Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a];b=this.sound;return Object.prototype.hasOwnProperty.call(b.h,a)?(delete b.h[a],!0):!1},setBitmapData:function(a,b){this.bitmapData.h[a]=b},setFont:function(a,b){this.font.h[a]=b},setSound:function(a,b){this.sound.h[a]=b},get_enabled:function(){return this.__enabled},set_enabled:function(a){return this.__enabled=a},__class__:Wl,__properties__:{set_enabled:"set_enabled",
get_enabled:"get_enabled"}};var id=function(){Yb.call(this)};h["openfl.utils.AssetLibrary"]=id;id.__name__="openfl.utils.AssetLibrary";id.fromBundle=function(a){a=Yb.fromBundle(a);if(null!=a){if(a instanceof id)return a;var b=new id;b.__proxy=a;return b}return null};id.fromBytes=function(a,b){return id.fromManifest(Gc.fromBytes(kb.toLimeBytes(a),b))};id.fromFile=function(a,b){return id.fromManifest(Gc.fromFile(a,b))};id.fromManifest=function(a){a=Yb.fromManifest(a);if(null!=a){if(a instanceof id)return a;
var b=new id;b.__proxy=a;return b}return null};id.loadFromBytes=function(a,b){return Gc.loadFromBytes(kb.toLimeBytes(a),b).then(function(a){return id.loadFromManifest(a)})};id.loadFromFile=function(a,b){return Gc.loadFromFile(a,b).then(function(a){return id.loadFromManifest(a)})};id.loadFromManifest=function(a){a=id.fromManifest(a);return null!=a?a.load().then(function(a){return ob.withValue(a)}):ob.withError("Could not load asset manifest")};id.__super__=Yb;id.prototype=x(Yb.prototype,{__proxy:null,
bind:function(a,b){return!1},exists:function(a,b){return null!=this.__proxy?this.__proxy.exists(a,b):Yb.prototype.exists.call(this,a,b)},getAsset:function(a,b){return null!=this.__proxy?this.__proxy.getAsset(a,b):Yb.prototype.getAsset.call(this,a,b)},getAudioBuffer:function(a){return null!=this.__proxy?this.__proxy.getAudioBuffer(a):Yb.prototype.getAudioBuffer.call(this,a)},getBytes:function(a){return null!=this.__proxy?this.__proxy.getBytes(a):Yb.prototype.getBytes.call(this,a)},getFont:function(a){return null!=
this.__proxy?this.__proxy.getFont(a):Yb.prototype.getFont.call(this,a)},getImage:function(a){return null!=this.__proxy?this.__proxy.getImage(a):Yb.prototype.getImage.call(this,a)},getMovieClip:function(a){return null},getPath:function(a){return null!=this.__proxy?this.__proxy.getPath(a):Yb.prototype.getPath.call(this,a)},getText:function(a){return null!=this.__proxy?this.__proxy.getText(a):Yb.prototype.getText.call(this,a)},isLocal:function(a,b){return null!=this.__proxy?this.__proxy.isLocal(a,b):
Yb.prototype.isLocal.call(this,a,b)},list:function(a){return null!=this.__proxy?this.__proxy.list(a):Yb.prototype.list.call(this,a)},loadAsset:function(a,b){return null!=this.__proxy?this.__proxy.loadAsset(a,b):Yb.prototype.loadAsset.call(this,a,b)},load:function(){return null!=this.__proxy?this.__proxy.load():Yb.prototype.load.call(this)},loadAudioBuffer:function(a){return null!=this.__proxy?this.__proxy.loadAudioBuffer(a):Yb.prototype.loadAudioBuffer.call(this,a)},loadBytes:function(a){return null!=
this.__proxy?this.__proxy.loadBytes(a):Yb.prototype.loadBytes.call(this,a)},loadFont:function(a){return null!=this.__proxy?this.__proxy.loadFont(a):Yb.prototype.loadFont.call(this,a)},loadImage:function(a){return null!=this.__proxy?this.__proxy.loadImage(a):Yb.prototype.loadImage.call(this,a)},loadMovieClip:function(a){return ob.withValue(this.getMovieClip(a))},loadText:function(a){return null!=this.__proxy?this.__proxy.loadText(a):Yb.prototype.loadText.call(this,a)},unload:function(){null!=this.__proxy?
this.__proxy.unload():Yb.prototype.unload.call(this)},__class__:id});var xa=function(){};h["openfl.utils.Assets"]=xa;xa.__name__="openfl.utils.Assets";xa.addEventListener=function(a,b,c,d,f){null==f&&(f=!1);null==d&&(d=0);null==c&&(c=!1);ra.onChange.has(xa.LimeAssets_onChange)||ra.onChange.add(xa.LimeAssets_onChange);xa.dispatcher.addEventListener(a,b,c,d,f)};xa.dispatchEvent=function(a){return xa.dispatcher.dispatchEvent(a)};xa.exists=function(a,b){return ra.exists(a,b)};xa.getBitmapData=function(a,
b){null==b&&(b=!0);if(b&&xa.cache.get_enabled()&&xa.cache.hasBitmapData(a)){var c=xa.cache.getBitmapData(a);if(xa.isValidBitmapData(c))return c}c=ra.getImage(a,!1);return null!=c?(c=ma.fromImage(c),b&&xa.cache.get_enabled()&&xa.cache.setBitmapData(a,c),c):null};xa.getBytes=function(a){return kb.fromLimeBytes(ra.getBytes(a))};xa.getFont=function(a,b){null==b&&(b=!0);if(b&&xa.cache.get_enabled()&&xa.cache.hasFont(a))return xa.cache.getFont(a);var c=ra.getFont(a,!1);if(null!=c){var d=new Xb;d.__fromLimeFont(c);
b&&xa.cache.get_enabled()&&xa.cache.setFont(a,d);return d}return new Xb};xa.getLibrary=function(a){return ra.getLibrary(a)};xa.getMovieClip=function(a){var b=a.substring(0,a.indexOf(":")),c=y.substr(a,a.indexOf(":")+1,null),d=xa.getLibrary(b);if(null!=d){if(d instanceof id&&d.exists(c,"MOVIE_CLIP")){if(d.isLocal(c,"MOVIE_CLIP"))return d.getMovieClip(c);Pa.error('MovieClip asset "'+a+'" exists, but only asynchronously',{fileName:"openfl/utils/Assets.hx",lineNumber:242,className:"openfl.utils.Assets",
methodName:"getMovieClip"});return null}Pa.error('There is no MovieClip asset with an ID of "'+a+'"',{fileName:"openfl/utils/Assets.hx",lineNumber:248,className:"openfl.utils.Assets",methodName:"getMovieClip"})}else Pa.error('There is no asset library named "'+b+'"',{fileName:"openfl/utils/Assets.hx",lineNumber:252,className:"openfl.utils.Assets",methodName:"getMovieClip"});return null};xa.getMusic=function(a,b){null==b&&(b=!0);return xa.getSound(a,b)};xa.getPath=function(a){return ra.getPath(a)};
xa.getSound=function(a,b){null==b&&(b=!0);if(b&&xa.cache.get_enabled()&&xa.cache.hasSound(a)){var c=xa.cache.getSound(a);if(xa.isValidSound(c))return c}c=ra.getAudioBuffer(a,!1);return null!=c?(c=ne.fromAudioBuffer(c),b&&xa.cache.get_enabled()&&xa.cache.setSound(a,c),c):null};xa.getText=function(a){return ra.getText(a)};xa.hasEventListener=function(a){return xa.dispatcher.hasEventListener(a)};xa.hasLibrary=function(a){return ra.hasLibrary(a)};xa.initBinding=function(a,b){if(Object.prototype.hasOwnProperty.call(xa.libraryBindings.h,
a)){var c=xa.libraryBindings.h[a];null==b?Ka.__constructor=function(b){b.__bind(c,a)}:(Ka.__constructor=null,b.__bind(c,a))}else Pa.warn('No asset is registered as "'+a+'"',{fileName:"openfl/utils/Assets.hx",lineNumber:408,className:"openfl.utils.Assets",methodName:"initBinding"})};xa.isLocal=function(a,b,c){null==c&&(c=!0);if(c&&xa.cache.get_enabled()&&(("IMAGE"==b||null==b)&&xa.cache.hasBitmapData(a)||("FONT"==b||null==b)&&xa.cache.hasFont(a)||("SOUND"==b||"MUSIC"==b||null==b)&&xa.cache.hasSound(a)))return!0;
c=a.substring(0,a.indexOf(":"));a=y.substr(a,a.indexOf(":")+1,null);c=xa.getLibrary(c);return null!=c?c.isLocal(a,b):!1};xa.isValidBitmapData=function(a){return null!=a&&null!=a.image};xa.isValidSound=function(a){return!0};xa.list=function(a){return ra.list(a)};xa.loadBitmapData=function(a,b){null==b&&(b=!0);null==b&&(b=!0);var c=new od;if(b&&xa.cache.get_enabled()&&xa.cache.hasBitmapData(a)){var d=xa.cache.getBitmapData(a);if(xa.isValidBitmapData(d))return c.complete(d),c.future}ra.loadImage(a,!1).onComplete(function(d){null!=
d?(d=ma.fromImage(d),b&&xa.cache.get_enabled()&&xa.cache.setBitmapData(a,d),c.complete(d)):c.error('[Assets] Could not load Image "'+a+'"')}).onError(q(c,c.error)).onProgress(q(c,c.progress));return c.future};xa.loadBytes=function(a){var b=new od;a=ra.loadBytes(a);a.onComplete(function(a){b.complete(kb.fromLimeBytes(a))});a.onProgress(function(a,d){b.progress(a,d)});a.onError(function(a){b.error(a)});return b.future};xa.loadFont=function(a,b){null==b&&(b=!0);null==b&&(b=!0);var c=new od;if(b&&xa.cache.get_enabled()&&
xa.cache.hasFont(a))return c.complete(xa.cache.getFont(a)),c.future;ra.loadFont(a).onComplete(function(d){var f=new Xb;f.__fromLimeFont(d);b&&xa.cache.get_enabled()&&xa.cache.setFont(a,f);c.complete(f)}).onError(q(c,c.error)).onProgress(q(c,c.progress));return c.future};xa.loadLibrary=function(a){return ra.loadLibrary(a).then(function(b){var c=null;null!=b&&(b instanceof id?c=b:(c=ra.libraries,Object.prototype.hasOwnProperty.call(c.h,a)&&delete c.h[a],c=new id,c.__proxy=b,ra.registerLibrary(a,c)));
return ob.withValue(c)})};xa.loadMusic=function(a,b){null==b&&(b=!0);null==b&&(b=!0);return new ob(function(){return xa.getMusic(a,b)})};xa.loadMovieClip=function(a){var b=new od,c=a.substring(0,a.indexOf(":")),d=y.substr(a,a.indexOf(":")+1,null),f=xa.getLibrary(c);if(null!=f){if(f instanceof id&&f.exists(d,"MOVIE_CLIP"))return b.completeWith(f.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};xa.loadSound=function(a,b){null==b&&(b=!0);null==b&&(b=!0);var c=new od;ra.loadAudioBuffer(a,b).onComplete(function(d){null!=d?(d=ne.fromAudioBuffer(d),b&&xa.cache.get_enabled()&&xa.cache.setSound(a,d),c.complete(d)):c.error('[Assets] Could not load Sound "'+a+'"')}).onError(q(c,c.error)).onProgress(q(c,c.progress));return c.future};xa.loadText=function(a){return ra.loadText(a)};xa.registerBinding=function(a,b){xa.libraryBindings.h[a]=b};xa.registerLibrary=function(a,b){ra.registerLibrary(a,
b)};xa.removeEventListener=function(a,b,c){null==c&&(c=!1);xa.dispatcher.removeEventListener(a,b,c)};xa.resolveClass=function(a){return h[a]};xa.resolveEnum=function(a){return G[a]};xa.unloadLibrary=function(a){ra.unloadLibrary(a)};xa.unregisterBinding=function(a,b){Object.prototype.hasOwnProperty.call(xa.libraryBindings.h,a)&&xa.libraryBindings.h[a]==b&&(b=xa.libraryBindings,Object.prototype.hasOwnProperty.call(b.h,a)&&delete b.h[a])};xa.LimeAssets_onChange=function(){xa.dispatchEvent(new fa("change"))};
var kb={__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"},_new:function(a){null==a&&(a=0);return new Sb(a)},clear:function(a){a.clear()},compress:function(a,b){a.compress(b)},deflate:function(a){a.deflate()},
fromArrayBuffer:function(a){return null==a?null:Sb.fromBytes(bb.ofData(a))},fromBytes:function(a){return null==a?null:a instanceof Sb?a:Sb.fromBytes(a)},fromBytesData:function(a){return null==a?null:Sb.fromBytes(bb.ofData(a))},fromFile:function(a){return kb.fromLimeBytes(Jd.fromFile(a))},fromLimeBytes:function(a){return kb.fromBytes(a)},get:function(a,b){return a.b[b]},inflate:function(a){a.inflate()},loadFromBytes:function(a){return Jd.loadFromBytes(a).then(function(a){a=kb.fromLimeBytes(a);return ob.withValue(a)})},
loadFromFile:function(a){return Jd.loadFromFile(a).then(function(a){a=kb.fromLimeBytes(a);return ob.withValue(a)})},readBoolean:function(a){return a.readBoolean()},readByte:function(a){return a.readByte()},readBytes:function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);a.readBytes(b,c,d)},readDouble:function(a){return a.readDouble()},readFloat:function(a){return a.readFloat()},readInt:function(a){return a.readInt()},readInt64:function(a){return a.readInt64()},readMultiByte:function(a,b,c){return a.readMultiByte(b,
c)},readObject:function(a){return a.readObject()},readShort:function(a){return a.readShort()},readUTF:function(a){return a.readUTF()},readUTFBytes:function(a,b){return a.readUTFBytes(b)},readUnsignedByte:function(a){return a.readUnsignedByte()},readUnsignedInt:function(a){return a.readUnsignedInt()},readUnsignedShort:function(a){return a.readUnsignedShort()},set:function(a,b,c){a.__resize(b+1);a.b[b]=c&255;return c},toArrayBuffer:function(a){return a.b.bufferValue},toBytePointer:function(a){ip.set(kb.__bytePointer,
a,null,null,a.position);return kb.__bytePointer},toBytes:function(a){return a},toBytesData:function(a){return a.b.bufferValue},toLimeBytes:function(a){return a},toString:function(a){return a.toString()},uncompress:function(a,b){a.uncompress(b)},writeBoolean:function(a,b){a.writeBoolean(b)},writeByte:function(a,b){a.writeByte(b)},writeBytes:function(a,b,c,d){null==d&&(d=0);null==c&&(c=0);a.writeBytes(b,c,d)},writeDouble:function(a,b){a.writeDouble(b)},writeFloat:function(a,b){a.writeFloat(b)},writeInt:function(a,
b){a.writeInt(b)},writeInt64:function(a,b){a.writeInt64(b)},writeMultiByte:function(a,b,c){a.writeMultiByte(b,c)},writeObject:function(a,b){a.writeObject(b)},writeShort:function(a,b){a.writeShort(b)},writeUTF:function(a,b){a.writeUTF(b)},writeUTFBytes:function(a,b){a.writeUTFBytes(b)},writeUnsignedInt:function(a,b){a.writeUnsignedInt(b)},get_bytesAvailable:function(a){return a.length-a.position},get_defaultEndian:function(){null==Sb.__defaultEndian&&(Fa.get_endianness()==Xf.LITTLE_ENDIAN?Sb.__defaultEndian=
1:Sb.__defaultEndian=0);return Sb.__defaultEndian},set_defaultEndian:function(a){return Sb.__defaultEndian=a},get_defaultObjectEncoding:function(){return Sb.defaultObjectEncoding},set_defaultObjectEncoding:function(a){return Sb.defaultObjectEncoding=a},get_endian:function(a){return a.__endian},set_endian:function(a,b){return a.__endian=b},get_length:function(a){return null==a?0:a.length},set_length:function(a,b){0<=b&&(a.__resize(b),b<a.position&&(a.position=b));return a.length=b},get_objectEncoding:function(a){return a.objectEncoding},
set_objectEncoding:function(a,b){return a.objectEncoding=b},get_position:function(a){return a.position},set_position:function(a,b){return a.position=b}},qi=function(){this.types=new Ba;this.values=new Ba};h["openfl.utils._Dictionary.ClassMap"]=qi;qi.__name__="openfl.utils._Dictionary.ClassMap";qi.__interfaces__=[ta];qi.prototype={types:null,values:null,clear:function(){this.types.h=Object.create(null);this.values.h=Object.create(null)},copy:function(){for(var a=new qi,b=this.keys();b.hasNext();){var c=
b.next();a.set(c,this.get(c))}return a},exists:function(a){return Object.prototype.hasOwnProperty.call(this.types.h,a.__name__)},get:function(a){return this.values.h[a.__name__]},keyValueIterator:function(){return new Dg(this)},keys:function(){return new gj(this.types.h)},iterator:function(){return new gj(this.values.h)},remove:function(a){a=a.__name__;var b=this.types;Object.prototype.hasOwnProperty.call(b.h,a)?(delete b.h[a],b=!0):b=!1;if(b)return!0;b=this.values;return Object.prototype.hasOwnProperty.call(b.h,
a)?(delete b.h[a],!0):!1},set:function(a,b){var c=a.__name__;this.types.h[c]=a;this.values.h[c]=b},toString:function(){return Ba.stringify(this.values.h)},__class__:qi};var oi=function(){this.floatKeys=[];this.values=[]};h["openfl.utils._Dictionary.FloatMap"]=oi;oi.__name__="openfl.utils._Dictionary.FloatMap";oi.__interfaces__=[ta];oi.prototype={floatKeys:null,values:null,clear:function(){this.floatKeys=[];this.values=[]},copy:function(){for(var a=new oi,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 Dg(this)},keys:function(){return new Ld(this.floatKeys.slice())},iterator:function(){return new Ld(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,f=c-1;if(0==c)this.floatKeys.push(a),this.values.push(b);else{for(;d<f;){c=Math.floor((d+f)/2);if(this.floatKeys[c]==a){this.values[c]=b;return}this.floatKeys[c]>a?f=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__:oi};var pi=function(){this.map=new Ga};h["openfl.utils._Dictionary.UtilsObjectMap"]=pi;pi.__name__="openfl.utils._Dictionary.UtilsObjectMap";pi.__interfaces__=[ta];pi.prototype={map:null,clear:function(){this.map.h={__keys__:{}}},copy:function(){for(var a=new pi,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 Dg(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__:pi};var Ko={fromLimeEndian:function(a){switch(a._hx_index){case 0:return 1;case 1:return 0}},fromString:function(a){switch(a){case "bigEndian":return 0;case "littleEndian":return 1;
default:return null}},toLimeEndian:function(a){switch(a){case 0:return Xf.BIG_ENDIAN;case 1:return Xf.LITTLE_ENDIAN;default:return null}},toString:function(a){switch(a){case 0:return"bigEndian";case 1:return"littleEndian";default:return null}}},Dj=function(){};h["openfl.utils.IExternalizable"]=Dj;Dj.__name__="openfl.utils.IExternalizable";Dj.__isInterface__=!0;Dj.prototype={readExternal:null,writeExternal:null,__class__:Dj};var Fi=function(a,b){null==a&&null==b?this.__uri=this.__prefix="":null!=a&&
null==b?a instanceof Fi?(a=na.__cast(a,Fi),this.__prefix=a.get_prefix(),this.__uri=a.get_uri()):a instanceof dg?(a=na.__cast(a,dg),this.__prefix=null,this.__uri=a.get_uri()):(this.__prefix=null,this.__uri=M.string(a)):(null==a?this.__prefix=null:(this.__prefix=M.string(a),0<this.__prefix.length&&!ha.isXMLName(this.__prefix)&&(this.__prefix=null)),b instanceof dg?(a=na.__cast(b,dg),this.__uri=a.get_uri()):this.__uri=M.string(b))};h["openfl.utils.Namespace"]=Fi;Fi.__name__="openfl.utils.Namespace";
Fi.prototype={__prefix:null,__uri:null,get_uri:function(){return this.__uri},get_prefix:function(){return this.__prefix},__class__:Fi,__properties__:{get_uri:"get_uri",get_prefix:"get_prefix"}};var Bd={_new:function(){return{}},hasOwnProperty:function(a,b){return null!=a?Object.prototype.hasOwnProperty.call(a,b):!1},isPrototypeOf:function(a,b){if(null!=a)for(a=na.getClass(a);null!=a;){if(a==b)return!0;a=a.__super__}return!1},iterator:function(a){if(a instanceof Array)return new Ld(a);var b=la.fields(a);
null==b&&(b=[]);if(a instanceof Ta)for(var c=0,d=a.get_numChildren();c<d;){var f=c++;f=a.getChildAt(f).get_name();null!=f&&-1==b.indexOf(f)&&b.push(f)}return new Ld(b)},propertyIsEnumerable:function(a,b){return null!=a&&Object.prototype.hasOwnProperty.call(a,b)?na.__implements(la.field(a,b),Ej):!1},toLocaleString:function(a){return null==a?null:M.string(a)},toString:function(a){return null==a?null:M.string(a)},valueOf:function(a){return a},__fieldRead:function(a,b){return Bd.__get(a,b)},__fieldWrite:function(a,
b,c){null!=a&&la.setProperty(a,b,c);return c},__get:function(a,b){if(null==a||null==b)return null;if(Object.prototype.hasOwnProperty.call(a,b))return la.field(a,b);if(a instanceof Ta){var c=a.getChildByName(b);if(null!=c)return c}return la.getProperty(a,b)},__set:function(a,b,c){null!=a&&la.setProperty(a,b,c);return c},__getArray:function(a,b){return null==a?null:na.__cast(a,Array)[b]},__setArray:function(a,b,c){return null==a?c:na.__cast(a,Array)[b]=c},toFunction:function(a){return a},toFloat:function(a){return"number"==
typeof a?a:NaN},toInt:function(a){return a},toBool:function(a){return"boolean"==typeof a?a:"number"==typeof a?0!=a:null!=a},__negate:function(a){return-a},__preIncrement:function(a){return++a},__postIncrement:function(a){return a++},__preDecrement:function(a){return--a},__postDecrement:function(a){return a--},__add:function(a,b){if("string"==typeof a||"string"==typeof b){if(null==a)a="null";else{var c=a;a=null==c?null:M.string(c)}null==b?b="null":(c=b,b=null==c?null:M.string(c))}return a+b},__addString:function(a,
b){return(null==a?"null":null==a?null:M.string(a))+b},__addInt:function(a,b){return a+b},__addFloat:function(a,b){return a+b},__sub:function(a,b){return a-b},__subInt:function(a,b){return a-b},__intSub:function(a,b){return a-b},__subFloat:function(a,b){return a-b},__floatSub:function(a,b){return a-b},__mul:function(a,b){return a*b},__mulInt:function(a,b){return a*b},__mulFloat:function(a,b){return a*b},__div:function(a,b){return a/b},__divInt:function(a,b){return a/b},__intDiv:function(a,b){return a/
b},__divFloat:function(a,b){return a/b},__floatDiv:function(a,b){return a/b},__mod:function(a,b){return a%b},__modInt:function(a,b){return a%b},__intMod:function(a,b){return a%b},__modFloat:function(a,b){return a%b},__floatMod:function(a,b){return a%b},__eq:function(a,b){return a==b},__eqDynamic:function(a,b){return a==b},__neq:function(a,b){return a!=b},__neqDynamic:function(a,b){return a!=b},__lt:function(a,b){return a<b},__ltInt:function(a,b){return a<b},__intLt:function(a,b){return a<b},__ltFloat:function(a,
b){return a<b},__floatLt:function(a,b){return a<b},__lte:function(a,b){return a<=b},__lteInt:function(a,b){return Bd.__lte(a,b)},__intLte:function(a,b){return Bd.__lte(a,b)},__lteFloat:function(a,b){return Bd.__lte(a,b)},__floatLte:function(a,b){return Bd.__lte(a,b)},__gt:function(a,b){return a>b},__gtInt:function(a,b){return Bd.__gt(a,b)},__intGt:function(a,b){return a>b},__gtFloat:function(a,b){return Bd.__gt(a,b)},__floatGt:function(a,b){return a>b},__gte:function(a,b){return a>=b},__gteInt:function(a,
b){return Bd.__gte(a,b)},__intGte:function(a,b){return a>=b},__gteFloat:function(a,b){return Bd.__gte(a,b)},__floatGte:function(a,b){return a>=b},__complement:function(a){return~a},__and:function(a,b){return a&b},__andInt:function(a,b){return a&b},__or:function(a,b){return a|b},__orInt:function(a,b){return a|b},__xor:function(a,b){return a^b},__xorInt:function(a,b){return a^b},__shr:function(a,b){return a>>b},__shrInt:function(a,b){return a>>b},__intShr:function(a,b){return a>>b},__ushr:function(a,
b){return a>>>b},__ushrInt:function(a,b){return a>>>b},__intUshr:function(a,b){return a>>>b},__shl:function(a,b){return a<<b},__shlInt:function(a,b){return a<<b},__intShl:function(a,b){return a<<b}},Xl=function(){};h["haxe.lang.Iterator"]=Xl;Xl.__name__="haxe.lang.Iterator";Xl.__isInterface__=!0;Xl.prototype={hasNext:null,next:null,__class__:Xl};var Ej=function(){};h["haxe.lang.Iterable"]=Ej;Ej.__name__="haxe.lang.Iterable";Ej.__isInterface__=!0;Ej.prototype={iterator:null,__class__:Ej};var dg=function(a,
b){null==a&&null==b?this.__localName=this.__uri="":null!=a&&null==b?a instanceof dg?(a=na.__cast(a,dg),this.__uri=a.get_uri(),this.__localName=a.get_localName()):(this.__uri="",this.__localName=M.string(a)):(this.__uri=a instanceof Fi?na.__cast(a,Fi).get_uri():null!=a?M.string(a):null,this.__localName=b instanceof dg?na.__cast(b,dg).get_localName():M.string(b))};h["openfl.utils.QName"]=dg;dg.__name__="openfl.utils.QName";dg.prototype={__uri:null,__localName:null,get_uri:function(){return this.__uri},
get_localName:function(){return this.__localName},__class__:dg,__properties__:{get_localName:"get_localName",get_uri:"get_uri"}};var Bc=function(){};h["openfl.utils._internal.Lib"]=Bc;Bc.__name__="openfl.utils._internal.Lib";Bc.application=null;Bc.current=null;Bc.notImplemented=function(a){var b=a.className+"."+a.methodName;Object.prototype.hasOwnProperty.call(Bc.__sentWarnings.h,b)||(Bc.__sentWarnings.h[b]=!0,Pa.warn(a.methodName+" is not implemented",a))};var Ih=function(){this.rollOutStack=[]};
h["openfl.utils._internal.TouchData"]=Ih;Ih.__name__="openfl.utils._internal.TouchData";Ih.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__:Ih};var wk=function(a){this.i=a;a.set_bigEndian(!0)};h["openfl.utils._internal.format.amf.AMFReader"]=wk;wk.__name__="openfl.utils._internal.format.amf.AMFReader";wk.prototype={i:null,readObject:function(){for(var a=
new Ba;;){var b=this.i.readByte(),c=this.i.readByte();b=this.i.readString(b<<8|c);c=this.i.readByte();if(9==c)break;c=this.readWithCode(c);a.h[b]=c}return a},readArray:function(a){for(var b=[],c=0;c<a;)c++,b.push(this.read());return b},readInt:function(){return this.i.readInt32()},readWithCode:function(a){var b=this.i;switch(a){case 0:return kd.ANumber(b.readDouble());case 1:switch(b.readByte()){case 0:b=!1;break;case 1:b=!0;break;default:throw J.thrown("Invalid AMF");}return kd.ABool(b);case 2:return kd.AString(b.readString(b.readUInt16()));
case 5:return kd.ANull;case 6:return kd.AUndefined;case 7:throw J.thrown("Not supported : Reference");case 3:case 8:return b=8==a?this.i.readInt32():null,kd.AObject(this.readObject(),b);case 10:return kd.AArray(this.readArray(this.i.readInt32()));case 11:return a=b.readDouble(),b=b.readUInt16(),kd.ADate(new Date(a+6E4*b));case 12:return kd.AString(b.readString(this.i.readInt32()));default:throw J.thrown("Unknown AMF "+a);}},read:function(){return this.readWithCode(this.i.readByte())},__class__:wk};
var pe=function(){};h["openfl.utils._internal.format.amf.AMFTools"]=pe;pe.__name__="openfl.utils._internal.format.amf.AMFTools";pe.encode=function(a){var b=w.typeof(a);switch(b._hx_index){case 0:return kd.ANull;case 1:return kd.ANumber(a);case 2:return kd.ANumber(a);case 3:return kd.ABool(a);case 4:b=new Ba;for(var c=0,d=la.fields(a);c<d.length;){var f=d[c];++c;var g=pe.encode(la.field(a,f));b.h[f]=g}return kd.AObject(b);case 6:switch(b=b.c,b){case Array:f=[];for(b=0;b<a.length;)g=a[b],++b,f.push(pe.encode(g));
return kd.AArray(f);case String:return kd.AString(a);case Ba:b=new Ba;c=Object.keys(a.h);d=c.length;for(var k=0;k<d;)f=c[k++],g=pe.encode(a.h[f]),b.h[f]=g;return kd.AObject(b);default:throw J.thrown("Can't encode instance of "+b.__name__);}default:throw J.thrown("Can't encode "+M.string(a));}};pe.number=function(a){return null==a?null:0==a._hx_index?a.f:null};pe.string=function(a){return null==a?null:2==a._hx_index?a.s:null};pe.object=function(a){return null==a?null:3==a._hx_index?a.fields:null};
pe.abool=function(a){return null==a?null:1==a._hx_index?a.b:null};pe.array=function(a){return null==a?null:7==a._hx_index?a.values:null};pe.unwrapValue=function(a){switch(a._hx_index){case 0:return a=a.f;case 1:return a.b;case 2:return a.s;case 3:a=a.fields;var b={};for(var c=Object.keys(a.h),d=c.length,f=0;f<d;){var g=c[f++];b[g]=pe.unwrapValue(a.h[g])}return b;case 4:return a.d;case 5:return null;case 6:return null;case 7:c=a.values;a=pe.unwrapValue;d=Array(c.length);b=0;for(f=c.length;b<f;)g=b++,
d[g]=a(c[g]);return d}};var kd=G["openfl.utils._internal.format.amf.AMFValue"]={__ename__:"openfl.utils._internal.format.amf.AMFValue",__constructs__:null,ANumber:(n=function(a){return{_hx_index:0,f:a,__enum__:"openfl.utils._internal.format.amf.AMFValue",toString:t}},n._hx_name="ANumber",n.__params__=["f"],n),ABool:(n=function(a){return{_hx_index:1,b:a,__enum__:"openfl.utils._internal.format.amf.AMFValue",toString:t}},n._hx_name="ABool",n.__params__=["b"],n),AString:(n=function(a){return{_hx_index:2,
s:a,__enum__:"openfl.utils._internal.format.amf.AMFValue",toString:t}},n._hx_name="AString",n.__params__=["s"],n),AObject:(n=function(a,b){return{_hx_index:3,fields:a,size:b,__enum__:"openfl.utils._internal.format.amf.AMFValue",toString:t}},n._hx_name="AObject",n.__params__=["fields","size"],n),ADate:(n=function(a){return{_hx_index:4,d:a,__enum__:"openfl.utils._internal.format.amf.AMFValue",toString:t}},n._hx_name="ADate",n.__params__=["d"],n),AUndefined:{_hx_name:"AUndefined",_hx_index:5,__enum__:"openfl.utils._internal.format.amf.AMFValue",
toString:t},ANull:{_hx_name:"ANull",_hx_index:6,__enum__:"openfl.utils._internal.format.amf.AMFValue",toString:t},AArray:(n=function(a){return{_hx_index:7,values:a,__enum__:"openfl.utils._internal.format.amf.AMFValue",toString:t}},n._hx_name="AArray",n.__params__=["values"],n)};kd.__constructs__=[kd.ANumber,kd.ABool,kd.AString,kd.AObject,kd.ADate,kd.AUndefined,kd.ANull,kd.AArray];var Km=function(a){this.o=a;a.set_bigEndian(!0)};h["openfl.utils._internal.format.amf.AMFWriter"]=Km;Km.__name__="openfl.utils._internal.format.amf.AMFWriter";
Km.prototype={o:null,write:function(a){var b=this.o;switch(a._hx_index){case 0:var c=a.f;b.writeByte(0);b.writeDouble(c);break;case 1:c=a.b;b.writeByte(1);b.writeByte(c?1:0);break;case 2:c=a.s;65535>=c.length?(b.writeByte(2),b.writeUInt16(c.length)):(b.writeByte(12),b.writeInt32(c.length));b.writeString(c);break;case 3:c=a.fields;a=a.size;null==a?b.writeByte(3):(b.writeByte(8),b.writeInt32(a));for(var d=Object.keys(c.h),f=d.length,g=0;g<f;)a=d[g++],b.writeUInt16(a.length),b.writeString(a),this.write(c.h[a]);
b.writeByte(0);b.writeByte(0);b.writeByte(9);break;case 4:c=a.d;b.writeByte(11);b.writeDouble(c.getTime());b.writeUInt16(0);break;case 5:b.writeByte(6);break;case 6:b.writeByte(5);break;case 7:for(c=a.values,b.writeByte(10),b.writeInt32(c.length),b=0;b<c.length;)a=c[b],++b,this.write(a)}},__class__:Km};var Yl=function(a,b){this.a=a;this.extra=b};h["openfl.utils._internal.format.amf3.AMF3Array"]=Yl;Yl.__name__="openfl.utils._internal.format.amf3.AMF3Array";Yl.prototype={a:null,extra:null,__class__:Yl};
var xk=function(a,b){null==b?(this.complexObjectsTable=[],this.objectTraitsTable=[],this.stringTable=[]):(this.complexObjectsTable=b.complexObjectsTable,this.objectTraitsTable=b.objectTraitsTable,this.stringTable=b.stringTable);this.i=a;a.set_bigEndian(!0)};h["openfl.utils._internal.format.amf3.AMF3Reader"]=xk;xk.__name__="openfl.utils._internal.format.amf3.AMF3Reader";xk.prototype={complexObjectsTable:null,objectTraitsTable:null,stringTable:null,i:null,readObject:function(){var a=!1,b=!1,c=[],d=
this.readInt();if(0==(d&1))return this.complexObjectsTable[d>>1];if(1==(d&3)){c=this.objectTraitsTable[d>>2];a=c.isDynamic;b=c.isExternalizable;var f=c.className;c=c.sealedMemberNames}else if(3==(d&7)){a=1==(d>>3&1);d>>=4;f=this.readString();for(var g=0;g<d;)g++,c.push(qb.decode(this.readString()));this.objectTraitsTable.push({isExternalizable:b,isDynamic:a,className:f,sealedMemberNames:c})}else if(7==(d&7))b=!0,f=this.readString();else throw J.thrown("Invalid object traits");if(b)a=qb.object(Hb.AObject(null,
null,qb.decode(f))),null!=a&&na.__implements(a,Dj)?(a.readExternal(new Zl(this)),f=Hb.AExternal(a)):f=Hb.ANull;else{b=new Ba;f=Hb.AObject(b,null,null!=f?qb.decode(f):null);g=0;for(d=c.length;g<d;){var k=g++;var l=this.read();b.h[c[k]]=l}if(a)for(;;){a=qb.decode(this.readString());if(""==a)break;l=this.read();b.h[a]=l}}this.complexObjectsTable.push(f);return f},readMap:function(){var a=this.readInt();if(0==(a&1))return this.complexObjectsTable[a>>1];a>>=1;var b=new ng,c=Hb.AMap(b);this.complexObjectsTable.push(c);
this.i.readByte();for(var d=0;d<a;)d++,b.set(this.read(),this.read());return c},readArray:function(){var a=this.readInt();if(0==(a&1))return this.complexObjectsTable[a>>1];a>>=1;var b=[],c=new Ba,d=Hb.AArray(b,c);this.complexObjectsTable.push(d);for(var f=qb.decode(this.readString());0!=f.length;){var g=this.read();c.h[f]=g;f=qb.decode(this.readString())}for(c=0;c<a;)c++,b.push(this.read());return d},readIntVector:function(){var a=this.readInt();if(0==(a&1))return this.complexObjectsTable[a>>1];a>>=
1;var b=0!=this.i.readByte(),c=ia.toIntVector(null,a);c.fixed=b;for(b=0;b<a;){var d=b++;c.set(d,this.i.readInt32())}a=Hb.AIntVector(c);this.complexObjectsTable.push(a);return a},readFloatVector:function(){var a=this.readInt();if(0==(a&1))return this.complexObjectsTable[a>>1];a>>=1;var b=0!=this.i.readByte(),c=ia.toFloatVector(null,a);c.fixed=b;for(b=0;b<a;){var d=b++;c.set(d,this.i.readDouble())}a=Hb.AFloatVector(c);this.complexObjectsTable.push(a);return a},readObjectVector:function(){var a=this.readInt();
if(0==(a&1))return this.complexObjectsTable[a>>1];a>>=1;var b=0!=this.i.readByte(),c=qb.decode(this.readString()),d=ia.toNullVector(null,a);d.fixed=b;b=Hb.AObjectVector(d,c);this.complexObjectsTable.push(b);for(c=0;c<a;){var f=c++;d.set(f,this.read())}return b},readByteArray:function(){var a=this.readInt();if(0==(a&1))return this.complexObjectsTable[a>>1];a>>=1;for(var b=new bb(new ArrayBuffer(a)),c=0;c<a;){var d=c++,f=this.i.readByte();b.b[d]=f&255}b=kb.fromBytes(b);b.__endian=0;b.__amf3Reader=this;
b=Hb.AByteArray(b);this.complexObjectsTable.push(b);return b},readInt:function(a,b){null==b&&(b=0);null==a&&(a=!1);var c=this.i.readByte()&255;if(128>c)return c>>b;var d=(c&127)<<7;c=this.i.readByte()&255;if(128>c)return(d|c)>>b;d=(d|c&127)<<7;c=this.i.readByte()&255;if(128>c)return(d|c)>>b;d=(d|c&127)<<8;c=this.i.readByte()&255;d|=c;a&&0!=(d&268435456)&&(d|=-536870912);return d>>b},readString:function(){var a=this.readInt();return 0==(a&1)?this.stringTable[a>>1]:this.readStringNoHeader(a>>1)},readStringNoHeader:function(a){if(0==
a)return Hb.AString("");a=Hb.AString(this.i.readString(a,dn.UTF8));this.stringTable.push(a);return a},readDate:function(){var a=this.readInt();if(0==(a&1))return this.complexObjectsTable[a>>1];a=new Date(this.i.readDouble());a=Hb.ADate(a);this.complexObjectsTable.push(a);return a},readXml:function(){var a=this.readInt();if(0==(a&1))return this.complexObjectsTable[a>>1];a=X.parse(qb.decode(this.readStringNoHeader(a>>1)));a=Hb.AXml(a);this.complexObjectsTable.push(a);return a},readWithCode:function(a){var b=
this.i;switch(a){case 0:return Hb.AUndefined;case 1:return Hb.ANull;case 2:return Hb.ABool(!1);case 3:return Hb.ABool(!0);case 4:return Hb.AInt(this.readInt(!0));case 5:return Hb.ANumber(b.readDouble());case 6:return this.readString();case 7:throw J.thrown("XMLDocument unsupported");case 8:return this.readDate();case 9:return this.readArray();case 10:return this.readObject();case 11:return this.readXml();case 12:return this.readByteArray();case 13:case 14:return this.readIntVector();case 15:return this.readFloatVector();
case 16:return this.readObjectVector();case 17:return this.readMap();default:throw J.thrown("Unknown AMF "+a);}},read:function(){var a=this.i.readByte();return this.readWithCode(a)},__class__:xk};var Zl=function(a){this.i=a.i;this.r=a;this.objectEncoding=3};h["openfl.utils._internal.format.amf3.AMF3ReaderInput"]=Zl;Zl.__name__="openfl.utils._internal.format.amf3.AMF3ReaderInput";Zl.__interfaces__=[Xi];Zl.prototype={objectEncoding:null,i:null,r:null,readBoolean:function(){return 0!=this.i.readByte()},
readByte:function(){return this.i.readByte()},readBytes:function(a,b,c){null==c&&(c=0);null==b&&(b=0);this.i.readBytes(kb.toBytes(a),b,c)},readDouble:function(){return this.i.readDouble()},readFloat:function(){return this.i.readFloat()},readInt:function(){return this.i.readInt32()},readMultiByte:function(a,b){return this.i.readString(a)},readObject:function(){switch(this.objectEncoding){case 0:var a=new wk(this.i);return a=pe.unwrapValue(a.read());case 3:return a=new xk(this.i,this.r),a=qb.decode(a.read());
default:return null}},readShort:function(){return this.i.readInt16()},readUnsignedByte:function(){return this.i.readByte()},readUnsignedInt:function(){var a=this.i.readByte(),b=this.i.readByte(),c=this.i.readByte(),d=this.i.readByte();return 1==this.get_endian()?d<<24|c<<16|b<<8|a:a<<24|b<<16|c<<8|d},readUnsignedShort:function(){var a=this.i.readByte(),b=this.i.readByte();return 1==this.get_endian()?(b<<8)+a:a<<8|b},readUTF:function(){var a=this.readUnsignedShort();return this.readUTFBytes(a)},readUTFBytes:function(a){return this.i.readString(a)},
get_bytesAvailable:function(){return-1},get_endian:function(){return this.i.bigEndian?0:1},set_endian:function(a){return a},__class__:Zl,__properties__:{set_endian:"set_endian",get_endian:"get_endian",get_bytesAvailable:"get_bytesAvailable"}};var qb=function(){};h["openfl.utils._internal.format.amf3.AMF3Tools"]=qb;qb.__name__="openfl.utils._internal.format.amf3.AMF3Tools";qb.encode=function(a){var b=w.typeof(a);switch(b._hx_index){case 0:return Hb.ANull;case 1:return Hb.AInt(a);case 2:return Hb.ANumber(a);
case 3:return Hb.ABool(a);case 4:for(var c=new Ba,d=0,f=la.fields(a);d<f.length;){var g=f[d];++d;b=qb.encode(la.field(a,g));c.h[g]=b}return Hb.AObject(c,null,null);case 5:return Hb.ANull;case 6:switch(b.c){case Array:g=[];for(b=0;b<a.length;)c=a[b],++b,g.push(qb.encode(c));return Hb.AArray(g);case Date:return Hb.ADate(a);case String:return Hb.AString(a);case X:return Hb.AXml(a);case hc:case Ga:case Ba:c=new ng;f=Object.keys(a.h);d=f.length;for(b=0;b<d;)g=f[b++],c.set(qb.encode(g),qb.encode(a.h[g]));
return Hb.AMap(c);case bb:return Hb.AByteArray(kb.fromBytes(a));case Sb:return Hb.AByteArray(a);case Yl:g=[];f=new Ba;b=0;for(d=a.a;b<d.length;)c=d[b],++b,g.push(qb.encode(c));d=c=a.extra.h;b=Object.keys(c);for(var k=b.length,l=0;l<k;){var h=d[b[l++]];c=qb.encode(a.extra.h[h]);f.h[h]=c}return Hb.AArray(g,f);default:return na.__implements(a,Dj)?Hb.AExternal(a):Hb.ANull}default:throw J.thrown("Can't encode "+M.string(a));}};qb.decode=function(a){if(null==a)return null;switch(a._hx_index){case 0:return qb.undefined(a);
case 1:return qb.anull(a);case 2:return qb.bool(a);case 3:return qb.int(a);case 4:return qb.number(a);case 5:return qb.string(a);case 6:return qb.date(a);case 7:return qb.object(a);case 8:return qb.external(a);case 9:return qb.array(a);case 10:return qb.intVector(a);case 11:return qb.floatVector(a);case 12:return qb.objectVector(a);case 13:return qb.xml(a);case 14:return qb.byteArray(a);case 15:return qb.map(a)}};qb.undefined=function(a){return null};qb.anull=function(a){return null};qb.bool=function(a){return null==
a?null:2==a._hx_index?a.b:null};qb.int=function(a){return null==a?null:3==a._hx_index?a.i:null};qb.number=function(a){return null==a?null:4==a._hx_index?a.f:null};qb.string=function(a){return null==a?null:5==a._hx_index?a.s:null};qb.date=function(a){return null==a?null:6==a._hx_index?a.d:null};qb.array=function(a){if(null!=a&&9==a._hx_index){a=a.values;for(var b=[],c=0;c<a.length;){var d=a[c];++c;b.push(qb.decode(d))}return b}return null};qb.intVector=function(a){return null==a?null:10==a._hx_index?
a.v:null};qb.floatVector=function(a){return null==a?null:11==a._hx_index?a.v:null};qb.objectVector=function(a){if(null!=a&&12==a._hx_index){a=a.v;for(var b=ia.toObjectVector(null,a.get_length(),a.fixed),c=0,d=a.get_length();c<d;){var f=c++;b.set(f,qb.decode(a.get(f)))}return b}return null};qb.object=function(a){if(null!=a&&7==a._hx_index){var b=a.fields,c=a.className;a=null;if(null!=c&&""!=c){var d=ha.getClassByAlias(c);null==d&&(d=h[c]);null!=d&&(a=w.createInstance(d,[]))}else a={};if(null!=a&&null!=
b){c=Object.keys(b.h);d=c.length;for(var f=0;f<d;){var g=c[f++];la.setProperty(a,g,qb.decode(b.h[g]))}}return a}return null};qb.external=function(a){return null==a?null:8==a._hx_index?a.o:null};qb.xml=function(a){return null==a?null:13==a._hx_index?a.x:null};qb.byteArray=function(a){return null==a?null:14==a._hx_index?a.ba:null};qb.map=function(a){if(null!=a&&15==a._hx_index){a=a.m;for(var b=a.keys();b.hasNext();){b=b.next();if("number"==typeof b&&(b|0)===b){b=new hc;for(var c=a.keys();c.hasNext();){var d=
c.next(),f=qb.decode(d);d=qb.decode(a.get(d));b.h[f]=d}}else if("string"==typeof b)for(b=new Ba,c=a.keys();c.hasNext();)d=c.next(),f=qb.decode(d),d=qb.decode(a.get(d)),b.h[f]=d;else for(b=new Ga,c=a.keys();c.hasNext();)f=c.next(),b.set(qb.decode(f),qb.decode(a.get(f)));break}return new Ga}return null};var Hb=G["openfl.utils._internal.format.amf3.AMF3Value"]={__ename__:"openfl.utils._internal.format.amf3.AMF3Value",__constructs__:null,AUndefined:{_hx_name:"AUndefined",_hx_index:0,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",
toString:t},ANull:{_hx_name:"ANull",_hx_index:1,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:t},ABool:(n=function(a){return{_hx_index:2,b:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:t}},n._hx_name="ABool",n.__params__=["b"],n),AInt:(n=function(a){return{_hx_index:3,i:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:t}},n._hx_name="AInt",n.__params__=["i"],n),ANumber:(n=function(a){return{_hx_index:4,f:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",
toString:t}},n._hx_name="ANumber",n.__params__=["f"],n),AString:(n=function(a){return{_hx_index:5,s:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:t}},n._hx_name="AString",n.__params__=["s"],n),ADate:(n=function(a){return{_hx_index:6,d:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:t}},n._hx_name="ADate",n.__params__=["d"],n),AObject:(n=function(a,b,c){return{_hx_index:7,fields:a,size:b,className:c,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:t}},
n._hx_name="AObject",n.__params__=["fields","size","className"],n),AExternal:(n=function(a){return{_hx_index:8,o:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:t}},n._hx_name="AExternal",n.__params__=["o"],n),AArray:(n=function(a,b){return{_hx_index:9,values:a,extra:b,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:t}},n._hx_name="AArray",n.__params__=["values","extra"],n),AIntVector:(n=function(a){return{_hx_index:10,v:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",
toString:t}},n._hx_name="AIntVector",n.__params__=["v"],n),AFloatVector:(n=function(a){return{_hx_index:11,v:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:t}},n._hx_name="AFloatVector",n.__params__=["v"],n),AObjectVector:(n=function(a,b){return{_hx_index:12,v:a,type:b,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:t}},n._hx_name="AObjectVector",n.__params__=["v","type"],n),AXml:(n=function(a){return{_hx_index:13,x:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",
toString:t}},n._hx_name="AXml",n.__params__=["x"],n),AByteArray:(n=function(a){return{_hx_index:14,ba:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:t}},n._hx_name="AByteArray",n.__params__=["ba"],n),AMap:(n=function(a){return{_hx_index:15,m:a,__enum__:"openfl.utils._internal.format.amf3.AMF3Value",toString:t}},n._hx_name="AMap",n.__params__=["m"],n)};Hb.__constructs__=[Hb.AUndefined,Hb.ANull,Hb.ABool,Hb.AInt,Hb.ANumber,Hb.AString,Hb.ADate,Hb.AObject,Hb.AExternal,Hb.AArray,Hb.AIntVector,
Hb.AFloatVector,Hb.AObjectVector,Hb.AXml,Hb.AByteArray,Hb.AMap];var Lm=function(a){this.o=a;a.set_bigEndian(!0)};h["openfl.utils._internal.format.amf3.AMF3Writer"]=Lm;Lm.__name__="openfl.utils._internal.format.amf3.AMF3Writer";Lm.prototype={o:null,writeInt:function(a){268435455<a||-268435456>a?(this.o.writeByte(5),this.o.writeDouble(a)):(this.o.writeByte(4),this.writeUInt(a))},writeUInt:function(a,b){null==b&&(b=!1);b&&(a=a<<1|1);1==(a>>>31&1)&&(a&=536870911);b=22;var c=!1,d=a>>>b-1;L.gt(d,0)&&(d>>>=
1,this.o.writeByte(d|128),a-=d<<b,++b,c=!0);b-=8;d=a>>>b;if(c||L.gt(d,0))this.o.writeByte(d|128),a-=d<<b,c=!0;b-=7;d=a>>>b;if(c||L.gt(d,0))this.o.writeByte(d|128),a-=d<<b;this.o.writeByte(a)},writeString:function(a){a=bb.ofString(a,dn.UTF8);this.writeUInt(a.length,!0);this.o.writeBytes(a,0,a.length)},writeIntVector:function(a){this.writeUInt(a.get_length(),!0);this.o.writeByte(a.fixed?1:0);for(var b=0,c=a.get_length();b<c;){var d=b++;this.o.writeInt32(a.get(d))}},writeFloatVector:function(a){this.writeUInt(a.get_length(),
!0);this.o.writeByte(a.fixed?1:0);for(var b=0,c=a.get_length();b<c;){var d=b++;this.o.writeDouble(a.get(d))}},writeObjectVector:function(a,b){this.writeUInt(a.get_length(),!0);this.o.writeByte(a.fixed?1:0);this.o.writeString(b);b=0;for(var c=a.get_length();b<c;){var d=b++;this.write(a.get(d))}},writeObject:function(a,b,c){null==b?this.o.writeByte(11):this.writeUInt(b<<4|3);this.o.writeByte(1);if(null==b){c=a.h;c=Object.keys(c);for(var d=c.length,f=0;f<d;){var g=c[f++];this.writeString(g);this.write(a.h[g])}this.o.writeByte(1)}else{b=
[];c=a.h;c=Object.keys(c);d=c.length;for(f=0;f<d;)g=c[f++],b.push(g),this.writeString(g);c=0;for(d=b.length;c<d;)f=c++,this.write(a.h[b[f]])}},writeExternal:function(a){this.writeUInt(7);var b=na.getClass(a),c=null;ha.__registeredClasses.exists(b)&&(c=ha.__registeredClasses.get(b));null==c&&(c=b.__name__);this.writeString(c);b=new Sb(0);b.__endian=0;a.writeExternal(b);this.o.writeBytes(kb.toBytes(b),0,kb.get_length(b))},write:function(a){var b=this.o;switch(a._hx_index){case 0:b.writeByte(0);break;
case 1:b.writeByte(1);break;case 2:var c=a.b;b.writeByte(c?3:2);break;case 3:this.writeInt(a.i);break;case 4:c=a.f;b.writeByte(5);b.writeDouble(c);break;case 5:c=a.s;b.writeByte(6);this.writeString(c);break;case 6:c=a.d;b.writeByte(8);b.writeByte(1);b.writeDouble(c.getTime());break;case 7:var d=a.fields;c=a.size;a=a.className;b.writeByte(10);this.writeObject(d,c,a);break;case 8:c=a.o;b.writeByte(10);this.writeExternal(c);break;case 9:c=a.values;a=a.extra;b.writeByte(9);this.writeUInt(c.length,!0);
if(null!=a){d=a.h;d=Object.keys(d);for(var f=d.length,g=0;g<f;){var k=d[g++];b.writeString(k);this.write(a.h[k])}}b.writeByte(1);for(a=0;a<c.length;)b=c[a],++a,this.write(b);break;case 10:c=a.v;b.writeByte(13);this.writeIntVector(c);break;case 11:c=a.v;b.writeByte(15);this.writeFloatVector(c);break;case 12:c=a.v;b.writeByte(16);this.writeObjectVector(c);break;case 13:c=a.x;b.writeByte(11);this.writeString(Th.print(c));break;case 14:c=a.ba;b.writeByte(12);this.writeUInt(kb.get_length(c),!0);b.write(kb.toBytes(c));
break;case 15:for(c=a.m,b.writeByte(17),this.writeUInt(le.count(c),!0),b.writeByte(0),b=c.keys();b.hasNext();)a=b.next(),this.write(a),this.write(c.get(a))}},__class__:Lm};B.$haxeUID|=0;"undefined"!=typeof performance&&"function"==typeof performance.now&&(y.now=performance.now.bind(performance));h.Math=Math;null==String.fromCodePoint&&(String.fromCodePoint=function(a){return 65536>a?String.fromCharCode(a):String.fromCharCode((a>>10)+55232)+String.fromCharCode((a&1023)+56320)});Object.defineProperty(String.prototype,
"__class__",{value:h.String=String,enumerable:!1,writable:!0});String.__name__="String";h.Array=Array;Array.__name__="Array";Date.prototype.__class__=h.Date=Date;Date.__name__="Date";var pm={},bp={},Qo=Number,Po=Boolean,$e={},Xn={};na.__toStr={}.toString;df.content=[{name:"__ASSET__:bitmap_flixel_system_GraphicLogo",data:"aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUdRQUFBQmtDQU1BQUFCSFBHVm1BQUFCRGxCTVZFVUFBQUE3UVA4NVFmOER6ZnNFenZzRXpQdjNKRTBBelArM1MwTUR6UHdEemZvRHpmb0V6ZnNBenY4N1FQODZRUDh6UlAvL3dqRTZRdjg2UVA4RHkrZzZRUDg3UVAvL3dESC93REwwSms3MUowNy94VEgvd1RML3pEUDFKazcvSWtUL3dURC93REgxSmszMUprNzNJVXIwSms0QXp2L3R3REQwSjAzL3dESC93ekVEelB2QVJrVXNYOGZJdnk3L3dURDBKa3ovd0RJN1FQLy93akQvd1RML3dERUxva3NXakhRM1NQRTdRZjhEc1M4a2Jxd3ZWOVVPbTFrRHkrMEN4YWtDdzQ0aGRaNHpVT01BdkVvRXpmc0J2MlVCd0hQMUowNEF1U0xsTUV2L3dUTEhRa1ZiZ2pMUHZ5OFB1U09aWFQyZnZpeVB2U3N0blNwZnZDanZ3REVQcnlTdnZpMGVwaWQ2Y0RndnVpWEtyZHZYQUFBQU5uUlNUbE1BdnovdlA3OC9ENzlmbjk5L0grK2ZEejhmZjcvZlgrK2ZYOThmZncvUEQxL2ZuMzhmN3kvZnY3OHZyOSsvMzI4dnI0OVBqOC81R3BYYUFBQUNrVWxFUVZSNDJyWFdCWkliTVJoRTRWNW1abVlNODBJNHMyQTd6TG4vUVVMMEtvbzljZWVYM3dXKzZwb2FTYW8yYkhaQlZpdnJadzBDK2J1WnhTV0QyTmc2TXhFWWczQVJtTlZtakxuNU0yb2VvYlZWZzdBUm1MRXlvbnY1akh5RTltQlNZdmVNYkNSbDl1c1JWeUVjeFBsdE52a3g0Z2lNUi9nSXZ3MC9SbjRFQmlJL3d0ODVCNUVYb2NzWHo4eDg1Tm56ZHpVWDhZM3pjNVRjQ0lhdHlEZDhSYjd4b3hldFF0NWpvR1JHWGlKNGluekRWK1FidmlMZjhCWDVocS9JTjN4RnZ1RXIybk9OdEk5TklHTzJrZmIwMzRobVhjTlhwS1Vaei9DVmVVbFhTbzFYNTBtK01pZEpheVhHbTNPeUZZWklZNGJoS1F5UnJobUdwVEJFV3BneERFdGhpTFFZTUZBcVpVT2twVFhYSUhxTlVtZUlkTU13TEdWWm9qM0RjSlJ1aWZZTncxQjI5VWMzY3hnb0RDR09NSXlvd2hCYURSc29ERW03OVpONCt5bGlvREJFTklhUlNXRUl6V0xFK2xCakNQSHRNU0s5cXpFa2JSRWpyREFrYlFjanJEQWs2ZExSZVRhbFYvVnJQN3liVFhreXFmcTFIYUpFamZ0Rlo0TWhoeWhobytocU5PUnJ4NW1NZ2luSkVKU3d3WlJrQ0VyWVlFbzZCQ1Z1TUNVZGdoSTNtSklPUVlrYlRHRklGdVVFZ3lrTVNYcjBYOFpwUVV4aFNOcWRxTUVVaHNRVkRMcVFESWtvR0dsRHlaQ0FncEhXTDRZWWltRXdoU0VSQlNPZHdoQkRNUXltTUlUb1hzUmdDa09JRG00SERLWXd4RmN3U3Fjd3hGY3d5bU9Jb1poR3dSQkRNWTJDSVlaaUdnVkRETVUwQ2gwMjErTWp6L0FSSG4yZUFSSlFIaFl1NGlzUGl0d0lDa1p1QkFVak40S0NrUjFCd2NpTjBERkdmZ1FGSXorQ2dwRWZRY0ZvR1RJeVB0VGZZcVN0WFpLMnV6ekVKNzdYQ1pNWG1ab1dPWXhzZ3ZvR01pUERFeUtYVVpQRXFNaGdET1E2aE5KNkJqc2lDRCtHeUdBTXBBM0NZQ3lFSDZPODhrUGdDNTI5U3ZkVGZJcUtBQUFBQUVsRlRrU3VRbUND"},
{name:"__ASSET__:file_flixel_system_VirtualInputData",data:"YmFzZSA9IDI2NiA0NiA4NCA4NAp0aHVtYiA9IDI2NiAxMzEgNTIgNTIKYSA9IDAgMCAxMzIgNDUKYiA9IDAgNDYgMTMyIDQ1CmMgPSAwIDkyIDEzMiA0NQpkb3duID0gMCAxMzggMTMyIDQ1CmxlZnQgPSAxMzMgMCAxMzIgNDUKcmlnaHQgPSAxMzMgNDYgMTMyIDQ1CnVwID0gMTMzIDkyIDEzMiA0NQp4ID0gMjY2IDAgMTMyIDQ1CnkgPSAxMzMgMTM4IDEzMiA0NQo"},{name:"__ASSET__:bitmap_flixel_system_GraphicVirtualInput",data:" "},
{name:"__ASSET__:bitmap_flixel_system__FlxPreloader_GraphicLogoCorners",data:"aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUVBQUFBQkFDQVFBQUFBQVlMbFZBQUFFT1VsRVFWUjQybHlOaFJFRFFSRERGR2JxdjVzVTlNenNjVGluMFI2dlo5elprSk1SbTBpcmxKSktOTFIwOUdZd0krSTlnM3hYbUNIRkhHbVdMT1NLdFRLMkhNV0ZHMWQ1MW5yTG5ucXA1WXFlaGlVNHBIblR5dDZNY25pRnY4SDFQWjd4UE9NWHIvZlA4Nlc3RFY1dEZIMlFSK281T1NrSk1aRUlST2hWVENweUNsSEs2a245cHJILzFMaUs4a2xCVGtaSy9Nd0l2VXJKM0xtY1V6a21JeUdXa1d2NmZGQlJ5cWs0TStCdEdvYUNjSG1VdHF3dytQLy9jMXFsTm9oMy9YU2NMSVZLRzR2eHlZNmJacm52bloxVTBtS1liS3hiOXlqZkJPZ2lDR04wbC9TWnUxMUxGeWlGRmdoOWtaRGdINHh2V0Q3UW9qRVFUa1BaZ1pEaVZKb0J1djZXQUd6dnIxRnFIYTBXWmxIT0l6SnhEaXEwWlFleXZSWmtzQTFmeFRxR3RyTitXZFlBZzVLRUVkb3RHWlREdVkrdk5uZkZObkpubExURFI2MmNEd3hKWEx3cEJjSVNBeUM5c05zeHg1WXh0MlpFek5hMURzRmlnQ0QxVVFCKzBPQng0QktXYU1YeWIyMThTK1FlTnlrcCtCRXZieEFIMzNwb2Fac0hvbzE1TEJyWkUzYVVQUURZVS8yQ09YcGc5cWl0LzdWenVBNElGd0hrT1Y5YytYQzc5N1lSd3hETDhHQUMwSks5NngvSi83WDVIaXdvQU5lOG9NclB1K3k1MlAzalduTHdRb0FnQVVEOVh2MnRXaks0a1lJRWdPTjNBdHZZcTZuSUFhRTBUZjFiSmdBRUdZQWdsVjg5Vzhmdm93Q01JQlVIb3RsOEVad0FBRXNBbG0wVEdDR01nQ28vclBCTkFURENUUUMzSU15eEgzL2NLK1pveXgyd3RnaVYzM3BmTUNPRGFDV0J6ZDhEeUFBY0J1c1pDSXNSS2dzd0J5SUpnRkEyanYwc0NFb3ZEWFBOY1RSRXpZN2ZSKys3OG9tTTI5bXZMVVQyZ05rbXRDUXVnTW5OMXA0cGdmL1hQaldBaHZtMk9aWW5ibk9CU0NDYTFYRFRzUXd3ZVFHd2w1S0FUMjFySFpjeUFCTkVtNGRRQWtCekYwRXFSdHRiOCt5bHo3dlNFSWpOSDBJdkFQYnFPa2dnVExRSHdRQWxUZHFHU0w1N0FMNzBSTk5QMFZiVnAzN0tsbk5oejRwc1oyL3pJQ1NCUFJsTWVoZ2R2eVRuTDdVNzZERHNCR21qN2VjTmlMbThCWERVQnhZaUs3WFJHN0JjdnhHcTdROFNBTWkwSHhXNlo1THJUd0pIU2RPa0VPSkI0MTVlRjIzdFRMbisvQjlKcXQxcDk3VzdQZ0F3N2dXampMdDR0Y1Y2L2IxdmV5cDM4dFgyVDkyQk9CZ0IrWS9mcmZLWTJsMTlkNVYrRklBUmtnTVl5Y0tqdTJlZXh5eld5TWEyZHZRblNVY1NPTGVlV2lBY3ZCaCtSVEdtZSthNXI3QnlEZmV3ZFV2V2xQeEU0WVY5NnhzbjcyUUhiMHJFYmQ2a3ZZVzVLOGVhY2dWQ0FnYVFqT0RuSWhnY0h5dVc3dDV3eEk3NTJRamVBekwvVG0rZCtjTExnVUI1Z3c2T2ZLamNaWDRIZ1FST1F1QzBCSUtUR0NDWUlRd3NtNDdDbWpVWFFGeVVnczRkZVJQS2p2b053QVZHUUVaWVU2N0lYTmJzZG05emwrakZQZ0Z3dnA5OGJ2M2MvYmpyZVZnTVFJekM2Tm1hK01aVlo0dkw0MGQ3ZEc4OU80Zjk3cVgzN09YUGY3YUxoNlkvK2YvZVM2djBhZVdmR2ZwKy9PUmU0ODh1NmptL05Fdjd2ZDdudDk4YlN4R0tIQlprUkFBQUFBQkpSVTVFcmtKZ2dnPT0"},
{name:"__ASSET__:bitmap_flixel_input_mouse__FlxMouse_GraphicCursor",data:"aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUJnQUFBQWdDQVlBQUFBSVhyZzRBQUFCcFVsRVFWUjQyclRSQTVLRFFSQUY0QnhnYmR1MjdUM0RvckMyelR1dGJkdTJiYU5qZFp4TVh0VXJ6WFIvUHlqYUpzYU5GQ1dHRGdCNUJBSGtFUVJvR1JzaGhEQ2dZV2lJRVNVQVJvemxDQ0VJcEJlVVFtQkVCRUVFQWNXMXpUQzlzQW8rSWNFRUVRVDBUU3pCNmZrNWVBVUdFa0lRMERvd0F5ZVh0M0J5ZWdydS9uNWtFQXdNejZ3QlBmc0hCK0RpNDQwUUFnQzlkdy9QREdSbmR4Y2NQVDBRUWdDWVdka0JkamEzdDhETzNVMStCQVBzdnJ4OUFEdHJHeHRnNCtLTUVjV0E1YTFENE0zaThoSllPanBnUkg2Z1kzZ092cjUvK0pDNWhRWFpFUXp3ZHZ2Z0RIQW1wcWZBMk1ZYUkvSUIzV01MOFB2M0J6aGpFeFBTSXhqQVBUcS9CbUVaR0I0Q1Ewc0xqTWdPREU2dmdLaDA5L1pLUUNRQXlSbDU0T1lmQkNFeHNSQ1ZtQ2kwN0orT0VZbEFhbVlCcU9ycU1hcHBhSWlXU0d5aldDQ3pxSkt4V0UxUEQ3U01qR1JiamhFTUZGUTFNSmFyNnh1d0wvYlI2aTFucVdORHNhQzBvUTA5U0xZRE1TZFY2Z05iVncrZ3dWTElsZjlHa0F1b1ZhTUJzUVJ5K0swR0dVN2xoaGVtNGJTd1lDa1FNOU9xNlRnZlpqZ3RMSmhKeThidlpBWWFBZ0JJUDV2ZHJxV1ZzQUFBQUFCSlJVNUVya0pnZ2c9PQ"},
{name:"__ASSET__:bitmap_flixel_system__FlxPreloader_GraphicLogoLight",data:"aVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQUVBQUFBQkFDQVlBQUFDcWFYSGVBQUFGT1VsRVFWUjQycjJhQ1E3VE1CUkUyN0t2MStFY1hJUTdjVVQyblVKUXFoZmxFVDBVbVZnYTJXM2NaZWJQLzNiY25rNnZYdjlQbkFmaDlMOXc1L1RpNVdsd093TmZDL1RyeHJaeEFvejc4cnltQkI0bndIamlaOEc0OExwd2crZnhPY2NMME1ROU52bTRybXZ4UFk0Vm9DSnVzaDd2aUhvNFlaOFFsMzNrVFR5aWVkbUxFRWxDREhaQTI5dEVsNFQ5WElnaWdoNURNdVlOZDBDN3dZVHYwQWNhWitHSUdqREMzcERRT0MzZmhIbGN3b1FBSFdIMW01WTIyWGFDaGFBUHEwZHgzaWxBVjJFVHBsL2hMZ0FsaGdTTzZDYngvUUxRdC8waHZTSi9iOVV6SjkzUUtWQk9TQUdhUEdqaWtBYkx4NzRHZUsrb0NVbE84d1lKd0pleTVTRmprdmNuTUxZQUFQSnlna2xkUTRpc0FYdklROXJrSVF3ZWJEeG1MdVNWQ3JrYUlFU21jd2pnSmNWd1ZYZkVJUW9FQ2JHcUQ1VUcxeUI5N1hxQUFDYmZCYy81YnVJUEo2ekdqM2lNR0U0SE84QmtUSm8rVXFFRU1DQU9uT2VRZy9DeXR4Q2toK3VBOHorSVI1TVlFa0RSajJydmZEZkp4Mzk2OEhnRzgrd0Mxd0RhV2RGbVROL2lXSUIvTFh4cGU1Tjlzc0JqUk5sMmdlOEJIUFVBNUVPQWlMNWQ4SGNCSUE5RVhDTGdBdFVCV1g4bjhXc1dRUk1IVWZnZ2I5c3Z5VCs5allFRm1LSG95KzdnSjMxRjMwS2tBQnQzYzhwOWs1OEFlWTBoLzlnMUFQSWlBRmtERVl4T2dkN3hiVGlBM01mMml2Nk1aMHN4bUwrS3Z2SmV4SDhBa1pjUVVRdk9rd0RLZnhjKzUvNEV5TnNCRUljMFFBQ1JWOVVYZVVTUUVFNkoyaGhkZXJPQUtMMGZjRXJNd0FuZytlUUtRV2t5d1VzbGdubkR4TGk1eVFFbUNyUUV4dExuM0ljWXI1MEo4Umx6VTZTL0E3QzZiaGZRcmlBZFlQVktHSW1qZXdIdERCOXJvd1NZN3p2SXUzVjJrTDlVV1lCdXZVemFKYkZiaENRaU1VOEhLVDVtaTVQa0lDOEJpaXpOdVdZM1dBd0xzeHdEdlVhRWhTQ3UxZ0wwSFZYOVdoT25PZkViZ1FSdVZHc0IyaTVSVkRUV2tpUjRxWXZYTWgvNDJuZ0hNSTR2NHpXYjhSTGZKbFJsMS91QUl0K2NFTURSVmlRMWhtZ3NWOTlXK1BJYlgvLzA0UE9FMnpXQVNFdXhZZ2NvQjVZSWx4M0svVFJNSENJUW5mdVA4L2pUTko3eGFRSnp3RTJNY0VuZUVlNVlCU0t2SFhrVEo3cWZWb1EvTFBDUkhpQUlvaWgxdEIyMkNCS2k5Z0ZiQ3NwcTI1WW42cEQvc01MNzMzaTN3SHVBR0N0WGtCcHlnQUJ4OFpJRFBDbWl6bmpUOGxoOFJmcHRBRkZTQ0p3ZzRsa280WGZwQXdSWGVWdWZJaWNCSFBFbDRUZEw4RHh1VUgyQVBFNndJMDVaQVB0SWpER0lQei9nS2gxaFNUQ0pwUnBCand0d3c1WVRuQmFPZmd2UXY3M2ZFTC9nWGlObEpBQUFkZ0hrNVFaRXVBbzZYb3RUNFNEdDIyZWF5R3VsQUo4aHR5VHJxQk41Uk5DS0VJVXdmaG1pMzNLRWdBaXN0Ym9uMTJyaHpSQWtQem5xTTVqck9nRDQzTjRmK0xmQkZvS3hYK09WQTZoZ1NvUVZSSDdMOWhIOUxvSW1aL3ZIZFgvQTBnVVVxRzg0WUlKRjJINk05WHRIYU9oWHBSU2dDNkd2bTd5M3lpMkNpWU52MitSQjdBUnArZitBYUtxcWtFY0U3eHVvQS9UZklHblNRZDdSNzUxZ0M5QVJ0eEFBOG1EN2J0RkVJUThnN2pVZlJPRUxCMlNoTS9td0d1UWxnb1FnTlJocnh3ZjVKajd3WDJMZCtzNFJRRWhpUUJUaUNLZEtIOGZnNnZjSTRQRlZ6OGR4RmNBTkVLWFhXRERodUEwZWVTanE1L2hDa0lzemdvVHpIbFRPbHpQVEFmdWRZQmZFM1NTQUZHTmZkOVQ3SHlMai95NnZQcHVKNjFoTks0Y2pISWlEbkVFQ0JHbDlhTGtCT0s5WHlLVXRIRGxFZ053dGRoUnMyU0FjeFMxRnA0MFhvTVhaSm0xU29BWGNFZlhSQXZRL3Nxc2lCNEdJYkZ3N1FJRGNGc2NYMjduczlwempCV2czZERPUmN4TnY4a2NMME9UN1dwUHJhOGNMTUlEc2JqR09GMkM4TUNaNmNQc0ZMZ2kyUWU0OEVWTUFBQUFBU1VWT1JLNUNZSUk9"}];
null==ArrayBuffer.prototype.slice&&(ArrayBuffer.prototype.slice=fo.sliceImpl);"undefined"==typeof window&&(B.onmessage=function(a){a=a.data;try{B.onmessage=(n=Ab.__current,q(n,n.dispatchMessage)),jn.toFunction(a)()}catch(b){db.lastError=b,Ab.__current.destroy()}});K.__alpha16=new Uint32Array(256);for(var Gi=0;256>Gi;){var Fj=Gi++;K.__alpha16[Fj]=Math.ceil(257.00392156862745*Fj)}K.__clamp=new Uint8Array(511);for(Gi=0;255>Gi;)Fj=Gi++,K.__clamp[Fj]=Fj;for(Gi=255;511>Gi;)Fj=Gi++,K.__clamp[Fj]=255;Pe.available=
!1;Pe.enabled=!1;Pa.level=3;"undefined"==typeof console&&(console={});null==console.log&&(console.log=function(){});C.hitTestCanvas=If.get_supported()?window.document.createElement("canvas"):null;C.hitTestContext=If.get_supported()?C.hitTestCanvas.getContext("2d"):null;ff.maxTouchPoints=2;ff.supportedGestures=null;ff.supportsGestureEvents=!1;ff.inputMode=2;ia.__meta__={statics:{toNullVector:{SuppressWarnings:["checkstyle:Dynamic"]}}};da.__meta__={fields:{__cairo:{SuppressWarnings:["checkstyle:Dynamic"]},
addEventListener:{SuppressWarnings:["checkstyle:Dynamic"]},removeEventListener:{SuppressWarnings:["checkstyle:Dynamic"]}}};da.__broadcastEvents=new Ba;da.__instanceCount=0;da.__tempStack=new Jc(function(){return ia.toObjectVector(null)},function(a){a.set_length(0)});$a.music_goes_here__txt="assets/music/music-goes-here.txt";$a.ambientloop__mp3="assets/music/ambientloop.mp3";$a.bell__png="assets/images/bell.png";$a.wall_right__png="assets/images/wall_right.png";$a.wall_left__png="assets/images/wall_left.png";
$a.wall_2_left__png="assets/images/wall_2_left.png";$a.wall_2_right__png="assets/images/wall_2_right.png";$a.wall_3_left__png="assets/images/wall_3_left.png";$a.wall_3_right__png="assets/images/wall_3_right.png";$a.coral2__png="assets/images/coral2.png";$a.swordfish__png="assets/images/swordfish.png";$a.seaweed2__png="assets/images/seaweed2.png";$a.seaweed__png="assets/images/seaweed.png";$a.medusa__png="assets/images/medusa.png";$a.ahven__png="assets/images/ahven.png";$a.tether__png="assets/images/tether.png";
$a.plankton__png="assets/images/plankton.png";$a.translucentboi__png="assets/images/translucentboi.png";$a.leviathan__png="assets/images/leviathan.png";$a.whale__png="assets/images/whale.png";$a.number__png="assets/images/number.png";$a.o2_alarm__png="assets/images/o2_alarm.png";$a.ui__png="assets/images/ui.png";$a.log_bg__png="assets/images/log_bg.png";$a.radiobubble__png="assets/images/radiobubble.png";$a.page__png="assets/images/page.png";$a.desktop1__png="assets/images/desktop1.png";$a.desktop2__png=
"assets/images/desktop2.png";$a.desktop3__png="assets/images/desktop3.png";$a.radiobubblesmall__png="assets/images/radiobubblesmall.png";$a.atlantis__png="assets/images/atlantis.png";$a.bubbles__png="assets/images/bubbles.png";$a.sounds_go_here__txt="assets/sounds/sounds-go-here.txt";$a.alarmloop__mp3="assets/sounds/alarmloop.mp3";$a.drone__mp3="assets/sounds/drone.mp3";$a.endradio__mp3="assets/sounds/endradio.mp3";$a.ghostbrawl__mp3="assets/sounds/ghostbrawl.mp3";$a.ghostcoughing__mp3="assets/sounds/ghostcoughing.mp3";
$a.newzone__mp3="assets/sounds/newzone.mp3";$a.radio__mp3="assets/sounds/radio.mp3";$a.winchloop__mp3="assets/sounds/winchloop.mp3";$a.riser__mp3="assets/sounds/riser.mp3";$a.data_goes_here__txt="assets/data/data-goes-here.txt";$a.notjamuicondensed19__fnt="assets/fonts/notjamuicondensed19.fnt";$a.notjamuicondensed19__png="assets/fonts/notjamuicondensed19.png";$a.notjamchunkysans6__fnt="assets/fonts/notjamchunkysans6.fnt";$a.notjamchunkysans6__png="assets/fonts/notjamchunkysans6.png";$a.notjamoldstyle11__fnt=
"assets/fonts/notjamoldstyle11.fnt";$a.notjamoldstyle11__png="assets/fonts/notjamoldstyle11.png";$a.allFiles="assets/music/music-goes-here.txt assets/music/ambientloop.mp3 assets/images/bell.png assets/images/wall_right.png assets/images/wall_left.png assets/images/wall_2_left.png assets/images/wall_2_right.png assets/images/wall_3_left.png assets/images/wall_3_right.png assets/images/coral2.png assets/images/swordfish.png assets/images/seaweed2.png assets/images/seaweed.png assets/images/medusa.png assets/images/ahven.png assets/images/tether.png assets/images/plankton.png assets/images/translucentboi.png assets/images/leviathan.png assets/images/whale.png assets/images/number.png assets/images/o2_alarm.png assets/images/ui.png assets/images/log_bg.png assets/images/radiobubble.png assets/images/page.png assets/images/desktop1.png assets/images/desktop2.png assets/images/desktop3.png assets/images/radiobubblesmall.png assets/images/atlantis.png assets/images/bubbles.png assets/sounds/sounds-go-here.txt assets/sounds/alarmloop.mp3 assets/sounds/drone.mp3 assets/sounds/endradio.mp3 assets/sounds/ghostbrawl.mp3 assets/sounds/ghostcoughing.mp3 assets/sounds/newzone.mp3 assets/sounds/radio.mp3 assets/sounds/winchloop.mp3 assets/sounds/riser.mp3 assets/data/data-goes-here.txt assets/fonts/notjamuicondensed19.fnt assets/fonts/notjamuicondensed19.png assets/fonts/notjamchunkysans6.fnt assets/fonts/notjamchunkysans6.png assets/fonts/notjamoldstyle11.fnt assets/fonts/notjamoldstyle11.png".split(" ");
bd.TEXT_COLOR=15327194;bd.TEXT_STROKE_COLOR=855052;bd.TEXT_COLOR_DARK=855052;bd.TEXT_STROKE_COLOR_DARK=15327194;Na.idEnumerator=0;Ha.defaultPixelPerfectPosition=!1;Ha.SEPARATE_BIAS=4;Ha.defaultMoves=!0;Ha.LEFT=1;Ha.RIGHT=16;Ha.UP=256;Ha.DOWN=4096;Ha.NONE=0;Ha.CEILING=256;Ha.FLOOR=4096;Ha.WALL=17;Ha.ANY=4369;R.defaultAntialiasing=!1;Ic.__meta__={fields:{glProgram:{SuppressWarnings:["checkstyle:Dynamic"]}}};Rb.MaxDepth=8740;Rb.Zones=[{depth:0,depthMultiplier:1,title:"I. THE EPIPELAGIC ZONE",logs:[{text:"10/07/1991\n\nExpedition day one, no hiccups.\nWe're in luck."},
{text:"10/09/1991\n\nSimmons has a stick further\nup his ass than usual.\n\nOr a bigger stick."},{text:"10/13/1991\n\nThe ocean is beautiful.\nIt's a damn shame we spend\nso much time collecting samples.\n\nCan't wait to go deeper."},{text:"10/13/1991\n\nMy promotion to team leader\ncan't be far away.\nI know my job too well.\n\nSimmons does not."}],radioResponse:"Copy\nBathysphere,\ndo you confirm\nreturn to\nsurface?\n\n(Y/N)",allowReturn:!0},{depth:200,depthMultiplier:4,title:"II. THE MESOPELAGIC ZONE",
logs:[{text:"10/28/1991\n\nWhy is everyone tense?"},{text:"11/02/1991\n\nSimmons is a thorn in my side.\nI know damn well how\nto calibrate the equipment."},{text:"11/13/1991\n\nI'm held back by incompetence\n and politics. The chain of command\nwon't listen.\n\nNo one listens."}],radioResponse:"Copy\nBathysphere,\ndo you confirm\nreturn to\nsurface?\n\n(Y/N)",allowReturn:!0},{depth:1E3,depthMultiplier:8,title:"III. THE BATHYPELAGIC ZONE",logs:[{text:"11/25/1991\n\nI can't work with this\nlack of respect. Feeling my\npassion for marine geology\nfade away is torture."},
{text:"11/26/1991\n\nI need a day off and a drink,\nor several. 36 days to go."},{text:"11/29/1991\n\nEveryone is coughing?\n\nFlu onboard?",sound:"assets/sounds/ghostcoughing.mp3",soundDelay:1E3}],radioResponse:"Bathysphere,\nare you sure\nyou want to\nreturn to\nsurface?\n\n(Y/N)",allowReturn:!0},{depth:4E3,depthMultiplier:7,title:"IV. THE ABYSSOPELAGIC ZONE",logs:[{text:"you\n    dont\n    understand\nthe\n      depths"},{text:"12/15/1991\n\nI couldn't stop my nosebleed\nlast night."},{text:"12/17/1991\n\nAll samples from today\nare unusable.\n\nWhat are we doing?"},
{text:"12/23/1991\n\nThe next time Simmons tries\nto pin the blame on me,\nI will snap."}],radioResponse:"Bathysphere,\nare you sure\nyou want to\nreturn to\nsurface?\n\n(Y/N)",allowReturn:!0},{depth:6E3,depthMultiplier:7,title:"V. THE HADOPELAGIC ZONE",logs:[{text:"you\n   are\n    not\n     a\n      deep\nsea       \nresearcher"},{text:"12/27/1991\n\nA brawl on Christmas.\nIronic.\nWe broke some very expensive\nequipment and the team doesn't\nwant to resurface to face\nthe consequences.",sound:"assets/sounds/ghostbrawl.mp3",
soundDelay:1E3},{text:"01/13/1992\n\nThere is no food. We need to\ndeal with the repercussions.\n\nNo one listens."},{text:"01/16/1992\n\nMy shoulder won't heal."},{text:"01/18/1992\n\nI'm still bleeding."}],radioResponse:"Negative.\nYou cannot risk\nthe investigation\nat this point.\n\nContinue\ndescent.",allowReturn:!1},{depth:8E3,depthMultiplier:4,title:"VI. THE DEMERSAL ZONE",logs:[{text:"why\n      do\n      you\n      keep on\n            descending"},{text:"01/29/1992\n\nWhy haven't we starved to death?"}],
radioResponse:"",allowReturn:!1},{depth:8600,depthMultiplier:.5,title:"VII. THE BENTHIC ZONE",logs:[{text:"02/14/1992\n\nI smashed the nav station to pieces.\n\nThey had their chance."},{text:"the\n   depths\n        \nshow\n   their\nbeauty"}],radioResponse:"",allowReturn:!1}];Rb.ZonePixelLimits=Rb.getZonePixelLimits();Xb.__fontByName=new Ba;Xb.__registeredFonts=[];Ge.MIN_CAVE_WIDTH=420;Ge.MAX_CAVE_WIDTH=520;Ge.BELL_MAX_SPEED=10;Ge.BELL_ACCELERATION=10;nb.SCREEN_WIDTH=320;nb.SCREEN_HEIGHT=180;nb.FADE_DURATION=
.33;nb.DOWN_KEYS=[83,40];X.Element=0;X.PCData=1;X.CData=2;X.Comment=3;X.DocType=4;X.ProcessingInstruction=5;X.Document=6;ph.FADE_DELAY=4E3;ph.FADE_DURATION=4;N.pool=function(a){return new hg(function(){return new N(0,0)})}(this);V._pool=function(a){return new hg(function(){return new V(0,0,0,0)})}(this);wa.__meta__={fields:{equals:{SuppressWarnings:["checkstyle:FieldDocComment"]},to3DString:{SuppressWarnings:["checkstyle:FieldDocComment"]},toMozString:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};
wa.__identity=new wa;wa.__pool=new Jc(function(){return new wa},function(a){a.identity()});wa.__matrix3=em._new();Ub.__pool=new Jc(function(){return new Ub},function(a){a.__identity()});jb.defaultZoom=1;jb.drawVertices=ia.toFloatVector(null);jb.trianglesSprite=new Ka;jb.renderPoint=function(a){var b=a=0;null==b&&(b=0);null==a&&(a=0);a=N.pool.get().set(a,b);a._inPool=!1;return a}(this);jb.renderRect=function(a){a=V._pool.get();var b=0,c=0,d=0,f=0;null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);null==
b&&(b=0);a.x=b;a.y=c;a.width=d;a.height=f;a._inPool=!1;return a}(this);Mi.sha="";jg._arrayFloatHelper=null;jg.MULTIPLIER=48271;jg.MODULUS=2147483647;ee.invalidChars=new E("[ ~%&\\\\;:\"',<>?#]+","g");u.autoPause=!0;u.fixedTimestep=!0;u.timeScale=1;u.animationTimeScale=1;u.worldDivisions=6;u.VERSION=new Mi(5,9,0);u.elapsed=0;u.maxElapsed=.1;u.scaleMode=new Va;u.worldBounds=function(a){a=V._pool.get();var b=0,c=0,d=0,f=0;null==f&&(f=0);null==d&&(d=0);null==c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a.width=
d;a.height=f;a._inPool=!1;return a}(this);u.save=new ee;u.random=new jg;u.swipes=[];u.html5=new mm;u.inputs=new nm;u.console=new km;u.log=new om;u.bitmapLog=new im;u.watch=new tm;u.debugger=new lm;u.bitmap=new hm;u.cameras=new jm;u.initialWidth=0;u.initialHeight=0;u.signals=new sm;u.assets=new gm;lg.muted=!0;Zh.PREROTATED="prerotated_animation";Ed._pool=new hg(function(){return new Ed});Ed._boundObjects=new Ga;lc.defaultPersist=!1;Ya.__pool=new Jc(function(){return new Ya},function(a){a.setTo(0,0)});
Zd.point=new Ya;Zd.matrix=new wa;Zd.defaultMinSize=function(a){var b=a=128;null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);a=N.pool.get().set(a,b);a._inPool=!1;return a}(this);Zd.defaultMaxSize=function(a){var b=a=1024;null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);a=N.pool.get().set(a,b);a._inPool=!1;return a}(this);ea.__pool=new Jc(function(){return new ea},function(a){a.setTo(0,0,0,0)});rc.SPACE_CODE=32;rc.TAB_CODE=
9;rc.NEW_LINE_CODE=10;rc.DEFAULT_FONT_KEY="DEFAULT_FONT_KEY";rc.DEFAULT_FONT_DATA=" 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";
rc.DEFAULT_CHARS=" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";rc.point=new Ya;rc.flashRect=new ea;cb._point=new Ya;cb._rect=new ea;cb._matrix=new Ze;Bf.attFinder=new E('(\\w+?)=("?)(.*?)\\2(?=\\s|$)',"");Dd.drawCalls=0;Li.VERTICES_PER_QUAD=4;ig.point=function(a){var b=a=0;null==b&&(b=0);null==a&&(a=0);a=N.pool.get().set(a,b);a._inPool=!1;return a}(this);ig.rect=function(a){a=V._pool.get();var b=0,c=0,d=0,f=0;null==f&&(f=0);null==d&&(d=0);null==
c&&(c=0);null==b&&(b=0);a.x=b;a.y=c;a.width=d;a.height=f;a._inPool=!1;return a}(this);Ad._cachedPoint=function(a){var b=0;a=0;null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);a=N.pool.get().set(b,a);a._inPool=!1;return a}(this);(function(a){a=new Ba;a.h.ANY=-2;a.h.A=0;a.h.B=1;a.h.X=2;a.h.Y=3;a.h.LEFT_SHOULDER=4;a.h.RIGHT_SHOULDER=5;a.h.BACK=6;a.h.START=7;a.h.LEFT_STICK_CLICK=8;a.h.RIGHT_STICK_CLICK=9;a.h.GUIDE=10;a.h.DPAD_UP=11;a.h.DPAD_DOWN=12;a.h.DPAD_LEFT=13;a.h.DPAD_RIGHT=14;a.h.LEFT_TRIGGER_BUTTON=
15;a.h.RIGHT_TRIGGER_BUTTON=16;a.h.LEFT_TRIGGER=17;a.h.RIGHT_TRIGGER=18;a.h.LEFT_ANALOG_STICK=19;a.h.RIGHT_ANALOG_STICK=20;a.h.DPAD=21;a.h.TILT_PITCH=26;a.h.TILT_ROLL=27;a.h.POINTER_X=28;a.h.POINTER_Y=29;a.h.EXTRA_0=30;a.h.EXTRA_1=31;a.h.EXTRA_2=32;a.h.EXTRA_3=33;a.h.LEFT_STICK_DIGITAL_UP=34;a.h.LEFT_STICK_DIGITAL_RIGHT=35;a.h.LEFT_STICK_DIGITAL_DOWN=36;a.h.LEFT_STICK_DIGITAL_LEFT=37;a.h.RIGHT_STICK_DIGITAL_UP=38;a.h.RIGHT_STICK_DIGITAL_RIGHT=39;a.h.RIGHT_STICK_DIGITAL_DOWN=40;a.h.RIGHT_STICK_DIGITAL_LEFT=
41;a.h.ACCEPT=42;a.h.CANCEL=43;return a})(this);(function(a){a=new hc;a.h[-2]="ANY";a.h[0]="A";a.h[1]="B";a.h[2]="X";a.h[3]="Y";a.h[4]="LEFT_SHOULDER";a.h[5]="RIGHT_SHOULDER";a.h[6]="BACK";a.h[7]="START";a.h[8]="LEFT_STICK_CLICK";a.h[9]="RIGHT_STICK_CLICK";a.h[10]="GUIDE";a.h[11]="DPAD_UP";a.h[12]="DPAD_DOWN";a.h[13]="DPAD_LEFT";a.h[14]="DPAD_RIGHT";a.h[15]="LEFT_TRIGGER_BUTTON";a.h[16]="RIGHT_TRIGGER_BUTTON";a.h[17]="LEFT_TRIGGER";a.h[18]="RIGHT_TRIGGER";a.h[19]="LEFT_ANALOG_STICK";a.h[20]="RIGHT_ANALOG_STICK";
a.h[21]="DPAD";a.h[26]="TILT_PITCH";a.h[27]="TILT_ROLL";a.h[28]="POINTER_X";a.h[29]="POINTER_Y";a.h[30]="EXTRA_0";a.h[31]="EXTRA_1";a.h[32]="EXTRA_2";a.h[33]="EXTRA_3";a.h[34]="LEFT_STICK_DIGITAL_UP";a.h[35]="LEFT_STICK_DIGITAL_RIGHT";a.h[36]="LEFT_STICK_DIGITAL_DOWN";a.h[37]="LEFT_STICK_DIGITAL_LEFT";a.h[38]="RIGHT_STICK_DIGITAL_UP";a.h[39]="RIGHT_STICK_DIGITAL_RIGHT";a.h[40]="RIGHT_STICK_DIGITAL_DOWN";a.h[41]="RIGHT_STICK_DIGITAL_LEFT";a.h[42]="ACCEPT";a.h[43]="CANCEL";return a})(this);Db.__meta__=
{fields:{addEventListener:{SuppressWarnings:["checkstyle:Dynamic"]}}};Db.isSupported=!0;Db.numDevices=0;Db.__deviceList=[];Db.__instances=[];Db.__devices=new Ga;kg._gameInput=new Db;nc.ONE=0;nc.TWO=1;nc.THREE=2;nc.FOUR=3;nc.FIVE=4;nc.SIX=5;nc.SEVEN=6;nc.EIGHT=7;nc.NINE=8;nc.TEN=9;nc.LEFT_STICK_CLICK=10;nc.RIGHT_STICK_CLICK=11;nc.DPAD_UP=16;nc.DPAD_DOWN=17;nc.DPAD_LEFT=18;nc.DPAD_RIGHT=19;nc.LOGITECH=-5;nc.LEFT_STICK_UP=24;nc.LEFT_STICK_DOWN=25;nc.LEFT_STICK_LEFT=26;nc.LEFT_STICK_RIGHT=27;nc.RIGHT_STICK_UP=
28;nc.RIGHT_STICK_DOWN=29;nc.RIGHT_STICK_LEFT=30;nc.RIGHT_STICK_RIGHT=31;nc.LEFT_ANALOG_STICK=new ed(0,1,{up:24,down:25,left:26,right:27});nc.RIGHT_ANALOG_STICK=new ed(2,3,{up:28,down:29,left:30,right:31});oc.LEFT_TRIGGER=4;oc.RIGHT_TRIGGER=5;oc.A=6;oc.B=7;oc.X=8;oc.Y=9;oc.LB=15;oc.RB=16;oc.BACK=10;oc.GUIDE=11;oc.START=12;oc.LEFT_STICK_CLICK=13;oc.RIGHT_STICK_CLICK=14;oc.DPAD_UP=17;oc.DPAD_DOWN=18;oc.DPAD_LEFT=19;oc.DPAD_RIGHT=20;oc.LEFT_STICK_UP=21;oc.LEFT_STICK_DOWN=22;oc.LEFT_STICK_LEFT=23;oc.LEFT_STICK_RIGHT=
24;oc.RIGHT_STICK_UP=25;oc.RIGHT_STICK_DOWN=26;oc.RIGHT_STICK_LEFT=27;oc.RIGHT_STICK_RIGHT=28;oc.LEFT_ANALOG_STICK=new ed(0,1,{up:21,down:22,left:23,right:24});oc.RIGHT_ANALOG_STICK=new ed(2,3,{up:25,down:26,left:27,right:28});fb.REMOTE_ONE=8;fb.REMOTE_TWO=9;fb.REMOTE_A=10;fb.REMOTE_B=11;fb.REMOTE_MINUS=12;fb.REMOTE_PLUS=13;fb.REMOTE_HOME=19;fb.NUNCHUK_Z=14;fb.NUNCHUK_C=15;fb.NUNCHUK_DPAD_UP=4;fb.NUNCHUK_DPAD_DOWN=5;fb.NUNCHUK_DPAD_LEFT=6;fb.NUNCHUK_DPAD_RIGHT=7;fb.NUNCHUK_MINUS=12;fb.NUNCHUK_PLUS=
13;fb.NUNCHUK_HOME=19;fb.NUNCHUK_A=10;fb.NUNCHUK_B=11;fb.NUNCHUK_ONE=8;fb.NUNCHUK_TWO=9;fb.CLASSIC_Y=8;fb.CLASSIC_X=9;fb.CLASSIC_B=10;fb.CLASSIC_A=11;fb.CLASSIC_L=12;fb.CLASSIC_R=13;fb.CLASSIC_ZL=14;fb.CLASSIC_ZR=15;fb.CLASSIC_SELECT=16;fb.CLASSIC_START=17;fb.CLASSIC_HOME=19;fb.CLASSIC_ONE=-1;fb.CLASSIC_TWO=-1;fb.CLASSIC_DPAD_UP=4;fb.CLASSIC_DPAD_DOWN=5;fb.CLASSIC_DPAD_LEFT=6;fb.CLASSIC_DPAD_RIGHT=7;fb.NUNCHUK_POINTER_X=2;fb.NUNCHUK_POINTER_Y=3;fb.LEFT_STICK_UP=26;fb.LEFT_STICK_DOWN=27;fb.LEFT_STICK_LEFT=
28;fb.LEFT_STICK_RIGHT=29;fb.RIGHT_STICK_UP=30;fb.RIGHT_STICK_DOWN=31;fb.RIGHT_STICK_LEFT=32;fb.RIGHT_STICK_RIGHT=33;fb.LEFT_TRIGGER_FAKE=4;fb.RIGHT_TRIGGER_FAKE=5;fb.REMOTE_DPAD_UP=22;fb.REMOTE_DPAD_DOWN=23;fb.REMOTE_DPAD_LEFT=24;fb.REMOTE_DPAD_RIGHT=25;fb.REMOTE_DPAD=new ed(0,1,{up:22,down:23,left:24,right:25,threshold:.5,mode:vh.ONLY_DIGITAL});fb.LEFT_ANALOG_STICK=new ed(0,1,{up:26,down:27,left:28,right:29});fb.RIGHT_ANALOG_STICK=new ed(2,3,{up:30,down:31,left:32,right:33});uc.O=6;uc.U=8;uc.Y=
9;uc.A=7;uc.LB=15;uc.RB=16;uc.LEFT_STICK_CLICK=13;uc.RIGHT_STICK_CLICK=14;uc.HOME=16777234;uc.LEFT_TRIGGER=4;uc.RIGHT_TRIGGER=5;uc.DPAD_LEFT=19;uc.DPAD_RIGHT=20;uc.DPAD_DOWN=18;uc.DPAD_UP=17;uc.LEFT_STICK_UP=23;uc.LEFT_STICK_DOWN=24;uc.LEFT_STICK_LEFT=25;uc.LEFT_STICK_RIGHT=26;uc.RIGHT_STICK_UP=27;uc.RIGHT_STICK_DOWN=28;uc.RIGHT_STICK_LEFT=29;uc.RIGHT_STICK_RIGHT=30;uc.LEFT_ANALOG_STICK=new ed(0,1,{up:23,down:24,left:25,right:26});uc.RIGHT_ANALOG_STICK=new ed(2,3,{up:27,down:28,left:29,right:30});
cc.X=6;cc.CIRCLE=7;cc.SQUARE=8;cc.TRIANGLE=9;cc.PS=11;cc.OPTIONS=12;cc.LEFT_STICK_CLICK=13;cc.RIGHT_STICK_CLICK=14;cc.L1=15;cc.R1=16;cc.SHARE=10;cc.LEFT_X=0;cc.LEFT_Y=1;cc.RIGHT_X=2;cc.RIGHT_Y=3;cc.LEFT_STICK_UP=22;cc.LEFT_STICK_DOWN=23;cc.LEFT_STICK_LEFT=24;cc.LEFT_STICK_RIGHT=25;cc.RIGHT_STICK_UP=26;cc.RIGHT_STICK_DOWN=27;cc.RIGHT_STICK_LEFT=28;cc.RIGHT_STICK_RIGHT=29;cc.TOUCHPAD_CLICK=30;cc.L2=4;cc.R2=5;cc.DPAD_UP=17;cc.DPAD_DOWN=18;cc.DPAD_LEFT=19;cc.DPAD_RIGHT=20;cc.LEFT_ANALOG_STICK=new ed(0,
1,{up:22,down:23,left:24,right:25});cc.RIGHT_ANALOG_STICK=new ed(2,3,{up:26,down:27,left:28,right:29});yc.X=6;yc.CIRCLE=7;yc.SQUARE=8;yc.TRIANGLE=9;yc.SELECT=10;yc.START=12;yc.L=15;yc.R=16;yc.DPAD_UP=17;yc.DPAD_DOWN=18;yc.DPAD_LEFT=19;yc.DPAD_RIGHT=20;yc.LEFT_STICK_UP=21;yc.LEFT_STICK_DOWN=22;yc.LEFT_STICK_LEFT=23;yc.LEFT_STICK_RIGHT=24;yc.RIGHT_STICK_UP=25;yc.RIGHT_STICK_DOWN=26;yc.RIGHT_STICK_LEFT=27;yc.RIGHT_STICK_RIGHT=28;yc.LEFT_ANALOG_STICK=new ed(0,1,{up:21,down:22,left:23,right:24});yc.RIGHT_ANALOG_STICK=
new ed(2,3,{up:25,down:26,left:27,right:28});Nd.ZL=4;Nd.DOWN=6;Nd.RIGHT=7;Nd.LEFT=8;Nd.UP=9;Nd.L=10;Nd.MINUS=12;Nd.LEFT_STICK_CLICK=13;Nd.SL=15;Nd.SR=16;Nd.CAPTURE=21;Nd.LEFT_STICK_UP=22;Nd.LEFT_STICK_DOWN=23;Nd.LEFT_STICK_LEFT=24;Nd.LEFT_STICK_RIGHT=25;Nd.LEFT_ANALOG_STICK=new ed(0,1,{up:22,down:23,left:24,right:25});Od.ZR=5;Od.A=6;Od.X=7;Od.B=8;Od.Y=9;Od.R=10;Od.HOME=11;Od.PLUS=12;Od.LEFT_STICK_CLICK=13;Od.SL=15;Od.SR=16;Od.LEFT_STICK_UP=22;Od.LEFT_STICK_DOWN=23;Od.LEFT_STICK_LEFT=24;Od.LEFT_STICK_RIGHT=
25;Od.LEFT_ANALOG_STICK=new ed(0,1,{up:22,down:23,left:24,right:25});jc.ZL=4;jc.ZR=5;jc.B=6;jc.A=7;jc.Y=8;jc.X=9;jc.MINUS=10;jc.HOME=11;jc.PLUS=12;jc.LEFT_STICK_CLICK=13;jc.RIGHT_STICK_CLICK=14;jc.L=15;jc.R=16;jc.DPAD_UP=17;jc.DPAD_DOWN=18;jc.DPAD_LEFT=19;jc.DPAD_RIGHT=20;jc.CAPTURE=21;jc.LEFT_STICK_UP=22;jc.LEFT_STICK_DOWN=23;jc.LEFT_STICK_LEFT=24;jc.LEFT_STICK_RIGHT=25;jc.RIGHT_STICK_UP=26;jc.RIGHT_STICK_DOWN=27;jc.RIGHT_STICK_LEFT=28;jc.RIGHT_STICK_RIGHT=29;jc.LEFT_ANALOG_STICK=new ed(0,1,{up:22,
down:23,left:24,right:25});jc.RIGHT_ANALOG_STICK=new ed(2,3,{up:26,down:27,left:28,right:29});Xa.REMOTE_ONE=9;Xa.REMOTE_TWO=10;Xa.REMOTE_A=11;Xa.REMOTE_B=12;Xa.REMOTE_PLUS=13;Xa.REMOTE_MINUS=14;Xa.REMOTE_HOME=15;Xa.NUNCHUK_A=9;Xa.NUNCHUK_B=10;Xa.NUNCHUK_C=11;Xa.NUNCHUK_Z=12;Xa.NUNCHUK_ONE=13;Xa.NUNCHUK_TWO=14;Xa.NUNCHUK_PLUS=15;Xa.NUNCHUK_MINUS=16;Xa.NUNCHUK_HOME=17;Xa.NUNCHUK_DPAD_UP=5;Xa.NUNCHUK_DPAD_DOWN=6;Xa.NUNCHUK_DPAD_LEFT=7;Xa.NUNCHUK_DPAD_RIGHT=8;Xa.CLASSIC_A=9;Xa.CLASSIC_B=10;Xa.CLASSIC_Y=
11;Xa.CLASSIC_X=12;Xa.CLASSIC_L=13;Xa.CLASSIC_R=14;Xa.CLASSIC_ZL=15;Xa.CLASSIC_ZR=16;Xa.CLASSIC_START=17;Xa.CLASSIC_SELECT=18;Xa.CLASSIC_HOME=19;Xa.CLASSIC_ONE=20;Xa.CLASSIC_TWO=21;Xa.CLASSIC_DPAD_UP=5;Xa.CLASSIC_DPAD_DOWN=6;Xa.CLASSIC_DPAD_LEFT=7;Xa.CLASSIC_DPAD_RIGHT=8;Xa.REMOTE_TILT_PITCH=2;Xa.REMOTE_TILT_ROLL=3;Xa.NUNCHUK_TILT_PITCH=3;Xa.NUNCHUK_TILT_ROLL=2;Xa.REMOTE_NULL_AXIS=4;Xa.NUNCHUK_NULL_AXIS=4;Xa.LEFT_STICK_UP=28;Xa.LEFT_STICK_DOWN=29;Xa.LEFT_STICK_LEFT=30;Xa.LEFT_STICK_RIGHT=31;Xa.RIGHT_STICK_UP=
32;Xa.RIGHT_STICK_DOWN=33;Xa.RIGHT_STICK_LEFT=34;Xa.RIGHT_STICK_RIGHT=35;Xa.LEFT_TRIGGER_FAKE=4;Xa.RIGHT_TRIGGER_FAKE=5;Xa.REMOTE_DPAD_UP=22;Xa.REMOTE_DPAD_DOWN=23;Xa.REMOTE_DPAD_LEFT=24;Xa.REMOTE_DPAD_RIGHT=25;Xa.REMOTE_DPAD_X=26;Xa.REMOTE_DPAD_Y=27;Xa.REMOTE_DPAD=new ed(0,1,{up:22,down:23,left:24,right:25,threshold:.5,mode:vh.ONLY_DIGITAL});Xa.LEFT_ANALOG_STICK=new ed(0,1,{up:28,down:29,left:30,right:31});Xa.RIGHT_ANALOG_STICK=new ed(2,3,{up:32,down:33,left:34,right:35});fc.A=6;fc.B=7;fc.X=8;fc.Y=
9;fc.BACK=10;fc.GUIDE=-1;fc.START=12;fc.LEFT_STICK_CLICK=13;fc.RIGHT_STICK_CLICK=14;fc.LB=15;fc.RB=16;fc.DPAD_UP=17;fc.DPAD_DOWN=18;fc.DPAD_LEFT=19;fc.DPAD_RIGHT=20;fc.LEFT_X=0;fc.LEFT_Y=1;fc.RIGHT_X=2;fc.RIGHT_Y=3;fc.LEFT_STICK_UP=21;fc.LEFT_STICK_DOWN=22;fc.LEFT_STICK_LEFT=23;fc.LEFT_STICK_RIGHT=24;fc.RIGHT_STICK_UP=25;fc.RIGHT_STICK_DOWN=26;fc.RIGHT_STICK_LEFT=27;fc.RIGHT_STICK_RIGHT=28;fc.LEFT_TRIGGER=4;fc.RIGHT_TRIGGER=5;fc.LEFT_ANALOG_STICK=new ed(0,1,{up:21,down:22,left:23,right:24});fc.RIGHT_ANALOG_STICK=
new ed(2,3,{up:25,down:26,left:27,right:28});Ca.fromStringMap=function(a){a=new Ba;a.h.ANY=-2;a.h.NONE=-1;a.h.A=65;a.h.B=66;a.h.C=67;a.h.D=68;a.h.E=69;a.h.F=70;a.h.G=71;a.h.H=72;a.h.I=73;a.h.J=74;a.h.K=75;a.h.L=76;a.h.M=77;a.h.N=78;a.h.O=79;a.h.P=80;a.h.Q=81;a.h.R=82;a.h.S=83;a.h.T=84;a.h.U=85;a.h.V=86;a.h.W=87;a.h.X=88;a.h.Y=89;a.h.Z=90;a.h.ZERO=48;a.h.ONE=49;a.h.TWO=50;a.h.THREE=51;a.h.FOUR=52;a.h.FIVE=53;a.h.SIX=54;a.h.SEVEN=55;a.h.EIGHT=56;a.h.NINE=57;a.h.PAGEUP=33;a.h.PAGEDOWN=34;a.h.HOME=36;
a.h.END=35;a.h.INSERT=45;a.h.ESCAPE=27;a.h.MINUS=189;a.h.PLUS=187;a.h.DELETE=46;a.h.BACKSPACE=8;a.h.LBRACKET=219;a.h.RBRACKET=221;a.h.BACKSLASH=220;a.h.CAPSLOCK=20;a.h.SCROLL_LOCK=145;a.h.NUMLOCK=144;a.h.SEMICOLON=186;a.h.QUOTE=222;a.h.ENTER=13;a.h.SHIFT=16;a.h.COMMA=188;a.h.PERIOD=190;a.h.SLASH=191;a.h.GRAVEACCENT=192;a.h.CONTROL=17;a.h.ALT=18;a.h.SPACE=32;a.h.UP=38;a.h.DOWN=40;a.h.LEFT=37;a.h.RIGHT=39;a.h.TAB=9;a.h.WINDOWS=15;a.h.MENU=302;a.h.PRINTSCREEN=301;a.h.BREAK=19;a.h.F1=112;a.h.F2=113;a.h.F3=
114;a.h.F4=115;a.h.F5=116;a.h.F6=117;a.h.F7=118;a.h.F8=119;a.h.F9=120;a.h.F10=121;a.h.F11=122;a.h.F12=123;a.h.NUMPADZERO=96;a.h.NUMPADONE=97;a.h.NUMPADTWO=98;a.h.NUMPADTHREE=99;a.h.NUMPADFOUR=100;a.h.NUMPADFIVE=101;a.h.NUMPADSIX=102;a.h.NUMPADSEVEN=103;a.h.NUMPADEIGHT=104;a.h.NUMPADNINE=105;a.h.NUMPADMINUS=109;a.h.NUMPADPLUS=107;a.h.NUMPADPERIOD=110;a.h.NUMPADMULTIPLY=106;a.h.NUMPADSLASH=111;return a}(this);Ca.toStringMap=function(a){a=new hc;a.h[-2]="ANY";a.h[-1]="NONE";a.h[65]="A";a.h[66]="B";a.h[67]=
"C";a.h[68]="D";a.h[69]="E";a.h[70]="F";a.h[71]="G";a.h[72]="H";a.h[73]="I";a.h[74]="J";a.h[75]="K";a.h[76]="L";a.h[77]="M";a.h[78]="N";a.h[79]="O";a.h[80]="P";a.h[81]="Q";a.h[82]="R";a.h[83]="S";a.h[84]="T";a.h[85]="U";a.h[86]="V";a.h[87]="W";a.h[88]="X";a.h[89]="Y";a.h[90]="Z";a.h[48]="ZERO";a.h[49]="ONE";a.h[50]="TWO";a.h[51]="THREE";a.h[52]="FOUR";a.h[53]="FIVE";a.h[54]="SIX";a.h[55]="SEVEN";a.h[56]="EIGHT";a.h[57]="NINE";a.h[33]="PAGEUP";a.h[34]="PAGEDOWN";a.h[36]="HOME";a.h[35]="END";a.h[45]=
"INSERT";a.h[27]="ESCAPE";a.h[189]="MINUS";a.h[187]="PLUS";a.h[46]="DELETE";a.h[8]="BACKSPACE";a.h[219]="LBRACKET";a.h[221]="RBRACKET";a.h[220]="BACKSLASH";a.h[20]="CAPSLOCK";a.h[145]="SCROLL_LOCK";a.h[144]="NUMLOCK";a.h[186]="SEMICOLON";a.h[222]="QUOTE";a.h[13]="ENTER";a.h[16]="SHIFT";a.h[188]="COMMA";a.h[190]="PERIOD";a.h[191]="SLASH";a.h[192]="GRAVEACCENT";a.h[17]="CONTROL";a.h[18]="ALT";a.h[32]="SPACE";a.h[38]="UP";a.h[40]="DOWN";a.h[37]="LEFT";a.h[39]="RIGHT";a.h[9]="TAB";a.h[15]="WINDOWS";a.h[302]=
"MENU";a.h[301]="PRINTSCREEN";a.h[19]="BREAK";a.h[112]="F1";a.h[113]="F2";a.h[114]="F3";a.h[115]="F4";a.h[116]="F5";a.h[117]="F6";a.h[118]="F7";a.h[119]="F8";a.h[120]="F9";a.h[121]="F10";a.h[122]="F11";a.h[123]="F12";a.h[96]="NUMPADZERO";a.h[97]="NUMPADONE";a.h[98]="NUMPADTWO";a.h[99]="NUMPADTHREE";a.h[100]="NUMPADFOUR";a.h[101]="NUMPADFIVE";a.h[102]="NUMPADSIX";a.h[103]="NUMPADSEVEN";a.h[104]="NUMPADEIGHT";a.h[105]="NUMPADNINE";a.h[109]="NUMPADMINUS";a.h[107]="NUMPADPLUS";a.h[110]="NUMPADPERIOD";
a.h[106]="NUMPADMULTIPLY";a.h[111]="NUMPADSLASH";return a}(this);Ca.ANY=-2;Ca.NONE=-1;Ca.A=65;Ca.B=66;Ca.C=67;Ca.D=68;Ca.E=69;Ca.F=70;Ca.G=71;Ca.H=72;Ca.I=73;Ca.J=74;Ca.K=75;Ca.L=76;Ca.M=77;Ca.N=78;Ca.O=79;Ca.P=80;Ca.Q=81;Ca.R=82;Ca.S=83;Ca.T=84;Ca.U=85;Ca.V=86;Ca.W=87;Ca.X=88;Ca.Y=89;Ca.Z=90;Ca.ZERO=48;Ca.ONE=49;Ca.TWO=50;Ca.THREE=51;Ca.FOUR=52;Ca.FIVE=53;Ca.SIX=54;Ca.SEVEN=55;Ca.EIGHT=56;Ca.NINE=57;Ca.PAGEUP=33;Ca.PAGEDOWN=34;Ca.HOME=36;Ca.END=35;Ca.INSERT=45;Ca.ESCAPE=27;Ca.MINUS=189;Ca.PLUS=187;
Ca.DELETE=46;Ca.BACKSPACE=8;Ca.LBRACKET=219;Ca.RBRACKET=221;Ca.BACKSLASH=220;Ca.CAPSLOCK=20;Ca.SCROLL_LOCK=145;Ca.NUMLOCK=144;Ca.SEMICOLON=186;Ca.QUOTE=222;Ca.ENTER=13;Ca.SHIFT=16;Ca.COMMA=188;Ca.PERIOD=190;Ca.SLASH=191;Ca.GRAVEACCENT=192;Ca.CONTROL=17;Ca.ALT=18;Ca.SPACE=32;Ca.UP=38;Ca.DOWN=40;Ca.LEFT=37;Ca.RIGHT=39;Ca.TAB=9;Ca.WINDOWS=15;Ca.MENU=302;Ca.PRINTSCREEN=301;Ca.BREAK=19;Ca.F1=112;Ca.F2=113;Ca.F3=114;Ca.F4=115;Ca.F5=116;Ca.F6=117;Ca.F7=118;Ca.F8=119;Ca.F9=120;Ca.F10=121;Ca.F11=122;Ca.F12=
123;Ca.NUMPADZERO=96;Ca.NUMPADONE=97;Ca.NUMPADTWO=98;Ca.NUMPADTHREE=99;Ca.NUMPADFOUR=100;Ca.NUMPADFIVE=101;Ca.NUMPADSIX=102;Ca.NUMPADSEVEN=103;Ca.NUMPADEIGHT=104;Ca.NUMPADNINE=105;Ca.NUMPADMINUS=109;Ca.NUMPADPLUS=107;Ca.NUMPADPERIOD=110;Ca.NUMPADMULTIPLY=106;Ca.NUMPADSLASH=111;ma.__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"]}}};ma.VERTEX_BUFFER_STRIDE=14;ma.__supportsBGRA=null;ma.__tempVector=new yd;ze.resourceType="image/png";ze.resourceName="__ASSET__:bitmap_flixel_input_mouse__FlxMouse_GraphicCursor";Wh.maxTouchPoints=0;xb.MIN_VALUE_FLOAT=1E-16;
xb.MAX_VALUE_FLOAT=1.79E308;xb.MIN_VALUE_INT=-2147483647;xb.MAX_VALUE_INT=2147483647;xb.SQUARE_ROOT_OF_TWO=1.41421356237;xb.EPSILON=1E-7;Mb.EPSILON=1E-7;Mb.EPSILON_SQUARED=9.999999999999998E-15;Mb._point1=function(a){var b=0;a=0;null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);a=N.pool.get().set(b,a);a._inPool=!1;return a}(this);Mb._point2=function(a){var b=0;a=0;null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);a=N.pool.get().set(b,a);a._inPool=!1;return a}(this);Mb._point3=
function(a){var b=0;a=0;null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);a=N.pool.get().set(b,a);a._inPool=!1;return a}(this);$d.FORWARD=0;$d.BACKWARD=1;$d.LOOP_FORWARD=16;$d.LOOP_BACKWARD=256;$d.YOYO=4096;$d._point=function(a){var b=a=0;null==b&&(b=0);null==a&&(a=0);a=N.pool.get().set(a,b);a._inPool=!1;return a}(this);hf.resourceType="image/png";hf.resourceName="__ASSET__:bitmap_flixel_system_GraphicLogo";Le.resourceType="image/png";Le.resourceName="__ASSET__:bitmap_flixel_system_GraphicVirtualInput";
Sb.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Sb.defaultObjectEncoding=10;Sb.__defaultEndian=null;Zi.resourceName="__ASSET__:file_flixel_system_VirtualInputData";Ec.defaultSoundExtension="ogg";Ec.FONT_DEFAULT="Nokia Cellphone FC Small";Ec.FONT_DEBUGGER="Monsterrat";rg.LOCAL="localhost";Pc._NUM_CACHED_FLX_LIST=0;Me.resourceType="image/png";Me.resourceName="__ASSET__:bitmap_flixel_system__FlxPreloader_GraphicLogoLight";Ne.resourceType="image/png";Ne.resourceName="__ASSET__:bitmap_flixel_system__FlxPreloader_GraphicLogoCorners";
W.A_LIST=0;W.B_LIST=1;W._NUM_CACHED_QUAD_TREES=0;Ae.BG_COLOR=-580952225;Ae.HEADER_COLOR=-1157627904;Ae.HEADER_ALPHA=.8;Ae.HEADER_HEIGHT=15;Ae.windowAmount=0;La.NORMAL=new La;La.WARNING=new La("[WARNING] ","D9F85C",12,!1,!1,!1,"flixel/sounds/beep",!0);La.ERROR=new La("[ERROR] ","FF8888",12,!1,!1,!1,"flixel/sounds/beep",!0);La.NOTICE=new La("[NOTICE] ","5CF878",12,!1);La.CONSOLE=new La("> ","5A96FA",12,!1);Uh.BINARY="binary";Uh.FONT="font";Uh.IMAGE="image";Uh.SOUND="sound";Uh.TEXT="text";Dc.VERTICAL_GUTTER=
4;qe.GUTTER=2;qe.DELIMITERS="\n.!?, ;:()-_/".split("");dj.LEFT="left";dj.CENTER="center";dj.RIGHT="right";dj.JUSTIFY="justify";kf.offsetAutoTile=[0,0,0,0,2,2,0,3,0,0,0,0,0,0,0,0,11,11,0,0,13,13,0,14,0,0,0,0,18,18,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,51,0,0,53,53,0,54,0,0,0,0,0,0,0,0,62,62,0,0,64,64,0,65,0,0,0,0,69,69,0,70,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,86,86,0,0,88,88,0,89,0,0,0,0,93,93,0,94,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,159,0,0,0,162,0,163,0,0,0,0,0,0,0,0,0,172,0,0,0,175,0,176,0,0,0,0,0,181,0,182,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,199,0,0,0,202,0,203,0,0,0,0,0,208,0,209];kf.diagonalPathfinder=new tk;Za.PI2=Math.PI/2;Za.EL=2*Math.PI/.45;Za.B1=.36363636363636365;Za.B2=.7272727272727273;Za.B3=.5454545454545454;Za.B4=.9090909090909091;Za.B5=.8181818181818182;Za.B6=.9545454545454546;Za.ELASTIC_AMPLITUDE=1;Za.ELASTIC_PERIOD=.4;Ma.PERSIST=1;Ma.LOOPING=2;Ma.PINGPONG=
4;Ma.ONESHOT=8;Ma.BACKWARD=16;Gg.NORMAL=0;Gg.HIGHLIGHT=1;Gg.PRESSED=2;Gg.DISABLED=3;Wb.maxLength=8;Wb.$length=0;Wb._head=null;Wb._tail=null;Wb._rect=new ea;xd.matrix=new Ze;Wa.pointA=function(a){var b=0;a=0;null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);a=N.pool.get().set(b,a);a._inPool=!1;return a}(this);Wa.pointB=function(a){var b=0;a=0;null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);a=N.pool.get().set(b,a);a._inPool=!1;return a}(this);Wa.centerA=function(a){var b=0;a=0;
null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);a=N.pool.get().set(b,a);a._inPool=!1;return a}(this);Wa.centerB=function(a){var b=0;a=0;null==a&&(a=0);null==b&&(b=0);null==a&&(a=0);null==b&&(b=0);a=N.pool.get().set(b,a);a._inPool=!1;return a}(this);Wa.matrixA=new Ze;Wa.matrixB=new Ze;Wa.testMatrix=new Ze;Wa.boundsA=new V;Wa.boundsB=new V;Wa.intersect=new V;Wa.flashRect=new ea;mb.TRANSPARENT=0;mb.WHITE=-1;mb.GRAY=-8355712;mb.BLACK=-16777216;mb.GREEN=-16744448;mb.LIME=-16711936;mb.YELLOW=
-256;mb.ORANGE=-23296;mb.RED=-65536;mb.PURPLE=-8388480;mb.BLUE=-16776961;mb.BROWN=-7650029;mb.PINK=-16181;mb.MAGENTA=-65281;mb.CYAN=-16711681;mb.colorLookup=function(a){a=new Ba;a.h.TRANSPARENT=0;a.h.WHITE=-1;a.h.GRAY=-8355712;a.h.BLACK=-16777216;a.h.GREEN=-16744448;a.h.LIME=-16711936;a.h.YELLOW=-256;a.h.ORANGE=-23296;a.h.RED=-65536;a.h.PURPLE=-8388480;a.h.BLUE=-16776961;a.h.BROWN=-7650029;a.h.PINK=-16181;a.h.MAGENTA=-65281;a.h.CYAN=-16711681;return a}(this);mb.COLOR_REGEX=new E("^(0x|#)(([A-F0-9]{2}){3,4})$",
"i");Ef.LEFT=1;Ef.RIGHT=16;Ef.UP=256;Ef.DOWN=4096;Ef.NONE=0;Ef.CEILING=256;Ef.FLOOR=4096;Ef.WALL=17;Ef.ANY=4369;Vc.defaultObjectEncoding=10;Sk.ASCENDING=-1;Sk.DESCENDING=1;Ea.flashGfxSprite=new Ka;Ea.flashGfx=Ea.flashGfxSprite.get_graphics();Ua._pool=new hg(function(){return new Ua});Qd.USE_CACHE=!1;Qd.USE_ENUM_INDEX=!1;Qd.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";Qd.BASE64_CODES=null;Pd.DEFAULT_RESOLVER=new Tk;Pd.BASE64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";
Pd.CODES=null;Ug.CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";Ug.BYTES=bb.ofString(Ug.CHARS);Yc.i64tmp=new Gb(0,0);Yc.helper=new DataView(new ArrayBuffer(8));Jg.escapes=function(a){a=new Ba;a.h.lt="<";a.h.gt=">";a.h.amp="&";a.h.quot='"';a.h.apos="'";return a}(this);Rd.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];Rd.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];Rd.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];Rd.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];Rd.CODE_LENGTHS_POS=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];Rd.FIXED_HUFFMAN=null;di.p1=0;di.tokenMin=0;di.tokenMax=0;Sa.OPTION_REVOKE_URL=1;Sa.activeRequests=0;Sa.requestLimit=17;Sa.requestQueue=new ib;Bh.PROTOTYPE_FIELD="__prototype__";Bh.SKIP_FIELD="__skipPrototype__";Bh.RESTORE_FIELD=
"__restoreFlag__";Ab.__current=new Ab(B.location.href);Ab.__isWorker="undefined"==typeof window;Ab.__messages=new ib;Ab.__resolveMethods=new ib;Ab.__workerCount=0;Ja.dummyCharacter="\u007f";Ja.windowID=0;lf.DICTIONARY="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");lf.EXTENDED_DICTIONARY=function(a){a=[];for(var b=0,c=lf.DICTIONARY;b<c.length;){var d=c[b];++b;for(var f=0,g=lf.DICTIONARY;f<g.length;){var k=g[f];++f;a.push(d+k)}}return a}(this);se.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];se.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];r.DEPTH_BUFFER_BIT=256;r.STENCIL_BUFFER_BIT=1024;r.COLOR_BUFFER_BIT=16384;r.POINTS=0;r.LINES=1;r.LINE_LOOP=2;r.LINE_STRIP=3;r.TRIANGLES=4;r.TRIANGLE_STRIP=5;r.TRIANGLE_FAN=6;r.ZERO=0;r.ONE=1;r.SRC_COLOR=768;r.ONE_MINUS_SRC_COLOR=769;r.SRC_ALPHA=770;r.ONE_MINUS_SRC_ALPHA=
771;r.DST_ALPHA=772;r.ONE_MINUS_DST_ALPHA=773;r.DST_COLOR=774;r.ONE_MINUS_DST_COLOR=775;r.SRC_ALPHA_SATURATE=776;r.FUNC_ADD=32774;r.BLEND_EQUATION=32777;r.BLEND_EQUATION_RGB=32777;r.BLEND_EQUATION_ALPHA=34877;r.FUNC_SUBTRACT=32778;r.FUNC_REVERSE_SUBTRACT=32779;r.BLEND_DST_RGB=32968;r.BLEND_SRC_RGB=32969;r.BLEND_DST_ALPHA=32970;r.BLEND_SRC_ALPHA=32971;r.CONSTANT_COLOR=32769;r.ONE_MINUS_CONSTANT_COLOR=32770;r.CONSTANT_ALPHA=32771;r.ONE_MINUS_CONSTANT_ALPHA=32772;r.BLEND_COLOR=32773;r.ARRAY_BUFFER=34962;
r.ELEMENT_ARRAY_BUFFER=34963;r.ARRAY_BUFFER_BINDING=34964;r.ELEMENT_ARRAY_BUFFER_BINDING=34965;r.STREAM_DRAW=35040;r.STATIC_DRAW=35044;r.DYNAMIC_DRAW=35048;r.BUFFER_SIZE=34660;r.BUFFER_USAGE=34661;r.CURRENT_VERTEX_ATTRIB=34342;r.FRONT=1028;r.BACK=1029;r.FRONT_AND_BACK=1032;r.CULL_FACE=2884;r.BLEND=3042;r.DITHER=3024;r.STENCIL_TEST=2960;r.DEPTH_TEST=2929;r.SCISSOR_TEST=3089;r.POLYGON_OFFSET_FILL=32823;r.SAMPLE_ALPHA_TO_COVERAGE=32926;r.SAMPLE_COVERAGE=32928;r.NO_ERROR=0;r.INVALID_ENUM=1280;r.INVALID_VALUE=
1281;r.INVALID_OPERATION=1282;r.OUT_OF_MEMORY=1285;r.CW=2304;r.CCW=2305;r.LINE_WIDTH=2849;r.ALIASED_POINT_SIZE_RANGE=33901;r.ALIASED_LINE_WIDTH_RANGE=33902;r.CULL_FACE_MODE=2885;r.FRONT_FACE=2886;r.DEPTH_RANGE=2928;r.DEPTH_WRITEMASK=2930;r.DEPTH_CLEAR_VALUE=2931;r.DEPTH_FUNC=2932;r.STENCIL_CLEAR_VALUE=2961;r.STENCIL_FUNC=2962;r.STENCIL_FAIL=2964;r.STENCIL_PASS_DEPTH_FAIL=2965;r.STENCIL_PASS_DEPTH_PASS=2966;r.STENCIL_REF=2967;r.STENCIL_VALUE_MASK=2963;r.STENCIL_WRITEMASK=2968;r.STENCIL_BACK_FUNC=34816;
r.STENCIL_BACK_FAIL=34817;r.STENCIL_BACK_PASS_DEPTH_FAIL=34818;r.STENCIL_BACK_PASS_DEPTH_PASS=34819;r.STENCIL_BACK_REF=36003;r.STENCIL_BACK_VALUE_MASK=36004;r.STENCIL_BACK_WRITEMASK=36005;r.VIEWPORT=2978;r.SCISSOR_BOX=3088;r.COLOR_CLEAR_VALUE=3106;r.COLOR_WRITEMASK=3107;r.UNPACK_ALIGNMENT=3317;r.PACK_ALIGNMENT=3333;r.MAX_TEXTURE_SIZE=3379;r.MAX_VIEWPORT_DIMS=3386;r.SUBPIXEL_BITS=3408;r.RED_BITS=3410;r.GREEN_BITS=3411;r.BLUE_BITS=3412;r.ALPHA_BITS=3413;r.DEPTH_BITS=3414;r.STENCIL_BITS=3415;r.POLYGON_OFFSET_UNITS=
10752;r.POLYGON_OFFSET_FACTOR=32824;r.TEXTURE_BINDING_2D=32873;r.SAMPLE_BUFFERS=32936;r.SAMPLES=32937;r.SAMPLE_COVERAGE_VALUE=32938;r.SAMPLE_COVERAGE_INVERT=32939;r.NUM_COMPRESSED_TEXTURE_FORMATS=34466;r.COMPRESSED_TEXTURE_FORMATS=34467;r.DONT_CARE=4352;r.FASTEST=4353;r.NICEST=4354;r.GENERATE_MIPMAP_HINT=33170;r.BYTE=5120;r.UNSIGNED_BYTE=5121;r.SHORT=5122;r.UNSIGNED_SHORT=5123;r.INT=5124;r.UNSIGNED_INT=5125;r.FLOAT=5126;r.DEPTH_COMPONENT=6402;r.ALPHA=6406;r.RGB=6407;r.RGBA=6408;r.LUMINANCE=6409;r.LUMINANCE_ALPHA=
6410;r.UNSIGNED_SHORT_4_4_4_4=32819;r.UNSIGNED_SHORT_5_5_5_1=32820;r.UNSIGNED_SHORT_5_6_5=33635;r.FRAGMENT_SHADER=35632;r.VERTEX_SHADER=35633;r.MAX_VERTEX_ATTRIBS=34921;r.MAX_VERTEX_UNIFORM_VECTORS=36347;r.MAX_VARYING_VECTORS=36348;r.MAX_COMBINED_TEXTURE_IMAGE_UNITS=35661;r.MAX_VERTEX_TEXTURE_IMAGE_UNITS=35660;r.MAX_TEXTURE_IMAGE_UNITS=34930;r.MAX_FRAGMENT_UNIFORM_VECTORS=36349;r.SHADER_TYPE=35663;r.DELETE_STATUS=35712;r.LINK_STATUS=35714;r.VALIDATE_STATUS=35715;r.ATTACHED_SHADERS=35717;r.ACTIVE_UNIFORMS=
35718;r.ACTIVE_ATTRIBUTES=35721;r.SHADING_LANGUAGE_VERSION=35724;r.CURRENT_PROGRAM=35725;r.NEVER=512;r.LESS=513;r.EQUAL=514;r.LEQUAL=515;r.GREATER=516;r.NOTEQUAL=517;r.GEQUAL=518;r.ALWAYS=519;r.KEEP=7680;r.REPLACE=7681;r.INCR=7682;r.DECR=7683;r.INVERT=5386;r.INCR_WRAP=34055;r.DECR_WRAP=34056;r.VENDOR=7936;r.RENDERER=7937;r.VERSION=7938;r.EXTENSIONS=7939;r.NEAREST=9728;r.LINEAR=9729;r.NEAREST_MIPMAP_NEAREST=9984;r.LINEAR_MIPMAP_NEAREST=9985;r.NEAREST_MIPMAP_LINEAR=9986;r.LINEAR_MIPMAP_LINEAR=9987;
r.TEXTURE_MAG_FILTER=10240;r.TEXTURE_MIN_FILTER=10241;r.TEXTURE_WRAP_S=10242;r.TEXTURE_WRAP_T=10243;r.TEXTURE_2D=3553;r.TEXTURE=5890;r.TEXTURE_CUBE_MAP=34067;r.TEXTURE_BINDING_CUBE_MAP=34068;r.TEXTURE_CUBE_MAP_POSITIVE_X=34069;r.TEXTURE_CUBE_MAP_NEGATIVE_X=34070;r.TEXTURE_CUBE_MAP_POSITIVE_Y=34071;r.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072;r.TEXTURE_CUBE_MAP_POSITIVE_Z=34073;r.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074;r.MAX_CUBE_MAP_TEXTURE_SIZE=34076;r.TEXTURE0=33984;r.TEXTURE1=33985;r.TEXTURE2=33986;r.TEXTURE3=
33987;r.TEXTURE4=33988;r.TEXTURE5=33989;r.TEXTURE6=33990;r.TEXTURE7=33991;r.TEXTURE8=33992;r.TEXTURE9=33993;r.TEXTURE10=33994;r.TEXTURE11=33995;r.TEXTURE12=33996;r.TEXTURE13=33997;r.TEXTURE14=33998;r.TEXTURE15=33999;r.TEXTURE16=34E3;r.TEXTURE17=34001;r.TEXTURE18=34002;r.TEXTURE19=34003;r.TEXTURE20=34004;r.TEXTURE21=34005;r.TEXTURE22=34006;r.TEXTURE23=34007;r.TEXTURE24=34008;r.TEXTURE25=34009;r.TEXTURE26=34010;r.TEXTURE27=34011;r.TEXTURE28=34012;r.TEXTURE29=34013;r.TEXTURE30=34014;r.TEXTURE31=34015;
r.ACTIVE_TEXTURE=34016;r.REPEAT=10497;r.CLAMP_TO_EDGE=33071;r.MIRRORED_REPEAT=33648;r.FLOAT_VEC2=35664;r.FLOAT_VEC3=35665;r.FLOAT_VEC4=35666;r.INT_VEC2=35667;r.INT_VEC3=35668;r.INT_VEC4=35669;r.BOOL=35670;r.BOOL_VEC2=35671;r.BOOL_VEC3=35672;r.BOOL_VEC4=35673;r.FLOAT_MAT2=35674;r.FLOAT_MAT3=35675;r.FLOAT_MAT4=35676;r.SAMPLER_2D=35678;r.SAMPLER_CUBE=35680;r.VERTEX_ATTRIB_ARRAY_ENABLED=34338;r.VERTEX_ATTRIB_ARRAY_SIZE=34339;r.VERTEX_ATTRIB_ARRAY_STRIDE=34340;r.VERTEX_ATTRIB_ARRAY_TYPE=34341;r.VERTEX_ATTRIB_ARRAY_NORMALIZED=
34922;r.VERTEX_ATTRIB_ARRAY_POINTER=34373;r.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING=34975;r.IMPLEMENTATION_COLOR_READ_TYPE=35738;r.IMPLEMENTATION_COLOR_READ_FORMAT=35739;r.VERTEX_PROGRAM_POINT_SIZE=34370;r.POINT_SPRITE=34913;r.COMPILE_STATUS=35713;r.LOW_FLOAT=36336;r.MEDIUM_FLOAT=36337;r.HIGH_FLOAT=36338;r.LOW_INT=36339;r.MEDIUM_INT=36340;r.HIGH_INT=36341;r.FRAMEBUFFER=36160;r.RENDERBUFFER=36161;r.RGBA4=32854;r.RGB5_A1=32855;r.RGB565=36194;r.DEPTH_COMPONENT16=33189;r.STENCIL_INDEX=6401;r.STENCIL_INDEX8=
36168;r.DEPTH_STENCIL=34041;r.RENDERBUFFER_WIDTH=36162;r.RENDERBUFFER_HEIGHT=36163;r.RENDERBUFFER_INTERNAL_FORMAT=36164;r.RENDERBUFFER_RED_SIZE=36176;r.RENDERBUFFER_GREEN_SIZE=36177;r.RENDERBUFFER_BLUE_SIZE=36178;r.RENDERBUFFER_ALPHA_SIZE=36179;r.RENDERBUFFER_DEPTH_SIZE=36180;r.RENDERBUFFER_STENCIL_SIZE=36181;r.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE=36048;r.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME=36049;r.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL=36050;r.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE=36051;r.COLOR_ATTACHMENT0=
36064;r.DEPTH_ATTACHMENT=36096;r.STENCIL_ATTACHMENT=36128;r.DEPTH_STENCIL_ATTACHMENT=33306;r.NONE=0;r.FRAMEBUFFER_COMPLETE=36053;r.FRAMEBUFFER_INCOMPLETE_ATTACHMENT=36054;r.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT=36055;r.FRAMEBUFFER_INCOMPLETE_DIMENSIONS=36057;r.FRAMEBUFFER_UNSUPPORTED=36061;r.FRAMEBUFFER_BINDING=36006;r.RENDERBUFFER_BINDING=36007;r.MAX_RENDERBUFFER_SIZE=34024;r.INVALID_FRAMEBUFFER_OPERATION=1286;r.UNPACK_FLIP_Y_WEBGL=37440;r.UNPACK_PREMULTIPLY_ALPHA_WEBGL=37441;r.CONTEXT_LOST_WEBGL=
37442;r.UNPACK_COLORSPACE_CONVERSION_WEBGL=37443;r.BROWSER_DEFAULT_WEBGL=37444;r.READ_BUFFER=3074;r.UNPACK_ROW_LENGTH=3314;r.UNPACK_SKIP_ROWS=3315;r.UNPACK_SKIP_PIXELS=3316;r.PACK_ROW_LENGTH=3330;r.PACK_SKIP_ROWS=3331;r.PACK_SKIP_PIXELS=3332;r.TEXTURE_BINDING_3D=32874;r.UNPACK_SKIP_IMAGES=32877;r.UNPACK_IMAGE_HEIGHT=32878;r.MAX_3D_TEXTURE_SIZE=32883;r.MAX_ELEMENTS_VERTICES=33E3;r.MAX_ELEMENTS_INDICES=33001;r.MAX_TEXTURE_LOD_BIAS=34045;r.MAX_FRAGMENT_UNIFORM_COMPONENTS=35657;r.MAX_VERTEX_UNIFORM_COMPONENTS=
35658;r.MAX_ARRAY_TEXTURE_LAYERS=35071;r.MIN_PROGRAM_TEXEL_OFFSET=35076;r.MAX_PROGRAM_TEXEL_OFFSET=35077;r.MAX_VARYING_COMPONENTS=35659;r.FRAGMENT_SHADER_DERIVATIVE_HINT=35723;r.RASTERIZER_DISCARD=35977;r.VERTEX_ARRAY_BINDING=34229;r.MAX_VERTEX_OUTPUT_COMPONENTS=37154;r.MAX_FRAGMENT_INPUT_COMPONENTS=37157;r.MAX_SERVER_WAIT_TIMEOUT=37137;r.MAX_ELEMENT_INDEX=36203;r.RED=6403;r.RGB8=32849;r.RGBA8=32856;r.RGB10_A2=32857;r.TEXTURE_3D=32879;r.TEXTURE_WRAP_R=32882;r.TEXTURE_MIN_LOD=33082;r.TEXTURE_MAX_LOD=
33083;r.TEXTURE_BASE_LEVEL=33084;r.TEXTURE_MAX_LEVEL=33085;r.TEXTURE_COMPARE_MODE=34892;r.TEXTURE_COMPARE_FUNC=34893;r.SRGB=35904;r.SRGB8=35905;r.SRGB8_ALPHA8=35907;r.COMPARE_REF_TO_TEXTURE=34894;r.RGBA32F=34836;r.RGB32F=34837;r.RGBA16F=34842;r.RGB16F=34843;r.TEXTURE_2D_ARRAY=35866;r.TEXTURE_BINDING_2D_ARRAY=35869;r.R11F_G11F_B10F=35898;r.RGB9_E5=35901;r.RGBA32UI=36208;r.RGB32UI=36209;r.RGBA16UI=36214;r.RGB16UI=36215;r.RGBA8UI=36220;r.RGB8UI=36221;r.RGBA32I=36226;r.RGB32I=36227;r.RGBA16I=36232;r.RGB16I=
36233;r.RGBA8I=36238;r.RGB8I=36239;r.RED_INTEGER=36244;r.RGB_INTEGER=36248;r.RGBA_INTEGER=36249;r.R8=33321;r.RG8=33323;r.R16F=33325;r.R32F=33326;r.RG16F=33327;r.RG32F=33328;r.R8I=33329;r.R8UI=33330;r.R16I=33331;r.R16UI=33332;r.R32I=33333;r.R32UI=33334;r.RG8I=33335;r.RG8UI=33336;r.RG16I=33337;r.RG16UI=33338;r.RG32I=33339;r.RG32UI=33340;r.R8_SNORM=36756;r.RG8_SNORM=36757;r.RGB8_SNORM=36758;r.RGBA8_SNORM=36759;r.RGB10_A2UI=36975;r.TEXTURE_IMMUTABLE_FORMAT=37167;r.TEXTURE_IMMUTABLE_LEVELS=33503;r.UNSIGNED_INT_2_10_10_10_REV=
33640;r.UNSIGNED_INT_10F_11F_11F_REV=35899;r.UNSIGNED_INT_5_9_9_9_REV=35902;r.FLOAT_32_UNSIGNED_INT_24_8_REV=36269;r.UNSIGNED_INT_24_8=34042;r.HALF_FLOAT=5131;r.RG=33319;r.RG_INTEGER=33320;r.INT_2_10_10_10_REV=36255;r.CURRENT_QUERY=34917;r.QUERY_RESULT=34918;r.QUERY_RESULT_AVAILABLE=34919;r.ANY_SAMPLES_PASSED=35887;r.ANY_SAMPLES_PASSED_CONSERVATIVE=36202;r.MAX_DRAW_BUFFERS=34852;r.DRAW_BUFFER0=34853;r.DRAW_BUFFER1=34854;r.DRAW_BUFFER2=34855;r.DRAW_BUFFER3=34856;r.DRAW_BUFFER4=34857;r.DRAW_BUFFER5=
34858;r.DRAW_BUFFER6=34859;r.DRAW_BUFFER7=34860;r.DRAW_BUFFER8=34861;r.DRAW_BUFFER9=34862;r.DRAW_BUFFER10=34863;r.DRAW_BUFFER11=34864;r.DRAW_BUFFER12=34865;r.DRAW_BUFFER13=34866;r.DRAW_BUFFER14=34867;r.DRAW_BUFFER15=34868;r.MAX_COLOR_ATTACHMENTS=36063;r.COLOR_ATTACHMENT1=36065;r.COLOR_ATTACHMENT2=36066;r.COLOR_ATTACHMENT3=36067;r.COLOR_ATTACHMENT4=36068;r.COLOR_ATTACHMENT5=36069;r.COLOR_ATTACHMENT6=36070;r.COLOR_ATTACHMENT7=36071;r.COLOR_ATTACHMENT8=36072;r.COLOR_ATTACHMENT9=36073;r.COLOR_ATTACHMENT10=
36074;r.COLOR_ATTACHMENT11=36075;r.COLOR_ATTACHMENT12=36076;r.COLOR_ATTACHMENT13=36077;r.COLOR_ATTACHMENT14=36078;r.COLOR_ATTACHMENT15=36079;r.SAMPLER_3D=35679;r.SAMPLER_2D_SHADOW=35682;r.SAMPLER_2D_ARRAY=36289;r.SAMPLER_2D_ARRAY_SHADOW=36292;r.SAMPLER_CUBE_SHADOW=36293;r.INT_SAMPLER_2D=36298;r.INT_SAMPLER_3D=36299;r.INT_SAMPLER_CUBE=36300;r.INT_SAMPLER_2D_ARRAY=36303;r.UNSIGNED_INT_SAMPLER_2D=36306;r.UNSIGNED_INT_SAMPLER_3D=36307;r.UNSIGNED_INT_SAMPLER_CUBE=36308;r.UNSIGNED_INT_SAMPLER_2D_ARRAY=
36311;r.MAX_SAMPLES=36183;r.SAMPLER_BINDING=35097;r.PIXEL_PACK_BUFFER=35051;r.PIXEL_UNPACK_BUFFER=35052;r.PIXEL_PACK_BUFFER_BINDING=35053;r.PIXEL_UNPACK_BUFFER_BINDING=35055;r.COPY_READ_BUFFER=36662;r.COPY_WRITE_BUFFER=36663;r.COPY_READ_BUFFER_BINDING=36662;r.COPY_WRITE_BUFFER_BINDING=36663;r.FLOAT_MAT2x3=35685;r.FLOAT_MAT2x4=35686;r.FLOAT_MAT3x2=35687;r.FLOAT_MAT3x4=35688;r.FLOAT_MAT4x2=35689;r.FLOAT_MAT4x3=35690;r.UNSIGNED_INT_VEC2=36294;r.UNSIGNED_INT_VEC3=36295;r.UNSIGNED_INT_VEC4=36296;r.UNSIGNED_NORMALIZED=
35863;r.SIGNED_NORMALIZED=36764;r.VERTEX_ATTRIB_ARRAY_INTEGER=35069;r.VERTEX_ATTRIB_ARRAY_DIVISOR=35070;r.TRANSFORM_FEEDBACK_BUFFER_MODE=35967;r.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS=35968;r.TRANSFORM_FEEDBACK_VARYINGS=35971;r.TRANSFORM_FEEDBACK_BUFFER_START=35972;r.TRANSFORM_FEEDBACK_BUFFER_SIZE=35973;r.TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN=35976;r.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS=35978;r.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS=35979;r.INTERLEAVED_ATTRIBS=35980;r.SEPARATE_ATTRIBS=
35981;r.TRANSFORM_FEEDBACK_BUFFER=35982;r.TRANSFORM_FEEDBACK_BUFFER_BINDING=35983;r.TRANSFORM_FEEDBACK=36386;r.TRANSFORM_FEEDBACK_PAUSED=36387;r.TRANSFORM_FEEDBACK_ACTIVE=36388;r.TRANSFORM_FEEDBACK_BINDING=36389;r.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING=33296;r.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE=33297;r.FRAMEBUFFER_ATTACHMENT_RED_SIZE=33298;r.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE=33299;r.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE=33300;r.FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE=33301;r.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE=
33302;r.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE=33303;r.FRAMEBUFFER_DEFAULT=33304;r.DEPTH24_STENCIL8=35056;r.DRAW_FRAMEBUFFER_BINDING=36006;r.READ_FRAMEBUFFER=36008;r.DRAW_FRAMEBUFFER=36009;r.READ_FRAMEBUFFER_BINDING=36010;r.RENDERBUFFER_SAMPLES=36011;r.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER=36052;r.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE=36182;r.UNIFORM_BUFFER=35345;r.UNIFORM_BUFFER_BINDING=35368;r.UNIFORM_BUFFER_START=35369;r.UNIFORM_BUFFER_SIZE=35370;r.MAX_VERTEX_UNIFORM_BLOCKS=35371;r.MAX_FRAGMENT_UNIFORM_BLOCKS=
35373;r.MAX_COMBINED_UNIFORM_BLOCKS=35374;r.MAX_UNIFORM_BUFFER_BINDINGS=35375;r.MAX_UNIFORM_BLOCK_SIZE=35376;r.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS=35377;r.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS=35379;r.UNIFORM_BUFFER_OFFSET_ALIGNMENT=35380;r.ACTIVE_UNIFORM_BLOCKS=35382;r.UNIFORM_TYPE=35383;r.UNIFORM_SIZE=35384;r.UNIFORM_BLOCK_INDEX=35386;r.UNIFORM_OFFSET=35387;r.UNIFORM_ARRAY_STRIDE=35388;r.UNIFORM_MATRIX_STRIDE=35389;r.UNIFORM_IS_ROW_MAJOR=35390;r.UNIFORM_BLOCK_BINDING=35391;r.UNIFORM_BLOCK_DATA_SIZE=
35392;r.UNIFORM_BLOCK_ACTIVE_UNIFORMS=35394;r.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES=35395;r.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER=35396;r.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER=35398;r.OBJECT_TYPE=37138;r.SYNC_CONDITION=37139;r.SYNC_STATUS=37140;r.SYNC_FLAGS=37141;r.SYNC_FENCE=37142;r.SYNC_GPU_COMMANDS_COMPLETE=37143;r.UNSIGNALED=37144;r.SIGNALED=37145;r.ALREADY_SIGNALED=37146;r.TIMEOUT_EXPIRED=37147;r.CONDITION_SATISFIED=37148;r.WAIT_FAILED=37149;r.SYNC_FLUSH_COMMANDS_BIT=1;r.COLOR=6144;
r.DEPTH=6145;r.STENCIL=6146;r.MIN=32775;r.MAX=32776;r.DEPTH_COMPONENT24=33190;r.STREAM_READ=35041;r.STREAM_COPY=35042;r.STATIC_READ=35045;r.STATIC_COPY=35046;r.DYNAMIC_READ=35049;r.DYNAMIC_COPY=35050;r.DEPTH_COMPONENT32F=36012;r.DEPTH32F_STENCIL8=36013;r.INVALID_INDEX=-1;r.TIMEOUT_IGNORED=-1;r.MAX_CLIENT_WAIT_TIMEOUT_WEBGL=37447;gd.__identity=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];sa.__identity=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];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;Ib.FALSE=0;Ib.TRUE=1;Ib.FREQUENCY=4103;Ib.REFRESH=4104;Ib.SYNC=4105;Ib.MONO_SOURCES=4112;Ib.STEREO_SOURCES=4113;Ib.NO_ERROR=0;Ib.INVALID_DEVICE=40961;Ib.INVALID_CONTEXT=40962;Ib.INVALID_ENUM=40963;Ib.INVALID_VALUE=40964;
Ib.OUT_OF_MEMORY=40965;Ib.ATTRIBUTES_SIZE=4098;Ib.ALL_ATTRIBUTES=4099;Ib.DEFAULT_DEVICE_SPECIFIER=4100;Ib.DEVICE_SPECIFIER=4101;Ib.EXTENSIONS=4102;Ib.ENUMERATE_ALL_EXT=1;Ib.DEFAULT_ALL_DEVICES_SPECIFIER=4114;Ib.ALL_DEVICES_SPECIFIER=4115;Pe.__moduleNames=null;Qc.onUpdate=new Zc;Qc.__updated=!1;De.sensorByID=new hc;De.sensors=[];Fa.__directories=new hc;tb.__mainThread=null!=Ab.__current.__worker||Ab.__isWorker?null:Ab.__current;tb.workLoad=.5;tb.__totalWorkPriority=0;nj.nextID=0;$c.devices=new hc;
$c.onConnect=new un;Fc.devices=new hc;Fc.onConnect=new vn;Ra.NONE=0;Ra.LEFT_SHIFT=1;Ra.RIGHT_SHIFT=2;Ra.LEFT_CTRL=64;Ra.RIGHT_CTRL=128;Ra.LEFT_ALT=256;Ra.RIGHT_ALT=512;Ra.LEFT_META=1024;Ra.RIGHT_META=2048;Ra.NUM_LOCK=4096;Ra.CAPS_LOCK=8192;Ra.MODE=16384;Ra.CTRL=192;Ra.SHIFT=3;Ra.ALT=768;Ra.META=3072;Nc.onCancel=new mi;Nc.onEnd=new mi;Nc.onMove=new mi;Nc.onStart=new mi;ra.cache=new Dn;ra.onChange=new Zc;ra.bundlePaths=new Ba;ra.libraries=new Ba;ra.libraryPaths=new Ba;qg.BYTES_PER_ELEMENT=4;Pa.throwErrors=
!0;ha.__lastTimerID=0;ha.__sentWarnings=new Ba;ha.__timers=new hc;ha.__registeredClassAliases=new Ba;ha.__registeredClasses=ap.toUtilsObjectMap(null);vg.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ve.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]}}};Xe.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};
Ye.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]}}};We.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{toJSON:{SuppressWarnings:["checkstyle:Dynamic"]}}};Ee.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{concat:{SuppressWarnings:["checkstyle:Dynamic"]},toJSON:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};Hi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
he.__meta__={fields:{__context:{SuppressWarnings:["checkstyle:Dynamic"]},__type:{SuppressWarnings:["checkstyle:Dynamic"]}}};ml.__meta__={fields:{cairo:{SuppressWarnings:["checkstyle:Dynamic"]},__matrix3:{SuppressWarnings:["checkstyle:Dynamic"]},applyMatrix:{SuppressWarnings:["checkstyle:Dynamic"]},__setBlendModeCairo:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};pg.__meta__={fields:{context:{SuppressWarnings:["checkstyle:Dynamic"]},applySmoothing:{SuppressWarnings:["checkstyle:Dynamic"]},
setTransform:{SuppressWarnings:["checkstyle:Dynamic"]},__setBlendModeContext:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};vo.NONE=0;vo.ROUND=1;vo.SQUARE=2;ql.__meta__={fields:{__element:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};qj.__meta__={fields:{element:{SuppressWarnings:["checkstyle:Dynamic"]},applyStyle:{SuppressWarnings:["checkstyle:Dynamic"]},clearStyle:{SuppressWarnings:["checkstyle:Dynamic"]},_:{SuppressWarnings:["checkstyle:Dynamic"]}}};
Vd.__meta__={fields:{overrideBlendMode:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Vd.maxTextureHeight=null;Vd.maxTextureWidth=null;si.SIN45=.7071067811865476;si.TAN22=.41421356237309503;yo.BEVEL=0;yo.MITER=1;yo.ROUND=2;Al.__meta__={fields:{BitmapData_onError:{SuppressWarnings:["checkstyle:Dynamic"]}}};Mf.__meta__={statics:{create:{SuppressWarnings:["checkstyle:FieldDocComment"]}},fields:{parameters:{SuppressWarnings:["checkstyle:Dynamic"]}}};Mf.__rootURL=If.get_supported()?window.document.URL:
"";Cb.__meta__={fields:{gl:{SuppressWarnings:["checkstyle:Dynamic"]},__gl:{SuppressWarnings:["checkstyle:Dynamic"]},__matrix:{SuppressWarnings:["checkstyle:Dynamic"]},__projection:{SuppressWarnings:["checkstyle:Dynamic"]},__projectionFlipped:{SuppressWarnings:["checkstyle:Dynamic"]},getMatrix:{SuppressWarnings:["checkstyle:Dynamic"]}}};Cb.__alphaValue=[1];Cb.__colorMultipliersValue=[0,0,0,0];Cb.__colorOffsetsValue=[0,0,0,0];Cb.__defaultColorMultipliersValue=[1,1,1,1];Cb.__emptyColorValue=[0,0,0,0];
Cb.__emptyAlphaValue=[1];Cb.__hasColorTransformValue=[!1];Cb.__scissorRectangle=new ea;Cb.__textureSizeValue=[0,0];Gj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{onComplete:{SuppressWarnings:["checkstyle:Dynamic"]}}};Fl.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Oj.__meta__={fields:{index:{SuppressWarnings:["checkstyle:Dynamic"]},name:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Qh.__meta__={fields:{index:{SuppressWarnings:["checkstyle:Dynamic"]},
name:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};ui.__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"]}}};ah.__meta__={fields:{data:{SuppressWarnings:["checkstyle:Dynamic"]}}};Gl.__meta__=
{obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};pj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{_:{SuppressWarnings:["checkstyle:Dynamic"]}}};wi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Hl.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Il.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Jl.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Kl.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
Ll.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Jh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{renderTileContainer:{SuppressWarnings:["checkstyle:Dynamic"]}}};ri.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Yg.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};de.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{o:{SuppressWarnings:["checkstyle:Dynamic"]}}};de.empty=new de;C.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},
statics:{windingRule:{SuppressWarnings:["checkstyle:Dynamic"]},createBitmapFill:{SuppressWarnings:["checkstyle:Dynamic"]},createGradientPattern:{SuppressWarnings:["checkstyle:Dynamic"]}}};C.SIN45=.7071067811865476;C.TAN22=.41421356237309503;C.fillCommands=new de;C.strokeCommands=new de;Do.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};U.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};pf.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{renderTileContainer:{SuppressWarnings:["checkstyle:Dynamic"]}}};
Eh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Re.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};bh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};bh.MAX_INDEX_BUFFER_LENGTH=65535;bh.MAX_QUADS_PER_INDEX_BUFFER=10922;bh.MAX_QUAD_INDEX_BUFFER_LENGTH=65532;xg.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};vc.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};vc.blankBitmapData=new ma(1,1,!1,0);vc.tempColorTransform=
new Ub(1,1,1,1,0,0,0,0);Fh.opaqueBitmapData=new ma(1,1,!1,0);tf.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};yg.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};aa.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Se.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Se.__textureSizeValue=[0,0];pc.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};be.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ue.__meta__=
{obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};ce.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};ce.__regexColor=new E("color=(\"#([^\"]+)\"|'#([^']+)')","i");ce.__regexFace=new E("face=(\"([^\"]+)\"|'([^']+)')","i");ce.__regexFont=new E("<font ([^>]+)>","gi");ce.__regexCloseFont=new E("</font>","gi");ce.__regexSize=new E("size=(\"([^\"]+)\"|'([^']+)')","i");bg.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};wg.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
qf.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{obj:{SuppressWarnings:["checkstyle:Dynamic"]}}};zg.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Kh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Kh.alphaColorTransform=new Ub;Kh.bitmap=new dd;Kh.destPoint=new Ya;Kh.sourceRect=new ea;wh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{P:{SuppressWarnings:["checkstyle:ConstantName"]}}};wh.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];Lh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};ul.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{overrideIntValues:{SuppressWarnings:["checkstyle:Dynamic"]}}};
Ob.supportsVideoTexture=!0;Ob.__glDepthStencil=-1;Ob.__glMaxTextureMaxAnisotropy=-1;Ob.__glMaxViewportDims=-1;Ob.__glMemoryCurrentAvailable=-1;Ob.__glMemoryTotalAvailable=-1;Ob.__glTextureMaxAnisotropy=-1;Eo.DYNAMIC_DRAW=0;Eo.STATIC_DRAW=1;Fo.FRAGMENT=0;Fo.VERTEX=1;wj.BGR_PACKED=0;wj.BGRA=1;wj.BGRA_PACKED=2;wj.COMPRESSED=3;wj.COMPRESSED_ALPHA=4;wj.RGBA_HALF_FLOAT=5;Ol.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};xj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
Ud.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ud.limitedProfile=!0;yi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Pl.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};zi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Nh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};yj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};uj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Tb.__meta__=
{fields:{__textureContext:{SuppressWarnings:["checkstyle:Dynamic"]},__getGLFramebuffer:{SuppressWarnings:["checkstyle:Dynamic"]}}};Tb.__supportsBGRA=null;Mh.__lowMemoryMode=!1;sc.DEFAULT_TO_STRING="Error";fa.ACTIVATE="activate";fa.ADDED="added";fa.ADDED_TO_STAGE="addedToStage";fa.CANCEL="cancel";fa.CHANGE="change";fa.CLEAR="clear";fa.CLOSING="closing";fa.CLOSE="close";fa.COMPLETE="complete";fa.CONNECT="connect";fa.CONTEXT3D_CREATE="context3DCreate";fa.COPY="copy";fa.CUT="cut";fa.DEACTIVATE="deactivate";
fa.ENTER_FRAME="enterFrame";fa.EXIT_FRAME="exitFrame";fa.EXITING="exiting";fa.FRAME_CONSTRUCTED="frameConstructed";fa.FRAME_LABEL="frameLabel";fa.FULLSCREEN="fullScreen";fa.ID3="id3";fa.INIT="init";fa.MOUSE_LEAVE="mouseLeave";fa.OPEN="open";fa.PASTE="paste";fa.REMOVED="removed";fa.REMOVED_FROM_STAGE="removedFromStage";fa.RENDER="render";fa.RESIZE="resize";fa.SCROLL="scroll";fa.SELECT="select";fa.SELECT_ALL="selectAll";fa.SOUND_COMPLETE="soundComplete";fa.TAB_CHILDREN_CHANGE="tabChildrenChange";fa.TAB_ENABLED_CHANGE=
"tabEnabledChange";fa.TAB_INDEX_CHANGE="tabIndexChange";fa.TEXTURE_READY="textureReady";fa.UNLOAD="unload";Ai.UPDATE="update";Ag.ACTIVITY="activity";fe.LINK="link";fe.TEXT_INPUT="textInput";ie.ERROR="error";Ii.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};fh.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};fh.supportsWeakReference=Object.prototype.hasOwnProperty.call(B,"WeakRef");sf.FOCUS_IN="focusIn";sf.FOCUS_OUT="focusOut";sf.KEY_FOCUS_CHANGE="keyFocusChange";
sf.MOUSE_FOCUS_CHANGE="mouseFocusChange";uf.FULL_SCREEN="fullScreen";uf.FULL_SCREEN_INTERACTIVE_ACCEPTED="fullScreenInteractiveAccepted";Vf.DEVICE_ADDED="deviceAdded";Vf.DEVICE_REMOVED="deviceRemoved";Vf.DEVICE_UNUSABLE="deviceUnusable";ch.HTTP_RESPONSE_STATUS="httpResponseStatus";ch.HTTP_STATUS="httpStatus";Nf.IO_ERROR="ioError";Hh.KEY_DOWN="keyDown";Hh.KEY_UP="keyUp";vb.CLICK="click";vb.DOUBLE_CLICK="doubleClick";vb.MIDDLE_CLICK="middleClick";vb.MIDDLE_MOUSE_DOWN="middleMouseDown";vb.MIDDLE_MOUSE_UP=
"middleMouseUp";vb.MOUSE_DOWN="mouseDown";vb.MOUSE_MOVE="mouseMove";vb.MOUSE_OUT="mouseOut";vb.MOUSE_OVER="mouseOver";vb.MOUSE_UP="mouseUp";vb.MOUSE_WHEEL="mouseWheel";vb.RELEASE_OUTSIDE="releaseOutside";vb.RIGHT_CLICK="rightClick";vb.RIGHT_MOUSE_DOWN="rightMouseDown";vb.RIGHT_MOUSE_UP="rightMouseUp";vb.ROLL_OUT="rollOut";vb.ROLL_OVER="rollOver";Ph.NET_STATUS="netStatus";Qe.PROGRESS="progress";Qe.SOCKET_DATA="socketData";Pf.CLEAR_DOM="clearDOM";Pf.RENDER_CAIRO="renderCairo";Pf.RENDER_CANVAS="renderCanvas";
Pf.RENDER_DOM="renderDOM";Pf.RENDER_OPENGL="renderOpenGL";Bi.SAMPLE_DATA="sampleData";Ci.SECURITY_ERROR="securityError";wd.__meta__={fields:{delta:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};wd.TOUCH_BEGIN="touchBegin";wd.TOUCH_END="touchEnd";wd.TOUCH_MOVE="touchMove";wd.TOUCH_OUT="touchOut";wd.TOUCH_OVER="touchOver";wd.TOUCH_ROLL_OUT="touchRollOut";wd.TOUCH_ROLL_OVER="touchRollOver";wd.TOUCH_TAP="touchTap";Cg.UNCAUGHT_ERROR="uncaughtError";Rh.__meta__={fields:{blendMode:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};
jd.__meta__={statics:{create2D:{SuppressWarnings:["checkstyle:FieldDocComment"]},createABCD:{SuppressWarnings:["checkstyle:FieldDocComment"]},createOrtho:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};gf.__meta__={fields:{clone:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Ac.MAX_ACTIVE_CHANNELS=32;Ac.__soundChannels=[];Ac.__soundTransform=new gf;Rl.VERTEX_BUFFER_STRIDE=5;zj.__meta__={statics:{CONNECT_SUCCESS:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};zj.CONNECT_SUCCESS="NetConnection.Connect.Success";
Sl.__meta__={fields:{audioCodec:{SuppressWarnings:["checkstyle:FieldDocComment"]},decodedFrames:{SuppressWarnings:["checkstyle:FieldDocComment"]},speed:{SuppressWarnings:["checkstyle:FieldDocComment"]},requestVideoStatus:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Bg.followRedirects=!0;Bg.idleTimeout=0;Bg.manageCookies=!0;Mo.__meta__={statics:{__get:{SuppressWarnings:["checkstyle:FieldDocComment"]},__set:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};xc.currentX=0;xc.currentY=1;xc.currentZ=
0;xc.defaultInterval=34;xc.initialized=!1;xc.supported=!1;ti.currentDomain=new ti(null);Aj.__meta__={obj:{SuppressWarnings:["checkstyle:UnnecessaryConstructor"]}};Aj.currentDomain=new Aj;Tl.__supportedStyles="color display font-family font-size font-style font-weight kerning leading letter-spacing margin-left margin-right text-align text-decoration text-indent".split(" ");zd.__missingFontWarning=new Ba;Id.__meta__={fields:{clone:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Bj.CENTER=0;Bj.END=
1;Bj.JUSTIFY=2;Bj.LEFT=3;Bj.RIGHT=4;Bj.START=5;Cj.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Vn.__meta__={obj:{SuppressWarnings:[["checkstyle:FieldDocComment","checkstyle:Dynamic"]]}};gb.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};gb.__regexAlign=new E("align\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");gb.__regexBreakTag=new E("<br\\s*/?>","gi");gb.__regexBlockIndent=new E("blockindent\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");gb.__regexClass=new E("class\\s?=\\s?(\"([^\"]+)\"|'([^']+)')",
"i");gb.__regexColor=new E("color\\s?=\\s?(\"#([^\"]+)\"|'#([^']+)')","i");gb.__regexEntityApos=new E("&apos;","g");gb.__regexEntityNbsp=new E("&nbsp;","g");gb.__regexCharEntity=new E("&#(?:([0-9]+)|(x[0-9a-fA-F]+));","g");gb.__regexFace=new E("face\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");gb.__regexHTMLTag=new E("<.*?>","g");gb.__regexHref=new E("href\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");gb.__regexIndent=new E(" indent\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");gb.__regexLeading=new E("leading\\s?=\\s?(\"([^\"]+)\"|'([^']+)')",
"i");gb.__regexLeftMargin=new E("leftmargin\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");gb.__regexRightMargin=new E("rightmargin\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");gb.__regexSize=new E("size\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");gb.__regexTabStops=new E("tabstops\\s?=\\s?(\"([^\"]+)\"|'([^']+)')","i");Ei.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Jb.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{__cairoFont:{SuppressWarnings:["checkstyle:Dynamic"]}}};
Jb.GUTTER=2;Jb.UTF8_TAB=9;Jb.UTF8_ENDLINE=10;Jb.UTF8_SPACE=32;Jb.UTF8_HYPHEN=45;ud.__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"]}}};ud.FT_LOAD_DEFAULT=0;ud.FT_LOAD_NO_SCALE=1;ud.FT_LOAD_NO_HINTING=2;ud.FT_LOAD_RENDER=4;
ud.FT_LOAD_NO_BITMAP=8;ud.FT_LOAD_VERTICAL_LAYOUT=16;ud.FT_LOAD_FORCE_AUTOHINT=32;ud.FT_LOAD_CROP_BITMAP=64;ud.FT_LOAD_PEDANTIC=128;ud.FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH=256;ud.FT_LOAD_NO_RECURSE=512;ud.FT_LOAD_IGNORE_TRANSFORM=1024;ud.FT_LOAD_MONOCHROME=2048;ud.FT_LOAD_LINEAR_DESIGN=4096;ud.FT_LOAD_NO_AUTOHINT=8192;ud.FT_LOAD_COLOR=16384;ud.FT_LOAD_COMPUTE_METRICS=32768;ud.FT_LOAD_BITMAP_METRICS_ONLY=65536;ud.FT_LOAD_TARGET_NORMAL=0;ud.FT_LOAD_TARGET_LIGHT=0;Ul.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
mk.MAX_BUFFER_SIZE=32E3;za.__meta__={statics:{BREAK:{SuppressWarnings:["checkstyle:FieldDocComment"]},NUMLOCK:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};za.NUMBER_0=48;za.NUMBER_1=49;za.NUMBER_2=50;za.NUMBER_3=51;za.NUMBER_4=52;za.NUMBER_5=53;za.NUMBER_6=54;za.NUMBER_7=55;za.NUMBER_8=56;za.NUMBER_9=57;za.A=65;za.B=66;za.C=67;za.D=68;za.E=69;za.F=70;za.G=71;za.H=72;za.I=73;za.J=74;za.K=75;za.L=76;za.M=77;za.N=78;za.O=79;za.P=80;za.Q=81;za.R=82;za.S=83;za.T=84;za.U=85;za.V=86;za.W=87;za.X=
88;za.Y=89;za.Z=90;za.NUMPAD_0=96;za.NUMPAD_1=97;za.NUMPAD_2=98;za.NUMPAD_3=99;za.NUMPAD_4=100;za.NUMPAD_5=101;za.NUMPAD_6=102;za.NUMPAD_7=103;za.NUMPAD_8=104;za.NUMPAD_9=105;za.NUMPAD_MULTIPLY=106;za.NUMPAD_ADD=107;za.NUMPAD_ENTER=108;za.NUMPAD_SUBTRACT=109;za.NUMPAD_DECIMAL=110;za.NUMPAD_DIVIDE=111;za.F1=112;za.F2=113;za.F3=114;za.F4=115;za.F5=116;za.F6=117;za.F7=118;za.F8=119;za.F9=120;za.F10=121;za.F11=122;za.F12=123;za.F13=124;za.F14=125;za.F15=126;za.BACKSPACE=8;za.TAB=9;za.ALTERNATE=18;za.ENTER=
13;za.COMMAND=15;za.SHIFT=16;za.CONTROL=17;za.BREAK=19;za.CAPS_LOCK=20;za.NUMPAD=21;za.ESCAPE=27;za.SPACE=32;za.PAGE_UP=33;za.PAGE_DOWN=34;za.END=35;za.HOME=36;za.LEFT=37;za.RIGHT=39;za.UP=38;za.DOWN=40;za.INSERT=45;za.DELETE=46;za.NUMLOCK=144;za.SEMICOLON=186;za.EQUAL=187;za.COMMA=188;za.MINUS=189;za.PERIOD=190;za.SLASH=191;za.BACKQUOTE=192;za.LEFTBRACKET=219;za.BACKSLASH=220;za.RIGHTBRACKET=221;za.QUOTE=222;Kc.supportsCursor=!0;Kc.supportsNativeCursor=!0;Kc.__cursor="auto";Te.ARROW="arrow";Te.AUTO=
"auto";Te.BUTTON="button";Te.HAND="hand";Te.IBEAM="ibeam";Te.__CROSSHAIR="crosshair";Te.__CUSTOM="custom";Te.__MOVE="move";Te.__RESIZE_NESW="resize_nesw";Te.__RESIZE_NS="resize_ns";Te.__RESIZE_NWSE="resize_nwse";Te.__RESIZE_WE="resize_we";Te.__WAIT="wait";Te.__WAIT_ARROW="waitarrow";S.__meta__={obj:{SuppressWarnings:[["checkstyle:ConstantName","checkstyle:FieldDocComment"]]}};S.OPMAP=new Ba;S.REGMAP=new Ba;S.SAMPLEMAP=new Ba;S.MAX_NESTING=4;S.MAX_OPCODES=4096;S.FRAGMENT="fragment";S.VERTEX="vertex";
S.SAMPLER_TYPE_SHIFT=8;S.SAMPLER_DIM_SHIFT=12;S.SAMPLER_SPECIAL_SHIFT=16;S.SAMPLER_REPEAT_SHIFT=20;S.SAMPLER_MIPMAP_SHIFT=24;S.SAMPLER_FILTER_SHIFT=28;S.REG_WRITE=1;S.REG_READ=2;S.REG_FRAG=32;S.REG_VERT=64;S.OP_SCALAR=1;S.OP_SPECIAL_TEX=8;S.OP_SPECIAL_MATRIX=16;S.OP_FRAG_ONLY=32;S.OP_VERT_ONLY=64;S.OP_NO_DEST=128;S.OP_VERSION2=256;S.OP_INCNEST=512;S.OP_DECNEST=1024;S.MOV="mov";S.ADD="add";S.SUB="sub";S.MUL="mul";S.DIV="div";S.RCP="rcp";S.MIN="min";S.MAX="max";S.FRC="frc";S.SQT="sqt";S.RSQ="rsq";S.POW=
"pow";S.LOG="log";S.EXP="exp";S.NRM="nrm";S.SIN="sin";S.COS="cos";S.CRS="crs";S.DP3="dp3";S.DP4="dp4";S.ABS="abs";S.NEG="neg";S.SAT="sat";S.M33="m33";S.M44="m44";S.M34="m34";S.DDX="ddx";S.DDY="ddy";S.IFE="ife";S.INE="ine";S.IFG="ifg";S.IFL="ifl";S.IEG="ieg";S.IEL="iel";S.ELS="els";S.EIF="eif";S.TED="ted";S.KIL="kil";S.TEX="tex";S.SGE="sge";S.SLT="slt";S.SGN="sgn";S.SEQ="seq";S.SNE="sne";S.VA="va";S.VC="vc";S.VT="vt";S.VO="vo";S.VI="vi";S.FC="fc";S.FT="ft";S.FS="fs";S.FO="fo";S.FD="fd";S.IID="iid";
S.D2="2d";S.D3="3d";S.CUBE="cube";S.MIPNEAREST="mipnearest";S.MIPLINEAR="miplinear";S.MIPNONE="mipnone";S.NOMIP="nomip";S.NEAREST="nearest";S.LINEAR="linear";S.ANISOTROPIC2X="anisotropic2x";S.ANISOTROPIC4X="anisotropic4x";S.ANISOTROPIC8X="anisotropic8x";S.ANISOTROPIC16X="anisotropic16x";S.CENTROID="centroid";S.SINGLE="single";S.IGNORESAMPLER="ignoresampler";S.REPEAT="repeat";S.WRAP="wrap";S.CLAMP="clamp";S.REPEAT_U_CLAMP_V="repeat_u_clamp_v";S.CLAMP_U_REPEAT_V="clamp_u_repeat_v";S.RGBA="rgba";S.COMPRESSED=
"compressed";S.COMPRESSEDALPHA="compressedalpha";S.DXT1="dxt1";S.DXT5="dxt5";S.VIDEO="video";S.initialized=!1;Zb.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ce.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Hc.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};xa.cache=new Wl;xa.dispatcher=new Da;xa.libraryBindings=new Ba;kb.__bytePointer=new of(null,0);qi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};oi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
pi.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ko.BIG_ENDIAN=0;Ko.LITTLE_ENDIAN=1;Bd.__meta__={statics:{iterator:{SuppressWarnings:["checkstyle:FieldDocComment"]},__get:{SuppressWarnings:["checkstyle:FieldDocComment"]},__set:{SuppressWarnings:["checkstyle:FieldDocComment"]},__getArray:{SuppressWarnings:["checkstyle:FieldDocComment"]},__setArray:{SuppressWarnings:["checkstyle:FieldDocComment"]}}};Xl.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};Ej.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]}};
Bc.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},statics:{notImplemented:{SuppressWarnings:["checkstyle:NullableParameter"]}}};Bc.__sentWarnings=new Ba;Ih.__meta__={obj:{SuppressWarnings:["checkstyle:FieldDocComment"]},fields:{touch:{SuppressWarnings:["checkstyle:Dynamic"]}}};Ih.__pool=new Jc(function(){return new Ih},function(a){a.reset()});Yl.__meta__={fields:{extra:{optional:null}}};ca.main()})("undefined"!=typeof v?v:"undefined"!=typeof window?window:"undefined"!=typeof self?
self:this,"undefined"!=typeof window?window:"undefined"!=typeof B?B:"undefined"!=typeof self?self:this)};"undefined"!==typeof self&&self.constructor.name.includes("Worker")?F({},v):(B.lime=B.lime||{},B.lime.$scripts=B.lime.$scripts||{},B.lime.$scripts.fgj25=F,B.lime.embed=function(F){var P={},I=B.lime.$scripts[F];if(!I)throw Error('Cannot find project name "'+F+'"');I(P,v);for(var ca in P)B[ca]=B[ca]||P[ca];(I=P.lime||window.lime)&&I.embed&&this!==I.embed&&I.embed.apply(I,arguments);return P});"function"===
typeof define&&define.amd&&(define([],function(){return B.lime}),define.__amd=define.amd,define.amd=null)};$lime_init("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);
"undefined"!==typeof self&&self.constructor.name.includes("Worker")||(!function(){var B=function(){this.init()};B.prototype={init:function(){var h=this||v;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(h){var t=
this||v;if(h=parseFloat(h),t.ctx||q(),void 0!==h&&0<=h&&1>=h){if(t._volume=h,t._muted)return t;t.usingWebAudio&&t.masterGain.gain.setValueAtTime(h,v.ctx.currentTime);for(var x=0;x<t._howls.length;x++)if(!t._howls[x]._webAudio)for(var n=t._howls[x]._getSoundIds(),B=0;B<n.length;B++){var F=t._howls[x]._soundById(n[B]);F&&F._node&&(F._node.volume=F._volume*h)}return t}return t._volume},mute:function(h){var t=this||v;t.ctx||q();t._muted=h;t.usingWebAudio&&t.masterGain.gain.setValueAtTime(h?0:t._volume,
v.ctx.currentTime);for(var x=0;x<t._howls.length;x++)if(!t._howls[x]._webAudio)for(var n=t._howls[x]._getSoundIds(),B=0;B<n.length;B++){var F=t._howls[x]._soundById(n[B]);F&&F._node&&(F._node.muted=!!h||F._muted)}return t},stop:function(){for(var h=this||v,t=0;t<h._howls.length;t++)h._howls[t].stop();return h},unload:function(){for(var h=this||v,t=h._howls.length-1;0<=t;t--)h._howls[t].unload();return h.usingWebAudio&&h.ctx&&void 0!==h.ctx.close&&(h.ctx.close(),h.ctx=null,q()),h},codecs:function(h){return(this||
v)._codecs[h.replace(/^x-/,"")]},_setup:function(){var h=this||v;if(h.state=h.ctx?h.ctx.state||"suspended":"suspended",h._autoSuspend(),!h.usingWebAudio)if("undefined"!=typeof Audio)try{var t=new Audio;void 0===t.oncanplaythrough&&(h._canPlayEvent="canplay")}catch(G){h.noAudio=!0}else h.noAudio=!0;try{t=new Audio,t.muted&&(h.noAudio=!0)}catch(G){}return h.noAudio||h._setupCodecs(),h},_setupCodecs:function(){var h=this||v,t=null;try{t="undefined"!=typeof Audio?new Audio:null}catch(Mc){return h}if(!t||
"function"!=typeof t.canPlayType)return h;var q=t.canPlayType("audio/mpeg;").replace(/^no$/,""),n=h._navigator?h._navigator.userAgent:"",x=n.match(/OPR\/(\d+)/g);x=x&&33>parseInt(x[0].split("/")[1],10);var B=-1!==n.indexOf("Safari")&&-1===n.indexOf("Chrome");n=n.match(/Version\/(.*?) /);n=B&&n&&15>parseInt(n[1],10);return h._codecs={mp3:!(x||!q&&!t.canPlayType("audio/mp3;").replace(/^no$/,"")),mpeg:!!q,opus:!!t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,
""),oga:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(t.canPlayType('audio/wav; codecs="1"')||t.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!t.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!t.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/m4a;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(t.canPlayType("audio/x-m4b;")||t.canPlayType("audio/m4b;")||t.canPlayType("audio/aac;")).replace(/^no$/,
""),mp4:!!(t.canPlayType("audio/x-mp4;")||t.canPlayType("audio/mp4;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!(n||!t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!(n||!t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!t.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(t.canPlayType("audio/x-flac;")||t.canPlayType("audio/flac;")).replace(/^no$/,"")},h},_unlockAudio:function(){var h=this||v;if(!h._audioUnlocked&&h.ctx){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 t=function(q){for(;h._html5AudioPool.length<h.html5PoolSize;)try{var n=new Audio;n._unlocked=!0;h._releaseHtml5Audio(n)}catch($b){h.noAudio=!0;break}for(q=0;q<h._howls.length;q++)if(!h._howls[q]._webAudio){n=h._howls[q]._getSoundIds();for(var v=0;v<n.length;v++){var x=h._howls[q]._soundById(n[v]);x&&x._node&&!x._node._unlocked&&(x._node._unlocked=!0,
x._node.load())}}h._autoResume();var G=h.ctx.createBufferSource();G.buffer=h._scratchBuffer;G.connect(h.ctx.destination);void 0===G.start?G.noteOn(0):G.start(0);"function"==typeof h.ctx.resume&&h.ctx.resume();G.onended=function(){G.disconnect(0);h._audioUnlocked=!0;document.removeEventListener("touchstart",t,!0);document.removeEventListener("touchend",t,!0);document.removeEventListener("click",t,!0);document.removeEventListener("keydown",t,!0);for(var n=0;n<h._howls.length;n++)h._howls[n]._emit("unlock")}};
return document.addEventListener("touchstart",t,!0),document.addEventListener("touchend",t,!0),document.addEventListener("click",t,!0),document.addEventListener("keydown",t,!0),h}},_obtainHtml5Audio:function(){var h=this||v;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 t=this||v;return h._unlocked&&t._html5AudioPool.push(h),t},_autoSuspend:function(){var h=this;if(h.autoSuspend&&h.ctx&&void 0!==h.ctx.suspend&&v.usingWebAudio){for(var t=0;t<h._howls.length;t++)if(h._howls[t]._webAudio)for(var q=0;q<h._howls[t]._sounds.length;q++)if(!h._howls[t]._sounds[q]._paused)return h;return h._suspendTimer&&clearTimeout(h._suspendTimer),h._suspendTimer=setTimeout(function(){if(h.autoSuspend){h._suspendTimer=null;h.state="suspending";
var n=function(){h.state="suspended";h._resumeAfterSuspend&&(delete h._resumeAfterSuspend,h._autoResume())};h.ctx.suspend().then(n,n)}},3E4),h}},_autoResume:function(){var h=this;if(h.ctx&&void 0!==h.ctx.resume&&v.usingWebAudio)return"running"===h.state&&"interrupted"!==h.ctx.state&&h._suspendTimer?(clearTimeout(h._suspendTimer),h._suspendTimer=null):"suspended"===h.state||"running"===h.state&&"interrupted"===h.ctx.state?(h.ctx.resume().then(function(){h.state="running";for(var t=0;t<h._howls.length;t++)h._howls[t]._emit("resume")}),
h._suspendTimer&&(clearTimeout(h._suspendTimer),h._suspendTimer=null)):"suspending"===h.state&&(h._resumeAfterSuspend=!0),h}};var v=new B,F=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)};F.prototype={init:function(h){var t=this;return v.ctx||q(),t._autoplay=h.autoplay||!1,t._format="string"!=typeof h.format?h.format:[h.format],t._html5=h.html5||!1,t._muted=h.mute||!1,t._loop=h.loop||!1,t._pool=h.pool||5,
t._preload="boolean"!=typeof h.preload&&"metadata"!==h.preload||h.preload,t._rate=h.rate||1,t._sprite=h.sprite||{},t._src="string"!=typeof h.src?h.src:[h.src],t._volume=void 0!==h.volume?h.volume:1,t._xhr={method:h.xhr&&h.xhr.method?h.xhr.method:"GET",headers:h.xhr&&h.xhr.headers?h.xhr.headers:null,withCredentials:!(!h.xhr||!h.xhr.withCredentials)&&h.xhr.withCredentials},t._duration=0,t._state="unloaded",t._sounds=[],t._endTimers={},t._queue=[],t._playLock=!1,t._onend=h.onend?[{fn:h.onend}]:[],t._onfade=
h.onfade?[{fn:h.onfade}]:[],t._onload=h.onload?[{fn:h.onload}]:[],t._onloaderror=h.onloaderror?[{fn:h.onloaderror}]:[],t._onplayerror=h.onplayerror?[{fn:h.onplayerror}]:[],t._onpause=h.onpause?[{fn:h.onpause}]:[],t._onplay=h.onplay?[{fn:h.onplay}]:[],t._onstop=h.onstop?[{fn:h.onstop}]:[],t._onmute=h.onmute?[{fn:h.onmute}]:[],t._onvolume=h.onvolume?[{fn:h.onvolume}]:[],t._onrate=h.onrate?[{fn:h.onrate}]:[],t._onseek=h.onseek?[{fn:h.onseek}]:[],t._onunlock=h.onunlock?[{fn:h.onunlock}]:[],t._onresume=
[],t._webAudio=v.usingWebAudio&&!t._html5,void 0!==v.ctx&&v.ctx&&v.autoUnlock&&v._unlockAudio(),v._howls.push(t),t._autoplay&&t._queue.push({event:"play",action:function(){t.play()}}),t._preload&&"none"!==t._preload&&t.load(),t},load:function(){var h=null;if(v.noAudio)return void this._emit("loaderror",null,"No audio support.");"string"==typeof this._src&&(this._src=[this._src]);for(var t=0;t<this._src.length;t++){var q;if(this._format&&this._format[t])var n=this._format[t];else{if("string"!=typeof(q=
this._src[t])){this._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}(n=/^data:audio\/([^;,]+);/i.exec(q))||(n=/\.([^.]+)$/.exec(q.split("?",1)[0]));n&&(n=n[1].toLowerCase())}if(n||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),n&&v.codecs(n)){h=this._src[t];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 I(this),this._webAudio&&Q(this),this):void this._emit("loaderror",null,"No codec support for selected audio sources.")},play:function(h,t){var q=this,n=null;if("number"==typeof h)n=h,h=null;else{if("string"==typeof h&&"loaded"===q._state&&!q._sprite[h])return null;if(void 0===h&&(h="__default",!q._playLock)){for(var x=0,B=0;B<q._sounds.length;B++)q._sounds[B]._paused&&!q._sounds[B]._ended&&(x++,n=q._sounds[B]._id);1===x?h=null:n=null}}var F=n?q._soundById(n):q._inactiveSound();if(!F)return null;
if(n&&!h&&(h=F._sprite||"__default"),"loaded"!==q._state){F._sprite=h;F._ended=!1;var P=F._id;return q._queue.push({event:"play",action:function(){q.play(P)}}),P}if(n&&!F._paused)return t||q._loadQueue("play"),F._id;q._webAudio&&v._autoResume();var I=Math.max(0,0<F._seek?F._seek:q._sprite[h][0]/1E3),ca=Math.max(0,(q._sprite[h][0]+q._sprite[h][1])/1E3-I),oa=1E3*ca/Math.abs(F._rate),Q=q._sprite[h][0]/1E3,ia=(q._sprite[h][0]+q._sprite[h][1])/1E3;F._sprite=h;F._ended=!1;var Jc=function(){F._paused=!1;
F._seek=I;F._start=Q;F._stop=ia;F._loop=!(!F._loop&&!q._sprite[h][2])};if(I>=ia)return void q._ended(F);var ta=F._node;if(q._webAudio)n=function(){q._playLock=!1;Jc();q._refreshBuffer(F);ta.gain.setValueAtTime(F._muted||q._muted?0:F._volume,v.ctx.currentTime);F._playStart=v.ctx.currentTime;void 0===ta.bufferSource.start?F._loop?ta.bufferSource.noteGrainOn(0,I,86400):ta.bufferSource.noteGrainOn(0,I,ca):F._loop?ta.bufferSource.start(0,I,86400):ta.bufferSource.start(0,I,ca);oa!==1/0&&(q._endTimers[F._id]=
setTimeout(q._ended.bind(q,F),oa));t||setTimeout(function(){q._emit("play",F._id);q._loadQueue()},0)},"running"===v.state&&"interrupted"!==v.ctx.state?n():(q._playLock=!0,q.once("resume",n),q._clearTimer(F._id));else{var Ga=function(){ta.currentTime=I;ta.muted=F._muted||q._muted||v._muted||ta.muted;ta.volume=F._volume*v.volume();ta.playbackRate=F._rate;try{var n=ta.play();if(n&&"undefined"!=typeof Promise&&(n instanceof Promise||"function"==typeof n.then)?(q._playLock=!0,Jc(),n.then(function(){q._playLock=
!1;ta._unlocked=!0;t?q._loadQueue():q._emit("play",F._id)}).catch(function(){q._playLock=!1;q._emit("playerror",F._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.");F._ended=!0;F._paused=!0})):t||(q._playLock=!1,Jc(),q._emit("play",F._id)),ta.playbackRate=F._rate,ta.paused)return void q._emit("playerror",F._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||F._loop?q._endTimers[F._id]=setTimeout(q._ended.bind(q,F),oa):(q._endTimers[F._id]=function(){q._ended(F);ta.removeEventListener("ended",q._endTimers[F._id],!1)},ta.addEventListener("ended",q._endTimers[F._id],!1))}catch(Aa){q._emit("playerror",F._id,Aa)}};"data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"===ta.src&&(ta.src=q._src,ta.load());n=window&&window.ejecta||!ta.readyState&&v._navigator.isCocoonJS;if(3<=ta.readyState||n)Ga();else{q._playLock=
!0;q._state="loading";var ib=function(){q._state="loaded";Ga();ta.removeEventListener(v._canPlayEvent,ib,!1)};ta.addEventListener(v._canPlayEvent,ib,!1);q._clearTimer(F._id)}}return F._id},pause:function(h,t){var q=this;if("loaded"!==q._state||q._playLock)return q._queue.push({event:"pause",action:function(){q.pause(h)}}),q;for(var n=q._getSoundIds(h),v=0;v<n.length;v++){q._clearTimer(n[v]);var x=q._soundById(n[v]);if(x&&!x._paused&&(x._seek=q.seek(n[v]),x._rateSeek=0,x._paused=!0,q._stopFade(n[v]),
x._node))if(q._webAudio){if(!x._node.bufferSource)continue;void 0===x._node.bufferSource.stop?x._node.bufferSource.noteOff(0):x._node.bufferSource.stop(0);q._cleanBuffer(x._node)}else isNaN(x._node.duration)&&x._node.duration!==1/0||x._node.pause();t||q._emit("pause",x?x._id:null)}return q},stop:function(h,t){var q=this;if("loaded"!==q._state||q._playLock)return q._queue.push({event:"stop",action:function(){q.stop(h)}}),q;for(var n=q._getSoundIds(h),v=0;v<n.length;v++){q._clearTimer(n[v]);var x=q._soundById(n[v]);
x&&(x._seek=x._start||0,x._rateSeek=0,x._paused=!0,x._ended=!0,q._stopFade(n[v]),x._node&&(q._webAudio?x._node.bufferSource&&(void 0===x._node.bufferSource.stop?x._node.bufferSource.noteOff(0):x._node.bufferSource.stop(0),q._cleanBuffer(x._node)):isNaN(x._node.duration)&&x._node.duration!==1/0||(x._node.currentTime=x._start||0,x._node.pause(),x._node.duration===1/0&&q._clearSound(x._node))),t||q._emit("stop",x._id))}return q},mute:function(h,t){var q=this;if("loaded"!==q._state||q._playLock)return q._queue.push({event:"mute",
action:function(){q.mute(h,t)}}),q;if(void 0===t){if("boolean"!=typeof h)return q._muted;q._muted=h}for(var n=q._getSoundIds(t),x=0;x<n.length;x++){var B=q._soundById(n[x]);B&&(B._muted=h,B._interval&&q._stopFade(B._id),q._webAudio&&B._node?B._node.gain.setValueAtTime(h?0:B._volume,v.ctx.currentTime):B._node&&(B._node.muted=!!v._muted||h),q._emit("mute",B._id))}return q},volume:function(){var h,t,q=this,n=arguments;if(0===n.length)return q._volume;1===n.length||2===n.length&&void 0===n[1]?0<=q._getSoundIds().indexOf(n[0])?
t=parseInt(n[0],10):h=parseFloat(n[0]):2<=n.length&&(h=parseFloat(n[0]),t=parseInt(n[1],10));var x;if(!(void 0!==h&&0<=h&&1>=h))return x=t?q._soundById(t):q._sounds[0],x?x._volume:0;if("loaded"!==q._state||q._playLock)return q._queue.push({event:"volume",action:function(){q.volume.apply(q,n)}}),q;void 0===t&&(q._volume=h);t=q._getSoundIds(t);for(var B=0;B<t.length;B++)(x=q._soundById(t[B]))&&(x._volume=h,n[2]||q._stopFade(t[B]),q._webAudio&&x._node&&!x._muted?x._node.gain.setValueAtTime(h,v.ctx.currentTime):
x._node&&!x._muted&&(x._node.volume=h*v.volume()),q._emit("volume",x._id));return q},fade:function(h,t,q,n){var x=this;if("loaded"!==x._state||x._playLock)return x._queue.push({event:"fade",action:function(){x.fade(h,t,q,n)}}),x;h=Math.min(Math.max(0,parseFloat(h)),1);t=Math.min(Math.max(0,parseFloat(t)),1);q=parseFloat(q);x.volume(h,n);for(var B=x._getSoundIds(n),G=0;G<B.length;G++){var F=x._soundById(B[G]);if(F){if(n||x._stopFade(B[G]),x._webAudio&&!F._muted){var I=v.ctx.currentTime,P=I+q/1E3;F._volume=
h;F._node.gain.setValueAtTime(h,I);F._node.gain.linearRampToValueAtTime(t,P)}x._startFadeInterval(F,h,t,q,B[G],void 0===n)}}return x},_startFadeInterval:function(h,t,q,n,v,x){var B=this,G=t,F=q-t;v=Math.abs(F/.01);v=Math.max(4,0<v?n/v:n);var I=Date.now();h._fadeTo=q;h._interval=setInterval(function(){var v=(Date.now()-I)/n;I=Date.now();G+=F*v;G=Math.round(100*G)/100;G=0>F?Math.max(q,G):Math.min(q,G);B._webAudio?h._volume=G:B.volume(G,h._id,!0);x&&(B._volume=G);(q<t&&G<=q||q>t&&G>=q)&&(clearInterval(h._interval),
h._interval=null,h._fadeTo=null,B.volume(q,h._id),B._emit("fade",h._id))},v)},_stopFade:function(h){var t=this._soundById(h);return t&&t._interval&&(this._webAudio&&t._node.gain.cancelScheduledValues(v.ctx.currentTime),clearInterval(t._interval),t._interval=null,this.volume(t._fadeTo,h),t._fadeTo=null,this._emit("fade",h)),this},loop:function(){var h,t,q,n=arguments;if(0===n.length)return this._loop;if(1===n.length){if("boolean"!=typeof n[0])return!!(q=this._soundById(parseInt(n[0],10)))&&q._loop;
this._loop=h=n[0]}else 2===n.length&&(h=n[0],t=parseInt(n[1],10));t=this._getSoundIds(t);for(n=0;n<t.length;n++)(q=this._soundById(t[n]))&&(q._loop=h,this._webAudio&&q._node&&q._node.bufferSource&&(q._node.bufferSource.loop=h,h&&(q._node.bufferSource.loopStart=q._start||0,q._node.bufferSource.loopEnd=q._stop,this.playing(t[n])&&(this.pause(t[n],!0),this.play(t[n],!0)))));return this},rate:function(){var h,t,q=this,n=arguments;0===n.length?t=q._sounds[0]._id:1===n.length?0<=q._getSoundIds().indexOf(n[0])?
t=parseInt(n[0],10):h=parseFloat(n[0]):2===n.length&&(h=parseFloat(n[0]),t=parseInt(n[1],10));var x;if("number"!=typeof h)return x=q._soundById(t),x?x._rate:q._rate;if("loaded"!==q._state||q._playLock)return q._queue.push({event:"rate",action:function(){q.rate.apply(q,n)}}),q;void 0===t&&(q._rate=h);t=q._getSoundIds(t);for(var B=0;B<t.length;B++)if(x=q._soundById(t[B])){q.playing(t[B])&&(x._rateSeek=q.seek(t[B]),x._playStart=q._webAudio?v.ctx.currentTime:x._playStart);x._rate=h;q._webAudio&&x._node&&
x._node.bufferSource?x._node.bufferSource.playbackRate.setValueAtTime(h,v.ctx.currentTime):x._node&&(x._node.playbackRate=h);var F=q.seek(t[B]);F=1E3*((q._sprite[x._sprite][0]+q._sprite[x._sprite][1])/1E3-F)/Math.abs(x._rate);!q._endTimers[t[B]]&&x._paused||(q._clearTimer(t[B]),q._endTimers[t[B]]=setTimeout(q._ended.bind(q,x),F));q._emit("rate",x._id)}return q},seek:function(){var h,t,q=this,n=arguments;0===n.length?q._sounds.length&&(t=q._sounds[0]._id):1===n.length?0<=q._getSoundIds().indexOf(n[0])?
t=parseInt(n[0],10):q._sounds.length&&(t=q._sounds[0]._id,h=parseFloat(n[0])):2===n.length&&(h=parseFloat(n[0]),t=parseInt(n[1],10));if(void 0===t)return 0;if("number"==typeof h&&("loaded"!==q._state||q._playLock))return q._queue.push({event:"seek",action:function(){q.seek.apply(q,n)}}),q;var x=q._soundById(t);if(x){if(!("number"==typeof h&&0<=h))return q._webAudio?(h=q.playing(t)?v.ctx.currentTime-x._playStart:0,x._seek+((x._rateSeek?x._rateSeek-x._seek:0)+h*Math.abs(x._rate))):x._node.currentTime;
var B=q.playing(t);B&&q.pause(t,!0);x._seek=h;x._ended=!1;q._clearTimer(t);q._webAudio||!x._node||isNaN(x._node.duration)||(x._node.currentTime=h);var F=function(){B&&q.play(t,!0);q._emit("seek",t)};if(B&&!q._webAudio){var I=function(){q._playLock?setTimeout(I,0):F()};setTimeout(I,0)}else F()}return q},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 t=this._duration;
h=this._soundById(h);return h&&(t=this._sprite[h._sprite][1]/1E3),t},state:function(){return this._state},unload:function(){for(var h=this._sounds,t=0;t<h.length;t++)h[t]._paused||this.stop(h[t]._id),this._webAudio||(this._clearSound(h[t]._node),h[t]._node.removeEventListener("error",h[t]._errorFn,!1),h[t]._node.removeEventListener(v._canPlayEvent,h[t]._loadFn,!1),h[t]._node.removeEventListener("ended",h[t]._endFn,!1),v._releaseHtml5Audio(h[t]._node)),delete h[t]._node,this._clearTimer(h[t]._id);
t=v._howls.indexOf(this);0<=t&&v._howls.splice(t,1);h=!0;for(t=0;t<v._howls.length;t++)if(v._howls[t]._src===this._src||0<=this._src.indexOf(v._howls[t]._src)){h=!1;break}return P&&h&&delete P[this._src],v.noAudio=!1,this._state="unloaded",this._sounds=[],null},on:function(h,t,q,n){h=this["_on"+h];return"function"==typeof t&&h.push(n?{id:q,fn:t,once:n}:{id:q,fn:t}),this},off:function(h,t,q){var n=this["_on"+h];if("number"==typeof t&&(q=t,t=null),t||q)for(h=0;h<n.length;h++){var x=q===n[h].id;if(t===
n[h].fn&&x||!t&&x){n.splice(h,1);break}}else if(h)this["_on"+h]=[];else for(t=Object.keys(this),h=0;h<t.length;h++)0===t[h].indexOf("_on")&&Array.isArray(this[t[h]])&&(this[t[h]]=[]);return this},once:function(h,t,q){return this.on(h,t,q,1),this},_emit:function(h,t,q){for(var n=this["_on"+h],x=n.length-1;0<=x;x--)n[x].id&&n[x].id!==t&&"load"!==h||(setTimeout(function(h){h.call(this,t,q)}.bind(this,n[x].fn),0),n[x].once&&this.off(h,n[x].fn,n[x].id));return this._loadQueue(h),this},_loadQueue:function(h){if(0<
this._queue.length){var t=this._queue[0];t.event===h&&(this._queue.shift(),this._loadQueue());h||t.action()}return this},_ended:function(h){var t=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;t=!(!h._loop&&!this._sprite[t][2]);if(this._emit("end",h._id),!this._webAudio&&t&&this.stop(h._id,!0).play(h._id),this._webAudio&&t){this._emit("play",h._id);h._seek=h._start||0;h._rateSeek=0;h._playStart=
v.ctx.currentTime;var q=1E3*(h._stop-h._start)/Math.abs(h._rate);this._endTimers[h._id]=setTimeout(this._ended.bind(this,h),q)}return this._webAudio&&!t&&(h._paused=!0,h._ended=!0,h._seek=h._start||0,h._rateSeek=0,this._clearTimer(h._id),this._cleanBuffer(h._node),v._autoSuspend()),this._webAudio||t||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 t=this._soundById(h);t&&t._node&&t._node.removeEventListener("ended",
this._endTimers[h],!1)}delete this._endTimers[h]}return this},_soundById:function(h){for(var t=0;t<this._sounds.length;t++)if(h===this._sounds[t]._id)return this._sounds[t];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 I(this)},_drain:function(){var h=this._pool,t=0,q;if(!(this._sounds.length<h)){for(q=0;q<this._sounds.length;q++)this._sounds[q]._ended&&t++;for(q=this._sounds.length-1;0<=
q&&!(t<=h);q--)this._sounds[q]._ended&&(this._webAudio&&this._sounds[q]._node&&this._sounds[q]._node.disconnect(0),this._sounds.splice(q,1),t--)}},_getSoundIds:function(h){if(void 0===h){h=[];for(var q=0;q<this._sounds.length;q++)h.push(this._sounds[q]._id);return h}return[h]},_refreshBuffer:function(h){return h._node.bufferSource=v.ctx.createBufferSource(),h._node.bufferSource.buffer=P[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,v.ctx.currentTime),this},_cleanBuffer:function(h){var q=v._navigator&&0<=v._navigator.vendor.indexOf("Apple");if(!h.bufferSource)return this;if(v._scratchBuffer&&h.bufferSource&&(h.bufferSource.onended=null,h.bufferSource.disconnect(0),q))try{h.bufferSource.buffer=v._scratchBuffer}catch(G){}return h.bufferSource=null,this},_clearSound:function(h){/MSIE |Trident\//.test(v._navigator&&
v._navigator.userAgent)||(h.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var I=function(h){this._parent=h;this.init()};I.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=++v._counter,h._sounds.push(this),this.create(),this},create:function(){var h=this._parent,q=v._muted||this._muted||
this._parent._muted?0:this._volume;return h._webAudio?(this._node=void 0===v.ctx.createGain?v.ctx.createGainNode():v.ctx.createGain(),this._node.gain.setValueAtTime(q,v.ctx.currentTime),this._node.paused=!0,this._node.connect(v.masterGain)):v.noAudio||(this._node=v._obtainHtml5Audio(),this._errorFn=this._errorListener.bind(this),this._node.addEventListener("error",this._errorFn,!1),this._loadFn=this._loadListener.bind(this),this._node.addEventListener(v._canPlayEvent,this._loadFn,!1),this._endFn=
this._endListener.bind(this),this._node.addEventListener("ended",this._endFn,!1),this._node.src=h._src,this._node.preload=!0===h._preload?"auto":h._preload,this._node.volume=q*v.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=++v._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(v._canPlayEvent,this._loadFn,!1)},_endListener:function(){var h=this._parent;h._duration===1/0&&(h._duration=Math.ceil(10*
this._node.duration)/10,h._sprite.__default[1]===1/0&&(h._sprite.__default[1]=1E3*h._duration),h._ended(this));this._node.removeEventListener("ended",this._endFn,!1)}};var P={},Q=function(h){var q=h._src;if(P[q])return h._duration=P[q].duration,void oa(h);if(/^data:[^;]+;base64,/.test(q)){for(var v=atob(q.split(",")[1]),n=new Uint8Array(v.length),B=0;B<v.length;++B)n[B]=v.charCodeAt(B);x(n.buffer,h)}else{var F=new XMLHttpRequest;F.open(h._xhr.method,q,!0);F.withCredentials=h._xhr.withCredentials;
F.responseType="arraybuffer";h._xhr.headers&&Object.keys(h._xhr.headers).forEach(function(n){F.setRequestHeader(n,h._xhr.headers[n])});F.onload=function(){var n=(F.status+"")[0];if("0"!==n&&"2"!==n&&"3"!==n)return void h._emit("loaderror",null,"Failed loading audio file with status: "+F.status+".");x(F.response,h)};F.onerror=function(){h._webAudio&&(h._html5=!0,h._webAudio=!1,h._sounds=[],delete P[q],h.load())};ca(F)}},ca=function(h){try{h.send()}catch(t){h.onerror()}},x=function(h,q){var t=function(){q._emit("loaderror",
null,"Decoding audio data failed.")},n=function(h){h&&0<q._sounds.length?(P[q._src]=h,oa(q,h)):t()};"undefined"!=typeof Promise&&1===v.ctx.decodeAudioData.length?v.ctx.decodeAudioData(h).then(n).catch(t):v.ctx.decodeAudioData(h,n,t)},oa=function(h,q){q&&!h._duration&&(h._duration=q.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())},q=function(){if(v.usingWebAudio){try{"undefined"!=typeof AudioContext?
v.ctx=new AudioContext:"undefined"!=typeof webkitAudioContext?v.ctx=new webkitAudioContext:v.usingWebAudio=!1}catch(G){v.usingWebAudio=!1}v.ctx||(v.usingWebAudio=!1);var h=/iP(hone|od|ad)/.test(v._navigator&&v._navigator.platform),q=v._navigator&&v._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);q=q?parseInt(q[1],10):null;h&&q&&9>q&&(h=/safari/.test(v._navigator&&v._navigator.userAgent.toLowerCase()),v._navigator&&!h&&(v.usingWebAudio=!1));v.usingWebAudio&&(v.masterGain=void 0===v.ctx.createGain?
v.ctx.createGainNode():v.ctx.createGain(),v.masterGain.gain.setValueAtTime(v._muted?0:v._volume,v.ctx.currentTime),v.masterGain.connect(v.ctx.destination));v._setup()}};"function"==typeof define&&define.amd&&define([],function(){return{Howler:v,Howl:F}});"undefined"!=typeof exports&&(exports.Howler=v,exports.Howl=F);"undefined"!=typeof global?(global.HowlerGlobal=B,global.Howler=v,global.Howl=F,global.Sound=I):"undefined"!=typeof window&&(window.HowlerGlobal=B,window.Howler=v,window.Howl=F,window.Sound=
I)}(),!function(){HowlerGlobal.prototype._pos=[0,0,0];HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0];HowlerGlobal.prototype.stereo=function(v){if(!this.ctx||!this.ctx.listener)return this;for(var B=this._howls.length-1;0<=B;B--)this._howls[B].stereo(v);return this};HowlerGlobal.prototype.pos=function(v,B,I){return this.ctx&&this.ctx.listener?(B="number"!=typeof B?this._pos[1]:B,I="number"!=typeof I?this._pos[2]:I,"number"!=typeof v?this._pos:(this._pos=[v,B,I],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(v,B,I,P,Q,ca){if(!this.ctx||!this.ctx.listener)return this;var x=this._orientation;return B="number"!=typeof B?x[1]:B,I=
"number"!=typeof I?x[2]:I,P="number"!=typeof P?x[3]:P,Q="number"!=typeof Q?x[4]:Q,ca="number"!=typeof ca?x[5]:ca,"number"!=typeof v?x:(this._orientation=[v,B,I,P,Q,ca],void 0!==this.ctx.listener.forwardX?(this.ctx.listener.forwardX.setTargetAtTime(v,Howler.ctx.currentTime,.1),this.ctx.listener.forwardY.setTargetAtTime(B,Howler.ctx.currentTime,.1),this.ctx.listener.forwardZ.setTargetAtTime(I,Howler.ctx.currentTime,.1),this.ctx.listener.upX.setTargetAtTime(P,Howler.ctx.currentTime,.1),this.ctx.listener.upY.setTargetAtTime(Q,
Howler.ctx.currentTime,.1),this.ctx.listener.upZ.setTargetAtTime(ca,Howler.ctx.currentTime,.1)):this.ctx.listener.setOrientation(v,B,I,P,Q,ca),this)};Howl.prototype.init=function(v){return function(B){return this._orientation=B.orientation||[1,0,0],this._stereo=B.stereo||null,this._pos=B.pos||null,this._pannerAttr={coneInnerAngle:void 0!==B.coneInnerAngle?B.coneInnerAngle:360,coneOuterAngle:void 0!==B.coneOuterAngle?B.coneOuterAngle:360,coneOuterGain:void 0!==B.coneOuterGain?B.coneOuterGain:0,distanceModel:void 0!==
B.distanceModel?B.distanceModel:"inverse",maxDistance:void 0!==B.maxDistance?B.maxDistance:1E4,panningModel:void 0!==B.panningModel?B.panningModel:"HRTF",refDistance:void 0!==B.refDistance?B.refDistance:1,rolloffFactor:void 0!==B.rolloffFactor?B.rolloffFactor:1},this._onstereo=B.onstereo?[{fn:B.onstereo}]:[],this._onpos=B.onpos?[{fn:B.onpos}]:[],this._onorientation=B.onorientation?[{fn:B.onorientation}]:[],v.call(this,B)}}(Howl.prototype.init);Howl.prototype.stereo=function(v,F){var I=this;if(!I._webAudio)return I;
if("loaded"!==I._state)return I._queue.push({event:"stereo",action:function(){I.stereo(v,F)}}),I;var P=void 0===Howler.ctx.createStereoPanner?"spatial":"stereo";if(void 0===F){if("number"!=typeof v)return I._stereo;I._stereo=v;I._pos=[v,0,0]}for(var Q=I._getSoundIds(F),ca=0;ca<Q.length;ca++){var x=I._soundById(Q[ca]);if(x){if("number"!=typeof v)return x._stereo;x._stereo=v;x._pos=[v,0,0];x._node&&(x._pannerAttr.panningModel="equalpower",x._panner&&x._panner.pan||B(x,P),"spatial"===P?void 0!==x._panner.positionX?
(x._panner.positionX.setValueAtTime(v,Howler.ctx.currentTime),x._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),x._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):x._panner.setPosition(v,0,0):x._panner.pan.setValueAtTime(v,Howler.ctx.currentTime));I._emit("stereo",x._id)}}return I};Howl.prototype.pos=function(v,F,I,P){var Q=this;if(!Q._webAudio)return Q;if("loaded"!==Q._state)return Q._queue.push({event:"pos",action:function(){Q.pos(v,F,I,P)}}),Q;if(F="number"!=typeof F?0:F,
I="number"!=typeof I?-.5:I,void 0===P){if("number"!=typeof v)return Q._pos;Q._pos=[v,F,I]}for(var ca=Q._getSoundIds(P),x=0;x<ca.length;x++){var oa=Q._soundById(ca[x]);if(oa){if("number"!=typeof v)return oa._pos;oa._pos=[v,F,I];oa._node&&(oa._panner&&!oa._panner.pan||B(oa,"spatial"),void 0!==oa._panner.positionX?(oa._panner.positionX.setValueAtTime(v,Howler.ctx.currentTime),oa._panner.positionY.setValueAtTime(F,Howler.ctx.currentTime),oa._panner.positionZ.setValueAtTime(I,Howler.ctx.currentTime)):
oa._panner.setPosition(v,F,I));Q._emit("pos",oa._id)}}return Q};Howl.prototype.orientation=function(v,F,I,P){var Q=this;if(!Q._webAudio)return Q;if("loaded"!==Q._state)return Q._queue.push({event:"orientation",action:function(){Q.orientation(v,F,I,P)}}),Q;if(F="number"!=typeof F?Q._orientation[1]:F,I="number"!=typeof I?Q._orientation[2]:I,void 0===P){if("number"!=typeof v)return Q._orientation;Q._orientation=[v,F,I]}for(var ca=Q._getSoundIds(P),x=0;x<ca.length;x++){var oa=Q._soundById(ca[x]);if(oa){if("number"!=
typeof v)return oa._orientation;oa._orientation=[v,F,I];oa._node&&(oa._panner||(oa._pos||(oa._pos=Q._pos||[0,0,-.5]),B(oa,"spatial")),void 0!==oa._panner.orientationX?(oa._panner.orientationX.setValueAtTime(v,Howler.ctx.currentTime),oa._panner.orientationY.setValueAtTime(F,Howler.ctx.currentTime),oa._panner.orientationZ.setValueAtTime(I,Howler.ctx.currentTime)):oa._panner.setOrientation(v,F,I));Q._emit("orientation",oa._id)}}return Q};Howl.prototype.pannerAttr=function(){var v,F,I=arguments;if(!this._webAudio)return this;
if(0===I.length)return this._pannerAttr;if(1===I.length){if("object"!=typeof I[0])return F=this._soundById(parseInt(I[0],10)),F?F._pannerAttr:this._pannerAttr;var P=I[0];void 0===v&&(P.pannerAttr||(P.pannerAttr={coneInnerAngle:P.coneInnerAngle,coneOuterAngle:P.coneOuterAngle,coneOuterGain:P.coneOuterGain,distanceModel:P.distanceModel,maxDistance:P.maxDistance,refDistance:P.refDistance,rolloffFactor:P.rolloffFactor,panningModel:P.panningModel}),this._pannerAttr={coneInnerAngle:void 0!==P.pannerAttr.coneInnerAngle?
P.pannerAttr.coneInnerAngle:this._coneInnerAngle,coneOuterAngle:void 0!==P.pannerAttr.coneOuterAngle?P.pannerAttr.coneOuterAngle:this._coneOuterAngle,coneOuterGain:void 0!==P.pannerAttr.coneOuterGain?P.pannerAttr.coneOuterGain:this._coneOuterGain,distanceModel:void 0!==P.pannerAttr.distanceModel?P.pannerAttr.distanceModel:this._distanceModel,maxDistance:void 0!==P.pannerAttr.maxDistance?P.pannerAttr.maxDistance:this._maxDistance,refDistance:void 0!==P.pannerAttr.refDistance?P.pannerAttr.refDistance:
this._refDistance,rolloffFactor:void 0!==P.pannerAttr.rolloffFactor?P.pannerAttr.rolloffFactor:this._rolloffFactor,panningModel:void 0!==P.pannerAttr.panningModel?P.pannerAttr.panningModel:this._panningModel})}else 2===I.length&&(P=I[0],v=parseInt(I[1],10));v=this._getSoundIds(v);for(I=0;I<v.length;I++)if(F=this._soundById(v[I])){var Q=F._pannerAttr;Q={coneInnerAngle:void 0!==P.coneInnerAngle?P.coneInnerAngle:Q.coneInnerAngle,coneOuterAngle:void 0!==P.coneOuterAngle?P.coneOuterAngle:Q.coneOuterAngle,
coneOuterGain:void 0!==P.coneOuterGain?P.coneOuterGain:Q.coneOuterGain,distanceModel:void 0!==P.distanceModel?P.distanceModel:Q.distanceModel,maxDistance:void 0!==P.maxDistance?P.maxDistance:Q.maxDistance,refDistance:void 0!==P.refDistance?P.refDistance:Q.refDistance,rolloffFactor:void 0!==P.rolloffFactor?P.rolloffFactor:Q.rolloffFactor,panningModel:void 0!==P.panningModel?P.panningModel:Q.panningModel};var ca=F._panner;ca||(F._pos||(F._pos=this._pos||[0,0,-.5]),B(F,"spatial"),ca=F._panner);ca.coneInnerAngle=
Q.coneInnerAngle;ca.coneOuterAngle=Q.coneOuterAngle;ca.coneOuterGain=Q.coneOuterGain;ca.distanceModel=Q.distanceModel;ca.maxDistance=Q.maxDistance;ca.refDistance=Q.refDistance;ca.rolloffFactor=Q.rolloffFactor;ca.panningModel=Q.panningModel}return this};Sound.prototype.init=function(v){return function(){var B=this._parent;this._orientation=B._orientation;this._stereo=B._stereo;this._pos=B._pos;this._pannerAttr=B._pannerAttr;v.call(this);this._stereo?B.stereo(this._stereo):this._pos&&B.pos(this._pos[0],
this._pos[1],this._pos[2],this._id)}}(Sound.prototype.init);Sound.prototype.reset=function(v){return function(){var B=this._parent;return this._orientation=B._orientation,this._stereo=B._stereo,this._pos=B._pos,this._pannerAttr=B._pannerAttr,this._stereo?B.stereo(this._stereo):this._pos?B.pos(this._pos[0],this._pos[1],this._pos[2],this._id):this._panner&&(this._panner.disconnect(0),this._panner=void 0,B._refreshBuffer(this)),v.call(this)}}(Sound.prototype.reset);var B=function(v,B){"spatial"===(B||
"spatial")?(v._panner=Howler.ctx.createPanner(),v._panner.coneInnerAngle=v._pannerAttr.coneInnerAngle,v._panner.coneOuterAngle=v._pannerAttr.coneOuterAngle,v._panner.coneOuterGain=v._pannerAttr.coneOuterGain,v._panner.distanceModel=v._pannerAttr.distanceModel,v._panner.maxDistance=v._pannerAttr.maxDistance,v._panner.refDistance=v._pannerAttr.refDistance,v._panner.rolloffFactor=v._pannerAttr.rolloffFactor,v._panner.panningModel=v._pannerAttr.panningModel,void 0!==v._panner.positionX?(v._panner.positionX.setValueAtTime(v._pos[0],
Howler.ctx.currentTime),v._panner.positionY.setValueAtTime(v._pos[1],Howler.ctx.currentTime),v._panner.positionZ.setValueAtTime(v._pos[2],Howler.ctx.currentTime)):v._panner.setPosition(v._pos[0],v._pos[1],v._pos[2]),void 0!==v._panner.orientationX?(v._panner.orientationX.setValueAtTime(v._orientation[0],Howler.ctx.currentTime),v._panner.orientationY.setValueAtTime(v._orientation[1],Howler.ctx.currentTime),v._panner.orientationZ.setValueAtTime(v._orientation[2],Howler.ctx.currentTime)):v._panner.setOrientation(v._orientation[0],
v._orientation[1],v._orientation[2])):(v._panner=Howler.ctx.createStereoPanner(),v._panner.pan.setValueAtTime(v._stereo,Howler.ctx.currentTime));v._panner.connect(v._node);v._paused||v._parent.pause(v._id,!0).play(v._id,!0)}}());
!function(B){"object"==typeof exports&&"undefined"!=typeof module?module.exports=B():"function"==typeof define&&define.amd?define([],B):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=B()}(function(){return function P(v,F,I){function Q(x,q){if(!F[x]){if(!v[x]){var h="function"==typeof require&&require;if(!q&&h)return h(x,!0);if(ca)return ca(x,!0);q=Error("Cannot find module '"+x+"'");throw q.code="MODULE_NOT_FOUND",q;}q=F[x]={exports:{}};
v[x][0].call(q.exports,function(h){var q=v[x][1][h];return Q(q?q:h)},q,q.exports,P,v,F,I)}return F[x].exports}for(var ca="function"==typeof require&&require,x=0;x<I.length;x++)Q(I[x]);return Q}({1:[function(v,F,I){function P(v){if(!(this instanceof P))return new P(v);v=this.options=x.assign({level:n,method:Bb,chunkSize:16384,windowBits:15,memLevel:8,strategy:Kb,to:""},v||{});v.raw&&0<v.windowBits?v.windowBits=-v.windowBits:v.gzip&&0<v.windowBits&&16>v.windowBits&&(v.windowBits+=16);this.err=0;this.msg=
"";this.ended=!1;this.chunks=[];this.strm=new h;this.strm.avail_out=0;var F=ca.deflateInit2(this.strm,v.level,v.method,v.windowBits,v.memLevel,v.strategy);if(F!==G)throw Error(q[F]);if(v.header&&ca.deflateSetHeader(this.strm,v.header),v.dictionary){var I;if(I="string"==typeof v.dictionary?oa.string2buf(v.dictionary):"[object ArrayBuffer]"===t.call(v.dictionary)?new Uint8Array(v.dictionary):v.dictionary,F=ca.deflateSetDictionary(this.strm,I),F!==G)throw Error(q[F]);this._dict_set=!0}}function Q(h,
n){n=new P(n);if(n.push(h,!0),n.err)throw n.msg;return n.result}var ca=v("./zlib/deflate"),x=v("./utils/common"),oa=v("./utils/strings"),q=v("./zlib/messages"),h=v("./zlib/zstream"),t=Object.prototype.toString,G=0,n=-1,Kb=0,Bb=8;P.prototype.push=function(h,n){var q,v=this.strm,F=this.options.chunkSize;if(this.ended)return!1;n=n===~~n?n:!0===n?4:0;"string"==typeof h?v.input=oa.string2buf(h):"[object ArrayBuffer]"===t.call(h)?v.input=new Uint8Array(h):v.input=h;v.next_in=0;v.avail_in=v.input.length;
do{if(0===v.avail_out&&(v.output=new x.Buf8(F),v.next_out=0,v.avail_out=F),q=ca.deflate(v,n),1!==q&&q!==G)return this.onEnd(q),this.ended=!0,!1;0!==v.avail_out&&(0!==v.avail_in||4!==n&&2!==n)||("string"===this.options.to?this.onData(oa.buf2binstring(x.shrinkBuf(v.output,v.next_out))):this.onData(x.shrinkBuf(v.output,v.next_out)))}while((0<v.avail_in||0===v.avail_out)&&1!==q);return 4===n?(q=ca.deflateEnd(this.strm),this.onEnd(q),this.ended=!0,q===G):2!==n||(this.onEnd(G),v.avail_out=0,!0)};P.prototype.onData=
function(h){this.chunks.push(h)};P.prototype.onEnd=function(h){h===G&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=x.flattenChunks(this.chunks));this.chunks=[];this.err=h;this.msg=this.strm.msg};I.Deflate=P;I.deflate=Q;I.deflateRaw=function(h,n){return n=n||{},n.raw=!0,Q(h,n)};I.gzip=function(h,n){return n=n||{},n.gzip=!0,Q(h,n)}},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(v,F,I){function P(n){if(!(this instanceof
P))return new P(n);var v=this.options=x.assign({chunkSize:16384,windowBits:0,to:""},n||{});v.raw&&0<=v.windowBits&&16>v.windowBits&&(v.windowBits=-v.windowBits,0===v.windowBits&&(v.windowBits=-15));!(0<=v.windowBits&&16>v.windowBits)||n&&n.windowBits||(v.windowBits+=32);15<v.windowBits&&48>v.windowBits&&0===(15&v.windowBits)&&(v.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new t;this.strm.avail_out=0;n=ca.inflateInit2(this.strm,v.windowBits);if(n!==q.Z_OK)throw Error(h[n]);
this.header=new G;ca.inflateGetHeader(this.strm,this.header)}function Q(h,n){n=new P(n);if(n.push(h,!0),n.err)throw n.msg;return n.result}var ca=v("./zlib/inflate"),x=v("./utils/common"),oa=v("./utils/strings"),q=v("./zlib/constants"),h=v("./zlib/messages"),t=v("./zlib/zstream"),G=v("./zlib/gzheader"),n=Object.prototype.toString;P.prototype.push=function(h,t){var v,G,F,I,P,Q=this.strm,ia=this.options.chunkSize,Bb=this.options.dictionary,ta=!1;if(this.ended)return!1;t=t===~~t?t:!0===t?q.Z_FINISH:q.Z_NO_FLUSH;
"string"==typeof h?Q.input=oa.binstring2buf(h):"[object ArrayBuffer]"===n.call(h)?Q.input=new Uint8Array(h):Q.input=h;Q.next_in=0;Q.avail_in=Q.input.length;do{if(0===Q.avail_out&&(Q.output=new x.Buf8(ia),Q.next_out=0,Q.avail_out=ia),v=ca.inflate(Q,q.Z_NO_FLUSH),v===q.Z_NEED_DICT&&Bb&&(P="string"==typeof Bb?oa.string2buf(Bb):"[object ArrayBuffer]"===n.call(Bb)?new Uint8Array(Bb):Bb,v=ca.inflateSetDictionary(this.strm,P)),v===q.Z_BUF_ERROR&&!0===ta&&(v=q.Z_OK,ta=!1),v!==q.Z_STREAM_END&&v!==q.Z_OK)return this.onEnd(v),
this.ended=!0,!1;Q.next_out&&(0!==Q.avail_out&&v!==q.Z_STREAM_END&&(0!==Q.avail_in||t!==q.Z_FINISH&&t!==q.Z_SYNC_FLUSH)||("string"===this.options.to?(G=oa.utf8border(Q.output,Q.next_out),F=Q.next_out-G,I=oa.buf2string(Q.output,G),Q.next_out=F,Q.avail_out=ia-F,F&&x.arraySet(Q.output,Q.output,G,F,0),this.onData(I)):this.onData(x.shrinkBuf(Q.output,Q.next_out))));0===Q.avail_in&&0===Q.avail_out&&(ta=!0)}while((0<Q.avail_in||0===Q.avail_out)&&v!==q.Z_STREAM_END);return v===q.Z_STREAM_END&&(t=q.Z_FINISH),
t===q.Z_FINISH?(v=ca.inflateEnd(this.strm),this.onEnd(v),this.ended=!0,v===q.Z_OK):t!==q.Z_SYNC_FLUSH||(this.onEnd(q.Z_OK),Q.avail_out=0,!0)};P.prototype.onData=function(h){this.chunks.push(h)};P.prototype.onEnd=function(h){h===q.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=x.flattenChunks(this.chunks));this.chunks=[];this.err=h;this.msg=this.strm.msg};I.Inflate=P;I.inflate=Q;I.inflateRaw=function(h,n){return n=n||{},n.raw=!0,Q(h,n)};I.ungzip=Q},{"./utils/common":3,
"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(v,F,I){v="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;I.assign=function(v){for(var x=Array.prototype.slice.call(arguments,1);x.length;){var F=x.shift();if(F){if("object"!=typeof F)throw new TypeError(F+"must be non-object");for(var q in F)F.hasOwnProperty(q)&&(v[q]=F[q])}}return v};I.shrinkBuf=function(v,x){return v.length===
x?v:v.subarray?v.subarray(0,x):(v.length=x,v)};var P={arraySet:function(v,x,F,q,h){if(x.subarray&&v.subarray)return void v.set(x.subarray(F,F+q),h);for(var t=0;t<q;t++)v[h+t]=x[F+t]},flattenChunks:function(v){var x,F;var q=F=0;for(x=v.length;q<x;q++)F+=v[q].length;var h=new Uint8Array(F);q=F=0;for(x=v.length;q<x;q++){var t=v[q];h.set(t,F);F+=t.length}return h}},Q={arraySet:function(v,x,F,q,h){for(var t=0;t<q;t++)v[h+t]=x[F+t]},flattenChunks:function(v){return[].concat.apply([],v)}};I.setTyped=function(v){v?
(I.Buf8=Uint8Array,I.Buf16=Uint16Array,I.Buf32=Int32Array,I.assign(I,P)):(I.Buf8=Array,I.Buf16=Array,I.Buf32=Array,I.assign(I,Q))};I.setTyped(v)},{}],4:[function(v,F,I){function P(q,h){if(65537>h&&(q.subarray&&x||!q.subarray&&ca))return String.fromCharCode.apply(null,Q.shrinkBuf(q,h));for(var t="",v=0;v<h;v++)t+=String.fromCharCode(q[v]);return t}var Q=v("./common"),ca=!0,x=!0;try{String.fromCharCode.apply(null,[0])}catch(q){ca=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(q){x=!1}var oa=
new Q.Buf8(256);for(v=0;256>v;v++)oa[v]=252<=v?6:248<=v?5:240<=v?4:224<=v?3:192<=v?2:1;oa[254]=oa[254]=1;I.string2buf=function(q){var h,t,v,n=q.length,x=0;for(t=0;t<n;t++){var F=q.charCodeAt(t);55296===(64512&F)&&t+1<n&&(h=q.charCodeAt(t+1),56320===(64512&h)&&(F=65536+(F-55296<<10)+(h-56320),t++));x+=128>F?1:2048>F?2:65536>F?3:4}var I=new Q.Buf8(x);for(t=v=0;v<x;t++)F=q.charCodeAt(t),55296===(64512&F)&&t+1<n&&(h=q.charCodeAt(t+1),56320===(64512&h)&&(F=65536+(F-55296<<10)+(h-56320),t++)),128>F?I[v++]=
F:2048>F?(I[v++]=192|F>>>6,I[v++]=128|63&F):65536>F?(I[v++]=224|F>>>12,I[v++]=128|F>>>6&63,I[v++]=128|63&F):(I[v++]=240|F>>>18,I[v++]=128|F>>>12&63,I[v++]=128|F>>>6&63,I[v++]=128|63&F);return I};I.buf2binstring=function(q){return P(q,q.length)};I.binstring2buf=function(q){for(var h=new Q.Buf8(q.length),t=0,v=h.length;t<v;t++)h[t]=q.charCodeAt(t);return h};I.buf2string=function(q,h){var t,v,n,x=h||q.length,F=Array(2*x);for(h=t=0;h<x;)if(v=q[h++],128>v)F[t++]=v;else if(n=oa[v],4<n)F[t++]=65533,h+=n-
1;else{for(v&=2===n?31:3===n?15:7;1<n&&h<x;)v=v<<6|63&q[h++],n--;1<n?F[t++]=65533:65536>v?F[t++]=v:(v-=65536,F[t++]=55296|v>>10&1023,F[t++]=56320|1023&v)}return P(F,t)};I.utf8border=function(q,h){var t;h=h||q.length;h>q.length&&(h=q.length);for(t=h-1;0<=t&&128===(192&q[t]);)t--;return 0>t?h:0===t?h:t+oa[q[t]]>h?t:h}},{"./common":3}],5:[function(v,F,I){F.exports=function(v,F,I,x){var P=65535&v|0;v=v>>>16&65535|0;for(var q;0!==I;){q=2E3<I?2E3:I;I-=q;do P=P+F[x++]|0,v=v+P|0;while(--q);P%=65521;v%=65521}return P|
v<<16|0}},{}],6:[function(v,F,I){F.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(v,F,I){var P=function(){for(var v,F=[],x=0;256>x;x++){v=x;
for(var I=0;8>I;I++)v=1&v?3988292384^v>>>1:v>>>1;F[x]=v}return F}();F.exports=function(v,F,x,I){x=I+x;for(v^=-1;I<x;I++)v=v>>>8^P[255&(v^F[I])];return v^-1}},{}],8:[function(v,F,I){function P(h,n){return h.msg=Jc[n],n}function Q(h){for(var n=h.length;0<=--n;)h[n]=0}function ca(h){var n=h.state,q=n.pending;q>h.avail_out&&(q=h.avail_out);0!==q&&(ub.arraySet(h.output,n.pending_buf,n.pending_out,q,h.next_out),h.next_out+=q,n.pending_out+=q,h.total_out+=q,h.avail_out-=q,n.pending-=q,0===n.pending&&(n.pending_out=
0))}function x(h,n){Da._tr_flush_block(h,0<=h.block_start?h.block_start:-1,h.strstart-h.block_start,n);h.block_start=h.strstart;ca(h.strm)}function oa(h,n){h.pending_buf[h.pending++]=n}function q(h,n){h.pending_buf[h.pending++]=n>>>8&255;h.pending_buf[h.pending++]=255&n}function h(h,n){var q,t,v=h.max_chain_length,x=h.strstart,E=h.prev_length,D=h.nice_match,F=h.strstart>h.w_size-hb?h.strstart-(h.w_size-hb):0,G=h.window,I=h.w_mask,ta=h.prev,P=h.strstart+lb,R=G[x+E-1],T=G[x+E];h.prev_length>=h.good_match&&
(v>>=2);D>h.lookahead&&(D=h.lookahead);do if(q=n,G[q+E]===T&&G[q+E-1]===R&&G[q]===G[x]&&G[++q]===G[x+1]){x+=2;for(q++;G[++x]===G[++q]&&G[++x]===G[++q]&&G[++x]===G[++q]&&G[++x]===G[++q]&&G[++x]===G[++q]&&G[++x]===G[++q]&&G[++x]===G[++q]&&G[++x]===G[++q]&&x<P;);if(t=lb-(P-x),x=P-lb,t>E){if(h.match_start=n,E=t,t>=D)break;R=G[x+E-1];T=G[x+E]}}while((n=ta[n&I])>F&&0!==--v);return E<=h.lookahead?E:h.lookahead}function t(h){var n,q,t=h.w_size;do{if(q=h.window_size-h.lookahead-h.strstart,h.strstart>=t+(t-
hb)){ub.arraySet(h.window,h.window,t,t,0);h.match_start-=t;h.strstart-=t;h.block_start-=t;var v=n=h.hash_size;do{var x=h.head[--v];h.head[v]=x>=t?x-t:0}while(--n);v=n=t;do x=h.prev[--v],h.prev[v]=x>=t?x-t:0;while(--n);q+=t}if(0===h.strm.avail_in)break;v=h.strm;x=h.window;var E=h.strstart+h.lookahead,D=v.avail_in;if(n=(D>q&&(D=q),0===D?0:(v.avail_in-=D,ub.arraySet(x,v.input,v.next_in,D,E),1===v.state.wrap?v.adler=Fb(v.adler,x,D,E):2===v.state.wrap&&(v.adler=ia(v.adler,x,D,E)),v.next_in+=D,v.total_in+=
D,D)),h.lookahead+=n,h.lookahead+h.insert>=R)for(q=h.strstart-h.insert,h.ins_h=h.window[q],h.ins_h=(h.ins_h<<h.hash_shift^h.window[q+1])&h.hash_mask;h.insert&&(h.ins_h=(h.ins_h<<h.hash_shift^h.window[q+R-1])&h.hash_mask,h.prev[q&h.w_mask]=h.head[h.ins_h],h.head[h.ins_h]=q,q++,h.insert--,!(h.lookahead+h.insert<R)););}while(h.lookahead<hb&&0!==h.strm.avail_in)}function G(n,q){for(var y,v;;){if(n.lookahead<hb){if(t(n),n.lookahead<hb&&q===ta)return T;if(0===n.lookahead)break}if(y=0,n.lookahead>=R&&(n.ins_h=
(n.ins_h<<n.hash_shift^n.window[n.strstart+R-1])&n.hash_mask,y=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart),0!==y&&n.strstart-y<=n.w_size-hb&&(n.match_length=h(n,y)),n.match_length>=R)if(v=Da._tr_tally(n,n.strstart-n.match_start,n.match_length-R),n.lookahead-=n.match_length,n.match_length<=n.max_lazy_match&&n.lookahead>=R){n.match_length--;do n.strstart++,n.ins_h=(n.ins_h<<n.hash_shift^n.window[n.strstart+R-1])&n.hash_mask,y=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=
n.strstart;while(0!==--n.match_length);n.strstart++}else n.strstart+=n.match_length,n.match_length=0,n.ins_h=n.window[n.strstart],n.ins_h=(n.ins_h<<n.hash_shift^n.window[n.strstart+1])&n.hash_mask;else v=Da._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++;if(v&&(x(n,!1),0===n.strm.avail_out))return T}return n.insert=n.strstart<R-1?n.strstart:R-1,q===Ga?(x(n,!0),0===n.strm.avail_out?Qb:wc):n.last_lit&&(x(n,!1),0===n.strm.avail_out)?T:Ic}function n(n,q){for(var y,v,E;;){if(n.lookahead<
hb){if(t(n),n.lookahead<hb&&q===ta)return T;if(0===n.lookahead)break}if(y=0,n.lookahead>=R&&(n.ins_h=(n.ins_h<<n.hash_shift^n.window[n.strstart+R-1])&n.hash_mask,y=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart),n.prev_length=n.match_length,n.prev_match=n.match_start,n.match_length=R-1,0!==y&&n.prev_length<n.max_lazy_match&&n.strstart-y<=n.w_size-hb&&(n.match_length=h(n,y),5>=n.match_length&&(n.strategy===Ta||n.match_length===R&&4096<n.strstart-n.match_start)&&(n.match_length=
R-1)),n.prev_length>=R&&n.match_length<=n.prev_length){E=n.strstart+n.lookahead-R;v=Da._tr_tally(n,n.strstart-1-n.prev_match,n.prev_length-R);n.lookahead-=n.prev_length-1;n.prev_length-=2;do++n.strstart<=E&&(n.ins_h=(n.ins_h<<n.hash_shift^n.window[n.strstart+R-1])&n.hash_mask,y=n.prev[n.strstart&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=n.strstart);while(0!==--n.prev_length);if(n.match_available=0,n.match_length=R-1,n.strstart++,v&&(x(n,!1),0===n.strm.avail_out))return T}else if(n.match_available){if(v=
Da._tr_tally(n,0,n.window[n.strstart-1]),v&&x(n,!1),n.strstart++,n.lookahead--,0===n.strm.avail_out)return T}else n.match_available=1,n.strstart++,n.lookahead--}return n.match_available&&(Da._tr_tally(n,0,n.window[n.strstart-1]),n.match_available=0),n.insert=n.strstart<R-1?n.strstart:R-1,q===Ga?(x(n,!0),0===n.strm.avail_out?Qb:wc):n.last_lit&&(x(n,!1),0===n.strm.avail_out)?T:Ic}function Kb(h,n,q,t,v){this.good_length=h;this.max_lazy=n;this.nice_length=q;this.max_chain=t;this.func=v}function Bb(){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=Gd;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 ub.Buf16(2*Na);this.dyn_dtree=new ub.Buf16(2*(2*Sd+1));this.bl_tree=new ub.Buf16(2*(2*D+1));Q(this.dyn_ltree);Q(this.dyn_dtree);Q(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new ub.Buf16(Ha+1);this.heap=new ub.Buf16(2*bd+1);Q(this.heap);this.heap_max=this.heap_len=0;this.depth=new ub.Buf16(2*bd+1);Q(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 Mc(h){var n;return h&&h.state?(h.total_in=h.total_out=0,h.data_type=ad,n=h.state,n.pending=0,n.pending_out=0,0>n.wrap&&(n.wrap=-n.wrap),n.status=n.wrap?Ia:ja,h.adler=2===n.wrap?0:1,n.last_flush=ta,Da._tr_init(n),ib):P(h,da)}function $b(h){var n=Mc(h);n===ib&&(h=h.state,h.window_size=2*h.w_size,Q(h.head),h.max_lazy_match=Vb[h.level].max_lazy,h.good_match=Vb[h.level].good_length,h.nice_match=Vb[h.level].nice_length,h.max_chain_length=Vb[h.level].max_chain,
h.strstart=0,h.block_start=0,h.lookahead=0,h.insert=0,h.match_length=h.prev_length=R-1,h.match_available=0,h.ins_h=0);return n}function vd(h,n,q,t,v,x){if(!h)return da;var y=1;if(n===Aa&&(n=6),0>t?(y=0,t=-t):15<t&&(y=2,t-=16),1>v||v>$a||q!==Gd||8>t||15<t||0>n||9<n||0>x||x>Ka)return P(h,da);8===t&&(t=9);var E=new Bb;return h.state=E,E.strm=h,E.wrap=y,E.gzhead=null,E.w_bits=t,E.w_size=1<<E.w_bits,E.w_mask=E.w_size-1,E.hash_bits=v+7,E.hash_size=1<<E.hash_bits,E.hash_mask=E.hash_size-1,E.hash_shift=~~((E.hash_bits+
R-1)/R),E.window=new ub.Buf8(2*E.w_size),E.head=new ub.Buf16(E.hash_size),E.prev=new ub.Buf16(E.w_size),E.lit_bufsize=1<<v+6,E.pending_buf_size=4*E.lit_bufsize,E.pending_buf=new ub.Buf8(E.pending_buf_size),E.d_buf=1*E.lit_bufsize,E.l_buf=3*E.lit_bufsize,E.level=n,E.strategy=x,E.method=q,$b(h)}var ub=v("../utils/common"),Da=v("./trees"),Fb=v("./adler32"),ia=v("./crc32"),Jc=v("./messages"),ta=0,Ga=4,ib=0,da=-2,Aa=-1,Ta=1,Ka=4,ad=2,Gd=8,$a=9,bd=286,Sd=30,D=19,Na=2*bd+1,Ha=15,R=3,lb=258,hb=lb+R+1,Ia=
42,ja=113,T=1,Ic=2,Qb=3,wc=4;var Vb=[new Kb(0,0,0,0,function(h,n){var q=65535;for(q>h.pending_buf_size-5&&(q=h.pending_buf_size-5);;){if(1>=h.lookahead){if(t(h),0===h.lookahead&&n===ta)return T;if(0===h.lookahead)break}h.strstart+=h.lookahead;h.lookahead=0;var v=h.block_start+q;if((0===h.strstart||h.strstart>=v)&&(h.lookahead=h.strstart-v,h.strstart=v,x(h,!1),0===h.strm.avail_out)||h.strstart-h.block_start>=h.w_size-hb&&(x(h,!1),0===h.strm.avail_out))return T}return h.insert=0,n===Ga?(x(h,!0),0===
h.strm.avail_out?Qb:wc):(h.strstart>h.block_start&&x(h,!1),T)}),new Kb(4,4,8,4,G),new Kb(4,5,16,8,G),new Kb(4,6,32,32,G),new Kb(4,4,16,16,n),new Kb(8,16,32,32,n),new Kb(8,16,128,128,n),new Kb(8,32,128,256,n),new Kb(32,128,258,1024,n),new Kb(32,258,258,4096,n)];I.deflateInit=function(h,n){return vd(h,n,Gd,15,8,0)};I.deflateInit2=vd;I.deflateReset=$b;I.deflateResetKeep=Mc;I.deflateSetHeader=function(h,n){return h&&h.state?2!==h.state.wrap?da:(h.state.gzhead=n,ib):da};I.deflate=function(h,n){var y,v;
if(!h||!h.state||5<n||0>n)return h?P(h,da):da;if(v=h.state,!h.output||!h.input&&0!==h.avail_in||666===v.status&&n!==Ga)return P(h,0===h.avail_out?-5:da);if(v.strm=h,y=v.last_flush,v.last_flush=n,v.status===Ia)if(2===v.wrap)h.adler=0,oa(v,31),oa(v,139),oa(v,8),v.gzhead?(oa(v,(v.gzhead.text?1:0)+(v.gzhead.hcrc?2:0)+(v.gzhead.extra?4:0)+(v.gzhead.name?8:0)+(v.gzhead.comment?16:0)),oa(v,255&v.gzhead.time),oa(v,v.gzhead.time>>8&255),oa(v,v.gzhead.time>>16&255),oa(v,v.gzhead.time>>24&255),oa(v,9===v.level?
2:2<=v.strategy||2>v.level?4:0),oa(v,255&v.gzhead.os),v.gzhead.extra&&v.gzhead.extra.length&&(oa(v,255&v.gzhead.extra.length),oa(v,v.gzhead.extra.length>>8&255)),v.gzhead.hcrc&&(h.adler=ia(h.adler,v.pending_buf,v.pending,0)),v.gzindex=0,v.status=69):(oa(v,0),oa(v,0),oa(v,0),oa(v,0),oa(v,0),oa(v,9===v.level?2:2<=v.strategy||2>v.level?4:0),oa(v,3),v.status=ja);else{var D=Gd+(v.w_bits-8<<4)<<8;D|=(2<=v.strategy||2>v.level?0:6>v.level?1:6===v.level?2:3)<<6;0!==v.strstart&&(D|=32);v.status=ja;q(v,D+(31-
D%31));0!==v.strstart&&(q(v,h.adler>>>16),q(v,65535&h.adler));h.adler=1}if(69===v.status)if(v.gzhead.extra){for(D=v.pending;v.gzindex<(65535&v.gzhead.extra.length)&&(v.pending!==v.pending_buf_size||(v.gzhead.hcrc&&v.pending>D&&(h.adler=ia(h.adler,v.pending_buf,v.pending-D,D)),ca(h),D=v.pending,v.pending!==v.pending_buf_size));)oa(v,255&v.gzhead.extra[v.gzindex]),v.gzindex++;v.gzhead.hcrc&&v.pending>D&&(h.adler=ia(h.adler,v.pending_buf,v.pending-D,D));v.gzindex===v.gzhead.extra.length&&(v.gzindex=
0,v.status=73)}else v.status=73;if(73===v.status)if(v.gzhead.name){D=v.pending;do{if(v.pending===v.pending_buf_size&&(v.gzhead.hcrc&&v.pending>D&&(h.adler=ia(h.adler,v.pending_buf,v.pending-D,D)),ca(h),D=v.pending,v.pending===v.pending_buf_size)){var E=1;break}E=v.gzindex<v.gzhead.name.length?255&v.gzhead.name.charCodeAt(v.gzindex++):0;oa(v,E)}while(0!==E);v.gzhead.hcrc&&v.pending>D&&(h.adler=ia(h.adler,v.pending_buf,v.pending-D,D));0===E&&(v.gzindex=0,v.status=91)}else v.status=91;if(91===v.status)if(v.gzhead.comment){D=
v.pending;do{if(v.pending===v.pending_buf_size&&(v.gzhead.hcrc&&v.pending>D&&(h.adler=ia(h.adler,v.pending_buf,v.pending-D,D)),ca(h),D=v.pending,v.pending===v.pending_buf_size)){E=1;break}E=v.gzindex<v.gzhead.comment.length?255&v.gzhead.comment.charCodeAt(v.gzindex++):0;oa(v,E)}while(0!==E);v.gzhead.hcrc&&v.pending>D&&(h.adler=ia(h.adler,v.pending_buf,v.pending-D,D));0===E&&(v.status=103)}else v.status=103;if(103===v.status&&(v.gzhead.hcrc?(v.pending+2>v.pending_buf_size&&ca(h),v.pending+2<=v.pending_buf_size&&
(oa(v,255&h.adler),oa(v,h.adler>>8&255),h.adler=0,v.status=ja)):v.status=ja),0!==v.pending){if(ca(h),0===h.avail_out)return v.last_flush=-1,ib}else if(0===h.avail_in&&(n<<1)-(4<n?9:0)<=(y<<1)-(4<y?9:0)&&n!==Ga)return P(h,-5);if(666===v.status&&0!==h.avail_in)return P(h,-5);if(0!==h.avail_in||0!==v.lookahead||n!==ta&&666!==v.status){if(2===v.strategy)a:{for(var F;;){if(0===v.lookahead&&(t(v),0===v.lookahead)){if(n===ta){var G=T;break a}break}if(v.match_length=0,F=Da._tr_tally(v,0,v.window[v.strstart]),
v.lookahead--,v.strstart++,F&&(x(v,!1),0===v.strm.avail_out)){G=T;break a}}G=(v.insert=0,n===Ga?(x(v,!0),0===v.strm.avail_out?Qb:wc):v.last_lit&&(x(v,!1),0===v.strm.avail_out)?T:Ic)}else if(3===v.strategy)a:{var I,Aa;for(F=v.window;;){if(v.lookahead<=lb){if(t(v),v.lookahead<=lb&&n===ta){G=T;break a}if(0===v.lookahead)break}if(v.match_length=0,v.lookahead>=R&&0<v.strstart&&(Aa=v.strstart-1,I=F[Aa],I===F[++Aa]&&I===F[++Aa]&&I===F[++Aa])){for(y=v.strstart+lb;I===F[++Aa]&&I===F[++Aa]&&I===F[++Aa]&&I===
F[++Aa]&&I===F[++Aa]&&I===F[++Aa]&&I===F[++Aa]&&I===F[++Aa]&&Aa<y;);v.match_length=lb-(y-Aa);v.match_length>v.lookahead&&(v.match_length=v.lookahead)}if(v.match_length>=R?(G=Da._tr_tally(v,1,v.match_length-R),v.lookahead-=v.match_length,v.strstart+=v.match_length,v.match_length=0):(G=Da._tr_tally(v,0,v.window[v.strstart]),v.lookahead--,v.strstart++),G&&(x(v,!1),0===v.strm.avail_out)){G=T;break a}}G=(v.insert=0,n===Ga?(x(v,!0),0===v.strm.avail_out?Qb:wc):v.last_lit&&(x(v,!1),0===v.strm.avail_out)?
T:Ic)}else G=Vb[v.level].func(v,n);if(G!==Qb&&G!==wc||(v.status=666),G===T||G===Qb)return 0===h.avail_out&&(v.last_flush=-1),ib;if(G===Ic&&(1===n?Da._tr_align(v):5!==n&&(Da._tr_stored_block(v,0,0,!1),3===n&&(Q(v.head),0===v.lookahead&&(v.strstart=0,v.block_start=0,v.insert=0))),ca(h),0===h.avail_out))return v.last_flush=-1,ib}return n!==Ga?ib:0>=v.wrap?1:(2===v.wrap?(oa(v,255&h.adler),oa(v,h.adler>>8&255),oa(v,h.adler>>16&255),oa(v,h.adler>>24&255),oa(v,255&h.total_in),oa(v,h.total_in>>8&255),oa(v,
h.total_in>>16&255),oa(v,h.total_in>>24&255)):(q(v,h.adler>>>16),q(v,65535&h.adler)),ca(h),0<v.wrap&&(v.wrap=-v.wrap),0!==v.pending?ib:1)};I.deflateEnd=function(h){var n;return h&&h.state?(n=h.state.status,n!==Ia&&69!==n&&73!==n&&91!==n&&103!==n&&n!==ja&&666!==n?P(h,da):(h.state=null,n===ja?P(h,-3):ib)):da};I.deflateSetDictionary=function(h,n){var q,v,x;var D=n.length;if(!h||!h.state||(q=h.state,v=q.wrap,2===v||1===v&&q.status!==Ia||q.lookahead))return da;1===v&&(h.adler=Fb(h.adler,n,D,0));q.wrap=
0;D>=q.w_size&&(0===v&&(Q(q.head),q.strstart=0,q.block_start=0,q.insert=0),x=new ub.Buf8(q.w_size),ub.arraySet(x,n,D-q.w_size,q.w_size,0),n=x,D=q.w_size);x=h.avail_in;var E=h.next_in;var F=h.input;h.avail_in=D;h.next_in=0;h.input=n;for(t(q);q.lookahead>=R;){n=q.strstart;D=q.lookahead-(R-1);do q.ins_h=(q.ins_h<<q.hash_shift^q.window[n+R-1])&q.hash_mask,q.prev[n&q.w_mask]=q.head[q.ins_h],q.head[q.ins_h]=n,n++;while(--D);q.strstart=n;q.lookahead=R-1;t(q)}return q.strstart+=q.lookahead,q.block_start=
q.strstart,q.insert=q.lookahead,q.lookahead=0,q.match_length=q.prev_length=R-1,q.match_available=0,h.next_in=E,h.input=F,h.avail_in=x,q.wrap=v,ib};I.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,"./trees":14}],9:[function(v,F,I){F.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(v,F,I){F.exports=function(v,F){var I,x,
P;var q=v.state;var h=v.next_in;var t=v.input;var G=h+(v.avail_in-5);var n=v.next_out;var Q=v.output;F=n-(F-v.avail_out);var Bb=n+(v.avail_out-257);var Mc=q.dmax;var $b=q.wsize;var vd=q.whave;var ub=q.wnext;var Da=q.window;var Fb=q.hold;var ia=q.bits;var Jc=q.lencode;var ta=q.distcode;var Ga=(1<<q.lenbits)-1;var ib=(1<<q.distbits)-1;a:do{15>ia&&(Fb+=t[h++]<<ia,ia+=8,Fb+=t[h++]<<ia,ia+=8);var da=Jc[Fb&Ga];b:for(;;){if(I=da>>>24,Fb>>>=I,ia-=I,I=da>>>16&255,0===I)Q[n++]=65535&da;else{if(!(16&I)){if(0===
(64&I)){da=Jc[(65535&da)+(Fb&(1<<I)-1)];continue b}if(32&I){q.mode=12;break a}v.msg="invalid literal/length code";q.mode=30;break a}var Aa=65535&da;(I&=15)&&(ia<I&&(Fb+=t[h++]<<ia,ia+=8),Aa+=Fb&(1<<I)-1,Fb>>>=I,ia-=I);15>ia&&(Fb+=t[h++]<<ia,ia+=8,Fb+=t[h++]<<ia,ia+=8);da=ta[Fb&ib];c:for(;;){if(I=da>>>24,Fb>>>=I,ia-=I,I=da>>>16&255,!(16&I)){if(0===(64&I)){da=ta[(65535&da)+(Fb&(1<<I)-1)];continue c}v.msg="invalid distance code";q.mode=30;break a}if(x=65535&da,I&=15,ia<I&&(Fb+=t[h++]<<ia,ia+=8,ia<I&&
(Fb+=t[h++]<<ia,ia+=8)),x+=Fb&(1<<I)-1,x>Mc){v.msg="invalid distance too far back";q.mode=30;break a}if(Fb>>>=I,ia-=I,I=n-F,x>I){if(I=x-I,I>vd&&q.sane){v.msg="invalid distance too far back";q.mode=30;break a}if(da=0,P=Da,0===ub){if(da+=$b-I,I<Aa){Aa-=I;do Q[n++]=Da[da++];while(--I);da=n-x;P=Q}}else if(ub<I){if(da+=$b+ub-I,I-=ub,I<Aa){Aa-=I;do Q[n++]=Da[da++];while(--I);if(da=0,ub<Aa){I=ub;Aa-=I;do Q[n++]=Da[da++];while(--I);da=n-x;P=Q}}}else if(da+=ub-I,I<Aa){Aa-=I;do Q[n++]=Da[da++];while(--I);da=
n-x;P=Q}for(;2<Aa;)Q[n++]=P[da++],Q[n++]=P[da++],Q[n++]=P[da++],Aa-=3;Aa&&(Q[n++]=P[da++],1<Aa&&(Q[n++]=P[da++]))}else{da=n-x;do Q[n++]=Q[da++],Q[n++]=Q[da++],Q[n++]=Q[da++],Aa-=3;while(2<Aa);Aa&&(Q[n++]=Q[da++],1<Aa&&(Q[n++]=Q[da++]))}break}}break}}while(h<G&&n<Bb);Aa=ia>>3;h-=Aa;ia-=Aa<<3;v.next_in=h;v.next_out=n;v.avail_in=h<G?5+(G-h):5-(h-G);v.avail_out=n<Bb?257+(Bb-n):257-(n-Bb);q.hold=Fb&(1<<ia)-1;q.bits=ia}},{}],11:[function(v,F,I){function P(h){return(h>>>24&255)+(h>>>8&65280)+((65280&h)<<
8)+((255&h)<<24)}function Q(){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 n.Buf16(320);this.work=new n.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function ca(h){var q;
return h&&h.state?(q=h.state,h.total_in=h.total_out=q.total=0,h.msg="",q.wrap&&(h.adler=1&q.wrap),q.mode=Da,q.last=0,q.havedict=0,q.dmax=32768,q.head=null,q.hold=0,q.bits=0,q.lencode=q.lendyn=new n.Buf32(Fb),q.distcode=q.distdyn=new n.Buf32(ia),q.sane=1,q.back=-1,vd):ub}function x(h){var n;return h&&h.state?(n=h.state,n.wsize=0,n.whave=0,n.wnext=0,ca(h)):ub}function oa(h,n){var q,t;return h&&h.state?(t=h.state,0>n?(q=0,n=-n):(q=(n>>4)+1,48>n&&(n&=15)),n&&(8>n||15<n)?ub:(null!==t.window&&t.wbits!==
n&&(t.window=null),t.wrap=q,t.wbits=n,x(h))):ub}function q(h,n){var q,t;return h?(t=new Q,h.state=t,t.window=null,q=oa(h,n),q!==vd&&(h.state=null),q):ub}function h(h,q,t,v){var x;h=h.state;return null===h.window&&(h.wsize=1<<h.wbits,h.wnext=0,h.whave=0,h.window=new n.Buf8(h.wsize)),v>=h.wsize?(n.arraySet(h.window,q,t-h.wsize,h.wsize,0),h.wnext=0,h.whave=h.wsize):(x=h.wsize-h.wnext,x>v&&(x=v),n.arraySet(h.window,q,t-v,x,h.wnext),v-=x,v?(n.arraySet(h.window,q,t-v,v,0),h.wnext=v,h.whave=h.wsize):(h.wnext+=
x,h.wnext===h.wsize&&(h.wnext=0),h.whave<h.wsize&&(h.whave+=x))),0}var t,G,n=v("../utils/common"),Kb=v("./adler32"),Bb=v("./crc32"),Mc=v("./inffast"),$b=v("./inftrees"),vd=0,ub=-2,Da=1,Fb=852,ia=592,Jc=!0;I.inflateReset=x;I.inflateReset2=oa;I.inflateResetKeep=ca;I.inflateInit=function(h){return q(h,15)};I.inflateInit2=q;I.inflate=function(q,v){var x,F,I,Q,ta,ia,oa,ca=0,Ga=new n.Buf8(4),Fb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!q||!q.state||!q.output||!q.input&&0!==q.avail_in)return ub;
var D=q.state;12===D.mode&&(D.mode=13);var Na=q.next_out;var Ha=q.output;var R=q.avail_out;var lb=q.next_in;var hb=q.input;var Ia=q.avail_in;var ja=D.hold;var T=D.bits;var Ic=Ia;var Qb=R;var wc=vd;a:for(;;)switch(D.mode){case Da:if(0===D.wrap){D.mode=13;break}for(;16>T;){if(0===Ia)break a;Ia--;ja+=hb[lb++]<<T;T+=8}if(2&D.wrap&&35615===ja){D.check=0;Ga[0]=255&ja;Ga[1]=ja>>>8&255;D.check=Bb(D.check,Ga,2,0);T=ja=0;D.mode=2;break}if(D.flags=0,D.head&&(D.head.done=!1),!(1&D.wrap)||(((255&ja)<<8)+(ja>>
8))%31){q.msg="incorrect header check";D.mode=30;break}if(8!==(15&ja)){q.msg="unknown compression method";D.mode=30;break}if(ja>>>=4,T-=4,ia=(15&ja)+8,0===D.wbits)D.wbits=ia;else if(ia>D.wbits){q.msg="invalid window size";D.mode=30;break}D.dmax=1<<ia;q.adler=D.check=1;D.mode=512&ja?10:12;T=ja=0;break;case 2:for(;16>T;){if(0===Ia)break a;Ia--;ja+=hb[lb++]<<T;T+=8}if(D.flags=ja,8!==(255&D.flags)){q.msg="unknown compression method";D.mode=30;break}if(57344&D.flags){q.msg="unknown header flags set";D.mode=
30;break}D.head&&(D.head.text=ja>>8&1);512&D.flags&&(Ga[0]=255&ja,Ga[1]=ja>>>8&255,D.check=Bb(D.check,Ga,2,0));T=ja=0;D.mode=3;case 3:for(;32>T;){if(0===Ia)break a;Ia--;ja+=hb[lb++]<<T;T+=8}D.head&&(D.head.time=ja);512&D.flags&&(Ga[0]=255&ja,Ga[1]=ja>>>8&255,Ga[2]=ja>>>16&255,Ga[3]=ja>>>24&255,D.check=Bb(D.check,Ga,4,0));T=ja=0;D.mode=4;case 4:for(;16>T;){if(0===Ia)break a;Ia--;ja+=hb[lb++]<<T;T+=8}D.head&&(D.head.xflags=255&ja,D.head.os=ja>>8);512&D.flags&&(Ga[0]=255&ja,Ga[1]=ja>>>8&255,D.check=
Bb(D.check,Ga,2,0));T=ja=0;D.mode=5;case 5:if(1024&D.flags){for(;16>T;){if(0===Ia)break a;Ia--;ja+=hb[lb++]<<T;T+=8}D.length=ja;D.head&&(D.head.extra_len=ja);512&D.flags&&(Ga[0]=255&ja,Ga[1]=ja>>>8&255,D.check=Bb(D.check,Ga,2,0));T=ja=0}else D.head&&(D.head.extra=null);D.mode=6;case 6:if(1024&D.flags&&(x=D.length,x>Ia&&(x=Ia),x&&(D.head&&(ia=D.head.extra_len-D.length,D.head.extra||(D.head.extra=Array(D.head.extra_len)),n.arraySet(D.head.extra,hb,lb,x,ia)),512&D.flags&&(D.check=Bb(D.check,hb,x,lb)),
Ia-=x,lb+=x,D.length-=x),D.length))break a;D.length=0;D.mode=7;case 7:if(2048&D.flags){if(0===Ia)break a;x=0;do ia=hb[lb+x++],D.head&&ia&&65536>D.length&&(D.head.name+=String.fromCharCode(ia));while(ia&&x<Ia);if(512&D.flags&&(D.check=Bb(D.check,hb,x,lb)),Ia-=x,lb+=x,ia)break a}else D.head&&(D.head.name=null);D.length=0;D.mode=8;case 8:if(4096&D.flags){if(0===Ia)break a;x=0;do ia=hb[lb+x++],D.head&&ia&&65536>D.length&&(D.head.comment+=String.fromCharCode(ia));while(ia&&x<Ia);if(512&D.flags&&(D.check=
Bb(D.check,hb,x,lb)),Ia-=x,lb+=x,ia)break a}else D.head&&(D.head.comment=null);D.mode=9;case 9:if(512&D.flags){for(;16>T;){if(0===Ia)break a;Ia--;ja+=hb[lb++]<<T;T+=8}if(ja!==(65535&D.check)){q.msg="header crc mismatch";D.mode=30;break}T=ja=0}D.head&&(D.head.hcrc=D.flags>>9&1,D.head.done=!0);q.adler=D.check=0;D.mode=12;break;case 10:for(;32>T;){if(0===Ia)break a;Ia--;ja+=hb[lb++]<<T;T+=8}q.adler=D.check=P(ja);T=ja=0;D.mode=11;case 11:if(0===D.havedict)return q.next_out=Na,q.avail_out=R,q.next_in=
lb,q.avail_in=Ia,D.hold=ja,D.bits=T,2;q.adler=D.check=1;D.mode=12;case 12:if(5===v||6===v)break a;case 13:if(D.last){ja>>>=7&T;T-=7&T;D.mode=27;break}for(;3>T;){if(0===Ia)break a;Ia--;ja+=hb[lb++]<<T;T+=8}switch(D.last=1&ja,ja>>>=1,--T,3&ja){case 0:D.mode=14;break;case 1:var Vb=D;if(Jc){t=new n.Buf32(512);G=new n.Buf32(32);for(I=0;144>I;)Vb.lens[I++]=8;for(;256>I;)Vb.lens[I++]=9;for(;280>I;)Vb.lens[I++]=7;for(;288>I;)Vb.lens[I++]=8;$b(1,Vb.lens,0,288,t,0,Vb.work,{bits:9});for(I=0;32>I;)Vb.lens[I++]=
5;$b(2,Vb.lens,0,32,G,0,Vb.work,{bits:5});Jc=!1}Vb.lencode=t;Vb.lenbits=9;Vb.distcode=G;Vb.distbits=5;if(D.mode=20,6===v){ja>>>=2;T-=2;break a}break;case 2:D.mode=17;break;case 3:q.msg="invalid block type",D.mode=30}ja>>>=2;T-=2;break;case 14:ja>>>=7&T;for(T-=7&T;32>T;){if(0===Ia)break a;Ia--;ja+=hb[lb++]<<T;T+=8}if((65535&ja)!==(ja>>>16^65535)){q.msg="invalid stored block lengths";D.mode=30;break}if(D.length=65535&ja,ja=0,T=0,D.mode=15,6===v)break a;case 15:D.mode=16;case 16:if(x=D.length){if(x>
Ia&&(x=Ia),x>R&&(x=R),0===x)break a;n.arraySet(Ha,hb,lb,x,Na);Ia-=x;lb+=x;R-=x;Na+=x;D.length-=x;break}D.mode=12;break;case 17:for(;14>T;){if(0===Ia)break a;Ia--;ja+=hb[lb++]<<T;T+=8}if(D.nlen=(31&ja)+257,ja>>>=5,T-=5,D.ndist=(31&ja)+1,ja>>>=5,T-=5,D.ncode=(15&ja)+4,ja>>>=4,T-=4,286<D.nlen||30<D.ndist){q.msg="too many length or distance symbols";D.mode=30;break}D.have=0;D.mode=18;case 18:for(;D.have<D.ncode;){for(;3>T;){if(0===Ia)break a;Ia--;ja+=hb[lb++]<<T;T+=8}D.lens[Fb[D.have++]]=7&ja;ja>>>=3;
T-=3}for(;19>D.have;)D.lens[Fb[D.have++]]=0;if(D.lencode=D.lendyn,D.lenbits=7,oa={bits:D.lenbits},wc=$b(0,D.lens,0,19,D.lencode,0,D.work,oa),D.lenbits=oa.bits,wc){q.msg="invalid code lengths set";D.mode=30;break}D.have=0;D.mode=19;case 19:for(;D.have<D.nlen+D.ndist;){for(;ca=D.lencode[ja&(1<<D.lenbits)-1],Q=ca>>>24,Vb=65535&ca,!(Q<=T);){if(0===Ia)break a;Ia--;ja+=hb[lb++]<<T;T+=8}if(16>Vb)ja>>>=Q,T-=Q,D.lens[D.have++]=Vb;else{if(16===Vb){for(I=Q+2;T<I;){if(0===Ia)break a;Ia--;ja+=hb[lb++]<<T;T+=8}if(ja>>>=
Q,T-=Q,0===D.have){q.msg="invalid bit length repeat";D.mode=30;break}ia=D.lens[D.have-1];x=3+(3&ja);ja>>>=2;T-=2}else if(17===Vb){for(I=Q+3;T<I;){if(0===Ia)break a;Ia--;ja+=hb[lb++]<<T;T+=8}ja>>>=Q;T-=Q;ia=0;x=3+(7&ja);ja>>>=3;T-=3}else{for(I=Q+7;T<I;){if(0===Ia)break a;Ia--;ja+=hb[lb++]<<T;T+=8}ja>>>=Q;T-=Q;ia=0;x=11+(127&ja);ja>>>=7;T-=7}if(D.have+x>D.nlen+D.ndist){q.msg="invalid bit length repeat";D.mode=30;break}for(;x--;)D.lens[D.have++]=ia}}if(30===D.mode)break;if(0===D.lens[256]){q.msg="invalid code -- missing end-of-block";
D.mode=30;break}if(D.lenbits=9,oa={bits:D.lenbits},wc=$b(1,D.lens,0,D.nlen,D.lencode,0,D.work,oa),D.lenbits=oa.bits,wc){q.msg="invalid literal/lengths set";D.mode=30;break}if(D.distbits=6,D.distcode=D.distdyn,oa={bits:D.distbits},wc=$b(2,D.lens,D.nlen,D.ndist,D.distcode,0,D.work,oa),D.distbits=oa.bits,wc){q.msg="invalid distances set";D.mode=30;break}if(D.mode=20,6===v)break a;case 20:D.mode=21;case 21:if(6<=Ia&&258<=R){q.next_out=Na;q.avail_out=R;q.next_in=lb;q.avail_in=Ia;D.hold=ja;D.bits=T;Mc(q,
Qb);Na=q.next_out;Ha=q.output;R=q.avail_out;lb=q.next_in;hb=q.input;Ia=q.avail_in;ja=D.hold;T=D.bits;12===D.mode&&(D.back=-1);break}for(D.back=0;ca=D.lencode[ja&(1<<D.lenbits)-1],Q=ca>>>24,I=ca>>>16&255,Vb=65535&ca,!(Q<=T);){if(0===Ia)break a;Ia--;ja+=hb[lb++]<<T;T+=8}if(I&&0===(240&I)){var E=Q;var Rb=I;for(ta=Vb;ca=D.lencode[ta+((ja&(1<<E+Rb)-1)>>E)],Q=ca>>>24,I=ca>>>16&255,Vb=65535&ca,!(E+Q<=T);){if(0===Ia)break a;Ia--;ja+=hb[lb++]<<T;T+=8}ja>>>=E;T-=E;D.back+=E}if(ja>>>=Q,T-=Q,D.back+=Q,D.length=
Vb,0===I){D.mode=26;break}if(32&I){D.back=-1;D.mode=12;break}if(64&I){q.msg="invalid literal/length code";D.mode=30;break}D.extra=15&I;D.mode=22;case 22:if(D.extra){for(I=D.extra;T<I;){if(0===Ia)break a;Ia--;ja+=hb[lb++]<<T;T+=8}D.length+=ja&(1<<D.extra)-1;ja>>>=D.extra;T-=D.extra;D.back+=D.extra}D.was=D.length;D.mode=23;case 23:for(;ca=D.distcode[ja&(1<<D.distbits)-1],Q=ca>>>24,I=ca>>>16&255,Vb=65535&ca,!(Q<=T);){if(0===Ia)break a;Ia--;ja+=hb[lb++]<<T;T+=8}if(0===(240&I)){E=Q;Rb=I;for(ta=Vb;ca=D.distcode[ta+
((ja&(1<<E+Rb)-1)>>E)],Q=ca>>>24,I=ca>>>16&255,Vb=65535&ca,!(E+Q<=T);){if(0===Ia)break a;Ia--;ja+=hb[lb++]<<T;T+=8}ja>>>=E;T-=E;D.back+=E}if(ja>>>=Q,T-=Q,D.back+=Q,64&I){q.msg="invalid distance code";D.mode=30;break}D.offset=Vb;D.extra=15&I;D.mode=24;case 24:if(D.extra){for(I=D.extra;T<I;){if(0===Ia)break a;Ia--;ja+=hb[lb++]<<T;T+=8}D.offset+=ja&(1<<D.extra)-1;ja>>>=D.extra;T-=D.extra;D.back+=D.extra}if(D.offset>D.dmax){q.msg="invalid distance too far back";D.mode=30;break}D.mode=25;case 25:if(0===
R)break a;if(x=Qb-R,D.offset>x){if(x=D.offset-x,x>D.whave&&D.sane){q.msg="invalid distance too far back";D.mode=30;break}x>D.wnext?(x-=D.wnext,F=D.wsize-x):F=D.wnext-x;x>D.length&&(x=D.length);I=D.window}else I=Ha,F=Na-D.offset,x=D.length;x>R&&(x=R);R-=x;D.length-=x;do Ha[Na++]=I[F++];while(--x);0===D.length&&(D.mode=21);break;case 26:if(0===R)break a;Ha[Na++]=D.length;R--;D.mode=21;break;case 27:if(D.wrap){for(;32>T;){if(0===Ia)break a;Ia--;ja|=hb[lb++]<<T;T+=8}if(Qb-=R,q.total_out+=Qb,D.total+=
Qb,Qb&&(q.adler=D.check=D.flags?Bb(D.check,Ha,Qb,Na-Qb):Kb(D.check,Ha,Qb,Na-Qb)),Qb=R,(D.flags?ja:P(ja))!==D.check){q.msg="incorrect data check";D.mode=30;break}T=ja=0}D.mode=28;case 28:if(D.wrap&&D.flags){for(;32>T;){if(0===Ia)break a;Ia--;ja+=hb[lb++]<<T;T+=8}if(ja!==(4294967295&D.total)){q.msg="incorrect length check";D.mode=30;break}T=ja=0}D.mode=29;case 29:wc=1;break a;case 30:wc=-3;break a;case 31:return-4;default:return ub}return q.next_out=Na,q.avail_out=R,q.next_in=lb,q.avail_in=Ia,D.hold=
ja,D.bits=T,(D.wsize||Qb!==q.avail_out&&30>D.mode&&(27>D.mode||4!==v))&&h(q,q.output,q.next_out,Qb-q.avail_out)?(D.mode=31,-4):(Ic-=q.avail_in,Qb-=q.avail_out,q.total_in+=Ic,q.total_out+=Qb,D.total+=Qb,D.wrap&&Qb&&(q.adler=D.check=D.flags?Bb(D.check,Ha,Qb,q.next_out-Qb):Kb(D.check,Ha,Qb,q.next_out-Qb)),q.data_type=D.bits+(D.last?64:0)+(12===D.mode?128:0)+(20===D.mode||15===D.mode?256:0),(0===Ic&&0===Qb||4===v)&&wc===vd&&(wc=-5),wc)};I.inflateEnd=function(h){if(!h||!h.state)return ub;var n=h.state;
return n.window&&(n.window=null),h.state=null,vd};I.inflateGetHeader=function(h,n){var q;return h&&h.state?(q=h.state,0===(2&q.wrap)?ub:(q.head=n,n.done=!1,vd)):ub};I.inflateSetDictionary=function(n,q){var t,v,x=q.length;return n&&n.state?(t=n.state,0!==t.wrap&&11!==t.mode?ub:11===t.mode&&(v=1,v=Kb(v,q,x,0),v!==t.check)?-3:h(n,q,x,x)?(t.mode=31,-4):(t.havedict=1,vd)):ub};I.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],
12:[function(v,F,I){var P=v("../utils/common"),Q=[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],ca=[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],x=[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],oa=[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];F.exports=function(q,h,t,v,n,I,F,Mc){var G,
Bb,ub,Da,Fb,ia,Kb=Mc.bits,ta,Ga,ib,da,Aa,Ta=0,Ka,ad=null,Gd=0,$a=new P.Buf16(16);var bd=new P.Buf16(16);var Sd=null,D=0;for(ta=0;15>=ta;ta++)$a[ta]=0;for(Ga=0;Ga<v;Ga++)$a[h[t+Ga]]++;var Na=Kb;for(ib=15;1<=ib&&0===$a[ib];ib--);if(Na>ib&&(Na=ib),0===ib)return n[I++]=20971520,n[I++]=20971520,Mc.bits=1,0;for(Kb=1;Kb<ib&&0===$a[Kb];Kb++);Na<Kb&&(Na=Kb);for(ta=G=1;15>=ta;ta++)if(G<<=1,G-=$a[ta],0>G)return-1;if(0<G&&(0===q||1!==ib))return-1;bd[1]=0;for(ta=1;15>ta;ta++)bd[ta+1]=bd[ta]+$a[ta];for(Ga=0;Ga<
v;Ga++)0!==h[t+Ga]&&(F[bd[h[t+Ga]]++]=Ga);if(0===q?(ad=Sd=F,Da=19):1===q?(ad=Q,Gd-=257,Sd=ca,D-=257,Da=256):(ad=x,Sd=oa,Da=-1),Ka=0,Ga=0,ta=Kb,bd=I,da=Na,Aa=0,ub=-1,Ta=1<<Na,v=Ta-1,1===q&&852<Ta||2===q&&592<Ta)return 1;for(var Ha=0;;){Ha++;var R=ta-Aa;F[Ga]<Da?(Fb=0,ia=F[Ga]):F[Ga]>Da?(Fb=Sd[D+F[Ga]],ia=ad[Gd+F[Ga]]):(Fb=96,ia=0);G=1<<ta-Aa;Kb=Bb=1<<da;do Bb-=G,n[bd+(Ka>>Aa)+Bb]=R<<24|Fb<<16|ia|0;while(0!==Bb);for(G=1<<ta-1;Ka&G;)G>>=1;if(0!==G?(Ka&=G-1,Ka+=G):Ka=0,Ga++,0===--$a[ta]){if(ta===ib)break;
ta=h[t+F[Ga]]}if(ta>Na&&(Ka&v)!==ub){0===Aa&&(Aa=Na);bd+=Kb;da=ta-Aa;for(G=1<<da;da+Aa<ib&&(G-=$a[da+Aa],!(0>=G));)da++,G<<=1;if(Ta+=1<<da,1===q&&852<Ta||2===q&&592<Ta)return 1;ub=Ka&v;n[ub]=Na<<24|da<<16|bd-I|0}}return 0!==Ka&&(n[bd+Ka]=ta-Aa<<24|4194304),Mc.bits=Na,0}},{"../utils/common":3}],13:[function(v,F,I){F.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(v,F,I){function P(h){for(var n=h.length;0<=--n;)h[n]=0}function Q(h,n,q,t,v){this.static_tree=h;this.extra_bits=n;this.extra_base=q;this.elems=t;this.max_length=v;this.has_stree=h&&h.length}function ca(h,n){this.dyn_tree=h;this.max_code=0;this.stat_desc=n}function x(h,n){h.pending_buf[h.pending++]=255&n;h.pending_buf[h.pending++]=n>>>8&255}function oa(h,n,q){h.bi_valid>Gd-q?(h.bi_buf|=n<<h.bi_valid&65535,x(h,h.bi_buf),h.bi_buf=n>>Gd-h.bi_valid,h.bi_valid+=q-Gd):(h.bi_buf|=n<<h.bi_valid&
65535,h.bi_valid+=q)}function q(h,n,q){oa(h,q[2*n],q[2*n+1])}function h(h,n){var q=0;do q|=1&h,h>>>=1,q<<=1;while(0<--n);return q>>>1}function t(n,q,t){var v,x=Array(ad+1),y=0;for(v=1;v<=ad;v++)x[v]=y=y+t[v-1]<<1;for(t=0;t<=q;t++)v=n[2*t+1],0!==v&&(n[2*t]=h(x[v]++,v))}function G(h){var n;for(n=0;n<da;n++)h.dyn_ltree[2*n]=0;for(n=0;n<Aa;n++)h.dyn_dtree[2*n]=0;for(n=0;n<Ta;n++)h.bl_tree[2*n]=0;h.dyn_ltree[2*$a]=1;h.opt_len=h.static_len=0;h.last_lit=h.matches=0}function n(h){8<h.bi_valid?x(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 Kb(h,n,q,t){var v=2*n,x=2*q;return h[v]<h[x]||h[v]===h[x]&&t[n]<=t[q]}function Bb(h,n,q){for(var t=h.heap[q],v=q<<1;v<=h.heap_len&&(v<h.heap_len&&Kb(n,h.heap[v+1],h.heap[v],h.depth)&&v++,!Kb(n,t,h.heap[v],h.depth));)h.heap[q]=h.heap[v],q=v,v<<=1;h.heap[q]=t}function Mc(h,n,t){var v,x,y=0;if(0!==h.last_lit){do{var D=h.pending_buf[h.d_buf+2*y]<<8|h.pending_buf[h.d_buf+2*y+1];var E=h.pending_buf[h.l_buf+y];y++;0===D?
q(h,E,n):(v=T[E],q(h,v+ib+1,n),x=Na[v],0!==x&&(E-=Ic[v],oa(h,E,x)),D--,v=256>D?ja[D]:ja[256+(D>>>7)],q(h,v,t),x=Ha[v],0!==x&&(D-=Qb[v],oa(h,D,x)))}while(y<h.last_lit)}q(h,$a,n)}function $b(h,n){var q,v=n.dyn_tree;var x=n.stat_desc.static_tree;var y=n.stat_desc.has_stree,D=n.stat_desc.elems,E=-1;h.heap_len=0;h.heap_max=Ka;for(q=0;q<D;q++)0!==v[2*q]?(h.heap[++h.heap_len]=E=q,h.depth[q]=0):v[2*q+1]=0;for(;2>h.heap_len;){var I=h.heap[++h.heap_len]=2>E?++E:0;v[2*I]=1;h.depth[I]=0;h.opt_len--;y&&(h.static_len-=
x[2*I+1])}n.max_code=E;for(q=h.heap_len>>1;1<=q;q--)Bb(h,v,q);I=D;do q=h.heap[1],h.heap[1]=h.heap[h.heap_len--],Bb(h,v,1),x=h.heap[1],h.heap[--h.heap_max]=q,h.heap[--h.heap_max]=x,v[2*I]=v[2*q]+v[2*x],h.depth[I]=(h.depth[q]>=h.depth[x]?h.depth[q]:h.depth[x])+1,v[2*q+1]=v[2*x+1]=I,h.heap[1]=I++,Bb(h,v,1);while(2<=h.heap_len);h.heap[--h.heap_max]=h.heap[1];var F,G;q=n.dyn_tree;I=n.max_code;D=n.stat_desc.static_tree;var P=n.stat_desc.has_stree,Q=n.stat_desc.extra_bits,Y=n.stat_desc.extra_base,R=n.stat_desc.max_length,
T=0;for(y=0;y<=ad;y++)h.bl_count[y]=0;q[2*h.heap[h.heap_max]+1]=0;for(n=h.heap_max+1;n<Ka;n++)x=h.heap[n],y=q[2*q[2*x+1]+1]+1,y>R&&(y=R,T++),q[2*x+1]=y,x>I||(h.bl_count[y]++,F=0,x>=Y&&(F=Q[x-Y]),G=q[2*x],h.opt_len+=G*(y+F),P&&(h.static_len+=G*(D[2*x+1]+F)));if(0!==T){do{for(y=R-1;0===h.bl_count[y];)y--;h.bl_count[y]--;h.bl_count[y+1]+=2;h.bl_count[R]--;T-=2}while(0<T);for(y=R;0!==y;y--)for(x=h.bl_count[y];0!==x;)F=h.heap[--n],F>I||(q[2*F+1]!==y&&(h.opt_len+=(y-q[2*F+1])*q[2*F],q[2*F+1]=y),x--)}t(v,
E,h.bl_count)}function vd(h,n,q){var t,v=-1,x=n[1],y=0,E=7,I=4;0===x&&(E=138,I=3);n[2*(q+1)+1]=65535;for(t=0;t<=q;t++){var F=x;x=n[2*(t+1)+1];++y<E&&F===x||(y<I?h.bl_tree[2*F]+=y:0!==F?(F!==v&&h.bl_tree[2*F]++,h.bl_tree[2*bd]++):10>=y?h.bl_tree[2*Sd]++:h.bl_tree[2*D]++,y=0,v=F,0===x?(E=138,I=3):F===x?(E=6,I=3):(E=7,I=4))}}function ub(h,n,t){var v,x,y=-1,E=n[1],I=0,F=7,G=4;0===E&&(F=138,G=3);for(v=0;v<=t;v++)if(x=E,E=n[2*(v+1)+1],!(++I<F&&x===E)){if(I<G){do q(h,x,h.bl_tree);while(0!==--I)}else 0!==
x?(x!==y&&(q(h,x,h.bl_tree),I--),q(h,bd,h.bl_tree),oa(h,I-3,2)):10>=I?(q(h,Sd,h.bl_tree),oa(h,I-3,3)):(q(h,D,h.bl_tree),oa(h,I-11,7));I=0;y=x;0===E?(F=138,G=3):x===E?(F=6,G=3):(F=7,G=4)}}function Da(h){var n,q=4093624447;for(n=0;31>=n;n++,q>>>=1)if(1&q&&0!==h.dyn_ltree[2*n])return Jc;if(0!==h.dyn_ltree[18]||0!==h.dyn_ltree[20]||0!==h.dyn_ltree[26])return ta;for(n=32;n<ib;n++)if(0!==h.dyn_ltree[2*n])return ta;return Jc}function Fb(h,q,t,v){oa(h,(Ga<<1)+(v?1:0),3);n(h);x(h,t);x(h,~t);ia.arraySet(h.pending_buf,
h.window,q,t,h.pending);h.pending+=t}var ia=v("../utils/common"),Jc=0,ta=1,Ga=0,ib=256,da=ib+1+29,Aa=30,Ta=19,Ka=2*da+1,ad=15,Gd=16,$a=256,bd=16,Sd=17,D=18,Na=[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],Ha=[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],R=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],lb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],hb=Array(2*(da+2));P(hb);var Ia=Array(2*Aa);P(Ia);var ja=Array(512);P(ja);var T=Array(256);P(T);var Ic=Array(29);P(Ic);
var Qb=Array(Aa);P(Qb);var wc,Vb,E,Rb=!1;I._tr_init=function(n){if(!Rb){var q,v,x,y=Array(ad+1);for(x=v=0;28>x;x++)for(Ic[x]=v,q=0;q<1<<Na[x];q++)T[v++]=x;T[v-1]=x;for(x=v=0;16>x;x++)for(Qb[x]=v,q=0;q<1<<Ha[x];q++)ja[v++]=x;for(v>>=7;x<Aa;x++)for(Qb[x]=v<<7,q=0;q<1<<Ha[x]-7;q++)ja[256+v++]=x;for(q=0;q<=ad;q++)y[q]=0;for(q=0;143>=q;)hb[2*q+1]=8,q++,y[8]++;for(;255>=q;)hb[2*q+1]=9,q++,y[9]++;for(;279>=q;)hb[2*q+1]=7,q++,y[7]++;for(;287>=q;)hb[2*q+1]=8,q++,y[8]++;t(hb,da+1,y);for(q=0;q<Aa;q++)Ia[2*q+
1]=5,Ia[2*q]=h(q,5);wc=new Q(hb,Na,ib+1,da,ad);Vb=new Q(Ia,Ha,0,Aa,ad);E=new Q([],R,0,Ta,7);Rb=!0}n.l_desc=new ca(n.dyn_ltree,wc);n.d_desc=new ca(n.dyn_dtree,Vb);n.bl_desc=new ca(n.bl_tree,E);n.bi_buf=0;n.bi_valid=0;G(n)};I._tr_stored_block=Fb;I._tr_flush_block=function(h,q,t,v){var x=0;if(0<h.level){2===h.strm.data_type&&(h.strm.data_type=Da(h));$b(h,h.l_desc);$b(h,h.d_desc);vd(h,h.dyn_ltree,h.l_desc.max_code);vd(h,h.dyn_dtree,h.d_desc.max_code);$b(h,h.bl_desc);for(x=Ta-1;3<=x&&0===h.bl_tree[2*lb[x]+
1];x--);x=(h.opt_len+=3*(x+1)+14,x);var y=h.opt_len+3+7>>>3;var D=h.static_len+3+7>>>3;D<=y&&(y=D)}else y=D=t+5;if(t+4<=y&&-1!==q)Fb(h,q,t,v);else if(4===h.strategy||D===y)oa(h,2+(v?1:0),3),Mc(h,hb,Ia);else{oa(h,4+(v?1:0),3);q=h.l_desc.max_code+1;t=h.d_desc.max_code+1;x+=1;oa(h,q-257,5);oa(h,t-1,5);oa(h,x-4,4);for(y=0;y<x;y++)oa(h,h.bl_tree[2*lb[y]+1],3);ub(h,h.dyn_ltree,q-1);ub(h,h.dyn_dtree,t-1);Mc(h,h.dyn_ltree,h.dyn_dtree)}G(h);v&&n(h)};I._tr_tally=function(h,n,q){return h.pending_buf[h.d_buf+
2*h.last_lit]=n>>>8&255,h.pending_buf[h.d_buf+2*h.last_lit+1]=255&n,h.pending_buf[h.l_buf+h.last_lit]=255&q,h.last_lit++,0===n?h.dyn_ltree[2*q]++:(h.matches++,n--,h.dyn_ltree[2*(T[q]+ib+1)]++,h.dyn_dtree[2*(256>n?ja[n]:ja[256+(n>>>7)])]++),h.last_lit===h.lit_bufsize-1};I._tr_align=function(h){oa(h,2,3);q(h,$a,hb);16===h.bi_valid?(x(h,h.bi_buf),h.bi_buf=0,h.bi_valid=0):8<=h.bi_valid&&(h.pending_buf[h.pending++]=255&h.bi_buf,h.bi_buf>>=8,h.bi_valid-=8)}},{"../utils/common":3}],15:[function(v,F,I){F.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(v,F,I){I=v("./lib/utils/common").assign;var P=v("./lib/deflate"),Q=v("./lib/inflate");v=v("./lib/zlib/constants");var ca={};I(ca,P,Q,v);F.exports=ca},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});
if("undefined"===typeof self||!self.constructor.name.includes("Worker")){var e=function(){function B(h){var n=[];return n[h-1]=void 0,n}function v(h,n){return P(h[0]+n[0],h[1]+n[1])}function F(h,n){var q=ca(h)&ca(n),w,t;return w=(~~Math.max(Math.min(h[1]/cd,2147483647),-2147483648)&~~Math.max(Math.min(n[1]/cd,2147483647),-2147483648))*cd,t=q,0>q&&(t+=cd),[t,w]}function I(h,n){var q,w;return h[0]==n[0]&&h[1]==n[1]?0:(q=0>h[1],w=0>n[1],q&&!w?-1:!q&&w?1:0>P(h[0]-n[0],h[1]-n[1])[1]?-1:1)}function P(h,
n){n%=1.8446744073709552E19;h%=1.8446744073709552E19;var q=n%cd;var w=Math.floor(h/cd)*cd;n=n-q+w;for(h=h-w+q;0>h;)h+=cd,n-=cd;for(;4294967295<h;)h-=cd,n+=cd;for(n%=1.8446744073709552E19;0x7fffffff00000000<n;)n-=1.8446744073709552E19;for(;-9223372036854775808>n;)n+=1.8446744073709552E19;return[h,n]}function Q(h){return 0<=h?[h,0]:[h+cd,-cd]}function ca(h){return 2147483648<=h[0]?~~Math.max(Math.min(h[0]-cd,2147483647),-2147483648):~~Math.max(Math.min(h[0],2147483647),-2147483648)}function x(h){return 30>=
h?1<<h:x(30)*x(h-30)}function oa(h,n){var q,w,t,v;if(n&=63,h[0]==nh[0]&&h[1]==nh[1])return n?la:h;if(0>h[1])throw Error("Neg");return v=x(n),w=h[1]*v%1.8446744073709552E19,t=h[0]*v,q=t-t%cd,w+=q,t-=q,0x7fffffffffffffff<=w&&(w-=1.8446744073709552E19),[t,w]}function q(h,n){var q;return n&=63,q=x(n),P(Math.floor(h[0]/q),h[1]/q)}function h(h,n){return h.Mc=n,h.Lc=0,h.Yb=n.length,h}function t(h){return h.Lc>=h.Yb?-1:255&h.Mc[h.Lc++]}function G(h){return h.Mc=B(32),h.Yb=0,h}function n(h){var n=h.Mc;return n.length=
h.Yb,n}function Kb(h,n,q,t,v){for(var w=0;v>w;++w)q[t+w]=h[n+w]}function Bb(n,t,v){n.Nb=G({});var w=h({},t),A=n.Nb,x=Q(t.length);if(0>I(x,Ge))throw Error("invalid length "+x);n.Tb=x;t={};var y;t.v=B(4);t.a=[];t.d={};t.C=B(192);t.bb=B(12);t.hb=B(12);t.Ub=B(12);t.vc=B(12);t._=B(192);t.K=[];t.Sb=B(114);t.S=yb({},4);t.$=wc({});t.i=wc({});t.A={};t.m=[];t.P=[];t.lb=[];t.nc=B(16);t.x=B(4);t.Q=B(4);t.Xb=[la];t.uc=[la];t.Kc=[0];t.fc=B(5);t.yc=B(128);t.vb=0;t.X=1;t.D=0;t.Hb=-1;for(y=t.mb=0;4096>y;++y)t.a[y]=
{};for(y=0;4>y;++y)t.K[y]=yb({},6);y=1<<v.s;t.ab=y;for(var L=0;y>1<<L;++L);t.$b=2*L;t.n=v.f;y=t.X;t.X=v.m;t.b&&y!=t.X&&(t.wb=-1,t.b=null);t.eb=0;t.fb=3;t.Y=2;t.y=3;t.Gc=void 0===e.disableEndMark;t.fc[0]=9*(5*t.Y+t.eb)+t.fb<<24>>24;for(v=0;4>v;++v)t.fc[1+v]=t.ab>>8*v<<24>>24;Kb(t.fc,0,A.Mc,A.Yb,5);A.Yb+=5;for(v=0;64>v;v+=8)y=255&ca(q(x,v)),A.Mc[A.Yb++]=y<<24>>24;t.W=0;t.oc=w;t.pc=0;t.b||(w={},x=4,t.X||(x=2),w.qb=2<x,w.qb?(w.w=0,w.xb=4,w.R=66560):(w.w=2,w.xb=3,w.R=0),t.b=w);w=t.A;x=t.eb;v=t.fb;if(null==
w.V||w.u!=v||w.I!=x)for(w.I=x,w.qc=(1<<x)-1,w.u=v,v=1<<w.u+w.I,w.V=B(v),x=0;v>x;++x){y=w.V;L=x;var E={};E=(E.tb=B(768),E);y[L]=E}if(t.ab!=t.wb||t.Hb!=t.n)w=t.b,x=t.ab,v=t.n,1073741567>x&&(w.Fc=16+(v>>1),L=x+4096,y=v+274,w.Bc=L,w._b=y,L=L+y+(~~((x+4096+v+274)/2)+256),(null==w.c||w.Kb!=L)&&(w.c=null,w.Kb=L,w.c=B(w.Kb)),w.H=w.Kb-y,w.ob=v,v=x+1,w.p!=v&&(w.L=B(2*(w.p=v))),v=65536,w.qb&&(v=x-1,v|=v>>1,v|=v>>2,v|=v>>4,v|=v>>8,v>>=1,v|=65535,16777216<v&&(v>>=1),w.Ec=v,++v,v+=w.R),v!=w.rc&&(w.ub=B(w.rc=v))),
t.wb=t.ab,t.Hb=t.n;t.d.Ab=A;t.l=0;for(A=t.J=0;4>A;++A)t.v[A]=0;A=t.d;A.mc=la;A.xc=la;A.E=-1;A.Jb=1;A.Oc=0;Lb(t.C);Lb(t._);Lb(t.bb);Lb(t.hb);Lb(t.Ub);Lb(t.vc);Lb(t.Sb);A=t.A;x=1<<A.u+A.I;for(w=0;x>w;++w)Lb(A.V[w].tb);for(A=0;4>A;++A)Lb(t.K[A].G);T(t.$,1<<t.Y);T(t.i,1<<t.Y);Lb(t.S.G);t.N=0;t.jb=0;t.q=0;t.s=0;D(t);Sd(t);t.$.rb=t.n+1-2;Vb(t.$,1<<t.Y);t.i.rb=t.n+1-2;Vb(t.i,1<<t.Y);void(t.g=la);A={};t=(A.cb=t,A.Z=null,A.zc=1,A);n.yb=t;return n}function Mc(n,q){n.Nb=G({});var w=h({},q),v=n.Nb,A,x,y,D="",
E=[];for(A=0;5>A;++A){if(x=t(w),-1==x)throw Error("truncated input");E[A]=x<<24>>24}q={B:{},e:{}};q.Gb=B(192);q.Zb=B(12);q.Cb=B(12);q.Db=B(12);q.Eb=B(12);q.pb=B(192);q.kb=B(4);q.kc=B(114);q.Fb=Y({},4);q.Rb=Gd({});q.sb=Gd({});q.gb={};for(A=0;4>A;++A)q.kb[A]=Y({},6);var I;if(5>E.length)A=0;else{A=255&E[0];var F=A%9;A=~~(A/9);var M=A%5;var P=~~(A/5);for(I=A=0;4>I;++I)A+=(255&E[1+I])<<8*I;if(!(E=99999999<A)){if(8<F||4<M||4<P)P=0;else{E=q.gb;if(null==E.V||E.u!=F||E.I!=M)for(E.I=M,E.qc=(1<<M)-1,E.u=F,M=
1<<E.u+E.I,E.V=B(M),F=0;M>F;++F){I=E.V;var O=F;var N={};N=(N.Ib=B(768),N);I[O]=N}P=1<<P;P=(Ka(q.Rb,P),Ka(q.sb,P),q.Dc=P-1,1)}E=!P}E?A=0:0>A?A=0:(q.Ob!=A&&(q.Ob=A,q.nb=Math.max(q.Ob,1),A=q.B,P=Math.max(q.nb,4096),null!=A.Lb&&A.M==P||(A.Lb=B(P)),A.M=P,A.o=0,A.h=0),A=1)}if(!A)throw Error("corrupted input");for(A=0;64>A;A+=8){if(x=t(w),-1==x)throw Error("truncated input");x=x.toString(16);1==x.length&&(x="0"+x);D=x+""+D}/^0+$|^f+$/i.test(D)?n.Tb=Ge:(y=parseInt(D,16),n.Tb=4294967295<y?Ge:Q(y));x=n.Tb;
q.e.Ab=w;w=q.B;Ga(w);w.cc=null;q.B.cc=v;q.B.h=0;q.B.o=0;Lb(q.Gb);Lb(q.pb);Lb(q.Zb);Lb(q.Cb);Lb(q.Db);Lb(q.Eb);Lb(q.kc);v=q.gb;y=1<<v.u+v.I;for(w=0;y>w;++w)Lb(v.V[w].Ib);for(v=0;4>v;++v)Lb(q.kb[v].G);$a(q.Rb);$a(q.sb);Lb(q.Fb.G);v=q.e;v.Bb=0;v.E=-1;for(w=0;5>w;++w)v.Bb=v.Bb<<8|t(v.Ab);q.U=0;q.ib=0;q.Jc=0;q.Ic=0;q.Qc=0;q.Nc=x;q.g=la;q.jc=0;v={};q=(v.Z=q,v.cb=null,v.zc=1,v);n.yb=q;return n}function $b(h,n){return h.c[h.f+h.o+n]}function vd(h,n,q,t){h.T&&h.o+n+t>h.h&&(t=h.h-(h.o+n));++q;var w=h.f+h.o+
n;for(n=0;t>n&&h.c[w+n]==h.c[w+n-q];++n);return n}function ub(h){return h.h-h.o}function Da(h){var n,q,w;if(!h.T)for(;w=-h.f+h.Kb-h.h,w;){var t=h.cc,v=w;if(n=t.Lc>=t.Yb?-1:(v=Math.min(v,t.Yb-t.Lc),Kb(t.Mc,t.Lc,h.c,h.f+h.h,v),t.Lc+=v,v),-1==n)return h.zb=h.h,q=h.f+h.zb,q>h.H&&(h.zb=h.H-h.f),void(h.T=1);h.h+=n;h.h>=h.o+h._b&&(h.zb=h.h-h._b)}}function Fb(h,n){h.f+=n;h.zb-=n;h.o-=n;h.h-=n}function ia(h){var n;++h.k>=h.p&&(h.k=0);++h.o;if(h.o>h.zb){var q=h.f+h.o;if(q>h.H){var w=h.f+h.o-h.Bc;0<w&&--w;var t=
h.f+h.h-w;for(q=0;t>q;++q)h.c[q]=h.c[w+q];h.f-=w}Da(h)}1073741823==h.o&&(n=h.o-h.p,Jc(h.L,2*h.p,n),Jc(h.ub,h.rc,n),Fb(h,n))}function Jc(h,n,q){var w;for(w=0;n>w;++w){var t=h[w]||0;q>=t?t=0:t-=q;h[w]=t}}function ta(h,n){var q,w,t,v,A,x,y,B,D,E;do{if(h.h>=h.o+h.ob)var I=h.ob;else if(I=h.h-h.o,h.xb>I){ia(h);continue}var F=h.o>h.p?h.o-h.p:0;var G=h.f+h.o;h.qb?(E=oh[255&h.c[G]]^255&h.c[G+1],v=1023&E,h.ub[v]=h.o,E^=(255&h.c[G+2])<<8,A=65535&E,h.ub[1024+A]=h.o,x=(E^oh[255&h.c[G+3]]<<5)&h.Ec):x=255&h.c[G]^
(255&h.c[G+1])<<8;var M=h.ub[h.R+x];h.ub[h.R+x]=h.o;var P=(h.k<<1)+1;var O=h.k<<1;var Q=B=h.w;for(q=h.Fc;;){if(F>=M||0==q--){h.L[P]=h.L[O]=0;break}if(t=h.o-M,w=(h.k>=t?h.k-t:h.k-t+h.p)<<1,D=h.f+M,y=B>Q?Q:B,h.c[D+y]==h.c[G+y]){for(;++y!=I&&h.c[D+y]==h.c[G+y];);if(y==I){h.L[O]=h.L[w];h.L[P]=h.L[w+1];break}}(255&h.c[G+y])>(255&h.c[D+y])?(h.L[O]=M,O=w+1,M=h.L[O],B=y):(h.L[P]=M,P=w,M=h.L[P],Q=y)}ia(h)}while(0!=--n)}function Ga(h){var n=h.o-h.h;if(n){var q=h.cc;Kb(h.Lb,h.h,q.Mc,q.Yb,n);q.Yb+=n;h.o>=h.M&&
(h.o=0);h.h=h.o}}function ib(h,n){n=h.o-n-1;return 0>n&&(n+=h.M),h.Lb[n]}function da(h){return h-=2,4>h?h:3}function Aa(h){return 4>h?0:10>h?h-3:h-6}function Ta(h){if(!h.zc)throw Error("bad state");if(h.cb){a:{var n=h.cb,q=h.cb.Xb,w=h.cb.uc,x=h.cb.Kc,y,B;q[0]=la;w[0]=la;x[0]=1;if(n.oc){n.b.cc=n.oc;var F=n.b;F.f=0;F.o=0;F.h=0;F.T=0;Da(F);F.k=0;Fb(F,-1);n.W=1;n.oc=null}if(!n.pc){n.pc=1;var G=F=n.g;if(G[0]==la[0]&&G[1]==la[1]){if(!ub(n.b)){Na(n,ca(n.g));break a}hb(n);var O=ca(n.g)&n.y;eb(n.d,n.C,(n.l<<
4)+O,0);n.l=Aa(n.l);G=$b(n.b,-n.s);Rb(E(n.A,ca(n.g),n.J),n.d,G);n.J=G;--n.s;n.g=v(n.g,M)}if(ub(n.b))for(;;){if(y=Ha(n,ca(n.g)),B=n.mb,O=ca(n.g)&n.y,G=(n.l<<4)+O,1==y&&-1==B){eb(n.d,n.C,G,0);G=$b(n.b,-n.s);var R=E(n.A,ca(n.g),n.J);if(7>n.l)Rb(R,n.d,G);else{var T=$b(n.b,-n.v[0]-1-n.s);var Y=void 0;var ia;var N=n.d;var V=T,ta=G,wa=1,oa=1;for(ia=7;0<=ia;--ia){var Ka=ta>>ia&1;T=oa;wa&&(Y=V>>ia&1,T+=1+Y<<8,wa=Y==Ka);eb(N,R.tb,T,Ka);oa=oa<<1|Ka}}n.J=G;n.l=Aa(n.l)}else{if(eb(n.d,n.C,G,1),4>B){if(eb(n.d,n.bb,
n.l,1),B?(eb(n.d,n.hb,n.l,1),1==B?eb(n.d,n.Ub,n.l,0):(eb(n.d,n.Ub,n.l,1),eb(n.d,n.vc,n.l,B-2))):(eb(n.d,n.hb,n.l,0),1==y?eb(n.d,n._,G,0):eb(n.d,n._,G,1)),1==y?n.l=7>n.l?9:11:(Qb(n.i,n.d,y-2,O),n.l=7>n.l?8:11),G=n.v[B],0!=B){for(Y=B;1<=Y;--Y)n.v[Y]=n.v[Y-1];n.v[0]=G}}else{eb(n.d,n.bb,n.l,0);n.l=7>n.l?7:10;Qb(n.$,n.d,y-2,O);B-=4;Y=ja(B);G=da(y);Cd(n.K[G],n.d,Y);if(4<=Y)if(N=(Y>>1)-1,R=(2|1&Y)<<N,T=B-R,14>Y)for(G=n.Sb,Y=R-Y-1,R=n.d,Ka=T,V=1,T=0;N>T;++T)ia=1&Ka,eb(R,G,Y+V,ia),V=V<<1|ia,Ka>>=1;else mh(n.d,
T>>4,N-4),vf(n.S,n.d,15&T),++n.Qb;G=B;for(Y=3;1<=Y;--Y)n.v[Y]=n.v[Y-1];n.v[0]=G;++n.Mb}n.J=$b(n.b,y-1-n.s)}if(n.s-=y,n.g=v(n.g,Q(y)),!n.s){128<=n.Mb&&D(n);16<=n.Qb&&Sd(n);q[0]=n.g;G=n.d;G=v(v(Q(G.Jb),G.mc),[4,0]);if(w[0]=G,!ub(n.b)){Na(n,ca(n.g));break a}G=n.g;G=P(G[0]-F[0],G[1]-F[1]);if(0<=I(G,[4096,0])){n.pc=0;x[0]=0;break a}}}else Na(n,ca(n.g))}}h.Pb=h.cb.Xb[0];h.cb.Kc[0]&&(y=h.cb,Ia(y),y.d.Ab=null,h.zc=0)}else{a:{y=h.Z;if(Y=ca(y.g)&y.Dc,nd(y.e,y.Gb,(y.U<<4)+Y)){if(nd(y.e,y.Zb,y.U))n=0,nd(y.e,
y.Cb,y.U)?(nd(y.e,y.Db,y.U)?(nd(y.e,y.Eb,y.U)?(G=y.Qc,y.Qc=y.Ic):G=y.Ic,y.Ic=y.Jc):G=y.Jc,y.Jc=y.ib,y.ib=G):nd(y.e,y.pb,(y.U<<4)+Y)||(y.U=7>y.U?9:11,n=1),n||(n=ad(y.sb,y.e,Y)+2,y.U=7>y.U?8:11);else if(y.Qc=y.Ic,y.Ic=y.Jc,y.Jc=y.ib,n=2+ad(y.Rb,y.e,Y),y.U=7>y.U?7:10,F=le(y.kb[da(n)],y.e),4<=F)if(q=(F>>1)-1,y.ib=(2|1&F)<<q,14>F){B=y.ib;O=y.kc;w=y.ib-F-1;x=y.e;Y=1;for(G=R=0;q>G;++G)F=nd(x,O,w+Y),Y<<=1,Y+=F,R|=F<<G;y.ib=B+R}else{B=y.ib;O=y.e;w=0;for(q-=4;0!=q;--q)O.E>>>=1,x=O.Bb-O.E>>>31,O.Bb-=O.E&x-1,
w=w<<1|1-x,-16777216&O.E||(O.Bb=O.Bb<<8|t(O.Ab),O.E<<=8);y.ib=B+(w<<4);B=y.ib;O=y.Fb;q=y.e;F=1;for(x=G=0;O.F>x;++x)w=nd(q,O.G,F),F<<=1,F+=w,G|=w<<x;if(y.ib=B+G,0>y.ib){y=-1==y.ib?1:-1;break a}}else y.ib=F;if(0<=I(Q(y.ib),y.g)||y.ib>=y.nb){y=-1;break a}B=y.B;O=n;q=B.o-y.ib-1;for(0>q&&(q+=B.M);0!=O;--O)q>=B.M&&(q=0),B.Lb[B.o++]=B.Lb[q++],B.o>=B.M&&Ga(B);y.g=v(y.g,Q(n));y.jc=ib(y.B,0)}else{B=y.gb;O=ca(y.g);B=B.V[((O&B.qc)<<B.u)+((255&y.jc)>>>8-B.u)];if(7>y.U){O=y.e;n=1;do n=n<<1|nd(O,B.Ib,n);while(256>
n);B=n<<24>>24}else{O=y.e;n=ib(y.B,y.ib);q=1;do if(x=n>>7&1,n<<=1,w=nd(O,B.Ib,(1+x<<8)+q),q=q<<1|w,x!=w){for(;256>q;)q=q<<1|nd(O,B.Ib,q);break}while(256>q);B=q<<24>>24}y.jc=B;B=y.B;O=y.jc;B.Lb[B.o++]=O;B.o>=B.M&&Ga(B);y.U=Aa(y.U);y.g=v(y.g,M)}y=0}if(-1==y)throw Error("corrupted input");h.Pb=Ge;h.Pc=h.Z.g;if(y||0<=I(h.Z.Nc,la)&&0<=I(h.Z.g,h.Z.Nc))Ga(h.Z.B),y=h.Z.B,Ga(y),y.cc=null,h.Z.e.Ab=null,h.zc=0}return h.zc}function Ka(h,n){for(;n>h.O;++h.O)h.ec[h.O]=Y({},3),h.hc[h.O]=Y({},3)}function ad(h,n,
q){return nd(n,h.wc,0)?8+(nd(n,h.wc,1)?8+le(h.tc,n):le(h.hc[q],n)):le(h.ec[q],n)}function Gd(h){return h.wc=B(2),h.ec=B(16),h.hc=B(16),h.tc=Y({},8),h.O=0,h}function $a(h){Lb(h.wc);for(var n=0;h.O>n;++n)Lb(h.ec[n].G),Lb(h.hc[n].G);Lb(h.tc.G)}function bd(h,n){h.jb=n;var q=h.a[n].r;var t=h.a[n].j;do{if(h.a[n].t){var w=h.a[q];w.j=-1;w.t=0;h.a[q].r=q-1;h.a[n].Ac&&(h.a[q-1].t=0,h.a[q-1].r=h.a[n].r2,h.a[q-1].j=h.a[n].j2)}var v=q;w=t;t=h.a[v].j;q=h.a[v].r;h.a[v].j=w;h.a[v].r=n;n=v}while(0<n);return h.mb=
h.a[0].j,h.q=h.a[0].r}function Sd(h){for(var n=0;16>n;++n){var q=h.nc,t=n,w,v=h.S,x=n,y=1,B=0;for(w=v.F;0!=w;--w){var D=1&x;x>>>=1;B+=Xb(v.G[y],D);y=y<<1|D}q[t]=B}h.Qb=0}function D(h){var n;for(n=4;128>n;++n){var q=ja(n);var t=(q>>1)-1;var w=(2|1&q)<<t;var v=h.yc;for(var x=n,y,B=n-w,D=1,E=0;0!=t;--t)y=1&B,B>>>=1,E+=O[(2047&(h.Sb[w-q-1+D]-y^-y))>>>2],D=D<<1|y;v[x]=E}for(w=0;4>w;++w){n=h.K[w];v=w<<6;for(q=0;h.$b>q;++q)h.P[v+q]=wb(n,q);for(q=14;h.$b>q;++q)h.P[v+q]+=(q>>1)-1-4<<6;q=128*w;for(n=0;4>n;++n)h.lb[q+
n]=h.P[v+n];for(;128>n;++n)h.lb[q+n]=h.P[v+ja(n)]+h.yc[n]}h.Mb=0}function Na(h,n){Ia(h);n&=h.y;h.Gc&&(eb(h.d,h.C,(h.l<<4)+n,1),eb(h.d,h.bb,h.l,0),h.l=7>h.l?7:10,Qb(h.$,h.d,0,n),n=da(2),Cd(h.K[n],h.d,63),mh(h.d,67108863,26),vf(h.S,h.d,15));for(n=0;5>n;++n)Fg(h.d)}function Ha(h,n){var q,t,v,w,x,A,B,D,F,I,G,M,N,P,Q,T,Y,ia,da,ja,la,ca,oa,Da,Ha,Ia,Ka,Na;if(h.jb!=h.q)return I=h.a[h.q].r-h.q,h.mb=h.a[h.q].j,h.q=h.a[h.q].r,I;if(h.q=h.jb=0,h.N?(F=h.vb,h.N=0):F=hb(h),I=h.D,Y=ub(h.b)+1,2>Y)return h.mb=-1,1;
273<Y&&(Y=273);for(A=B=0;4>A;++A)h.x[A]=h.v[A],h.Q[A]=vd(h.b,-1,h.x[A],273),h.Q[A]>h.Q[B]&&(B=A);if(h.Q[B]>=h.n)return h.mb=B,I=h.Q[B],n=I-1,0<n&&(ta(h.b,n),h.s+=n),I;if(F>=h.n)return h.mb=h.m[I-1]+4,n=F-1,0<n&&(ta(h.b,n),h.s+=n),F;if(x=$b(h.b,-1),P=$b(h.b,-h.v[0]-1-1),2>F&&x!=P&&2>h.Q[B])return h.mb=-1,1;h.a[0].Hc=h.l;var Ga=n&h.y;h.a[1].z=O[h.C[(h.l<<4)+Ga]>>>2]+y(E(h.A,n,h.J),7<=h.l,P,x);var $a=h.a[1];$a.j=-1;$a.t=0;$a=O[2048-h.C[(h.l<<4)+Ga]>>>2];var na=$a+O[2048-h.bb[h.l]>>>2];if(P==x){var eb=
h.l;eb=na+(O[h.hb[eb]>>>2]+O[h._[(eb<<4)+Ga]>>>2]);h.a[1].z>eb&&(h.a[1].z=eb,A=h.a[1],A.j=0,A.t=0)}if(D=F>=h.Q[B]?F:h.Q[B],2>D)return h.mb=h.a[1].j,1;h.a[1].r=0;h.a[0].bc=h.x[0];h.a[0].ac=h.x[1];h.a[0].dc=h.x[2];h.a[0].lc=h.x[3];B=D;do h.a[B--].z=268435455;while(2<=B);for(A=0;4>A;++A)if(N=h.Q[A],!(2>N)){var ib=na+lb(h,A,h.l,Ga);do{var Ta=ib+h.i.Cc[272*Ga+(N-2)];var Va=h.a[N];Va.z>Ta&&(Va.z=Ta,Va.r=0,Va.j=A,Va.t=0)}while(2<=--N)}if(N=$a+O[h.bb[h.l]>>>2],B=2<=h.Q[0]?h.Q[0]+1:2,F>=B){for(F=0;B>h.m[F];)F+=
2;for(;q=h.m[F+1],Ta=N+R(h,q,B,Ga),Va=h.a[B],Va.z>Ta&&(Va.z=Ta,Va.r=0,Va.j=q+4,Va.t=0),B!=h.m[F]||(F+=2,F!=I);++B);}for(q=0;;){if(++q,q==D)return bd(h,q);if(Q=hb(h),I=h.D,Q>=h.n)return h.vb=Q,h.N=1,bd(h,q);if(++n,la=h.a[q].r,h.a[q].t?(--la,h.a[q].Ac?(ca=h.a[h.a[q].r2].Hc,ca=4>h.a[q].j2?7>ca?8:11:7>ca?7:10):ca=h.a[la].Hc,ca=Aa(ca)):ca=h.a[la].Hc,la==q-1?ca=h.a[q].j?Aa(ca):7>ca?9:11:(h.a[q].t&&h.a[q].Ac?(la=h.a[q].r2,ja=h.a[q].j2,ca=7>ca?8:11):(ja=h.a[q].j,ca=4>ja?7>ca?8:11:7>ca?7:10),da=h.a[la],4>
ja?ja?1==ja?(h.x[0]=da.ac,h.x[1]=da.bc,h.x[2]=da.dc,h.x[3]=da.lc):2==ja?(h.x[0]=da.dc,h.x[1]=da.bc,h.x[2]=da.ac,h.x[3]=da.lc):(h.x[0]=da.lc,h.x[1]=da.bc,h.x[2]=da.ac,h.x[3]=da.dc):(h.x[0]=da.bc,h.x[1]=da.ac,h.x[2]=da.dc,h.x[3]=da.lc):(h.x[0]=ja-4,h.x[1]=da.bc,h.x[2]=da.ac,h.x[3]=da.dc)),h.a[q].Hc=ca,h.a[q].bc=h.x[0],h.a[q].ac=h.x[1],h.a[q].dc=h.x[2],h.a[q].lc=h.x[3],w=h.a[q].z,x=$b(h.b,-1),P=$b(h.b,-h.x[0]-1-1),Ga=n&h.y,t=w+O[h.C[(ca<<4)+Ga]>>>2]+y(E(h.A,n,$b(h.b,-2)),7<=ca,P,x),T=h.a[q+1],F=0,T.z>
t&&(T.z=t,T.r=q,T.j=-1,T.t=0,F=1),$a=w+O[2048-h.C[(ca<<4)+Ga]>>>2],na=$a+O[2048-h.bb[ca]>>>2],P!=x||q>T.r&&!T.j||(eb=na+(O[h.hb[ca]>>>2]+O[h._[(ca<<4)+Ga]>>>2]),T.z>=eb&&(T.z=eb,T.r=q,T.j=0,T.t=0,F=1)),ia=ub(h.b)+1,ia=ia>4095-q?4095-q:ia,Y=ia,!(2>Y)){if(Y>h.n&&(Y=h.n),!F&&P!=x&&(oa=Math.min(ia-1,h.n),M=vd(h.b,0,h.x[0],oa),2<=M)){A=Aa(ca);Va=n+1&h.y;Ta=t+O[2048-h.C[(A<<4)+Va]>>>2]+O[2048-h.bb[A]>>>2];for(ib=q+1+M;ib>D;)h.a[++D].z=268435455;Ta+=(Da=h.i.Cc[272*Va+(M-2)],Da+lb(h,0,A,Va));Va=h.a[ib];Va.z>
Ta&&(Va.z=Ta,Va.r=q+1,Va.j=0,Va.t=1,Va.Ac=0)}B=2;for(F=0;4>F;++F)if(G=vd(h.b,-1,h.x[F],Y),!(2>G)){N=G;do{for(;q+G>D;)h.a[++D].z=268435455;Ta=na+(Ha=h.i.Cc[272*Ga+(G-2)],Ha+lb(h,F,ca,Ga));Va=h.a[q+G];Va.z>Ta&&(Va.z=Ta,Va.r=q,Va.j=F,Va.t=0)}while(2<=--G);if(G=N,F||(B=G+1),ia>G&&(oa=Math.min(ia-1-G,h.n),M=vd(h.b,G,h.x[F],oa),2<=M)){A=7>ca?8:11;Va=n+G&h.y;Ta=na+(Ia=h.i.Cc[272*Ga+(G-2)],Ia+lb(h,F,ca,Ga))+O[h.C[(A<<4)+Va]>>>2]+y(E(h.A,n+G,$b(h.b,G-1-1)),1,$b(h.b,G-1-(h.x[F]+1)),$b(h.b,G-1));A=Aa(A);Va=
n+G+1&h.y;Ta+=O[2048-h.C[(A<<4)+Va]>>>2];Ta+=O[2048-h.bb[A]>>>2];for(ib=G+1+M;q+ib>D;)h.a[++D].z=268435455;Ta+=(Ka=h.i.Cc[272*Va+(M-2)],Ka+lb(h,0,A,Va));Va=h.a[q+ib];Va.z>Ta&&(Va.z=Ta,Va.r=q+G+1,Va.j=0,Va.t=1,Va.Ac=1,Va.r2=q,Va.j2=F)}}if(Q>Y){Q=Y;for(I=0;Q>h.m[I];I+=2);h.m[I]=Q;I+=2}if(Q>=B){for(N=$a+O[h.bb[ca]>>>2];q+Q>D;)h.a[++D].z=268435455;for(F=0;B>h.m[F];)F+=2;for(G=B;;++G)if(v=h.m[F+1],Ta=N+R(h,v,G,Ga),Va=h.a[q+G],Va.z>Ta&&(Va.z=Ta,Va.r=q,Va.j=v+4,Va.t=0),G==h.m[F]){if(ia>G&&(oa=Math.min(ia-
1-G,h.n),M=vd(h.b,G,v,oa),2<=M)){A=7>ca?7:10;Va=n+G&h.y;Ta=Ta+O[h.C[(A<<4)+Va]>>>2]+y(E(h.A,n+G,$b(h.b,G-1-1)),1,$b(h.b,G-(v+1)-1),$b(h.b,G-1));A=Aa(A);Va=n+G+1&h.y;Ta+=O[2048-h.C[(A<<4)+Va]>>>2];Ta+=O[2048-h.bb[A]>>>2];for(ib=G+1+M;q+ib>D;)h.a[++D].z=268435455;Ta+=(Na=h.i.Cc[272*Va+(M-2)],Na+lb(h,0,A,Va));Va=h.a[q+ib];Va.z>Ta&&(Va.z=Ta,Va.r=q+G+1,Va.j=0,Va.t=1,Va.Ac=1,Va.r2=q,Va.j2=v+4)}if(F+=2,F==I)break}}}}}function R(h,n,q,t){var v,w=da(q);return v=128>n?h.lb[128*w+n]:h.P[(w<<6)+(131072>n?Wd[n>>
6]+12:134217728>n?Wd[n>>16]+32:Wd[n>>26]+52)]+h.nc[15&n],v+h.$.Cc[272*t+(q-2)]}function lb(h,n,q,t){var v;return n?(v=O[2048-h.hb[q]>>>2],1==n?v+=O[h.Ub[q]>>>2]:(v+=O[2048-h.Ub[q]>>>2],v+=Xb(h.vc[q],n-2))):(v=O[h.hb[q]>>>2],v+=O[2048-h._[(q<<4)+t]>>>2]),v}function hb(h){var n=0;a:{var q=h.b;var t=h.m,v,w,x,y,B,D,E,F;if(q.h>=q.o+q.ob)var G=q.ob;else if(G=q.h-q.o,q.xb>G){q=(ia(q),0);break a}var I=0;var M=q.o>q.p?q.o-q.p:0;var O=q.f+q.o;var P=1;var Q=B=0;q.qb?(w=oh[255&q.c[O]]^255&q.c[O+1],B=1023&w,
w^=(255&q.c[O+2])<<8,Q=65535&w,D=(w^oh[255&q.c[O+3]]<<5)&q.Ec):D=255&q.c[O]^(255&q.c[O+1])<<8;w=q.ub[q.R+D]||0;q.qb&&(v=q.ub[B]||0,x=q.ub[1024+Q]||0,q.ub[B]=q.o,q.ub[1024+Q]=q.o,v>M&&q.c[q.f+v]==q.c[O]&&(t[I++]=P=2,t[I++]=q.o-v-1),x>M&&q.c[q.f+x]==q.c[O]&&(x==v&&(I-=2),t[I++]=P=3,t[I++]=q.o-x-1,v=x),0!=I&&v==w&&(I-=2,P=1));q.ub[q.R+D]=q.o;D=(q.k<<1)+1;var R=q.k<<1;B=Q=q.w;0!=q.w&&w>M&&q.c[q.f+w+q.w]!=q.c[O+q.w]&&(t[I++]=P=q.w,t[I++]=q.o-w-1);for(v=q.Fc;;){if(M>=w||0==v--){q.L[D]=q.L[R]=0;break}if(y=
q.o-w,x=(q.k>=y?q.k-y:q.k-y+q.p)<<1,F=q.f+w,E=Q>B?B:Q,q.c[F+E]==q.c[O+E]){for(;++E!=G&&q.c[F+E]==q.c[O+E];);if(E>P&&(t[I++]=P=E,t[I++]=y-1,E==G)){q.L[R]=q.L[x];q.L[D]=q.L[x+1];break}}(255&q.c[O+E])>(255&q.c[F+E])?(q.L[R]=w,R=x+1,w=q.L[R],Q=E):(q.L[D]=w,D=x,w=q.L[D],B=E)}q=(ia(q),I)}return h.D=q,0<h.D&&(n=h.m[h.D-2],n==h.n&&(n+=vd(h.b,n-1,h.m[h.D-1],273-n))),++h.s,n}function Ia(h){h.b&&h.W&&(h.b.cc=null,h.W=0)}function ja(h){return 2048>h?Wd[h]:2097152>h?Wd[h>>10]+20:Wd[h>>20]+40}function T(h,n){Lb(h.db);
for(var q=0;n>q;++q)Lb(h.Vb[q].G),Lb(h.Wb[q].G);Lb(h.ic.G)}function Ic(h,n,q,t,v){var w;var x=O[h.db[0]>>>2];var A=O[2048-h.db[0]>>>2];var y=A+O[h.db[1]>>>2];A+=O[2048-h.db[1]>>>2];for(w=0;8>w;++w){if(w>=q)return;t[v+w]=x+wb(h.Vb[n],w)}for(;16>w;++w){if(w>=q)return;t[v+w]=y+wb(h.Wb[n],w-8)}for(;q>w;++w)t[v+w]=A+wb(h.ic,w-8-8)}function Qb(h,n,q,t){8>q?(eb(n,h.db,0,0),Cd(h.Vb[t],n,q)):(q-=8,eb(n,h.db,0,1),8>q?(eb(n,h.db,1,0),Cd(h.Wb[t],n,q)):(eb(n,h.db,1,1),Cd(h.ic,n,q-8)));0==--h.sc[t]&&(Ic(h,t,h.rb,
h.Cc,272*t),h.sc[t]=h.rb)}function wc(h){h.db=B(2);h.Vb=B(16);h.Wb=B(16);h.ic=yb({},8);for(var n=0;16>n;++n)h.Vb[n]=yb({},3),h.Wb[n]=yb({},3);return h.Cc=[],h.sc=[],h}function Vb(h,n){for(var q=0;n>q;++q)Ic(h,q,h.rb,h.Cc,272*q),h.sc[q]=h.rb}function E(h,n,q){return h.V[((n&h.qc)<<h.u)+((255&q)>>>8-h.u)]}function Rb(h,n,q){var t,v=1;for(t=7;0<=t;--t){var w=q>>t&1;eb(n,h.tb,v,w);v=v<<1|w}}function y(h,n,q,t){var v,w,x=1,A=7,y=0;if(n)for(;0<=A;--A)if(w=q>>A&1,v=t>>A&1,y+=Xb(h.tb[(1+w<<8)+x],v),x=x<<
1|v,w!=v){--A;break}for(;0<=A;--A)v=t>>A&1,y+=Xb(h.tb[x],v),x=x<<1|v;return y}function Y(h,n){return h.F=n,h.G=B(1<<n),h}function le(h,n){var q,t=1;for(q=h.F;0!=q;--q)t=(t<<1)+nd(n,h.G,t);return t-(1<<h.F)}function yb(h,n){return h.F=n,h.G=B(1<<n),h}function Cd(h,n,q){var t,v=1;for(t=h.F;0!=t;){--t;var w=q>>>t&1;eb(n,h.G,v,w);v=v<<1|w}}function wb(h,n){var q,t=1,v=0;for(q=h.F;0!=q;){--q;var w=n>>>q&1;v+=Xb(h.G[t],w);t=(t<<1)+w}return v}function vf(h,n,q){var t,v=1;for(t=0;h.F>t;++t){var w=1&q;eb(n,
h.G,v,w);v=v<<1|w;q>>=1}}function nd(h,n,q){var v,w=n[q];return v=(h.E>>>11)*w,(-2147483648^v)>(-2147483648^h.Bb)?(h.E=v,n[q]=w+(2048-w>>>5)<<16>>16,-16777216&h.E||(h.Bb=h.Bb<<8|t(h.Ab),h.E<<=8),0):(h.E-=v,h.Bb-=v,n[q]=w-(w>>>5)<<16>>16,-16777216&h.E||(h.Bb=h.Bb<<8|t(h.Ab),h.E<<=8),1)}function Lb(h){for(var n=h.length-1;0<=n;--n)h[n]=1024}function eb(h,n,q,t){var w=n[q];var x=(h.E>>>11)*w;t?(h.xc=v(h.xc,F(Q(x),[4294967295,0])),h.E-=x,n[q]=w-(w>>>5)<<16>>16):(h.E=x,n[q]=w+(2048-w>>>5)<<16>>16);-16777216&
h.E||(h.E<<=8,Fg(h))}function mh(h,n,q){for(--q;0<=q;--q)h.E>>>=1,1==(n>>>q&1)&&(h.xc=v(h.xc,Q(h.E))),-16777216&h.E||(h.E<<=8,Fg(h))}function Fg(h){var n=h.xc;var t=32,w;n=(t&=63,w=q(n,t),0>n[1]&&(w=v(w,oa([2,0],63-t))),w);t=ca(n);if(0!=t||0>I(h.xc,[4278190080,0])){h.mc=v(h.mc,Q(h.Jb));n=h.Oc;do w=h.Ab,n+=t,w.Mc[w.Yb++]=n<<24>>24,n=255;while(0!=--h.Jb);h.Oc=ca(h.xc)>>>24}++h.Jb;h.xc=oa(F(h.xc,[16777215,0]),8)}function Xb(h,n){return O[(2047&(h-n^-n))>>>2]}function kh(h){for(var n,q,t,v=0,w=0,x=h.length,
y=[],B=[];x>v;++v,++w){if(n=255&h[v],128&n)if(192==(224&n)){if(v+1>=x||(q=255&h[++v],128!=(192&q)))return h;B[w]=(31&n)<<6|63&q}else{if(224!=(240&n)||v+2>=x||(q=255&h[++v],128!=(192&q))||(t=255&h[++v],128!=(192&t)))return h;B[w]=(15&n)<<12|(63&q)<<6|63&t}else{if(!n)return h;B[w]=n}16383==w&&(y.push(String.fromCharCode.apply(String,B)),w=-1)}return 0<w&&(B.length=w,y.push(String.fromCharCode.apply(String,B))),y.join("")}function lh(h){var n,q,t=[],v=0,w=h.length;if("object"==typeof h)return h;for(q=
n=0;w>q;++q)t[n++]=h.charCodeAt(q);for(q=0;w>q;++q)h=t[q],1<=h&&127>=h?++v:v+=!h||128<=h&&2047>=h?2:3;n=[];for(q=v=0;w>q;++q)h=t[q],1<=h&&127>=h?n[v++]=h<<24>>24:!h||128<=h&&2047>=h?(n[v++]=(192|h>>6&31)<<24>>24,n[v++]=(128|63&h)<<24>>24):(n[v++]=(224|h>>12&15)<<24>>24,n[v++]=(128|h>>6&63)<<24>>24,n[v++]=(128|63&h)<<24>>24);return n}function Qf(h){return h[1]+h[0]}var Fe="function"==typeof setImmediate?setImmediate:setTimeout,cd=4294967296,Ge=[4294967295,-cd],nh=[0,-9223372036854775808],la=[0,0],
M=[1,0],oh=function(){var h,n,q=[];for(h=0;256>h;++h){var t=h;for(n=0;8>n;++n)0!=(1&t)?t=t>>>1^-306674912:t>>>=1;q[h]=t}return q}(),Wd=function(){var h,n,q=2,t=[0,1];for(n=2;22>n;++n){var v=1<<(n>>1)-1;for(h=0;v>h;++h,++q)t[q]=n<<24>>24}return t}(),O=function(){var h,n,q=[];for(n=8;0<=n;--n){var t=1<<9-n-1;for(h=1<<9-n;h>t;++t)q[t]=(n<<6)+(h-t<<6>>>9-n-1)}return q}(),Tc=function(){var h=[{s:16,f:64,m:0},{s:20,f:64,m:0},{s:19,f:64,m:1},{s:20,f:64,m:1},{s:21,f:128,m:1},{s:22,f:128,m:1},{s:23,f:128,
m:1},{s:24,f:255,m:1},{s:25,f:255,m:1}];return function(n){return h[n-1]||h[6]}}();return"undefined"==typeof onmessage||"undefined"!=typeof window&&void 0!==window.document||!function(){onmessage=function(h){h&&h.gc&&(2==h.gc.action?e.decompress(h.gc.gc,h.gc.cbn):1==h.gc.action&&e.compress(h.gc.gc,h.gc.Rc,h.gc.cbn))}}(),{compress:function(h,q,t,v){function w(){try{for(var h,q=(new Date).getTime();Ta(A.c.yb);)if(x=Qf(A.c.yb.Pb)/Qf(A.c.Tb),200<(new Date).getTime()-q)return v(x),Fe(w,0),0;v(1);h=n(A.c.Nb);
Fe(t.bind(null,h),0)}catch(Kg){t(null,Kg)}}var x,y,A={},B=void 0===t&&void 0===v;if("function"!=typeof t&&(y=t,t=v=0),v=v||function(h){void 0!==y&&postMessage({action:3,cbn:y,result:h})},t=t||function(h,n){return void 0!==y?postMessage({action:1,cbn:y,result:h,error:n}):void 0},B){for(A.c=Bb({},lh(h),Tc(q));Ta(A.c.yb););return n(A.c.Nb)}try{A.c=Bb({},lh(h),Tc(q)),v(0)}catch(Hg){return t(null,Hg)}Fe(w,0)},decompress:function(h,q,t){function v(){try{for(var h,x=0,A=(new Date).getTime();Ta(y.d.yb);)if(0==
++x%1E3&&200<(new Date).getTime()-A)return D&&(w=Qf(y.d.yb.Z.g)/B,t(w)),Fe(v,0),0;t(1);h=kh(n(y.d.Nb));Fe(q.bind(null,h),0)}catch(hg){q(null,hg)}}var w,x,y={},A=void 0===q&&void 0===t;if("function"!=typeof q&&(x=q,q=t=0),t=t||function(h){void 0!==x&&postMessage({action:3,cbn:x,result:D?h:-1})},q=q||function(h,n){return void 0!==x?postMessage({action:2,cbn:x,result:h,error:n}):void 0},A){for(y.d=Mc({},h);Ta(y.d.yb););return kh(n(y.d.Nb))}try{y.d=Mc({},h);var B=Qf(y.d.Tb);var D=-1<B;t(0)}catch(Rf){return q(null,
Rf)}Fe(v,0)}}}();this.LZMA=this.LZMA_WORKER=e}
if("undefined"===typeof self||!self.constructor.name.includes("Worker")){var saveAs=saveAs||function(B){if(!("undefined"===typeof B||"undefined"!==typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var v=B.document.createElementNS("http://www.w3.org/1999/xhtml","a"),F="download"in v,I=/constructor/i.test(B.HTMLElement)||B.safari,P=/CriOS\/[\d]+/.test(navigator.userAgent),Q=function(h){(B.setImmediate||B.setTimeout)(function(){throw h;},0)},ca=function(h){setTimeout(function(){"string"===
typeof h?(B.URL||B.webkitURL||B).revokeObjectURL(h):h.remove()},4E4)},x=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},oa=function(h,q,G){G||(h=x(h));var n=this,t="application/octet-stream"===h.type,oa=function(){var h=["writestart","progress","write","writeend"];h=[].concat(h);for(var q=h.length;q--;){var t=n["on"+h[q]];if("function"===typeof t)try{t.call(n,n)}catch(Da){Q(Da)}}};
n.readyState=n.INIT;if(F){var Mc=(B.URL||B.webkitURL||B).createObjectURL(h);setTimeout(function(){v.href=Mc;v.download=q;var h=new MouseEvent("click");v.dispatchEvent(h);oa();ca(Mc);n.readyState=n.DONE})}else(function(){if((P||t&&I)&&B.FileReader){var q=new FileReader;q.onloadend=function(){var h=P?q.result:q.result.replace(/^data:[^;]*;/,"data:attachment/file;");B.open(h,"_blank")||(B.location.href=h);n.readyState=n.DONE;oa()};q.readAsDataURL(h);n.readyState=n.INIT}else Mc||(Mc=(B.URL||B.webkitURL||
B).createObjectURL(h)),t?B.location.href=Mc:B.open(Mc,"_blank")||(B.location.href=Mc),n.readyState=n.DONE,oa(),ca(Mc)})()},q=oa.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(h,q,v){q=q||h.name||"download";v||(h=x(h));return navigator.msSaveOrOpenBlob(h,q)};q.abort=function(){};q.readyState=q.INIT=0;q.WRITING=1;q.DONE=2;q.error=q.onwritestart=q.onprogress=q.onwrite=q.onabort=q.onerror=q.onwriteend=null;return function(h,q,v){return new oa(h,q||h.name||"download",
v)}}}("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);
