function getQueryVariable(t){for(var e=window.location.search.substring(1).split("&"),i=0;i{var t=navigator.userAgent;return{trident:-1{t=LZString.decompressFromUTF16(t);return JSON.parse(t)},((t,e)=>{"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Phaser",[],e):"object"==typeof exports?exports.Phaser=e():t.Phaser=e()})(this,()=>{return s={50792:t=>{var s=Object.prototype.hasOwnProperty,p="~";function i(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function n(t,e,i,s,n){if("function"!=typeof i)throw new TypeError("The listener must be a function");i=new r(i,s||t,n),s=p?p+e:e;return t._events[s]?t._events[s].fn?t._events[s]=[t._events[s],i]:t._events[s].push(i):(t._events[s]=i,t._eventsCount++),t}function h(t,e){0==--t._eventsCount?t._events=new i:delete t._events[e]}function e(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(p=!1)),e.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)s.call(t,e)&&i.push(p?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},e.prototype.listeners=function(t){var t=p?p+t:t,e=this._events[t];if(!e)return[];if(e.fn)return[e.fn];for(var i=0,s=e.length,n=new Array(s);i{var a=i(38829);t.exports=function(t,e,i,s){for(var n=t[0],r=1;r{var r=i(66979);t.exports=function(t,e,i,s,n){return r(t,"angle",e,i,s,n)}},60757:t=>{t.exports=function(t,e,i){for(var s=0;s{t.exports=function(t,e,i){for(var s=i=void 0===i?0:i;s{t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=t.length-1;i<=s;s--){var n,r=t[s],o=!0;for(n in e)r[n]!==e[n]&&(o=!1);if(o)return r}return null}},94420:(t,e,i)=>{var m=i(11879),v=i(60461),y=i(95540),s=i(29747),x=new(i(41481))({sys:{queueDepthSort:s,events:{once:s}}},0,0,1,1).setOrigin(0,0);t.exports=function(t,e){var i=(e=void 0===e?{}:e).hasOwnProperty("width"),s=e.hasOwnProperty("height"),n=y(e,"width",-1),r=y(e,"height",-1),o=y(e,"cellWidth",1),a=y(e,"cellHeight",o),h=y(e,"position",v.TOP_LEFT),l=y(e,"x",0),u=y(e,"y",0),c=0,d=0,p=n*o,f=r*a;x.setPosition(l,u),x.setSize(o,a);for(var g=0;g{var r=i(66979);t.exports=function(t,e,i,s,n){return r(t,"alpha",e,i,s,n)}},67285:(t,e,i)=>{var r=i(66979);t.exports=function(t,e,i,s,n){return r(t,"x",e,i,s,n)}},9074:(t,e,i)=>{var a=i(66979);t.exports=function(t,e,i,s,n,r,o){return null==i&&(i=e),a(t,"x",e,s,r,o),a(t,"y",i,n,r,o)}},75222:(t,e,i)=>{var r=i(66979);t.exports=function(t,e,i,s,n){return r(t,"y",e,i,s,n)}},22983:t=>{t.exports=function(t,e,i,s){for(var n=i=void 0===i?0:i,r=((s=void 0===s?6.28:s)-i)/t.length,o=e.x,a=e.y,h=e.radius,l=0;l{t.exports=function(t,e,i,s){for(var n=i=void 0===i?0:i,r=((s=void 0===s?6.28:s)-i)/t.length,o=e.width/2,a=e.height/2,h=0;h{var a=i(15258),h=i(26708);t.exports=function(t,e,i){for(var s=i?h(e,i,t.length):a(e,t.length),n=0;n{var r=i(14649),o=i(86003),a=i(49498);t.exports=function(t,e,i){void 0===i&&(i=0);var s=r(e,!1,t.length);0{var u=i(84993);t.exports=function(t,e,i){var s=u({x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},i),n=u({x1:e.x2,y1:e.y2,x2:e.x3,y2:e.y3},i),e=u({x1:e.x3,y1:e.y3,x2:e.x1,y2:e.y1},i);s.pop(),n.pop(),e.pop();for(var r=(s=s.concat(n,e)).length/t.length,o=0,a=0;a{t.exports=function(t,e,i){for(var s=0;s{t.exports=function(t,e,i,s,n,r){void 0===s&&(s=0),void 0===n&&(n=0);var o,a=0,h=t.length;if(1===(r=void 0===r?1:r))for(o=n;o{t.exports=function(t,e,i,s,n,r){void 0===s&&(s=0),void 0===n&&(n=0);var o,a=0,h=t.length;if(1===(r=void 0===r?1:r))for(o=n;o{var s=i(28176);t.exports=function(t,e){for(var i=0;i{var s=i(24820);t.exports=function(t,e){for(var i=0;i{var s=i(65822);t.exports=function(t,e){for(var i=0;i{var s=i(26597);t.exports=function(t,e){for(var i=0;i{var s=i(90260);t.exports=function(t,e){for(var i=0;i{var r=i(66979);t.exports=function(t,e,i,s,n){return r(t,"rotation",e,i,s,n)}},91051:(t,e,i)=>{var a=i(1163),h=i(20339);t.exports=function(t,e,i){for(var s=e.x,n=e.y,r=0;r{var a=i(1163);t.exports=function(t,e,i,s){var n=e.x,r=e.y;if(0!==s)for(var o=0;o{var r=i(66979);t.exports=function(t,e,i,s,n){return r(t,"scaleX",e,i,s,n)}},94868:(t,e,i)=>{var a=i(66979);t.exports=function(t,e,i,s,n,r,o){return null==i&&(i=e),a(t,"scaleX",e,s,r,o),a(t,"scaleY",i,n,r,o)}},95532:(t,e,i)=>{var r=i(66979);t.exports=function(t,e,i,s,n){return r(t,"scaleY",e,i,s,n)}},8689:(t,e,i)=>{var r=i(43967);t.exports=function(t,e,i,s,n){return r(t,"alpha",e,i,s,n)}},2645:(t,e,i)=>{var n=i(43967);t.exports=function(t,e,i,s){return n(t,"blendMode",e,0,i,s)}},32372:(t,e,i)=>{var r=i(43967);t.exports=function(t,e,i,s,n){return r(t,"depth",e,i,s,n)}},85373:t=>{t.exports=function(t,e,i){for(var s=0;s{var a=i(43967);t.exports=function(t,e,i,s,n,r,o){return null==i&&(i=e),a(t,"originX",e,s,r,o),a(t,"originY",i,n,r,o),t.forEach(function(t){t.updateDisplayOrigin()}),t}},79939:(t,e,i)=>{var r=i(43967);t.exports=function(t,e,i,s,n){return r(t,"rotation",e,i,s,n)}},2699:(t,e,i)=>{var a=i(43967);t.exports=function(t,e,i,s,n,r,o){return null==i&&(i=e),a(t,"scaleX",e,s,r,o),a(t,"scaleY",i,n,r,o)}},98739:(t,e,i)=>{var r=i(43967);t.exports=function(t,e,i,s,n){return r(t,"scaleX",e,i,s,n)}},98476:(t,e,i)=>{var r=i(43967);t.exports=function(t,e,i,s,n){return r(t,"scaleY",e,i,s,n)}},6207:(t,e,i)=>{var a=i(43967);t.exports=function(t,e,i,s,n,r,o){return null==i&&(i=e),a(t,"scrollFactorX",e,s,r,o),a(t,"scrollFactorY",i,n,r,o)}},6607:(t,e,i)=>{var r=i(43967);t.exports=function(t,e,i,s,n){return r(t,"scrollFactorX",e,i,s,n)}},72248:(t,e,i)=>{var r=i(43967);t.exports=function(t,e,i,s,n){return r(t,"scrollFactorY",e,i,s,n)}},14036:t=>{t.exports=function(t,e,i,s,n){for(var r=0;r{var n=i(43967);t.exports=function(t,e,i,s){return n(t,"visible",e,0,i,s)}},77597:(t,e,i)=>{var r=i(43967);t.exports=function(t,e,i,s,n){return r(t,"x",e,i,s,n)}},83194:(t,e,i)=>{var a=i(43967);t.exports=function(t,e,i,s,n,r,o){return null==i&&(i=e),a(t,"x",e,s,r,o),a(t,"y",i,n,r,o)}},67678:(t,e,i)=>{var r=i(43967);t.exports=function(t,e,i,s,n){return r(t,"y",e,i,s,n)}},35850:(t,e,i)=>{var f=i(26099);t.exports=function(t,e,i,s,n){void 0===s&&(s=0),void 0===n&&(n=new f);var r,o,a=t.length;if(1===a)r=t[0].x,o=t[0].y,t[0].x=e,t[0].y=i;else{var h=1,l=0;0===s&&(l=a-1,h=a-2),r=t[l].x,o=t[l].y,t[l].x=e,t[l].y=i;for(var u,c,d,p=0;p{var s=i(33680);t.exports=function(t){return s(t)}},21837:(t,e,i)=>{var a=i(7602);t.exports=function(t,e,i,s,n){void 0===n&&(n=!1);var r,o=Math.abs(s-i)/t.length;if(n)for(r=0;r{var a=i(54261);t.exports=function(t,e,i,s,n){void 0===n&&(n=!1);var r,o=Math.abs(s-i)/t.length;if(n)for(r=0;r{t.exports=function(t,e,i,s,n){if(void 0===n&&(n=!1),0!==t.length)if(1===t.length)n?t[0][e]+=(s+i)/2:t[0][e]=(s+i)/2;else{var r,o=Math.abs(s-i)/(t.length-1);if(n)for(r=0;r{t.exports=function(t){for(var e=0;e{var r=i(15994);t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=0;s{t.exports={AlignTo:i(11517),Angle:i(80318),Call:i(60757),GetFirst:i(69927),GetLast:i(32265),GridAlign:i(94420),IncAlpha:i(41721),IncX:i(67285),IncXY:i(9074),IncY:i(75222),PlaceOnCircle:i(22983),PlaceOnEllipse:i(95253),PlaceOnLine:i(88505),PlaceOnRectangle:i(41346),PlaceOnTriangle:i(11575),PlayAnimation:i(29953),PropertyValueInc:i(66979),PropertyValueSet:i(43967),RandomCircle:i(88926),RandomEllipse:i(33286),RandomLine:i(96e3),RandomRectangle:i(28789),RandomTriangle:i(97154),Rotate:i(20510),RotateAround:i(91051),RotateAroundDistance:i(76332),ScaleX:i(61619),ScaleXY:i(94868),ScaleY:i(95532),SetAlpha:i(8689),SetBlendMode:i(2645),SetDepth:i(32372),SetHitArea:i(85373),SetOrigin:i(81583),SetRotation:i(79939),SetScale:i(2699),SetScaleX:i(98739),SetScaleY:i(98476),SetScrollFactor:i(6207),SetScrollFactorX:i(6607),SetScrollFactorY:i(72248),SetTint:i(14036),SetVisible:i(50159),SetX:i(77597),SetXY:i(83194),SetY:i(67678),ShiftPosition:i(35850),Shuffle:i(8628),SmootherStep:i(21910),SmoothStep:i(21837),Spread:i(62054),ToggleVisible:i(79815),WrapInRectangle:i(39665)}},42099:(t,e,i)=>{var s=i(45319),n=i(83419),r=i(74943),o=i(81957),m=i(41138),v=i(35154),y=i(90126),i=new n({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,v(i,"frames",[]),v(i,"defaultTextureKey",null),v(i,"sortFrames",!0)),this.frameRate=v(i,"frameRate",null),this.duration=v(i,"duration",null),this.msPerFrame,this.skipMissedFrames=v(i,"skipMissedFrames",!0),this.delay=v(i,"delay",0),this.repeat=v(i,"repeat",0),this.repeatDelay=v(i,"repeatDelay",0),this.yoyo=v(i,"yoyo",!1),this.showBeforeDelay=v(i,"showBeforeDelay",!1),this.showOnStart=v(i,"showOnStart",!1),this.hideOnComplete=v(i,"hideOnComplete",!1),this.randomFrame=v(i,"randomFrame",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(r.PAUSE_ALL,this.pause,this),this.manager.on(r.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(t,e,i,s){null===i&&null===s?(t.frameRate=24,t.duration=24/e*1e3):i&&null===s?(t.duration=i,t.frameRate=e/(i/1e3)):(t.frameRate=s,t.duration=e/s*1e3),t.msPerFrame=1e3/t.frameRate},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i,e=this.getFrames(this.manager.textureManager,e);return 0{i=new(i(83419))({initialize:function(t,e,i,s,n){void 0===n&&(n=!1),this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=s,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=n},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});t.exports=i},60848:(t,e,i)=>{var s=i(42099),n=i(83419),r=i(90330),o=i(50792),a=i(74943),h=i(8443),m=i(95540),v=i(35154),y=i(36383),d=i(20283),p=i(41836),i=new n({Extends:o,initialize:function(t){o.call(this),this.game=t,this.textureManager=null,this.globalTimeScale=1,this.anims=new r,this.mixes=new r,this.paused=!1,this.name="AnimationManager",t.events.once(h.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(h.DESTROY,this.destroy,this)},addMix:function(t,e,i){var s=this.anims,n=this.mixes,t="string"==typeof t?t:t.key,e="string"==typeof e?e:e.key;return s.has(t)&&s.has(e)&&((s=(s=n.get(t))||{})[e]=i,n.set(t,s)),this},removeMix:function(t,e){var i=this.mixes,t="string"==typeof t?t:t.key,s=i.get(t);return s&&(e?(e="string"==typeof e?e:e.key,s.hasOwnProperty(e)&&delete s[e]):i.delete(t)),this},getMix:function(t,e){var i=this.mixes,t="string"==typeof t?t:t.key,e="string"==typeof e?e:e.key,i=i.get(t);return i&&i.hasOwnProperty(e)?i[e]:0},add:function(t,e){return this.anims.has(t)?console.warn("Animation key exists: "+t):(e.key=t,this.anims.set(t,e),this.emit(a.ADD_ANIMATION,t,e)),this},exists:function(t){return this.anims.has(t)},createFromAseprite:function(u,c,d){var p,t,f,g=[],e=this.game.cache.json.get(u);return e?(p=this,t=v(e,"meta",null),f=v(e,"frames",null),t&&f&&v(t,"frameTags",[]).forEach(function(t){var e=[],i=m(t,"name",null),s=m(t,"from",0),n=m(t,"to",0),t=m(t,"direction","forward");if(i&&(!c||-1{var s=i(42099),o=i(30976),n=i(83419),r=i(90330),a=i(74943),h=i(95540),i=new n({initialize:function(t){this.parent=t,this.animationManager=t.scene.sys.anims,this.animationManager.on(a.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.randomFrame=!1,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.showBeforeDelay=!1,this.showOnStart=!1,this.hideOnComplete=!1,this.forward=!0,this.inReverse=!1,this.accumulator=0,this.nextTick=0,this.delayCounter=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},chain:function(t){var e=this.parent;if(void 0===t)return this.nextAnimsQueue.length=0,this.nextAnim=null,e;Array.isArray(t)||(t=[t]);for(var i=0;ithis.repeatCounter&&(e=this.repeatCounter),this.nextAnim=t,this._pendingStop=2,this._pendingStopValue=e):this.play(t),this.parent},play:function(t,e){var i=this.currentAnim,s=this.parent,n="string"==typeof t?t:t.key;if((e=void 0===e?!1:e)&&this.isPlaying&&i.key===n)return s;if(i&&this.isPlaying){e=this.animationManager.getMix(i.key,t);if(0this.repeatCounter&&(t=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=t,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(t,e){var i=this.currentAnim;if(this.isPlaying&&i&&!i.paused){if(this.accumulator+=e*this.timeScale*this.animationManager.globalTimeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.stop();if(this.hasStarted){if(this.accumulator>=this.nextTick&&(this.forward?i.nextFrame(this):i.previousFrame(this),this.isPlaying)&&0===this._pendingStop&&this.skipMissedFrames&&this.accumulator>this.nextTick)for(var s=0;this.forward?i.nextFrame(this):i.previousFrame(this),s++,this.isPlaying&&this.accumulator>this.nextTick&&s<60;);}else this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart())}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),t.setAlpha&&(e.alpha=t.alpha),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(a.ANIMATION_UPDATE),3===this._pendingStop)&&this._pendingStopValue===t&&this.stop(),e},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(t){return this.anims?this.anims.get(t):null},exists:function(t){return!!this.anims&&this.anims.has(t)},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))?console.warn("Animation key already exists: "+e):(i=new s(this,e,t),this.anims||(this.anims=new r),this.anims.set(e,i))),i},createFromAseprite:function(t,e){return this.animationManager.createFromAseprite(t,e,this.parent)},generateFrameNames:function(t,e){return this.animationManager.generateFrameNames(t,e)},generateFrameNumbers:function(t,e){return this.animationManager.generateFrameNumbers(t,e)},remove:function(t){var e=this.get(t);return e&&(this.currentAnim===e&&this.stop(),this.anims.delete(t)),e},destroy:function(){this.animationManager.off(a.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});t.exports=i},57090:t=>{t.exports="add"},25312:t=>{t.exports="animationcomplete"},89580:t=>{t.exports="animationcomplete-"},52860:t=>{t.exports="animationrepeat"},63850:t=>{t.exports="animationrestart"},99085:t=>{t.exports="animationstart"},28087:t=>{t.exports="animationstop"},1794:t=>{t.exports="animationupdate"},52562:t=>{t.exports="pauseall"},57953:t=>{t.exports="remove"},68339:t=>{t.exports="resumeall"},74943:(t,e,i)=>{t.exports={ADD_ANIMATION:i(57090),ANIMATION_COMPLETE:i(25312),ANIMATION_COMPLETE_KEY:i(89580),ANIMATION_REPEAT:i(52860),ANIMATION_RESTART:i(63850),ANIMATION_START:i(99085),ANIMATION_STOP:i(28087),ANIMATION_UPDATE:i(1794),PAUSE_ALL:i(52562),REMOVE_ANIMATION:i(57953),RESUME_ALL:i(68339)}},60421:(t,e,i)=>{t.exports={Animation:i(42099),AnimationFrame:i(41138),AnimationManager:i(60848),AnimationState:i(9674),Events:i(74943)}},2161:(t,e,i)=>{var s=i(83419),n=i(90330),r=i(50792),o=i(24736),i=new s({initialize:function(){this.entries=new n,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit(o.ADD,this,t,e),this},has:function(t){return this.entries.has(t)},exists:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit(o.REMOVE,this,t,e.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=i},24047:(t,e,i)=>{var s=i(2161),n=i(83419),r=i(8443),i=new n({initialize:function(t){this.game=t,this.binary=new s,this.bitmapFont=new s,this.json=new s,this.physics=new s,this.shader=new s,this.audio=new s,this.video=new s,this.text=new s,this.html=new s,this.obj=new s,this.tilemap=new s,this.xml=new s,this.custom={},this.game.events.once(r.DESTROY,this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new s),this.custom[t]},destroy:function(){for(var t,e=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],i=0;i{t.exports="add"},59261:t=>{t.exports="remove"},24736:(t,e,i)=>{t.exports={ADD:i(51464),REMOVE:i(59261)}},83388:(t,e,i)=>{t.exports={BaseCache:i(2161),CacheManager:i(24047),Events:i(24736)}},71911:(t,e,i)=>{var s=i(83419),n=i(31401),r=i(39506),o=i(50792),a=i(19715),h=i(87841),l=i(61340),u=i(80333),g=i(26099),i=new s({Extends:o,Mixins:[n.AlphaSingle,n.Visible],initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),o.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new h,this.dirty=!0,this._x=t,this._y=e,this._width=i,this._height=s,this._bounds=new h,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new l,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new g(i/2,s/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0,this.renderRoundPixels=!0},addToRenderList:function(t){this.renderList.push(t)},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this},getScroll:function(t,e,i){void 0===i&&(i=new g);var s=.5*this.width,n=.5*this.height;return i.x=t-s,i.y=e-n,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOnX:function(t){var e=.5*this.width;return this.midPoint.x=t,this.scrollX=t-e,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(t){var e=.5*this.height;return this.midPoint.y=t,this.scrollY=t-e,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(t,e){return this.centerOnX(t),this.centerOnY(e),this},centerToBounds:function(){var t,e,i;return this.useBounds&&(t=this._bounds,e=.5*this.width,i=.5*this.height,this.midPoint.set(t.centerX,t.centerY),this.scrollX=t.centerX-e,this.scrollY=t.centerY-i),this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(t){if(this.disableCull)return t;var e=this.matrix.matrix,i=e[0],s=e[1],n=e[2],r=e[3];if(!(i*r-s*n))return t;for(var o=e[4],a=e[5],h=this.scrollX,l=this.scrollY,e=this.width,u=this.height,c=this.y,d=c+u,p=this.x,f=p+e,g=this.culledObjects,m=t.length,v=g.length=0;v{var n=i(71911),v=i(67502),o=i(45319),s=i(83419),r=i(31401),a=i(20052),y=i(19715),x=i(28915),h=i(87841),l=i(26099),i=new s({Extends:n,Mixins:[r.PostPipeline],initialize:function(t,e,i,s){n.call(this,t,e,i,s),this.initPostPipeline(),this.inputEnabled=!0,this.fadeEffect=new a.Fade(this),this.flashEffect=new a.Flash(this),this.shakeEffect=new a.Shake(this),this.panEffect=new a.Pan(this),this.rotateToEffect=new a.RotateTo(this),this.zoomEffect=new a.Zoom(this),this.lerp=new l(1,1),this.followOffset=new l,this.deadzone=null,this._follow=null},setDeadzone:function(t,e){var i,s;return void 0===t?this.deadzone=null:(this.deadzone?(this.deadzone.width=t,this.deadzone.height=e):this.deadzone=new h(0,0,t,e),this._follow&&(t=this.width/2,e=this.height/2,i=this._follow.x-this.followOffset.x,s=this._follow.y-this.followOffset.y,this.midPoint.set(i,s),this.scrollX=i-t,this.scrollY=s-e),v(this.deadzone,this.midPoint.x,this.midPoint.y)),this},fadeIn:function(t,e,i,s,n,r){return this.fadeEffect.start(!1,t,e,i,s,!0,n,r)},fadeOut:function(t,e,i,s,n,r){return this.fadeEffect.start(!0,t,e,i,s,!0,n,r)},fadeFrom:function(t,e,i,s,n,r,o){return this.fadeEffect.start(!1,t,e,i,s,n,r,o)},fade:function(t,e,i,s,n,r,o){return this.fadeEffect.start(!0,t,e,i,s,n,r,o)},flash:function(t,e,i,s,n,r,o){return this.flashEffect.start(t,e,i,s,n,r,o)},shake:function(t,e,i,s,n){return this.shakeEffect.start(t,e,i,s,n)},pan:function(t,e,i,s,n,r,o){return this.panEffect.start(t,e,i,s,n,r,o)},rotateTo:function(t,e,i,s,n,r,o){return this.rotateToEffect.start(t,e,i,s,n,r,o)},zoomTo:function(t,e,i,s,n,r){return this.zoomEffect.start(t,e,i,s,n,r)},preRender:function(){this.renderList.length=0;var t=this.width,e=this.height,i=.5*t,s=.5*e,n=this.zoomX,r=this.zoomY,o=this.matrix,a=(this.renderRoundPixels=this.roundPixels&&Number.isInteger(n)&&Number.isInteger(r),t*this.originX),h=e*this.originY,l=this._follow,u=this.deadzone,c=this.scrollX,d=this.scrollY,p=(u&&v(u,this.midPoint.x,this.midPoint.y),!1),u=(l&&!this.panEffect.isRunning&&(m=this.lerp,f=l.x-this.followOffset.x,g=l.y-this.followOffset.y,u?(fu.right&&(c=x(c,c+(f-u.right),m.x)),gu.bottom&&(d=x(d,d+(g-u.bottom),m.y))):(c=x(c,f-a,m.x),d=x(d,g-h,m.y)),p=!0),this.roundPixels&&(c=Math.floor(c),d=Math.floor(d)),this.useBounds&&(c=this.clampX(c),d=this.clampY(d)),(this.scrollX=c)+i),f=(this.scrollY=d)+s,g=(this.midPoint.set(u,f),Math.floor(t/n+.5)),m=Math.floor(e/r+.5),c=Math.floor(u-g/2+.5),i=Math.floor(f-m/2+.5);this.worldView.setTo(c,i,g,m),o.applyITRS(Math.floor(this.x+a+.5),Math.floor(this.y+h+.5),this.rotation,n,r),o.translate(-a,-h),this.shakeEffect.preRender(),p&&this.emit(y.FOLLOW_UPDATE,this,l)},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return this.followOffset.set(t=void 0===t?0:t,e=void 0===e?0:e),this},startFollow:function(t,e,i,s,n,r){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===s&&(s=i),void 0===n&&(n=0),void 0===r&&(r=n),this._follow=t,this.roundPixels=e,i=o(i,0,1),s=o(s,0,1),this.lerp.set(i,s),this.followOffset.set(n,r);e=this.width/2,i=this.height/2,s=t.x-n,n=t.y-r;return this.midPoint.set(s,n),this.scrollX=s-e,this.scrollY=n-i,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.rotateToEffect.update(t,e),this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.resetFX(),n.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=i},32743:(t,e,i)=>{var o=i(38058),s=i(83419),l=i(95540),n=i(37277),a=i(37303),r=i(97480),h=i(44594),i=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.roundPixels=t.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,t.sys.events.once(h.BOOT,this.boot,this),t.sys.events.on(h.START,this.start,this)},boot:function(){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new o(0,0,t.scale.width,t.scale.height).setScene(this.scene),t.game.scale.on(r.RESIZE,this.onResize,this),this.systems.events.once(h.DESTROY,this.destroy,this)},start:function(){this.main||((t=this.systems).settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0]);var t=this.systems.events;t.on(h.UPDATE,this.update,this),t.once(h.SHUTDOWN,this.shutdown,this)},add:function(t,e,i,s,n,r){void 0===i&&(i=this.scene.sys.scale.width),void 0===s&&(s=this.scene.sys.scale.height),void 0===n&&(n=!1),void 0===r&&(r="");t=new o(t=void 0===t?0:t,e=void 0===e?0:e,i,s);return t.setName(r),t.setScene(this.scene),t.setRoundPixels(this.roundPixels),t.id=this.getNextID(),this.cameras.push(t),n&&(this.main=t),t},addExisting:function(t,e){return void 0===e&&(e=!1),-1===this.cameras.indexOf(t)?(t.id=this.getNextID(),t.setRoundPixels(this.roundPixels),this.cameras.push(t),e&&(this.main=t),t):null},getNextID:function(){for(var t=this.cameras,e=1,i=0;i<32;i++){for(var s=!1,n=0;n{var s=i(45319),n=i(83419),h=i(19715),i=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,r,o,a){return void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!(r=void 0===r?!1:r)&&this.isRunning||(this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=s,this.blue=n,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a,r=t?h.FADE_OUT_START:h.FADE_IN_START,this.camera.emit(r,this.camera,this,e,i,s,n)),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var s=i(45319),n=i(83419),a=i(19715),i=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=1,this.progress=0,this._elapsed=0,this._alpha,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,r,o){return void 0===t&&(t=250),void 0===e&&(e=255),void 0===i&&(i=255),void 0===s&&(s=255),void 0===r&&(r=null),void 0===o&&(o=this.camera.scene),!(n=void 0===n?!1:n)&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,this.red=e,this.green=i,this.blue=s,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=r,this._onUpdateScope=o,this.camera.emit(a.FLASH_START,this.camera,this,t,e,i,s)),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var r=i(45319),s=i(83419),h=i(62640),l=i(19715),n=i(26099),i=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=new n,this.current=new n,this.destination=new n,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,r,o){void 0===i&&(i=1e3),void 0===s&&(s=h.Linear),void 0===r&&(r=null),void 0===o&&(o=this.camera.scene);var a=this.camera;return!(n=void 0===n?!1:n)&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(a.scrollX,a.scrollY),this.destination.set(t,e),a.getScroll(t,e,this.current),"string"==typeof s&&h.hasOwnProperty(s)?this.ease=h[s]:"function"==typeof s&&(this.ease=s),this._elapsed=0,this._onUpdate=r,this._onUpdateScope=o,this.camera.emit(l.PAN_START,this.camera,this,i,t,e)),a},update:function(t,e){var i,s,n;this.isRunning&&(this._elapsed+=e,e=r(this._elapsed/this.duration,0,1),this.progress=e,i=this.camera,this._elapsed{var h=i(45319),s=i(83419),l=i(19715),u=i(62640),i=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope,this.clockwise=!0,this.shortestPath=!1},start:function(t,e,i,s,n,r,o){void 0===i&&(i=1e3),void 0===s&&(s=u.Linear),void 0===n&&(n=!1),void 0===r&&(r=null),void 0===o&&(o=this.camera.scene),this.shortestPath=e=void 0===e?!1:e;var e=t,t=(t<0?(e=-1*t,this.clockwise=!1):this.clockwise=!0,360*Math.PI/180),a=(e-=Math.floor(e/t)*t,this.camera);return!n&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source=a.rotation,this.destination=e,"string"==typeof s&&u.hasOwnProperty(s)?this.ease=u[s]:"function"==typeof s&&(this.ease=s),this._elapsed=0,this._onUpdate=r,this._onUpdateScope=o,this.shortestPath&&(s=n=0,(n=this.destination>this.source?Math.abs(this.destination-this.source):Math.abs(this.destination+t)-this.source)<(s=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+t)-this.destination)?this.clockwise=!0:s{var r=i(45319),s=i(83419),o=i(19715),n=i(26099),i=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new n,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===s&&(s=null),void 0===n&&(n=this.camera.scene),!(i=void 0===i?!1:i)&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,"number"==typeof e?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=s,this._onUpdateScope=n,this.camera.emit(o.SHAKE_START,this.camera,this,t,e)),this.camera},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){var i,s,n;this.isRunning&&(this._elapsed+=e,this.progress=r(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var s=i(45319),n=i(83419),a=i(62640),h=i(19715),i=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,r){void 0===e&&(e=1e3),void 0===i&&(i=a.Linear),void 0===n&&(n=null),void 0===r&&(r=this.camera.scene);var o=this.camera;return!(s=void 0===s?!1:s)&&this.isRunning||(this.isRunning=!0,this.duration=e,this.progress=0,this.source=o.zoom,this.destination=t,"string"==typeof i&&a.hasOwnProperty(i)?this.ease=a[i]:"function"==typeof i&&(this.ease=i),this._elapsed=0,this._onUpdate=n,this._onUpdateScope=r,this.camera.emit(h.ZOOM_START,this.camera,this,e,t)),o},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._elapsed{t.exports={Fade:i(5020),Flash:i(10662),Pan:i(20359),Shake:i(30330),RotateTo:i(34208),Zoom:i(45641)}},16438:t=>{t.exports="cameradestroy"},32726:t=>{t.exports="camerafadeincomplete"},87807:t=>{t.exports="camerafadeinstart"},45917:t=>{t.exports="camerafadeoutcomplete"},95666:t=>{t.exports="camerafadeoutstart"},47056:t=>{t.exports="cameraflashcomplete"},91261:t=>{t.exports="cameraflashstart"},45047:t=>{t.exports="followupdate"},81927:t=>{t.exports="camerapancomplete"},74264:t=>{t.exports="camerapanstart"},54419:t=>{t.exports="postrender"},79330:t=>{t.exports="prerender"},93183:t=>{t.exports="camerarotatecomplete"},80112:t=>{t.exports="camerarotatestart"},62252:t=>{t.exports="camerashakecomplete"},86017:t=>{t.exports="camerashakestart"},539:t=>{t.exports="camerazoomcomplete"},51892:t=>{t.exports="camerazoomstart"},19715:(t,e,i)=>{t.exports={DESTROY:i(16438),FADE_IN_COMPLETE:i(32726),FADE_IN_START:i(87807),FADE_OUT_COMPLETE:i(45917),FADE_OUT_START:i(95666),FLASH_COMPLETE:i(47056),FLASH_START:i(91261),FOLLOW_UPDATE:i(45047),PAN_COMPLETE:i(81927),PAN_START:i(74264),POST_RENDER:i(54419),PRE_RENDER:i(79330),ROTATE_COMPLETE:i(93183),ROTATE_START:i(80112),SHAKE_COMPLETE:i(62252),SHAKE_START:i(86017),ZOOM_COMPLETE:i(539),ZOOM_START:i(51892)}},87969:(t,e,i)=>{t.exports={Camera:i(38058),BaseCamera:i(71911),CameraManager:i(32743),Effects:i(20052),Events:i(19715)}},63091:(t,e,i)=>{var s=i(83419),n=i(35154),i=new s({initialize:function(t){this.camera=n(t,"camera",null),this.left=n(t,"left",null),this.right=n(t,"right",null),this.up=n(t,"up",null),this.down=n(t,"down",null),this.zoomIn=n(t,"zoomIn",null),this.zoomOut=n(t,"zoomOut",null),this.zoomSpeed=n(t,"zoomSpeed",.01),this.minZoom=n(t,"minZoom",.001),this.maxZoom=n(t,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=n(t,"speed",null);"number"==typeof e?(this.speedX=e,this.speedY=e):(this.speedX=n(t,"speed.x",0),this.speedY=n(t,"speed.y",0)),this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){var e;this.active&&(void 0===t&&(t=1),e=this.camera,this.up&&this.up.isDown?e.scrollY-=this.speedY*t|0:this.down&&this.down.isDown&&(e.scrollY+=this.speedY*t|0),this.left&&this.left.isDown?e.scrollX-=this.speedX*t|0:this.right&&this.right.isDown&&(e.scrollX+=this.speedX*t|0),this.zoomIn&&this.zoomIn.isDown?(e.zoom-=this.zoomSpeed,e.zoomthis.maxZoom)&&(e.zoom=this.maxZoom))},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=i},58818:(t,e,i)=>{var s=i(83419),n=i(35154),i=new s({initialize:function(t){this.camera=n(t,"camera",null),this.left=n(t,"left",null),this.right=n(t,"right",null),this.up=n(t,"up",null),this.down=n(t,"down",null),this.zoomIn=n(t,"zoomIn",null),this.zoomOut=n(t,"zoomOut",null),this.zoomSpeed=n(t,"zoomSpeed",.01),this.minZoom=n(t,"minZoom",.001),this.maxZoom=n(t,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=n(t,"acceleration",null),e=("number"==typeof e?(this.accelX=e,this.accelY=e):(this.accelX=n(t,"acceleration.x",0),this.accelY=n(t,"acceleration.y",0)),this.dragX=0,this.dragY=0,n(t,"drag",null)),e=("number"==typeof e?(this.dragX=e,this.dragY=e):(this.dragX=n(t,"drag.x",0),this.dragY=n(t,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0,n(t,"maxSpeed",null));"number"==typeof e?(this.maxSpeedX=e,this.maxSpeedY=e):(this.maxSpeedX=n(t,"maxSpeed.x",0),this.maxSpeedY=n(t,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){var e;this.active&&(void 0===t&&(t=1),e=this.camera,0this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY)&&(this._speedY=-this.maxSpeedY),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX)&&(this._speedX=-this.maxSpeedX),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom)&&(e.zoom+=this._zoom,e.zoomthis.maxZoom&&(e.zoom=this.maxZoom))},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=i},38865:(t,e,i)=>{t.exports={FixedKeyControl:i(63091),SmoothedKeyControl:i(58818)}},26638:(t,e,i)=>{t.exports={Controls:i(38865),Scene2D:i(87969)}},8054:(t,e,i)=>{i={VERSION:"3.86.0",BlendModes:i(10312),ScaleModes:i(29795),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=i},69547:(t,e,i)=>{var s=i(83419),n=i(8054),r=i(42363),o=i(82264),a=i(95540),h=i(35154),l=i(41212),u=i(29747),c=i(75508),d=i(36060),p=i(80333),i=new s({initialize:function(t){var e=h(t=void 0===t?{}:t,"scale",null),e=(this.width=h(e,"width",1024,t),this.height=h(e,"height",768,t),this.zoom=h(e,"zoom",1,t),this.parent=h(e,"parent",void 0,t),this.scaleMode=h(e,e?"mode":"scaleMode",0,t),this.expandParent=h(e,"expandParent",!0,t),this.autoRound=h(e,"autoRound",!1,t),this.autoCenter=h(e,"autoCenter",0,t),this.resizeInterval=h(e,"resizeInterval",500,t),this.fullscreenTarget=h(e,"fullscreenTarget",null,t),this.minWidth=h(e,"min.width",0,t),this.maxWidth=h(e,"max.width",0,t),this.minHeight=h(e,"min.height",0,t),this.maxHeight=h(e,"max.height",0,t),this.snapWidth=h(e,"snap.width",0,t),this.snapHeight=h(e,"snap.height",0,t),this.renderType=h(t,"type",n.AUTO),this.canvas=h(t,"canvas",null),this.context=h(t,"context",null),this.canvasStyle=h(t,"canvasStyle",null),this.customEnvironment=h(t,"customEnvironment",!1),this.sceneConfig=h(t,"scene",null),this.seed=h(t,"seed",[(Date.now()*Math.random()).toString()]),c.RND=new c.RandomDataGenerator(this.seed),this.gameTitle=h(t,"title",""),this.gameURL=h(t,"url","https://phaser.io/v385/"),this.gameVersion=h(t,"version",""),this.autoFocus=h(t,"autoFocus",!0),this.stableSort=h(t,"stableSort",-1),-1===this.stableSort&&(this.stableSort=o.browser.es2019?1:0),o.features.stableSort=this.stableSort,this.domCreateContainer=h(t,"dom.createContainer",!1),this.domPointerEvents=h(t,"dom.pointerEvents","none"),this.inputKeyboard=h(t,"input.keyboard",!0),this.inputKeyboardEventTarget=h(t,"input.keyboard.target",window),this.inputKeyboardCapture=h(t,"input.keyboard.capture",[]),this.inputMouse=h(t,"input.mouse",!0),this.inputMouseEventTarget=h(t,"input.mouse.target",null),this.inputMousePreventDefaultDown=h(t,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=h(t,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=h(t,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=h(t,"input.mouse.preventDefaultWheel",!0),this.inputTouch=h(t,"input.touch",o.input.touch),this.inputTouchEventTarget=h(t,"input.touch.target",null),this.inputTouchCapture=h(t,"input.touch.capture",!0),this.inputActivePointers=h(t,"input.activePointers",1),this.inputSmoothFactor=h(t,"input.smoothFactor",0),this.inputWindowEvents=h(t,"input.windowEvents",!0),this.inputGamepad=h(t,"input.gamepad",!1),this.inputGamepadEventTarget=h(t,"input.gamepad.target",window),this.disableContextMenu=h(t,"disableContextMenu",!1),this.audio=h(t,"audio",{}),this.hideBanner=!1===h(t,"banner",null),this.hidePhaser=h(t,"banner.hidePhaser",!1),this.bannerTextColor=h(t,"banner.text","#ffffff"),this.bannerBackgroundColor=h(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=h(t,"fps",null),this.disablePreFX=h(t,"disablePreFX",!1),this.disablePostFX=h(t,"disablePostFX",!1),h(t,"render",null)),e=(this.pipeline=h(e,"pipeline",null,t),this.autoMobilePipeline=h(e,"autoMobilePipeline",!0,t),this.defaultPipeline=h(e,"defaultPipeline",d.MULTI_PIPELINE,t),this.antialias=h(e,"antialias",!0,t),this.antialiasGL=h(e,"antialiasGL",!0,t),this.mipmapFilter=h(e,"mipmapFilter","",t),this.desynchronized=h(e,"desynchronized",!1,t),this.roundPixels=h(e,"roundPixels",!1,t),this.pixelArt=h(e,"pixelArt",1!==this.zoom,t),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=h(e,"transparent",!1,t),this.clearBeforeRender=h(e,"clearBeforeRender",!0,t),this.preserveDrawingBuffer=h(e,"preserveDrawingBuffer",!1,t),this.premultipliedAlpha=h(e,"premultipliedAlpha",!0,t),this.failIfMajorPerformanceCaveat=h(e,"failIfMajorPerformanceCaveat",!1,t),this.powerPreference=h(e,"powerPreference","default",t),this.batchSize=h(e,"batchSize",4096,t),this.maxTextures=h(e,"maxTextures",-1,t),this.maxLights=h(e,"maxLights",10,t),h(t,"backgroundColor",0)),e=(this.backgroundColor=p(e),this.transparent&&(this.backgroundColor=p(0),this.backgroundColor.alpha=0),this.preBoot=h(t,"callbacks.preBoot",u),this.postBoot=h(t,"callbacks.postBoot",u),this.physics=h(t,"physics",{}),this.defaultPhysicsSystem=h(this.physics,"default",!1),this.loaderBaseURL=h(t,"loader.baseURL",""),this.loaderPath=h(t,"loader.path",""),this.loaderMaxParallelDownloads=h(t,"loader.maxParallelDownloads",o.os.android?6:32),this.loaderCrossOrigin=h(t,"loader.crossOrigin",void 0),this.loaderResponseType=h(t,"loader.responseType",""),this.loaderAsync=h(t,"loader.async",!0),this.loaderUser=h(t,"loader.user",""),this.loaderPassword=h(t,"loader.password",""),this.loaderTimeout=h(t,"loader.timeout",0),this.loaderMaxRetries=h(t,"loader.maxRetries",2),this.loaderWithCredentials=h(t,"loader.withCredentials",!1),this.loaderImageLoadType=h(t,"loader.imageLoadType","XHR"),this.loaderLocalScheme=h(t,"loader.localScheme",["file://","capacitor://"]),this.glowFXQuality=h(t,"fx.glow.quality",.1),this.glowFXDistance=h(t,"fx.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[],h(t,"plugins",null)),i=r.DefaultScene,e=(e&&(Array.isArray(e)?this.defaultPlugins=e:l(e)&&(this.installGlobalPlugins=a(e,"global",[]),this.installScenePlugins=a(e,"scene",[]),Array.isArray(e.default)?i=e.default:Array.isArray(e.defaultMerge)&&(i=i.concat(e.defaultMerge)))),this.defaultPlugins=i,"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg");this.defaultImage=h(t,"images.default",e+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=h(t,"images.missing",e+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=h(t,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=n.WEBGL:window.FORCE_CANVAS&&(this.renderType=n.CANVAS))}});t.exports=i},86054:(t,e,n)=>{var r=n(20623),o=n(27919),a=n(8054),h=n(89357);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===a.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==a.HEADLESS)if(e.renderType===a.AUTO&&(e.renderType=h.webGL?a.WEBGL:a.CANVAS),e.renderType===a.WEBGL){if(!h.webGL)throw new Error("Cannot create WebGL context, aborting.")}else{if(e.renderType!==a.CANVAS)throw new Error("Unknown value for renderer type: "+e.renderType);if(!h.canvas)throw new Error("Cannot create Canvas context, aborting.")}e.antialias||o.disableSmoothing();var i=t.scale.baseSize,s=i.width,i=i.height;e.canvas?(t.canvas=e.canvas,t.canvas.width=s,t.canvas.height=i):t.canvas=o.create(t,s,i,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||r.setCrisp(t.canvas),e.renderType!==a.HEADLESS&&(s=n(68627),i=n(74797),e.renderType===a.WEBGL?t.renderer=new i(t):(t.renderer=new s(t),t.context=t.renderer.gameContext))}},96391:(t,e,i)=>{var h=i(8054);t.exports=function(t){var e,i,s,n,r,o,a=t.config;a.hideBanner||(e="WebGL",a.renderType===h.CANVAS?e="Canvas":a.renderType===h.HEADLESS&&(e="Headless"),o=a.audio,o=(i=t.device.audio).webAudio&&!o.disableWebAudio?"Web Audio":o.noAudio||!i.webAudio&&!i.audioData?"No Audio":"HTML5 Audio",t.device.browser.ie?window.console&&console.log("Phaser v"+h.VERSION+" / https://phaser.io"):(r=[n=""],Array.isArray(a.bannerBackgroundColor)?(a.bannerBackgroundColor.forEach(function(t){n=n.concat("%c "),r.push("background: "+t),s=t}),r[r.length-1]="color: "+a.bannerTextColor+"; background: "+s):(n=n.concat("%c "),r.push("color: "+a.bannerTextColor+"; background: "+a.bannerBackgroundColor)),r.push("background: transparent"),a.gameTitle&&(n=n.concat(a.gameTitle),a.gameVersion&&(n=n.concat(" v"+a.gameVersion)),a.hidePhaser||(n=n.concat(" / "))),n=(n=a.hidePhaser?n:n.concat("Phaser v"+h.VERSION+" ("+e+" | "+o+")")).concat(" %c "+a.gameURL),r[0]=n,console.log.apply(console,r)))}},50127:(t,e,i)=>{var s=i(40366),n=i(60848),r=i(24047),o=i(27919),a=i(83419),h=i(69547),l=i(83719),u=i(86054),c=i(45893),d=i(96391),p=i(82264),f=i(57264),g=i(50792),m=i(8443),v=i(7003),y=i(37277),x=i(77332),T=i(76531),b=i(60903),w=i(69442),S=i(17130),C=i(65898),E=i(51085),_=i(14747),i=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new g,this.anims=new n(this),this.textures=new S(this),this.cache=new r(this),this.registry=new c(this,new g),this.input=new v(this,this.config),this.scene=new b(this,this.config.sceneConfig),this.device=p,this.scale=new T(this,this.config),this.sound=null,this.sound=_.create(this),this.loop=new C(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isPaused=!1,f(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),d(this),s(this.canvas,this.config.parent),this.textures.once(w.READY,this.texturesReady,this),this.events.emit(m.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(m.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),E(this);var t=this.events;t.on(m.HIDDEN,this.onHidden,this),t.on(m.VISIBLE,this.onVisible,this),t.on(m.BLUR,this.onBlur,this),t.on(m.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i,s;this.isPaused||((i=this.events).emit(m.PRE_STEP,t,e),i.emit(m.STEP,t,e),this.scene.update(t,e),i.emit(m.POST_STEP,t,e),(s=this.renderer).preRender(),i.emit(m.PRE_RENDER,s,t,e),this.scene.render(s),s.postRender(),i.emit(m.POST_RENDER,s,t,e))},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i;this.isPaused||((i=this.events).emit(m.PRE_STEP,t,e),i.emit(m.STEP,t,e),this.scene.update(t,e),i.emit(m.POST_STEP,t,e),this.scene.isProcessing=!1,i.emit(m.PRE_RENDER,null,t,e),i.emit(m.POST_RENDER,null,t,e))},onHidden:function(){this.loop.pause(),this.events.emit(m.PAUSE)},pause:function(){var t=this.isPaused;this.isPaused=!0,t||this.events.emit(m.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(m.RESUME,this.loop.pauseDuration)},resume:function(){var t=this.isPaused;this.isPaused=!1,t&&this.events.emit(m.RESUME,0)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.scene.destroy(),this.events.emit(m.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode)&&this.canvas.parentNode.removeChild(this.canvas),this.domContainer&&this.domContainer.parentNode&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=i},65898:(t,e,i)=>{var s=i(83419),n=i(35154),r=i(29747),o=i(43092),i=new s({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=n(e,"min",5),this.targetFps=n(e,"target",60),this.fpsLimit=n(e,"limit",0),this.hasFpsLimit=0this._min&&(t=i[e],t=Math.min(t,this._min)),i[e]=t,this.deltaIndex++,this.deltaIndex>=s&&(this.deltaIndex=0);for(var n=0,r=0;r=this.nextFpsUpdate&&this.updateFPS(t),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(t,this.delta),this.delta=0),this.lastTime=t,this.frame++},step:function(t){this.now=t;var e=Math.max(0,t-this.lastTime);this.rawDelta=e,this.time+=this.rawDelta,this.smoothStep&&(e=this.smoothDelta(e)),this.delta=e,t>=this.nextFpsUpdate&&this.updateFPS(t),this.framesThisSecond++,this.callback(t,e),this.lastTime=t,this.frame++},tick:function(){var t=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(t):this.step(t)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){void 0===t&&(t=!1);var e=window.performance.now();this.running||(t&&(this.startTime+=-this.lastTime+(this.lastTime+e)),t=(this.hasFpsLimit?this.stepLimitFPS:this.step).bind(this),this.raf.start(t,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0,this.fpsLimitTriggered=!1,this.tick())},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.raf.destroy(),this.raf=null,this.game=null,this.callback=null}});t.exports=i},51085:(t,e,i)=>{var s=i(8443);t.exports=function(t){var e,i=t.events;void 0!==document.hidden?e="visibilitychange":["webkit","moz","ms"].forEach(function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")}),e&&document.addEventListener(e,function(t){document.hidden||"pause"===t.type?i.emit(s.HIDDEN):i.emit(s.VISIBLE)},!1),window.onblur=function(){i.emit(s.BLUR)},window.onfocus=function(){i.emit(s.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},97217:t=>{t.exports="blur"},47548:t=>{t.exports="boot"},19814:t=>{t.exports="contextlost"},68446:t=>{t.exports="destroy"},41700:t=>{t.exports="focus"},25432:t=>{t.exports="hidden"},65942:t=>{t.exports="pause"},59211:t=>{t.exports="postrender"},47789:t=>{t.exports="poststep"},39066:t=>{t.exports="prerender"},460:t=>{t.exports="prestep"},16175:t=>{t.exports="ready"},42331:t=>{t.exports="resume"},11966:t=>{t.exports="step"},32969:t=>{t.exports="systemready"},94830:t=>{t.exports="visible"},8443:(t,e,i)=>{t.exports={BLUR:i(97217),BOOT:i(47548),CONTEXT_LOST:i(19814),DESTROY:i(68446),FOCUS:i(41700),HIDDEN:i(25432),PAUSE:i(65942),POST_RENDER:i(59211),POST_STEP:i(47789),PRE_RENDER:i(39066),PRE_STEP:i(460),READY:i(16175),RESUME:i(42331),STEP:i(11966),SYSTEM_READY:i(32969),VISIBLE:i(94830)}},42857:(t,e,i)=>{t.exports={Config:i(69547),CreateRenderer:i(86054),DebugHeader:i(96391),Events:i(8443),TimeStep:i(65898),VisibilityHandler:i(51085)}},99584:(t,e,i)=>{var m=i(5290),v=i(27919),y=i(35154);t.exports=function(t){var e=y(t,"data",[]),i=y(t,"canvas",null),s=y(t,"palette",m),n=y(t,"pixelWidth",1),r=y(t,"pixelHeight",n),o=y(t,"resizeCanvas",!0),a=y(t,"clearCanvas",!0),h=y(t,"preRender",null),t=y(t,"postRender",null),l=Math.floor(Math.abs(e[0].length*n)),u=Math.floor(Math.abs(e.length*r)),c=(i||(i=v.create2D(this,l,u),a=o=!1),o&&(i.width=l,i.height=u),i.getContext("2d",{willReadFrequently:!0}));a&&c.clearRect(0,0,l,u),h&&h(i,c);for(var d=0;d{t.exports={GenerateTexture:i(99584),Palettes:i(57763)}},5290:t=>{t.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},23816:t=>{t.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},9866:t=>{t.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},77552:t=>{t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},92259:t=>{t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},57763:(t,e,i)=>{t.exports={ARNE16:i(5290),C64:i(23816),CGA:i(9866),JMP:i(77552),MSX:i(92259)}},46728:(t,e,i)=>{var s=i(83419),o=i(36316),n=i(80021),a=i(26099),r=new s({Extends:n,initialize:function(t,e,i,s){n.call(this,"CubicBezierCurve"),Array.isArray(t)&&(s=new a(t[6],t[7]),i=new a(t[4],t[5]),e=new a(t[2],t[3]),t=new a(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i,this.p3=s},getStartPoint:function(t){return(t=void 0===t?new a:t).copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new a);var i=this.p0,s=this.p1,n=this.p2,r=this.p3;return e.set(o(t,i.x,s.x,n.x,r.x),o(t,i.y,s.y,n.y,r.y))},draw:function(t,e){var i=this.getPoints(e=void 0===e?32:e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var s=1;s{var s=i(83419),n=i(19217),r=i(87841),o=i(26099),i=new s({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return t.strokePoints(this.getPoints(e=void 0===e?32:e))},getBounds:function(t,e){t=t||new r,void 0===e&&(e=16);var i=this.getLength(),i=(i{var s=i(83419),l=i(80021),u=i(39506),c=i(35154),n=i(43396),d=i(26099),r=new s({Extends:l,initialize:function(t,e,i,s,n,r,o,a){var h;"object"==typeof t?(t=c(h=t,"x",0),e=c(h,"y",0),i=c(h,"xRadius",0),s=c(h,"yRadius",i),n=c(h,"startAngle",0),r=c(h,"endAngle",360),o=c(h,"clockwise",!1),a=c(h,"rotation",0)):(void 0===s&&(s=i),void 0===n&&(n=0),void 0===r&&(r=360),void 0===o&&(o=!1),void 0===a&&(a=0)),l.call(this,"EllipseCurve"),this.p0=new d(t,e),this._xRadius=i,this._yRadius=s,this._startAngle=u(n),this._endAngle=u(r),this._clockwise=o,this._rotation=u(a)},getStartPoint:function(t){return void 0===t&&(t=new d),this.getPoint(0,t)},getResolution:function(t){return 2*t},getPoint:function(t,e){void 0===e&&(e=new d);for(var i=2*Math.PI,s=this._endAngle-this._startAngle,n=Math.abs(s){var s=i(83419),n=i(80021),r=i(19217),o=i(87841),a=i(26099),h=new s({Extends:n,initialize:function(t,e){n.call(this,"LineCurve"),Array.isArray(t)&&(e=new a(t[2],t[3]),t=new a(t[0],t[1])),this.p0=t,this.p1=e,this.arcLengthDivisions=1},getBounds:function(t){return void 0===t&&(t=new o),r([this.p0,this.p1],t)},getStartPoint:function(t){return(t=void 0===t?new a:t).copy(this.p0)},getResolution:function(t){return t=void 0===t?1:t},getPoint:function(t,e){return void 0===e&&(e=new a),1===t?e.copy(this.p1):(e.copy(this.p1).subtract(this.p0).scale(t).add(this.p0),e)},getPointAt:function(t,e){return this.getPoint(t,e)},getTangent:function(t,e){return(e=void 0===e?new a:e).copy(this.p1).subtract(this.p0).normalize(),e},getUtoTmapping:function(t,e,i){return e?(i=(i=this.getLengths(i))[i.length-1],Math.min(e,i)/i):t},draw:function(t){return t.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});h.fromJSON=function(t){var t=t.points,e=new a(t[0],t[1]),t=new a(t[2],t[3]);return new h(e,t)},t.exports=h},14744:(t,e,i)=>{var s=i(83419),n=i(80021),r=i(32112),o=i(26099),a=new s({Extends:n,initialize:function(t,e,i){n.call(this,"QuadraticBezierCurve"),Array.isArray(t)&&(i=new o(t[4],t[5]),e=new o(t[2],t[3]),t=new o(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i},getStartPoint:function(t){return(t=void 0===t?new o:t).copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.p0,s=this.p1,n=this.p2;return e.set(r(t,i.x,s.x,n.x),r(t,i.y,s.y,n.y))},draw:function(t,e){var i=this.getPoints(e=void 0===e?32:e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var s=1;s{var a=i(87842),s=i(83419),n=i(80021),h=i(26099),r=new s({Extends:n,initialize:function(t){void 0===t&&(t=[]),n.call(this,"SplineCurve"),this.points=[],this.addPoints(t)},addPoints:function(t){for(var e=0;ei.length-2?i.length-1:s+1],i=i[s>i.length-3?i.length-1:s+2];return e.set(a(t,n.x,r.x,o.x,i.x),a(t,n.y,r.y,o.y,i.y))},toJSON:function(){for(var t=[],e=0;e{t.exports={Path:i(46669),MoveTo:i(68618),CubicBezier:i(46728),Curve:i(80021),Ellipse:i(73825),Line:i(33951),QuadraticBezier:i(14744),Spline:i(42534)}},68618:(t,e,i)=>{var s=i(83419),n=i(26099),i=new s({initialize:function(t,e){this.active=!1,this.p0=new n(t,e)},getPoint:function(t,e){return(e=void 0===e?new n:e).copy(this.p0)},getPointAt:function(t,e){return this.getPoint(t,e)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});t.exports=i},46669:(t,e,i)=>{var s=i(83419),l=i(46728),o=i(73825),n=i(39429),r=i(33951),a=i(68618),h=i(14744),u=i(87841),c=i(42534),d=i(26099),p=i(36383),f=new s({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new d,this._tmpVec2A=new d,this._tmpVec2B=new d,"object"==typeof t?this.fromJSON(t):this.startPoint.set(t,e)},add:function(t){return this.curves.push(t),this},circleTo:function(t,e,i){return this.ellipseTo(t,t,0,360,e=void 0===e?!1:e,i)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);return t.equals(e)||this.curves.push(new r(e,t)),this},cubicBezierTo:function(t,e,i,s,n,r){var o,a,h=this.getEndPoint(),i=t instanceof d?(o=t,a=e,i):(o=new d(i,s),a=new d(n,r),new d(t,e));return this.add(new l(h,o,a,i))},quadraticBezierTo:function(t,e,i,s){var n,r=this.getEndPoint(),i=t instanceof d?(n=t,e):(n=new d(i,s),new d(t,e));return this.add(new h(r,n,i))},draw:function(t,e){for(var i=0;i=e)return this.curves[s];s++}return null},getEndPoint:function(t){return void 0===t&&(t=new d),0=r)return i=o[a]-r,n=(s=this.curves[a]).getLength(),s.getPointAt(0===n?0:1-i/n,e);a++}return null},getPoints:function(t,e){t||e||(t=this.defaultDivisions);for(var i,s=[],n=0;n=r)return i=o[a]-r,n=(s=this.curves[a]).getLength(),s.getTangentAt(0===n?0:1-i/n,e);a++}return null},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):"object"==typeof t?this._tmpVec2B.setFromObject(t):this._tmpVec2B.set(t,e);t=this.getEndPoint(this._tmpVec2A);return this.add(new r([t.x,t.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new a(t.x,t.y)):this.add(new a(t,e))},toJSON:function(){for(var t=[],e=0;e{var s=i(83419),a=i(24882),i=new s({initialize:function(t,e){this.parent=t,(this.events=e)||(this.events=t.events||t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(a.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],s=0;s{var s=i(83419),n=i(45893),r=i(37277),o=i(44594),i=new s({Extends:n,initialize:function(t){n.call(this,t,t.sys.events),this.scene=t,this.systems=t.sys,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(o.DESTROY,this.destroy,this)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){n.prototype.destroy.call(this),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null}});r.register("DataManagerPlugin",i,"data"),t.exports=i},10700:t=>{t.exports="changedata"},93608:t=>{t.exports="changedata-"},60883:t=>{t.exports="destroy"},69780:t=>{t.exports="removedata"},22166:t=>{t.exports="setdata"},24882:(t,e,i)=>{t.exports={CHANGE_DATA:i(10700),CHANGE_DATA_KEY:i(93608),DESTROY:i(60883),REMOVE_DATA:i(69780),SET_DATA:i(22166)}},44965:(t,e,i)=>{t.exports={DataManager:i(45893),DataManagerPlugin:i(63646),Events:i(24882)}},7098:(t,e,i)=>{var r=i(84148),o={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=(()=>{if("function"!=typeof importScripts){o.audioData=!!window.Audio,o.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t,e,i,s=document.createElement("audio"),n=!!s.canPlayType;try{n&&(t=function(t,e){t=s.canPlayType("audio/"+t).replace(/^no$/,"");return e?Boolean(t||s.canPlayType("audio/"+e).replace(/^no$/,"")):Boolean(t)},o.ogg=t('ogg; codecs="vorbis"'),o.opus=t('ogg; codecs="opus"',"opus"),o.mp3=t("mpeg"),o.wav=t("wav"),o.m4a=t("x-m4a"),o.aac=t("aac"),o.flac=t("flac","x-flac"),o.webm=t('webm; codecs="vorbis"'),""!==s.canPlayType('audio/mp4; codecs="ec-3"'))&&(r.edge||r.safari&&9<=r.safariVersion&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)&&(e=parseInt(RegExp.$1,10),i=parseInt(RegExp.$2,10),10===e&&11<=i||10{var i=i(25892),s={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};t.exports=(t=navigator.userAgent,/Edg\/\d+/.test(t)?(s.edge=!0,s.es2019=!0):/OPR/.test(t)?(s.opera=!0,s.es2019=!0):/Chrome\/(\d+)/.test(t)&&!i.windowsPhone?(s.chrome=!0,s.chromeVersion=parseInt(RegExp.$1,10),s.es2019=69{var s,n,r,o=i(27919),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(a.supportNewBlendModes=(s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",n="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var e=new Image;e.onload=function(){var t=o.create2D(e,6).getContext("2d",{willReadFrequently:!0});if(t.globalCompositeOperation="multiply",t.drawImage(r,0,0),t.drawImage(e,2,0),!t.getImageData(2,0,1,1))return!1;t=t.getImageData(2,0,1,1).data;o.remove(e),a.supportNewBlendModes=255===t[0]&&0===t[1]&&0===t[2]},e.src=s+"/wCKxvRF"+n},r.src=s+"AP804Oa6"+n,!1),a.supportInverseAlpha=function(){var t=o.create2D(this,2).getContext("2d",{willReadFrequently:!0}),e=(t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1),t.getImageData(0,0,1,1));if(null===e)return!1;t.putImageData(e,1,0);t=t.getImageData(1,0,1,1),t=t.data[0]===e.data[0]&&t.data[1]===e.data[1]&&t.data[2]===e.data[2]&&t.data[3]===e.data[3];return o.remove(this),t}()),a)},89357:(t,e,i)=>{var s=i(25892),r=i(84148),o=i(27919),a={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=(()=>{if("function"!=typeof importScripts){a.canvas=!!window.CanvasRenderingContext2D;try{a.localStorage=!!localStorage.getItem}catch(t){a.localStorage=!1}a.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),a.fileSystem=!!window.requestFileSystem;var t,e,i,n=!1;a.webGL=function(){if(window.WebGLRenderingContext)try{var t=o.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=o.create2D(this),s=i.getContext("2d",{willReadFrequently:!0}).createImageData(1,1);return n=s.data instanceof Uint8ClampedArray,o.remove(t),o.remove(i),!!e}catch(t){}return!1}(),a.worker=!!window.Worker,a.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,a.getUserMedia=a.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,r.firefox&&r.firefoxVersion<21&&(a.getUserMedia=!1),!s.iOS&&(r.ie||r.firefox||r.chrome)&&(a.canvasBitBltShift=!0),(r.safari||r.mobileSafari)&&(a.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(a.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(a.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),a.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==a.littleEndian&&n}return a})()},91639:t=>{var r={available:!1,cancel:"",keyboard:!1,request:""};t.exports=(()=>{if("function"!=typeof importScripts){for(var t="Fullscreen",e="FullScreen",i=["request"+t,"request"+e,"webkitRequest"+t,"webkitRequest"+e,"msRequest"+t,"msRequest"+e,"mozRequest"+e,"mozRequest"+t],s=0;s{var i=i(84148),s={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=("function"!=typeof importScripts&&(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&1<=navigator.maxTouchPoints)&&(s.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(s.mspointer=!0),navigator.getGamepads&&(s.gamepads=!0),"onwheel"in window||i.ie&&"WheelEvent"in window?s.wheelEvent="wheel":"onmousewheel"in window?s.wheelEvent="mousewheel":i.firefox&&"MouseScrollEvent"in window&&(s.wheelEvent="DOMMouseScroll")),s)},25892:t=>{var e,i={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=("function"!=typeof importScripts&&(t=navigator.userAgent,/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?navigator.maxTouchPoints&&2{var n=i(95540),r={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};t.exports=(()=>{if("function"!=typeof importScripts){var t=document.createElement("video"),e=!!t.canPlayType,i=/^no$/;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(i,"")&&(r.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(i,"")&&(r.h264=!0,r.mp4=!0),t.canPlayType("video/x-m4v").replace(i,"")&&(r.m4v=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(i,"")&&(r.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(i,"")&&(r.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(i,""))&&(r.hls=!0)}catch(t){}t.parentNode&&t.parentNode.removeChild(t),r.getVideoURL=function(t){Array.isArray(t)||(t=[t]);for(var e=0;e{t.exports={os:i(25892),browser:i(84148),features:i(89357),input:i(31784),audio:i(7098),video:i(43267),fullscreen:i(91639),canvasFeatures:i(89289)}},89422:(t,e,i)=>{var i=i(83419),s=new Float32Array(20),n=new i({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(t){return this._matrix.set(t),this._dirty=!0,this},reset:function(){var t=this._matrix;return t.fill(0),t[0]=1,t[6]=1,t[12]=1,t[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var t=this._data;return this._dirty&&(t.set(this._matrix),t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,this._dirty=!1),t},brightness:function(t,e){t=void 0===t?0:t;return this.multiply([t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0],e=void 0===e?!1:e)},saturate:function(t,e){var t=2*(t=void 0===t?0:t)/3+1,i=-.5*(t-1);return this.multiply([t,i,i,0,0,i,t,i,0,0,i,i,t,0,0,0,0,0,1,0],e=void 0===e?!1:e)},desaturate:function(t){return this.saturate(-1,t=void 0===t?!1:t)},hue:function(t,e){void 0===e&&(e=!1),t=(t=void 0===t?0:t)/180*Math.PI;var i=Math.cos(t),t=Math.sin(t),s=.213,n=.715,r=.072;return this.multiply([s+.787*i+t*-s,n+i*-n+t*-n,r+i*-r+.928*t,0,0,s+i*-s+.143*t,n+i*(1-n)+.14*t,r+i*-r+-.283*t,0,0,s+i*-s+-.787*t,n+i*-n+t*n,r+.928*i+t*r,0,0,0,0,0,1,0],e)},grayscale:function(t,e){return this.saturate(-(t=void 0===t?1:t),e=void 0===e?!1:e)},blackWhite:function(t){return this.multiply(n.BLACK_WHITE,t=void 0===t?!1:t)},contrast:function(t,e){var t=(t=void 0===t?0:t)+1,i=-.5*(t-1);return this.multiply([t,0,0,0,i,0,t,0,0,i,0,0,t,0,i,0,0,0,1,0],e=void 0===e?!1:e)},negative:function(t){return this.multiply(n.NEGATIVE,t=void 0===t?!1:t)},desaturateLuminance:function(t){return this.multiply(n.DESATURATE_LUMINANCE,t=void 0===t?!1:t)},sepia:function(t){return this.multiply(n.SEPIA,t=void 0===t?!1:t)},night:function(t,e){return this.multiply([-2*(t=void 0===t?.1:t),-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0],e=void 0===e?!1:e)},lsd:function(t){return this.multiply(n.LSD,t=void 0===t?!1:t)},brown:function(t){return this.multiply(n.BROWN,t=void 0===t?!1:t)},vintagePinhole:function(t){return this.multiply(n.VINTAGE,t=void 0===t?!1:t)},kodachrome:function(t){return this.multiply(n.KODACHROME,t=void 0===t?!1:t)},technicolor:function(t){return this.multiply(n.TECHNICOLOR,t=void 0===t?!1:t)},polaroid:function(t){return this.multiply(n.POLAROID,t=void 0===t?!1:t)},shiftToBGR:function(t){return this.multiply(n.SHIFT_BGR,t=void 0===t?!1:t)},multiply:function(t,e){(e=void 0===e?!1:e)||this.reset();var e=this._matrix,i=s;return i.set(e),e.set([i[0]*t[0]+i[1]*t[5]+i[2]*t[10]+i[3]*t[15],i[0]*t[1]+i[1]*t[6]+i[2]*t[11]+i[3]*t[16],i[0]*t[2]+i[1]*t[7]+i[2]*t[12]+i[3]*t[17],i[0]*t[3]+i[1]*t[8]+i[2]*t[13]+i[3]*t[18],i[0]*t[4]+i[1]*t[9]+i[2]*t[14]+i[3]*t[19]+i[4],i[5]*t[0]+i[6]*t[5]+i[7]*t[10]+i[8]*t[15],i[5]*t[1]+i[6]*t[6]+i[7]*t[11]+i[8]*t[16],i[5]*t[2]+i[6]*t[7]+i[7]*t[12]+i[8]*t[17],i[5]*t[3]+i[6]*t[8]+i[7]*t[13]+i[8]*t[18],i[5]*t[4]+i[6]*t[9]+i[7]*t[14]+i[8]*t[19]+i[9],i[10]*t[0]+i[11]*t[5]+i[12]*t[10]+i[13]*t[15],i[10]*t[1]+i[11]*t[6]+i[12]*t[11]+i[13]*t[16],i[10]*t[2]+i[11]*t[7]+i[12]*t[12]+i[13]*t[17],i[10]*t[3]+i[11]*t[8]+i[12]*t[13]+i[13]*t[18],i[10]*t[4]+i[11]*t[9]+i[12]*t[14]+i[13]*t[19]+i[14],i[15]*t[0]+i[16]*t[5]+i[17]*t[10]+i[18]*t[15],i[15]*t[1]+i[16]*t[6]+i[17]*t[11]+i[18]*t[16],i[15]*t[2]+i[16]*t[7]+i[17]*t[12]+i[18]*t[17],i[15]*t[3]+i[16]*t[8]+i[17]*t[13]+i[18]*t[18],i[15]*t[4]+i[16]*t[9]+i[17]*t[14]+i[18]*t[19]+i[19]]),this._dirty=!0,this}});n.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],n.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],n.DESATURATE_LUMINANCE=[.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],n.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],n.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],n.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],n.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],n.KODACHROME=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],n.TECHNICOLOR=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],n.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],n.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t.exports=n},51767:(t,e,i)=>{var s=i(83419),n=i(29747),i=new s({initialize:function(t,e,i){this._rgb=[0,0,0],this.onChangeCallback=n,this.dirty=!1,this.set(t,e,i)},set:function(t,e,i){return this._rgb=[t=void 0===t?0:t,e=void 0===e?0:e,i=void 0===i?0:i],this.onChange(),this},equals:function(t,e,i){var s=this._rgb;return s[0]===t&&s[1]===e&&s[2]===i},onChange:function(){this.dirty=!0;var t=this._rgb;this.onChangeCallback.call(this,t[0],t[1],t[2])},r:{get:function(){return this._rgb[0]},set:function(t){this._rgb[0]=t,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(t){this._rgb[1]=t,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(t){this._rgb[2]=t,this.onChange()}},destroy:function(){this.onChangeCallback=null}});t.exports=i},60461:t=>{t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},54312:(t,e,i)=>{var n=i(62235),r=i(35893),o=i(86327),a=i(88417);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),a(t,r(e)+i),o(t,n(e)+s),t}},46768:(t,e,i)=>{var n=i(62235),r=i(26541),o=i(86327),a=i(385);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),a(t,r(e)-i),o(t,n(e)+s),t}},35827:(t,e,i)=>{var n=i(62235),r=i(54380),o=i(86327),a=i(40136);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),a(t,r(e)+i),o(t,n(e)+s),t}},46871:(t,e,i)=>{var n=i(66786),r=i(35893),o=i(7702);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),n(t,r(e)+i,o(e)+s),t}},5198:(t,e,i)=>{var n=i(7702),r=i(26541),o=i(20786),a=i(385);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),a(t,r(e)-i),o(t,n(e)+s),t}},11879:(t,e,i)=>{var s=i(60461),r=[];r[s.BOTTOM_CENTER]=i(54312),r[s.BOTTOM_LEFT]=i(46768),r[s.BOTTOM_RIGHT]=i(35827),r[s.CENTER]=i(46871),r[s.LEFT_CENTER]=i(5198),r[s.RIGHT_CENTER]=i(80503),r[s.TOP_CENTER]=i(89698),r[s.TOP_LEFT]=i(922),r[s.TOP_RIGHT]=i(21373),r[s.LEFT_BOTTOM]=r[s.BOTTOM_LEFT],r[s.LEFT_TOP]=r[s.TOP_LEFT],r[s.RIGHT_BOTTOM]=r[s.BOTTOM_RIGHT],r[s.RIGHT_TOP]=r[s.TOP_RIGHT],t.exports=function(t,e,i,s,n){return r[i](t,e,s,n)}},80503:(t,e,i)=>{var n=i(7702),r=i(54380),o=i(20786),a=i(40136);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),a(t,r(e)+i),o(t,n(e)+s),t}},89698:(t,e,i)=>{var n=i(35893),r=i(17717),o=i(88417),a=i(66737);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),o(t,n(e)+i),a(t,r(e)-s),t}},922:(t,e,i)=>{var n=i(26541),r=i(17717),o=i(385),a=i(66737);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),o(t,n(e)-i),a(t,r(e)-s),t}},21373:(t,e,i)=>{var n=i(54380),r=i(17717),o=i(40136),a=i(66737);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),o(t,n(e)+i),a(t,r(e)-s),t}},91660:(t,e,i)=>{t.exports={BottomCenter:i(54312),BottomLeft:i(46768),BottomRight:i(35827),Center:i(46871),LeftCenter:i(5198),QuickSet:i(11879),RightCenter:i(80503),TopCenter:i(89698),TopLeft:i(922),TopRight:i(21373)}},71926:(t,e,i)=>{var s=i(60461),i=i(79291)(!1,{In:i(91660),To:i(16694)},s);t.exports=i},21578:(t,e,i)=>{var n=i(62235),r=i(35893),o=i(88417),a=i(66737);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),o(t,r(e)+i),a(t,n(e)+s),t}},10210:(t,e,i)=>{var n=i(62235),r=i(26541),o=i(385),a=i(66737);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),o(t,r(e)-i),a(t,n(e)+s),t}},82341:(t,e,i)=>{var n=i(62235),r=i(54380),o=i(40136),a=i(66737);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),o(t,r(e)+i),a(t,n(e)+s),t}},87958:(t,e,i)=>{var n=i(62235),r=i(26541),o=i(86327),a=i(40136);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),a(t,r(e)-i),o(t,n(e)+s),t}},40080:(t,e,i)=>{var n=i(7702),r=i(26541),o=i(20786),a=i(40136);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),a(t,r(e)-i),o(t,n(e)+s),t}},88466:(t,e,i)=>{var n=i(26541),r=i(17717),o=i(40136),a=i(66737);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),o(t,n(e)-i),a(t,r(e)-s),t}},38829:(t,e,i)=>{var s=i(60461),r=[];r[s.BOTTOM_CENTER]=i(21578),r[s.BOTTOM_LEFT]=i(10210),r[s.BOTTOM_RIGHT]=i(82341),r[s.LEFT_BOTTOM]=i(87958),r[s.LEFT_CENTER]=i(40080),r[s.LEFT_TOP]=i(88466),r[s.RIGHT_BOTTOM]=i(19211),r[s.RIGHT_CENTER]=i(34609),r[s.RIGHT_TOP]=i(48741),r[s.TOP_CENTER]=i(49440),r[s.TOP_LEFT]=i(81288),r[s.TOP_RIGHT]=i(61323),t.exports=function(t,e,i,s,n){return r[i](t,e,s,n)}},19211:(t,e,i)=>{var n=i(62235),r=i(54380),o=i(86327),a=i(385);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),a(t,r(e)+i),o(t,n(e)+s),t}},34609:(t,e,i)=>{var n=i(7702),r=i(54380),o=i(20786),a=i(385);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),a(t,r(e)+i),o(t,n(e)+s),t}},48741:(t,e,i)=>{var n=i(54380),r=i(17717),o=i(385),a=i(66737);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),o(t,n(e)+i),a(t,r(e)-s),t}},49440:(t,e,i)=>{var n=i(35893),r=i(17717),o=i(86327),a=i(88417);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),a(t,n(e)+i),o(t,r(e)-s),t}},81288:(t,e,i)=>{var n=i(26541),r=i(17717),o=i(86327),a=i(385);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),a(t,n(e)-i),o(t,r(e)-s),t}},61323:(t,e,i)=>{var n=i(54380),r=i(17717),o=i(86327),a=i(40136);t.exports=function(t,e,i,s){return void 0===i&&(i=0),void 0===s&&(s=0),a(t,n(e)+i),o(t,r(e)-s),t}},16694:(t,e,i)=>{t.exports={BottomCenter:i(21578),BottomLeft:i(10210),BottomRight:i(82341),LeftBottom:i(87958),LeftCenter:i(40080),LeftTop:i(88466),QuickSet:i(38829),RightBottom:i(19211),RightCenter:i(34609),RightTop:i(48741),TopCenter:i(49440),TopLeft:i(81288),TopRight:i(61323)}},66786:(t,e,i)=>{var s=i(88417),n=i(20786);t.exports=function(t,e,i){return s(t,e),n(t,i)}},62235:t=>{t.exports=function(t){return t.y+t.height-t.height*t.originY}},72873:(t,e,i)=>{var n=i(62235),r=i(26541),o=i(54380),a=i(17717),h=i(87841);t.exports=function(t,e){void 0===e&&(e=new h);var i=r(t),s=a(t);return e.x=i,e.y=s,e.width=o(t)-i,e.height=n(t)-s,e}},35893:t=>{t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},7702:t=>{t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},26541:t=>{t.exports=function(t){return t.x-t.width*t.originX}},87431:t=>{t.exports=function(t){return t.width*t.originX}},46928:t=>{t.exports=function(t){return t.height*t.originY}},54380:t=>{t.exports=function(t){return t.x+t.width-t.width*t.originX}},17717:t=>{t.exports=function(t){return t.y-t.height*t.originY}},86327:t=>{t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},88417:t=>{t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},20786:t=>{t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},385:t=>{t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},40136:t=>{t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},66737:t=>{t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},58724:(t,e,i)=>{t.exports={CenterOn:i(66786),GetBottom:i(62235),GetBounds:i(72873),GetCenterX:i(35893),GetCenterY:i(7702),GetLeft:i(26541),GetOffsetX:i(87431),GetOffsetY:i(46928),GetRight:i(54380),GetTop:i(17717),SetBottom:i(86327),SetCenterX:i(88417),SetCenterY:i(20786),SetLeft:i(385),SetRight:i(40136),SetTop:i(66737)}},20623:t=>{t.exports={setCrisp:function(e){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(t){e.style["image-rendering"]=t}),e.style.msInterpolationMode="nearest-neighbor",e},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},27919:(t,e,i)=>{var s,o,n,a=i(8054),h=i(68703),l=[],u=!1;t.exports={create2D:function(t,e,i){return s(t,e,i,a.CANVAS)},create:s=function(t,e,i,s,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=a.CANVAS),void 0===n&&(n=!1);var r=o(s),t=(null===r?(r={parent:t,canvas:document.createElement("canvas"),type:s},s===a.CANVAS&&l.push(r)):r.parent=t,r.canvas);return n&&(r.parent=t),t.width=e,t.height=i,u&&s===a.CANVAS&&h.disable(t.getContext("2d",{willReadFrequently:!1})),t},createWebGL:function(t,e,i){return s(t,e,i,a.WEBGL)},disableSmoothing:function(){u=!0},enableSmoothing:function(){u=!1},first:o=function(t){if((t=void 0===t?a.CANVAS:t)!==a.WEBGL)for(var e=0;e{var e,i="";t.exports={disable:function(t){return(i=""===i?e(t):i)&&(t[i]=!1),t},enable:function(t){return(i=""===i?e(t):i)&&(t[i]=!0),t},getPrefix:e=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i{t.exports=function(t,e){return t.style.msTouchAction=e=void 0===e?"none":e,t.style["ms-touch-action"]=e,t.style["touch-action"]=e,t}},91610:t=>{t.exports=function(e,i){return void 0===i&&(i="none"),["-webkit-","-khtml-","-moz-","-ms-",""].forEach(function(t){e.style[t+"user-select"]=i}),e.style["-webkit-touch-callout"]=i,e.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",e}},26253:(t,e,i)=>{t.exports={CanvasInterpolation:i(20623),CanvasPool:i(27919),Smoothing:i(68703),TouchAction:i(65208),UserSelect:i(91610)}},40987:(t,e,i)=>{var s=i(83419),r=i(37589),o=i(1e3),n=i(7537),a=i(87837),h=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,s)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(t,e,i,s,n){return void 0===s&&(s=255),void 0===n&&(n=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=s,this._locked=!1,this.update(n)},setGLTo:function(t,e,i,s){return void 0===s&&(s=1),this._locked=!0,this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=s,this._locked=!1,this.update(!0)},setFromRGB:function(t){return this._locked=!0,this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this._locked=!1,this.update(!0)},setFromHSV:function(t,e,i){return n(t,e,i,this)},update:function(t){var e,i,s,n;return void 0===t&&(t=!1),this._locked||(e=this.r,i=this.g,s=this.b,n=this.a,this._color=r(e,i,s),this._color32=o(e,i,s,n),this._rgba="rgba("+e+","+i+","+s+","+n/255+")",t&&a(e,i,s,this)),this},updateHSV:function(){var t=this.r,e=this.g,i=this.b;return a(t,e,i,this),this},clone:function(){return new h(this.r,this.g,this.b,this.a)},gray:function(t){return this.setTo(t,t,t)},random:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t)),s=Math.floor(t+Math.random()*(e-t)),e=Math.floor(t+Math.random()*(e-t));return this.setTo(i,s,e)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);e=Math.floor(t+Math.random()*(e-t));return this.setTo(e,e,e)},saturate:function(t){return this.s+=t/100,this},desaturate:function(t){return this.s-=t/100,this},lighten:function(t){return this.v+=t/100,this},darken:function(t){return this.v-=t/100,this},brighten:function(t){var e=this.r,i=this.g,s=this.b,e=Math.max(0,Math.min(255,e-Math.round(-t/100*255))),i=Math.max(0,Math.min(255,i-Math.round(-t/100*255))),s=Math.max(0,Math.min(255,s-Math.round(-t/100*255)));return this.setTo(e,i,s)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(t){this.gl[0]=Math.min(Math.abs(t),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(t){this.gl[1]=Math.min(Math.abs(t),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(t){this.gl[2]=Math.min(Math.abs(t),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(t){this.gl[3]=Math.min(Math.abs(t),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(t){t=Math.floor(Math.abs(t)),this.r=Math.min(t,255),this.gl[0]=t/255,this.update(!0)}},green:{get:function(){return this.g},set:function(t){t=Math.floor(Math.abs(t)),this.g=Math.min(t,255),this.gl[1]=t/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(t){t=Math.floor(Math.abs(t)),this.b=Math.min(t,255),this.gl[2]=t/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(t){t=Math.floor(Math.abs(t)),this.a=Math.min(t,255),this.gl[3]=t/255,this.update()}},h:{get:function(){return this._h},set:function(t){this._h=t,n(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,n(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,n(this._h,this._s,t,this)}}});t.exports=h},92728:(t,e,i)=>{var l=i(37589);t.exports=function(t){void 0===t&&(t=1024);for(var e=[],i=255,s=0,n=0,r=0;r<=255;r++)e.push({r:i,g:r,b:n,color:l(i,r,n)});for(r=s=255;0<=r;r--)e.push({r:r,g:s,b:n,color:l(r,s,n)});for(r=i=0;r<=255;r++,s--)e.push({r:i,g:s,b:r,color:l(i,s,r)});for(n=255,r=s=0;r<=255;r++,n--,i++)e.push({r:i,g:s,b:n,color:l(i,s,n)});if(1024===t)return e;var o=[],a=0,h=1024/t;for(r=0;r{t.exports=function(t){var e={r:t>>16&255,g:t>>8&255,b:255&t,a:255};return 16777215>>24),e}},62957:t=>{t.exports=function(t){t=t.toString(16);return 1===t.length?"0"+t:t}},37589:t=>{t.exports=function(t,e,i){return t<<16|e<<8|i}},1e3:t=>{t.exports=function(t,e,i,s){return s<<24|t<<16|e<<8|i}},62183:(t,e,i)=>{var o=i(40987),a=i(89528);t.exports=function(t,e,i){var s=i,n=i,r=i;return 0!==e&&(s=a(e=2*i-(i=i<.5?i*(1+e):i+e-i*e),i,t+1/3),n=a(e,i,t),r=a(e,i,t-1/3)),(new o).setGLTo(s,n,r,1)}},27939:(t,e,i)=>{var n=i(7537);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],s=0;s<=359;s++)i.push(n(s/359,t,e));return i}},7537:(t,e,i)=>{var o=i(37589);function a(t,e,i,s){t=(t+6*e)%6,e=Math.min(t,4-t,1);return Math.round(255*(s-s*i*Math.max(0,e)))}t.exports=function(t,e,i,s){var n=a(5,t,e=void 0===e?1:e,i=void 0===i?1:i),r=a(3,t,e,i),t=a(1,t,e,i);return s?s.setTo?s.setTo(n,r,t,s.alpha,!0):(s.r=n,s.g=r,s.b=t,s.color=o(n,r,t),s):{r:n,g:r,b:t,color:o(n,r,t)}}},70238:(t,e,i)=>{var n=i(40987);t.exports=function(t){var e,i,s=new n,t=(t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,i,s){return e+e+i+i+s+s}),/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t));return t&&(e=parseInt(t[1],16),i=parseInt(t[2],16),t=parseInt(t[3],16),s.setTo(e,i,t)),s}},89528:t=>{t.exports=function(t,e,i){return i<0&&(i+=1),1{var s=i(40987),n=i(90664);t.exports=function(t){t=n(t);return new s(t.r,t.g,t.b,t.a)}},90664:t=>{t.exports=function(t){return 16777215>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},13699:(t,e,i)=>{function o(t,e,i,s,n,r,o,a){return a=(a=void 0===a?0:a)/(o=void 0===o?100:o),{r:h(t,s,a),g:h(e,n,a),b:h(i,r,a)}}var h=i(28915);t.exports={RGBWithRGB:o,ColorWithRGB:function(t,e,i,s,n,r){return o(t.r,t.g,t.b,e,i,s,n=void 0===n?100:n,r=void 0===r?0:r)},ColorWithColor:function(t,e,i,s){return o(t.r,t.g,t.b,e.r,e.g,e.b,i=void 0===i?100:i,s=void 0===s?0:s)}}},68957:(t,e,i)=>{var s=i(40987);t.exports=function(t){return new s(t.r,t.g,t.b,t.a)}},87388:(t,e,i)=>{var r=i(40987);t.exports=function(t){var e,i,s,n=new r,t=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());return t&&(e=parseInt(t[1],10),i=parseInt(t[2],10),s=parseInt(t[3],10),t=void 0!==t[4]?parseFloat(t[4]):1,n.setTo(e,i,s,255*t)),n}},87837:t=>{t.exports=function(t,e,i,s){void 0===s&&(s={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var n=Math.min(t,e,i),r=Math.max(t,e,i),o=r-n,a=0,h=0===r?0:o/r,l=r;return r!==n&&(r===t?a=(e-i)/o+(e{var r=i(62957);t.exports=function(t,e,i,s,n){return void 0===s&&(s=255),"#"===(n=void 0===n?"#":n)?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1,7):"0x"+r(s)+r(t)+r(e)+r(i)}},85386:(t,e,i)=>{var s=i(30976),n=i(40987);t.exports=function(t,e){return new n(s(t=void 0===t?0:t,e=void 0===e?255:e),s(t,e),s(t,e))}},80333:(t,e,i)=>{var s=i(70238),n=i(30100),r=i(68957),o=i(87388);t.exports=function(t){switch(typeof t){case"string":return("rgb"===t.substr(0,3).toLowerCase()?o:s)(t);case"number":return n(t);case"object":return r(t)}}},3956:(t,e,i)=>{var s=i(40987);s.ColorSpectrum=i(92728),s.ColorToRGBA=i(91588),s.ComponentToHex=i(62957),s.GetColor=i(37589),s.GetColor32=i(1e3),s.HexStringToColor=i(70238),s.HSLToColor=i(62183),s.HSVColorWheel=i(27939),s.HSVToRGB=i(7537),s.HueToComponent=i(89528),s.IntegerToColor=i(30100),s.IntegerToRGB=i(90664),s.Interpolate=i(13699),s.ObjectToColor=i(68957),s.RandomRGB=i(85386),s.RGBStringToColor=i(87388),s.RGBToHSV=i(87837),s.RGBToString=i(75723),s.ValueToColor=i(80333),t.exports=s},27460:(t,e,i)=>{t.exports={Align:i(71926),BaseShader:i(73894),Bounds:i(58724),Canvas:i(26253),Color:i(3956),ColorMatrix:i(89422),Masks:i(69781),RGB:i(51767)}},6858:(t,e,i)=>{var s=i(83419),i=i(39429),r=new s({initialize:function(t,e,i,s,n,r){e=e||t.sys.make.image({x:i,y:s,key:n,frame:r,add:!1}),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e,i)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});i.register("bitmapMask",function(t,e,i,s,n){return new r(this.scene,t,e,i,s,n)}),t.exports=r},80661:(t,e,i)=>{i=new(i(83419))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return this.invertAlpha=t=void 0===t?!0:t,this},preRenderWebGL:function(t,e,i){var s=t.gl;t.flush(),0===t.maskStack.length&&(s.enable(s.STENCIL_TEST),s.clear(s.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var s=t.gl,n=this.geometryMask,r=t.maskCount;s.colorMask(!1,!1,!1,!1),i?(s.stencilFunc(s.EQUAL,r,255),s.stencilOp(s.KEEP,s.KEEP,s.INCR),r++):(s.stencilFunc(s.EQUAL,r+1,255),s.stencilOp(s.KEEP,s.KEEP,s.DECR)),this.level=r,n.renderWebGL(t,n,e),t.flush(),s.colorMask(!0,!0,!0,!0),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),this.invertAlpha?s.stencilFunc(s.NOTEQUAL,r,255):s.stencilFunc(s.EQUAL,r,255)},postRenderWebGL:function(t){var e=t.gl,i=(t.maskStack.pop(),t.maskCount--,t.flush(),t.currentMask);0===t.maskStack.length?(i.mask=null,e.disable(e.STENCIL_TEST)):((e=t.maskStack[t.maskStack.length-1]).mask.applyStencil(t,e.camera,!1),t.currentCameraMask.mask!==e.mask?(i.mask=e.mask,i.camera=e.camera):i.mask=null)},preRenderCanvas:function(t,e,i){var s=this.geometryMask;t.currentContext.save(),s.renderCanvas(t,s,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=i},69781:(t,e,i)=>{t.exports={BitmapMask:i(6858),GeometryMask:i(80661)}},73894:(t,e,i)=>{i=new(i(83419))({initialize:function(t,e,i,s){e&&""!==e||(e=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join("\n")),i&&""!==i||(i=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join("\n")),void 0===s&&(s=null),this.key=t,this.fragmentSrc=e,this.vertexSrc=i,this.uniforms=s}});t.exports=i},40366:t=>{t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement||null===e)return t;return(i=i||document.body).appendChild(t),t}},83719:(t,e,i)=>{var s=i(40366);t.exports=function(t){var e,i=t.config;i.parent&&i.domCreateContainer&&((e=document.createElement("div")).style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+i.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=e,s(e,i.parent))}},57264:(t,e,i)=>{var s=i(25892);t.exports=function(t){var e;"complete"!==document.readyState&&"interactive"!==document.readyState?(e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()},document.body?s.cordova?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)):t()}},57811:t=>{t.exports=function(t){var e,i;return t?(t=Math.abs(window.orientation),e={w:0,h:0},(i=document.createElement("div")).setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(i),e.w=90===t?i.offsetHeight:window.innerWidth,e.h=90===t?window.innerWidth:i.offsetHeight,document.documentElement.removeChild(i),i=null,90!==Math.abs(window.orientation)?e.h:e.w):window.innerHeight}},45818:(t,e,i)=>{var s=i(13560);t.exports=function(t,e){var i=window.screen,i=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);return i&&"string"==typeof i.type?i.type:"string"==typeof i?i:"number"==typeof window.orientation?0===window.orientation||180===window.orientation?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE:window.matchMedia?window.matchMedia("(orientation: portrait)").matches?s.ORIENTATION.PORTRAIT:window.matchMedia("(orientation: landscape)").matches?s.ORIENTATION.LANDSCAPE:void 0:t{t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e=e||document.body}},56836:t=>{t.exports=function(t){var e="";try{window.DOMParser?e=(new DOMParser).parseFromString(t,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},35846:t=>{t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},43092:(t,e,i)=>{var s=i(83419),n=i(29747),i=new s({initialize:function(){this.isRunning=!1,this.callback=n,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var i=this;this.step=function t(e){i.callback(e),i.isRunning&&(i.timeOutID=window.requestAnimationFrame(t))},this.stepTimeout=function t(){i.isRunning&&(i.timeOutID=window.setTimeout(t,i.delay)),i.callback(window.performance.now())}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.delay=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=n}});t.exports=i},84902:(t,e,i)=>{i={AddToDOM:i(40366),DOMContentLoaded:i(57264),GetInnerHeight:i(57811),GetScreenOrientation:i(45818),GetTarget:i(74403),ParseXML:i(56836),RemoveFromDOM:i(35846),RequestAnimationFrame:i(43092)};t.exports=i},47565:(t,e,i)=>{var s=i(83419),n=i(50792),i=i(37277),s=new s({Extends:n,initialize:function(){n.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});i.register("EventEmitter",s,"events"),t.exports=s},93055:(t,e,i)=>{t.exports={EventEmitter:i(47565)}},20122:(t,e,i)=>{var s=i(83419),n=i(72898),r=i(14811),i=new s({Extends:n,initialize:function(t,e){void 0===e&&(e=1),n.call(this,r.BARREL,t),this.amount=e}});t.exports=i},32251:(t,e,i)=>{var s=i(83419),a=i(72898),h=i(14811),i=new s({Extends:a,initialize:function(t,e,i,s,n,r,o){void 0===i&&(i=1),void 0===s&&(s=1),void 0===n&&(n=1),void 0===r&&(r=1),void 0===o&&(o=4),a.call(this,h.BLOOM,t),this.steps=o,this.offsetX=i,this.offsetY=s,this.blurStrength=n,this.strength=r,this.glcolor=[1,1,1],null!=e&&(this.color=e)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=i},9047:(t,e,i)=>{var s=i(83419),a=i(72898),h=i(14811),i=new s({Extends:a,initialize:function(t,e,i,s,n,r,o){void 0===e&&(e=0),void 0===i&&(i=2),void 0===s&&(s=2),void 0===n&&(n=1),void 0===o&&(o=4),a.call(this,h.BLUR,t),this.quality=e,this.x=i,this.y=s,this.steps=o,this.strength=n,this.glcolor=[1,1,1],null!=r&&(this.color=r)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=i},27885:(t,e,i)=>{var s=i(83419),h=i(72898),l=i(14811),i=new s({Extends:h,initialize:function(t,e,i,s,n,r,o,a){void 0===e&&(e=.5),void 0===i&&(i=1),void 0===s&&(s=.2),void 0===n&&(n=!1),void 0===r&&(r=1),void 0===o&&(o=1),void 0===a&&(a=1),h.call(this,l.BOKEH,t),this.radius=e,this.amount=i,this.contrast=s,this.isTiltShift=n,this.strength=a,this.blurX=r,this.blurY=o}});t.exports=i},12578:(t,e,i)=>{var s=i(83419),o=i(72898),a=i(14811),i=new s({Extends:o,initialize:function(t,e,i,s,n,r){void 0===e&&(e=8),void 0===n&&(n=1),void 0===r&&(r=.005),o.call(this,a.CIRCLE,t),this.scale=n,this.feather=r,this.thickness=e,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],null!=i&&(this.color=i),null!=s&&(this.backgroundColor=s)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}},backgroundColor:{get:function(){var t=this.glcolor2;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor2;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}},backgroundAlpha:{get:function(){return this.glcolor2[3]},set:function(t){this.glcolor2[3]=t}}});t.exports=i},15802:(t,e,i)=>{var s=i(83419),n=i(89422),r=i(14811),i=new s({Extends:n,initialize:function(t){n.call(this),this.type=r.COLOR_MATRIX,this.gameObject=t,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});t.exports=i},72898:(t,e,i)=>{i=new(i(83419))({initialize:function(t,e){this.type=t,this.gameObject=e,this.active=!0},setActive:function(t){return this.active=t,this},destroy:function(){this.gameObject=null,this.active=!1}});t.exports=i},44553:(t,e,i)=>{var s=i(83419),n=i(72898),r=i(14811),i=new s({Extends:n,initialize:function(t,e,i,s){void 0===e&&(e="__WHITE"),void 0===i&&(i=.005),void 0===s&&(s=.005),n.call(this,r.DISPLACEMENT,t),this.x=i,this.y=s,this.glTexture,this.setTexture(e)},setTexture:function(t){t=this.gameObject.scene.sys.textures.getFrame(t);return t&&(this.glTexture=t.glTexture),this}});t.exports=i},68531:(t,e,i)=>{var s=i(83419),r=i(72898),o=i(14811),i=new s({Extends:r,initialize:function(t,e,i,s,n){void 0===i&&(i=4),void 0===s&&(s=0),void 0===n&&(n=!1),r.call(this,o.GLOW,t),this.outerStrength=i,this.innerStrength=s,this.knockout=n,this.glcolor=[1,1,1,1],void 0!==e&&(this.color=e)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=i},37102:(t,e,i)=>{var s=i(83419),l=i(72898),u=i(14811),i=new s({Extends:l,initialize:function(t,e,i,s,n,r,o,a,h){void 0===s&&(s=.2),void 0===n&&(n=0),void 0===r&&(r=0),void 0===o&&(o=0),void 0===a&&(a=1),void 0===h&&(h=0),l.call(this,u.GRADIENT,t),this.alpha=s,this.size=h,this.fromX=n,this.fromY=r,this.toX=o,this.toY=a,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],null!=e&&(this.color1=e),null!=i&&(this.color2=i)},color1:{get:function(){var t=this.glcolor1;return(t[0]<<16)+(t[1]<<8)+(0|t[2])},set:function(t){var e=this.glcolor1;e[0]=t>>16&255,e[1]=t>>8&255,e[2]=255&t}},color2:{get:function(){var t=this.glcolor2;return(t[0]<<16)+(t[1]<<8)+(0|t[2])},set:function(t){var e=this.glcolor2;e[0]=t>>16&255,e[1]=t>>8&255,e[2]=255&t}}});t.exports=i},86886:(t,e,i)=>{var s=i(83419),n=i(72898),r=i(14811),i=new s({Extends:n,initialize:function(t,e){void 0===e&&(e=1),n.call(this,r.PIXELATE,t),this.amount=e}});t.exports=i},92322:(t,e,i)=>{var s=i(83419),h=i(72898),l=i(14811),i=new s({Extends:h,initialize:function(t,e,i,s,n,r,o,a){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=.1),void 0===n&&(n=1),void 0===o&&(o=6),void 0===a&&(a=1),h.call(this,l.SHADOW,t),this.x=e,this.y=i,this.decay=s,this.power=n,this.glcolor=[0,0,0,1],this.samples=o,this.intensity=a,void 0!==r&&(this.color=r)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=i},39563:(t,e,i)=>{var s=i(83419),r=i(72898),o=i(14811),i=new s({Extends:r,initialize:function(t,e,i,s,n){void 0===e&&(e=.5),void 0===i&&(i=.5),void 0===s&&(s=3),void 0===n&&(n=!1),r.call(this,o.SHINE,t),this.speed=e,this.lineWidth=i,this.gradient=s,this.reveal=n}});t.exports=i},56448:(t,e,i)=>{var s=i(83419),r=i(72898),o=i(14811),i=new s({Extends:r,initialize:function(t,e,i,s,n){void 0===e&&(e=.5),void 0===i&&(i=.5),void 0===s&&(s=.5),void 0===n&&(n=.5),r.call(this,o.VIGNETTE,t),this.x=e,this.y=i,this.radius=s,this.strength=n}});t.exports=i},38433:(t,e,i)=>{var s=i(83419),r=i(72898),o=i(14811),i=new s({Extends:r,initialize:function(t,e,i,s,n){void 0===e&&(e=.1),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=!1),r.call(this,o.WIPE,t),this.progress=0,this.wipeWidth=e,this.direction=i,this.axis=s,this.reveal=n}});t.exports=i},14811:t=>{t.exports={GLOW:4,SHADOW:5,PIXELATE:6,VIGNETTE:7,SHINE:8,BLUR:9,GRADIENT:12,BLOOM:13,COLOR_MATRIX:14,CIRCLE:15,BARREL:16,DISPLACEMENT:17,WIPE:18,BOKEH:19}},66064:(t,e,i)=>{var s=i(79291),n=i(14811),s=s(!1,{Barrel:i(20122),Controller:i(72898),Bloom:i(32251),Blur:i(9047),Bokeh:i(27885),Circle:i(12578),ColorMatrix:i(15802),Displacement:i(44553),Glow:i(68531),Gradient:i(37102),Pixelate:i(86886),Shadow:i(92322),Shine:i(39563),Vignette:i(56448),Wipe:i(38433)},n);t.exports=s},25305:(t,e,i)=>{var r=i(10312),o=i(23568);t.exports=function(t,e,i){e.x=o(i,"x",0),e.y=o(i,"y",0),e.depth=o(i,"depth",0),e.flipX=o(i,"flipX",!1),e.flipY=o(i,"flipY",!1);var s,n=o(i,"scale",null),n=("number"==typeof n?e.setScale(n):null!==n&&(e.scaleX=o(n,"x",1),e.scaleY=o(n,"y",1)),o(i,"scrollFactor",null)),n=("number"==typeof n?e.setScrollFactor(n):null!==n&&(e.scrollFactorX=o(n,"x",1),e.scrollFactorY=o(n,"y",1)),e.rotation=o(i,"rotation",0),o(i,"angle",null)),n=(null!==n&&(e.angle=n),e.alpha=o(i,"alpha",1),o(i,"origin",null));return"number"==typeof n?e.setOrigin(n):null!==n&&(s=o(n,"x",.5),n=o(n,"y",.5),e.setOrigin(s,n)),e.blendMode=o(i,"blendMode",r.NORMAL),e.visible=o(i,"visible",!0),o(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},13059:(t,e,i)=>{var u=i(23568);t.exports=function(t,e){var i,s,n,r,o,a,h,l,e=u(e,"anims",null);return null!==e&&("string"==typeof e?t.anims.play(e):"object"==typeof e&&(i=t.anims,l=u(e,"key",void 0))&&(s=u(e,"startFrame",void 0),n=u(e,"delay",0),r=u(e,"repeat",0),o=u(e,"repeatDelay",0),a=u(e,"yoyo",!1),h=u(e,"play",!1),e=u(e,"delayedPlay",0),l={key:l,delay:n,repeat:r,repeatDelay:o,yoyo:a,startFrame:s},h?i.play(l):0{var s=i(83419),n=i(73162),r=i(37277),o=i(51708),a=i(44594),h=i(19186),i=new s({Extends:n,initialize:function(t){n.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(a.BOOT,this.boot,this),this.events.on(a.START,this.start,this)},boot:function(){this.events.once(a.DESTROY,this.destroy,this)},addChildCallback:function(t){t.displayList&&t.displayList!==this&&t.removeFromDisplayList(),t.parentContainer&&t.parentContainer.remove(t),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(o.ADDED_TO_SCENE,t,this.scene),this.events.emit(a.ADDED_TO_SCENE,t,this.scene))},removeChildCallback:function(t){this.queueDepthSort(),t.displayList=null,t.emit(o.REMOVED_FROM_SCENE,t,this.scene),this.events.emit(a.REMOVED_FROM_SCENE,t,this.scene)},start:function(){this.events.once(a.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(h(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},shutdown:function(){for(var t=this.list;t.length;)t[0].destroy(!0);this.events.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});r.register("DisplayList",i,"displayList"),t.exports=i},95643:(t,e,i)=>{var s=i(83419),n=i(53774),r=i(45893),o=i(50792),a=i(51708),h=i(44594),l=new s({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(a.ADDED_TO_SCENE,this.addedToScene,this),this.on(a.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(t,e){return this.data||(this.data=new r(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new r(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new r(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new r(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(t){return this.scene.sys.input.disable(this,t=void 0===t?!1:t),this},removeInteractive:function(t){return void 0===t&&(t=!1),this.scene.sys.input.clear(this),t&&this.scene.sys.input.resetCursor(),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return n(this)},willRender:function(t){return!(this.displayList&&this.displayList.active&&!this.displayList.willRender(t)||l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),(t=e).parentContainer);)e=e.parentContainer;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||((this.displayList=t).add(this,!0),t.queueDepthSort(),this.emit(a.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t&&t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(a.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},getDisplayList:function(){var t=null;return this.parentContainer?t=this.parentContainer.list:this.displayList&&(t=this.displayList.list),t},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.preFX&&(this.preFX.destroy(),this.preFX=void 0),this.postFX&&(this.postFX.destroy(),this.postFX=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},44603:(t,e,i)=>{var s=i(83419),n=i(37277),r=i(44594),o=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},n.register("GameObjectCreator",o,"make"),t.exports=o},39429:(t,e,i)=>{var s=i(83419),n=i(37277),r=i(44594),o=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},n.register("GameObjectFactory",o,"add"),t.exports=o},91296:(t,e,i)=>{var i=i(61340),o=new i,a=new i,h=new i,l={camera:o,sprite:a,calc:h};t.exports=function(t,e,i){var s=o,n=a,r=h;return n.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),n.e=t.x,n.f=t.y):(n.e-=e.scrollX*t.scrollFactorX,n.f-=e.scrollY*t.scrollFactorY),s.multiply(n,r),l}},45027:(t,e,i)=>{var s=i(83419),n=i(25774),r=i(37277),o=i(44594),i=new s({Extends:n,initialize:function(t){n.call(this),this.checkQueue=!0,this.scene=t,this.systems=t.sys,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.start,this)},boot:function(){this.systems.events.once(o.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(o.PRE_UPDATE,this.update,this),t.on(o.UPDATE,this.sceneUpdate,this),t.once(o.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(t,e){for(var i=this._active,s=i.length,n=0;n{t.exports=function(t,e,i,s,n,r,o,a,h,l,u,c,d,p,f){var n=i.x-e.displayOriginX+n,r=i.y-e.displayOriginY+r,g=n+i.w,i=r+i.h,m=o.a,v=o.b,y=o.c,x=o.d,T=o.e,o=o.f,b=n*m+r*y+T,w=n*v+r*x+o,S=n*m+i*y+T,n=n*v+i*x+o,C=g*m+i*y+T,i=g*v+i*x+o,m=g*m+r*y+T,y=g*v+r*x+o;a&&(b=Math.round(b),w=Math.round(w),S=Math.round(S),n=Math.round(n),C=Math.round(C),i=Math.round(i),m=Math.round(m),y=Math.round(y)),t.batchQuad(e,b,w,S,n,C,i,m,y,s.u0,s.v0,s.u1,s.v1,h,l,u,c,d,p,f)}},53048:t=>{t.exports=function(t,B,I,e){if(void 0===I&&(I=!1),void 0===e)return{local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0};var N,G,i,U=(A=t.text).length,s=t.maxWidth,X=t.wordWrapCharCode,n=Number.MAX_VALUE,r=Number.MAX_VALUE,o=0,a=0,Y=t.fontData.chars,h=t.fontData.lineHeight,z=t.letterSpacing,W=t.lineSpacing,l=0,u=0,c=0,H=t._align,d=0,p=0,f=t.fontSize/t.fontData.size,g=f*t.scaleX,m=f*t.scaleY,V=null,j=0,v=[],y=Number.MAX_VALUE,x=0,Z=0,T=0,b=[],q=[],w=null;if(0{for(var i=0,s=0;s{var l=i(21859);t.exports=function(t,e,i,s,n,r,o){var a=t.sys.textures.get(i),h=a.get(s),n=t.sys.cache.xml.get(n);return!(!h||!n||(n=l(n,h,r,o,a),t.sys.cache.bitmapFont.add(e,{data:n,texture:i,frame:s,fromAtlas:!0}),0))}},6925:(t,e,i)=>{var S=i(35154);t.exports=function(t,e){var i=e.width,s=e.height,n=Math.floor(i/2),r=Math.floor(s/2),o=S(e,"chars","");if(""!==o){var a=S(e,"image",""),t=t.sys.textures.getFrame(a),h=t.cutX,l=t.cutY,u=t.source.width,c=t.source.height,d=S(e,"offset.x",0),t=S(e,"offset.y",0),p=S(e,"spacing.x",0),f=S(e,"spacing.y",0),g=S(e,"lineSpacing",0),m=S(e,"charsPerRow",null);null===m&&(m=u/i)>o.length&&(m=o.length);for(var v=d,y=t,x={retroFont:!0,font:a,size:i,lineHeight:s+g,chars:{}},T=0,b=0;b{function D(t,e){return parseInt(t.getAttribute(e),10)}t.exports=function(t,e,i,s,n){void 0===i&&(i=0),void 0===s&&(s=0);var r,o,a=e.cutX,h=e.cutY,l=e.source.width,u=e.source.height,c=e.sourceIndex,d={},p=t.getElementsByTagName("info")[0],f=t.getElementsByTagName("common")[0],g=(d.font=p.getAttribute("face"),d.size=D(p,"size"),d.lineHeight=D(f,"lineHeight")+s,d.chars={},t.getElementsByTagName("char")),m=void 0!==e&&e.trimmed;m&&(r=e.height,o=e.width);for(var v=0;v{var s=i(87662),i=i(79291)(!1,{Parse:i(6925)},s);t.exports=i},87662:t=>{t.exports={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},2638:(t,e,i)=>{var a=i(22186),s=i(83419),i=i(12310),s=new s({Extends:a,Mixins:[i],initialize:function(t,e,i,s,n,r,o){a.call(this,t,e,i,s,n,r,o),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}});t.exports=s},86741:(t,e,i)=>{var N=i(20926);t.exports=function(t,e,i,s){var n=e._text,r=n.length,o=t.currentContext;if(0!==r&&N(t,o,e,i,s)){i.addToRenderList(e);var a,h,t=e.fromAtlas?e.frame:e.texture.frames.__BASE,l=e.displayCallback,u=e.callbackData,c=e.fontData.chars,d=e.fontData.lineHeight,p=e._letterSpacing,f=0,g=0,m=0,v=0,y=0,x=0,T=0,b=0,w=null,S=0,C=e.frame.source.image,E=t.cutX,_=t.cutY,A=0,P=0,B=e._fontSize/e.fontData.size,M=e._align,R=0,L=0,O=(e.getTextBounds(!1),e._bounds.lines),I=(1===M?L=(O.longest-O.lengths[0])/2:2===M&&(L=O.longest-O.lengths[0]),o.translate(-e.displayOriginX,-e.displayOriginY),i.roundPixels);0{var r=i(2638),o=i(25305),s=i(44603),a=i(23568);s.register("dynamicBitmapText",function(t,e){var i=a(t=void 0===t?{}:t,"font",""),s=a(t,"text",""),n=a(t,"size",!1),i=new r(this.scene,0,0,i,s,n);return void 0!==e&&(t.add=e),o(this.scene,i,t),i})},72566:(t,e,i)=>{var r=i(2638);i(39429).register("dynamicBitmapText",function(t,e,i,s,n){return this.displayList.add(new r(this.scene,t,e,i,s,n))})},12310:(t,e,i)=>{i(29747);var s=i(73482),i=i(86741);t.exports={renderWebGL:s,renderCanvas:i}},73482:(t,e,i)=>{var Q=i(91296),s=i(61340),$=i(70554),tt=new s;t.exports=function(t,e,i,s){var n=e.text,B=n.length;if(0!==B){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline,e),s=Q(e,i,s),o=(t.pipelines.preBatch(e),s.sprite),a=s.calc,I=tt,s=0{var s=i(83419),p=i(45319),n=i(31401),a=i(95643),h=i(53048),r=i(61327),o=i(21859),l=i(87841),i=i(18658),u=new s({Extends:a,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.PostPipeline,n.ScrollFactor,n.Texture,n.Tint,n.Transform,n.Visible,i],initialize:function(t,e,i,s,n,r,o){void 0===n&&(n=""),void 0===o&&(o=0),a.call(this,t,"BitmapText"),this.font=s;t=this.scene.sys.cache.bitmapFont.get(s);if(!t)throw new Error("Invalid BitmapText key: "+s);this.fontData=t.data,this._text="",this._fontSize=r||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=o,this._bounds=h(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=t.fromAtlas,this.setTexture(t.texture,t.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(),this.setText(n)},setLeftAlign:function(){return this._align=u.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=u.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=u.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(t){return this._fontSize=t,this._dirty=!0,this},setLetterSpacing:function(t){return this._letterSpacing=t=void 0===t?0:t,this._dirty=!0,this},setLineSpacing:function(t){return this.lineSpacing=t=void 0===t?0:t,this},setText:function(t){return t||0===t||(t=""),(t=Array.isArray(t)?t.join("\n"):t)!==this.text&&(this._text=t.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(t,e,i,s){return void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=.5),this.dropShadowX=t=void 0===t?0:t,this.dropShadowY=e,this.dropShadowColor=i,this.dropShadowAlpha=s,this},setCharacterTint:function(t,e,i,s,n,r,o){void 0===i&&(i=!1),void 0===s&&(s=-1),void 0===n&&(o=r=n=s);var a=this.text.length;-1===(e=void 0===e?1:e)&&(e=a),t=p(t=(t=void 0===t?0:t)<0?a+t:t,0,a-1);for(var h=p(t+e,t,a),l=this.charColors,u=t;u{var k=i(20926);t.exports=function(t,e,i,s){var n=e._text,r=n.length,o=t.currentContext;if(0!==r&&k(t,o,e,i,s)){i.addToRenderList(e);var a,h,t=e.fromAtlas?e.frame:e.texture.frames.__BASE,l=e.fontData.chars,u=e.fontData.lineHeight,c=e._letterSpacing,d=e._lineSpacing,p=0,f=0,g=0,m=0,v=0,y=0,x=0,T=0,b=null,w=0,S=t.source.image,C=t.cutX,E=t.cutY,_=e._fontSize/e.fontData.size,A=e._align,P=0,M=0,s=e.getTextBounds(!1),R=(0{var o=i(22186),a=i(25305),s=i(44603),h=i(23568),l=i(35154);s.register("bitmapText",function(t,e){var i=l(t=void 0===t?{}:t,"font",""),s=h(t,"text",""),n=h(t,"size",!1),r=l(t,"align",0),i=new o(this.scene,0,0,i,s,n,r);return void 0!==e&&(t.add=e),a(this.scene,i,t),i})},34914:(t,e,i)=>{var o=i(22186);i(39429).register("bitmapText",function(t,e,i,s,n,r){return this.displayList.add(new o(this.scene,t,e,i,s,n,r))})},18658:(t,e,i)=>{i(29747);var s=i(33590),i=i(37289);t.exports={renderWebGL:s,renderCanvas:i}},33590:(t,e,i)=>{var O=i(3217),D=i(91296),k=i(70554);t.exports=function(t,e,i,s){if(0!==e._text.length){i.addToRenderList(e);var n=t.pipelines.set(e.pipeline,e),r=D(e,i,s).calc;t.pipelines.preBatch(e);var o,a=i.roundPixels,h=i.alpha,l=e.charColors,u=e.tintFill,c=k.getTintAppendFloatAlpha,d=c(e.tintTopLeft,h*e._alphaTL),p=c(e.tintTopRight,h*e._alphaTR),f=c(e.tintBottomLeft,h*e._alphaBL),g=c(e.tintBottomRight,h*e._alphaBR),m=e.frame.glTexture,v=n.setGameObject(e),y=e.getTextBounds(!1).characters,x=e.dropShadowX,T=e.dropShadowY;if(0!==x||0!==T)for(var s=e.dropShadowColor,i=e.dropShadowAlpha,b=c(s,h*i*e._alphaTL),w=c(s,h*i*e._alphaTR),S=c(s,h*i*e._alphaBL),C=c(s,h*i*e._alphaBR),E=0;E{var s=i(48011),r=i(46590),n=i(83419),o=i(31401),a=i(4327),h=i(95643),l=i(73162),i=new n({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.PostPipeline,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,s],initialize:function(t,e,i,s,n){h.call(this,t,"Blitter"),this.setTexture(s,n),this.setPosition(e,i),this.initPipeline(),this.initPostPipeline(),this.children=new l,this.renderList=[],this.dirty=!1},create:function(t,e,i,s,n){void 0===s&&(s=!0),void 0===n&&(n=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));t=new r(this,t,e,i,s);return this.children.addAt(t,n,!1),this.dirty=!0,t},createFromCallback:function(t,e,i,s){for(var n=this.createMultiple(e,i,s),r=0;r{t.exports=function(t,e,i,s){var n=e.getRenderList();if(0!==n.length){var r=t.currentContext,o=i.alpha*e.alpha;if(0!=o){i.addToRenderList(e),r.globalCompositeOperation=t.blendModes[e.blendMode],r.imageSmoothingEnabled=!e.frame.source.scaleMode;var a=e.x-i.scrollX*e.scrollFactorX,h=e.y-i.scrollY*e.scrollFactorY;r.save(),s&&s.copyToContext(r);for(var l=i.roundPixels,u=0;u{var n=i(6107),r=i(25305),s=i(44603),o=i(23568);s.register("blitter",function(t,e){var i=o(t=void 0===t?{}:t,"key",null),s=o(t,"frame",null),i=new n(this.scene,0,0,i,s);return void 0!==e&&(t.add=e),r(this.scene,i,t),i})},12709:(t,e,i)=>{var n=i(6107);i(39429).register("blitter",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},48011:(t,e,i)=>{i(29747);var s=i(99485),i=i(72396);t.exports={renderWebGL:s,renderCanvas:i}},99485:(t,e,i)=>{var s=i(61340),S=i(70554),C=new s;t.exports=function(t,e,i,s){var n=e.getRenderList(),r=i.alpha*e.alpha;if(0!==n.length&&0!=r){i.addToRenderList(e);var o=t.pipelines.set(this.pipeline,e),a=i.scrollX*e.scrollFactorX,h=i.scrollY*e.scrollFactorY,l=C.copyFrom(i.matrix),u=(s&&(l.multiplyWithOffset(s,-a,-h),h=a=0),e.x-a),c=e.y-h,d=-1,p=i.roundPixels;t.pipelines.preBatch(e);for(var f=0;f{var s=i(83419),n=i(4327),i=new s({initialize:function(t,e,i,s,n){this.parent=t,this.x=e,this.y=i,this.frame=s,this.data={},this.tint=16777215,this._visible=n,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(t){return void 0===t?this.frame=this.parent.frame:t instanceof n&&t.texture===this.parent.texture?this.frame=t:this.frame=this.parent.texture.get(t),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(t,e,i){return this.x=t,this.y=e,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,i&&this.setFrame(i),this},setPosition:function(t,e){return this.x=t,this.y=e,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},setVisible:function(t){return this.visible=t,this},setAlpha:function(t){return this.alpha=t,this},setTint:function(t){return this.tint=t,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(t){this.parent.dirty|=this._visible!==t,this._visible=t}},alpha:{get:function(){return this._alpha},set:function(t){this.parent.dirty|=0{var n=i(45319);t.exports={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,s){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=n(t,0,1),this._alphaTR=n(e,0,1),this._alphaBL=n(i,0,1),this._alphaBR=n(s,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){t=n(t,0,1);this._alpha=t,this._alphaTL=t,this._alphaTR=t,this._alphaBL=t,0===(this._alphaBR=t)?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){t=n(t,0,1);0!==(this._alphaTL=t)&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){t=n(t,0,1);0!==(this._alphaTR=t)&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){t=n(t,0,1);0!==(this._alphaBL=t)&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){t=n(t,0,1);0!==(this._alphaBR=t)&&(this.renderFlags|=2)}}}},88509:(t,e,i)=>{var s=i(45319);t.exports={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return this.alpha=t=void 0===t?1:t,this},alpha:{get:function(){return this._alpha},set:function(t){t=s(t,0,1);0===(this._alpha=t)?this.renderFlags&=-3:this.renderFlags|=2}}}},90065:(t,e,i)=>{var s=i(10312),i={_blendMode:s.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=s[t]),-1<=(t|=0)&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=i},94215:t=>{t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},61683:t=>{t.exports={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){return void 0===t?this.isCropped=!1:this.frame&&("number"==typeof t?this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY):this.frame.setCropUVs(this._crop,t.x,t.y,t.width,t.height,this.flipX,this.flipY),this.isCropped=!0),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}}},89272:(t,e,i)=>{var s=i(37105);t.exports={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return this.depth=t=void 0===t?0:t,this},setToTop:function(){var t=this.getDisplayList();return t&&s.BringToTop(t,this),this},setToBack:function(){var t=this.getDisplayList();return t&&s.SendToBack(t,this),this},setAbove:function(t){var e=this.getDisplayList();return e&&t&&s.MoveAbove(e,this,t),this},setBelow:function(t){var e=this.getDisplayList();return e&&t&&s.MoveBelow(e,this,t),this}}},47059:(t,e,i)=>{var s=i(83419),h=i(66064),r=i(19133),i=new s({initialize:function(t,e){this.gameObject=t,this.isPost=e,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(t){return this.padding=t=void 0===t?0:t,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(t){var e;this.isPost||((e=this.gameObject.scene.sys.renderer)&&e.pipelines?(this.gameObject.pipeline=e.pipelines.FX_PIPELINE,void 0!==t&&(this.padding=t),this.enabled=!0):this.enabled=!1)},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var t=this.list,e=0;e{t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},8004:(t,e,i)=>{var l=i(87841),s=i(11520),n=i(26099);t.exports={prepareBoundsOutput:function(t,e){return void 0===e&&(e=!1),0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t),t},getCenter:function(t,e){return(t=void 0===t?new n:t).x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getTopLeft:function(t,e){return(t=t||new n).x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return(t=t||new n).x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return(t=t||new n).x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return(t=t||new n).x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return(t=t||new n).x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return(t=t||new n).x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return(t=t||new n).x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return(t=t||new n).x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,s,n,r,o,a,h;return void 0===t&&(t=new l),a=(h=(this.parentContainer?(h=this.parentContainer.getBoundsTransformMatrix(),this.getTopLeft(t),h.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),h.transformPoint(t.x,t.y,t),s=t.x,n=t.y,this.getBottomLeft(t),h.transformPoint(t.x,t.y,t),r=t.x,o=t.y,this.getBottomRight(t),h.transformPoint(t.x,t.y,t)):(this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),s=t.x,n=t.y,this.getBottomLeft(t),r=t.x,o=t.y,this.getBottomRight(t)),t.x),t.y),t.x=Math.min(e,s,r,h),t.y=Math.min(i,n,o,a),t.width=Math.max(e,s,r,h)-t.x,t.height=Math.max(i,n,o,a)-t.y,t}}},8573:(t,e,i)=>{var r=i(6858),s=i(80661);t.exports={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return(t=void 0===t?!1:t)&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t,e,i,s,n){return void 0===t&&(this.texture||this.shader||this.geom)&&(t=this),new r(this.scene,t,e,i,s,n)},createGeometryMask:function(t){return void 0!==t||"Graphics"!==this.type&&!this.geom||(t=this),new s(this.scene,t)}}},27387:t=>{t.exports={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}}},37640:(t,e,i)=>{var n=i(39506),r=i(57355),o=i(35154),a=i(86353),h=i(26099),i={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:a.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween,i=(i&&i.isPlaying()&&i.stop(),(t="number"==typeof t?{duration:t}:t).from=o(t,"from",0),t.to=o(t,"to",1),r(t,"positionOnPath",!1)),s=(this.rotateToPath=r(t,"rotateToPath",!1),this.pathRotationOffset=o(t,"rotationOffset",0),o(t,"startAt",e));return s&&(t.onStart=function(t){var t=t.data[0],e=(t.progress=s,t.elapsed=t.duration*s,t.ease(t.progress));t.current=t.start+(t.end-t.start)*e,t.setTargetValue()}),this.pathOffset||(this.pathOffset=new h(this.x,this.y)),this.pathVector||(this.pathVector=new h),this.pathDelta||(this.pathDelta=new h),this.pathDelta.reset(),t.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),i&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=a.PLAYING_FORWARD,this.rotateToPath&&(e=this.path.getPoint(.1),this.rotation=Math.atan2(e.y-this.y,e.x-this.x)+n(this.pathRotationOffset)),this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t,e,i,s=this.pathTween;s&&s.data&&(t=s.data[0],e=this.pathDelta,i=this.pathVector,e.copy(i).negate(),t.state===a.COMPLETE?(this.path.getPoint(t.end,i),e.add(i),i.add(this.pathOffset),this.setPosition(i.x,i.y)):t.state!==a.PLAYING_FORWARD&&t.state!==a.PLAYING_BACKWARD||(this.path.getPoint(s.getValue(),i),e.add(i),i.add(this.pathOffset),s=this.x,e=this.y,this.setPosition(i.x,i.y),i=this.x-s,s=this.y-e,0==i&&0==s)||(t.state!==this._prevDirection?this._prevDirection=t.state:this.rotateToPath&&(this.rotation=Math.atan2(s,i)+n(this.pathRotationOffset))))}};t.exports=i},72699:(t,e,i)=>{var n=i(62644);t.exports={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(t){this.pipelineData={};var e=this.scene.sys.renderer;if(e){e=e.pipelines;if(e){void 0===t&&(t=e.default);e=e.get(t);if(e)return this.defaultPipeline=e,this.pipeline=e,!0}}return!1},setPipeline:function(t,e,i){var s=this.scene.sys.renderer;return s&&(s=s.pipelines)&&((s=s.get(t))&&(this.pipeline=s),e)&&(this.pipelineData=i?n(e):e),this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},resetPipeline:function(t){return void 0===t&&(t=!1),this.pipeline=this.defaultPipeline,t&&(this.pipelineData={}),null!==this.pipeline},getPipelineName:function(){return null===this.pipeline?null:this.pipeline.name}}},17581:(t,e,i)=>{var a=i(62644),s=i(47059),r=i(19133);t.exports={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(t){this.postPipelines=[],this.postPipelineData={},this.postFX=new s(this,!0),t&&(this.preFX=new s(this,!1))},setPostPipeline:function(t,e,i){var s=this.scene.sys.renderer;if(s){var n=s.pipelines;if(n){Array.isArray(t)||(t=[t]);for(var r=0;r{t.exports={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}}},16736:t=>{t.exports={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){t=t||this.frame,this.width=t.realWidth,this.height=t.realHeight;t=this.input;return t&&!t.customHitArea&&(t.hitArea.width=this.width,t.hitArea.height=this.height),this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},37726:(t,e,i)=>{var s=i(4327);t.exports={texture:null,frame:null,isCropped:!1,setTexture:function(t,e,i,s){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e,i,s)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}}},79812:(t,e,i)=>{var s=i(4327);t.exports={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){return void 0===t?this.isCropped=!1:this.frame&&("number"==typeof t?this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY):this.frame.setCropUVs(this._crop,t.x,t.y,t.width,t.height,this.flipX,this.flipY),this.isCropped=!0),this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}}},27472:t=>{t.exports={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,s){return void 0===t&&(t=16777215),void 0===e&&(s=i=e=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=s,this.tintFill=!1,this},setTintFill:function(t,e,i,s){return this.setTint(t,e,i,s),this.tintFill=!0,this},tint:{get:function(){return this.tintTopLeft},set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}}},53774:t=>{t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},16901:(t,e,i)=>{var s=i(36383),n=i(61340),r=i(85955),o=i(86554),a=i(30954),h=i(26099);t.exports={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,0===(this._scaleY=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){0===(this._scaleX=t)?this.renderFlags&=-5:0!==this._scaleY&&(this.renderFlags|=4)}},scaleY:{get:function(){return this._scaleY},set:function(t){0===(this._scaleY=t)?this.renderFlags&=-5:0!==this._scaleX&&(this.renderFlags|=4)}},angle:{get:function(){return a(this._rotation*s.RAD_TO_DEG)},set:function(t){this.rotation=a(t)*s.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=o(t)}},setPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=0),this.x=t,this.y=e,this.z=i,this.w=s,this},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,s){return void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===s&&(s=this.scene.sys.scale.height),this.x=(t=void 0===t?0:t)+Math.random()*i,this.y=e+Math.random()*s,this},setRotation:function(t){return this.rotation=t=void 0===t?0:t,this},setAngle:function(t){return this.angle=t=void 0===t?0:t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return this.x=t=void 0===t?0:t,this},setY:function(t){return this.y=t=void 0===t?0:t,this},setZ:function(t){return this.z=t=void 0===t?0:t,this},setW:function(t){return this.w=t=void 0===t?0:t,this},getLocalTransformMatrix:function(t){return(t=void 0===t?new n:t).applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new n);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(e=e||new n,t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);i;)e.applyITRS(i.x,i.y,i._rotation,i._scaleX,i._scaleY),e.multiply(t,t),i=i.parentContainer;return t},getLocalPoint:function(t,e,i,s){i=i||new h;var n=(s=s||this.scene.sys.cameras.main).scrollX,s=s.scrollY,t=t+n*this.scrollFactorX-n,n=e+s*this.scrollFactorY-s;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(t,n,i):r(t,n,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}}},61340:(t,e,i)=>{var s=i(83419),n=i(36383),u=i(26099),i=new s({initialize:function(t,e,i,s,n,r){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=1),void 0===n&&(n=0),void 0===r&&(r=0),this.matrix=new Float32Array([t,e,i,s,n,r,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],t=t[3];return e||i?0{t.exports={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}}},31401:(t,e,i)=>{t.exports={Alpha:i(16005),AlphaSingle:i(88509),BlendMode:i(90065),ComputedSize:i(94215),Crop:i(61683),Depth:i(89272),Flip:i(54434),FX:i(47059),GetBounds:i(8004),Mask:i(8573),Origin:i(27387),PathFollower:i(37640),Pipeline:i(72699),PostPipeline:i(17581),ScrollFactor:i(80227),Size:i(16736),Texture:i(37726),TextureCrop:i(79812),Tint:i(27472),ToJSON:i(53774),Transform:i(16901),TransformMatrix:i(61340),Visible:i(59715)}},31559:(t,e,i)=>{var r=i(37105),n=i(10312),s=i(83419),o=i(31401),a=i(51708),h=i(95643),l=i(87841),u=i(29959),c=i(36899),d=i(26099),p=new o.TransformMatrix,i=new s({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.PostPipeline,o.Transform,o.Visible,u],initialize:function(t,e,i,s){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(e,i),this.setBlendMode(n.SKIP_CHECK),s&&this.add(s)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return this.exclusive=t=void 0===t?!0:t,this},getBounds:function(t){var e;if((t=void 0===t?new l:t).setTo(this.x,this.y,0,0),this.parentContainer&&(e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y),t.setTo(e.x,e.y,0,0)),0{t.exports=function(t,e,i,s){i.addToRenderList(e);var n=e.list;if(0!==n.length){var r=e.localTransform,o=(s?(r.loadIdentity(),r.multiply(s),r.translate(e.x,e.y),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY)):r.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),-1!==e.blendMode),a=(o||t.setBlendMode(0),e._alpha),h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var u=0;u{var r=i(25305),o=i(31559),s=i(44603),a=i(23568),h=i(95540);s.register("container",function(t,e){var i=a(t=void 0===t?{}:t,"x",0),s=a(t,"y",0),n=h(t,"children",null),i=new o(this.scene,i,s,n);return void 0!==e&&(t.add=e),r(this.scene,i,t),i})},24961:(t,e,i)=>{var s=i(31559);i(39429).register("container",function(t,e,i){return this.displayList.add(new s(this.scene,t,e,i))})},29959:(t,e,i)=>{i(29747);var s=i(72249),i=i(53584);t.exports={renderWebGL:s,renderCanvas:i}},72249:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var n=e.list,r=n.length;if(0!==r){var o=e.localTransform,a=(s?(o.loadIdentity(),o.multiply(s),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.pipelines.preBatch(e),-1!==e.blendMode);a||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=0;c{t.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},3069:(t,e,i)=>{var s=i(83419),n=i(31401),r=i(441),o=i(95643),a=i(41212),h=i(35846),l=i(44594),u=i(61369),i=new s({Extends:o,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Origin,n.ScrollFactor,n.Transform,n.Visible,r],initialize:function(t,e,i,s,n,r){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new u,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),"string"==typeof s?"#"===s[0]?this.setElement(s.substr(1),n,r):this.createElement(s,n,r):s&&this.setElement(s,n,r),t.sys.events.on(l.SLEEP,this.handleSceneEvent,this),t.sys.events.on(l.WAKE,this.handleSceneEvent,this),t.sys.events.on(l.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(t){var e=this.node,i=e.style;e&&(i.display=t.settings.visible?"block":"none")},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e{var p=i(47407),f=i(95643),i=i(61340),g=new i,m=new i,v=new i;t.exports=function(t,e,i,s){var n,r,o,a,h,l,u,c,d;e.node&&(n=e.node.style,o=e.scene.sys.settings,!n||!o.visible||f.RENDER_MASK!==e.renderFlags||0!==e.cameraFilter&&e.cameraFilter&i.id||e.parentContainer&&!e.parentContainer.willRender()?n.display="none":(o=e.parentContainer,r=i.alpha*e.alpha,o&&(r*=o.alpha),o=g,a=m,h=v,u=l=0,d=c="0%",s?(l=e.width*e.scaleX*e.originX,a.applyITRS(e.x-l,e.y-(u=e.height*e.scaleY*e.originY),e.rotation,e.scaleX,e.scaleY),o.copyFrom(i.matrix),o.multiplyWithOffset(s,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),a.e=e.x-l,a.f=e.y-u,o.multiply(a,h)):(l=e.width*e.originX,u=e.height*e.originY,a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),o.copyFrom(i.matrix),c=100*e.originX+"%",d=100*e.originY+"%",a.e-=i.scrollX*e.scrollFactorX,a.f-=i.scrollY*e.scrollFactorY,o.multiply(a,h),h.e-=l,h.f-=u),e.transformOnly||(n.display="block",n.opacity=r,n.zIndex=e._depth,n.pointerEvents=e.pointerEvents,n.mixBlendMode=p[e._blendMode]),n.transform=h.getCSSMatrix()+" skew("+e.skewX+"rad, "+e.skewY+"rad) rotate3d("+e.rotate3d.x+","+e.rotate3d.y+","+e.rotate3d.z+","+e.rotate3d.w+e.rotate3dAngle+")",n.transformOrigin=c+" "+d))}},2611:(t,e,i)=>{var r=i(3069);i(39429).register("dom",function(t,e,i,s,n){t=new r(this.scene,t,e,i,s,n);return this.displayList.add(t),t})},441:(t,e,i)=>{i(29747);var s=i(49381),i=i(49381);t.exports={renderWebGL:s,renderCanvas:i}},62980:t=>{t.exports="addedtoscene"},41337:t=>{t.exports="destroy"},44947:t=>{t.exports="removedfromscene"},49358:t=>{t.exports="complete"},35163:t=>{t.exports="created"},97249:t=>{t.exports="error"},19483:t=>{t.exports="locked"},56059:t=>{t.exports="loop"},26772:t=>{t.exports="metadata"},64437:t=>{t.exports="playing"},83411:t=>{t.exports="play"},75780:t=>{t.exports="seeked"},67799:t=>{t.exports="seeking"},63500:t=>{t.exports="stalled"},55541:t=>{t.exports="stop"},53208:t=>{t.exports="textureready"},4992:t=>{t.exports="unlocked"},12:t=>{t.exports="unsupported"},51708:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(62980),DESTROY:i(41337),REMOVED_FROM_SCENE:i(44947),VIDEO_COMPLETE:i(49358),VIDEO_CREATED:i(35163),VIDEO_ERROR:i(97249),VIDEO_LOCKED:i(19483),VIDEO_LOOP:i(56059),VIDEO_METADATA:i(26772),VIDEO_PLAY:i(83411),VIDEO_PLAYING:i(64437),VIDEO_SEEKED:i(75780),VIDEO_SEEKING:i(67799),VIDEO_STALLED:i(63500),VIDEO_STOP:i(55541),VIDEO_TEXTURE:i(53208),VIDEO_UNLOCKED:i(4992),VIDEO_UNSUPPORTED:i(12)}},42421:(t,e,i)=>{var s=i(83419),n=i(31401),r=i(95643),i=i(64993),s=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.Origin,n.ScrollFactor,n.Size,n.Texture,n.Tint,n.Transform,n.Visible,i],initialize:function(t){r.call(this,t,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});t.exports=s},70217:()=>{},56315:(t,e,i)=>{var s=i(42421);i(39429).register("extern",function(){var t=new s(this.scene);return this.displayList.add(t),t})},64993:(t,e,i)=>{i(29747);var s=i(80287),i=i(70217);t.exports={renderWebGL:s,renderCanvas:i}},80287:(t,e,i)=>{var n=i(91296);t.exports=function(t,e,i,s){t.pipelines.clear();s=n(e,i,s).calc;e.render.call(e,t,i,s),t.pipelines.rebind()}},85592:t=>{t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},43831:(t,e,i)=>{var s=i(71911),n=i(83419),h=i(85592),r=i(31401),o=i(8497),a=i(95643),p=i(95540),l=i(35154),f=i(36383),i=i(84503),u=new n({Extends:a,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.PostPipeline,r.Transform,r.Visible,r.ScrollFactor,i],initialize:function(t,e){var i=l(e,"x",0),s=l(e,"y",0);a.call(this,t,"Graphics"),this.setPosition(i,s),this.initPipeline(),this.initPostPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.lineStyle(1,0,0),this.fillStyle(0,0),this.setDefaultStyles(e)},setDefaultStyles:function(t){return l(t,"lineStyle",null)&&(this.defaultStrokeWidth=l(t,"lineStyle.width",1),this.defaultStrokeColor=l(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=l(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),l(t,"fillStyle",null)&&(this.defaultFillColor=l(t,"fillStyle.color",16777215),this.defaultFillAlpha=l(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return this.commandBuffer.push(h.LINE_STYLE,t,e,i=void 0===i?1:i),this._lineWidth=t,this},fillStyle:function(t,e){return this.commandBuffer.push(h.FILL_STYLE,t,e=void 0===e?1:e),this},fillGradientStyle:function(t,e,i,s,n,r,o,a){return void 0===n&&(n=1),void 0===r&&(r=n),void 0===o&&(o=n),void 0===a&&(a=n),this.commandBuffer.push(h.GRADIENT_FILL_STYLE,n,r,o,a,t,e,i,s),this},lineGradientStyle:function(t,e,i,s,n,r){return this.commandBuffer.push(h.GRADIENT_LINE_STYLE,t,r=void 0===r?1:r,e,i,s,n),this},beginPath:function(){return this.commandBuffer.push(h.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(h.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(h.FILL_PATH),this},fill:function(){return this.commandBuffer.push(h.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(h.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(h.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,f.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,f.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,s){return this.commandBuffer.push(h.FILL_RECT,t,e,i,s),this},strokeRect:function(t,e,i,s){var n=this._lineWidth/2,r=t-n,n=t+n;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+s),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+s),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(n+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+s),this.lineTo(n+i,e+s),this.strokePath(),this},fillRoundedRect:function(t,e,i,s,n){var r=n=void 0===n?20:n,o=n,a=n,h=n,n=("number"!=typeof n&&(r=p(n,"tl",20),o=p(n,"tr",20),a=p(n,"bl",20),h=p(n,"br",20)),0<=r),l=0<=o,u=0<=a,c=0<=h,r=Math.abs(r),o=Math.abs(o),a=Math.abs(a),h=Math.abs(h);return this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),l?this.arc(t+i-o,e+o,o,-f.TAU,0):this.arc(t+i,e,o,Math.PI,f.TAU,!0),this.lineTo(t+i,e+s-h),c?this.arc(t+i-h,e+s-h,h,0,f.TAU):this.arc(t+i,e+s,h,-f.TAU,Math.PI,!0),this.lineTo(t+a,e+s),u?this.arc(t+a,e+s-a,a,f.TAU,Math.PI):this.arc(t,e+s,a,0,-f.TAU,!0),this.lineTo(t,e+r),n?this.arc(t+r,e+r,r,-Math.PI,-f.TAU):this.arc(t,e,r,f.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(t,e,i,s,n){var r=n=void 0===n?20:n,o=n,a=n,h=n,l=Math.min(i,s)/2,n=("number"!=typeof n&&(r=p(n,"tl",20),o=p(n,"tr",20),a=p(n,"bl",20),h=p(n,"br",20)),0<=r),u=0<=o,c=0<=a,d=0<=h,r=Math.min(Math.abs(r),l),o=Math.min(Math.abs(o),l),a=Math.min(Math.abs(a),l),h=Math.min(Math.abs(h),l);return this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.moveTo(t+i-o,e),u?this.arc(t+i-o,e+o,o,-f.TAU,0):this.arc(t+i,e,o,Math.PI,f.TAU,!0),this.lineTo(t+i,e+s-h),this.moveTo(t+i,e+s-h),d?this.arc(t+i-h,e+s-h,h,0,f.TAU):this.arc(t+i,e+s,h,-f.TAU,Math.PI,!0),this.lineTo(t+a,e+s),this.moveTo(t+a,e+s),c?this.arc(t+a,e+s-a,a,f.TAU,Math.PI):this.arc(t,e+s,a,0,-f.TAU,!0),this.lineTo(t,e+r),this.moveTo(t,e+r),n?this.arc(t+r,e+r,r,-Math.PI,-f.TAU):this.arc(t,e,r,f.TAU,0,!0),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(h.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,s,n,r){return this.commandBuffer.push(h.FILL_TRIANGLE,t,e,i,s,n,r),this},strokeTriangle:function(t,e,i,s,n,r){return this.commandBuffer.push(h.STROKE_TRIANGLE,t,e,i,s,n,r),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,s){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,s),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(h.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(h.MOVE_TO,t,e),this},strokePoints:function(t,e,i,s){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===s&&(s=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var n=1;n{var p=i(85592),f=i(20926);t.exports=function(t,e,i,s,n,r){var o=e.commandBuffer,a=o.length,h=n||t.currentContext;if(0!==a&&f(t,h,e,i,s)){i.addToRenderList(e);var l,u,c;h.beginPath();for(var d=0;d>>16)+","+((65280&u)>>>8)+","+(255&u)+","+l+")",h.lineWidth=c,d+=3;break;case p.FILL_STYLE:u=o[d+1],l=o[d+2],h.fillStyle="rgba("+((16711680&u)>>>16)+","+((65280&u)>>>8)+","+(255&u)+","+l+")",d+=2;break;case p.BEGIN_PATH:h.beginPath();break;case p.CLOSE_PATH:h.closePath();break;case p.FILL_PATH:r||h.fill();break;case p.STROKE_PATH:r||h.stroke();break;case p.FILL_RECT:r?h.rect(o[d+1],o[d+2],o[d+3],o[d+4]):h.fillRect(o[d+1],o[d+2],o[d+3],o[d+4]),d+=4;break;case p.FILL_TRIANGLE:h.beginPath(),h.moveTo(o[d+1],o[d+2]),h.lineTo(o[d+3],o[d+4]),h.lineTo(o[d+5],o[d+6]),h.closePath(),r||h.fill(),d+=6;break;case p.STROKE_TRIANGLE:h.beginPath(),h.moveTo(o[d+1],o[d+2]),h.lineTo(o[d+3],o[d+4]),h.lineTo(o[d+5],o[d+6]),h.closePath(),r||h.stroke(),d+=6;break;case p.LINE_TO:h.lineTo(o[d+1],o[d+2]),d+=2;break;case p.MOVE_TO:h.moveTo(o[d+1],o[d+2]),d+=2;break;case p.LINE_FX_TO:h.lineTo(o[d+1],o[d+2]),d+=5;break;case p.MOVE_FX_TO:h.moveTo(o[d+1],o[d+2]),d+=5;break;case p.SAVE:h.save();break;case p.RESTORE:h.restore();break;case p.TRANSLATE:h.translate(o[d+1],o[d+2]),d+=2;break;case p.SCALE:h.scale(o[d+1],o[d+2]),d+=2;break;case p.ROTATE:h.rotate(o[d+1]),d+=1;break;case p.GRADIENT_FILL_STYLE:d+=5;break;case p.GRADIENT_LINE_STYLE:d+=6}h.restore()}}},87079:(t,e,i)=>{var s=i(44603),n=i(43831);s.register("graphics",function(t,e){void 0===t&&(t={}),void 0!==e&&(t.add=e);e=new n(this.scene,t);return t.add&&this.scene.sys.displayList.add(e),e})},1201:(t,e,i)=>{var s=i(43831);i(39429).register("graphics",function(t){return this.displayList.add(new s(this.scene,t))})},84503:(t,e,i)=>{i(29747);var s=i(77545);i(32768);i=i(32768),t.exports={renderWebGL:s,renderCanvas:i}},77545:(t,e,i)=>{function k(t,e,i){this.x=t,this.y=e,this.width=i}function F(t,e,i){this.points=[],this.pointsLength=1,this.points[0]=new k(t,e,i)}var B=i(85592),I=i(91296),s=i(61340),N=i(70554),G=[],U=new s;t.exports=function(t,e,i,s){if(0!==e.commandBuffer.length){i.addToRenderList(e);var n=t.pipelines.set(e.pipeline,e);t.pipelines.preBatch(e);for(var r=I(e,i,s).calc,o=U.loadIdentity(),a=e.commandBuffer,h=i.alpha*e.alpha,l=1,u=n.fillTint,c=n.strokeTint,d=0,p=0,f=0,g=2*Math.PI,m=[],v=0,y=!0,x=null,T=N.getTintAppendFloatAlpha,b=0;b{var m=i(61061),s=i(83419),r=i(51708),n=i(50792),o=i(46710),v=i(95540),y=i(35154),x=i(97022),a=i(41212),T=i(88492),h=i(35072),l=i(68287),i=new s({Extends:n,initialize:function(t,e,i){n.call(this),i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?a(e[0])&&(i=e,e=null):a(e)&&(i=e,e=null),this.scene=t,this.children=new h,this.isParent=!0,this.type="Group",this.classType=v(i,"classType",l),this.name=v(i,"name",""),this.active=v(i,"active",!0),this.maxSize=v(i,"maxSize",-1),this.defaultKey=v(i,"defaultKey",null),this.defaultFrame=v(i,"defaultFrame",null),this.runChildUpdate=v(i,"runChildUpdate",!1),this.createCallback=v(i,"createCallback",null),this.removeCallback=v(i,"removeCallback",null),this.createMultipleCallback=v(i,"createMultipleCallback",null),this.internalCreateCallback=v(i,"internalCreateCallback",null),this.internalRemoveCallback=v(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i),this.on(r.ADDED_TO_SCENE,this.addedToScene,this),this.on(r.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(t,e,i,s,n,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===s&&(s=this.defaultFrame),void 0===n&&(n=!0),void 0===r&&(r=!0),this.isFull()?null:((t=new this.classType(this.scene,t,e,i,s)).addToDisplayList(this.scene.sys.displayList),t.addToUpdateList(),t.visible=n,t.setActive(r),this.add(t),t)},createMultiple:function(t){if(this.isFull())return[];var e=[];if((t=Array.isArray(t)?t:[t])[0].key)for(var i=0;i=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i{var s=i(44603),n=i(26479);s.register("group",function(t){return new n(this.scene,null,t)})},3385:(t,e,i)=>{var s=i(26479);i(39429).register("group",function(t,e){return this.updateList.add(new s(this.scene,t,e))})},88571:(t,e,i)=>{var s=i(83419),n=i(31401),r=i(95643),i=i(59819),s=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.PostPipeline,n.ScrollFactor,n.Size,n.TextureCrop,n.Tint,n.Transform,n.Visible,i],initialize:function(t,e,i,s,n){r.call(this,t,"Image"),this._crop=this.resetCropObject(),this.setTexture(s,n),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)}});t.exports=s},40652:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},82459:(t,e,i)=>{var n=i(25305),s=i(44603),r=i(23568),o=i(88571);s.register("image",function(t,e){var i=r(t=void 0===t?{}:t,"key",null),s=r(t,"frame",null),i=new o(this.scene,0,0,i,s);return void 0!==e&&(t.add=e),n(this.scene,i,t),i})},2117:(t,e,i)=>{var n=i(88571);i(39429).register("image",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},59819:(t,e,i)=>{i(29747);var s=i(99517),i=i(40652);t.exports={renderWebGL:s,renderCanvas:i}},99517:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),this.pipeline.batchSprite(e,i,s)}},77856:(t,e,i)=>{var s={Events:i(51708),DisplayList:i(8050),GameObjectCreator:i(44603),GameObjectFactory:i(39429),UpdateList:i(45027),Components:i(31401),GetCalcMatrix:i(91296),BuildGameObject:i(25305),BuildGameObjectAnimation:i(13059),GameObject:i(95643),BitmapText:i(22186),Blitter:i(6107),Bob:i(46590),Container:i(31559),DOMElement:i(3069),DynamicBitmapText:i(2638),Extern:i(42421),Graphics:i(43831),Group:i(26479),Image:i(88571),Layer:i(93595),Particles:i(18404),PathFollower:i(1159),RenderTexture:i(591),RetroFont:i(196),Rope:i(77757),Sprite:i(68287),Text:i(50171),GetTextSize:i(14220),MeasureText:i(79557),TextStyle:i(35762),TileSprite:i(20839),Zone:i(41481),Video:i(18471),Shape:i(17803),Arc:i(23629),Curve:i(89),Ellipse:i(19921),Grid:i(30479),IsoBox:i(61475),IsoTriangle:i(16933),Line:i(57847),Polygon:i(24949),Rectangle:i(74561),Star:i(55911),Triangle:i(36931),Factories:{Blitter:i(12709),Container:i(24961),DOMElement:i(2611),DynamicBitmapText:i(72566),Extern:i(56315),Graphics:i(1201),Group:i(3385),Image:i(2117),Layer:i(20005),Particles:i(676),PathFollower:i(90145),RenderTexture:i(60505),Rope:i(96819),Sprite:i(46409),StaticBitmapText:i(34914),Text:i(68005),TileSprite:i(91681),Zone:i(84175),Video:i(89025),Arc:i(42563),Curve:i(40511),Ellipse:i(1543),Grid:i(34137),IsoBox:i(3933),IsoTriangle:i(49803),Line:i(2481),Polygon:i(64827),Rectangle:i(87959),Star:i(93697),Triangle:i(45245)},Creators:{Blitter:i(9403),Container:i(77143),DynamicBitmapText:i(11164),Graphics:i(87079),Group:i(94975),Image:i(82459),Layer:i(25179),Particles:i(92730),RenderTexture:i(34495),Rope:i(26209),Sprite:i(15567),StaticBitmapText:i(57336),Text:i(71259),TileSprite:i(14167),Zone:i(95261),Video:i(11511)}};s.Shader=i(20071),s.Mesh=i(4703),s.NineSlice=i(28103),s.PointLight=i(80321),s.Plane=i(33663),s.Factories.Shader=i(74177),s.Factories.Mesh=i(9225),s.Factories.NineSlice=i(47521),s.Factories.PointLight=i(71255),s.Factories.Plane=i(30985),s.Creators.Shader=i(54935),s.Creators.Mesh=i(20527),s.Creators.NineSlice=i(28279),s.Creators.PointLight=i(39829),s.Creators.Plane=i(56015),s.Light=i(41432),s.LightsManager=i(61356),s.LightsPlugin=i(88992),t.exports=s},93595:(t,e,i)=>{var s=i(10312),n=i(83419),r=i(31401),o=i(53774),a=i(45893),h=i(50792),l=i(51708),u=i(73162),c=i(33963),d=i(44594),p=i(19186),i=new n({Extends:u,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.PostPipeline,r.Visible,h,c],initialize:function(t,e){u.call(this,t),h.call(this),this.scene=t,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=t.sys,this.events=t.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPostPipeline(),this.clearAlpha(),this.setBlendMode(s.SKIP_CHECK),e&&this.add(e),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new a(this)),this},setData:function(t,e){return this.data||(this.data=new a(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new a(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new a(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new a(this)),this.data.get(t)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return o(this)},willRender:function(t){return!(15!==this.renderFlags||0===this.list.length||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),(t=e).parentContainer);)e=e.parentContainer;return i.unshift(this.displayList.getIndex(t)),i},addChildCallback:function(t){var e=t.displayList;e&&e!==this&&t.removeFromDisplayList(),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(l.ADDED_TO_SCENE,t,this.scene),this.events.emit(d.ADDED_TO_SCENE,t,this.scene))},removeChildCallback:function(t){this.queueDepthSort(),t.displayList=null,t.emit(l.REMOVED_FROM_SCENE,t,this.scene),this.events.emit(d.REMOVED_FROM_SCENE,t,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(p(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||((this.displayList=t).add(this,!0),t.queueDepthSort(),this.emit(l.ADDED_TO_SCENE,this,this.scene),t.events.emit(d.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(l.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(d.REMOVED_FROM_SCENE,this,this.scene)),this},destroy:function(t){if(this.scene&&!this.ignoreDestroy){this.emit(l.DESTROY,this);for(var e=this.list;e.length;)e[0].destroy(t);this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0,!1),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});t.exports=i},2956:t=>{t.exports=function(t,e,i){var s=e.list;if(0!==s.length){e.depthSort();var n=-1!==e.blendMode,r=(n||t.setBlendMode(0),e._alpha);e.mask&&e.mask.preRenderCanvas(t,null,i);for(var o=0;o{var s=i(25305),n=i(93595),r=i(44603),o=i(23568);r.register("layer",function(t,e){var i=o(t=void 0===t?{}:t,"children",null),i=new n(this.scene,i);return void 0!==e&&(t.add=e),s(this.scene,i,t),i})},20005:(t,e,i)=>{var s=i(93595);i(39429).register("layer",function(t){return this.displayList.add(new s(this.scene,t))})},33963:(t,e,i)=>{i(29747);var s=i(15869),i=i(2956);t.exports={renderWebGL:s,renderCanvas:i}},15869:t=>{t.exports=function(t,e,i){var s=e.list,n=s.length;if(0!==n){e.depthSort(),t.pipelines.preBatch(e);var r=-1!==e.blendMode;r||t.setBlendMode(0);for(var o=e.alpha,a=0;a{var a=i(96503),s=i(83419),n=i(31401),h=i(51767),r=i(70554),o=new s({Extends:a,Mixins:[n.Origin,n.ScrollFactor,n.Visible],initialize:function(t,e,i,s,n,r,o){a.call(this,t,e,i),this.color=new h(s,n,r),this.intensity=o,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(i)},displayWidth:{get:function(){return this.diameter},set:function(t){this.diameter=t}},displayHeight:{get:function(){return this.diameter},set:function(t){this.diameter=t}},width:{get:function(){return this.diameter},set:function(t){this.diameter=t}},height:{get:function(){return this.diameter},set:function(t){this.diameter=t}},willRender:function(t){return!(o.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setColor:function(t){t=r.getFloatsFromUintRGB(t);return this.color.set(t[0],t[1],t[2]),this},setIntensity:function(t){return this.intensity=t,this},setRadius:function(t){return this.radius=t,this}});o.RENDER_MASK=15,t.exports=o},61356:(t,e,i)=>{var o=i(81491),s=i(83419),a=i(20339),r=i(41432),h=i(80321),n=i(51767),l=i(19133),u=i(19186),c=i(70554),i=new s({initialize:function(){this.lights=[],this.ambientColor=new n(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(t,e,i,s,n,r){return this.systems.displayList.add(new h(this.scene,t,e,i,s,n,r))},enable:function(){return-1===this.maxLights&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(t){for(var e=this.lights,i=t.worldView,s=[],n=0;nthis.maxLights&&(u(s,this.sortByDistance),s=s.slice(0,this.maxLights)),this.visibleLights=s.length,s},sortByDistance:function(t,e){return t.distance>=e.distance},setAmbientColor:function(t){t=c.getFloatsFromUintRGB(t);return this.ambientColor.set(t[0],t[1],t[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(t,e,i,s,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=128),void 0===n&&(n=1);s=c.getFloatsFromUintRGB(s=void 0===s?16777215:s),t=new r(t,e,i,s[0],s[1],s[2],n);return this.lights.push(t),t},removeLight:function(t){t=this.lights.indexOf(t);return 0<=t&&l(this.lights,t),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=i},88992:(t,e,i)=>{var s=i(83419),n=i(61356),r=i(37277),o=i(44594),i=new s({Extends:n,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once(o.BOOT,this.boot,this),n.call(this)},boot:function(){var t=this.systems.events;t.on(o.SHUTDOWN,this.shutdown,this),t.on(o.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",i,"lights"),t.exports=i},4703:(t,e,i)=>{var s=i(83419),n=i(31401),r=i(39506),o=i(83997),d=i(95643),c=i(34684),a=i(92515),h=i(91296),p=i(37867),l=i(29807),u=i(43396),f=i(19186),g=i(25836),m=i(39318),i=new s({Extends:d,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Mask,n.Pipeline,n.PostPipeline,n.ScrollFactor,n.Size,n.Texture,n.Transform,n.Visible,l],initialize:function(t,e,i,s,n,r,o,a,h,l,u,c){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s="__WHITE"),d.call(this,t,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new g,this.modelScale=new g(1,1,1),this.modelRotation=new g,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new p,this.viewPosition=new g,this.viewMatrix=new p,this.projectionMatrix=new p,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1,this.fov,this.displayOriginX=0,this.displayOriginY=0;t=t.sys.renderer;this.setPosition(e,i),this.setTexture(s,n),this.setSize(t.width,t.height),this.initPipeline(),this.initPostPipeline(),this.setPerspective(t.width,t.height),r&&this.addVertices(r,o,a,h,l,u,c)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(t){return this.viewPosition.addScale(g.LEFT,t),this.dirtyCache[10]=1,this},panY:function(t){return this.viewPosition.y+=g.DOWN.y*t,this.dirtyCache[10]=1,this},panZ:function(t){return this.viewPosition.z+=t,this.dirtyCache[10]=1,this},setPerspective:function(t,e,i,s,n){return void 0===s&&(s=.01),void 0===n&&(n=1e3),this.fov=i=void 0===i?45:i,this.projectionMatrix.perspective(r(i),t/e,s,n),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(t,e,i,s){return void 0===t&&(t=this.scene.sys.renderer.getAspectRatio()),void 0===e&&(e=1),void 0===i&&(i=-1e3),void 0===s&&(s=1e3),this.fov=0,this.projectionMatrix.ortho(-t,t,-e,e,i,s),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(t){t.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(t,e,i,s,n,r,o,a,h){var l,u=this.scene.sys.cache.obj.get(t);return(l=u?c(u,this,e,i,s,n,r,o,a,h):l)&&0!==l.verts.length||console.warn("Mesh.addVerticesFromObj data empty:",t),this},sortByDepth:function(t,e){return t.depth-e.depth},depthSort:function(){return f(this.faces,this.sortByDepth),this},addVertex:function(t,e,i,s,n,r,o){t=new m(t,e,i,s,n,r,o);return this.vertices.push(t),t},addFace:function(t,e,i){t=new o(t,e,i);return this.faces.push(t),this.dirtyCache[9]=-1,t},addVertices:function(t,e,i,s,n,r,o){t=a(t,e,i,s,n,r,o);return t?(this.faces=this.faces.concat(t.faces),this.vertices=this.vertices.concat(t.vertices)):console.warn("Mesh.addVertices data empty or invalid"),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(t){return this.faces[t]},hasFaceAt:function(t,e,i){void 0===i&&(i=this.scene.sys.cameras.main);for(var s=h(this,i).calc,n=this.faces,r=0;r{t.exports=function(){}},20527:(t,e,i)=>{var c=i(25305),s=i(44603),d=i(23568),p=i(35154),f=i(4703);s.register("mesh",function(t,e){var i=d(t=void 0===t?{}:t,"key",null),s=d(t,"frame",null),n=p(t,"vertices",[]),r=p(t,"uvs",[]),o=p(t,"indicies",[]),a=p(t,"containsZ",!1),h=p(t,"normals",[]),l=p(t,"colors",16777215),u=p(t,"alphas",1),i=new f(this.scene,0,0,i,s,n,r,o,a,h,l,u);return void 0!==e&&(t.add=e),c(this.scene,i,t),i})},9225:(t,e,i)=>{var c=i(4703);i(39429).register("mesh",function(t,e,i,s,n,r,o,a,h,l,u){return this.displayList.add(new c(this.scene,t,e,i,s,n,r,o,a,h,l,u))})},29807:(t,e,i)=>{i(29747);var s=i(48833),i=i(36488);t.exports={renderWebGL:s,renderCanvas:i}},48833:(t,e,i)=>{var A=i(91296);t.exports=function(t,e,i,s){var n=e.faces,r=n.length;if(0!==r){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline,e),s=A(e,i,s).calc;t.pipelines.preBatch(e);for(var a=o.setGameObject(e),h=o.vertexViewF32,l=o.vertexViewU32,u=o.vertexCount*o.currentShader.vertexComponentCount-1,c=e.tintFill,d=[],p=e.debugCallback,f=s.a,g=s.b,m=s.c,v=s.d,y=s.e,x=s.f,T=e.viewPosition.z,b=e.hideCCW,w=i.roundPixels,S=i.alpha*e.alpha,C=0,E=0;E{var s=i(83419),n=i(31401),p=i(95643),r=i(78023),f=i(39318),i=new s({Extends:p,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.PostPipeline,n.ScrollFactor,n.Texture,n.Transform,n.Visible,r],initialize:function(t,e,i,s,n,r,o,a,h,l,u){p.call(this,t,"NineSlice"),this._width,this._height,this._originX=.5,this._originY=.5,this._sizeComponent=!0,this.vertices=[],this.leftWidth,this.rightWidth,this.topHeight,this.bottomHeight,this.tint=16777215,this.tintFill=!1;t=t.textures.getFrame(s,n);this.is3Slice=!l&&!u,t&&t.scale9&&(this.is3Slice=t.is3Slice);for(var c=this.is3Slice?18:54,d=0;d{var u=i(25305),s=i(44603),c=i(23568),d=i(35154),p=i(28103);s.register("nineslice",function(t,e){var i=c(t=void 0===t?{}:t,"key",null),s=c(t,"frame",null),n=d(t,"width",256),r=d(t,"height",256),o=d(t,"leftWidth",10),a=d(t,"rightWidth",10),h=d(t,"topHeight",0),l=d(t,"bottomHeight",0),i=new p(this.scene,0,0,i,s,n,r,o,a,h,l);return void 0!==e&&(t.add=e),u(this.scene,i,t),i})},47521:(t,e,i)=>{var u=i(28103);i(39429).register("nineslice",function(t,e,i,s,n,r,o,a,h,l){return this.displayList.add(new u(this.scene,t,e,i,s,n,r,o,a,h,l))})},78023:(t,e,i)=>{var s=i(29747),i=i(52230);t.exports={renderWebGL:i,renderCanvas:s}},52230:(t,e,i)=>{var y=i(91296),x=i(70554);t.exports=function(t,e,i,s){var n=e.vertices,r=n.length;if(0!==r){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline,e),a=y(e,i,s,!1).calc,h=(t.pipelines.preBatch(e),o.setGameObject(e)),l=o.vertexViewF32,u=o.vertexViewU32,c=o.vertexCount*o.currentShader.vertexComponentCount-1,d=i.roundPixels,p=e.tintFill,f=x.getTintAppendFloatAlpha(e.tint,i.alpha*e.alpha),s=o.vertexAvailable(),g=-1;s{var s=i(83419),n=i(44777),r=i(37589),o=i(6113),a=i(91389),h=i(90664),i=new s({Extends:n,initialize:function(t){n.call(this,t,null,!1),this.active=!1,this.easeName="Linear",this.r=[],this.g=[],this.b=[]},getMethod:function(){return null===this.propertyValue?0:9},setMethods:function(){var t=this.propertyValue,e=t,i=this.defaultEmit,s=this.defaultUpdate;if(9===this.method){this.start=t[0],this.ease=o("Linear"),this.interpolation=a("linear"),i=this.easedValueEmit,s=this.easeValueUpdate,e=t[0],this.active=!0;for(var n=0;n{var s=i(30976),n=i(45319),r=i(83419),o=i(99472),a=i(6113),h=i(95540),l=i(91389),u=i(77720),c=i(15994),i=new r({initialize:function(t,e,i){void 0===i&&(i=!1),this.propertyKey=t,this.propertyValue=e,this.defaultValue=e,this.steps=0,this.counter=0,this.yoyo=!1,this.direction=0,this.start=0,this.current=0,this.end=0,this.ease=null,this.interpolation=null,this.emitOnly=i,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=h(t,this.propertyKey,this.defaultValue),this.method=this.getMethod(),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(t){switch(this.method){case 1:case 3:case 8:i=t;break;case 2:0<=this.propertyValue.indexOf(t)&&(i=t);break;case 4:var e=(this.end-this.start)/this.steps,i=u(t,e);this.counter=i;break;case 5:case 6:case 7:i=n(t,this.start,this.end);break;case 9:i=this.start[0]}return this.current=i,this},getMethod:function(){var t=this.propertyValue;if(null!==t){var e=typeof t;if("number"==e)return 1;if(Array.isArray(t))return 2;if("function"==e)return 3;if("object"==e){if(this.hasBoth(t,"start","end"))return this.has(t,"steps")?4:5;if(this.hasBoth(t,"min","max"))return 6;if(this.has(t,"random"))return 7;if(this.hasEither(t,"onEmit","onUpdate"))return 8;if(this.hasEither(t,"values","interpolation"))return 9}}return 0},setMethods:function(){var t=this.propertyValue,e=t,i=this.defaultEmit,s=this.defaultUpdate;switch(this.method){case 1:i=this.staticValueEmit;break;case 2:i=this.randomStaticValueEmit,e=t[0];break;case 3:this._onEmit=t,i=this.proxyEmit;break;case 4:this.start=t.start,this.end=t.end,this.steps=t.steps,this.counter=this.start,this.yoyo=!!this.has(t,"yoyo")&&t.yoyo,this.direction=0,i=this.steppedEmit,e=this.start;break;case 5:this.start=t.start,this.end=t.end;var n=this.has(t,"ease")?t.ease:"Linear";this.ease=a(n,t.easeParams),i=this.has(t,"random")&&t.random?this.randomRangedValueEmit:this.easedValueEmit,s=this.easeValueUpdate,e=this.start;break;case 6:this.start=t.min,this.end=t.max,i=this.has(t,"int")&&t.int?this.randomRangedIntEmit:this.randomRangedValueEmit,e=this.start;break;case 7:n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),i=this.randomRangedIntEmit,e=this.start;break;case 8:this._onEmit=this.has(t,"onEmit")?t.onEmit:this.defaultEmit,this._onUpdate=this.has(t,"onUpdate")?t.onUpdate:this.defaultUpdate,i=this.proxyEmit,s=this.proxyUpdate;break;case 9:this.start=t.values;n=this.has(t,"ease")?t.ease:"Linear";this.ease=a(n,t.easeParams),this.interpolation=l(t.interpolation),i=this.easedValueEmit,s=this.easeValueUpdate,e=this.start[0]}return this.onEmit=i,this.onUpdate=s,this.current=e,this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,s){return s},proxyEmit:function(t,e,i){t=this._onEmit(t,e,i);return this.current=t},proxyUpdate:function(t,e,i,s){t=this._onUpdate(t,e,i,s);return this.current=t},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[t],this.current},randomRangedValueEmit:function(t,e){var i=o(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i,t.data[e].max=this.end),this.current=i},randomRangedIntEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i,t.data[e].max=this.end),this.current=i},steppedEmit:function(){var t,e=this.counter,i=e,s=(this.end-this.start)/this.steps;return this.yoyo?(0===this.direction?(i+=s)>=this.end&&(t=i-this.end,i=this.end-t,this.direction=1):(i-=s)<=this.start&&(t=this.start-i,i=this.start+t,this.direction=0),this.counter=i):this.counter=c(i+s,this.start,this.end),this.current=e},easedValueEmit:function(t,e){return t&&t.data[e]&&((t=t.data[e]).min=this.start,t.max=this.end),this.current=this.start,this.start},easeValueUpdate:function(t,e,i){t=t.data[e],e=this.ease(i),i=this.interpolation?this.interpolation(this.start,e):(t.max-t.min)*e+t.min;return this.current=i},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});t.exports=i},24502:(t,e,i)=>{var s=i(83419),o=i(95540),a=i(20286),i=new s({Extends:a,initialize:function(t,e,i,s,n){var r;"object"==typeof t?(t=o(r=t,"x",0),e=o(r,"y",0),i=o(r,"power",0),s=o(r,"epsilon",100),n=o(r,"gravity",50)):(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=100),void 0===n&&(n=50)),a.call(this,t,e,!0),this._gravity=n,this._power=i*n,this._epsilon=s*s},update:function(t,e){var i,s=this.x-t.x,n=this.y-t.y,r=s*s+n*n;0!==r&&(i=Math.sqrt(r),r{var s=i(9674),f=i(45319),n=i(83419),l=i(39506),r=i(87841),u=i(11520),c=i(26099),i=new n({initialize:function(t){this.emitter=t,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new c,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.holdCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1},x:{min:0,max:0},y:{min:0,max:0},accelerationX:{min:0,max:0},accelerationY:{min:0,max:0},maxVelocityX:{min:0,max:0},maxVelocityY:{min:0,max:0},moveToX:{min:0,max:0},moveToY:{min:0,max:0},bounce:{min:0,max:0}},this.isCropped=!1,this.scene=t.scene,this.anims=new s(this),this.bounds=new r},emit:function(t,e,i,s,n,r){return this.emitter.emit(t,e,i,s,n,r)},isAlive:function(){return 0{var s=i(83419),h=i(20286),l=i(87841),i=new s({Extends:h,initialize:function(t,e,i,s,n,r,o,a){void 0===n&&(n=!0),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),h.call(this,t,e,!0),this.bounds=new l(t,e,i,s),this.collideLeft=n,this.collideRight=r,this.collideTop=o,this.collideBottom=a},update:function(t){var e=this.bounds,i=-t.bounce,s=t.worldPosition;s.xe.right&&this.collideRight&&(t.x-=s.x-e.right,t.velocityX*=i),s.ye.bottom&&this.collideBottom&&(t.y-=s.y-e.bottom,t.velocityY*=i)}});t.exports=i},31600:(t,e,i)=>{var s=i(83419),n=i(31401),r=i(53774),u=i(43459),o=i(26388),c=i(19909),a=i(76472),h=i(44777),p=i(20696),l=i(95643),d=i(95540),f=i(26546),g=i(24502),m=i(1985),v=i(97022),y=i(86091),x=i(73162),T=i(20074),b=i(269),w=i(56480),S=i(69601),C=i(68875),E=i(87841),_=i(59996),A=i(72905),P=i(90668),M=i(19186),R=i(61340),L=i(26099),O=i(15994),D=["active","advance","blendMode","colorEase","deathCallback","deathCallbackScope","duration","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxAliveParticles","maxParticles","name","emitting","particleBringToTop","particleClass","radial","sortCallback","sortOrderAsc","sortProperty","stopAfter","tintFill","timeScale","trackVisible","visible"],k=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],i=new s({Extends:l,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Mask,n.Pipeline,n.PostPipeline,n.ScrollFactor,n.Texture,n.Transform,n.Visible,P],initialize:function(t,e,i,s,n){l.call(this,t,"ParticleEmitter"),this.particleClass=w,this.config=null,this.ops={accelerationX:new h("accelerationX",0),accelerationY:new h("accelerationY",0),alpha:new h("alpha",1),angle:new h("angle",{min:0,max:360},!0),bounce:new h("bounce",0),color:new a("color"),delay:new h("delay",0,!0),hold:new h("hold",0,!0),lifespan:new h("lifespan",1e3,!0),maxVelocityX:new h("maxVelocityX",1e4),maxVelocityY:new h("maxVelocityY",1e4),moveToX:new h("moveToX",0),moveToY:new h("moveToY",0),quantity:new h("quantity",1,!0),rotate:new h("rotate",0),scaleX:new h("scaleX",1),scaleY:new h("scaleY",1),speedX:new h("speedX",0,!0),speedY:new h("speedY",0,!0),tint:new h("tint",16777215),x:new h("x",0),y:new h("y",0)},this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.moveTo=!1,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.maxAliveParticles=0,this.stopAfter=0,this.duration=0,this.frequency=0,this.emitting=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZones=[],this.deathZones=[],this.viewBounds=null,this.follow=null,this.followOffset=new L,this.trackVisible=!1,this.frames=[],this.randomFrame=!0,this.frameQuantity=1,this.anims=[],this.randomAnim=!0,this.animQuantity=1,this.dead=[],this.alive=[],this.counters=new Float32Array(10),this.skipping=!1,this.worldMatrix=new R,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new x(this),this.tintFill=!1,this.initPipeline(),this.initPostPipeline(),this.setPosition(e,i),this.setTexture(s),n&&this.setConfig(n)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(t){if(t){this.config=t;for(var e,i=0,s="",n=this.ops,i=0;i=this.animQuantity&&(this.animCounter=0,this.currentAnim=O(this.currentAnim+1,0,e)),t)},setAnim:function(t,e,i){void 0===i&&(i=1),this.randomAnim=e=void 0===e?!0:e,this.animQuantity=i,this.currentAnim=0;var e=typeof t;return this.anims.length=0,Array.isArray(t)?this.anims=this.anims.concat(t):"string"==e?this.anims.push(t):"object"==e&&((t=d(e=t,"anims",null))&&(this.anims=this.anims.concat(t)),t=d(e,"cycle",!1),this.randomAnim=!t,this.animQuantity=d(e,"quantity",i)),1===this.anims.length&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(t){return this.radial=t=void 0===t?!0:t,this},addParticleBounds:function(t,e,i,s,n,r,o,a){var h;return"object"==typeof t&&(t=(h=t).x,e=h.y,i=v(h,"w")?h.w:h.width,s=v(h,"h")?h.h:h.height),this.addParticleProcessor(new S(t,e,i,s,n,r,o,a))},setParticleSpeed:function(t,e){return void 0===e&&(e=t),this.ops.speedX.onChange(t),t===e?this.ops.speedY.active=!1:this.ops.speedY.onChange(e),this.radial=!0,this},setParticleScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.ops.scaleX.onChange(t),this.ops.scaleY.onChange(e),this},setParticleGravity:function(t,e){return this.gravityX=t,this.gravityY=e,this},setParticleAlpha:function(t){return this.ops.alpha.onChange(t),this},setParticleTint:function(t){return this.ops.tint.onChange(t),this},setEmitterAngle:function(t){return this.ops.angle.onChange(t),this},setParticleLifespan:function(t){return this.ops.lifespan.onChange(t),this},setQuantity:function(t){return this.quantity=t,this},setFrequency:function(t,e){return this.frequency=t,this.flowCounter=0this.maxParticles&&(t=this.maxParticles-(e+t));for(var s=0;s=this.maxParticles||0=this.maxAliveParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e)&&(this.emitCallbackScope=e),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e)&&(this.deathCallbackScope=e),this},killAll:function(){for(var t=this.dead,e=this.alive;0=n))break;if(this.atLimit())break}return h}},fastForward:function(t,e){void 0===e&&(e=1e3/60);var i=0;for(this.skipping=!0;i=this.duration)&&this.stop(),0=this.stopAfter&&this.stop())}else 1===this.completeFlag&&0===n.length&&(this.completeFlag=0,this.emit(p.COMPLETE,this))},overlap:function(t){for(var e=this.getWorldTransformMatrix(),i=this.alive,s=i.length,n=[],r=0;r{var w=i(59996),i=i(61340),S=new i,C=new i,E=new i,_=new i;t.exports=function(t,e,i,s){var n=S,r=C,o=E,a=_,h=(s?(a.loadIdentity(),a.multiply(s),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY)):a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.currentContext),l=i.roundPixels,u=i.alpha,c=e.alpha,d=e.alive,p=d.length,s=e.viewBounds;if(e.visible&&0!==p&&(!s||w(s,i.worldView))){e.sortCallback&&e.depthSort(),i.addToRenderList(e);var f=e.scrollFactorX,g=e.scrollFactorY;h.save(),h.globalCompositeOperation=t.blendModes[e.blendMode];for(var m=0;m{var n=i(25305),s=i(44603),r=i(23568),o=i(95540),a=i(31600);s.register("particles",function(t,e){var i=r(t=void 0===t?{}:t,"key",null),s=o(t,"config",null),i=new a(this.scene,0,0,i);return void 0!==e&&(t.add=e),n(this.scene,i,t),s&&i.setConfig(s),i})},676:(t,e,i)=>{var s=i(39429),n=i(31600);s.register("particles",function(t,e,i,s){return void 0!==t&&"string"==typeof t&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new n(this.scene,t,e,i,s))})},90668:(t,e,i)=>{i(29747);var s=i(21188),i=i(9871);t.exports={renderWebGL:s,renderCanvas:i}},21188:(t,e,i)=>{var S=i(59996),s=i(61340),C=i(70554),E=new s,_=new s,A=new s,P=new s;t.exports=function(t,e,i,s){var n=t.pipelines.set(e.pipeline),r=E,o=_,a=A,h=P,l=(s?(h.loadIdentity(),h.multiply(s),h.translate(e.x,e.y),h.rotate(e.rotation),h.scale(e.scaleX,e.scaleY)):h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),C.getTintAppendFloatAlpha),u=i.alpha,c=e.alpha,d=(t.pipelines.preBatch(e),e.alive),p=d.length,s=e.viewBounds;if(0!==p&&(!s||S(s,i.worldView))){e.sortCallback&&e.depthSort(),i.addToRenderList(e),r.copyFrom(i.matrix),r.multiplyWithOffset(h,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),t.setBlendMode(e.blendMode),e.mask&&(e.mask.preRenderWebGL(t,e,i),t.pipelines.set(e.pipeline));for(var f,g,m=e.tintFill,v=0;v{i=new(i(83419))({initialize:function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=!0),this.emitter,this.x=t=void 0===t?0:t,this.y=e,this.active=i},update:function(){},destroy:function(){this.emitter=null}});t.exports=i},9774:t=>{t.exports="complete"},812:t=>{t.exports="deathzone"},30522:t=>{t.exports="explode"},96695:t=>{t.exports="start"},18677:t=>{t.exports="stop"},20696:(t,e,i)=>{t.exports={COMPLETE:i(9774),DEATH_ZONE:i(812),EXPLODE:i(30522),START:i(96695),STOP:i(18677)}},18404:(t,e,i)=>{t.exports={EmitterColorOp:i(76472),EmitterOp:i(44777),Events:i(20696),GravityWell:i(24502),Particle:i(56480),ParticleBounds:i(69601),ParticleEmitter:i(31600),ParticleProcessor:i(20286),Zones:i(21024)}},26388:(t,e,i)=>{i=new(i(83419))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){t=this.source.contains(t.x,t.y);return t&&this.killOnEnter||!t&&!this.killOnEnter}});t.exports=i},19909:(t,e,i)=>{i=new(i(83419))({initialize:function(t,e,i,s,n,r){void 0===s&&(s=!1),void 0===n&&(n=!0),void 0===r&&(r=-1),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=s,this.counter=-1,this.seamless=n,this._length=0,this._direction=0,this.total=r,this.updateSource()},updateSource:function(){this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless&&(e=this.points[0],t=this.points[this.points.length-1],e.x===t.x)&&e.y===t.y&&this.points.pop();var t,e=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=i},68875:(t,e,i)=>{var s=i(83419),n=i(26099),i=new s({initialize:function(t){this.source=t,this._tempVec=new n,this.total=-1},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=i},21024:(t,e,i)=>{t.exports={DeathZone:i(26388),EdgeZone:i(19909),RandomZone:i(68875)}},1159:(t,e,i)=>{var s=i(83419),n=i(31401),o=i(68287),i=new s({Extends:o,Mixins:[n.PathFollower],initialize:function(t,e,i,s,n,r){o.call(this,t,i,s,n,r),this.path=e},preUpdate:function(t,e){this.anims.update(t,e),this.pathUpdate(t)}});t.exports=i},90145:(t,e,i)=>{var s=i(39429),r=i(1159);s.register("follower",function(t,e,i,s,n){t=new r(this.scene,t,e,i,s,n);return this.displayList.add(t),this.updateList.add(t),t})},33663:(t,e,i)=>{var h=i(9674),s=i(83419),n=i(48803),u=i(90664),l=i(4703),c=i(45650),i=new s({Extends:l,initialize:function(t,e,i,s,n,r,o,a){l.call(this,t,e,i,s=s||"__DEFAULT",n),this.type="Plane",this.anims=new h(this),this.gridWidth,this.gridHeight,this.isTiled,this._checkerboard=null,this.hideCCW=!1,this.setGridSize(r,o,a),this.setSizeToFrame(!1),this.setViewHeight()},originX:{get:function(){return.5}},originY:{get:function(){return.5}},setGridSize:function(t,e,i){void 0===e&&(e=8);var s=(i=void 0===i?!1:i)?!0:!1;return this.gridWidth=t=void 0===t?8:t,this.gridHeight=e,this.isTiled=i,this.clear(),n({mesh:this,widthSegments:t,heightSegments:e,isOrtho:!1,tile:i,flipY:s}),this},setSizeToFrame:function(t){void 0===t&&(t=!0);var e=this.frame;if(this.setPerspective(this.width/e.width,this.height/e.height),this._checkerboard&&this._checkerboard!==this.texture&&this.removeCheckerboard(),t){var i,s=this.gridWidth,n=this.gridHeight,r=this.vertices,o=e.u0,a=e.u1,h=e.v0,l=e.v1,u=0;if(this.isTiled)for(h=e.v1,l=e.v0,m=0;m{var a=i(25305),h=i(13059),s=i(44603),l=i(23568),u=i(35154),c=i(33663);s.register("plane",function(t,e){var i=l(t=void 0===t?{}:t,"key",null),s=l(t,"frame",null),n=u(t,"width",8),r=u(t,"height",8),o=u(t,"tile",!1),i=new c(this.scene,0,0,i,s,n,r,o),s=(void 0!==e&&(t.add=e),u(t,"checkerboard",null));return s&&(n=u(s,"color1",16777215),r=u(s,"color2",255),o=u(s,"alpha1",255),e=u(s,"alpha2",255),s=u(s,"height",128),i.createCheckerboard(n,r,o,e,s)),a(this.scene,i,t),h(i,t),i})},30985:(t,e,i)=>{var a=i(33663);i(39429).register("plane",function(t,e,i,s,n,r,o){return this.displayList.add(new a(this.scene,t,e,i,s,n,r,o))})},80321:(t,e,i)=>{var s=i(83419),n=i(31401),a=i(95643),h=i(30100),l=i(36060),i=i(67277),s=new s({Extends:a,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Mask,n.Pipeline,n.PostPipeline,n.ScrollFactor,n.Transform,n.Visible,i],initialize:function(t,e,i,s,n,r,o){void 0===s&&(s=16777215),void 0===n&&(n=128),void 0===r&&(r=1),void 0===o&&(o=.1),a.call(this,t,"PointLight"),this.initPipeline(l.POINTLIGHT_PIPELINE),this.initPostPipeline(),this.setPosition(e,i),this.color=h(s),this.intensity=r,this.attenuation=o,this.width=2*n,this.height=2*n,this._radius=n},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this.width=2*t,this.height=2*t}},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});t.exports=s},39829:(t,e,i)=>{var o=i(25305),s=i(44603),a=i(23568),h=i(80321);s.register("pointlight",function(t,e){var i=a(t=void 0===t?{}:t,"color",16777215),s=a(t,"radius",128),n=a(t,"intensity",1),r=a(t,"attenuation",.1),i=new h(this.scene,0,0,i,s,n,r);return void 0!==e&&(t.add=e),o(this.scene,i,t),i})},71255:(t,e,i)=>{var s=i(39429),o=i(80321);s.register("pointlight",function(t,e,i,s,n,r){return this.displayList.add(new o(this.scene,t,e,i,s,n,r))})},67277:(t,e,i)=>{var s=i(29747),i=i(57787);t.exports={renderWebGL:i,renderCanvas:s}},57787:(t,e,i)=>{var m=i(91296);t.exports=function(t,e,i,s){i.addToRenderList(e);var n=t.pipelines.set(e.pipeline),s=m(e,i,s).calc,r=e.width,o=-e._radius,a=-e._radius,r=o+r,h=a+e.height,l=s.getX(0,0),u=s.getY(0,0),c=s.getX(o,a),d=s.getY(o,a),p=s.getX(o,h),o=s.getY(o,h),f=s.getX(r,h),h=s.getY(r,h),g=s.getX(r,a),s=s.getY(r,a);t.pipelines.preBatch(e),n.batchPointLight(e,i,c,d,p,o,f,h,g,s,l,u),t.pipelines.postBatch(e)}},591:(t,e,i)=>{var s=i(83419),r=i(81320),o=i(88571),i=new s({Extends:o,initialize:function(t,e,i,s,n){void 0===e&&(e=0),void 0===i&&(i=0);s=new r(t.sys.textures,"",s=void 0===s?32:s,n=void 0===n?32:n);o.call(this,t,e,i,s),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(t,e){this.width=t,this.height=e,this.texture.setSize(t,e),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this},resize:function(t,e){return this.setSize(t,e),this},saveTexture:function(t){var e=this.texture;return e.key=t,e.manager.addDynamicTexture(e)&&(this._saved=!0),e},fill:function(t,e,i,s,n,r){return this.texture.fill(t,e,i,s,n,r),this},clear:function(){return this.texture.clear(),this},stamp:function(t,e,i,s,n){return this.texture.stamp(t,e,i,s,n),this},erase:function(t,e,i){return this.texture.erase(t,e,i),this},draw:function(t,e,i,s,n){return this.texture.draw(t,e,i,s,n),this},drawFrame:function(t,e,i,s,n,r){return this.texture.drawFrame(t,e,i,s,n,r),this},repeat:function(t,e,i,s,n,r,o,a,h){return this.texture.repeat(t,e,i,s,n,r,o,a,h),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(t,e,i,s,n){return this.texture.batchDraw(t,e,i,s,n),this},batchDrawFrame:function(t,e,i,s,n,r){return this.texture.batchDrawFrame(t,e,i,s,n,r),this},endDraw:function(t){return this.texture.endDraw(t),this},snapshotArea:function(t,e,i,s,n,r,o){return this.texture.snapshotArea(t,e,i,s,n,r,o),this},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.width,this.height,t,e,i)},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i,"pixel")},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}});t.exports=i},34495:(t,e,i)=>{var o=i(25305),s=i(44603),a=i(23568),h=i(591);s.register("renderTexture",function(t,e){var i=a(t=void 0===t?{}:t,"x",0),s=a(t,"y",0),n=a(t,"width",32),r=a(t,"height",32),i=new h(this.scene,i,s,n,r);return void 0!==e&&(t.add=e),o(this.scene,i,t),i})},60505:(t,e,i)=>{var s=i(39429),n=i(591);s.register("renderTexture",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},77757:(t,e,i)=>{var l=i(9674),s=i(83419),n=i(31401),u=i(95643),c=i(36060),r=i(38745),d=i(26099),i=new s({Extends:u,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Flip,n.Mask,n.Pipeline,n.PostPipeline,n.Size,n.Texture,n.Transform,n.Visible,n.ScrollFactor,r],initialize:function(t,e,i,s,n,r,o,a,h){void 0===s&&(s="__DEFAULT"),void 0===r&&(r=2),void 0===o&&(o=!0),u.call(this,t,"Rope"),this.anims=new l(this),this.points=r,this.vertices,this.uv,this.colors,this.alphas,this.tintFill="__DEFAULT"===s,this.dirty=!1,this.horizontal=o,this._flipX=!1,this._flipY=!1,this._perp=new d,this.debugCallback=null,this.debugGraphic=null,this.setTexture(s,n),this.setPosition(e,i),this.setSizeToFrame(),this.initPipeline(c.ROPE_PIPELINE),this.initPostPipeline(),Array.isArray(r)&&this.resizeArrays(r.length),this.setPoints(r,a,h),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){var i=this.anims.currentFrame;this.anims.update(t,e),this.anims.currentFrame!==i&&(this.updateUVs(),this.updateVertices())},play:function(t,e,i){return this.anims.play(t,e,i),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(t,e,i){return void 0===t&&(t=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(t,e,i))},setVertical:function(t,e,i){return void 0===t&&(t=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(t,e,i)):this},setTintFill:function(t){return this.tintFill=t=void 0===t?!1:t,this},setAlphas:function(t,e){var i=this.points.length;if(!(i<1)){var s=this.alphas,n=(void 0===t?t=[1]:Array.isArray(t)||void 0!==e||(t=[t]),0);if(void 0!==e)for(o=0;o(n=2*o)&&(r=t[n]),s[n]=r,t.length>n+1&&(r=t[n+1]),s[n+1]=r}return this},setColors:function(t){var e=this.points.length;if(!(e<1)){var i=this.colors,s=(void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]),0);if(t.length===e)for(r=0;r(s=2*r)&&(n=t[s]),i[s]=n,t.length>s+1&&(n=t[s+1]),i[s+1]=n}return this},setPoints:function(t,e,i){if("number"==typeof(t=void 0===t?2:t)){var s,n,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,n=this.frame.width/(o-1),s=0;s{t.exports=function(){}},26209:(t,e,i)=>{var h=i(25305),s=i(44603),l=i(23568),u=i(35154),c=i(77757);s.register("rope",function(t,e){var i=l(t=void 0===t?{}:t,"key",null),s=l(t,"frame",null),n=l(t,"horizontal",!0),r=u(t,"points",void 0),o=u(t,"colors",void 0),a=u(t,"alphas",void 0),i=new c(this.scene,0,0,i,s,r,n,o,a);return void 0!==e&&(t.add=e),h(this.scene,i,t),i})},96819:(t,e,i)=>{var h=i(77757);i(39429).register("rope",function(t,e,i,s,n,r,o,a){return this.displayList.add(new h(this.scene,t,e,i,s,n,r,o,a))})},38745:(t,e,i)=>{i(29747);var s=i(20439),i=i(95262);t.exports={renderWebGL:s,renderCanvas:i}},20439:(t,e,i)=>{var _=i(91296),A=i(70554);t.exports=function(t,e,i,s){i.addToRenderList(e);var n=t.pipelines.set(e.pipeline,e),r=_(e,i,s).calc,o=e.vertices,a=e.uv,h=e.colors,l=e.alphas,u=e.alpha,c=A.getTintAppendFloatAlpha,d=i.roundPixels,p=o.length,s=Math.floor(.5*p),f=(n.flush(),t.pipelines.preBatch(e),n.setGameObject(e)),g=n.vertexViewF32,m=n.vertexViewU32,v=n.vertexCount*n.currentShader.vertexComponentCount-1,y=0,x=e.tintFill;e.dirty&&e.updateVertices();for(var T=e.debugCallback,b=[],w=0;w{var s=i(83419),n=i(31401),h=i(95643),d=i(95540),r=i(79291),o=i(61622),a=i(25479),l=i(61340),u=i(95428),c=i(92503),i=new s({Extends:h,Mixins:[n.ComputedSize,n.Depth,n.GetBounds,n.Mask,n.Origin,n.ScrollFactor,n.Transform,n.Visible,a],initialize:function(t,e,i,s,n,r,o,a){void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=128),void 0===r&&(r=128),h.call(this,t,"Shader"),this.blendMode=-1,this.shader;t=t.sys.renderer;this.renderer=t,this.gl=t.gl,this.vertexData=new ArrayBuffer(2*Float32Array.BYTES_PER_ELEMENT*6),this.vertexBuffer=t.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this._deferSetShader=null,this._deferProjOrtho=null,this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=t.width,this._rendererHeight=t.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(i,s),this.setSize(n,r),this.setOrigin(.5,.5),this.setShader(e,o,a),this.renderer.on(c.RESTORE_WEBGL,this.onContextRestored,this)},willRender:function(t){return!!this.renderToTexture||!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setRenderToTexture:function(t,e){var i,s;return void 0===e&&(e=!1),this.renderToTexture||(e=this.width,i=this.height,s=this.renderer,this.glTexture=s.createTextureFromSource(null,e,i,0),this.framebuffer=s.createFramebuffer(e,i,this.glTexture,!1),this._rendererWidth=e,this._rendererHeight=i,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),t&&(this.texture=this.scene.sys.textures.addGLTexture(t,this.glTexture))),this.shader&&(s.pipelines.clear(),this.load(),this.flush(),s.pipelines.rebind()),this},setShader:function(t,e,i){if(this.renderer.contextLost)this._deferSetShader={key:t,textures:e,textureData:i};else{if(void 0===e&&(e=[]),"string"==typeof t){var s=this.scene.sys.cache.shader;if(!s.has(t))return console.warn("Shader missing: "+t),this;this.shader=s.get(t)}else this.shader=t;s=this.gl,t=this.renderer,t=(this.program&&t.deleteProgram(this.program),t.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc)),s=(s.uniformMatrix4fv(s.getUniformLocation(t.webGLProgram,"uViewMatrix"),!1,this.viewMatrix),s.uniformMatrix4fv(s.getUniformLocation(t.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),s.uniform2f(s.getUniformLocation(t.webGLProgram,"uResolution"),this.width,this.height),this.program=t,new Date),t={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[s.getFullYear(),s.getMonth(),s.getDate(),60*s.getHours()*60+60*s.getMinutes()+s.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=r(!0,{},this.shader.uniforms,t):this.uniforms=t;for(var n=0;n<4;n++)e[n]&&this.setSampler2D("iChannel"+n,e[n],n,i);this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0)}return this},setPointer:function(t){return this.pointer=t,this},projOrtho:function(t,e,i,s){var n,r,o;this.renderer.contextLost?this._deferProjOrtho={left:t,right:e,bottom:i,top:s}:(n=1/(i-s),(r=this.projectionMatrix)[0]=-2*(o=1/(t-e)),r[5]=-2*n,r[10]=-.001,r[12]=(t+e)*o,r[13]=(s+i)*n,r[14]=-0,t=this.program,o=this.gl,this.renderer.setProgram(t),o.uniformMatrix4fv(o.getUniformLocation(t.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=e,this._rendererHeight=i)},initUniforms:function(){var t,e=this.renderer.glFuncMap,i=this.program;for(t in this._textureCount=0,this.uniforms){var s=this.uniforms[t],n=s.type,r=e[n];s.uniformLocation=this.renderer.createUniformLocation(i,t),"sampler2D"!==n&&(s.glMatrix=r.matrix,s.glValueLength=r.length,s.glFunc=r.func)}},setSampler2DBuffer:function(t,e,i,s,n,r){void 0===n&&(n=0),void 0===r&&(r={});t=this.uniforms[t];return t.value=e,r.width=i,r.height=s,t.textureData=r,this._textureCount=n,this.initSampler2D(t),this},setSampler2D:function(t,e,i,s){void 0===i&&(i=0);var n=this.scene.sys.textures;if(n.exists(e)){n=n.getFrame(e);if(n.glTexture&&n.glTexture.isRenderTexture)return this.setSampler2DBuffer(t,n.glTexture,n.width,n.height,i,s);var t=this.uniforms[t],r=n.source;t.textureKey=e,t.source=r.image,t.value=n.glTexture,r.isGLTexture&&((s=s||{}).width=r.width,s.height=r.height),s&&(t.textureData=s),this._textureCount=i,this.initSampler2D(t)}return this},setUniform:function(t,e){return o(this.uniforms,t,e),this},getUniform:function(t){return d(this.uniforms,t,null)},setChannel0:function(t,e){return this.setSampler2D("iChannel0",t,0,e)},setChannel1:function(t,e){return this.setSampler2D("iChannel1",t,1,e)},setChannel2:function(t,e){return this.setSampler2D("iChannel2",t,2,e)},setChannel3:function(t,e){return this.setSampler2D("iChannel3",t,3,e)},initSampler2D:function(t){var e,i,s,n,r,o,a,h,l,u,c;t.value&&((e=t.textureData)&&!t.value.isRenderTexture&&(i=this.gl,t=t.value,s=i[d(e,"magFilter","linear").toUpperCase()],n=i[d(e,"minFilter","linear").toUpperCase()],r=i[d(e,"wrapS","repeat").toUpperCase()],o=i[d(e,"wrapT","repeat").toUpperCase()],a=i[d(e,"format","rgba").toUpperCase()],h=d(e,"flipY",!1),l=d(e,"width",t.width),u=d(e,"height",t.height),c=d(e,"source",t.pixels),e.repeat&&(r=i.REPEAT,o=i.REPEAT),e.width&&(c=null),t.update(c,l,u,h,r,o,n,s,a)),this.renderer.setProgram(this.program),this._textureCount++)},syncUniforms:function(){var t,e,i,s,n,r,o=this.gl,a=this.uniforms,h=0;for(r in a)i=(t=a[r]).glFunc,e=t.glValueLength,s=t.uniformLocation,null!==(n=t.value)&&(1===e?t.glMatrix?i.call(o,s.webGLUniformLocation,t.transpose,n):i.call(o,s.webGLUniformLocation,n):2===e?i.call(o,s.webGLUniformLocation,n.x,n.y):3===e?i.call(o,s.webGLUniformLocation,n.x,n.y,n.z):4===e?i.call(o,s.webGLUniformLocation,n.x,n.y,n.z,n.w):"sampler2D"===t.type&&(o.activeTexture(o.TEXTURE0+h),o.bindTexture(o.TEXTURE_2D,n.webGLTexture),o.uniform1i(s.webGLUniformLocation,h),h++))},load:function(t){var e=this.gl,i=this.width,s=this.height,n=this.renderer,r=this.program,o=this.viewMatrix,t=(this.renderToTexture||(a=-this._displayOriginX,h=-this._displayOriginY,o[0]=t[0],o[1]=t[1],o[4]=t[2],o[5]=t[3],o[8]=t[4],o[9]=t[5],o[12]=o[0]*a+o[4]*h,o[13]=o[1]*a+o[5]*h),e.useProgram(r.webGLProgram),e.uniformMatrix4fv(e.getUniformLocation(r.webGLProgram,"uViewMatrix"),!1,o),e.uniformMatrix4fv(e.getUniformLocation(r.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),e.uniform2f(e.getUniformLocation(r.webGLProgram,"uResolution"),this.width,this.height),this.uniforms),a=t.resolution,h=(a.value.x=i,a.value.y=s,t.time.value=n.game.loop.getDuration(),this.pointer);h&&(o=t.mouse,e=h.x/i,r=1-h.y/s,o.value.x=e.toFixed(2),o.value.y=r.toFixed(2)),this.syncUniforms()},flush:function(){var t=this.width,e=this.height,i=this.program,s=this.gl,n=this.vertexBuffer,r=this.renderer,o=2*Float32Array.BYTES_PER_ELEMENT,n=(this.renderToTexture&&(r.setFramebuffer(this.framebuffer),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT)),s.bindBuffer(s.ARRAY_BUFFER,n.webGLBuffer),s.getAttribLocation(i.webGLProgram,"inPosition")),i=(-1!==n&&(s.enableVertexAttribArray(n),s.vertexAttribPointer(n,2,s.FLOAT,!1,o,0)),this.vertexViewF32);i[3]=e,i[4]=t,i[5]=e,i[8]=t,i[9]=e,i[10]=t,s.bufferSubData(s.ARRAY_BUFFER,0,this.bytes.subarray(0,6*o)),s.drawArrays(s.TRIANGLES,0,6),this.renderToTexture&&r.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},onContextRestored:function(){var t,e,i,s;null!==this._deferSetShader&&(t=this._deferSetShader.key,e=this._deferSetShader.textures,i=this._deferSetShader.textureData,this._deferSetShader=null,this.setShader(t,e,i)),null!==this._deferProjOrtho&&(t=this._deferProjOrtho.left,e=this._deferProjOrtho.right,i=this._deferProjOrtho.bottom,s=this._deferProjOrtho.top,this._deferProjOrtho=null,this.projOrtho(t,e,i,s))},preDestroy:function(){var e=this.renderer;e.off(c.RESTORE_WEBGL,this.onContextRestored,this),e.deleteProgram(this.program),e.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(e.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null),u(this.uniforms,function(t){e.deleteUniformLocation(t.uniformLocation),t.uniformLocation=null})}});t.exports=i},80464:t=>{t.exports=function(){}},54935:(t,e,i)=>{var a=i(25305),s=i(44603),h=i(23568),l=i(20071);s.register("shader",function(t,e){var i=h(t=void 0===t?{}:t,"key",null),s=h(t,"x",0),n=h(t,"y",0),r=h(t,"width",128),o=h(t,"height",128),i=new l(this.scene,i,s,n,r,o);return void 0!==e&&(t.add=e),a(this.scene,i,t),i})},74177:(t,e,i)=>{var a=i(20071);i(39429).register("shader",function(t,e,i,s,n,r,o){return this.displayList.add(new a(this.scene,t,e,i,s,n,r,o))})},25479:(t,e,i)=>{i(29747);var s=i(19257),i=i(80464);t.exports={renderWebGL:s,renderCanvas:i}},19257:(t,e,i)=>{var n=i(91296);t.exports=function(t,e,i,s){e.shader&&(i.addToRenderList(e),t.pipelines.clear(),e.renderToTexture?e.load():(i=n(e,i,s).calc,t.width===e._rendererWidth&&t.height===e._rendererHeight||e.projOrtho(0,t.width,t.height,0),e.load(i.matrix)),e.flush(),t.pipelines.rebind())}},10441:(t,e,i)=>{var v=i(70554);t.exports=function(t,e,i,s,n,r){for(var o=v.getTintAppendFloatAlpha(i.fillColor,i.fillAlpha*s),a=i.pathData,h=i.pathIndexes,l=0;l{t.exports=function(t,e,i,s){i=i||e.fillColor,s=s||e.fillAlpha;t.fillStyle="rgba("+((16711680&i)>>>16)+","+((65280&i)>>>8)+","+(255&i)+","+s+")"}},75177:t=>{t.exports=function(t,e,i,s){i=i||e.strokeColor,s=s||e.strokeAlpha;t.strokeStyle="rgba("+((16711680&i)>>>16)+","+((65280&i)>>>8)+","+(255&i)+","+s+")",t.lineWidth=e.lineWidth}},17803:(t,e,i)=>{var s=i(83419),n=i(31401),r=i(95643),o=i(23031),i=new s({Extends:r,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.PostPipeline,n.ScrollFactor,n.Transform,n.Visible],initialize:function(t,e,i){r.call(this,t,e=void 0===e?"Shape":e),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new o,this.width=0,this.height=0,this.initPipeline(),this.initPostPipeline()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.isFilled=!1:(this.fillColor=t,this.fillAlpha=e,this.isFilled=!0),this},setStrokeStyle:function(t,e,i){return void 0===i&&(i=1),void 0===t?this.isStroked=!1:(this.lineWidth=t,this.strokeColor=e,this.strokeAlpha=i,this.isStroked=!0),this},setClosePath:function(t){return this.closePath=t,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}}});t.exports=i},34682:(t,e,i)=>{var g=i(70554);t.exports=function(t,e,i,s,n){var r=t.strokeTint,i=g.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*i),o=(r.TL=i,r.TR=i,r.BL=i,r.BR=i,e.pathData),a=o.length-1,h=e.lineWidth,l=h/2,u=o[0]-s,c=o[1]-n;e.closePath||(a-=2);for(var d=2;d{var s=i(13609),n=i(83419),l=i(39506),u=i(94811),c=i(96503),d=i(36383),p=i(17803),i=new n({Extends:p,Mixins:[s],initialize:function(t,e,i,s,n,r,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=360),void 0===o&&(o=!1),p.call(this,t,"Arc",new c(0,0,s=void 0===s?128:s)),this._startAngle=n,this._endAngle=r,this._anticlockwise=o,this._iterations=.01,this.setPosition(e,i);t=2*this.geom.radius;this.setSize(t,t),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(t){this._iterations=t,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(t){t=2*(this.geom.radius=t);this.setSize(t,t),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(t){this._startAngle=t,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(t){this._endAngle=t,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(t){this._anticlockwise=t,this.updateData()}},setRadius:function(t){return this.radius=t,this},setIterations:function(t){return this.iterations=t=void 0===t?.01:t,this},setStartAngle:function(t,e){return this._startAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},setEndAngle:function(t,e){return this._endAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},updateData:function(){var t=this._iterations,e=t,i=this.geom.radius,s=l(this._startAngle),n=l(this._endAngle),r=i,o=i;n-=s,this._anticlockwise?n<-d.PI2?n=-d.PI2:0d.PI2?n=d.PI2:n<0&&(n=d.PI2+n%d.PI2);for(var a,h=[r+Math.cos(s)*i,o+Math.sin(s)*i];e<1;)a=n*e+s,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),e+=t;return a=n+s,h.push(r+Math.cos(a)*i,o+Math.sin(a)*i),h.push(r+Math.cos(s)*i,o+Math.sin(s)*i),this.pathIndexes=u(h),this.pathData=h,this}});t.exports=i},42542:(t,e,i)=>{var r=i(39506),o=i(65960),a=i(75177),h=i(20926);t.exports=function(t,e,i,s){i.addToRenderList(e);var n=t.currentContext;h(t,n,e,i,s)&&(t=e.radius,n.beginPath(),n.arc(t-e.originX*(2*t),t-e.originY*(2*t),t,r(e._startAngle),r(e._endAngle),e.anticlockwise),e.closePath&&n.closePath(),e.isFilled&&(o(n,e),n.fill()),e.isStroked&&(a(n,e),n.stroke()),n.restore())}},42563:(t,e,i)=>{var h=i(23629),i=i(39429);i.register("arc",function(t,e,i,s,n,r,o,a){return this.displayList.add(new h(this.scene,t,e,i,s,n,r,o,a))}),i.register("circle",function(t,e,i,s,n){return this.displayList.add(new h(this.scene,t,e,i,0,360,!1,s,n))})},13609:(t,e,i)=>{i(29747);var s=i(41447),i=i(42542);t.exports={renderWebGL:s,renderCanvas:i}},41447:(t,e,i)=>{var a=i(91296),h=i(10441),l=i(34682);t.exports=function(t,e,i,s){i.addToRenderList(e);var n=t.pipelines.set(e.pipeline),s=a(e,i,s),s=n.calcMatrix.copyFrom(s.calc),r=e._displayOriginX,o=e._displayOriginY,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&h(n,s,e,i,r,o),e.isStroked&&l(n,e,i,r,o),t.pipelines.postBatch(e)}},89:(t,e,i)=>{var s=i(83419),n=i(33141),r=i(94811),o=i(87841),a=i(17803),i=new s({Extends:a,Mixins:[n],initialize:function(t,e,i,s,n,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",s),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==n&&this.setFillStyle(n,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],s=this.geom.getPoints(e),n=0;n{var d=i(65960),p=i(75177),f=i(20926);t.exports=function(t,e,i,s){i.addToRenderList(e);var n=t.currentContext;if(f(t,n,e,i,s)){var r=e._displayOriginX+e._curveBounds.x,o=e._displayOriginY+e._curveBounds.y,a=e.pathData,h=a.length-1,t=a[0]-r,i=a[1]-o;n.beginPath(),n.moveTo(t,i),e.closePath||(h-=2);for(var l=2;l{var s=i(39429),r=i(89);s.register("curve",function(t,e,i,s,n){return this.displayList.add(new r(this.scene,t,e,i,s,n))})},33141:(t,e,i)=>{i(29747);var s=i(53987),i=i(3170);t.exports={renderWebGL:s,renderCanvas:i}},53987:(t,e,i)=>{var a=i(10441),h=i(91296),l=i(34682);t.exports=function(t,e,i,s){i.addToRenderList(e);var n=t.pipelines.set(e.pipeline),s=h(e,i,s),s=n.calcMatrix.copyFrom(s.calc),r=e._displayOriginX+e._curveBounds.x,o=e._displayOriginY+e._curveBounds.y,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&a(n,s,e,i,r,o),e.isStroked&&l(n,e,i,r,o),t.pipelines.postBatch(e)}},19921:(t,e,i)=>{var s=i(83419),n=i(94811),r=i(54205),a=i(8497),h=i(17803),i=new s({Extends:h,Mixins:[r],initialize:function(t,e,i,s,n,r,o){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Ellipse",new a((s=void 0===s?128:s)/2,(n=void 0===n?128:n)/2,s,n)),this._smoothness=64,this.setPosition(e,i),this.width=s,this.height=n,void 0!==r&&this.setFillStyle(r,o),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSize:function(t,e){return this.width=t,this.height=e,this.geom.setPosition(t/2,e/2),this.geom.setSize(t,e),this.updateDisplayOrigin(),this.updateData()},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){for(var t=[],e=this.geom.getPoints(this._smoothness),i=0;i{var d=i(65960),p=i(75177),f=i(20926);t.exports=function(t,e,i,s){i.addToRenderList(e);var n=t.currentContext;if(f(t,n,e,i,s)){var r=e._displayOriginX,o=e._displayOriginY,a=e.pathData,h=a.length-1,t=a[0]-r,i=a[1]-o;n.beginPath(),n.moveTo(t,i),e.closePath||(h-=2);for(var l=2;l{var o=i(19921);i(39429).register("ellipse",function(t,e,i,s,n,r){return this.displayList.add(new o(this.scene,t,e,i,s,n,r))})},54205:(t,e,i)=>{i(29747);var s=i(19467),i=i(7930);t.exports={renderWebGL:s,renderCanvas:i}},19467:(t,e,i)=>{var a=i(10441),h=i(91296),l=i(34682);t.exports=function(t,e,i,s){i.addToRenderList(e);var n=t.pipelines.set(e.pipeline),s=h(e,i,s),s=n.calcMatrix.copyFrom(s.calc),r=e._displayOriginX,o=e._displayOriginY,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&a(n,s,e,i,r,o),e.isStroked&&l(n,e,i,r,o),t.pipelines.postBatch(e)}},30479:(t,e,i)=>{var s=i(83419),c=i(17803),i=i(26015),s=new s({Extends:c,Mixins:[i],initialize:function(t,e,i,s,n,r,o,a,h,l,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===n&&(n=128),void 0===r&&(r=32),void 0===o&&(o=32),c.call(this,t,"Grid",null),this.cellWidth=r,this.cellHeight=o,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(e,i),this.setSize(s,n),this.setFillStyle(a,h),void 0!==l&&this.setOutlineStyle(l,u),this.updateDisplayOrigin()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showCells=!1:(this.fillColor=t,this.fillAlpha=e,this.showCells=!0),this},setAltFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showAltCells=!1:(this.altFillColor=t,this.altFillAlpha=e,this.showAltCells=!0),this},setOutlineStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showOutline=!1:(this.outlineFillColor=t,this.outlineFillAlpha=e,this.showOutline=!0),this}});t.exports=s},49912:(t,e,i)=>{var S=i(65960),C=i(75177),E=i(20926);t.exports=function(t,e,i,s){i.addToRenderList(e);var n=t.currentContext;if(E(t,n,e,i,s)){var r=-e._displayOriginX,o=-e._displayOriginY,t=i.alpha*e.alpha,a=e.width,h=e.height,l=e.cellWidth,u=e.cellHeight,c=Math.ceil(a/l),d=Math.ceil(h/u),p=l,f=u,g=l-(c*l-a),m=u-(d*u-h),s=e.showCells,v=e.showAltCells,i=e.showOutline,y=0,x=0,T=0;if(i&&(p--,f--,g===l&&g--,m===u)&&m--,s&&0{var s=i(39429),u=i(30479);s.register("grid",function(t,e,i,s,n,r,o,a,h,l){return this.displayList.add(new u(this.scene,t,e,i,s,n,r,o,a,h,l))})},26015:(t,e,i)=>{i(29747);var s=i(46161),i=i(49912);t.exports={renderWebGL:s,renderCanvas:i}},46161:(t,e,i)=>{var C=i(91296),E=i(70554);t.exports=function(t,e,i,s){i.addToRenderList(e);var n=t.pipelines.set(e.pipeline),s=C(e,i,s);n.calcMatrix.copyFrom(s.calc).translate(-e._displayOriginX,-e._displayOriginY);var r,s=i.alpha*e.alpha,o=e.width,a=e.height,h=e.cellWidth,l=e.cellHeight,u=Math.ceil(o/h),c=Math.ceil(a/l),d=h,p=l,f=h-(u*h-o),g=l-(c*l-a),i=e.showCells,m=e.showAltCells,v=e.showOutline,y=0,x=0,T=0;if(v&&(d--,p--,f===h&&f--,g===l)&&g--,t.pipelines.preBatch(e),i&&0{var s=i(99651),n=i(83419),h=i(17803),i=new n({Extends:h,Mixins:[s],initialize:function(t,e,i,s,n,r,o,a){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=48),void 0===n&&(n=32),void 0===r&&(r=15658734),void 0===o&&(o=10066329),void 0===a&&(a=13421772),h.call(this,t,"IsoBox",null),this.projection=4,this.fillTop=r,this.fillLeft=o,this.fillRight=a,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(e,i),this.setSize(s,n),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setFaces:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t=void 0===t?!0:t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=i},11508:(t,e,i)=>{var r=i(65960),o=i(20926);t.exports=function(t,e,i,s){i.addToRenderList(e);var n=t.currentContext;o(t,n,e,i,s)&&e.isFilled&&(t=e.width,i=e.height,s=t/2,t=t/e.projection,e.showTop&&(r(n,e,e.fillTop),n.beginPath(),n.moveTo(-s,-i),n.lineTo(0,-t-i),n.lineTo(s,-i),n.lineTo(s,-1),n.lineTo(0,t-1),n.lineTo(-s,-1),n.lineTo(-s,-i),n.fill()),e.showLeft&&(r(n,e,e.fillLeft),n.beginPath(),n.moveTo(-s,0),n.lineTo(0,t),n.lineTo(0,t-i),n.lineTo(-s,-i),n.lineTo(-s,0),n.fill()),e.showRight&&(r(n,e,e.fillRight),n.beginPath(),n.moveTo(s,0),n.lineTo(0,t),n.lineTo(0,t-i),n.lineTo(s,-i),n.lineTo(s,0),n.fill()),n.restore())}},3933:(t,e,i)=>{var s=i(39429),a=i(61475);s.register("isobox",function(t,e,i,s,n,r,o){return this.displayList.add(new a(this.scene,t,e,i,s,n,r,o))})},99651:(t,e,i)=>{i(29747);var s=i(68149),i=i(11508);t.exports={renderWebGL:s,renderCanvas:i}},68149:(t,e,i)=>{var v=i(91296),y=i(70554);t.exports=function(t,e,i,s){i.addToRenderList(e);var n,r,o,a,h,l,u,c,d,p=t.pipelines.set(e.pipeline),s=v(e,i,s),s=p.calcMatrix.copyFrom(s.calc),f=e.width,g=e.height,m=f/2,f=f/e.projection,i=i.alpha*e.alpha;e.isFilled&&(t.pipelines.preBatch(e),e.showTop&&(n=y.getTintAppendFloatAlpha(e.fillTop,i),r=s.getX(-m,-g),o=s.getY(-m,-g),a=s.getX(0,-f-g),h=s.getY(0,-f-g),l=s.getX(m,-g),u=s.getY(m,-g),c=s.getX(0,f-g),d=s.getY(0,f-g),p.batchQuad(e,r,o,a,h,l,u,c,d,0,0,1,1,n,n,n,n,2)),e.showLeft&&(n=y.getTintAppendFloatAlpha(e.fillLeft,i),r=s.getX(-m,0),o=s.getY(-m,0),a=s.getX(0,f),h=s.getY(0,f),l=s.getX(0,f-g),u=s.getY(0,f-g),c=s.getX(-m,-g),d=s.getY(-m,-g),p.batchQuad(e,r,o,a,h,l,u,c,d,0,0,1,1,n,n,n,n,2)),e.showRight&&(n=y.getTintAppendFloatAlpha(e.fillRight,i),r=s.getX(m,0),o=s.getY(m,0),a=s.getX(0,f),h=s.getY(0,f),l=s.getX(0,f-g),u=s.getY(0,f-g),c=s.getX(m,-g),d=s.getY(m,-g),p.batchQuad(e,r,o,a,h,l,u,c,d,0,0,1,1,n,n,n,n,2)),t.pipelines.postBatch(e))}},16933:(t,e,i)=>{var s=i(83419),n=i(60561),l=i(17803),i=new s({Extends:l,Mixins:[n],initialize:function(t,e,i,s,n,r,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=48),void 0===n&&(n=32),void 0===r&&(r=!1),void 0===o&&(o=15658734),void 0===a&&(a=10066329),void 0===h&&(h=13421772),l.call(this,t,"IsoTriangle",null),this.projection=4,this.fillTop=o,this.fillLeft=a,this.fillRight=h,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=r,this.isFilled=!0,this.setPosition(e,i),this.setSize(s,n),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setReversed:function(t){return this.isReversed=t,this},setFaces:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t=void 0===t?!0:t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=i},79590:(t,e,i)=>{var o=i(65960),a=i(20926);t.exports=function(t,e,i,s){i.addToRenderList(e);var n,r=t.currentContext;a(t,r,e,i,s)&&e.isFilled&&(t=e.width,i=e.height,s=t/2,t=t/e.projection,n=e.isReversed,e.showTop&&n&&(o(r,e,e.fillTop),r.beginPath(),r.moveTo(-s,-i),r.lineTo(0,-t-i),r.lineTo(s,-i),r.lineTo(0,t-i),r.fill()),e.showLeft&&(o(r,e,e.fillLeft),r.beginPath(),n?r.moveTo(-s,-i):r.moveTo(-s,0),r.lineTo(0,t),r.lineTo(0,t-i),r.fill()),e.showRight&&(o(r,e,e.fillRight),r.beginPath(),n?r.moveTo(s,-i):r.moveTo(s,0),r.lineTo(0,t),r.lineTo(0,t-i),r.fill()),r.restore())}},49803:(t,e,i)=>{var s=i(39429),h=i(16933);s.register("isotriangle",function(t,e,i,s,n,r,o,a){return this.displayList.add(new h(this.scene,t,e,i,s,n,r,o,a))})},60561:(t,e,i)=>{i(29747);var s=i(51503),i=i(79590);t.exports={renderWebGL:s,renderCanvas:i}},51503:(t,e,i)=>{var y=i(91296),x=i(70554);t.exports=function(t,e,i,s){i.addToRenderList(e);var n,r,o,a,h,l,u,c,d,p=t.pipelines.set(e.pipeline),s=y(e,i,s),s=p.calcMatrix.copyFrom(s.calc),f=e.width,g=e.height,m=f/2,f=f/e.projection,v=e.isReversed,i=i.alpha*e.alpha;e.isFilled&&(t.pipelines.preBatch(e),e.showTop&&v&&(n=x.getTintAppendFloatAlpha(e.fillTop,i),r=s.getX(-m,-g),o=s.getY(-m,-g),a=s.getX(0,-f-g),h=s.getY(0,-f-g),l=s.getX(m,-g),u=s.getY(m,-g),c=s.getX(0,f-g),d=s.getY(0,f-g),p.batchQuad(e,r,o,a,h,l,u,c,d,0,0,1,1,n,n,n,n,2)),e.showLeft&&(n=x.getTintAppendFloatAlpha(e.fillLeft,i),u=(l=(h=(a=(o=v?(r=s.getX(-m,-g),s.getY(-m,-g)):(r=s.getX(-m,0),s.getY(-m,0)),s.getX(0,f)),s.getY(0,f)),s.getX(0,f-g)),s.getY(0,f-g)),p.batchTri(e,r,o,a,h,l,u,0,0,1,1,n,n,n,2)),e.showRight&&(n=x.getTintAppendFloatAlpha(e.fillRight,i),u=(l=(h=(a=(o=v?(r=s.getX(m,-g),s.getY(m,-g)):(r=s.getX(m,0),s.getY(m,0)),s.getX(0,f)),s.getY(0,f)),s.getX(0,f-g)),s.getY(0,f-g)),p.batchTri(e,r,o,a,h,l,u,0,0,1,1,n,n,n,2)),t.pipelines.postBatch(e))}},57847:(t,e,i)=>{var s=i(83419),l=i(17803),u=i(23031),i=i(36823),s=new s({Extends:l,Mixins:[i],initialize:function(t,e,i,s,n,r,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),l.call(this,t,"Line",new u(s=void 0===s?0:s,n=void 0===n?0:n,r=void 0===r?128:r,o=void 0===o?0:o));t=Math.max(1,this.geom.right-this.geom.left),s=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(e,i),this.setSize(t,s),void 0!==a&&this.setStrokeStyle(1,a,h),this.updateDisplayOrigin()},setLineWidth:function(t,e){return void 0===e&&(e=t),this._startWidth=t,this._endWidth=e,this.lineWidth=t,this},setTo:function(t,e,i,s){return this.geom.setTo(t,e,i,s),this}});t.exports=s},17440:(t,e,i)=>{var r=i(75177),o=i(20926);t.exports=function(t,e,i,s){i.addToRenderList(e);var n=t.currentContext;o(t,n,e,i,s)&&(t=e._displayOriginX,i=e._displayOriginY,e.isStroked&&(r(n,e),n.beginPath(),n.moveTo(e.geom.x1-t,e.geom.y1-i),n.lineTo(e.geom.x2-t,e.geom.y2-i),n.stroke()),n.restore())}},2481:(t,e,i)=>{var s=i(39429),h=i(57847);s.register("line",function(t,e,i,s,n,r,o,a){return this.displayList.add(new h(this.scene,t,e,i,s,n,r,o,a))})},36823:(t,e,i)=>{i(29747);var s=i(77385),i=i(17440);t.exports={renderWebGL:s,renderCanvas:i}},77385:(t,e,i)=>{var h=i(91296),l=i(70554);t.exports=function(t,e,i,s){i.addToRenderList(e);var n,r=t.pipelines.set(e.pipeline),s=h(e,i,s),o=(r.calcMatrix.copyFrom(s.calc),e._displayOriginX),a=e._displayOriginY,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isStroked&&(n=r.strokeTint,i=l.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*i),n.TL=i,n.TR=i,n.BL=i,n.BR=i,r.batchLine(e.geom.x1-o,e.geom.y1-a,e.geom.x2-o,e.geom.y2-a,e._startWidth/2,e._endWidth/2,1,0,!1,s.sprite,s.camera)),t.pipelines.postBatch(e)}},24949:(t,e,i)=>{var s=i(90273),n=i(83419),r=i(94811),o=i(13829),a=i(25717),h=i(17803),l=i(5469),i=new n({Extends:h,Mixins:[s],initialize:function(t,e,i,s,n,r){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Polygon",new a(s));t=o(this.geom);this.setPosition(e,i),this.setSize(t.width,t.height),void 0!==n&&this.setFillStyle(n,r),this.updateDisplayOrigin(),this.updateData()},smooth:function(t){void 0===t&&(t=1);for(var e=0;e{var d=i(65960),p=i(75177),f=i(20926);t.exports=function(t,e,i,s){i.addToRenderList(e);var n=t.currentContext;if(f(t,n,e,i,s)){var r=e._displayOriginX,o=e._displayOriginY,a=e.pathData,h=a.length-1,t=a[0]-r,i=a[1]-o;n.beginPath(),n.moveTo(t,i),e.closePath||(h-=2);for(var l=2;l{var s=i(39429),r=i(24949);s.register("polygon",function(t,e,i,s,n){return this.displayList.add(new r(this.scene,t,e,i,s,n))})},90273:(t,e,i)=>{i(29747);var s=i(73695),i=i(38710);t.exports={renderWebGL:s,renderCanvas:i}},73695:(t,e,i)=>{var a=i(10441),h=i(91296),l=i(34682);t.exports=function(t,e,i,s){i.addToRenderList(e);var n=t.pipelines.set(e.pipeline),s=h(e,i,s),s=n.calcMatrix.copyFrom(s.calc),r=e._displayOriginX,o=e._displayOriginY,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&a(n,s,e,i,r,o),e.isStroked&&l(n,e,i,r,o),t.pipelines.postBatch(e)}},74561:(t,e,i)=>{var s=i(83419),a=i(87841),h=i(17803),i=i(95597),s=new s({Extends:h,Mixins:[i],initialize:function(t,e,i,s,n,r,o){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Rectangle",new a(0,0,s=void 0===s?128:s,n=void 0===n?128:n)),this.setPosition(e,i),this.setSize(s,n),void 0!==r&&this.setFillStyle(r,o),this.updateDisplayOrigin(),this.updateData()},setSize:function(t,e){this.width=t,this.height=e,this.geom.setSize(t,e),this.updateData(),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=s},48682:(t,e,i)=>{var r=i(65960),o=i(75177),a=i(20926);t.exports=function(t,e,i,s){i.addToRenderList(e);var n=t.currentContext;a(t,n,e,i,s)&&(t=e._displayOriginX,i=e._displayOriginY,e.isFilled&&(r(n,e),n.fillRect(-t,-i,e.width,e.height)),e.isStroked&&(o(n,e),n.beginPath(),n.rect(-t,-i,e.width,e.height),n.stroke()),n.restore())}},87959:(t,e,i)=>{var s=i(39429),o=i(74561);s.register("rectangle",function(t,e,i,s,n,r){return this.displayList.add(new o(this.scene,t,e,i,s,n,r))})},95597:(t,e,i)=>{i(29747);var s=i(52059),i=i(48682);t.exports={renderWebGL:s,renderCanvas:i}},52059:(t,e,i)=>{var h=i(91296),l=i(34682),u=i(70554);t.exports=function(t,e,i,s){i.addToRenderList(e);var n,r,o=t.pipelines.set(e.pipeline),s=h(e,i,s),s=(o.calcMatrix.copyFrom(s.calc),e._displayOriginX),a=e._displayOriginY,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&(n=o.fillTint,r=u.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*i),n.TL=r,n.TR=r,n.BL=r,n.BR=r,o.batchFillRect(-s,-a,e.width,e.height)),e.isStroked&&l(o,e,i,s,a),t.pipelines.postBatch(e)}},55911:(t,e,i)=>{var s=i(81991),n=i(83419),l=i(94811),h=i(17803),i=new n({Extends:h,Mixins:[s],initialize:function(t,e,i,s,n,r,o,a){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=5),void 0===n&&(n=32),void 0===r&&(r=64),h.call(this,t,"Star",null),this._points=s,this._innerRadius=n,this._outerRadius=r,this.setPosition(e,i),this.setSize(2*r,2*r),void 0!==o&&this.setFillStyle(o,a),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,s=this._outerRadius,n=Math.PI/2*3,r=Math.PI/e,o=s,a=s;t.push(o,a+-s);for(var h=0;h{var d=i(65960),p=i(75177),f=i(20926);t.exports=function(t,e,i,s){i.addToRenderList(e);var n=t.currentContext;if(f(t,n,e,i,s)){var r=e._displayOriginX,o=e._displayOriginY,a=e.pathData,h=a.length-1,t=a[0]-r,i=a[1]-o;n.beginPath(),n.moveTo(t,i),e.closePath||(h-=2);for(var l=2;l{var a=i(55911);i(39429).register("star",function(t,e,i,s,n,r,o){return this.displayList.add(new a(this.scene,t,e,i,s,n,r,o))})},81991:(t,e,i)=>{i(29747);var s=i(57017),i=i(64272);t.exports={renderWebGL:s,renderCanvas:i}},57017:(t,e,i)=>{var a=i(10441),h=i(91296),l=i(34682);t.exports=function(t,e,i,s){i.addToRenderList(e);var n=t.pipelines.set(e.pipeline),s=h(e,i,s),s=n.calcMatrix.copyFrom(s.calc),r=e._displayOriginX,o=e._displayOriginY,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&a(n,s,e,i,r,o),e.isStroked&&l(n,e,i,r,o),t.pipelines.postBatch(e)}},36931:(t,e,i)=>{var s=i(83419),c=i(17803),d=i(16483),i=i(96195),s=new s({Extends:c,Mixins:[i],initialize:function(t,e,i,s,n,r,o,a,h,l,u){void 0===e&&(e=0),void 0===i&&(i=0),c.call(this,t,"Triangle",new d(s=void 0===s?0:s,n=void 0===n?128:n,r=void 0===r?64:r,o=void 0===o?0:o,a=void 0===a?128:a,h=void 0===h?128:h));t=this.geom.right-this.geom.left,s=this.geom.bottom-this.geom.top;this.setPosition(e,i),this.setSize(t,s),void 0!==l&&this.setFillStyle(l,u),this.updateDisplayOrigin(),this.updateData()},setTo:function(t,e,i,s,n,r){return this.geom.setTo(t,e,i,s,n,r),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=s},85172:(t,e,i)=>{var h=i(65960),l=i(75177),u=i(20926);t.exports=function(t,e,i,s){i.addToRenderList(e);var n,r,o,a=t.currentContext;u(t,a,e,i,s)&&(t=e._displayOriginX,i=e.geom.x1-t,n=e.geom.y1-(s=e._displayOriginY),r=e.geom.x2-t,o=e.geom.y2-s,t=e.geom.x3-t,s=e.geom.y3-s,a.beginPath(),a.moveTo(i,n),a.lineTo(r,o),a.lineTo(t,s),a.closePath(),e.isFilled&&(h(a,e),a.fill()),e.isStroked&&(l(a,e),a.stroke()),a.restore())}},45245:(t,e,i)=>{var s=i(39429),u=i(36931);s.register("triangle",function(t,e,i,s,n,r,o,a,h,l){return this.displayList.add(new u(this.scene,t,e,i,s,n,r,o,a,h,l))})},96195:(t,e,i)=>{i(29747);var s=i(83253),i=i(85172);t.exports={renderWebGL:s,renderCanvas:i}},83253:(t,e,i)=>{var p=i(91296),f=i(34682),g=i(70554);t.exports=function(t,e,i,s){i.addToRenderList(e);var n,r,o,a,h,l,u=t.pipelines.set(e.pipeline),s=p(e,i,s),c=(u.calcMatrix.copyFrom(s.calc),e._displayOriginX),d=e._displayOriginY,i=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&(n=u.fillTint,r=g.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*i),n.TL=r,n.TR=r,n.BL=r,n.BR=r,n=e.geom.x1-c,r=e.geom.y1-d,o=e.geom.x2-c,a=e.geom.y2-d,h=e.geom.x3-c,l=e.geom.y3-d,u.batchFillTriangle(n,r,o,a,h,l,s.sprite,s.camera)),e.isStroked&&f(u,e,i,c,d),t.pipelines.postBatch(e)}},68287:(t,e,i)=>{var r=i(9674),s=i(83419),n=i(31401),o=i(95643),i=i(92751),s=new s({Extends:o,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.PostPipeline,n.ScrollFactor,n.Size,n.TextureCrop,n.Tint,n.Transform,n.Visible,i],initialize:function(t,e,i,s,n){o.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new r(this),this.setTexture(s,n),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e){return this.anims.play(t,e)},playReverse:function(t,e){return this.anims.playReverse(t,e)},playAfterDelay:function(t,e){return this.anims.playAfterDelay(t,e)},playAfterRepeat:function(t,e){return this.anims.playAfterRepeat(t,e)},chain:function(t){return this.anims.chain(t)},stop:function(){return this.anims.stop()},stopAfterDelay:function(t){return this.anims.stopAfterDelay(t)},stopAfterRepeat:function(t){return this.anims.stopAfterRepeat(t)},stopOnFrame:function(t){return this.anims.stopOnFrame(t)},toJSON:function(){return n.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=s},76552:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},15567:(t,e,i)=>{var n=i(25305),r=i(13059),s=i(44603),o=i(23568),a=i(68287);s.register("sprite",function(t,e){var i=o(t=void 0===t?{}:t,"key",null),s=o(t,"frame",null),i=new a(this.scene,0,0,i,s);return void 0!==e&&(t.add=e),n(this.scene,i,t),r(i,t),i})},46409:(t,e,i)=>{var s=i(39429),n=i(68287);s.register("sprite",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},92751:(t,e,i)=>{i(29747);var s=i(9409),i=i(76552);t.exports={renderWebGL:s,renderCanvas:i}},9409:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),e.pipeline.batchSprite(e,i,s)}},14220:t=>{t.exports=function(t,e,i){var s=t.canvas,n=t.context,r=t.style,o=[],a=0,h=i.length;0{var p=i(27919);t.exports=function(t){var e=p.create(this),i=e.getContext("2d",{willReadFrequently:!0}),s=(t.syncFont(e,i),i.measureText(t.testString));if("actualBoundingBoxAscent"in s)return n=s.actualBoundingBoxAscent,r=s.actualBoundingBoxDescent,p.remove(e),{ascent:n,descent:r,fontSize:n+r};var n=Math.ceil(s.width*t.baselineX),r=2*n,o=n*t.baselineY|0,s=(e.width=n,e.height=r,i.fillStyle="#f00",i.fillRect(0,0,n,r),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,o),{ascent:0,descent:0,fontSize:0}),t=i.getImageData(0,0,n,r);if(t){for(var a,h=t.data,i=h.length,l=4*n,u=0,c=!1,d=0;d{var s=i(40366),r=i(27919),n=i(83419),o=i(31401),a=i(95643),C=i(14220),h=i(35154),l=i(35846),u=i(61771),c=i(35762),d=i(45650),i=new n({Extends:a,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.PostPipeline,o.ScrollFactor,o.Tint,o.Transform,o.Visible,u],initialize:function(t,e,i,s,n){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Text"),this.renderer=t.sys.renderer,this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(!0),this.canvas=r.create(this),this.context,this.style=new c(this,n),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this._text=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.lineSpacing=0,(this.letterSpacing=0)===this.style.resolution&&(this.style.resolution=1),this._crop=this.resetCropObject(),this._textureKey=d(),this.texture=t.sys.textures.addCanvas(this._textureKey,this.canvas),this.context=this.texture.context,this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(s),n&&n.padding&&this.setPadding(n.padding),n&&n.lineSpacing&&this.setLineSpacing(n.lineSpacing)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",s(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(t){var e,i=this.style;return i.wordWrapCallback?(e=i.wordWrapCallback.call(i.wordWrapCallbackScope,t,this),Array.isArray(e)?e.join("\n"):e):i.wordWrapWidth?i.wordWrapUseAdvanced?this.advancedWordWrap(t,this.context,this.style.wordWrapWidth):this.basicWordWrap(t,this.context,this.style.wordWrapWidth):t},advancedWordWrap:function(t,e,i){for(var s="",n=t.replace(/ +/gi," ").split(this.splitRegExp),r=n.length,o=0;o{t.exports=function(t,e,i,s){0!==e.width&&0!==e.height&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,s))}},71259:(t,e,i)=>{var r=i(25305),s=i(44603),o=i(23568),a=i(50171);s.register("text",function(t,e){var i=o(t=void 0===t?{}:t,"text",""),s=o(t,"style",null),n=o(t,"padding",null),n=(null!==n&&(s.padding=n),new a(this.scene,0,0,i,s));return void 0!==e&&(t.add=e),r(this.scene,n,t),n.autoRound=o(t,"autoRound",!0),n.resolution=o(t,"resolution",1),n})},68005:(t,e,i)=>{var n=i(50171);i(39429).register("text",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},61771:(t,e,i)=>{i(29747);var s=i(34397),i=i(79724);t.exports={renderWebGL:s,renderCanvas:i}},35762:(t,e,i)=>{var s=i(83419),o=i(23568),a=i(35154),h=i(79557),l={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},i=new s({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this.wordWrapWidth,this.wordWrapCallback,this.wordWrapCallbackScope,this.wordWrapUseAdvanced,this._font,this.setStyle(e,!1,!0)},setStyle:function(t,e,i){for(var s in void 0===e&&(e=!0),void 0===i&&(i=!1),l){var n=i?l[s][1]:this[s];"wordWrapCallback"===s||"wordWrapCallbackScope"===s?this[s]=a(t,l[s][0],n):t&&"fontSize"===s&&"number"==typeof t.fontSize?this[s]=t.fontSize.toString()+"px":this[s]=o(t,l[s][0],n)}var r=a(t,"font",null),r=(null!==r&&this.setFont(r,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),a(t,"fill",null)),r=(null!==r&&(this.color=r),a(t,"metrics",!1));return r?this.metrics={ascent:a(r,"ascent",0),descent:a(r,"descent",0),fontSize:a(r,"fontSize",0)}:!e&&this.metrics||(this.metrics=h(this)),e?this.parent.updateText():this.parent},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow:function(t,e){e?(t.shadowOffsetX=this.shadowOffsetX,t.shadowOffsetY=this.shadowOffsetY,t.shadowColor=this.shadowColor,t.shadowBlur=this.shadowBlur):(t.shadowOffsetX=0,t.shadowOffsetY=0,t.shadowColor=0,t.shadowBlur=0)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=h(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i,s=t,n="",r="";return"string"!=typeof t?(s=a(t,"fontFamily","Courier"),n=a(t,"fontSize","16px"),r=a(t,"fontStyle","")):(i=0,r=2<(t=t.split(" ")).length?t[i++]:"",n=t[i++]||"16px",s=t[i++]||"Courier"),s===this.fontFamily&&n===this.fontSize&&r===this.fontStyle||(this.fontFamily=s,this.fontSize=n,this.fontStyle=r,e&&this.update(!0)),this.parent},setFontFamily:function(t){return this.fontFamily!==t&&(this.fontFamily=t,this.update(!0)),this.parent},setFontStyle:function(t){return this.fontStyle!==t&&(this.fontStyle=t,this.update(!0)),this.parent},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize!==t&&(this.fontSize=t,this.update(!0)),this.parent},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setResolution:function(t){return this.resolution=t,this.update(!1)},setStroke:function(t,e){return void 0===e&&(e=this.strokeThickness),void 0===t&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):this.stroke===t&&this.strokeThickness===e||(this.stroke=t,this.strokeThickness=e,this.update(!0)),this.parent},setShadow:function(t,e,i,s,n,r){return void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===s&&(s=0),void 0===n&&(n=!1),void 0===r&&(r=!0),this.shadowOffsetX=t=void 0===t?0:t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=s,this.shadowStroke=n,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return this.shadowColor=t=void 0===t?"#000":t,this.update(!1)},setShadowBlur:function(t){return this.shadowBlur=t=void 0===t?0:t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return this.align=t=void 0===t?"left":t,this.update(!1)},setMaxLines:function(t){return this.maxLines=t=void 0===t?0:t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t,e={};for(t in l)e[t]=this[t];return e.metrics=this.getTextMetrics(),e},destroy:function(){this.parent=void 0}});t.exports=i},34397:(t,e,i)=>{var l=i(70554);t.exports=function(t,e,i,s){var n,r,o,a,h;0!==e.width&&0!==e.height&&(i.addToRenderList(e),r=(n=e.frame).width,o=n.height,a=l.getTintAppendFloatAlpha,h=(t=t.pipelines.set(e.pipeline,e)).setTexture2D(n.glTexture,e),t.batchTexture(e,n.glTexture,r,o,e.x,e.y,r/e.style.resolution,o/e.style.resolution,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,r,o,a(e.tintTopLeft,i.alpha*e._alphaTL),a(e.tintTopRight,i.alpha*e._alphaTR),a(e.tintBottomLeft,i.alpha*e._alphaBL),a(e.tintBottomRight,i.alpha*e._alphaBR),e.tintFill,0,0,i,s,!1,h))}},20839:(t,e,i)=>{var l=i(27919),s=i(83419),n=i(31401),u=i(95643),c=i(98439),r=i(68703),o=i(56295),d=i(45650),p=i(26099),i=new s({Extends:u,Mixins:[n.Alpha,n.BlendMode,n.ComputedSize,n.Crop,n.Depth,n.Flip,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.PostPipeline,n.ScrollFactor,n.Tint,n.Transform,n.Visible,o],initialize:function(t,e,i,s,n,r,o){var a=t.sys.renderer,r=(u.call(this,t,"TileSprite"),t.sys.textures.get(r)),h=r.get(o);h.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed texture"),h=(r=t.sys.textures.get("__MISSING")).get()),"DynamicTexture"===r.type&&(console.warn("TileSprite cannot use Dynamic Texture"),h=(r=t.sys.textures.get("__MISSING")).get()),n=s&&n?(s=Math.floor(s),Math.floor(n)):(s=s||h.width,n||h.height),this._tilePosition=new p,this._tileScale=new p(1,1),this.dirty=!1,this.renderer=a,this.canvas=l.create(this,s,n),this.context=this.canvas.getContext("2d",{willReadFrequently:!1}),this.displayTexture=r,this.displayFrame=h,this._crop=this.resetCropObject(),this._textureKey=d(),this.texture=t.sys.textures.addCanvas(this._textureKey,this.canvas),this.frame=this.texture.get(),this.potWidth=c(h.width),this.potHeight=c(h.height),this.fillCanvas=l.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d",{willReadFrequently:!1}),this.fillPattern=null,this.setPosition(e,i),this.setSize(s,n),this.setFrame(o),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){t=this.displayTexture.get(t);return this.potWidth=c(t.width),this.potHeight=c(t.height),this.canvas.width=0,t.cutWidth&&t.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=t,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileScale:function(t,e){return void 0===t&&(t=this.tileScaleX),void 0===e&&(e=t),this.tileScaleX=t,this.tileScaleY=e,this},updateTileTexture:function(){var t,e,i,s,n;this.dirty&&this.renderer&&((t=this.displayFrame).source.isRenderTexture||t.source.isGLTexture?console.warn("TileSprites can only use Image or Canvas based textures"):(e=this.fillContext,i=this.fillCanvas,s=this.potWidth,n=this.potHeight,this.renderer&&this.renderer.gl||(s=t.cutWidth,n=t.cutHeight),e.clearRect(0,0,s,n),i.width=s,i.height=n,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,s,n),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas()),this.dirty=!1)},updateCanvas:function(){var t,e,i,s,n=this.canvas;n.width===this.width&&n.height===this.height||(n.width=this.width,n.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl||(n=this.context,this.scene.sys.game.config.antialias||r.disable(n),t=this._tileScale.x,e=this._tileScale.y,i=this._tilePosition.x,s=this._tilePosition.y,n.clearRect(0,0,this.width,this.height),n.save(),n.scale(t,e),n.translate(-i,-s),n.fillStyle=this.fillPattern,n.fillRect(i,s,this.width/t,this.height/e),n.restore()),this.dirty=!1},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),l.remove(this.canvas),l.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null;var t=this.texture;t&&t.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}});t.exports=i},46992:t=>{t.exports=function(t,e,i,s){e.updateCanvas(),i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},14167:(t,e,i)=>{var h=i(25305),s=i(44603),l=i(23568),u=i(20839);s.register("tileSprite",function(t,e){var i=l(t=void 0===t?{}:t,"x",0),s=l(t,"y",0),n=l(t,"width",512),r=l(t,"height",512),o=l(t,"key",""),a=l(t,"frame",""),i=new u(this.scene,i,s,n,r,o,a);return void 0!==e&&(t.add=e),h(this.scene,i,t),i})},91681:(t,e,i)=>{var o=i(20839);i(39429).register("tileSprite",function(t,e,i,s,n,r){return this.displayList.add(new o(this.scene,t,e,i,s,n,r))})},56295:(t,e,i)=>{i(29747);var s=i(18553),i=i(46992);t.exports={renderWebGL:s,renderCanvas:i}},18553:(t,e,i)=>{var h=i(70554);t.exports=function(t,e,i,s){e.updateCanvas();var n,r,o=e.width,a=e.height;0!==o&&0!==a&&(i.addToRenderList(e),n=h.getTintAppendFloatAlpha,r=(t=t.pipelines.set(e.pipeline,e)).setTexture2D(e.fillPattern,e),t.batchTexture(e,e.fillPattern,e.displayFrame.width*e.tileScaleX,e.displayFrame.height*e.tileScaleY,e.x,e.y,o,a,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.originX*o,e.originY*a,0,0,o,a,n(e.tintTopLeft,i.alpha*e._alphaTL),n(e.tintTopRight,i.alpha*e._alphaTR),n(e.tintBottomLeft,i.alpha*e._alphaBL),n(e.tintBottomRight,i.alpha*e._alphaBR),e.tintFill,e.tilePositionX%e.displayFrame.width/e.displayFrame.width,e.tilePositionY%e.displayFrame.height/e.displayFrame.height,i,s,!1,r))}},18471:(t,e,i)=>{var s=i(45319),n=i(83419),r=i(31401),h=i(51708),o=i(8443),a=i(95643),l=i(36383),u=i(14463),c=i(45650),i=i(10247),n=new n({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.PostPipeline,r.ScrollFactor,r.TextureCrop,r.Tint,r.Transform,r.Visible,i],initialize:function(t,e,i,s){a.call(this,t,"Video"),this.video,this.videoTexture,this.videoTextureSource,this.snapshotTexture,this.flipY=!1,this._key=c(),this.touchLocked=!1,this.playWhenUnlocked=!1,this.frameReady=!1,this.isStalled=!1,this.failedPlayAttempts=0,this.metadata,this.retry=0,this.retryInterval=500,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={ended:this.completeHandler.bind(this),legacy:this.legacyPlayHandler.bind(this),playing:this.playingHandler.bind(this),seeked:this.seekedHandler.bind(this),seeking:this.seekingHandler.bind(this),stalled:this.stalledHandler.bind(this),suspend:this.stalledHandler.bind(this),waiting:this.stalledHandler.bind(this)},this._loadCallbackHandler=this.loadErrorHandler.bind(this),this._metadataCallbackHandler=this.metadataHandler.bind(this),this._crop=this.resetCropObject(),this.markers={},this._markerIn=0,this._markerOut=0,this._playingMarker=!1,this._lastUpdate=0,this.cacheKey="",this.isSeeking=!1,this._playCalled=!1,this._getFrame=!1,this._rfvCallbackId=0;var n=t.sys.game,e=(this._device=n.device.video,this.setPosition(e,i),this.setSize(256,256),this.initPipeline(),this.initPostPipeline(!0),n.events.on(o.PAUSE,this.globalPause,this),n.events.on(o.RESUME,this.globalResume,this),t.sys.sound);e&&e.on(u.GLOBAL_MUTE,this.globalMute,this),s&&this.load(s)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(t){var e=this.scene.sys.cache.video.get(t);return e?(this.cacheKey=t,this.loadHandler(e.url,e.noAudio,e.crossOrigin)):console.warn("No video in cache for key: "+t),this},changeSource:function(t,e,i,s,n){void 0===e&&(e=!0),void 0===i&&(i=!1),this.cacheKey!==t&&(this.load(t),e)&&this.play(i,s,n)},getVideoKey:function(){return this.cacheKey},loadURL:function(t,e,i){void 0===e&&(e=!1);var s=this._device.getVideoURL(t);return s?(this.cacheKey="",this.loadHandler(s.url,e,i)):console.warn("No supported video format found for "+t),this},loadMediaStream:function(t,e,i){return this.loadHandler(null,e,i,t)},loadHandler:function(t,e,i,s){e=e||!1;var n=this.video;if(n?(this.removeLoadEventHandlers(),this.stop()):((n=document.createElement("video")).controls=!1,n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),n.setAttribute("disablePictureInPicture","true")),e?(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")):(n.muted=!1,n.defaultMuted=!1,n.removeAttribute("autoplay")),i?n.setAttribute("crossorigin",i):n.removeAttribute("crossorigin"),s)if("srcObject"in n)try{n.srcObject=s}catch(t){if("TypeError"!==t.name)throw t;n.src=URL.createObjectURL(s)}else n.src=URL.createObjectURL(s);else n.src=t;this.retry=0,this.video=n,this._playCalled=!1,n.load(),this.addLoadEventHandlers();e=this.scene.sys.textures.get(this._key);return this.setTexture(e),this},requestVideoFrame:function(t,e){var i,s,n,r,o,a=this.video;a&&(i=e.width,s=e.height,o=this.videoTexture,n=this.videoTextureSource,(r=!o||n.source!==a)?(this._codePaused=a.paused,this._codeMuted=a.muted,o?(n.source=a,n.width=i,n.height=s,o.get().setSize(i,s)):((o=this.scene.sys.textures.create(this._key,a,i,s)).add("__BASE",0,0,0,i,s),this.setTexture(o),this.videoTexture=o,this.videoTextureSource=o.source[0],this.videoTextureSource.setFlipY(this.flipY),this.emit(h.VIDEO_TEXTURE,this,o)),this.setSizeToFrame(),this.updateDisplayOrigin()):n.update(),this.isStalled=!1,o=(this.metadata=e).mediaTime,r&&(this._lastUpdate=o,this.emit(h.VIDEO_CREATED,this,i,s),this.frameReady||(this.frameReady=!0,this.emit(h.VIDEO_PLAY,this))),this._playingMarker?o>=this._markerOut&&(a.loop?(a.currentTime=this._markerIn,this.emit(h.VIDEO_LOOP,this)):(this.stop(!1),this.emit(h.VIDEO_COMPLETE,this))):o=this.retryInterval)&&(this.createPlayPromise(!1),this.retry=0)},seekTo:function(t){var e=this.video;return e&&(e=e.duration)!==1/0&&!isNaN(e)&&this.setCurrentTime(e*t),this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e,i,s=this.video;return s&&("string"==typeof t&&(e=t[0],i=parseFloat(t.substr(1)),"+"===e?t=s.currentTime+i:"-"===e&&(t=s.currentTime-i)),s.currentTime=t),this},seekingHandler:function(){this.isSeeking=!0,this.emit(h.VIDEO_SEEKING,this)},seekedHandler:function(){this.isSeeking=!1,this.emit(h.VIDEO_SEEKED,this)},getProgress:function(){var t=this.video;if(t){var e=t.duration;if(e!==1/0&&!isNaN(e))return t.currentTime/e}return-1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){this._codeMuted=t=void 0===t?!0:t;var e=this.video;return e&&(e.muted=!!this._systemMuted||t),this},isMuted:function(){return this._codeMuted},globalMute:function(t,e){this._systemMuted=e;var i=this.video;i&&(i.muted=!!this._codeMuted||e)},globalPause:function(){this._systemPaused=!0,this.video&&!this.video.ended&&(this.removeEventHandlers(),this.video.pause())},globalResume:function(){this._systemPaused=!1,!this.video||this._codePaused||this.video.ended||this.createPlayPromise()},setPaused:function(t){var e=this.video;return this._codePaused=t=void 0===t?!0:t,e&&!e.ended&&(t?e.paused||(this.removeEventHandlers(),e.pause()):this._playCalled?e.paused&&!this._systemPaused&&this.createPlayPromise():this.play()),this},pause:function(){return this.setPaused(!0)},resume:function(){return this.setPaused(!1)},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(t){return void 0===t&&(t=1),this.video&&(this.video.volume=s(t,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(t){return this.video&&(this.video.playbackRate=t),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(t){return void 0===t&&(t=!0),this.video&&(this.video.loop=t),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this._playCalled&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!1),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,t),this.videoTextureSource.setFlipY(e)),this._key=t,this.flipY=e,!!this.videoTexture},stop:function(t){void 0===t&&(t=!0);var e=this.video;return e&&(this.removeEventHandlers(),e.cancelVideoFrameCallback(this._rfvCallbackId),e.pause()),this.retry=0,this._playCalled=!1,t&&this.emit(h.VIDEO_STOP,this),this},removeVideoElement:function(){var t=this.video;if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("autoplay"),t.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(!1),this.removeLoadEventHandlers(),this.removeVideoElement();var t=this.scene.sys.game.events,t=(t.off(o.PAUSE,this.globalPause,this),t.off(o.RESUME,this.globalResume,this),this.scene.sys.sound);t&&t.off(u.GLOBAL_MUTE,this.globalMute,this)}});t.exports=n},58352:t=>{t.exports=function(t,e,i,s){e.videoTexture&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,s))}},11511:(t,e,i)=>{var s=i(25305),n=i(44603),r=i(23568),o=i(18471);n.register("video",function(t,e){var i=r(t=void 0===t?{}:t,"key",null),i=new o(this.scene,0,0,i);return void 0!==e&&(t.add=e),s(this.scene,i,t),i})},89025:(t,e,i)=>{var s=i(18471);i(39429).register("video",function(t,e,i){return this.displayList.add(new s(this.scene,t,e,i))})},10247:(t,e,i)=>{i(29747);var s=i(29849),i=i(58352);t.exports={renderWebGL:s,renderCanvas:i}},29849:t=>{t.exports=function(t,e,i,s){e.videoTexture&&(i.addToRenderList(e),e.pipeline.batchSprite(e,i,s))}},41481:(t,e,i)=>{var r=i(10312),s=i(96503),n=i(87902),o=i(83419),a=i(31401),h=i(95643),l=i(87841),u=i(37303),i=new o({Extends:h,Mixins:[a.Depth,a.GetBounds,a.Origin,a.Transform,a.ScrollFactor,a.Visible],initialize:function(t,e,i,s,n){void 0===s&&(s=1),void 0===n&&(n=s),h.call(this,t,"Zone"),this.setPosition(e,i),this.width=s,this.height=n,this.blendMode=r.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e,i){void 0===i&&(i=!0),this.width=t,this.height=e,this.updateDisplayOrigin();var s=this.input;return i&&s&&!s.customHitArea&&(s.hitArea.width=t,s.hitArea.height=e),this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},setCircleDropZone:function(t){return this.setDropZone(new s(0,0,t),n)},setRectangleDropZone:function(t,e){return this.setDropZone(new l(0,0,t,e),u)},setDropZone:function(t,e){return this.input||this.setInteractive(t,e,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(t,e,i){i.addToRenderList(e)},renderWebGL:function(t,e,i){i.addToRenderList(e)}});t.exports=i},95261:(t,e,i)=>{var s=i(44603),n=i(23568),r=i(41481);s.register("zone",function(t){var e=n(t,"x",0),i=n(t,"y",0),s=n(t,"width",1),t=n(t,"height",s);return new r(this.scene,e,i,s,t)})},84175:(t,e,i)=>{var n=i(41481);i(39429).register("zone",function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))})},95166:t=>{t.exports=function(t){return 0{var s=i(83419),n=i(87902),r=i(26241),o=i(79124),a=i(23777),h=i(28176),i=new s({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.type=a.CIRCLE,this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=i},71562:t=>{t.exports=function(t){return Math.PI*t.radius*2}},92110:(t,e,i)=>{var s=i(2141);t.exports=function(t,e,i){return(i=void 0===i?new s:i).x=t.x+t.radius*Math.cos(e),i.y=t.y+t.radius*Math.sin(e),i}},42250:(t,e,i)=>{var s=i(96503);t.exports=function(t){return new s(t.x,t.y,t.radius)}},87902:t=>{t.exports=function(t,e,i){return 0=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},5698:(t,e,i)=>{var s=i(87902);t.exports=function(t,e){return s(t,e.x,e.y)}},70588:(t,e,i)=>{var s=i(87902);t.exports=function(t,e){return s(t,e.x,e.y)&&s(t,e.right,e.y)&&s(t,e.x,e.bottom)&&s(t,e.right,e.bottom)}},26394:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},76278:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},2074:(t,e,i)=>{var s=i(87841);t.exports=function(t,e){return(e=void 0===e?new s:e).x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},26241:(t,e,i)=>{var s=i(92110),n=i(62945),r=i(36383),o=i(2141);t.exports=function(t,e,i){void 0===i&&(i=new o);e=n(e,0,r.PI2);return s(t,e,i)}},79124:(t,e,i)=>{var o=i(71562),a=i(92110),h=i(62945),l=i(36383);t.exports=function(t,e,i,s){void 0===s&&(s=[]),!e&&0{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},39212:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},28176:(t,e,i)=>{var r=i(2141);t.exports=function(t,e){void 0===e&&(e=new r);var i=2*Math.PI*Math.random(),s=Math.random()+Math.random(),s=1{var s=i(96503);s.Area=i(95166),s.Circumference=i(71562),s.CircumferencePoint=i(92110),s.Clone=i(42250),s.Contains=i(87902),s.ContainsPoint=i(5698),s.ContainsRect=i(70588),s.CopyFrom=i(26394),s.Equals=i(76278),s.GetBounds=i(2074),s.GetPoint=i(26241),s.GetPoints=i(79124),s.Offset=i(50884),s.OffsetPoint=i(39212),s.Random=i(28176),t.exports=s},23777:t=>{t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},78874:t=>{t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},92990:t=>{t.exports=function(t){var e=t.width/2,t=t.height/2,i=Math.pow(e-t,2)/Math.pow(e+t,2);return Math.PI*(e+t)*(1+3*i/(10+Math.sqrt(4-3*i)))}},79522:(t,e,i)=>{var r=i(2141);t.exports=function(t,e,i){void 0===i&&(i=new r);var s=t.width/2,n=t.height/2;return i.x=t.x+s*Math.cos(e),i.y=t.y+n*Math.sin(e),i}},58102:(t,e,i)=>{var s=i(8497);t.exports=function(t){return new s(t.x,t.y,t.width,t.height)}},81154:t=>{t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(e=(e-t.x)/t.width,(e*=e)+(e=(i-t.y)/t.height)*e<.25)}},46662:(t,e,i)=>{var s=i(81154);t.exports=function(t,e){return s(t,e.x,e.y)}},1632:(t,e,i)=>{var s=i(81154);t.exports=function(t,e){return s(t,e.x,e.y)&&s(t,e.right,e.y)&&s(t,e.x,e.bottom)&&s(t,e.right,e.bottom)}},65534:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},8497:(t,e,i)=>{var s=i(83419),n=i(81154),r=i(90549),o=i(48320),a=i(23777),h=i(24820),i=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=i},36146:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},23694:(t,e,i)=>{var s=i(87841);t.exports=function(t,e){return(e=void 0===e?new s:e).x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},90549:(t,e,i)=>{var s=i(79522),n=i(62945),r=i(36383),o=i(2141);t.exports=function(t,e,i){void 0===i&&(i=new o);e=n(e,0,r.PI2);return s(t,e,i)}},48320:(t,e,i)=>{var o=i(92990),a=i(79522),h=i(62945),l=i(36383);t.exports=function(t,e,i,s){void 0===s&&(s=[]),!e&&0{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},44808:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},24820:(t,e,i)=>{var n=i(2141);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random()*Math.PI*2,s=Math.sqrt(Math.random());return e.x=t.x+s*Math.cos(i)*t.width/2,e.y=t.y+s*Math.sin(i)*t.height/2,e}},49203:(t,e,i)=>{var s=i(8497);s.Area=i(78874),s.Circumference=i(92990),s.CircumferencePoint=i(79522),s.Clone=i(58102),s.Contains=i(81154),s.ContainsPoint=i(46662),s.ContainsRect=i(1632),s.CopyFrom=i(65534),s.Equals=i(36146),s.GetBounds=i(23694),s.GetPoint=i(90549),s.GetPoints=i(48320),s.Offset=i(73424),s.OffsetPoint=i(44808),s.Random=i(24820),t.exports=s},55738:(t,e,i)=>{var s=i(23777),i=i(79291)(!1,{Circle:i(88911),Ellipse:i(49203),Intersects:i(91865),Line:i(2529),Mesh:i(73090),Point:i(43711),Polygon:i(58423),Rectangle:i(93232),Triangle:i(84435)},s);t.exports=i},2044:(t,e,i)=>{var s=i(20339);t.exports=function(t,e){return s(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},81491:t=>{t.exports=function(t,e){var i=e.width/2,s=e.height/2,n=Math.abs(t.x-e.x-i),e=Math.abs(t.y-e.y-s);return!(i+t.radius{var d=i(2141),p=i(2044);t.exports=function(t,e,i){var s,n,r,o,a,h,l,u,c;return void 0===i&&(i=[]),p(t,e)&&(a=t.x,h=t.radius,l=e.x,c=e.radius,(t=t.y)===(e=e.y)?0==(r=(n=-2*e)*n-4*(s=1)*(l*l+(o=(c*c-h*h-l*l+a*a)/(2*(a-l)))*o-2*l*o+e*e-c*c))?i.push(new d(o,-n/(2*s))):0{var o=i(4042),a=i(81491);t.exports=function(t,e,i){var s,n,r;return void 0===i&&(i=[]),a(t,e)&&(s=e.getLineA(),n=e.getLineB(),r=e.getLineC(),e=e.getLineD(),o(s,t,i),o(n,t,i),o(r,t,i),o(e,t,i)),i}},4042:(t,e,i)=>{var d=i(2141),p=i(80462);t.exports=function(t,e,i){var s,n,r,o,a,h,l,u,c;return void 0===i&&(i=[]),p(t,e)&&(s=t.x1,c=e.x,0==(h=(a=2*((n=t.x2-s)*(c=s-c)+(r=t.y2-(t=t.y1))*(h=t-e.y)))*a-4*(o=n*n+r*r)*(c*c+h*h-(c=e.radius)*c))?(l=s+(e=-a/(2*o))*n,u=t+e*r,0<=e&&e<=1&&i.push(new d(l,u))):0{var f=i(25836);t.exports=function(t,e,i,s){var n,r,o,a=t.x1,h=t.y1,l=e.x1,u=e.y1,c=t.x2-a,t=t.y2-h,d=e.x2-l,e=e.y2-u,p=c*e-t*d;if(0==p)return null;if(i=void 0===i?!1:i){if(n=(c*(u-h)+t*(a-l))/(d*t-e*c),0!=c)r=(l+d*n-a)/c;else{if(0==t)return null;r=(u+e*n-h)/t}if(r<0||n<0||1{var h=i(36100),s=i(23031),l=i(25836),u=new s,c=new l;t.exports=function(t,e,i,s){void 0===i&&(i=!1);var n=!1;(s=void 0===s?new l:s).set(),c.set();for(var r=e[e.length-1],o=0;o{var s=i(25836),o=i(61369),a=i(3073),h=new s;t.exports=function(t,e,i,s){void 0===s&&(s=new o),Array.isArray(e)||(e=[e]);var n=!1;s.set(),h.set();for(var r=0;r{var l=i(2141),u=i(76112),c=i(92773);t.exports=function(t,e,i){if(void 0===i&&(i=[]),c(t,e))for(var s=e.getLineA(),n=e.getLineB(),r=e.getLineC(),e=e.getLineD(),o=[new l,new l,new l,new l],a=[u(s,t,o[0]),u(n,t,o[1]),u(r,t,o[2]),u(e,t,o[3])],h=0;h<4;h++)a[h]&&i.push(o[h]);return i}},71147:(t,e,i)=>{var a=i(61369),h=i(56362),l=new(i(23031));function u(t,e,i,s,n){var r=Math.cos(t),o=Math.sin(t),e=(l.setTo(e,i,e+r,i+o),h(l,s,!0));e&&n.push(new a(e.x,e.y,t,e.w))}function c(t,e){return t.z-e.z}t.exports=function(t,e,i){Array.isArray(i)||(i=[i]);for(var s=[],n=[],r=0;r{var s=i(87841),n=i(59996);t.exports=function(t,e,i){return void 0===i&&(i=new s),n(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},52784:(t,e,i)=>{var o=i(60646),a=i(59996);t.exports=function(t,e,i){var s,n,r;return void 0===i&&(i=[]),a(t,e)&&(s=t.getLineA(),n=t.getLineB(),r=t.getLineC(),t=t.getLineD(),o(s,e,i),o(n,e,i),o(r,e,i),o(t,e,i)),i}},26341:(t,e,i)=>{var r=i(89265),o=i(60646);t.exports=function(t,e,i){var s,n;return void 0===i&&(i=[]),r(t,e)&&(s=e.getLineA(),n=e.getLineB(),e=e.getLineC(),o(s,t,i),o(n,t,i),o(e,t,i)),i}},38720:(t,e,i)=>{var r=i(4042),o=i(67636);t.exports=function(t,e,i){var s,n;return void 0===i&&(i=[]),o(t,e)&&(s=t.getLineA(),n=t.getLineB(),t=t.getLineC(),r(s,e,i),r(n,e,i),r(t,e,i)),i}},13882:(t,e,i)=>{var h=i(2141),l=i(2822),u=i(76112);t.exports=function(t,e,i){if(void 0===i&&(i=[]),l(t,e))for(var s=t.getLineA(),n=t.getLineB(),t=t.getLineC(),r=[new h,new h,new h],o=[u(s,e,r[0]),u(n,e,r[1]),u(t,e,r[2])],a=0;a<3;a++)o[a]&&i.push(r[a]);return i}},75636:(t,e,i)=>{var r=i(82944),o=i(13882);t.exports=function(t,e,i){var s,n;return void 0===i&&(i=[]),r(t,e)&&(s=e.getLineA(),n=e.getLineB(),e=e.getLineC(),o(t,s,i),o(t,n,i),o(t,e,i)),i}},80462:(t,e,i)=>{var l=i(87902),u=new(i(2141));t.exports=function(t,e,i){var s,n,r,o,a,h;return void 0===i&&(i=u),l(e,t.x1,t.y1)?(i.x=t.x1,i.y=t.y1,!0):l(e,t.x2,t.y2)?(i.x=t.x2,i.y=t.y2,!0):(s=t.x2-t.x1,h=e.x-t.x1,a=n=t.y2-t.y1,0<(r=(o=s)*s+n*n)&&(o*=h=(h*s+(e.y-t.y1)*n)/r,a*=h),i.x=t.x1+o,i.y=t.y1+a,o*o+a*a<=r&&0<=o*s+a*n&&l(e,i.x,i.y))}},76112:t=>{t.exports=function(t,e,i){var s,n,r=t.x1,o=t.y1,a=t.x2,t=t.y2,h=e.x1,l=e.y1,u=e.x2,e=e.y2;return!(r===a&&o===t||h===u&&l===e||0==(s=(e-l)*(a-r)-(u-h)*(t-o))||(n=((a-r)*(o-l)-(t-o)*(r-h))/s,(u=((u-h)*(o-l)-(e-l)*(r-h))/s)<0)||1{t.exports=function(t,e){var i=t.x1,s=t.y1,n=t.x2,t=t.y2,r=e.x,o=e.y,a=e.right,e=e.bottom,h=0;if(r<=i&&i<=a&&o<=s&&s<=e||r<=n&&n<=a&&o<=t&&t<=e)return!0;if(io&&h<=e)return!0}else if(a=o&&h<=e)return!0;if(s=r&&h<=a)return!0}else if(e=r&&h<=a)return!0;return!1}},16204:t=>{t.exports=function(t,e,i){void 0===i&&(i=1);var s,n=e.x1,r=e.y1,o=e.x2,e=e.y2,a=t.x,t=t.y,h=(o-n)*(o-n)+(e-r)*(e-r);return 0!=h&&((s=((a-n)*(o-n)+(t-r)*(e-r))/h)<0?Math.sqrt((n-a)*(n-a)+(r-t)*(r-t))<=i:0<=s&&s<=1?Math.abs(((r-t)*(o-n)-(n-a)*(e-r))/h)*Math.sqrt(h)<=i:Math.sqrt((o-a)*(o-a)+(e-t)*(e-t))<=i)}},14199:(t,e,i)=>{var r=i(16204);t.exports=function(t,e){var i,s,n;return!!r(t,e)&&(i=Math.min(e.x1,e.x2),s=Math.max(e.x1,e.x2),n=Math.min(e.y1,e.y2),e=Math.max(e.y1,e.y2),t.x>=i)&&t.x<=s&&t.y>=n&&t.y<=e}},59996:t=>{t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0||t.righte.right||t.y>e.bottom)}},89265:(t,e,i)=>{var l=i(76112),u=i(37303),c=i(48653),d=i(77493);t.exports=function(t,e){var i,s,n,r,o,a,h;return!(e.left>t.right||e.rightt.bottom||e.bottom{t.exports=function(t,e,i,s,n,r){return!(e>t.right+(r=void 0===r?0:r)||it.bottom+r||n{var s=i(80462),n=i(10690);t.exports=function(t,e){return!(t.left>e.right||t.righte.bottom||t.bottom{var s=i(76112);t.exports=function(t,e){return!!(t.contains(e.x1,e.y1)||t.contains(e.x2,e.y2)||s(t.getLineA(),e)||s(t.getLineB(),e)||s(t.getLineC(),e))}},82944:(t,e,i)=>{var h=i(48653),l=i(71694),u=i(76112);t.exports=function(t,e){var i,s,n,r,o,a;return!(t.left>e.right||t.righte.bottom||t.bottom{t.exports={CircleToCircle:i(2044),CircleToRectangle:i(81491),GetCircleToCircle:i(63376),GetCircleToRectangle:i(97439),GetLineToCircle:i(4042),GetLineToLine:i(36100),GetLineToPoints:i(3073),GetLineToPolygon:i(56362),GetLineToRectangle:i(60646),GetRaysFromPointToPolygon:i(71147),GetRectangleIntersection:i(68389),GetRectangleToRectangle:i(52784),GetRectangleToTriangle:i(26341),GetTriangleToCircle:i(38720),GetTriangleToLine:i(13882),GetTriangleToTriangle:i(75636),LineToCircle:i(80462),LineToLine:i(76112),LineToRectangle:i(92773),PointToLine:i(16204),PointToLineSegment:i(14199),RectangleToRectangle:i(59996),RectangleToTriangle:i(89265),RectangleToValues:i(84411),TriangleToCircle:i(67636),TriangleToLine:i(2822),TriangleToTriangle:i(82944)}},91938:t=>{t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},84993:t=>{t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=[]);var s=Math.round(t.x1),n=Math.round(t.y1),r=Math.round(t.x2),o=Math.round(t.y2),a=Math.abs(r-s),h=Math.abs(o-n),l=s{t.exports=function(t,e,i){e-=(t.x1+t.x2)/2,i-=(t.y1+t.y2)/2;return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},31116:(t,e,i)=>{var s=i(23031);t.exports=function(t){return new s(t.x1,t.y1,t.x2,t.y2)}},59944:t=>{t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},59220:t=>{t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},78177:(t,e,i)=>{var o=i(35001);t.exports=function(t,e,i){void 0===i&&(i=e);var s=o(t),n=t.x2-t.x1,r=t.y2-t.y1;return e&&(t.x1=t.x1-n/s*e,t.y1=t.y1-r/s*e),i&&(t.x2=t.x2+n/s*i,t.y2=t.y2+r/s*i),t}},26708:(t,e,i)=>{var v=i(52816),y=i(6113),x=i(2141);t.exports=function(t,e,i,s,n){void 0===s&&(s=0);var r,o=[],a=t.x1,h=t.y1,l=t.x2-a,u=t.y2-h,c=y(e,n=void 0===n?[]:n),d=i-1;for(g=0;g=s&&(f.push(m),p=m)}t=o[o.length-1];return v(p,t){var s=i(2141);t.exports=function(t,e){return(e=void 0===e?new s:e).x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},99569:(t,e,i)=>{var a=i(2141);t.exports=function(t,e,i){void 0===i&&(i=new a);var s=t.x1,n=t.y1,r=t.x2,t=t.y2,o=(r-s)*(r-s)+(t-n)*(t-n);return 0!=o&&(e=((e.x-s)*(r-s)+(e.y-n)*(t-n))/o,i.x=s+e*(r-s),i.y=n+e*(t-n)),i}},34638:(t,e,i)=>{var s=i(36383),n=i(91938),r=i(2141);t.exports=function(t,e){void 0===e&&(e=new r);t=n(t)-s.TAU;return e.x=Math.cos(t),e.y=Math.sin(t),e}},13151:(t,e,i)=>{var s=i(2141);t.exports=function(t,e,i){return(i=void 0===i?new s:i).x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},15258:(t,e,i)=>{var u=i(35001),c=i(2141);t.exports=function(t,e,i,s){void 0===s&&(s=[]),!e&&0{t.exports=function(t,e){var i=t.x1,s=t.y1,n=t.x2,t=t.y2,r=(n-i)*(n-i)+(t-s)*(t-s);return 0!=r&&(n=((s-e.y)*(n-i)-(i-e.x)*(t-s))/r,Math.abs(n)*Math.sqrt(r))}},98770:t=>{t.exports=function(t){return Math.abs(t.y1-t.y2)}},35001:t=>{t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},23031:(t,e,i)=>{var s=i(83419),n=i(13151),r=i(15258),o=i(23777),a=i(65822),h=i(26099),i=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=o.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=s},getPoint:function(t,e){return n(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,s){return void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x1=t=void 0===t?0:t,this.y1=e,this.x2=i,this.y2=s,this},setFromObjects:function(t,e){return this.x1=t.x,this.y1=t.y,this.x2=e.x,this.y2=e.y,this},getPointA:function(t){return(t=void 0===t?new h:t).set(this.x1,this.y1),t},getPointB:function(t){return(t=void 0===t?new h:t).set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=i},64795:(t,e,i)=>{var s=i(36383),n=i(15994),r=i(91938);t.exports=function(t){t=r(t)-s.TAU;return n(t,-Math.PI,Math.PI)}},52616:(t,e,i)=>{var s=i(36383),n=i(91938);t.exports=function(t){return Math.cos(n(t)-s.TAU)}},87231:(t,e,i)=>{var s=i(36383),n=i(91938);t.exports=function(t){return Math.sin(n(t)-s.TAU)}},89662:t=>{t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},71165:t=>{t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},65822:(t,e,i)=>{var s=i(2141);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},69777:(t,e,i)=>{var s=i(91938),n=i(64795);t.exports=function(t,e){return 2*n(e)-Math.PI-s(t)}},39706:(t,e,i)=>{var s=i(64400);t.exports=function(t,e){var i=(t.x1+t.x2)/2;return s(t,i,(t.y1+t.y2)/2,e)}},82585:(t,e,i)=>{var s=i(64400);t.exports=function(t,e,i){return s(t,e.x,e.y,i)}},64400:t=>{t.exports=function(t,e,i,s){var n=Math.cos(s),s=Math.sin(s),r=t.x1-e,o=t.y1-i;return t.x1=r*n-o*s+e,t.y1=r*s+o*n+i,t.x2=(r=t.x2-e)*n-(o=t.y2-i)*s+e,t.y2=r*s+o*n+i,t}},62377:t=>{t.exports=function(t,e,i,s,n){return t.x1=e,t.y1=i,t.x2=e+Math.cos(s)*n,t.y2=i+Math.sin(s)*n,t}},71366:t=>{t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},10809:t=>{t.exports=function(t){return Math.abs(t.x1-t.x2)}},2529:(t,e,i)=>{var s=i(23031);s.Angle=i(91938),s.BresenhamPoints=i(84993),s.CenterOn=i(36469),s.Clone=i(31116),s.CopyFrom=i(59944),s.Equals=i(59220),s.Extend=i(78177),s.GetEasedPoints=i(26708),s.GetMidPoint=i(32125),s.GetNearestPoint=i(99569),s.GetNormal=i(34638),s.GetPoint=i(13151),s.GetPoints=i(15258),s.GetShortestDistance=i(26408),s.Height=i(98770),s.Length=i(35001),s.NormalAngle=i(64795),s.NormalX=i(52616),s.NormalY=i(87231),s.Offset=i(89662),s.PerpSlope=i(71165),s.Random=i(65822),s.ReflectAngle=i(69777),s.Rotate=i(39706),s.RotateAroundPoint=i(82585),s.RotateAroundXY=i(64400),s.SetToAngle=i(62377),s.Slope=i(71366),s.Width=i(10809),t.exports=s},83997:(t,e,i)=>{var s=i(83419),n=i(87841),r=i(26099);function u(t,e,i,s){t-=i,i=e-s;return Math.sqrt(t*t+i*i)}i=new s({initialize:function(t,e,i){this.vertex1=t,this.vertex2=e,this.vertex3=i,this.bounds=new n,this._inCenter=new r},getInCenter:function(t){var e,i,s,n,r,o=this.vertex1,a=this.vertex2,h=this.vertex3,t=(t=void 0===t?!0:t)?(e=o.x,i=o.y,s=a.x,n=a.y,r=h.x,h.y):(e=o.vx,i=o.vy,s=a.vx,n=a.vy,r=h.vx,h.vy),o=u(r,t,s,n),a=u(e,i,r,t),h=u(s,n,e,i),l=o+a+h;return this._inCenter.set((e*o+s*a+r*h)/l,(i*o+n*a+t*h)/l)},contains:function(t,e,i){var s=this.vertex1,n=this.vertex2,r=this.vertex3,o=s.vx,a=s.vy,h=n.vx,l=n.vy,u=r.vx,c=r.vy,n=(i&&(d=i.a,o=s.vx*d+s.vy*(p=i.c)+(f=i.e),a=s.vx*(g=i.b)+s.vy*(s=i.d)+(i=i.f),h=n.vx*d+n.vy*p+f,l=n.vx*g+n.vy*s+i,u=r.vx*d+r.vy*p+f,c=r.vx*g+r.vy*s+i),u-o),d=c-a,p=h-o,f=l-a,g=t-o,r=e-a,s=n*n+d*d,i=n*p+d*f,u=n*g+d*r,c=p*p+f*f,h=p*g+f*r,l=s*c-i*i,t=0==l?0:1/l,o=(c*u-i*h)*t,e=(s*h-i*u)*t;return 0<=o&&0<=e&&o+e<1},isCounterClockwise:function(t){var e=this.vertex1,i=this.vertex2,s=this.vertex3,i=(i.vx-e.vx)*(s.vy-e.vy)-(i.vy-e.vy)*(s.vx-e.vx);return t<=0?0<=i:i<0},load:function(t,e,i,s,n){return i=this.vertex1.load(t,e,i,s,n),i=this.vertex2.load(t,e,i,s,n),this.vertex3.load(t,e,i,s,n)},transformCoordinatesLocal:function(t,e,i,s){return this.vertex1.transformCoordinatesLocal(t,e,i,s),this.vertex2.transformCoordinatesLocal(t,e,i,s),this.vertex3.transformCoordinatesLocal(t,e,i,s),this},updateBounds:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3,s=this.bounds;return s.x=Math.min(t.vx,e.vx,i.vx),s.y=Math.min(t.vy,e.vy,i.vy),s.width=Math.max(t.vx,e.vx,i.vx)-s.x,s.height=Math.max(t.vy,e.vy,i.vy)-s.y,this},isInView:function(t,e,i,s,n,r,o,a,h,l,u){this.update(s,n,r,o,a,h,l,u);s=this.vertex1,n=this.vertex2,r=this.vertex3;return!(s.ta<=0&&n.ta<=0&&r.ta<=0||e&&!this.isCounterClockwise(i)||((o=this.bounds).x=Math.min(s.tx,n.tx,r.tx),o.y=Math.min(s.ty,n.ty,r.ty),o.width=Math.max(s.tx,n.tx,r.tx)-o.x,o.height=Math.max(s.ty,n.ty,r.ty)-o.y,a=t.x+t.width,o.width<=0)||o.height<=0||t.width<=0||t.height<=0||o.righta||o.y>t.y+t.height)},scrollUV:function(t,e){return this.vertex1.scrollUV(t,e),this.vertex2.scrollUV(t,e),this.vertex3.scrollUV(t,e),this},scaleUV:function(t,e){return this.vertex1.scaleUV(t,e),this.vertex2.scaleUV(t,e),this.vertex3.scaleUV(t,e),this},setColor:function(t){return this.vertex1.color=t,this.vertex2.color=t,this.vertex3.color=t,this},update:function(t,e,i,s,n,r,o,a){return this.vertex1.update(e,i,s,n,r,o,a,t),this.vertex2.update(e,i,s,n,r,o,a,t),this.vertex3.update(e,i,s,n,r,o,a,t),this},translate:function(t,e){void 0===e&&(e=0);var i=this.vertex1,s=this.vertex2,n=this.vertex3;return i.x+=t,i.y+=e,s.x+=t,s.y+=e,n.x+=t,n.y+=e,this},x:{get:function(){return this.getInCenter().x},set:function(t){var e=this.getInCenter();this.translate(t-e.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(t){var e=this.getInCenter();this.translate(0,t-e.y)}},alpha:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.alpha+e.alpha+i.alpha)/3},set:function(t){this.vertex1.alpha=t,this.vertex2.alpha=t,this.vertex3.alpha=t}},depth:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.vz+e.vz+i.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});t.exports=i},48803:(t,e,i)=>{var J=i(83997),Q=i(95540),s=i(37867),n=i(25836),$=i(39318),tt=new n,et=new n,it=new s;t.exports=function(t){var e,i=Q(t,"mesh"),s=Q(t,"texture",null),n=Q(t,"frame"),r=Q(t,"width",1),o=Q(t,"height",r),a=Q(t,"widthSegments",1),h=Q(t,"heightSegments",a),l=Q(t,"x",0),u=Q(t,"y",0),c=Q(t,"z",0),B=Q(t,"rotateX",0),I=Q(t,"rotateY",0),N=Q(t,"rotateZ",0),G=Q(t,"zIsUp",!0),U=Q(t,"isOrtho",!!i&&i.dirtyCache[11]),d=Q(t,"colors",[16777215]),p=Q(t,"alphas",[1]),X=Q(t,"tile",!1),Y=Q(t,"flipY",!1),t=Q(t,"width",null),f={faces:[],verts:[]};if(tt.set(l,u,c),et.set(B,I,N),it.fromRotationXYTranslation(et,tt,G),!s&&i)s=i.texture,n||(e=i.frame);else if(i&&"string"==typeof s)s=i.scene.sys.textures.get(s);else if(!s)return f;e=e||s.get(n),!t&&U&&s&&i&&(r=e.width/i.height,o=e.height/i.height);for(var z=r/2,W=o/2,g=Math.floor(a),m=Math.floor(h),v=g+1,H=m+1,V=r/g,j=o/m,y=[],x=[],T=0,b=1,w=0,S=1,Z=(e&&(T=e.u0,b=e.u1,S=Y?(w=e.v1,e.v0):(w=e.v0,e.v1)),b-T),q=S-w,C=0;C{var _=i(83997),s=i(37867),n=i(25836),A=i(39318),P=new n,M=new n,R=new s;t.exports=function(t,e,i,s,n,r,o,a,h,l){void 0===i&&(i=1),void 0===o&&(o=0),void 0===a&&(a=0),void 0===h&&(h=0),void 0===l&&(l=!0);var u={faces:[],verts:[]},c=t.materials;P.set(s=void 0===s?0:s,n=void 0===n?0:n,r=void 0===r?0:r),M.set(o,a,h),R.fromRotationXYTranslation(M,P,l);for(var d=0;d{var L=i(83997),O=i(39318);t.exports=function(t,e,i,s,n,r,o,a){if(void 0===s&&(s=!1),void 0===r&&(r=16777215),void 0===o&&(o=1),void 0===a&&(a=!1),t.length===e.length||s){var h,l,u={faces:[],vertices:[]},c=s?3:2,d=Array.isArray(r),p=Array.isArray(o);if(Array.isArray(i)&&0{var M,R="untitled",L="",O="";function D(t){return 0===t.models.length&&t.models.push({faces:[],name:R,textureCoords:[],vertexNormals:[],vertices:[]}),L="",t.models[t.models.length-1]}t.exports=function(t,e){M=e=void 0===e?!0:e;var i={materials:{},materialLibraries:[],models:[]};O=L="";for(var s,n,r,o,a,h,l,u,c,d,p,f,g,m=t.split("\n"),v=0;v{var u=i(37589);t.exports=function(t){for(var e={},i=t.split("\n"),s="",n=0;n{t.exports=function(t,e,i,s){void 0===i&&void 0===s&&(n=(i=t.getInCenter()).x,r=i.y);var n,r,s=Math.cos(e),i=Math.sin(e),e=t.vertex1,o=t.vertex2,t=t.vertex3,a=e.x-n,h=e.y-r;e.set(a*s-h*i+n,a*i+h*s+r),a=o.x-n,h=o.y-r,o.set(a*s-h*i+n,a*i+h*s+r),a=t.x-n,h=t.y-r,t.set(a*s-h*i+n,a*i+h*s+r)}},39318:(t,e,i)=>{var s=i(83419),r=i(70554),u=i(25836),i=new s({Extends:u,initialize:function(t,e,i,s,n,r,o,a,h,l){void 0===r&&(r=16777215),void 0===o&&(o=1),void 0===a&&(a=0),void 0===h&&(h=0),void 0===l&&(l=0),u.call(this,t,e,i),this.vx=0,this.vy=0,this.vz=0,this.nx=a,this.ny=h,this.nz=l,this.u=s,this.v=n,this.color=r,this.alpha=o,this.tx=0,this.ty=0,this.ta=0,this.tu=s,this.tv=n},setUVs:function(t,e){return this.u=t,this.v=e,this.tu=t,this.tv=e,this},scrollUV:function(t,e){return this.tu+=t,this.tv+=e,this},scaleUV:function(t,e){return this.tu=this.u*t,this.tv=this.v*e,this},transformCoordinatesLocal:function(t,e,i,s){var n=this.x,r=this.y,o=this.z,t=t.val,a=n*t[0]+r*t[4]+o*t[8]+t[12],h=n*t[1]+r*t[5]+o*t[9]+t[13],l=n*t[2]+r*t[6]+o*t[10]+t[14],n=n*t[3]+r*t[7]+o*t[11]+t[15];this.vx=a/n*e,this.vy=-h/n*i,this.vz=s<=0?l/n:-l/n},resize:function(t,e,i,s,n,r){return this.x=t,this.y=e,this.vx=this.x*i,this.vy=-this.y*s,this.vz=0,n<.5?this.vx+=i*(.5-n):.5{i={Face:i(83997),GenerateGridVerts:i(48803),GenerateObjVerts:i(34684),GenerateVerts:i(92515),ParseObj:i(85048),ParseObjMaterial:i(61485),RotateFace:i(92570),Vertex:i(39318)};t.exports=i},96550:t=>{t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},99706:(t,e,i)=>{var s=i(2141);t.exports=function(t){return new s(t.x,t.y)}},68010:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y)}},27814:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},73565:t=>{t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},87555:(t,e,i)=>{var n=i(2141);t.exports=function(t,e){if(void 0===e&&(e=new n),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var s=0;s{t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},44405:t=>{t.exports=function(t){return t.x*t.x+t.y*t.y}},20873:(t,e,i)=>{var h=i(87841);t.exports=function(t,e){void 0===e&&(e=new h);for(var i=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,o=0;oi&&(i=a.x),a.x{var n=i(2141);t.exports=function(t,e,i,s){return void 0===i&&(i=0),(s=void 0===s?new n:s).x=t.x+(e.x-t.x)*i,s.y=t.y+(e.y-t.y)*i,s}},55767:t=>{t.exports=function(t){return t.setTo(t.y,t.x)}},79432:(t,e,i)=>{var s=i(2141);t.exports=function(t,e){return(e=void 0===e?new s:e).setTo(-t.x,-t.y)}},2141:(t,e,i)=>{var s=i(83419),n=i(23777),i=new s({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=n.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=i},72930:(t,e,i)=>{var s=i(2141),n=i(44405);t.exports=function(t,e,i){void 0===i&&(i=new s);t=(t.x*e.x+t.y*e.y)/n(e);return 0!=t&&(i.x=t*e.x,i.y=t*e.y),i}},62880:(t,e,i)=>{var s=i(2141);t.exports=function(t,e,i){void 0===i&&(i=new s);t=t.x*e.x+t.y*e.y;return 0!=t&&(i.x=t*e.x,i.y=t*e.y),i}},15093:(t,e,i)=>{var s=i(28793);t.exports=function(t,e){var i;return 0===t.x&&0===t.y||(i=s(t),t.x/=i,t.y/=i),t.x*=e,t.y*=e,t}},43711:(t,e,i)=>{var s=i(2141);s.Ceil=i(96550),s.Clone=i(99706),s.CopyFrom=i(68010),s.Equals=i(27814),s.Floor=i(73565),s.GetCentroid=i(87555),s.GetMagnitude=i(28793),s.GetMagnitudeSq=i(44405),s.GetRectangleFromPoints=i(20873),s.Interpolate=i(26152),s.Invert=i(55767),s.Negative=i(79432),s.Project=i(72930),s.ProjectUnit=i(62880),s.SetMagnitude=i(15093),t.exports=s},12306:(t,e,i)=>{var s=i(25717);t.exports=function(t){return new s(t.points)}},63814:t=>{t.exports=function(t,e,i){for(var s=!1,n=-1,r=t.points.length-1;++n{var s=i(63814);t.exports=function(t,e){return s(t,e.x,e.y)}},94811:t=>{function e(t,e,i){i=i||2;var s,n,r,o,a,h=e&&e.length,l=h?e[0]*i:t.length,u=g(t,0,l,i,!0),c=[];if(u&&u.next!==u.prev){if(h&&(u=((t,e,i,s)=>{for(var n,r,o,a,h=[],l=0,u=e.length;l{for(var e=t,i=t;(e.x{var i,s=e,n=t.x,r=t.y,o=-1/0;do{if(r<=s.y&&r>=s.next.y&&s.next.y!==s.y){var a=s.x+(r-s.y)*(s.next.x-s.x)/(s.next.y-s.y);if(a<=n&&o=s.x&&s.x>=d&&n!==s.x&&P(ri.x||s.x===i.x&&(u=s,M((l=i).prev,l,u.prev)<0)&&M(u.next,l,l.next)<0))&&(i=s,f=h),(s=s.next)!==c;);return i})(r=h[l],o=i))?(E(r=D(a,r),r.next),E(a,a.next)):o;return i})(t,e,u,i)),t.length>80*i){for(var d=s=t[0],p=n=t[1],f=i;f{var n=t.prev,r=t,o=t.next;if(!(0<=M(n,r,o))){for(var a=n.x,h=r.x,l=o.x,u=n.y,c=r.y,d=o.y,p=a=v&&T&&T.z<=y;){if(x.x>=p&&x.x<=g&&x.y>=f&&x.y<=m&&x!==n&&x!==o&&P(a,u,h,c,l,d,x.x,x.y)&&0<=M(x.prev,x,x.next))return;if(x=x.prevZ,T.x>=p&&T.x<=g&&T.y>=f&&T.y<=m&&T!==n&&T!==o&&P(a,u,h,c,l,d,T.x,T.y)&&0<=M(T.prev,T,T.next))return;T=T.nextZ}for(;x&&x.z>=v;){if(x.x>=p&&x.x<=g&&x.y>=f&&x.y<=m&&x!==n&&x!==o&&P(a,u,h,c,l,d,x.x,x.y)&&0<=M(x.prev,x,x.next))return;x=x.prevZ}for(;T&&T.z<=y;){if(T.x>=p&&T.x<=g&&T.y>=f&&T.y<=m&&T!==n&&T!==o&&P(a,u,h,c,l,d,T.x,T.y)&&0<=M(T.prev,T,T.next))return;T=T.nextZ}return 1}})(t,s,n,r):(t=>{var e=t.prev,i=t,t=t.next;if(!(0<=M(e,i,t))){for(var s=e.x,n=i.x,r=t.x,o=e.y,a=i.y,h=t.y,l=s=l&&p.x<=c&&p.y>=u&&p.y<=d&&P(s,o,n,a,r,h,p.x,p.y)&&0<=M(p.prev,p,p.next))return;p=p.next}return 1}})(t))e.push(w.i/i|0),e.push(t.i/i|0),e.push(S.i/i|0),k(t),t=S.next,C=S.next;else if((t=S)===C){o?1===o?_(t=((t,e,i)=>{var s=t;do{var n=s.prev,r=s.next.next}while(!R(n,r)&&L(n,s,s.next,r)&&O(n,r)&&O(r,n)&&(e.push(n.i/i|0),e.push(s.i/i|0),e.push(r.i/i|0),k(s),k(s.next),s=t=r),(s=s.next)!==t);return E(s)})(E(t),e,i),e,i,s,n,r,2):2===o&&((t,e,i,s,n,r)=>{var o=t;do{for(var a,h=o.next.next;h!==o.prev;){if(o.i!==h.i&&((t,e)=>t.next.i!==e.i&&t.prev.i!==e.i&&!((t,e)=>{var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&L(i,i.next,t,e))return 1}while((i=i.next)!==t)})(t,e)&&(O(t,e)&&O(e,t)&&((t,e)=>{for(var i=t,s=!1,n=(t.x+e.x)/2,r=(t.y+e.y)/2;i.y>r!=i.next.y>r&&i.next.y!==i.y&&n<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(s=!s),(i=i.next)!==t;);return s})(t,e)&&(M(t.prev,t,e.prev)||M(t,e.prev,e))||R(t,e)&&0=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function l(t){return 0{var h=i(87841);t.exports=function(t,e){void 0===e&&(e=new h);for(var i,s=1/0,n=1/0,r=-s,o=-n,a=0;a{t.exports=function(t,e){void 0===e&&(e=[]);for(var i=0;i{var d=i(35001),p=i(23031),f=i(30052);t.exports=function(t,e,i,s){void 0===s&&(s=[]);var n=t.points,r=f(t);!e&&0{var o=i(35001),a=i(23031);t.exports=function(t){for(var e=t.points,i=0,s=0;s{var s=i(83419),n=i(63814),r=i(9564),o=i(23777),i=new s({initialize:function(t){this.type=o.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return n(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),Array.isArray(t)){for(var e,i=0;i{t.exports=function(t){return t.points.reverse(),t}},29524:t=>{function n(t,e){var i=t.length-1,s=[t[0]];return function t(e,i,s,n,r){for(var o,a,h,l,u,c,d,p=n,f=i+1;f{for(var i,s,n,r,o=t[0],a=[o],h=1,l=t.length;h{function l(t,e){return t[0]=e[0],t[1]=e[1],t}t.exports=function(t){for(var e=[],i=t.points,s=0;s{t.exports=function(t,e,i){for(var s=t.points,n=0;n{var s=i(25717);s.Clone=i(12306),s.Contains=i(63814),s.ContainsPoint=i(99338),s.Earcut=i(94811),s.GetAABB=i(13829),s.GetNumberArray=i(26173),s.GetPoints=i(9564),s.Perimeter=i(30052),s.Reverse=i(8133),s.Simplify=i(29524),s.Smooth=i(5469),s.Translate=i(24709),t.exports=s},62224:t=>{t.exports=function(t){return t.width*t.height}},98615:t=>{t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t}},31688:t=>{t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t.width=Math.ceil(t.width),t.height=Math.ceil(t.height),t}},67502:t=>{t.exports=function(t,e,i){return t.x=e-t.width/2,t.y=i-t.height/2,t}},65085:(t,e,i)=>{var s=i(87841);t.exports=function(t){return new s(t.x,t.y,t.width,t.height)}},37303:t=>{t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i}},96553:(t,e,i)=>{var s=i(37303);t.exports=function(t,e){return s(t,e.x,e.y)}},70273:t=>{t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom{t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},77493:t=>{t.exports=function(t,e){return(e=void 0===e?[]:e).push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},9219:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},53751:(t,e,i)=>{var s=i(8249);t.exports=function(t,e){var i=s(t);return i{var s=i(8249);t.exports=function(t,e){var i=s(t);return i>s(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},80774:t=>{t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},83859:t=>{t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},19217:(t,e,i)=>{var l=i(87841),u=i(36383);t.exports=function(t,e){if(void 0===e&&(e=new l),0!==t.length){for(var i,s,n=Number.MAX_VALUE,r=Number.MAX_VALUE,o=u.MIN_SAFE_INTEGER,a=u.MIN_SAFE_INTEGER,h=0;h{var r=i(87841);t.exports=function(t,e,i,s,n){return(n=void 0===n?new r:n).setTo(Math.min(t,i),Math.min(e,s),Math.abs(t-i),Math.abs(e-s))}},8249:t=>{t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},27165:(t,e,i)=>{var s=i(2141);t.exports=function(t,e){return(e=void 0===e?new s:e).x=t.centerX,e.y=t.centerY,e}},20812:(t,e,i)=>{var n=i(13019),r=i(2141);t.exports=function(t,e,i){var s;return(void 0===i&&(i=new r),e<=0||1<=e)?(i.x=t.x,i.y=t.y):(s=n(t)*e,.5{var r=i(20812),o=i(13019);t.exports=function(t,e,i,s){void 0===s&&(s=[]),!e&&0{var s=i(2141);t.exports=function(t,e){return(e=void 0===e?new s:e).x=t.width,e.y=t.height,e}},86091:(t,e,i)=>{var r=i(67502);t.exports=function(t,e,i){var s=t.centerX,n=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),r(t,s,n)}},53951:(t,e,i)=>{var s=i(87841),n=i(59996);t.exports=function(t,e,i){return void 0===i&&(i=new s),n(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},14649:(t,e,i)=>{var h=i(13019),l=i(2141);t.exports=function(t,e,i,s){if(void 0===s&&(s=[]),e||i){e?i=Math.round(h(t)/e):e=h(t)/i;for(var n=t.x,r=t.y,o=0,a=0;a=t.right&&(o=1,r+=n-t.right,n=t.right);break;case 1:(r+=e)>=t.bottom&&(o=2,n-=r-t.bottom,r=t.bottom);break;case 2:(n-=e)<=t.left&&(o=3,r-=t.left-n,n=t.left);break;case 3:(r-=e)<=t.top&&(o=0,r=t.top)}}return s}},33595:t=>{t.exports=function(t,e){for(var i=t.x,s=t.right,n=t.y,r=t.bottom,o=0;o{t.exports=function(t,e){var i=Math.min(t.x,e.x),s=Math.max(t.right,e.right),s=(t.x=i,t.width=s-i,Math.min(t.y,e.y)),i=Math.max(t.bottom,e.bottom);return t.y=s,t.height=i-s,t}},92171:t=>{t.exports=function(t,e,i){var s=Math.min(t.x,e),e=Math.max(t.right,e),e=(t.x=s,t.width=e-s,Math.min(t.y,i)),s=Math.max(t.bottom,i);return t.y=e,t.height=s-e,t}},42981:t=>{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},46907:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},60170:t=>{t.exports=function(t,e){return t.xe.x&&t.ye.y}},13019:t=>{t.exports=function(t){return 2*(t.width+t.height)}},85133:(t,e,i)=>{var o=i(2141),a=i(39506);t.exports=function(t,e,i){void 0===i&&(i=new o),e=a(e);var s=Math.sin(e),e=Math.cos(e),n=0{var s=i(2141);t.exports=function(t,e){return(e=void 0===e?new s:e).x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},86470:(t,e,i)=>{var s=i(30976),n=i(70273),r=i(2141);t.exports=function(t,e,i){if(void 0===i&&(i=new r),n(t,e))switch(s(0,3)){case 0:i.x=t.x+Math.random()*(e.right-t.x),i.y=t.y+Math.random()*(e.top-t.y);break;case 1:i.x=e.x+Math.random()*(t.right-e.x),i.y=e.bottom+Math.random()*(t.bottom-e.bottom);break;case 2:i.x=t.x+Math.random()*(e.x-t.x),i.y=e.y+Math.random()*(t.bottom-e.y);break;case 3:i.x=e.right+Math.random()*(t.right-e.right),i.y=t.y+Math.random()*(e.bottom-t.y)}return i}},87841:(t,e,i)=>{var s=i(83419),n=i(37303),r=i(20812),o=i(34819),a=i(23777),h=i(23031),l=i(26597),i=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=a.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return(t=void 0===t?new h:t).setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return(t=void 0===t?new h:t).setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return(t=void 0===t?new h:t).setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return(t=void 0===t?new h:t).setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=i},94845:t=>{t.exports=function(t,e){return t.width===e.width&&t.height===e.height}},31730:t=>{t.exports=function(t,e,i){return void 0===i&&(i=e),t.width*=e,t.height*=i,t}},36899:(t,e,i)=>{var o=i(87841);t.exports=function(t,e,i){void 0===i&&(i=new o);var s=Math.min(t.x,e.x),n=Math.min(t.y,e.y),r=Math.max(t.right,e.right)-s,t=Math.max(t.bottom,e.bottom)-n;return i.setTo(s,n,r,t)}},93232:(t,e,i)=>{var s=i(87841);s.Area=i(62224),s.Ceil=i(98615),s.CeilAll=i(31688),s.CenterOn=i(67502),s.Clone=i(65085),s.Contains=i(37303),s.ContainsPoint=i(96553),s.ContainsRect=i(70273),s.CopyFrom=i(43459),s.Decompose=i(77493),s.Equals=i(9219),s.FitInside=i(53751),s.FitOutside=i(16088),s.Floor=i(80774),s.FloorAll=i(83859),s.FromPoints=i(19217),s.FromXY=i(9477),s.GetAspectRatio=i(8249),s.GetCenter=i(27165),s.GetPoint=i(20812),s.GetPoints=i(34819),s.GetSize=i(51313),s.Inflate=i(86091),s.Intersection=i(53951),s.MarchingAnts=i(14649),s.MergePoints=i(33595),s.MergeRect=i(20074),s.MergeXY=i(92171),s.Offset=i(42981),s.OffsetPoint=i(46907),s.Overlaps=i(60170),s.Perimeter=i(13019),s.PerimeterPoint=i(85133),s.Random=i(26597),s.RandomOutside=i(86470),s.SameDimensions=i(94845),s.Scale=i(31730),s.Union=i(36899),t.exports=s},41658:t=>{t.exports=function(t){var e=t.x1,i=t.y1;return Math.abs(((t.x3-e)*(t.y2-i)-(t.x2-e)*(t.y3-i))/2)}},39208:(t,e,i)=>{var n=i(16483);t.exports=function(t,e,i){var s=i*(Math.sqrt(3)/2);return new n(t,e,t+i/2,e+s,t-i/2,e+s)}},39545:(t,e,i)=>{var c=i(94811),d=i(16483);t.exports=function(t,e,i,s,n){void 0===i&&(i=1),void 0===s&&(s=1),void 0===n&&(n=[]);for(var r,o,a,h,l=c(t,e=void 0===e?null:e),u=0;u{var n=i(16483);t.exports=function(t,e,i,s){return new n(t,e,t,e-(s=void 0===s?i:s),t+i,e)}},23707:(t,e,i)=>{var n=i(97523),r=i(13584);t.exports=function(t,e,i,s){s=(s=void 0===s?n:s)(t),e-=s.x;return r(t,e,i-s.y)}},97523:(t,e,i)=>{var s=i(2141);t.exports=function(t,e){return(e=void 0===e?new s:e).x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},24951:(t,e,i)=>{var l=i(26099);t.exports=function(t,e){void 0===e&&(e=new l);var i=t.x3,s=t.y3,n=t.x1-i,r=t.y1-s,o=t.x2-i,t=t.y2-s,a=2*(n*t-r*o),h=n*(o*o+t*t)-(n*n+r*r)*o;return e.x=i-(r*(o*o+t*t)-(n*n+r*r)*t)/a,e.y=s+h/a,e}},85614:(t,e,i)=>{var y=i(96503);t.exports=function(t,e){void 0===e&&(e=new y);var i,s,n,r,o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=t.x3,t=t.y3,c=h-o,d=l-a,p=u-o,f=t-a,g=c*(o+h)+d*(a+l),m=p*(o+u)+f*(a+t),v=2*(c*(t-l)-d*(u-h));return Math.abs(v)<1e-6?(i=Math.min(o,h,u),s=Math.min(a,l,t),n=.5*(Math.max(o,h,u)-i),r=.5*(Math.max(a,l,t)-s),e.x=i+n,e.y=s+r):(e.x=(f*g-d*m)/v,e.y=(c*m-p*g)/v,n=e.x-o,r=e.y-a),e.radius=Math.sqrt(n*n+r*r),e}},74422:(t,e,i)=>{var s=i(16483);t.exports=function(t){return new s(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},10690:t=>{t.exports=function(t,e,i){var s=t.x3-t.x1,n=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,e=e-t.x1,i=i-t.y1,t=s*s+n*n,a=s*r+n*o,s=s*e+n*i,n=r*r+o*o,r=r*e+o*i,e=t*n-a*a,o=0==e?0:1/e,i=(n*s-a*r)*o,e=(t*r-a*s)*o;return 0<=i&&0<=e&&i+e<1}},48653:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=!1),void 0===s&&(s=[]);for(var n,r,o,a=t.x3-t.x1,h=t.y3-t.y1,l=t.x2-t.x1,u=t.y2-t.y1,c=a*a+h*h,d=a*l+h*u,p=l*l+u*u,f=c*p-d*d,g=0==f?0:1/f,m=t.x1,v=t.y1,y=0;y{var s=i(10690);t.exports=function(t,e){return s(t,e.x,e.y)}},71326:t=>{t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},71694:t=>{t.exports=function(t,e){return(e=void 0===e?[]:e).push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},33522:t=>{t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2&&t.x3===e.x3&&t.y3===e.y3}},20437:(t,e,i)=>{var l=i(2141),u=i(35001);t.exports=function(t,e,i){void 0===i&&(i=new l);var s,n,r,o,a=t.getLineA(),h=t.getLineB(),t=t.getLineC();return e<=0||1<=e?(i.x=a.x1,i.y=a.y1):(o=0,(e=((s=u(a))+(n=u(h))+(r=u(t)))*e){var g=i(35001),m=i(2141);t.exports=function(t,e,i,s){void 0===s&&(s=[]);var n=t.getLineA(),r=t.getLineB(),o=t.getLineC(),a=g(n),h=g(r),l=g(o),u=a+h+l;!e&&0{var c=i(2141);function d(t,e,i,s){t-=i,i=e-s;return Math.sqrt(t*t+i*i)}t.exports=function(t,e){void 0===e&&(e=new c);var i=t.x1,s=t.y1,n=t.x2,r=t.y2,o=t.x3,t=t.y3,a=d(o,t,n,r),h=d(i,s,o,t),l=d(n,r,i,s),u=a+h+l;return e.x=(i*a+n*h+o*l)/u,e.y=(s*a+r*h+t*l)/u,e}},13584:t=>{t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},1376:(t,e,i)=>{var s=i(35001);t.exports=function(t){var e=t.getLineA(),i=t.getLineB(),t=t.getLineC();return s(e)+s(i)+s(t)}},90260:(t,e,i)=>{var h=i(2141);t.exports=function(t,e){void 0===e&&(e=new h);var i=t.x2-t.x1,s=t.y2-t.y1,n=t.x3-t.x1,r=t.y3-t.y1,o=Math.random(),a=Math.random();return 1<=o+a&&(o=1-o,a=1-a),e.x=t.x1+(i*o+n*a),e.y=t.y1+(s*o+r*a),e}},52172:(t,e,i)=>{var s=i(99614),n=i(39757);t.exports=function(t,e){var i=n(t);return s(t,i.x,i.y,e)}},49907:(t,e,i)=>{var s=i(99614);t.exports=function(t,e,i){return s(t,e.x,e.y,i)}},99614:t=>{t.exports=function(t,e,i,s){var n=Math.cos(s),s=Math.sin(s),r=t.x1-e,o=t.y1-i;return t.x1=r*n-o*s+e,t.y1=r*s+o*n+i,t.x2=(r=t.x2-e)*n-(o=t.y2-i)*s+e,t.y2=r*s+o*n+i,t.x3=(r=t.x3-e)*n-(o=t.y3-i)*s+e,t.y3=r*s+o*n+i,t}},16483:(t,e,i)=>{var s=i(83419),n=i(10690),r=i(20437),o=i(80672),a=i(23777),h=i(23031),l=i(90260),i=new s({initialize:function(t,e,i,s,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=0),this.type=a.TRIANGLE,this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.x3=n,this.y3=r},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,s,n,r){return void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x1=t=void 0===t?0:t,this.y1=e,this.x2=i,this.y2=s,this.x3=n,this.y3=r,this},getLineA:function(t){return(t=void 0===t?new h:t).setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return(t=void 0===t?new h:t).setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return(t=void 0===t?new h:t).setTo(this.x3,this.y3,this.x1,this.y1),t},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){t=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t;this.x1-=t,this.x2-=t,this.x3-=t}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){t=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t;this.x1-=t,this.x2-=t,this.x3-=t}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){t=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t;this.y1-=t,this.y2-=t,this.y3-=t}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){t=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t;this.y1-=t,this.y2-=t,this.y3-=t}}});t.exports=i},84435:(t,e,i)=>{var s=i(16483);s.Area=i(41658),s.BuildEquilateral=i(39208),s.BuildFromPolygon=i(39545),s.BuildRight=i(90301),s.CenterOn=i(23707),s.Centroid=i(97523),s.CircumCenter=i(24951),s.CircumCircle=i(85614),s.Clone=i(74422),s.Contains=i(10690),s.ContainsArray=i(48653),s.ContainsPoint=i(96006),s.CopyFrom=i(71326),s.Decompose=i(71694),s.Equals=i(33522),s.GetPoint=i(20437),s.GetPoints=i(80672),s.InCenter=i(39757),s.Perimeter=i(1376),s.Offset=i(13584),s.Random=i(90260),s.Rotate=i(52172),s.RotateAroundPoint=i(49907),s.RotateAroundXY=i(99614),t.exports=s},74457:t=>{t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragStartCamera:null,dragX:0,dragY:0}}},84409:t=>{t.exports=function(n,r){return function(t,e,i,s){e=n.getPixelAlpha(e,i,s.texture.key,s.frame.name);return e&&r<=e}}},7003:(t,e,i)=>{var s=i(83419),h=i(93301),n=i(50792),r=i(8214),o=i(8443),a=i(78970),l=i(85098),u=i(42515),c=i(36210),d=i(61340),g=i(85955),i=new s({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new n,this.isOver=!0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new a(this):null,this.mouse=e.inputMouse?new l(this):null,this.touch=e.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers;for(var i=0;i<=this.pointersTotal;i++){var s=new u(this,i);s.smoothFactor=e.inputSmoothFactor,this.pointers.push(s)}this.mousePointer=e.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new d,this._tempMatrix2=new d,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(o.BOOT,this.boot,this)},boot:function(){var t=this.game,e=t.events;this.canvas=t.canvas,this.scaleManager=t.scale,this.events.emit(r.MANAGER_BOOT),e.on(o.PRE_RENDER,this.preRender,this),e.once(o.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(r.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(r.GAME_OUT,t)},preRender:function(){var t=this.game.loop.now,e=this.game.loop.delta,i=this.game.scene.getScenes(!0,!0);this.time=t,this.events.emit(r.MANAGER_UPDATE);for(var s=0;s{var r=i(96503),o=i(87902),s=i(83419),a=i(93301),f=i(74457),n=i(84409),h=i(20339),l=i(8497),u=i(81154),g=i(8214),c=i(50792),m=i(95540),d=i(23777),p=i(89639),v=i(41212),y=i(37277),x=i(87841),T=i(37303),b=i(44594),w=i(16483),S=i(10690),i=new s({Extends:c,initialize:function(t){c.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.pluginEvents=new c,this.enabled=!0,this.displayList,this.cameras,p.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var e={cancelled:!1};this._eventContainer={stopPropagation:function(){e.cancelled=!0}},this._eventData=e,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,t.sys.events.once(b.BOOT,this.boot,this),t.sys.events.on(b.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(b.DESTROY,this.destroy,this),this.pluginEvents.emit(g.BOOT)},start:function(){var t=this.systems.events;t.on(b.TRANSITION_START,this.transitionIn,this),t.on(b.TRANSITION_OUT,this.transitionOut,this),t.on(b.TRANSITION_COMPLETE,this.transitionComplete,this),t.on(b.PRE_UPDATE,this.preUpdate,this),t.once(b.SHUTDOWN,this.shutdown,this),this.manager.events.on(g.GAME_OUT,this.onGameOut,this),this.manager.events.on(g.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(g.START)},onGameOver:function(t){this.isActive()&&this.emit(g.GAME_OVER,t.timeStamp,t)},onGameOut:function(t){this.isActive()&&this.emit(g.GAME_OUT,t.timeStamp,t)},preUpdate:function(){this.pluginEvents.emit(g.PRE_UPDATE);var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,s=e.length;if(0!==i||0!==s){for(var n=this._list,r=0;r=n||0=t.downTime+s?!0:i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;var e=this._drag[t.id];1{var l=i(35154),u={};t.exports={register:function(t,e,i,s,n){u[t]={plugin:e,mapping:i,settingsKey:s,configKey:n}},getPlugin:function(t){return u[t]},install:function(t){var e,i=t.scene.sys,s=i.settings.input,n=i.game.config;for(e in u){var r=u[e].plugin,o=u[e].mapping,a=u[e].settingsKey,h=u[e].configKey;l(s,a,n[h])&&(t[o]=new r(t))}},remove:function(t){u.hasOwnProperty(t)&&delete u[t]}}},42515:(t,e,i)=>{var o=i(31040),s=i(83419),n=i(20339),a=i(43855),h=i(47235),r=i(26099),l=i(25892),i=new s({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new r,this.prevPosition=new r,this.midPoint=new r(-1,-1),this.velocity=new r,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===e,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(t){t=t.getWorldPoint(this.x,this.y);return this.worldX=t.x,this.worldY=t.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t,e,i=this.position.x,s=this.position.y,n=this.midPoint.x,r=this.midPoint.y;i===n&&s===r||(n=h(this.motionFactor,n,i),r=h(this.motionFactor,r,s),a(n,i,.1)&&(n=i),a(r,s,.1)&&(r=s),this.midPoint.set(n,r),this.velocity.set(t=i-n,e=s-r),this.angle=o(n,r,i,s),this.distance=Math.sqrt(t*t+e*e))},up:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),0===this.buttons&&(this.isDown=!1,this.upTime=t.timeStamp,this.wasTouch=!1)},down:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),l.macOS&&t.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=t.timeStamp),this.wasTouch=!1},move:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.locked&&(this.movementX=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.moveTime=t.timeStamp,this.wasTouch=!1},wheel:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=e,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(t,e){this.event=e,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.moveTime=e.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.buttons?0===this.button&&!this.isDown:0===this.button},rightButtonReleased:function(){return 0===this.buttons?2===this.button&&!this.isDown:2===this.button},middleButtonReleased:function(){return 0===this.buttons?1===this.button&&!this.isDown:1===this.button},backButtonReleased:function(){return 0===this.buttons?3===this.button&&!this.isDown:3===this.button},forwardButtonReleased:function(){return 0===this.buttons?4===this.button&&!this.isDown:4===this.button},getDistance:function(){return this.isDown?n(this.downX,this.downY,this.x,this.y):n(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?o(this.downX,this.downY,this.x,this.y):o(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,s=this.prevPosition.y,n=this.position.x,r=this.position.y,o=0;o{t.exports={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8}},7179:t=>{t.exports="boot"},85375:t=>{t.exports="destroy"},39843:t=>{t.exports="dragend"},23388:t=>{t.exports="dragenter"},16133:t=>{t.exports="drag"},27829:t=>{t.exports="dragleave"},53904:t=>{t.exports="dragover"},56058:t=>{t.exports="dragstart"},2642:t=>{t.exports="drop"},88171:t=>{t.exports="gameobjectdown"},36147:t=>{t.exports="dragend"},71692:t=>{t.exports="dragenter"},96149:t=>{t.exports="drag"},81285:t=>{t.exports="dragleave"},74048:t=>{t.exports="dragover"},21322:t=>{t.exports="dragstart"},49378:t=>{t.exports="drop"},86754:t=>{t.exports="gameobjectmove"},86433:t=>{t.exports="gameobjectout"},60709:t=>{t.exports="gameobjectover"},24081:t=>{t.exports="pointerdown"},11172:t=>{t.exports="pointermove"},18907:t=>{t.exports="pointerout"},95579:t=>{t.exports="pointerover"},35368:t=>{t.exports="pointerup"},26972:t=>{t.exports="wheel"},47078:t=>{t.exports="gameobjectup"},73802:t=>{t.exports="gameobjectwheel"},56718:t=>{t.exports="gameout"},25936:t=>{t.exports="gameover"},27503:t=>{t.exports="boot"},50852:t=>{t.exports="process"},96438:t=>{t.exports="update"},59152:t=>{t.exports="pointerlockchange"},47777:t=>{t.exports="pointerdown"},27957:t=>{t.exports="pointerdownoutside"},19444:t=>{t.exports="pointermove"},54251:t=>{t.exports="pointerout"},18667:t=>{t.exports="pointerover"},27192:t=>{t.exports="pointerup"},24652:t=>{t.exports="pointerupoutside"},45132:t=>{t.exports="wheel"},44512:t=>{t.exports="preupdate"},15757:t=>{t.exports="shutdown"},41637:t=>{t.exports="start"},93802:t=>{t.exports="update"},8214:(t,e,i)=>{t.exports={BOOT:i(7179),DESTROY:i(85375),DRAG_END:i(39843),DRAG_ENTER:i(23388),DRAG:i(16133),DRAG_LEAVE:i(27829),DRAG_OVER:i(53904),DRAG_START:i(56058),DROP:i(2642),GAME_OUT:i(56718),GAME_OVER:i(25936),GAMEOBJECT_DOWN:i(88171),GAMEOBJECT_DRAG_END:i(36147),GAMEOBJECT_DRAG_ENTER:i(71692),GAMEOBJECT_DRAG:i(96149),GAMEOBJECT_DRAG_LEAVE:i(81285),GAMEOBJECT_DRAG_OVER:i(74048),GAMEOBJECT_DRAG_START:i(21322),GAMEOBJECT_DROP:i(49378),GAMEOBJECT_MOVE:i(86754),GAMEOBJECT_OUT:i(86433),GAMEOBJECT_OVER:i(60709),GAMEOBJECT_POINTER_DOWN:i(24081),GAMEOBJECT_POINTER_MOVE:i(11172),GAMEOBJECT_POINTER_OUT:i(18907),GAMEOBJECT_POINTER_OVER:i(95579),GAMEOBJECT_POINTER_UP:i(35368),GAMEOBJECT_POINTER_WHEEL:i(26972),GAMEOBJECT_UP:i(47078),GAMEOBJECT_WHEEL:i(73802),MANAGER_BOOT:i(27503),MANAGER_PROCESS:i(50852),MANAGER_UPDATE:i(96438),POINTER_DOWN:i(47777),POINTER_DOWN_OUTSIDE:i(27957),POINTER_MOVE:i(19444),POINTER_OUT:i(54251),POINTER_OVER:i(18667),POINTER_UP:i(27192),POINTER_UP_OUTSIDE:i(24652),POINTER_WHEEL:i(45132),POINTERLOCK_CHANGE:i(59152),PRE_UPDATE:i(44512),SHUTDOWN:i(15757),START:i(41637),UPDATE:i(93802)}},97421:(t,e,i)=>{i=new(i(83419))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=.1},update:function(t){this.value=t},getValue:function(){return Math.abs(this.value){var s=i(83419),n=i(92734),i=new s({initialize:function(t,e){this.pad=t,this.events=t.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(t){this.value=t;var e=this.pad,i=this.index;t>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(n.BUTTON_DOWN,e,this,t),this.pad.emit(n.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(n.BUTTON_UP,e,this,t),this.pad.emit(n.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=i},99125:(t,e,i)=>{var r=i(97421),o=i(28884),s=i(83419),a=i(50792),h=i(26099),i=new s({Extends:a,initialize:function(t,e){a.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],s=0;s{var s=i(83419),n=i(50792),r=i(92734),a=i(99125),o=i(35154),h=i(89639),l=i(8214),i=new s({Extends:n,initialize:function(t){n.call(this),this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,t.pluginEvents.once(l.BOOT,this.boot,this),t.pluginEvents.on(l.START,this.start,this)},boot:function(){var t=this.scene.sys.game,e=this.settings.input,i=t.config;this.enabled=o(e,"gamepad",i.inputGamepad)&&t.device.input.gamepads,this.target=o(e,"gamepad.target",i.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(l.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(l.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){function t(t){!t.defaultPrevented&&e.isActive()&&(e.refreshPads(),e.queue.push(t))}var e=this,i=this.target;this.onGamepadHandler=t,i.addEventListener("gamepadconnected",t,!1),i.addEventListener("gamepaddisconnected",t,!1),this.sceneInputPlugin.pluginEvents.on(l.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(l.UPDATE,this.update);for(var t=0;t{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},65294:t=>{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},90089:t=>{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},64894:(t,e,i)=>{t.exports={DUALSHOCK_4:i(65294),SNES_USB:i(89651),XBOX_360:i(90089)}},46008:t=>{t.exports="down"},7629:t=>{t.exports="up"},42206:t=>{t.exports="connected"},86544:t=>{t.exports="disconnected"},94784:t=>{t.exports="down"},14325:t=>{t.exports="up"},92734:(t,e,i)=>{t.exports={BUTTON_DOWN:i(46008),BUTTON_UP:i(7629),CONNECTED:i(42206),DISCONNECTED:i(86544),GAMEPAD_BUTTON_DOWN:i(94784),GAMEPAD_BUTTON_UP:i(14325)}},48646:(t,e,i)=>{t.exports={Axis:i(97421),Button:i(28884),Events:i(92734),Gamepad:i(99125),GamepadPlugin:i(56654),Configs:i(64894)}},14350:(t,e,i)=>{var s=i(93301),i=i(79291)(!1,{CreatePixelPerfectHandler:i(84409),CreateInteractiveObject:i(74457),Events:i(8214),Gamepad:i(48646),InputManager:i(7003),InputPlugin:i(48205),InputPluginCache:i(89639),Keyboard:i(51442),Mouse:i(87078),Pointer:i(42515),Touch:i(95618)},s);t.exports=i},78970:(t,e,i)=>{var n=i(72905),s=i(83419),r=i(8443),o=i(8214),a=i(46032),h=i(29747),i=new s({initialize:function(t){this.manager=t,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=h,this.onKeyUp=h,t.events.once(o.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.addCapture(t.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(r.POST_STEP,this.postUpdate,this)},startListeners:function(){var i=this,t=(this.onKeyDown=function(t){var e;!t.defaultPrevented&&i.enabled&&i.manager&&(i.queue.push(t),i.manager.events.emit(o.MANAGER_PROCESS),e=t.altKey||t.ctrlKey||t.shiftKey||t.metaKey,i.preventDefault)&&!e&&-1{var s=i(83419),n=i(50792),h=i(95922),r=i(8443),o=i(35154),a=i(8214),l=i(89639),u=i(30472),c=i(46032),d=i(87960),p=i(74600),f=i(44594),g=i(56583),i=new s({Extends:n,initialize:function(t){n.call(this),this.game=t.systems.game,this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.manager=t.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,t.pluginEvents.once(a.BOOT,this.boot,this),t.pluginEvents.on(a.START,this.start,this)},boot:function(){var t=this.settings.input,t=(this.enabled=o(t,"keyboard",!0),o(t,"keyboard.capture",null));t&&this.addCaptures(t),this.sceneInputPlugin.pluginEvents.once(a.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(a.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(a.SHUTDOWN,this.shutdown,this),this.game.events.on(r.BLUR,this.resetKeys,this),this.scene.sys.events.on(f.PAUSE,this.resetKeys,this),this.scene.sys.events.on(f.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(t){return this.manager.addCapture(t),this},removeCapture:function(t){return this.manager.removeCapture(t),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:c.UP,down:c.DOWN,left:c.LEFT,right:c.RIGHT,space:c.SPACE,shift:c.SHIFT})},addKeys:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var s={};if("string"==typeof t){t=t.split(",");for(var n=0;nt._tick)return t._tick=e,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,s=0;s{t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},87960:(t,e,i)=>{var s=i(83419),o=i(95922),a=i(95540),h=i(68769),l=i(92803),i=new s({initialize:function(t,e,i){if(void 0===i&&(i={}),e.length<2)return!1;this.manager=t,this.enabled=!0,this.keyCodes=[];for(var s=0;s{var r=i(66970);t.exports=function(t,e){var i,s,n;return!!e.matched||(s=i=!1,t.keyCode!==e.current||0{t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},92612:t=>{t.exports="keydown"},23345:t=>{t.exports="keyup"},21957:t=>{t.exports="keycombomatch"},44743:t=>{t.exports="down"},3771:t=>{t.exports="keydown-"},46358:t=>{t.exports="keyup-"},75674:t=>{t.exports="up"},95922:(t,e,i)=>{t.exports={ANY_KEY_DOWN:i(92612),ANY_KEY_UP:i(23345),COMBO_MATCH:i(21957),DOWN:i(44743),KEY_DOWN:i(3771),KEY_UP:i(46358),UP:i(75674)}},51442:(t,e,i)=>{t.exports={Events:i(95922),KeyboardManager:i(78970),KeyboardPlugin:i(28846),Key:i(30472),KeyCodes:i(46032),KeyCombo:i(87960),AdvanceKeyCombo:i(66970),ProcessKeyCombo:i(68769),ResetKeyCombo:i(92803),JustDown:i(90229),JustUp:i(38796),DownDuration:i(37015),UpDuration:i(41170)}},37015:t=>{t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeDown;return t.isDown&&i{t.exports=function(t){return!!t._justDown&&!(t._justDown=!1)}},38796:t=>{t.exports=function(t){return!!t._justUp&&!(t._justUp=!1)}},30472:(t,e,i)=>{var s=i(83419),n=i(50792),r=i(95922),i=new s({Extends:n,initialize:function(t,e){n.call(this),this.plugin=t,this.keyCode=e,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(t){return this.emitOnRepeat=t,this},onDown:function(t){this.originalEvent=t,this.enabled&&(this.altKey=t.altKey,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.location=t.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(r.DOWN,this,t):(this.isDown=!0,this.isUp=!1,this.timeDown=t.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(r.DOWN,this,t)))},onUp:function(t){this.originalEvent=t,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=t.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(r.UP,this,t))},reset:function(){return this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});t.exports=i},46032:t=>{t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},74600:(t,e,i)=>{var s,n=i(46032),r={};for(s in n)r[n[s]]=s;t.exports=r},41170:t=>{t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeUp;return t.isUp&&i{var s=i(83419),o=i(89357),n=i(8214),r=i(29747),i=new s({initialize:function(t){this.manager=t,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=r,this.onMouseDown=r,this.onMouseUp=r,this.onMouseDownWindow=r,this.onMouseUpWindow=r,this.onMouseOver=r,this.onMouseOut=r,this.onMouseWheel=r,this.pointerLockChange=r,this.isTop=!0,t.events.once(n.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.passive=t.inputMousePassive,this.preventDefaultDown=t.inputMousePreventDefaultDown,this.preventDefaultUp=t.inputMousePreventDefaultUp,this.preventDefaultMove=t.inputMousePreventDefaultMove,this.preventDefaultWheel=t.inputMousePreventDefaultWheel,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},requestPointerLock:function(){var t;o.pointerLock&&((t=this.target).requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock())},releasePointerLock:function(){o.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this.target;if(t){var i=this,s=this.manager,e=s.canvas,n=window&&window.focus&&s.game.config.autoFocus,r=(this.onMouseMove=function(t){!t.defaultPrevented&&i.enabled&&s&&s.enabled&&(s.onMouseMove(t),i.preventDefaultMove)&&t.preventDefault()},this.onMouseDown=function(t){n&&window.focus(),!t.defaultPrevented&&i.enabled&&s&&s.enabled&&(s.onMouseDown(t),i.preventDefaultDown)&&t.target===e&&t.preventDefault()},this.onMouseDownWindow=function(t){t.sourceCapabilities&&t.sourceCapabilities.firesTouchEvents||!t.defaultPrevented&&i.enabled&&s&&s.enabled&&t.target!==e&&s.onMouseDown(t)},this.onMouseUp=function(t){!t.defaultPrevented&&i.enabled&&s&&s.enabled&&(s.onMouseUp(t),i.preventDefaultUp)&&t.target===e&&t.preventDefault()},this.onMouseUpWindow=function(t){t.sourceCapabilities&&t.sourceCapabilities.firesTouchEvents||!t.defaultPrevented&&i.enabled&&s&&s.enabled&&t.target!==e&&s.onMouseUp(t)},this.onMouseOver=function(t){!t.defaultPrevented&&i.enabled&&s&&s.enabled&&s.setCanvasOver(t)},this.onMouseOut=function(t){!t.defaultPrevented&&i.enabled&&s&&s.enabled&&s.setCanvasOut(t)},this.onMouseWheel=function(t){!t.defaultPrevented&&i.enabled&&s&&s.enabled&&s.onMouseWheel(t),i.preventDefaultWheel&&t.target===e&&t.preventDefault()},{passive:!0});if(t.addEventListener("mousemove",this.onMouseMove),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("mouseover",this.onMouseOver,r),t.addEventListener("mouseout",this.onMouseOut,r),this.preventDefaultWheel?t.addEventListener("wheel",this.onMouseWheel,{passive:!1}):t.addEventListener("wheel",this.onMouseWheel,r),window&&s.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,r),window.top.addEventListener("mouseup",this.onMouseUpWindow,r)}catch(t){window.addEventListener("mousedown",this.onMouseDownWindow,r),window.addEventListener("mouseup",this.onMouseUpWindow,r),this.isTop=!1}o.pointerLock&&(this.pointerLockChange=function(t){var e=i.target;i.locked=document.pointerLockElement===e||document.mozPointerLockElement===e||document.webkitPointerLockElement===e,s.onPointerLockChange(t)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&((t=this.isTop?window.top:window).removeEventListener("mousedown",this.onMouseDownWindow),t.removeEventListener("mouseup",this.onMouseUpWindow)),o.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=i},87078:(t,e,i)=>{t.exports={MouseManager:i(85098)}},36210:(t,e,i)=>{var s=i(83419),n=i(8214),r=i(29747),i=new s({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=r,this.onTouchStartWindow=r,this.onTouchMove=r,this.onTouchEnd=r,this.onTouchEndWindow=r,this.onTouchCancel=r,this.onTouchCancelWindow=r,this.isTop=!0,t.events.once(n.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputTouch,this.target=t.inputTouchEventTarget,this.capture=t.inputTouchCapture,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(t){return t.preventDefault(),!1}),this},startListeners:function(){var t=this.target;if(t){var e=this,i=this.manager,s=i.canvas,n=window&&window.focus&&i.game.config.autoFocus,r=(this.onTouchMove=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchMove(t),e.capture)&&t.cancelable&&t.preventDefault()},this.onTouchStart=function(t){n&&window.focus(),!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchStart(t),e.capture)&&t.cancelable&&t.target===s&&t.preventDefault()},this.onTouchStartWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onTouchStart(t)},this.onTouchEnd=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchEnd(t),e.capture)&&t.cancelable&&t.target===s&&t.preventDefault()},this.onTouchEndWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onTouchEnd(t)},this.onTouchCancel=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchCancel(t),e.capture)&&t.preventDefault()},this.onTouchCancelWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onTouchCancel(t)},this.capture),o={passive:!0},a={passive:!1};if(t.addEventListener("touchstart",this.onTouchStart,r?a:o),t.addEventListener("touchmove",this.onTouchMove,r?a:o),t.addEventListener("touchend",this.onTouchEnd,r?a:o),t.addEventListener("touchcancel",this.onTouchCancel,r?a:o),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,a),window.top.addEventListener("touchend",this.onTouchEndWindow,a),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,a)}catch(t){window.addEventListener("touchstart",this.onTouchStartWindow,a),window.addEventListener("touchend",this.onTouchEndWindow,a),window.addEventListener("touchcancel",this.onTouchCancelWindow,a),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("touchstart",this.onTouchStart),t.removeEventListener("touchmove",this.onTouchMove),t.removeEventListener("touchend",this.onTouchEnd),t.removeEventListener("touchcancel",this.onTouchCancel),window&&((t=this.isTop?window.top:window).removeEventListener("touchstart",this.onTouchStartWindow),t.removeEventListener("touchend",this.onTouchEndWindow),t.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=i},95618:(t,e,i)=>{t.exports={TouchManager:i(36210)}},41299:(t,e,i)=>{var s=i(83419),n=i(23906),r=i(54899),o=i(95540),a=i(98356),h=i(3374),l=i(84376),u=i(92638),i=new s({initialize:function(t,e){if(this.loader=t,this.cache=o(e,"cache",!1),this.type=o(e,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=o(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.key)throw new Error("Invalid File key: "+this.key);var s=o(e,"url");void 0===s?s=t.path+i+"."+o(e,"extension",""):"string"!=typeof s||s.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(s=t.path+s),this.url=s,this.src="",this.xhrSettings=u(o(e,"responseType",void 0)),o(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,o(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?n.FILE_POPULATED:n.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=o(e,"config",{}),this.multiFile,this.linkFile,this.base64="string"==typeof s&&0===s.indexOf("data:"),this.retryAttempts=o(e,"maxRetries",t.maxRetries)},setLink:function(t){(this.linkFile=t).linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){if(this.state===n.FILE_POPULATED)this.loader.nextFile(this,!0);else{if(this.state=n.FILE_LOADING,this.src=a(this,this.loader.baseURL),!this.src)throw new Error("URL Error in File: "+this.key+" from: "+this.url);0===this.src.indexOf("data:")&&(this.base64=!0),this.xhrLoader=l(this,this.loader.xhr)}},onLoad:function(e,t){var i=e.responseURL&&this.loader.localSchemes.some(function(t){return 0===e.responseURL.indexOf(t)})&&0===t.target.status,t=!(t.target&&200!==t.target.status)||i;4===e.readyState&&400<=e.status&&e.status<=599&&(t=!1),this.state=n.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,t)},onBase64Load:function(t){this.xhrLoader=t,this.state=n.FILE_LOADED,this.percentComplete=1,this.loader.emit(r.FILE_PROGRESS,this,this.percentComplete),this.loader.nextFile(this,!0)},onError:function(){this.resetXHR(),0{var i={};t.exports={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}}},98356:t=>{t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},74261:(t,e,i)=>{var s=i(83419),n=i(23906),r=i(35072),o=i(50792),a=i(54899),h=i(74099),w=i(95540),m=i(35154),S=i(41212),l=i(37277),u=i(44594),c=i(92638),i=new s({Extends:o,initialize:function(t){o.call(this);var e=t.sys.game.config,i=t.sys.settings.loader;this.scene=t,this.systems=t.sys,this.cacheManager=t.sys.cache,this.textureManager=t.sys.textures,this.sceneManager=t.sys.game.scene,h.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(w(i,"baseURL",e.loaderBaseURL)),this.setPath(w(i,"path",e.loaderPath)),this.setPrefix(w(i,"prefix",e.loaderPrefix)),this.maxParallelDownloads=w(i,"maxParallelDownloads",e.loaderMaxParallelDownloads),this.xhr=c(w(i,"responseType",e.loaderResponseType),w(i,"async",e.loaderAsync),w(i,"user",e.loaderUser),w(i,"password",e.loaderPassword),w(i,"timeout",e.loaderTimeout),w(i,"withCredentials",e.loaderWithCredentials)),this.crossOrigin=w(i,"crossOrigin",e.loaderCrossOrigin),this.imageLoadType=w(i,"imageLoadType",e.loaderImageLoadType),this.localSchemes=w(i,"localScheme",e.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new r,this.inflight=new r,this.queue=new r,this._deleteQueue=new r,this.totalFailed=0,this.totalComplete=0,this.state=n.LOADER_IDLE,this.multiKeyIndex=0,this.maxRetries=w(i,"maxRetries",e.loaderMaxRetries),t.sys.events.once(u.BOOT,this.boot,this),t.sys.events.on(u.START,this.pluginStart,this)},boot:function(){this.systems.events.once(u.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(u.SHUTDOWN,this.shutdown,this)},setBaseURL:function(t){return""!==(t=void 0===t?"":t)&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.baseURL=t,this},setPath:function(t){return""!==(t=void 0===t?"":t)&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.path=t,this},setPrefix:function(t){return this.prefix=t=void 0===t?"":t,this},setCORS:function(t){return this.crossOrigin=t,this},addFile:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e{var n=i(79291),r=i(92638);t.exports=function(t,e){var i=void 0===t?r():n({},t);if(e)for(var s in e)void 0!==e[s]&&(i[s]=e[s]);return i}},26430:(t,e,i)=>{var s=i(83419),o=i(23906),n=i(54899),i=new s({initialize:function(t,e,i,s){var n=[],s=(s.forEach(function(t){t&&n.push(t)}),this.loader=t,this.type=e,this.key=i,this.key);t.prefix&&""!==t.prefix&&(this.key=t.prefix+s),this.multiKeyIndex=t.multiKeyIndex++,this.files=n,this.state=o.FILE_PENDING,this.complete=!1,this.pending=n.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var r=0;r{var r=i(3374);t.exports=function(t,e){var i=r(e,t.xhrSettings);if(!t.base64){var s=new XMLHttpRequest;if(s.open("GET",t.src,i.async,i.user,i.password),s.responseType=t.xhrSettings.responseType,s.timeout=i.timeout,i.headers)for(var n in i.headers)s.setRequestHeader(n,i.headers[n]);return i.header&&i.headerValue&&s.setRequestHeader(i.header,i.headerValue),i.requestedWith&&s.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&s.overrideMimeType(i.overrideMimeType),i.withCredentials&&(s.withCredentials=!0),s.onload=t.onLoad.bind(t,s),s.onerror=t.onError.bind(t,s),s.onprogress=t.onProgress.bind(t),s.ontimeout=t.onError.bind(t,s),s.send(),s}e=t.url.split(";base64,").pop()||t.url.split(",").pop(),e={responseText:atob(e)};t.onBase64Load(e)}},92638:t=>{t.exports=function(t,e,i,s,n,r){return{responseType:t=void 0===t?"":t,async:e=void 0===e?!0:e,user:i=void 0===i?"":i,password:s=void 0===s?"":s,timeout:n=void 0===n?0:n,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r=void 0===r?!1:r}}},23906:t=>{t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20}},42155:t=>{t.exports="addfile"},38991:t=>{t.exports="complete"},27540:t=>{t.exports="filecomplete"},87464:t=>{t.exports="filecomplete-"},94486:t=>{t.exports="loaderror"},13035:t=>{t.exports="load"},38144:t=>{t.exports="fileprogress"},97520:t=>{t.exports="postprocess"},85595:t=>{t.exports="progress"},55680:t=>{t.exports="start"},54899:(t,e,i)=>{t.exports={ADD:i(42155),COMPLETE:i(38991),FILE_COMPLETE:i(27540),FILE_KEY_COMPLETE:i(87464),FILE_LOAD_ERROR:i(94486),FILE_LOAD:i(13035),FILE_PROGRESS:i(38144),POST_PROCESS:i(97520),PROGRESS:i(85595),START:i(55680)}},14135:(t,e,i)=>{var s=i(83419),n=i(74099),r=i(518),o=i(54899),a=new s({Extends:r,initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.type="animationJSON"},onProcess:function(){this.loader.once(o.POST_PROCESS,this.onLoadComplete,this),r.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});n.register("animation",function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(83419),n=i(74099),h=i(95540),l=i(19550),u=i(41212),c=i(518),d=i(26430),a=new s({Extends:d,initialize:function(t,e,i,s,n,r){var o,a=u(e)?(e=h(a=e,"key"),o=new l(t,{key:e,url:h(a,"textureURL"),extension:h(a,"textureExtension","png"),normalMap:h(a,"normalMap"),xhrSettings:h(a,"textureXhrSettings")}),new c(t,{key:e,url:h(a,"atlasURL"),extension:h(a,"atlasExtension","json"),xhrSettings:h(a,"atlasXhrSettings")})):(o=new l(t,e,i,n),new c(t,e,s,r));o.linkFile?d.call(this,t,"atlasjson",e,[o,a,o.linkFile]):d.call(this,t,"atlasjson",e,[o,a])},addToCache:function(){var t,e,i;this.isReadyToProcess()&&(t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null,this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),e.addToCache(),this.complete=!0)}});n.register("aseprite",function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(83419),n=i(74099),h=i(95540),l=i(19550),u=i(41212),c=i(518),d=i(26430),a=new s({Extends:d,initialize:function(t,e,i,s,n,r){var o,a=u(e)?(e=h(a=e,"key"),o=new l(t,{key:e,url:h(a,"textureURL"),extension:h(a,"textureExtension","png"),normalMap:h(a,"normalMap"),xhrSettings:h(a,"textureXhrSettings")}),new c(t,{key:e,url:h(a,"atlasURL"),extension:h(a,"atlasExtension","json"),xhrSettings:h(a,"atlasXhrSettings")})):(o=new l(t,e,i,n),new c(t,e,s,r));o.linkFile?d.call(this,t,"atlasjson",e,[o,a,o.linkFile]):d.call(this,t,"atlasjson",e,[o,a])},addToCache:function(){var t,e,i;this.isReadyToProcess()&&(t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null,this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),this.complete=!0)}});n.register("atlas",function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(83419),n=i(74099),h=i(95540),l=i(19550),u=i(41212),c=i(26430),d=i(57318),a=new s({Extends:c,initialize:function(t,e,i,s,n,r){var o,a=u(e)?(e=h(a=e,"key"),o=new l(t,{key:e,url:h(a,"textureURL"),extension:h(a,"textureExtension","png"),normalMap:h(a,"normalMap"),xhrSettings:h(a,"textureXhrSettings")}),new d(t,{key:e,url:h(a,"atlasURL"),extension:h(a,"atlasExtension","xml"),xhrSettings:h(a,"atlasXhrSettings")})):(o=new l(t,e,i,n),new d(t,e,s,r));o.linkFile?c.call(this,t,"atlasxml",e,[o,a,o.linkFile]):c.call(this,t,"atlasxml",e,[o,a])},addToCache:function(){var t,e,i;this.isReadyToProcess()&&(t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null,this.loader.textureManager.addAtlasXML(t.key,t.data,e.data,i),this.complete=!0)}});n.register("atlasXML",function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(83419),n=i(23906),o=i(41299),r=i(74099),h=i(95540),l=i(89749),u=i(41212),c=new s({Extends:o,initialize:function(t,e,i,s,n){u(e)&&(e=h(r=e,"key"),s=h(r,"xhrSettings"),n=h(r,"context",n));var r={type:"audio",cache:t.cacheManager.audio,extension:i.type,responseType:"arraybuffer",key:e,url:i.url,xhrSettings:s,config:{context:n}};o.call(this,t,r)},onProcess:function(){this.state=n.FILE_PROCESSING;var e=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(t){e.data=t,e.onProcessComplete()},function(t){console.error("Error decoding audio: "+e.key+" - ",t?t.message:null),e.onProcessError()}),this.config.context=null}});c.create=function(t,e,i,s,n){var r=t.systems.game,o=r.config.audio,a=r.device.audio,i=(u(e)&&(i=h(e,"url",[]),s=h(e,"config",{})),c.getAudioURL(r,i));return i?a.webAudio&&!o.disableWebAudio?new c(t,e,i,n,r.sound.context):new l(t,e,i,s):(console.warn('No audio URLs for "%s" can play on this device',e),null)},c.getAudioURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i{var l=i(21097),s=i(83419),n=i(74099),u=i(95540),c=i(41212),d=i(518),p=i(26430),f=new s({Extends:p,initialize:function(t,e,i,s,n,r,o){var a,h;c(e)&&(e=u(h=e,"key"),i=u(h,"jsonURL"),s=u(h,"audioURL"),n=u(h,"audioConfig"),r=u(h,"audioXhrSettings"),o=u(h,"jsonXhrSettings")),s?(h=l.create(t,e,s,n,r))&&(a=new d(t,e,i,o),p.call(this,t,"audiosprite",e,[h,a]),this.config.resourceLoad=!1):(a=new d(t,e,i,o),p.call(this,t,"audiosprite",e,[a]),this.config.resourceLoad=!0,this.config.audioConfig=n,this.config.audioXhrSettings=r)},onFileComplete:function(t){var e,i,s;-1!==this.files.indexOf(t)&&(this.pending--,this.config.resourceLoad)&&"json"===t.type&&t.data.hasOwnProperty("resources")&&(e=t.data.resources,i=u(this.config,"audioConfig"),s=u(this.config,"audioXhrSettings"),t=l.create(this.loader,t.key,e,i,s))&&(this.addToMultiFile(t),this.loader.addFile(t))},addToCache:function(){var t,e;this.isReadyToProcess()&&(t=this.files[0],e=this.files[1],t.addToCache(),e.addToCache(),this.complete=!0)}});n.register("audioSprite",function(t,e,i,s,n,r){var o,a=this.systems.game,h=a.config.audio,a=a.device.audio;if(!(h&&h.noAudio||!a.webAudio&&!a.audioData))if(Array.isArray(t))for(var l=0;l{var s=i(83419),n=i(23906),a=i(41299),r=i(74099),h=i(95540),l=i(41212),o=new s({Extends:a,initialize:function(t,e,i,s,n){var r="bin",o=(l(e)&&(e=h(o=e,"key"),i=h(o,"url"),s=h(o,"xhrSettings"),r=h(o,"extension",r),n=h(o,"dataType",n)),{type:"binary",cache:t.cacheManager.binary,extension:r,responseType:"arraybuffer",key:e,url:i,xhrSettings:s,config:{dataType:n}});a.call(this,t,o)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this.config.dataType;this.data=t?new t(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});r.register("binary",function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(83419),n=i(74099),h=i(95540),l=i(19550),u=i(41212),c=i(26430),r=i(21859),d=i(57318),a=new s({Extends:c,initialize:function(t,e,i,s,n,r){var o,a=u(e)?(e=h(a=e,"key"),o=new l(t,{key:e,url:h(a,"textureURL"),extension:h(a,"textureExtension","png"),normalMap:h(a,"normalMap"),xhrSettings:h(a,"textureXhrSettings")}),new d(t,{key:e,url:h(a,"fontDataURL"),extension:h(a,"fontDataExtension","xml"),xhrSettings:h(a,"fontDataXhrSettings")})):(o=new l(t,e,i,n),new d(t,e,s,r));o.linkFile?c.call(this,t,"bitmapfont",e,[o,a,o.linkFile]):c.call(this,t,"bitmapfont",e,[o,a])},addToCache:function(){var t,e,i;this.isReadyToProcess()&&(t=this.files[0],i=this.files[1],t.addToCache(),e=t.cache.get(t.key),i=r(i.data,t.cache.getFrame(t.key),0,0,e),this.loader.cacheManager.bitmapFont.add(t.key,{data:i,texture:t.key,frame:null}),this.complete=!0)}});n.register("bitmapFont",function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(83419),n=i(23906),o=i(41299),r=i(74099),a=i(95540),h=i(41212),l=new s({Extends:o,initialize:function(t,e,i,s){var n="css",r=(h(e)&&(e=a(r=e,"key"),i=a(r,"url"),s=a(r,"xhrSettings"),n=a(r,"extension",n)),{type:"script",cache:!1,extension:n,responseType:"text",key:e,url:i,xhrSettings:s});o.call(this,t,r)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});r.register("css",function(t,e,i){if(Array.isArray(t))for(var s=0;s{var u=i(38734),p=i(85722),s=i(83419),n=i(74099),f=i(95540),c=i(19550),d=i(41212),r=i(518),g=i(31403),m=i(46975),v=i(59327),o=i(26430),y=i(82038),a=i(55222),x=new s({Extends:o,initialize:function(t,e,i,s){var n;i.multiAtlasURL?(n=new r(t,{key:e,url:i.multiAtlasURL,xhrSettings:s,config:i}),o.call(this,t,"texture",e,[n])):(n=i.textureURL.substr(i.textureURL.length-3),i.type||(i.type="ktx"===n.toLowerCase()?"KTX":"PVR"),n=new p(t,{key:e,url:i.textureURL,extension:n,xhrSettings:s,config:i}),i.atlasURL?(s=new r(t,{key:e,url:i.atlasURL,xhrSettings:s,config:i}),o.call(this,t,"texture",e,[n,s])):o.call(this,t,"texture",e,[n])),this.config=i},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,this.config.multiAtlasURL)&&"json"===t.type&&t.data.hasOwnProperty("textures")){var e=t.data.textures,t=this.config,i=this.loader,s=i.baseURL,n=i.path,r=i.prefix,o=f(t,"multiBaseURL",this.baseURL),a=f(t,"multiPath",this.path),h=f(t,"prefix",this.prefix),l=f(t,"textureXhrSettings");o&&i.setBaseURL(o),a&&i.setPath(a),h&&i.setPrefix(h);for(var u=0;u{var s=i(83419),n=i(23906),a=i(41299),r=i(74099),h=i(95540),l=i(41212),u=i(73894),o=new s({Extends:a,initialize:function(t,e,i,s,n){var r="glsl",o=(l(e)?(e=h(o=e,"key"),i=h(o,"url"),s=h(o,"shaderType","fragment"),n=h(o,"xhrSettings"),r=h(o,"extension",r)):void 0===s&&(s="fragment"),{type:"glsl",cache:t.cacheManager.shader,extension:r,responseType:"text",key:e,url:i,config:{shaderType:s},xhrSettings:n});a.call(this,t,o)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.split("\n"),e=this.extractBlock(t,0);if(e)for(;e;){var i,s=this.getShaderName(e.header),n=this.getShaderType(e.header),r=this.getShaderUniforms(e.header),o=e.shader;this.cache.has(s)?(i=this.cache.get(s),"fragment"===n?i.fragmentSrc=o:i.vertexSrc=o,i.uniforms||(i.uniforms=r)):"fragment"===n?this.cache.add(s,new u(s,o,"",r)):this.cache.add(s,new u(s,"",o,r)),e=this.extractBlock(t,e.offset)}else"fragment"===this.config.shaderType?this.cache.add(this.key,new u(this.key,this.data)):this.cache.add(this.key,new u(this.key,"",this.data))},getShaderName:function(t){for(var e=0;e{var s=i(83419),n=i(54899),r=i(41299),o=i(95540),a=i(98356),h=i(41212),i=new s({Extends:r,initialize:function(t,e,i,s){h(e)&&(e=o(n=e,"key"),s=o(n,"config",s));var n={type:"audio",cache:t.cacheManager.audio,extension:i.type,key:e,url:i.url,config:s};r.call(this,t,n),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t{var s=i(83419),n=i(23906),o=i(41299),r=i(74099),a=i(95540),h=i(41212),l=new s({Extends:o,initialize:function(t,e,i,s){var n="html",r=(h(e)&&(e=a(r=e,"key"),i=a(r,"url"),s=a(r,"xhrSettings"),n=a(r,"extension",n)),{type:"text",cache:t.cacheManager.html,extension:n,responseType:"text",key:e,url:i,xhrSettings:s});o.call(this,t,r)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("html",function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(83419),r=i(23906),h=i(41299),n=i(74099),l=i(95540),u=i(41212),o=new s({Extends:h,initialize:function(t,e,i,s,n,r){void 0===s&&(s=512),void 0===n&&(n=512);var o="html",a=(u(e)&&(e=l(a=e,"key"),i=l(a,"url"),r=l(a,"xhrSettings"),o=l(a,"extension",o),s=l(a,"width",s),n=l(a,"height",n)),{type:"html",cache:t.textureManager,extension:o,responseType:"text",key:e,url:i,xhrSettings:r,config:{width:s,height:n}});h.call(this,t,a)},onProcess:function(){this.state=r.FILE_PROCESSING;var t=this.config.width,e=this.config.height,i=[],e=(i.push(''),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push(""),[i.join("\n")]),s=this;try{var n=new window.Blob(e,{type:"image/svg+xml;charset=utf-8"})}catch(t){return s.state=r.FILE_ERRORED,void s.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){h.revokeObjectURL(s.data),s.onProcessComplete()},this.data.onerror=function(){h.revokeObjectURL(s.data),s.onProcessError()},h.createObjectURL(this.data,n,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});n.register("htmlTexture",function(t,e,i,s,n){if(Array.isArray(t))for(var r=0;r{var s=i(83419),n=i(23906),l=i(41299),r=i(74099),u=i(95540),c=i(41212),o=i(98356),a=new s({Extends:l,initialize:function t(e,i,s,n,r){var o,a="png",h=(c(i)&&(i=u(h=i,"key"),s=u(h,"url"),o=u(h,"normalMap"),n=u(h,"xhrSettings"),a=u(h,"extension",a),r=u(h,"frameConfig")),Array.isArray(s)&&(o=s[1],s=s[0]),{type:"image",cache:e.textureManager,extension:a,responseType:"blob",key:i,url:s,xhrSettings:n,config:r});l.call(this,e,h),o&&((a=new t(e,this.key,o,n,r)).type="normalMap",this.setLink(a),e.addFile(a)),this.useImageElementLoad="HTMLImageElement"===e.imageLoadType||this.base64,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){l.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){l.revokeObjectURL(t.data),t.onProcessError()},l.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=n.FILE_PROCESSING,t===n.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=n.FILE_LOADING,this.src=o(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=n.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src},addToCache:function(){var t=this.linkFile;t?t.state>=n.FILE_COMPLETE&&("spritesheet"===t.type?t.addToCache():"normalMap"===this.type?this.cache.addImage(this.key,t.data,this.data):this.cache.addImage(this.key,this.data,t.data)):this.cache.addImage(this.key,this.data)}});r.register("image",function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(83419),a=i(23906),h=i(41299),n=i(74099),l=i(95540),u=i(35154),c=i(41212),r=new s({Extends:h,initialize:function(t,e,i,s,n){var r="json",o=(c(e)&&(e=l(o=e,"key"),i=l(o,"url"),s=l(o,"xhrSettings"),r=l(o,"extension",r),n=l(o,"dataKey",n)),{type:"json",cache:t.cacheManager.json,extension:r,responseType:"text",key:e,url:i,xhrSettings:s,config:n});h.call(this,t,o),c(i)&&(this.data=n?u(i,n):i,this.state=a.FILE_POPULATED)},onProcess:function(){if(this.state!==a.FILE_POPULATED){this.state=a.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?u(t,e,t):t}this.onProcessComplete()}});n.register("json",function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(83419),n=i(74099),p=i(95540),f=i(19550),h=i(41212),l=i(518),u=i(26430),a=new s({Extends:u,initialize:function(t,e,i,s,n,r,o){h(e)&&(e=p(a=e,"key"),i=p(a,"url",!1)?p(a,"url"):p(a,"atlasURL"),r=p(a,"xhrSettings"),s=p(a,"path"),n=p(a,"baseURL"),o=p(a,"textureXhrSettings"));var a=new l(t,e,i,r);u.call(this,t,"multiatlas",e,[a]),this.config.path=s,this.config.baseURL=n,this.config.textureXhrSettings=o},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"json"===t.type)&&t.data.hasOwnProperty("textures")){var e=t.data.textures,t=this.config,i=this.loader,s=i.baseURL,n=i.path,r=i.prefix,o=p(t,"baseURL",this.baseURL),a=p(t,"path",this.path),h=p(t,"prefix",this.prefix),l=p(t,"textureXhrSettings");i.setBaseURL(o),i.setPath(a),i.setPrefix(h);for(var u=0;u{var s=i(83419),n=i(74099),l=i(95540),u=i(41212),c=i(26430),d=i(34328),r=new s({Extends:c,initialize:function(t,e,i,s){var n,r="js",o=[];u(e)&&(e=l(n=e,"key"),i=l(n,"url"),s=l(n,"xhrSettings"),r=l(n,"extension",r)),Array.isArray(i)||(i=[i]);for(var a=0;a{var s=i(83419),n=i(74099),u=i(95540),c=i(41212),d=i(26430),r=i(85048),o=i(61485),p=i(78776),a=new s({Extends:d,initialize:function(t,e,i,s,n,r){var o,a,h,l=t.cacheManager.obj;c(e)?(e=u(h=e,"key"),o=new p(t,{key:e,type:"obj",cache:l,url:u(h,"url"),extension:u(h,"extension","obj"),xhrSettings:u(h,"xhrSettings"),config:{flipUV:u(h,"flipUV",n)}}),(s=u(h,"matURL"))&&(a=new p(t,{key:e,type:"mat",cache:l,url:s,extension:u(h,"matExtension","mat"),xhrSettings:u(h,"xhrSettings")}))):(o=new p(t,{key:e,url:i,type:"obj",cache:l,extension:"obj",xhrSettings:r,config:{flipUV:n}}),s&&(a=new p(t,{key:e,url:s,type:"mat",cache:l,extension:"mat",xhrSettings:r}))),d.call(this,t,"obj",e,[o,a])},addToCache:function(){var t,e,i;this.isReadyToProcess()&&(t=this.files[0],e=this.files[1],i=r(t.data,t.config.flipUV),e&&(i.materials=o(e.data)),t.cache.add(t.key,i),this.complete=!0)}});n.register("obj",function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(83419),n=i(23906),r=i(74099),o=i(518),a=new s({Extends:o,initialize:function(t,e,i,s,n){o.call(this,t,e,i,s,n),this.type="packfile"},onProcess:function(){var t;this.state!==n.FILE_POPULATED&&(this.state=n.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config&&((t={})[this.config]=this.data,this.data=t),this.loader.addPack(this.data,this.config),this.onProcessComplete()}});r.register("pack",function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(83419),h=i(23906),l=i(41299),n=i(74099),u=i(95540),c=i(41212),o=new s({Extends:l,initialize:function(t,e,i,s,n,r){var o="js",a=(c(e)&&(e=u(a=e,"key"),i=u(a,"url"),r=u(a,"xhrSettings"),o=u(a,"extension",o),s=u(a,"start"),n=u(a,"mapping")),{type:"plugin",cache:!1,extension:o,responseType:"text",key:e,url:i,xhrSettings:r,config:{start:s,mapping:n}});l.call(this,t,a),"function"==typeof i&&(this.data=i,this.state=h.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=u(e,"start",!1),e=u(e,"mapping",null);this.state===h.FILE_POPULATED?t.install(this.key,this.data,i,e):(this.state=h.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),t=t.install(this.key,window[this.key],i,e),(i||e)&&(this.loader.systems[e]=t,this.loader.scene[e]=t)),this.onProcessComplete()}});n.register("plugin",function(t,e,i,s,n){if(Array.isArray(t))for(var r=0;r{var s=i(83419),d=i(23906),p=i(41299),n=i(74099),a=i(95540),h=i(41212),r=new s({Extends:p,initialize:function(t,e,i,s,n){var r="svg",o=(h(e)&&(e=a(o=e,"key"),i=a(o,"url"),s=a(o,"svgConfig",{}),n=a(o,"xhrSettings"),r=a(o,"extension",r)),{type:"svg",cache:t.textureManager,extension:r,responseType:"text",key:e,url:i,xhrSettings:n,config:{width:a(s,"width"),height:a(s,"height"),scale:a(s,"scale")}});p.call(this,t,o)},onProcess:function(){this.state=d.FILE_PROCESSING;var t=this.xhrLoader.responseText,e=[t],i=this.config.width,s=this.config.height,n=this.config.scale;t:if(i&&s||n){var r=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("svg")[0],o=r.hasAttribute("viewBox"),a=parseFloat(r.getAttribute("width")),h=parseFloat(r.getAttribute("height"));if(!o&&a&&h?r.setAttribute("viewBox","0 0 "+a+" "+h):!o||a||h||(a=(o=r.getAttribute("viewBox").split(/\s+|,/))[2],h=o[3]),n){if(!a||!h)break t;i=a*n,s=h*n}r.setAttribute("width",i.toString()+"px"),r.setAttribute("height",s.toString()+"px"),e=[(new XMLSerializer).serializeToString(r)]}try{var l=new window.Blob(e,{type:"image/svg+xml;charset=utf-8"})}catch(t){return void this.onProcessError()}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var u=this,c=!1;this.data.onload=function(){c||p.revokeObjectURL(u.data),u.onProcessComplete()},this.data.onerror=function(){c?u.onProcessError():(c=!0,p.revokeObjectURL(u.data),u.data.src="data:image/svg+xml,"+encodeURIComponent(e.join("")))},p.createObjectURL(this.data,l,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});n.register("svg",function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(83419),n=i(23906),o=i(41299),r=i(74099),a=i(95540),h=i(41212),l=new s({Extends:o,initialize:function(t,e,i,s){var n="js",r=(h(e)&&(e=a(r=e,"key"),i=a(r,"url"),s=a(r,"xhrSettings"),n=a(r,"extension",n)),{type:"text",extension:n,responseType:"text",key:e,url:i,xhrSettings:s});o.call(this,t,r)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.concat("(function(){\nreturn new "+this.key+"();\n}).call(this);"),e=eval;this.loader.sceneManager.add(this.key,e(t)),this.complete=!0}});r.register("sceneFile",function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(83419),h=i(23906),l=i(41299),n=i(74099),u=i(95540),c=i(41212),o=new s({Extends:l,initialize:function(t,e,i,s,n,r){var o="js",a=(c(e)&&(e=u(a=e,"key"),i=u(a,"url"),r=u(a,"xhrSettings"),o=u(a,"extension",o),s=u(a,"systemKey"),n=u(a,"sceneKey")),{type:"scenePlugin",cache:!1,extension:o,responseType:"text",key:e,url:i,xhrSettings:r,config:{systemKey:s,sceneKey:n}});l.call(this,t,a),"function"==typeof i&&(this.data=i,this.state=h.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=this.key,s=u(e,"systemKey",i),e=u(e,"sceneKey",i);this.state===h.FILE_POPULATED?t.installScenePlugin(s,this.data,e,this.loader.scene,!0):(this.state=h.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),t.installScenePlugin(s,window[this.key],e,this.loader.scene,!0)),this.onProcessComplete()}});n.register("scenePlugin",function(t,e,i,s,n){if(Array.isArray(t))for(var r=0;r{var s=i(83419),n=i(23906),a=i(41299),r=i(74099),h=i(95540),l=i(41212),o=new s({Extends:a,initialize:function(t,e,i,s,n){var r="js",o=(l(e)?(e=h(o=e,"key"),i=h(o,"url"),s=h(o,"type","script"),n=h(o,"xhrSettings"),r=h(o,"extension",r)):void 0===s&&(s="script"),{type:s,cache:!1,extension:r,responseType:"text",key:e,url:i,xhrSettings:n});a.call(this,t,o)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});r.register("script",function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(83419),n=i(23906),r=i(74099),o=i(19550),a=new s({Extends:o,initialize:function(t,e,i,s,n){o.call(this,t,e,i,n,s),this.type="spritesheet"},addToCache:function(){var t=this.linkFile;t?t.state>=n.FILE_COMPLETE&&("normalMap"===this.type?this.cache.addSpriteSheet(this.key,t.data,this.config,this.data):this.cache.addSpriteSheet(this.key,this.data,this.config,t.data)):this.cache.addSpriteSheet(this.key,this.data,this.config)}});r.register("spritesheet",function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(83419),n=i(23906),h=i(41299),r=i(74099),l=i(95540),u=i(41212),o=new s({Extends:h,initialize:function(t,e,i,s){var n="text",r="txt",o=t.cacheManager.text,a=(u(e)&&(e=l(a=e,"key"),i=l(a,"url"),s=l(a,"xhrSettings"),r=l(a,"extension",r),n=l(a,"type",n),o=l(a,"cache",o)),{type:n,cache:o,extension:r,responseType:"text",key:e,url:i,xhrSettings:s});h.call(this,t,a)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("text",function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(83419),n=i(23906),o=i(41299),r=i(74099),a=i(95540),h=i(41212),l=i(80341),u=new s({Extends:o,initialize:function(t,e,i,s){var n="csv",r=(h(e)&&(e=a(r=e,"key"),i=a(r,"url"),s=a(r,"xhrSettings"),n=a(r,"extension",n)),{type:"tilemapCSV",cache:t.cacheManager.tilemap,extension:n,responseType:"text",key:e,url:i,xhrSettings:s});o.call(this,t,r),this.tilemapFormat=l.CSV},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,t)}});r.register("tilemapCSV",function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(83419),n=i(74099),r=i(518),o=i(80341),a=new s({Extends:r,initialize:function(t,e,i,s){r.call(this,t,e,i,s),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:o.WELTMEISTER,data:this.data};this.cache.add(this.key,t)}});n.register("tilemapImpact",function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(83419),n=i(74099),r=i(518),o=i(80341),a=new s({Extends:r,initialize:function(t,e,i,s){r.call(this,t,e,i,s),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:o.TILED_JSON,data:this.data};this.cache.add(this.key,t)}});n.register("tilemapTiledJSON",function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(83419),n=i(74099),h=i(95540),l=i(19550),u=i(41212),c=i(26430),d=i(78776),a=new s({Extends:c,initialize:function(t,e,i,s,n,r){var o,a=u(e)?(e=h(a=e,"key"),o=new l(t,{key:e,url:h(a,"textureURL"),extension:h(a,"textureExtension","png"),normalMap:h(a,"normalMap"),xhrSettings:h(a,"textureXhrSettings")}),new d(t,{key:e,url:h(a,"atlasURL"),extension:h(a,"atlasExtension","txt"),xhrSettings:h(a,"atlasXhrSettings")})):(o=new l(t,e,i,n),new d(t,e,s,r));o.linkFile?c.call(this,t,"unityatlas",e,[o,a,o.linkFile]):c.call(this,t,"unityatlas",e,[o,a])},addToCache:function(){var t,e,i;this.isReadyToProcess()&&(t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null,this.loader.textureManager.addUnityAtlas(t.key,t.data,e.data,i),this.complete=!0)}});n.register("unityAtlas",function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(83419),n=i(23906),r=i(41299),o=i(74099),a=i(98356),h=i(95540),l=i(41212),u=new s({Extends:r,initialize:function(t,e,i,s){void 0===s&&(s=!1),l(e)&&(e=h(n=e,"key"),i=h(n,"url",[]),s=h(n,"noAudio",!1));var n=t.systems.game.device.video.getVideoURL(i),i=(n||console.warn("VideoFile: No supported format for "+e),{type:"video",cache:t.cacheManager.video,extension:n.type,key:e,url:n.url,config:{noAudio:s}});r.call(this,t,i)},onProcess:function(){this.data={url:this.src,noAudio:this.config.noAudio,crossOrigin:this.crossOrigin},this.onProcessComplete()},load:function(){this.src=a(this,this.loader.baseURL),this.state=n.FILE_LOADED,this.loader.nextFile(this,!0)}});o.register("video",function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(83419),n=i(23906),o=i(41299),r=i(74099),a=i(95540),h=i(41212),l=i(56836),u=new s({Extends:o,initialize:function(t,e,i,s){var n="xml",r=(h(e)&&(e=a(r=e,"key"),i=a(r,"url"),s=a(r,"xhrSettings"),n=a(r,"extension",n)),{type:"xml",cache:t.cacheManager.xml,extension:n,responseType:"text",key:e,url:i,xhrSettings:s});o.call(this,t,r)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});r.register("xml",function(t,e,i){if(Array.isArray(t))for(var s=0;s{t.exports={AnimationJSONFile:i(14135),AsepriteFile:i(76272),AtlasJSONFile:i(38734),AtlasXMLFile:i(74599),AudioFile:i(21097),AudioSpriteFile:i(89524),BinaryFile:i(85722),BitmapFontFile:i(97025),CompressedTextureFile:i(69559),CSSFile:i(16024),GLSLFile:i(47931),HTML5AudioFile:i(89749),HTMLFile:i(88470),HTMLTextureFile:i(14643),ImageFile:i(19550),JSONFile:i(518),MultiAtlasFile:i(59327),MultiScriptFile:i(99297),OBJFile:i(41846),PackFile:i(58610),PluginFile:i(48988),SceneFile:i(88423),ScenePluginFile:i(56812),ScriptFile:i(34328),SpriteSheetFile:i(85035),SVGFile:i(67397),TextFile:i(78776),TilemapCSVFile:i(49477),TilemapImpactFile:i(40807),TilemapJSONFile:i(56775),UnityAtlasFile:i(25771),VideoFile:i(33720),XMLFile:i(57318)}},57777:(t,e,i)=>{var s=i(23906),i=i(79291)(!1,{Events:i(54899),FileTypes:i(64589),File:i(41299),FileTypesManager:i(74099),GetURL:i(98356),LoaderPlugin:i(74261),MergeXHRSettings:i(3374),MultiFile:i(26430),XHRLoader:i(84376),XHRSettings:i(92638)},s);t.exports=i},53307:t=>{t.exports=function(t){for(var e=0,i=0;i{var s=i(6411);t.exports=function(t,e){return s(t)/s(e)/s(t-e)}},30976:t=>{t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},87842:t=>{t.exports=function(t,e,i,s,n){var e=.5*(s-e),n=.5*(n-i),r=t*t;return t*r*(2*i-2*s+e+n)+(-3*i+3*s-2*e-n)*r+e*t+i}},26302:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);i=Math.pow(i,-e);return Math.ceil(t*i)/i}},45319:t=>{t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},39506:(t,e,i)=>{var s=i(36383);t.exports=function(t){return t*s.DEG_TO_RAD}},61241:t=>{t.exports=function(t,e){return Math.abs(t-e)}},38857:(t,e,i)=>{var m=i(45319),s=i(83419),n=i(37867),r=i(29747),o=new n,i=new s({initialize:function t(e,i,s,n){void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=t.DefaultOrder),this._x=e=void 0===e?0:e,this._y=i,this._z=s,this._order=n,this.onChangeCallback=r},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,s){return void 0===s&&(s=this._order),this._x=t,this._y=e,this._z=i,this._order=s,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),o.fromQuat(t),this.setFromRotationMatrix(o,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var t=t.val,s=t[0],n=t[4],r=t[8],o=t[1],a=t[5],h=t[9],l=t[2],u=t[6],c=t[10],d=0,p=0,f=0,g=.99999;switch(e){case"XYZ":p=Math.asin(m(r,-1,1)),Math.abs(r){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},99472:t=>{t.exports=function(t,e){return Math.random()*(e-t)+t}},77623:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);i=Math.pow(i,-e);return Math.floor(t*i)/i}},62945:(t,e,i)=>{var s=i(45319);t.exports=function(t,e,i){return(i-e)*(t=s(t,0,1))+e}},38265:t=>{t.exports=function(t,e){return t/e/1e3}},78702:t=>{t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},94883:t=>{t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},28915:t=>{t.exports=function(t,e,i){return(e-t)*i+t}},94908:t=>{t.exports=function(t,e,i){return void 0===i&&(i=0),t.clone().lerp(e,i)}},94434:(t,e,i)=>{var s=new(i(83419))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new s(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,t=t.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},fromMat4:function(t){var t=t.val,e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=s,this},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*n+o*a,d=h*n-r*a,p=e*u+i*c+s*d;return p?(t[0]=u*(p=1/p),t[1]=(-l*i+s*h)*p,t[2]=(o*i-s*r)*p,t[3]=c*p,t[4]=(l*e-s*a)*p,t[5]=(-o*e+s*n)*p,t[6]=d*p,t[7]=(-h*e+i*a)*p,t[8]=(r*e-i*n)*p,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=s*h-i*l,t[2]=i*o-s*r,t[3]=o*a-n*l,t[4]=e*l-s*a,t[5]=s*n-e*o,t[6]=n*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*n,this},determinant:function(){var t=this.val,e=t[0],i=t[3],s=t[4],n=t[5],r=t[6],o=t[7],a=t[8];return e*(a*s-n*o)+t[1]*(-a*i+n*r)+t[2]*(o*i-s*r)},multiply:function(t){var e=this.val,i=e[0],s=e[1],n=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],t=t.val,c=t[0],d=t[1],p=t[2],f=t[3],g=t[4],m=t[5],v=t[6],y=t[7],t=t[8];return e[0]=c*i+d*r+p*h,e[1]=c*s+d*o+p*l,e[2]=c*n+d*a+p*u,e[3]=f*i+g*r+m*h,e[4]=f*s+g*o+m*l,e[5]=f*n+g*a+m*u,e[6]=v*i+y*r+t*h,e[7]=v*s+y*o+t*l,e[8]=v*n+y*a+t*u,this},translate:function(t){var e=this.val,i=t.x,t=t.y;return e[6]=i*e[0]+t*e[3]+e[6],e[7]=i*e[1]+t*e[4]+e[7],e[8]=i*e[2]+t*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],s=e[1],n=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),t=Math.cos(t);return e[0]=t*i+h*r,e[1]=t*s+h*o,e[2]=t*n+h*a,e[3]=t*r-h*i,e[4]=t*o-h*s,e[5]=t*a-h*n,this},scale:function(t){var e=this.val,i=t.x,t=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=t*e[3],e[4]=t*e[4],e[5]=t*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,s=t.z,t=t.w,n=e+e,r=i+i,o=s+s,a=e*n,h=e*r,e=e*o,l=i*r,i=i*o,s=s*o,n=t*n,r=t*r,t=t*o,o=this.val;return o[0]=1-(l+s),o[3]=h+t,o[6]=e-r,o[1]=h-t,o[4]=1-(a+s),o[7]=i+n,o[2]=e+r,o[5]=i-n,o[8]=1-(a+l),this},normalFromMat4:function(t){var t=t.val,e=this.val,i=t[0],s=t[1],n=t[2],r=t[3],o=t[4],a=t[5],h=t[6],l=t[7],u=t[8],c=t[9],d=t[10],p=t[11],f=t[12],g=t[13],m=t[14],t=t[15],v=i*a-s*o,y=i*h-n*o,x=i*l-r*o,T=s*h-n*a,b=s*l-r*a,w=n*l-r*h,S=u*g-c*f,C=u*m-d*f,u=u*t-p*f,E=c*m-d*g,c=c*t-p*g,d=d*t-p*m,p=v*d-y*c+x*E+T*u-b*C+w*S;return p?(e[0]=(a*d-h*c+l*E)*(p=1/p),e[1]=(h*u-o*d-l*C)*p,e[2]=(o*c-a*u+l*S)*p,e[3]=(n*c-s*d-r*E)*p,e[4]=(i*d-n*u+r*C)*p,e[5]=(s*u-i*c-r*S)*p,e[6]=(g*w-m*b+t*T)*p,e[7]=(m*x-f*w-t*y)*p,e[8]=(f*b-g*x+t*v)*p,this):null}});t.exports=s},37867:(t,e,i)=>{var s=i(83419),i=i(25836),n=new s({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,s,n,r,o,a,h,l,u,c,d,p,f,g){var m=this.val;return m[0]=t,m[1]=e,m[2]=i,m[3]=s,m[4]=n,m[5]=r,m[6]=o,m[7]=a,m[8]=h,m[9]=l,m[10]=u,m[11]=c,m[12]=d,m[13]=p,m[14]=f,m[15]=g,this},copy:function(t){t=t.val;return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var i=a.fromQuat(i).val,s=e.x,n=e.y,e=e.z;return this.setValues(i[0]*s,i[1]*s,i[2]*s,0,i[4]*n,i[5]*n,i[6]*n,0,i[8]*e,i[9]*e,i[10]*e,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var s=this.val;return s[12]=t,s[13]=e,s[14]=i,this},scaling:function(t,e,i){this.zero();var s=this.val;return s[0]=t,s[5]=e,s[10]=i,s[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[3],n=t[6],r=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=n,t[11]=t[14],t[12]=s,t[13]=r,t[14]=o,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],p=t[12],f=t[13],g=t[14],t=t[15],m=e*o-i*r,v=e*a-s*r,y=e*h-n*r,x=i*a-s*o,T=i*h-n*o,b=s*h-n*a,w=l*f-u*p,S=l*g-c*p,C=l*t-d*p,E=u*g-c*f,_=u*t-d*f,A=c*t-d*g,P=m*A-v*_+y*E+x*C-T*S+b*w;return P?this.setValues((o*A-a*_+h*E)*(P=1/P),(s*_-i*A-n*E)*P,(f*b-g*T+t*x)*P,(c*T-u*b-d*x)*P,(a*C-r*A-h*S)*P,(e*A-s*C+n*S)*P,(g*y-p*b-t*v)*P,(l*b-c*y+d*v)*P,(r*_-o*C+h*w)*P,(i*C-e*_-n*w)*P,(p*T-f*y+t*m)*P,(u*y-l*T-d*m)*P,(o*S-r*E-a*w)*P,(e*E-i*S+s*w)*P,(f*v-p*x-g*m)*P,(l*x-u*v+c*m)*P):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],p=t[12],f=t[13],g=t[14],t=t[15];return this.setValues(o*(c*t-d*g)-u*(a*t-h*g)+f*(a*d-h*c),-(i*(c*t-d*g)-u*(s*t-n*g)+f*(s*d-n*c)),i*(a*t-h*g)-o*(s*t-n*g)+f*(s*h-n*a),-(i*(a*d-h*c)-o*(s*d-n*c)+u*(s*h-n*a)),-(r*(c*t-d*g)-l*(a*t-h*g)+p*(a*d-h*c)),e*(c*t-d*g)-l*(s*t-n*g)+p*(s*d-n*c),-(e*(a*t-h*g)-r*(s*t-n*g)+p*(s*h-n*a)),e*(a*d-h*c)-r*(s*d-n*c)+l*(s*h-n*a),r*(u*t-d*f)-l*(o*t-h*f)+p*(o*d-h*u),-(e*(u*t-d*f)-l*(i*t-n*f)+p*(i*d-n*u)),e*(o*t-h*f)-r*(i*t-n*f)+p*(i*h-n*o),-(e*(o*d-h*u)-r*(i*d-n*u)+l*(i*h-n*o)),-(r*(u*g-c*f)-l*(o*g-a*f)+p*(o*c-a*u)),e*(u*g-c*f)-l*(i*g-s*f)+p*(i*c-s*u),-(e*(o*g-a*f)-r*(i*g-s*f)+p*(i*a-s*o)),e*(o*c-a*u)-r*(i*c-s*u)+l*(i*a-s*o))},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],p=t[12],f=t[13],g=t[14],t=t[15];return(e*o-i*r)*(c*t-d*g)-(e*a-s*r)*(u*t-d*f)+(e*h-n*r)*(u*g-c*f)+(i*a-s*o)*(l*t-d*p)-(i*h-n*o)*(l*g-c*p)+(s*h-n*a)*(l*f-u*p)},multiply:function(t){var e=this.val,i=e[0],s=e[1],n=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],p=e[11],f=e[12],g=e[13],m=e[14],v=e[15],t=t.val,y=t[0],x=t[1],T=t[2],b=t[3];return e[0]=y*i+x*o+T*u+b*f,e[1]=y*s+x*a+T*c+b*g,e[2]=y*n+x*h+T*d+b*m,e[3]=y*r+x*l+T*p+b*v,e[4]=(y=t[4])*i+(x=t[5])*o+(T=t[6])*u+(b=t[7])*f,e[5]=y*s+x*a+T*c+b*g,e[6]=y*n+x*h+T*d+b*m,e[7]=y*r+x*l+T*p+b*v,e[8]=(y=t[8])*i+(x=t[9])*o+(T=t[10])*u+(b=t[11])*f,e[9]=y*s+x*a+T*c+b*g,e[10]=y*n+x*h+T*d+b*m,e[11]=y*r+x*l+T*p+b*v,e[12]=(y=t[12])*i+(x=t[13])*o+(T=t[14])*u+(b=t[15])*f,e[13]=y*s+x*a+T*c+b*g,e[14]=y*n+x*h+T*d+b*m,e[15]=y*r+x*l+T*p+b*v,this},multiplyLocal:function(t){var e=this.val,t=t.val;return this.setValues(e[0]*t[0]+e[1]*t[4]+e[2]*t[8]+e[3]*t[12],e[0]*t[1]+e[1]*t[5]+e[2]*t[9]+e[3]*t[13],e[0]*t[2]+e[1]*t[6]+e[2]*t[10]+e[3]*t[14],e[0]*t[3]+e[1]*t[7]+e[2]*t[11]+e[3]*t[15],e[4]*t[0]+e[5]*t[4]+e[6]*t[8]+e[7]*t[12],e[4]*t[1]+e[5]*t[5]+e[6]*t[9]+e[7]*t[13],e[4]*t[2]+e[5]*t[6]+e[6]*t[10]+e[7]*t[14],e[4]*t[3]+e[5]*t[7]+e[6]*t[11]+e[7]*t[15],e[8]*t[0]+e[9]*t[4]+e[10]*t[8]+e[11]*t[12],e[8]*t[1]+e[9]*t[5]+e[10]*t[9]+e[11]*t[13],e[8]*t[2]+e[9]*t[6]+e[10]*t[10]+e[11]*t[14],e[8]*t[3]+e[9]*t[7]+e[10]*t[11]+e[11]*t[15],e[12]*t[0]+e[13]*t[4]+e[14]*t[8]+e[15]*t[12],e[12]*t[1]+e[13]*t[5]+e[14]*t[9]+e[15]*t[13],e[12]*t[2]+e[13]*t[6]+e[14]*t[10]+e[15]*t[14],e[12]*t[3]+e[13]*t[7]+e[14]*t[11]+e[15]*t[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var t=t.val,e=e.val,i=t[0],s=t[4],n=t[8],r=t[12],o=t[1],a=t[5],h=t[9],l=t[13],u=t[2],c=t[6],d=t[10],p=t[14],f=t[3],g=t[7],m=t[11],t=t[15],v=e[0],y=e[4],x=e[8],T=e[12],b=e[1],w=e[5],S=e[9],C=e[13],E=e[2],_=e[6],A=e[10],P=e[14],M=e[3],R=e[7],L=e[11],e=e[15];return this.setValues(i*v+s*b+n*E+r*M,o*v+a*b+h*E+l*M,u*v+c*b+d*E+p*M,f*v+g*b+m*E+t*M,i*y+s*w+n*_+r*R,o*y+a*w+h*_+l*R,u*y+c*w+d*_+p*R,f*y+g*w+m*_+t*R,i*x+s*S+n*A+r*L,o*x+a*S+h*A+l*L,u*x+c*S+d*A+p*L,f*x+g*S+m*A+t*L,i*T+s*C+n*P+r*e,o*T+a*C+h*P+l*e,u*T+c*C+d*P+p*e,f*T+g*C+m*P+t*e)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var s=this.val;return s[12]=s[0]*t+s[4]*e+s[8]*i+s[12],s[13]=s[1]*t+s[5]*e+s[9]*i+s[13],s[14]=s[2]*t+s[6]*e+s[10]*i+s[14],s[15]=s[3]*t+s[7]*e+s[11]*i+s[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var s=this.val;return s[0]=s[0]*t,s[1]=s[1]*t,s[2]=s[2]*t,s[3]=s[3]*t,s[4]=s[4]*e,s[5]=s[5]*e,s[6]=s[6]*e,s[7]=s[7]*e,s[8]=s[8]*i,s[9]=s[9]*i,s[10]=s[10]*i,s[11]=s[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),e=Math.sin(e),s=1-i,n=t.x,r=t.y,t=t.z,o=s*n,a=s*r;return this.setValues(o*n+i,o*r-e*t,o*t+e*r,0,o*r+e*t,a*r+i,a*t-e*n,0,o*t-e*r,a*t+e*n,s*t*t+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,s=e.x,n=e.y,e=e.z,r=Math.sqrt(s*s+n*n+e*e);if(Math.abs(r)<1e-6)return this;s*=r=1/r,n*=r,e*=r;var r=Math.sin(t),t=Math.cos(t),o=1-t,a=i[0],h=i[1],l=i[2],u=i[3],c=i[4],d=i[5],p=i[6],f=i[7],g=i[8],m=i[9],v=i[10],y=i[11],x=i[12],T=i[13],b=i[14],i=i[15],w=s*s*o+t,S=n*s*o+e*r,C=e*s*o-n*r,E=s*n*o-e*r,_=n*n*o+t,A=e*n*o+s*r,P=s*e*o+n*r,n=n*e*o-s*r,s=e*e*o+t;return this.setValues(a*w+c*S+g*C,h*w+d*S+m*C,l*w+p*S+v*C,u*w+f*S+y*C,a*E+c*_+g*A,h*E+d*_+m*A,l*E+p*_+v*A,u*E+f*_+y*A,a*P+c*n+g*s,h*P+d*n+m*s,l*P+p*n+v*s,u*P+f*n+y*s,x,T,b,i)},rotateX:function(t){var e=this.val,i=Math.sin(t),t=Math.cos(t),s=e[4],n=e[5],r=e[6],o=e[7],a=e[8],h=e[9],l=e[10],u=e[11];return e[4]=s*t+a*i,e[5]=n*t+h*i,e[6]=r*t+l*i,e[7]=o*t+u*i,e[8]=a*t-s*i,e[9]=h*t-n*i,e[10]=l*t-r*i,e[11]=u*t-o*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),t=Math.cos(t),s=e[0],n=e[1],r=e[2],o=e[3],a=e[8],h=e[9],l=e[10],u=e[11];return e[0]=s*t-a*i,e[1]=n*t-h*i,e[2]=r*t-l*i,e[3]=o*t-u*i,e[8]=s*i+a*t,e[9]=n*i+h*t,e[10]=r*i+l*t,e[11]=o*i+u*t,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),t=Math.cos(t),s=e[0],n=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7];return e[0]=s*t+a*i,e[1]=n*t+h*i,e[2]=r*t+l*i,e[3]=o*t+u*i,e[4]=a*t-s*i,e[5]=h*t-n*i,e[6]=l*t-r*i,e[7]=u*t-o*i,this},fromRotationTranslation:function(t,e){var i=t.x,s=t.y,n=t.z,t=t.w,r=i+i,o=s+s,a=n+n,h=i*r,l=i*o,i=i*a,u=s*o,s=s*a,n=n*a,r=t*r,o=t*o,t=t*a;return this.setValues(1-(u+n),l+t,i-o,0,l-t,1-(h+n),s+r,0,i+o,s-r,1-(h+u),0,e.x,e.y,e.z,1)},fromQuat:function(t){var e=t.x,i=t.y,s=t.z,t=t.w,n=e+e,r=i+i,o=s+s,a=e*n,h=e*r,e=e*o,l=i*r,i=i*o,s=s*o,n=t*n,r=t*r,t=t*o;return this.setValues(1-(l+s),h+t,e-r,0,h-t,1-(a+s),i+n,0,e+r,i-n,1-(a+l),0,0,0,0,1)},frustum:function(t,e,i,s,n,r){var o=1/(e-t),a=1/(s-i),h=1/(n-r);return this.setValues(2*n*o,0,0,0,0,2*n*a,0,0,(e+t)*o,(s+i)*a,(r+n)*h,-1,0,0,r*n*2*h,0)},perspective:function(t,e,i,s){var t=1/Math.tan(t/2),n=1/(i-s);return this.setValues(t/e,0,0,0,0,t,0,0,0,0,(s+i)*n,-1,0,0,2*s*i*n,0)},perspectiveLH:function(t,e,i,s){return this.setValues(2*i/t,0,0,0,0,2*i/e,0,0,0,0,-s/(i-s),1,0,0,i*s/(i-s),0)},ortho:function(t,e,i,s,n,r){var o=t-e,a=i-s,h=n-r;return this.setValues(-2*(o=0==o?o:1/o),0,0,0,0,-2*(a=0==a?a:1/a),0,0,0,0,2*(h=0==h?h:1/h),0,(t+e)*o,(s+i)*a,(r+n)*h,1)},lookAtRH:function(t,e,i){var s=this.val;return l.subVectors(t,e),0===l.lengthSq()&&(l.z=1),l.normalize(),r.crossVectors(i,l),0===r.lengthSq()&&(1===Math.abs(i.z)?l.x+=1e-4:l.z+=1e-4,l.normalize(),r.crossVectors(i,l)),r.normalize(),o.crossVectors(l,r),s[0]=r.x,s[1]=r.y,s[2]=r.z,s[4]=o.x,s[5]=o.y,s[6]=o.z,s[8]=l.x,s[9]=l.y,s[10]=l.z,this},lookAt:function(t,e,i){var s,n,r,o,a=t.x,h=t.y,t=t.z,l=i.x,u=i.y,i=i.z,c=e.x,d=e.y,e=e.z;return Math.abs(a-c)<1e-6&&Math.abs(h-d)<1e-6&&Math.abs(t-e)<1e-6?this.identity():(c=a-c,d=h-d,e=t-e,n=u*(e*=s=1/Math.sqrt(c*c+d*d+e*e))-i*(d*=s),i=i*(c*=s)-l*e,l=l*d-u*c,(s=Math.sqrt(n*n+i*i+l*l))?(n*=s=1/s,i*=s,l*=s):l=i=n=0,u=d*l-e*i,r=e*n-c*l,o=c*i-d*n,(s=Math.sqrt(u*u+r*r+o*o))?(u*=s=1/s,r*=s,o*=s):o=r=u=0,this.setValues(n,u,c,0,i,r,d,0,l,o,e,0,-(n*a+i*h+l*t),-(u*a+r*h+o*t),-(c*a+d*h+e*t),1))},yawPitchRoll:function(t,e,i){this.zero(),a.zero(),h.zero();var s=this.val,n=a.val,r=h.val,o=Math.sin(i),i=Math.cos(i);return s[10]=1,s[15]=1,s[0]=i,s[1]=o,s[4]=-o,s[5]=i,o=Math.sin(e),i=Math.cos(e),n[0]=1,n[15]=1,n[5]=i,n[10]=i,n[9]=-o,n[6]=o,o=Math.sin(t),i=Math.cos(t),r[5]=1,r[15]=1,r[0]=i,r[2]=-o,r[8]=o,r[10]=i,this.multiplyLocal(a),this.multiplyLocal(h),this},setWorldMatrix:function(t,e,i,s,n){return this.yawPitchRoll(t.y,t.x,t.z),a.scaling(i.x,i.y,i.z),h.xyz(e.x,e.y,e.z),this.multiplyLocal(a),this.multiplyLocal(h),s&&this.multiplyLocal(s),n&&this.multiplyLocal(n),this},multiplyToMat4:function(t,e){var i=this.val,t=t.val,s=i[0],n=i[1],r=i[2],o=i[3],a=i[4],h=i[5],l=i[6],u=i[7],c=i[8],d=i[9],p=i[10],f=i[11],g=i[12],m=i[13],v=i[14],i=i[15],y=t[0],x=t[1],T=t[2],b=t[3],w=t[4],S=t[5],C=t[6],E=t[7],_=t[8],A=t[9],P=t[10],M=t[11],R=t[12],L=t[13],O=t[14],t=t[15];return e.setValues(y*s+x*a+T*c+b*g,x*n+x*h+T*d+b*m,T*r+x*l+T*p+b*v,b*o+x*u+T*f+b*i,w*s+S*a+C*c+E*g,w*n+S*h+C*d+E*m,w*r+S*l+C*p+E*v,w*o+S*u+C*f+E*i,_*s+A*a+P*c+M*g,_*n+A*h+P*d+M*m,_*r+A*l+P*p+M*v,_*o+A*u+P*f+M*i,R*s+L*a+O*c+t*g,R*n+L*h+O*d+t*m,R*r+L*l+O*p+t*v,R*o+L*u+O*f+t*i)},fromRotationXYTranslation:function(t,e,i){var s=e.x,n=e.y,e=e.z,r=Math.sin(t.x),o=Math.cos(t.x),a=Math.sin(t.y),t=Math.cos(t.y),h=s,l=n,u=e,c=-r,d=0-c*a,p=0-o*a,c=c*t,f=o*t;return i||(h=t*s+a*e,l=d*s+o*n+c*e,u=p*s+r*n+f*e),this.setValues(t,d,p,0,0,o,r,0,a,c,f,0,h,l,u,1)},getMaxScaleOnAxis:function(){var t=this.val,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2];return Math.sqrt(Math.max(e,t[4]*t[4]+t[5]*t[5]+t[6]*t[6],t[8]*t[8]+t[9]*t[9]+t[10]*t[10]))}}),a=new n,h=new n,r=new i,o=new i,l=new i;t.exports=n},86883:t=>{t.exports=function(t,e,i){return Math.min(t+e,i)}},50040:t=>{t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort(function(t,e){return t-e});var i=Math.floor(e/2);return e%2==0?(t[i]+t[i-1])/2:t[i]}},37204:t=>{t.exports=function(t,e,i){return Math.max(t-e,i)}},65201:t=>{t.exports=function(t,e,i,s){e=(t-e)/((i=void 0===i?e+1:i)-e);return 1{var s=i(83419),n=i(94434),r=i(29747),i=i(25836),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new i(1,0,0),l=new i(0,1,0),u=new i,c=new n,i=new s({initialize:function(t,e,i,s){this.onChangeCallback=r,this.set(t,e,i,s)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,s,n){return void 0===n&&(n=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=s||0),n&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,n=t*t+e*e+i*i+s*s;return 0t[n=0]&&(n=1),t[8]>t[3*n+n]&&(n=2),e=o[n],i=o[e],s=Math.sqrt(t[3*n+n]-t[3*e+e]-t[3*i+i]+1),a[n]=.5*s,a[e]=(t[3*e+n]+t[3*n+e])*(s=.5/s),a[i]=(t[3*i+n]+t[3*n+i])*s,this._x=a[0],this._y=a[1],this._z=a[2],this._w=(t[3*i+e]-t[3*e+i])*s),this.onChangeCallback(this),this}});t.exports=i},43396:(t,e,i)=>{var s=i(36383);t.exports=function(t){return t*s.RAD_TO_DEG}},74362:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},60706:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,s=2*Math.random()-1,n=Math.sqrt(1-s*s)*e;return t.x=Math.cos(i)*n,t.y=Math.sin(i)*n,t.z=s*e,t}},67421:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},36305:t=>{t.exports=function(t,e){var i=t.x,s=t.y;return t.x=i*Math.cos(e)-s*Math.sin(e),t.y=i*Math.sin(e)+s*Math.cos(e),t}},11520:t=>{t.exports=function(t,e,i,s){var n=Math.cos(s),s=Math.sin(s),r=t.x-e,o=t.y-i;return t.x=r*n-o*s+e,t.y=r*s+o*n+i,t}},1163:t=>{t.exports=function(t,e,i,s,n){s+=Math.atan2(t.y-i,t.x-e);return t.x=e+n*Math.cos(s),t.y=i+n*Math.sin(s),t}},70336:t=>{t.exports=function(t,e,i,s,n){return t.x=e+n*Math.cos(s),t.y=i+n*Math.sin(s),t}},72678:(t,e,i)=>{var s=i(25836),n=i(37867),i=i(15746),r=new n,o=new i,a=new s;t.exports=function(t,e,i){return o.setAxisAngle(e,i),r.fromRotationTranslation(o,a.set(0,0,0)),t.transformMat4(r)}},2284:t=>{t.exports=function(t){return 0{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);i=Math.pow(i,-e);return Math.round(t*i)/i}},16922:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=1),s*=Math.PI/t;for(var n=[],r=[],o=0;o{t.exports=function(t,e,i){return t<=e?0:i<=t?1:(t=(t-e)/(i-e))*t*(3-2*t)}},54261:t=>{t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},44408:(t,e,i)=>{var o=i(26099);t.exports=function(t,e,i,s){void 0===s&&(s=new o);var n=0,r=0;return 0{var u=i(26099);t.exports=function(t,e,i,s,n,r,o,a){void 0===a&&(a=new u);var h=Math.sin(n),n=Math.cos(n),l=n*r,r=h*r,h=-h*o,n=n*o,o=1/(l*n+h*-r);return a.x=n*o*t+-h*o*e+(s*h-i*n)*o,a.y=l*o*e+-r*o*t+(-s*l+i*r)*o,a}},26099:(t,e,i)=>{var s=i(83419),n=i(43855),r=new s({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new r(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return n(this.x,t.x,e)&&n(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,t=t.y-this.y;return Math.sqrt(e*e+t*t)},distanceSq:function(t){var e=t.x-this.x,t=t.y-this.y;return e*e+t*t},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return 0{var s=new(i(83419))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new s(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this},crossVectors:function(t,e){var i=t.x,s=t.y,t=t.z,n=e.x,r=e.y,e=e.z;return this.x=s*e-t*r,this.y=t*n-i*e,this.z=i*r-s*n,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return this.x=t[e=void 0===e?0:e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,t=t.z-this.z||0;return Math.sqrt(e*e+i*i+t*t)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,t=t.z-this.z||0;return e*e+i*i+t*t},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,s=t*t+e*e+i*i;return 0{var s=new(i(83419))({initialize:function(t,e,i,s){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0)},clone:function(){return new s(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,s){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,n=t*t+e*e+i*i+s*s;return 0{t.exports=function(t,e,i){return Math.abs(t-e)<=i}},15994:t=>{t.exports=function(t,e,i){i-=e;return e+((t-e)%i+i)%i}},31040:t=>{t.exports=function(t,e,i,s){return Math.atan2(s-e,i-t)}},55495:t=>{t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},128:t=>{t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},41273:t=>{t.exports=function(t,e,i,s){return Math.atan2(i-t,s-e)}},1432:(t,e,i)=>{var s=i(36383);t.exports=function(t){return t>Math.PI&&(t-=s.PI2),Math.abs(((t+s.TAU)%s.PI2-s.PI2)%s.PI2)}},12407:t=>{t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},53993:(t,e,i)=>{var s=i(99472);t.exports=function(){return s(-Math.PI,Math.PI)}},86564:(t,e,i)=>{var s=i(99472);t.exports=function(){return s(-180,180)}},90154:(t,e,i)=>{var s=i(12407);t.exports=function(t){return s(t+Math.PI)}},48736:(t,e,i)=>{var s=i(36383);t.exports=function(t,e,i){return void 0===i&&(i=.05),t!==e&&(Math.abs(e-t)<=i||Math.abs(e-t)>=s.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e{t.exports=function(t,e){e-=t;return 0==e?0:e-360*Math.floor((e+180)/360)}},86554:(t,e,i)=>{var s=i(15994);t.exports=function(t){return s(t,-Math.PI,Math.PI)}},30954:(t,e,i)=>{var s=i(15994);t.exports=function(t){return s(t,-180,180)}},25588:(t,e,i)=>{t.exports={Between:i(31040),BetweenPoints:i(55495),BetweenPointsY:i(128),BetweenY:i(41273),CounterClockwise:i(1432),Normalize:i(12407),Random:i(53993),RandomDegrees:i(86564),Reverse:i(90154),RotateTo:i(48736),ShortestBetween:i(61430),Wrap:i(86554),WrapDegrees:i(30954)}},36383:t=>{var e={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=e},20339:t=>{t.exports=function(t,e,i,s){t-=i,i=e-s;return Math.sqrt(t*t+i*i)}},52816:t=>{t.exports=function(t,e){var i=t.x-e.x,t=t.y-e.y;return Math.sqrt(i*i+t*t)}},64559:t=>{t.exports=function(t,e){var i=t.x-e.x,t=t.y-e.y;return i*i+t*t}},82340:t=>{t.exports=function(t,e,i,s){return Math.max(Math.abs(t-i),Math.abs(e-s))}},14390:t=>{t.exports=function(t,e,i,s,n){return void 0===n&&(n=2),Math.sqrt(Math.pow(i-t,n)+Math.pow(s-e,n))}},2243:t=>{t.exports=function(t,e,i,s){return Math.abs(t-i)+Math.abs(e-s)}},89774:t=>{t.exports=function(t,e,i,s){t-=i,i=e-s;return t*t+i*i}},50994:(t,e,i)=>{t.exports={Between:i(20339),BetweenPoints:i(52816),BetweenPointsSquared:i(64559),Chebyshev:i(82340),Power:i(14390),Snake:i(2243),Squared:i(89774)}},62640:(t,e,i)=>{var s=i(54178),n=i(41521),r=i(79980),o=i(85433),a=i(99140),h=i(48857),l=i(81596),u=i(59133),c=i(98516),d=i(35248),p=i(82500),i=i(49752);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:p.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:s.Out,Bounce:n.Out,Stepped:i,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":p.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":s.In,"Bounce.easeIn":n.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":p.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":s.Out,"Bounce.easeOut":n.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":p.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":s.InOut,"Bounce.easeInOut":n.InOut}},1639:t=>{t.exports=function(t,e){return t*t*(((e=void 0===e?1.70158:e)+1)*t-e)}},50099:t=>{t.exports=function(t,e){e=1.525*(e=void 0===e?1.70158:e);return(t*=2)<1?t*t*((1+e)*t-e)*.5:.5*((t-=2)*t*((1+e)*t+e)+2)}},41286:t=>{t.exports=function(t,e){return--t*t*(((e=void 0===e?1.70158:e)+1)*t+e)+1}},54178:(t,e,i)=>{t.exports={In:i(1639),Out:i(41286),InOut:i(50099)}},59590:t=>{t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},41788:t=>{t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},69905:t=>{t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},41521:(t,e,i)=>{t.exports={In:i(59590),Out:i(69905),InOut:i(41788)}},91861:t=>{t.exports=function(t){return 1-Math.sqrt(1-t*t)}},4177:t=>{t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},57512:t=>{t.exports=function(t){return Math.sqrt(1- --t*t)}},79980:(t,e,i)=>{t.exports={In:i(91861),Out:i(57512),InOut:i(4177)}},51150:t=>{t.exports=function(t){return t*t*t}},82820:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},35033:t=>{t.exports=function(t){return--t*t*t+1}},85433:(t,e,i)=>{t.exports={In:i(51150),Out:i(35033),InOut:i(82820)}},69965:t=>{t.exports=function(t,e,i){var s;return void 0===e&&(e=.1),void 0===i&&(i=.1),0===t?0:1===t?1:(s=i/4,e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*--t)*Math.sin(2*Math.PI*(t-s)/i))}},50665:t=>{t.exports=function(t,e,i){var s;return void 0===e&&(e=.1),void 0===i&&(i=.1),0===t?0:1===t?1:(s=i/4,e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*--t)*Math.sin(2*Math.PI*(t-s)/i)*-.5:e*Math.pow(2,-10*--t)*Math.sin(2*Math.PI*(t-s)/i)*.5+1)}},7744:t=>{t.exports=function(t,e,i){var s;return void 0===e&&(e=.1),void 0===i&&(i=.1),0===t?0:1===t?1:(s=i/4,e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin(2*Math.PI*(t-s)/i)+1)}},99140:(t,e,i)=>{t.exports={In:i(69965),Out:i(7744),InOut:i(50665)}},24590:t=>{t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},87844:t=>{t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},89433:t=>{t.exports=function(t){return 1-Math.pow(2,-10*t)}},48857:(t,e,i)=>{t.exports={In:i(24590),Out:i(89433),InOut:i(87844)}},48820:(t,e,i)=>{t.exports={Back:i(54178),Bounce:i(41521),Circular:i(79980),Cubic:i(85433),Elastic:i(99140),Expo:i(48857),Linear:i(81596),Quadratic:i(59133),Quartic:i(98516),Quintic:i(35248),Sine:i(82500),Stepped:i(49752)}},7147:t=>{t.exports=function(t){return t}},81596:(t,e,i)=>{t.exports=i(7147)},34826:t=>{t.exports=function(t){return t*t}},20544:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},92029:t=>{t.exports=function(t){return t*(2-t)}},59133:(t,e,i)=>{t.exports={In:i(34826),Out:i(92029),InOut:i(20544)}},64413:t=>{t.exports=function(t){return t*t*t*t}},78137:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},45840:t=>{t.exports=function(t){return 1- --t*t*t*t}},98516:(t,e,i)=>{t.exports={In:i(64413),Out:i(45840),InOut:i(78137)}},87745:t=>{t.exports=function(t){return t*t*t*t*t}},16509:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},17868:t=>{t.exports=function(t){return--t*t*t*t*t+1}},35248:(t,e,i)=>{t.exports={In:i(87745),Out:i(17868),InOut:i(16509)}},80461:t=>{t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},34025:t=>{t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},52768:t=>{t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},82500:(t,e,i)=>{t.exports={In:i(80461),Out:i(52768),InOut:i(34025)}},72251:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:1<=t?1:1/e*(1+(e*t|0))}},49752:(t,e,i)=>{t.exports=i(72251)},75698:t=>{t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},43855:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},5470:t=>{t.exports=function(t,e,i){return e-(i=void 0===i?1e-4:i){t.exports=function(t,e,i){return t{t.exports={Ceil:i(75698),Equal:i(43855),Floor:i(25777),GreaterThan:i(5470),LessThan:i(94977)}},75508:(t,e,i)=>{var s=i(36383),i=i(79291)(!1,{Angle:i(25588),Distance:i(50994),Easing:i(48820),Fuzzy:i(48379),Interpolation:i(38289),Pow2:i(49001),Snap:i(73697),RandomDataGenerator:i(28453),Average:i(53307),Bernstein:i(85710),Between:i(30976),CatmullRom:i(87842),CeilTo:i(26302),Clamp:i(45319),DegToRad:i(39506),Difference:i(61241),Euler:i(38857),Factorial:i(6411),FloatBetween:i(99472),FloorTo:i(77623),FromPercent:i(62945),GetSpeed:i(38265),IsEven:i(78702),IsEvenStrict:i(94883),Linear:i(28915),LinearXY:i(94908),MaxAdd:i(86883),Median:i(50040),MinSub:i(37204),Percent:i(65201),RadToDeg:i(43396),RandomXY:i(74362),RandomXYZ:i(60706),RandomXYZW:i(67421),Rotate:i(36305),RotateAround:i(11520),RotateAroundDistance:i(1163),RotateTo:i(70336),RoundAwayFromZero:i(2284),RoundTo:i(41013),SinCosTableGenerator:i(16922),SmootherStep:i(54261),SmoothStep:i(7602),ToXY:i(44408),TransformXY:i(85955),Within:i(60417),Wrap:i(15994),Vector2:i(26099),Vector3:i(25836),Vector4:i(61369),Matrix3:i(94434),Matrix4:i(37867),Quaternion:i(15746),RotateVec3:i(72678)},s);t.exports=i},89318:(t,e,i)=>{var r=i(85710);t.exports=function(t,e){for(var i=0,s=t.length-1,n=0;n<=s;n++)i+=Math.pow(1-e,s-n)*Math.pow(e,n)*t[n]*r(s,n);return i}},77259:(t,e,i)=>{var r=i(87842);t.exports=function(t,e){var i=t.length-1,s=i*e,n=Math.floor(s);return t[0]===t[i]?(e<0&&(n=Math.floor(s=i*(1+e))),r(s-n,t[(n-1+i)%i],t[n],t[(n+1)%i],t[(n+2)%i])):e<0?t[0]-(r(-s,t[0],t[0],t[1],t[1])-t[0]):1{t.exports=function(t,e,i,s,n){return(r=1-t)*r*r*e+3*(r=1-t)*r*t*i+3*(1-t)*t*t*s+t*t*t*n;var r}},28392:(t,e,i)=>{var r=i(28915);t.exports=function(t,e){var i=t.length-1,s=i*e,n=Math.floor(s);return e<0?r(t[0],t[1],s):1{t.exports=function(t,e,i,s){return(n=1-t)*n*e+2*(1-t)*t*i+t*t*s;var n}},47235:(t,e,i)=>{var s=i(7602);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},50178:(t,e,i)=>{var s=i(54261);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},38289:(t,e,i)=>{t.exports={Bezier:i(89318),CatmullRom:i(77259),CubicBezier:i(36316),Linear:i(28392),QuadraticBezier:i(32112),SmoothStep:i(47235),SmootherStep:i(50178)}},98439:t=>{t.exports=function(t){t=Math.log(t)/.6931471805599453;return 1<{t.exports=function(t,e){return 0{t.exports=function(t){return 0{t.exports={GetNext:i(98439),IsSize:i(50030),IsValue:i(81230)}},28453:(t,e,i)=>{i=new(i(83419))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var s=0;s>>0))*i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*((this.n=i)>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),s?(i+t)/e:i+t)}},56583:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),s?(i+t)/e:i+t)}},77720:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),s?(i+t)/e:i+t)}},73697:(t,e,i)=>{t.exports={Ceil:i(63448),Floor:i(56583),To:i(77720)}},85454:(t,e,i)=>{i(63595);var s=i(8054),n=i(79291),r={Actions:i(61061),Animations:i(60421),BlendModes:i(10312),Cache:i(83388),Cameras:i(26638),Core:i(42857),Class:i(83419),Create:i(15822),Curves:i(25410),Data:i(44965),Display:i(27460),DOM:i(84902),Events:i(93055),FX:i(66064),Game:i(50127),GameObjects:i(77856),Geom:i(55738),Input:i(14350),Loader:i(57777),Math:i(75508),Physics:i(44563),Plugins:i(18922),Renderer:i(36909),Scale:i(93364),ScaleModes:i(29795),Scene:i(97482),Scenes:i(62194),Structs:i(41392),Textures:i(27458),Tilemaps:i(62501),Time:i(90291),Tweens:i(43066),Utils:i(91799)};r.Sound=i(23717),r=n(!1,r,s),t.exports=r,i.g.Phaser=r},71289:(t,e,i)=>{var s=i(83419),n=i(92209),r=i(88571),i=new s({Extends:r,Mixins:[n.Acceleration,n.Angular,n.Bounce,n.Collision,n.Debug,n.Drag,n.Enable,n.Friction,n.Gravity,n.Immovable,n.Mass,n.Pushable,n.Size,n.Velocity],initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.body=null}});t.exports=i},86689:(t,e,i)=>{var s=i(83419),n=i(39506),o=i(20339),u=i(89774),r=i(66022),a=i(95540),h=i(46975),l=i(72441),c=i(47956),d=i(37277),p=i(44594),f=i(26099),g=i(82248),i=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,this._category=1,t.sys.events.once(p.BOOT,this.boot,this),t.sys.events.on(p.START,this.start,this)},boot:function(){this.world=new g(this.scene,this.config),this.add=new r(this.world),this.systems.events.once(p.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new g(this.scene,this.config),this.add=new r(this.world));var t=this.systems.events;a(this.config,"customUpdate",!1)||t.on(p.UPDATE,this.world.update,this.world),t.on(p.POST_UPDATE,this.world.postUpdate,this.world),t.once(p.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(p.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(p.UPDATE,this.world.update,this.world)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return h(a(e,"arcade",{}),a(t,"arcade",{}))},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===n&&(n=i),this.world.collideObjects(t,e,i,s=void 0===s?null:s,n,!0)},collide:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===n&&(n=i),this.world.collideObjects(t,e,i,s=void 0===s?null:s,n,!1)},collideTiles:function(t,e,i,s,n){return this.world.collideTiles(t,e,i,s,n)},overlapTiles:function(t,e,i,s,n){return this.world.overlapTiles(t,e,i,s,n)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(t,e,i,s,n,r){void 0===s&&(s=60);i=Math.atan2(i-t.y,e-t.x);return t.body.acceleration.setToPolar(i,s),void 0!==n&&void 0!==r&&t.body.maxVelocity.set(n,r),i},accelerateToObject:function(t,e,i,s,n){return this.accelerateTo(t,e.x,e.y,i,s,n)},closest:function(t,e){e=e||this.world.bodies.entries;for(var i=Number.MAX_VALUE,s=null,n=t.x,r=t.y,o=e.length,a=0;a{var s=i(83419),n=i(92209),r=i(68287),i=new s({Extends:r,Mixins:[n.Acceleration,n.Angular,n.Bounce,n.Collision,n.Debug,n.Drag,n.Enable,n.Friction,n.Gravity,n.Immovable,n.Mass,n.Pushable,n.Size,n.Velocity],initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.body=null}});t.exports=i},37742:(t,e,i)=>{var s=i(83419),n=i(78389),r=i(37747),o=i(63012),a=i(43396),h=i(87841),l=i(37303),u=i(95829),c=i(26099),i=new s({Mixins:[n],initialize:function(t,e){var i=64,s=64,n=void 0!==e;n&&e.displayWidth&&(i=e.displayWidth,s=e.displayHeight),n||(e={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=t,this.gameObject=n?e:void 0,this.isBody=!0,this.transform={x:e.x,y:e.y,rotation:e.angle,scaleX:e.scaleX,scaleY:e.scaleY,displayOriginX:e.displayOriginX,displayOriginY:e.displayOriginY},this.debugShowBody=t.defaults.debugShowBody,this.debugShowVelocity=t.defaults.debugShowVelocity,this.debugBodyColor=t.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new c,this.position=new c(e.x-e.scaleX*e.displayOriginX,e.y-e.scaleY*e.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=e.angle,this.preRotation=e.angle,this.width=i,this.height=s,this.sourceWidth=i,this.sourceHeight=s,e.frame&&(this.sourceWidth=e.frame.realWidth,this.sourceHeight=e.frame.realHeight),this.halfWidth=Math.abs(i/2),this.halfHeight=Math.abs(s/2),this.center=new c(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new c,this.newVelocity=new c,this.deltaMax=new c,this.acceleration=new c,this.allowDrag=!0,this.drag=new c,this.allowGravity=!0,this.gravity=new c,this.bounce=new c,this.worldBounce=null,this.customBoundsRectangle=t.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new c(1e4,1e4),this.maxSpeed=-1,this.friction=new c(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=r.FACING_NONE,this.immovable=!1,this.pushable=!0,this.slideFactor=new c(1,1),this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=u(!1),this.touching=u(!0),this.wasTouching=u(!0),this.blocked=u(!0),this.syncBounds=!1,this.physicsType=r.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._sx=e.scaleX,this._sy=e.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new h,this.directControl=!1,this.autoFrame=this.position.clone()},updateBounds:function(){var t=this.gameObject,e=this.transform,i=(t.parentContainer?(i=t.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2),e.x=i.tx,e.y=i.ty,e.rotation=a(i.rotation),e.scaleX=i.scaleX,e.scaleY=i.scaleY):(e.x=t.x,e.y=t.y,e.rotation=t.angle,e.scaleX=t.scaleX,e.scaleY=t.scaleY),e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY,!1);this.syncBounds?(t=t.getBounds(this._bounds),this.width=t.width,this.height=t.height,i=!0):(t=Math.abs(e.scaleX),e=Math.abs(e.scaleY),this._sx===t&&this._sy===e||(this.width=this.sourceWidth*t,this.height=this.sourceHeight*e,this._sx=t,this._sy=e,i=!0)),i&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var t=this.transform;this.position.x=t.x+t.scaleX*(this.offset.x-t.displayOriginX),this.position.y=t.y+t.scaleY*(this.offset.y-t.displayOriginY),this.updateCenter()},resetFlags:function(t){var e=this.wasTouching,i=this.touching,s=this.blocked;(t=void 0===t?!1:t)?u(!0,e):(e.none=i.none,e.up=i.up,e.down=i.down,e.left=i.left,e.right=i.right),u(!0,i),u(!0,s),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(t,e){var i;t&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves&&(i=this.position,this.prev.x=i.x,this.prev.y=i.y,this.prevFrame.x=i.x,this.prevFrame.y=i.y),t&&this.update(e)},update:function(t){var e,i=this.prev,s=this.position,n=this.velocity;i.set(s.x,s.y),this.moves?(this.directControl?(e=this.autoFrame,n.set((s.x-e.x)/t,(s.y-e.y)/t),this.world.updateMotion(this,t),this._dx=s.x-e.x,this._dy=s.y-e.y):(this.world.updateMotion(this,t),this.newVelocity.set(n.x*t,n.y*t),s.add(this.newVelocity),this._dx=s.x-i.x,this._dy=s.y-i.y),e=n.x,t=n.y,this.updateCenter(),this.angle=Math.atan2(t,e),this.speed=Math.sqrt(e*e+t*t),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds&&(n=this.blocked,this.world.emit(o.WORLD_BOUNDS,this,n.up,n.down,n.left,n.right))):(this._dx=s.x-i.x,this._dy=s.y-i.y)},postUpdate:function(){var t,e=this.position,i=e.x-this.prevFrame.x,s=e.y-this.prevFrame.y,n=this.gameObject;this.moves&&(0!==(t=this.deltaMax.x)&&0!==i&&(i<0&&i<-t?i=-t:0s.right&&n.right&&(t.x=s.right-this.width,e.x*=r,a=i.right=!0),t.ys.bottom&&n.down&&(t.y=s.bottom-this.height,e.y*=o,a=i.down=!0),a&&(this.blocked.none=!1,this.updateCenter()),a},setOffset:function(t,e){return this.offset.set(t,e=void 0===e?t:e),this},setGameObject:function(t,e){return void 0===e&&(e=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),(this.gameObject=t).body&&(t.body=this),this.setSize(),this.world.add(this),this.enable=e,this},setSize:function(t,e,i){void 0===i&&(i=!0);var s=this.gameObject;return s&&(!t&&s.frame&&(t=s.frame.realWidth),!e)&&s.frame&&(e=s.frame.realHeight),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&s&&s.getCenter&&(i=(s.width-t)/2,t=(s.height-e)/2,this.offset.set(i,t)),this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),0=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:l(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return 0{i=new(i(83419))({initialize:function(t,e,i,s,n,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=s,this.collideCallback=n,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=i},66022:(t,e,i)=>{var n=i(71289),r=i(13759),o=i(37742),s=i(83419),a=i(37747),h=i(60758),l=i(72624),u=i(71464),i=new s({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,s,n){return this.world.addCollider(t,e,i,s,n)},overlap:function(t,e,i,s,n){return this.world.addOverlap(t,e,i,s,n)},existing:function(t,e){e=e?a.STATIC_BODY:a.DYNAMIC_BODY;return this.world.enableBody(t,e),t},staticImage:function(t,e,i,s){t=new n(this.scene,t,e,i,s);return this.sys.displayList.add(t),this.world.enableBody(t,a.STATIC_BODY),t},image:function(t,e,i,s){t=new n(this.scene,t,e,i,s);return this.sys.displayList.add(t),this.world.enableBody(t,a.DYNAMIC_BODY),t},staticSprite:function(t,e,i,s){t=new r(this.scene,t,e,i,s);return this.sys.displayList.add(t),this.sys.updateList.add(t),this.world.enableBody(t,a.STATIC_BODY),t},sprite:function(t,e,i,s){t=new r(this.scene,t,e,i,s);return this.sys.displayList.add(t),this.sys.updateList.add(t),this.world.enableBody(t,a.DYNAMIC_BODY),t},staticGroup:function(t,e){return this.sys.updateList.add(new u(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},body:function(t,e,i,s){var n=new o(this.world);return n.position.set(t,e),i&&s&&n.setSize(i,s),this.world.add(n,a.DYNAMIC_BODY),n},staticBody:function(t,e,i,s){var n=new l(this.world);return n.position.set(t,e),i&&s&&n.setSize(i,s),this.world.add(n,a.STATIC_BODY),n},destroy:function(){this.world=null,this.scene=null,this.sys=null}});t.exports=i},79599:t=>{t.exports=function(t){var e=0;if(Array.isArray(t))for(var i=0;i{var r=i(37747);t.exports=function(t,e,i,s){var n=0,s=t.deltaAbsX()+e.deltaAbsX()+s;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?(n=t.right-e.x)>s&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?n=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType!==r.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.right=!0),t.physicsType!==r.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.left=!0)):t._dxs&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?n=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType!==r.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.left=!0),t.physicsType!==r.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=n,e.overlapX=n}},45170:(t,e,i)=>{var r=i(37747);t.exports=function(t,e,i,s){var n=0,s=t.deltaAbsY()+e.deltaAbsY()+s;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(n=t.bottom-e.y)>s&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?n=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType!==r.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.down=!0),t.physicsType!==r.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.up=!0)):t._dys&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?n=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType!==r.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.up=!0),t.physicsType!==r.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=n,e.overlapY=n}},60758:(t,e,i)=>{var r=i(13759),s=i(83419),n=i(78389),o=i(37747),a=i(95540),h=i(26479),l=i(41212),i=new s({Extends:h,Mixins:[n],initialize:function(t,e,i,s){var n;i||s?l(i)?(s=i,i=null,s.internalCreateCallback=this.createCallbackHandler,s.internalRemoveCallback=this.removeCallbackHandler):s=Array.isArray(i)&&l(i[0])?(n=this,i.forEach(function(t){t.internalCreateCallback=n.createCallbackHandler,t.internalRemoveCallback=n.removeCallbackHandler,t.classType=a(t,"classType",r)}),null):{internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler}:s={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler},this.world=t,s&&(s.classType=a(s,"classType",r)),this.physicsType=o.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=2147483647,this.defaults={setCollideWorldBounds:a(s,"collideWorldBounds",!1),setBoundsRectangle:a(s,"customBoundsRectangle",null),setAccelerationX:a(s,"accelerationX",0),setAccelerationY:a(s,"accelerationY",0),setAllowDrag:a(s,"allowDrag",!0),setAllowGravity:a(s,"allowGravity",!0),setAllowRotation:a(s,"allowRotation",!0),setDamping:a(s,"useDamping",!1),setBounceX:a(s,"bounceX",0),setBounceY:a(s,"bounceY",0),setDragX:a(s,"dragX",0),setDragY:a(s,"dragY",0),setEnable:a(s,"enable",!0),setGravityX:a(s,"gravityX",0),setGravityY:a(s,"gravityY",0),setFrictionX:a(s,"frictionX",0),setFrictionY:a(s,"frictionY",0),setMaxSpeed:a(s,"maxSpeed",-1),setMaxVelocityX:a(s,"maxVelocityX",1e4),setMaxVelocityY:a(s,"maxVelocityY",1e4),setVelocityX:a(s,"velocityX",0),setVelocityY:a(s,"velocityY",0),setAngularVelocity:a(s,"angularVelocity",0),setAngularAcceleration:a(s,"angularAcceleration",0),setAngularDrag:a(s,"angularDrag",0),setMass:a(s,"mass",1),setImmovable:a(s,"immovable",!1)},h.call(this,e,i,s),this.type="PhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,o.DYNAMIC_BODY);var e,i=t.body;for(e in this.defaults)i[e](this.defaults[e])},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var s=this.getChildren(),n=0;n{function s(){return f&&x&&o.blocked.right?(r.processX(-b,c,!1,!0),1):p&&T&&o.blocked.left?(r.processX(b,c,!0),1):v&&T&&r.blocked.right?(o.processX(-b,d,!1,!0),2):m&&x&&r.blocked.left?(o.processX(b,d,!0),2):0}function n(t){var e;return a&&h?(b*=.5,0===t||3===t?(r.processX(b,l),o.processX(-b,u)):(r.processX(-b,l),o.processX(b,u))):a&&!h?0===t||3===t?r.processX(b,c,!0):r.processX(-b,c,!1,!0):!a&&h?0===t||3===t?o.processX(-b,d,!1,!0):o.processX(b,d,!0):(e=.5*b,0===t?y?(r.processX(b,0,!0),o.processX(0,null,!1,!0)):v?(r.processX(e,0,!0),o.processX(-e,0,!1,!0)):(r.processX(e,o.velocity.x,!0),o.processX(-e,null,!1,!0)):1===t?g?(r.processX(0,null,!1,!0),o.processX(b,0,!0)):f?(r.processX(-e,0,!1,!0),o.processX(e,0,!0)):(r.processX(-e,null,!1,!0),o.processX(e,r.velocity.x,!0)):2===t?y?(r.processX(-b,0,!1,!0),o.processX(0,null,!0)):m?(r.processX(-e,0,!1,!0),o.processX(e,0,!0)):(r.processX(-e,o.velocity.x,!1,!0),o.processX(e,null,!0)):3===t&&(g?(r.processX(0,null,!0),o.processX(-b,0,!1,!0)):p?(r.processX(e,0,!0),o.processX(-e,0,!1,!0)):(r.processX(e,o.velocity.y,!0),o.processX(-e,null,!1,!0)))),!0}var r,o,a,h,l,u,c,d,p,f,g,m,v,y,x,T,b;t.exports={BlockCheck:s,Check:function(){var t=r.velocity.x,e=o.velocity.x,e=Math.sqrt(e*e*o.mass/r.mass)*(0{function s(){return f&&x&&o.blocked.down?(r.processY(-b,c,!1,!0),1):p&&T&&o.blocked.up?(r.processY(b,c,!0),1):v&&T&&r.blocked.down?(o.processY(-b,d,!1,!0),2):m&&x&&r.blocked.up?(o.processY(b,d,!0),2):0}function n(t){var e;return a&&h?(b*=.5,0===t||3===t?(r.processY(b,l),o.processY(-b,u)):(r.processY(-b,l),o.processY(b,u))):a&&!h?0===t||3===t?r.processY(b,c,!0):r.processY(-b,c,!1,!0):!a&&h?0===t||3===t?o.processY(-b,d,!1,!0):o.processY(b,d,!0):(e=.5*b,0===t?y?(r.processY(b,0,!0),o.processY(0,null,!1,!0)):v?(r.processY(e,0,!0),o.processY(-e,0,!1,!0)):(r.processY(e,o.velocity.y,!0),o.processY(-e,null,!1,!0)):1===t?g?(r.processY(0,null,!1,!0),o.processY(b,0,!0)):f?(r.processY(-e,0,!1,!0),o.processY(e,0,!0)):(r.processY(-e,null,!1,!0),o.processY(e,r.velocity.y,!0)):2===t?y?(r.processY(-b,0,!1,!0),o.processY(0,null,!0)):m?(r.processY(-e,0,!1,!0),o.processY(e,0,!0)):(r.processY(-e,o.velocity.y,!1,!0),o.processY(e,null,!0)):3===t&&(g?(r.processY(0,null,!0),o.processY(-b,0,!1,!0)):p?(r.processY(e,0,!0),o.processY(-e,0,!1,!0)):(r.processY(e,o.velocity.y,!0),o.processY(-e,null,!1,!0)))),!0}var r,o,a,h,l,u,c,d,p,f,g,m,v,y,x,T,b;t.exports={BlockCheck:s,Check:function(){var t=r.velocity.y,e=o.velocity.y,e=Math.sqrt(e*e*o.mass/r.mass)*(0{var o=i(64897),a=i(3017);t.exports=function(t,e,i,s,n){void 0===n&&(n=o(t,e,i,s));var s=t.immovable,r=e.immovable;return i||0===n||s&&r||t.customSeparateX||e.customSeparateX?0!==n||t.embedded&&e.embedded:(i=a.Set(t,e,n),s||r?(s?a.RunImmovableBody1(i):r&&a.RunImmovableBody2(i),!0):0{var o=i(45170),a=i(47962);t.exports=function(t,e,i,s,n){void 0===n&&(n=o(t,e,i,s));var s=t.immovable,r=e.immovable;return i||0===n||s&&r||t.customSeparateY||e.customSeparateY?0!==n||t.embedded&&e.embedded:(i=a.Set(t,e,n),s||r?(s?a.RunImmovableBody1(i):r&&a.RunImmovableBody2(i),!0):0{t.exports=function(t,e){return(e=void 0===e?{}:e).none=t,e.up=!1,e.down=!1,e.left=!1,e.right=!1,t||(e.up=!0,e.down=!0,e.left=!0,e.right=!0),e}},72624:(t,e,i)=>{var s=i(87902),n=i(83419),r=i(78389),o=i(37747),a=i(37303),h=i(95829),l=i(26099),i=new n({Mixins:[r],initialize:function(t,e){var i=64,s=64,n=void 0!==e;n&&e.displayWidth&&(i=e.displayWidth,s=e.displayHeight),n||(e={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=t,this.gameObject=n?e:void 0,this.isBody=!0,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new l,this.position=new l(e.x-i*e.originX,e.y-s*e.originY),this.width=i,this.height=s,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new l(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=l.ZERO,this.allowGravity=!1,this.gravity=l.ZERO,this.bounce=l.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=h(!1),this.touching=h(!0),this.wasTouching=h(!0),this.blocked=h(!0),this.physicsType=o.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,(t.body=this).gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var s=this.gameObject;return s&&s.frame&&(t=t||s.frame.realWidth,e=e||s.frame.realHeight),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&s&&s.getCenter&&(t=s.displayWidth/2,e=s.displayHeight/2,this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t-this.halfWidth,e-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y),this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),0{var n=i(13759),s=i(83419),r=i(78389),o=i(37747),a=i(95540),h=i(26479),l=i(41212),i=new s({Extends:h,Mixins:[r],initialize:function(t,e,i,s){i||s?l(i)?(s=i,i=null,s.internalCreateCallback=this.createCallbackHandler,s.internalRemoveCallback=this.removeCallbackHandler,s.createMultipleCallback=this.createMultipleCallbackHandler,s.classType=a(s,"classType",n)):Array.isArray(i)&&l(i[0])?(s=i,i=null,s.forEach(function(t){t.internalCreateCallback=this.createCallbackHandler,t.internalRemoveCallback=this.removeCallbackHandler,t.createMultipleCallback=this.createMultipleCallbackHandler,t.classType=a(t,"classType",n)})):s={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler}:s={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:n},this.world=t,this.physicsType=o.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,h.call(this,e,i,s),this.type="StaticPhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,o.STATIC_BODY)},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var t=this.children.entries,e=0;e{var x=i(55495),s=i(37742),f=i(45319),n=i(83419),r=i(79342),g=i(37747),T=i(20339),b=i(52816),o=i(50792),m=i(63012),v=i(43855),y=i(5470),w=i(94977),S=i(64897),C=i(45170),u=i(96523),a=i(35154),E=i(36383),h=i(25774),_=i(96602),l=i(87841),c=i(59542),A=i(40012),d=i(14087),p=i(89936),P=i(35072),M=i(72624),R=i(2483),L=i(61340),O=i(26099),D=i(15994),i=new n({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.bodies=new P,this.staticBodies=new P,this.pendingDestroy=new P,this.colliders=new h,this.gravity=new O(a(e,"gravity.x",0),a(e,"gravity.y",0)),this.bounds=new l(a(e,"x",0),a(e,"y",0),a(e,"width",t.sys.scale.width),a(e,"height",t.sys.scale.height)),this.checkCollision={up:a(e,"checkCollision.up",!0),down:a(e,"checkCollision.down",!0),left:a(e,"checkCollision.left",!0),right:a(e,"checkCollision.right",!0)},this.fps=a(e,"fps",60),this.fixedStep=a(e,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=a(e,"timeScale",1),this.OVERLAP_BIAS=a(e,"overlapBias",4),this.TILE_BIAS=a(e,"tileBias",16),this.forceX=a(e,"forceX",!1),this.isPaused=a(e,"isPaused",!1),this._total=0,this.drawDebug=a(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:a(e,"debugShowBody",!0),debugShowStaticBody:a(e,"debugShowStaticBody",!0),debugShowVelocity:a(e,"debugShowVelocity",!0),bodyDebugColor:a(e,"debugBodyColor",16711935),staticBodyDebugColor:a(e,"debugStaticBodyColor",255),velocityDebugColor:a(e,"debugVelocityColor",65280)},this.maxEntries=a(e,"maxEntries",16),this.useTree=a(e,"useTree",!0),this.tree=new c(this.maxEntries),this.staticTree=new c(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new L,this._tempMatrix2=new L,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(t,e){void 0===e&&(e=g.DYNAMIC_BODY),Array.isArray(t)||(t=[t]);for(var i=0;i=n;for(this.fixedStep||(s=.001*e,o=!0,this._elapsed=0),h=0;h=n;)this._elapsed-=n,this.step(s)}},step:function(t){for(var e,i=this.bodies.entries,s=i.length,n=0;nc&&(t.velocity.normalize().scale(c),u=c),t.speed=u},separate:function(t,e,i,s,n){var r,o,a=!1,h=!0;return!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e)||i&&!1===i.call(s,t.gameObject||t,e.gameObject||e)||((h=t.isCircle||e.isCircle?(i=this.separateCircle(t,e,n)).result?!(a=!0):(r=i.x,o=i.y,!0):h)&&(i=s=!1,h=this.OVERLAP_BIAS,n?(s=d(t,e,n,h,r),i=p(t,e,n,h,o)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)=e.right||t.top>=e.bottom))},circleBodyIntersects:function(t,e){var i=f(t.center.x,e.left,e.right),e=f(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-e)*(t.center.y-e)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===n&&(n=i),this.collideObjects(t,e,i,s=void 0===s?null:s,n,!0)},collide:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===n&&(n=i),this.collideObjects(t,e,i,s=void 0===s?null:s,n,!1)},collideObjects:function(t,e,i,s,n,r){!t.isParent||void 0!==t.physicsType&&void 0!==e&&t!==e||(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var o,a=Array.isArray(t),h=Array.isArray(e);if(this._total=0,a||h)if(!a&&h)for(o=0;o{t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},59023:t=>{t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},62069:t=>{t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,e,i,s){return this.body.setCollideWorldBounds(t,e,i,s),this}}},78389:(t,e,i)=>{var s=i(79599);t.exports={setCollisionCategory:function(t){return(this.body||this).collisionCategory=t,this},willCollideWith:function(t){return 0!=((this.body||this).collisionMask&t)},addCollidesWith:function(t){var e=this.body||this;return e.collisionMask=e.collisionMask|t,this},removeCollidesWith:function(t){var e=this.body||this;return e.collisionMask=e.collisionMask&~t,this},setCollidesWith:function(t){return(this.body||this).collisionMask=s(t),this},resetCollisionCategory:function(){var t=this.body||this;return t.collisionCategory=1,t.collisionMask=2147483647,this}}},87118:t=>{t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},52819:t=>{t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}}},4074:t=>{t.exports={setDirectControl:function(t){return this.body.setDirectControl(t),this},enableBody:function(t,e,i,s,n){return t&&this.body.reset(e,i),s&&(this.body.gameObject.active=!0),n&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}}},40831:t=>{t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},26775:t=>{t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},9437:t=>{t.exports={setImmovable:function(t){return this.body.immovable=t=void 0===t?!0:t,this}}},30621:t=>{t.exports={setMass:function(t){return this.body.mass=t,this}}},72441:(t,e,i)=>{var d=i(47956),p=i(96503),f=i(2044),g=i(81491);t.exports=function(t,e,i,s,n,r){var o=d(t,e-s,i-s,2*s,2*s,n,r);if(0===o.length)return o;for(var a=new p(e,i,s),h=new p,l=[],u=0;u{t.exports=function(t,e,i,s,n,r,o){void 0===r&&(r=!0),void 0===o&&(o=!1);var a,h,l=[],u=[],c=t.treeMinMax;return c.minX=e,c.minY=i,c.maxX=e+s,c.maxY=i+n,o&&(u=t.staticTree.search(c)),r&&t.useTree?l=t.tree.search(c):r&&(o=t.bodies,a={position:{x:e,y:i},left:e,top:i,right:e+s,bottom:i+n,isCircle:!1},h=t.intersects,o.iterate(function(t){h(t,a)&&l.push(t)})),u.concat(l)}},62121:t=>{t.exports={setPushable:function(t){return this.body.pushable=t=void 0===t?!0:t,this}}},29384:t=>{t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setBodySize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},15098:t=>{t.exports={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}}},92209:(t,e,i)=>{t.exports={Acceleration:i(1093),Angular:i(59023),Bounce:i(62069),Collision:i(78389),Debug:i(87118),Drag:i(52819),Enable:i(4074),Friction:i(40831),Gravity:i(26775),Immovable:i(9437),Mass:i(30621),OverlapCirc:i(72441),OverlapRect:i(47956),Pushable:i(62121),Size:i(29384),Velocity:i(15098)}},37747:t=>{t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},20009:t=>{t.exports="collide"},36768:t=>{t.exports="overlap"},60473:t=>{t.exports="pause"},89954:t=>{t.exports="resume"},61804:t=>{t.exports="tilecollide"},7161:t=>{t.exports="tileoverlap"},34689:t=>{t.exports="worldbounds"},16006:t=>{t.exports="worldstep"},63012:(t,e,i)=>{t.exports={COLLIDE:i(20009),OVERLAP:i(36768),PAUSE:i(60473),RESUME:i(89954),TILE_COLLIDE:i(61804),TILE_OVERLAP:i(7161),WORLD_BOUNDS:i(34689),WORLD_STEP:i(16006)}},27064:(t,e,i)=>{var s=i(37747),i=i(79291)(!1,{ArcadePhysics:i(86689),Body:i(37742),Collider:i(79342),Components:i(92209),Events:i(63012),Factory:i(66022),GetCollidesWith:i(79599),GetOverlapX:i(64897),GetOverlapY:i(45170),SeparateX:i(14087),SeparateY:i(89936),Group:i(60758),Image:i(71289),Sprite:i(13759),StaticBody:i(72624),StaticGroup:i(71464),Tilemap:i(55173),World:i(82248)},s);t.exports=i},96602:t=>{t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},36294:t=>{t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):0{t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):0{var v=i(21329),y=i(53442),x=i(2483);t.exports=function(t,e,i,s,n,r,o){var a=s.left,h=s.top,l=s.right,u=s.bottom,c=i.faceLeft||i.faceRight,d=i.faceTop||i.faceBottom;if(o||(d=c=!0),!c&&!d)return!1;var p=0,f=0,g=0,m=1;if(e.deltaAbsX()>e.deltaAbsY()?g=-1:e.deltaAbsX(){var u=i(36294);t.exports=function(t,e,i,s,n,r){var o=0,a=e.faceLeft,h=e.faceRight,l=e.collideLeft,e=e.collideRight;return r||(e=l=h=a=!0),t.deltaX()<0&&e&&t.checkCollision.left?h&&t.xi&&(o=t.right-i)>n&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:u(t,o)),o}},53442:(t,e,i)=>{var u=i(67013);t.exports=function(t,e,i,s,n,r){var o=0,a=e.faceTop,h=e.faceBottom,l=e.collideUp,e=e.collideDown;return r||(e=l=h=a=!0),t.deltaY()<0&&e&&t.checkCollision.up?h&&t.yi&&(o=t.bottom-i)>n&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:u(t,o)),o}},2483:t=>{t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},55173:(t,e,i)=>{i={ProcessTileCallbacks:i(96602),ProcessTileSeparationX:i(36294),ProcessTileSeparationY:i(67013),SeparateTile:i(40012),TileCheckX:i(21329),TileCheckY:i(53442),TileIntersectsBody:i(2483)};t.exports=i},44563:(t,e,i)=>{t.exports={Arcade:i(27064),Matter:i(3875)}},68174:(t,e,i)=>{var s=i(83419),n=i(26099),i=new s({initialize:function(){this.boundsCenter=new n,this.centerDiff=new n},parseBody:function(t){var e,i,s,n,r;return!(!(t=t.hasOwnProperty("body")?t.body:t).hasOwnProperty("bounds")||!t.hasOwnProperty("centerOfMass")||(e=this.boundsCenter,i=this.centerDiff,s=t.bounds.max.x-t.bounds.min.x,n=t.bounds.max.y-t.bounds.min.y,r=s*t.centerOfMass.x,t=n*t.centerOfMass.y,e.set(s/2,n/2),i.set(r-e.x,t-e.y),0))},getTopLeft:function(t,e,i){var s;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,s=this.centerDiff,new n(e+t.x+s.x,i+t.y+s.y))},getTopCenter:function(t,e,i){var s;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,s=this.centerDiff,new n(e+s.x,i+t.y+s.y))},getTopRight:function(t,e,i){var s;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,s=this.centerDiff,new n(e-(t.x-s.x),i+t.y+s.y))},getLeftCenter:function(t,e,i){var s;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,s=this.centerDiff,new n(e+t.x+s.x,i+s.y))},getCenter:function(t,e,i){return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.centerDiff,new n(e+t.x,i+t.y))},getRightCenter:function(t,e,i){var s;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,s=this.centerDiff,new n(e-(t.x-s.x),i+s.y))},getBottomLeft:function(t,e,i){var s;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,s=this.centerDiff,new n(e+t.x+s.x,i-(t.y-s.y)))},getBottomCenter:function(t,e,i){var s;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,s=this.centerDiff,new n(e+s.x,i-(t.y-s.y)))},getBottomRight:function(t,e,i){var s;return void 0===e&&(e=0),void 0===i&&(i=0),!!this.parseBody(t)&&(t=this.boundsCenter,s=this.centerDiff,new n(e-(t.x-s.x),i-(t.y-s.y)))}});t.exports=i},19933:(t,e,i)=>{var s=i(6790);s.Body=i(22562),s.Composite=i(69351),s.World=i(4372),s.Collision=i(52284),s.Detector=i(81388),s.Pairs=i(99561),s.Pair=i(4506),s.Query=i(73296),s.Resolver=i(66272),s.Constraint=i(48140),s.Common=i(53402),s.Engine=i(48413),s.Events=i(35810),s.Sleeping=i(53614),s.Plugin=i(73832),s.Bodies=i(66280),s.Composites=i(74116),s.Axes=i(66615),s.Bounds=i(15647),s.Svg=i(74058),s.Vector=i(31725),s.Vertices=i(41598),s.World.add=s.Composite.add,s.World.remove=s.Composite.remove,s.World.addComposite=s.Composite.addComposite,s.World.addBody=s.Composite.addBody,s.World.addConstraint=s.Composite.addConstraint,s.World.clear=s.Composite.clear,t.exports=s},28137:(t,e,i)=>{var u=i(66280),s=i(83419),c=i(74116),r=i(48140),d=i(74058),n=i(75803),p=i(23181),o=i(34803),a=i(73834),h=i(19496),l=i(85791),f=i(98713),g=i(41598),i=new s({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},rectangle:function(t,e,i,s,n){t=u.rectangle(t,e,i,s,n);return this.world.add(t),t},trapezoid:function(t,e,i,s,n,r){t=u.trapezoid(t,e,i,s,n,r);return this.world.add(t),t},circle:function(t,e,i,s,n){t=u.circle(t,e,i,s,n);return this.world.add(t),t},polygon:function(t,e,i,s,n){t=u.polygon(t,e,i,s,n);return this.world.add(t),t},fromVertices:function(t,e,i,s,n,r,o){"string"==typeof i&&(i=g.fromPath(i));t=u.fromVertices(t,e,i,s,n,r,o);return this.world.add(t),t},fromPhysicsEditor:function(t,e,i,s,n){void 0===n&&(n=!0);t=h.parseBody(t,e,i,s);return n&&!this.world.has(t)&&this.world.add(t),t},fromSVG:function(t,e,i,s,n,r){void 0===s&&(s=1),void 0===n&&(n={}),void 0===r&&(r=!0);for(var o=i.getElementsByTagName("path"),a=[],h=0;h{var o=i(31884),a=i(95540),h=i(26099);t.exports=function(t,s,e,i){void 0===e&&(e={}),void 0===i&&(i=!0);var n=s.x,r=s.y;return s.body={temp:!0,position:{x:n,y:r}},[o.Bounce,o.Collision,o.Force,o.Friction,o.Gravity,o.Mass,o.Sensor,o.SetBody,o.Sleep,o.Static,o.Transform,o.Velocity].forEach(function(t){for(var e in t)(i=t[e]).get&&"function"==typeof i.get||i.set&&"function"==typeof i.set?Object.defineProperty(s,e,{get:t[e].get,set:t[e].set}):Object.defineProperty(s,e,{value:t[e]});var i}),s.world=t,s._tempVec2=new h(n,r),e.hasOwnProperty("type")&&"body"===e.type?s.setExistingBody(e,i):(t=(t=a(e,"shape",null))||"rectangle",e.addToWorld=i,s.setBody(t,e)),s}},23181:(t,e,i)=>{var s=i(83419),n=i(31884),o=i(95643),a=i(95540),r=i(88571),h=i(72699),l=i(26099),i=new s({Extends:r,Mixins:[n.Bounce,n.Collision,n.Force,n.Friction,n.Gravity,n.Mass,n.Sensor,n.SetBody,n.Sleep,n.Static,n.Transform,n.Velocity,h],initialize:function(t,e,i,s,n,r){o.call(this,t.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(s,n),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new l(e,i);s=a(r,"shape",null);s?this.setBody(s,r):this.setRectangle(this.width,this.height,r),this.setPosition(e,i),this.initPipeline(),this.initPostPipeline(!0)}});t.exports=i},42045:(t,e,i)=>{var r=i(60461),s=i(66615),n=i(66280),o=i(22562),a=i(68174),h=i(15647),l=i(83419),u=i(52284),c=i(53402),d=i(69351),p=i(74116),f=i(48140),g=i(81388),m=i(20339),v=i(28137),y=i(95540),x=i(35154),T=i(46975),b=i(4506),w=i(99561),S=i(37277),C=i(73296),E=i(66272),_=i(44594),A=i(74058),P=i(31725),M=i(41598),R=i(68243),c=(c.setDecomp(i(55973)),new l({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=o,this.composite=d,this.collision=u,this.detector=g,this.pair=b,this.pairs=w,this.query=C,this.resolver=E,this.constraint=f,this.bodies=n,this.composites=p,this.axes=s,this.bounds=h,this.svg=A,this.vector=P,this.vertices=M,this.verts=M,this._tempVec2=P.create(),E._restingThresh=x(this.config,"restingThresh",4),E._restingThreshTangent=x(this.config,"restingThreshTangent",6),E._positionDampen=x(this.config,"positionDampen",.9),E._positionWarming=x(this.config,"positionWarming",.8),E._frictionNormalMultiplier=x(this.config,"frictionNormalMultiplier",5),t.sys.events.once(_.BOOT,this.boot,this),t.sys.events.on(_.START,this.start,this)},boot:function(){this.world=new R(this.scene,this.config),this.add=new v(this.world),this.bodyBounds=new a,this.systems.events.once(_.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new R(this.scene,this.config),this.add=new v(this.world));var t=this.systems.events;t.on(_.UPDATE,this.world.update,this.world),t.on(_.POST_UPDATE,this.world.postUpdate,this.world),t.once(_.SHUTDOWN,this.shutdown,this)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return T(y(e,"matter",{}),y(t,"matter",{}))},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(t,e){this.world.step(t,e)},containsPoint:function(t,e,i){t=this.getMatterBodies(t);e=P.create(e,i);return 0{var o=i(9674),s=i(83419),n=i(31884),a=i(95643),h=i(95540),r=i(72699),l=i(68287),u=i(26099),i=new s({Extends:l,Mixins:[n.Bounce,n.Collision,n.Force,n.Friction,n.Gravity,n.Mass,n.Sensor,n.SetBody,n.Sleep,n.Static,n.Transform,n.Velocity,r],initialize:function(t,e,i,s,n,r){a.call(this,t.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new o(this),this.setTexture(s,n),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new u(e,i);s=h(r,"shape",null);s?this.setBody(s,r):this.setRectangle(this.width,this.height,r),this.setPosition(e,i),this.initPipeline(),this.initPostPipeline(!0)}});t.exports=i},73834:(t,e,i)=>{var g=i(66280),m=i(22562),s=i(83419),n=i(31884),v=i(62644),r=i(50792),y=i(95540),x=i(97022),T=i(41598),i=new s({Extends:r,Mixins:[n.Bounce,n.Collision,n.Friction,n.Gravity,n.Mass,n.Sensor,n.Sleep,n.Static],initialize:function(t,e,i){r.call(this),this.tile=e,this.world=t,e.physics.matterBody&&e.physics.matterBody.destroy(),e.physics.matterBody=this;var t=y(i,"body",null),s=y(i,"addToWorld",!0);t?this.setBody(t,s):(s=e.getCollisionGroup(),0{var r=i(66280),l=i(22562),u=i(53402),c=i(95540),n=i(41598);t.exports={parseBody:function(t,e,i,s){void 0===s&&(s={});for(var n=c(i,"fixtures",[]),r=[],o=0;o{var l=i(66280),u=i(22562);t.exports={parseBody:function(t,e,i,s){void 0===s&&(s={});var n,r=i.vertices;if(1===r.length)s.vertices=r[0],n=u.create(s),l.flagCoincidentParts(n.parts);else{for(var o=[],a=0;a{var o=i(15647),s=i(83419),a=i(69351),n=i(48140),h=i(81388),l=i(1121),r=i(8214),u=i(46975),c=i(53614),d=i(26099),p=i(41598),i=new s({initialize:function(t,e,i){void 0===i&&(i={}),this.scene=t,this.world=e,this.camera=null,this.pointer=null,this.active=!0,this.position=new d,this.body=null,this.part=null,this.constraint=n.create(u(i,{label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}})),this.world.on(l.BEFORE_UPDATE,this.update,this),t.sys.input.on(r.POINTER_DOWN,this.onDown,this),t.sys.input.on(r.POINTER_UP,this.onUp,this)},onDown:function(t){this.pointer||(this.pointer=t,this.camera=t.camera)},onUp:function(t){t===this.pointer&&(this.pointer=null)},getBody:function(t){var e=this.position,i=this.constraint;this.camera.getWorldPoint(t.x,t.y,e);for(var s=a.allBodies(this.world.localWorld),n=0;n{var r=i(66280),s=i(22562),n=i(83419),m=i(53402),o=i(69351),d=i(48413),l=i(50792),a=i(1121),u=i(95540),c=i(35154),h=i(22562),p=i(35810),f=i(73834),g=i(4372),v=i(13037),y=i(31725),i=new n({Extends:l,initialize:function(t,e){l.call(this),this.scene=t,this.engine=d.create(e),this.localWorld=this.engine.world;var i,s=c(e,"gravity",null),s=(s?this.setGravity(s.x,s.y,s.scale):!1===s&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=c(e,"enabled",!0),this.getDelta=c(e,"getDelta",this.update60Hz),u(e,"runner",{})),n=u(s,"fps",!1),r=u(s,"fps",60),o=u(s,"delta",1e3/r),a=u(s,"deltaMin",1e3/r),h=u(s,"deltaMax",1e3/(.5*r)),n=(this.runner={fps:r=n?r:1e3/o,deltaSampleSize:u(s,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,timeBuffer:0,isFixed:u(s,"isFixed",!1),delta:o,deltaMin:a,deltaMax:h},this.autoUpdate=c(e,"autoUpdate",!0),c(e,"debug",!1));this.drawDebug="object"==typeof n||n,this.debugGraphic,this.debugConfig={showAxes:u(n,"showAxes",!1),showAngleIndicator:u(n,"showAngleIndicator",!1),angleColor:u(n,"angleColor",15208787),showBroadphase:u(n,"showBroadphase",!1),broadphaseColor:u(n,"broadphaseColor",16757760),showBounds:u(n,"showBounds",!1),boundsColor:u(n,"boundsColor",16777215),showVelocity:u(n,"showVelocity",!1),velocityColor:u(n,"velocityColor",44783),showCollisions:u(n,"showCollisions",!1),collisionColor:u(n,"collisionColor",16094476),showSeparations:u(n,"showSeparations",!1),separationColor:u(n,"separationColor",16753920),showBody:u(n,"showBody",!0),showStaticBody:u(n,"showStaticBody",!0),showInternalEdges:u(n,"showInternalEdges",!1),renderFill:u(n,"renderFill",!1),renderLine:u(n,"renderLine",!0),fillColor:u(n,"fillColor",1075465),fillOpacity:u(n,"fillOpacity",1),lineColor:u(n,"lineColor",2678297),lineOpacity:u(n,"lineOpacity",1),lineThickness:u(n,"lineThickness",1),staticFillColor:u(n,"staticFillColor",857979),staticLineColor:u(n,"staticLineColor",1255396),showSleeping:u(n,"showSleeping",!1),staticBodySleepOpacity:u(n,"staticBodySleepOpacity",.7),sleepFillColor:u(n,"sleepFillColor",4605510),sleepLineColor:u(n,"sleepLineColor",10066585),showSensors:u(n,"showSensors",!0),sensorFillColor:u(n,"sensorFillColor",857979),sensorLineColor:u(n,"sensorLineColor",1255396),showPositions:u(n,"showPositions",!0),positionSize:u(n,"positionSize",4),positionColor:u(n,"positionColor",14697178),showJoint:u(n,"showJoint",!0),jointColor:u(n,"jointColor",14737474),jointLineOpacity:u(n,"jointLineOpacity",1),jointLineThickness:u(n,"jointLineThickness",2),pinSize:u(n,"pinSize",4),pinColor:u(n,"pinColor",4382944),springColor:u(n,"springColor",14697184),anchorColor:u(n,"anchorColor",15724527),anchorSize:u(n,"anchorSize",4),showConvexHulls:u(n,"showConvexHulls",!1),hullColor:u(n,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),u(e,"setBounds",!1)&&("boolean"==typeof(r=e.setBounds)?this.setBounds():(s=u(r,"x",0),o=u(r,"y",0),a=u(r,"width",t.sys.scale.width),h=u(r,"height",t.sys.scale.height),n=u(r,"thickness",64),e=u(r,"left",!0),t=u(r,"right",!0),i=u(r,"top",!0),r=u(r,"bottom",!0),this.setBounds(s,o,a,h,n,e,t,i,r)))},setCompositeRenderStyle:function(t){for(var e,i,s=t.bodies,n=t.constraints,r=t.composites,o=0;oMath.max(v._maxFrameDelta,s.maxFrameTime))||(a=s.frameDelta||v._frameDeltaFallback),s.frameDeltaSmoothing&&(s.frameDeltaHistory.push(a),s.frameDeltaHistory=s.frameDeltaHistory.slice(-s.frameDeltaHistorySize),e=s.frameDeltaHistory.slice(0).sort(),e=s.frameDeltaHistory.slice(e.length*v._smoothingLowerBound,e.length*v._smoothingUpperBound),a=v._mean(e)||a),s.frameDeltaSnapping&&(a=1e3/Math.round(1e3/a)),s.frameDelta=a,s.timeLastTick=t,s.timeBuffer+=s.frameDelta,s.timeBuffer=m.clamp(s.timeBuffer,0,s.frameDelta+r*v._timeBufferMargin),s.lastUpdatesDeferred=0;for(var h=s.maxUpdates||Math.ceil(s.maxFrameTime/r),l=m.now();0=r*v._timeBufferMargin;){d.update(i,r),s.timeBuffer-=r,o+=1;var u=m.now()-n,c=m.now()-l,u=u+v._elapsedNextEstimate*c/o;if(h<=o||u>s.maxFrameTime){s.lastUpdatesDeferred=Math.round(Math.max(0,s.timeBuffer/r-v._timeBufferMargin));break}}}},step:function(t){d.update(this.engine,t)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(t){t=t.hasOwnProperty("body")?t.body:t;return null!==o.get(this.localWorld,t.id,t.type)},getAllBodies:function(){return o.allBodies(this.localWorld)},getAllConstraints:function(){return o.allConstraints(this.localWorld)},getAllComposites:function(){return o.allComposites(this.localWorld)},postUpdate:function(){var t,e,i,s;this.drawDebug&&(t=this.debugConfig,e=this.engine,i=this.debugGraphic,s=o.allBodies(this.localWorld),this.debugGraphic.clear(),t.showBroadphase&&e.broadphase.controller&&this.renderGrid(e.broadphase,i,t.broadphaseColor,.5),t.showBounds&&this.renderBodyBounds(s,i,t.boundsColor,.5),(t.showBody||t.showStaticBody)&&this.renderBodies(s),t.showJoint&&this.renderJoints(),(t.showAxes||t.showAngleIndicator)&&this.renderBodyAxes(s,i,t.showAxes,t.angleColor,.5),t.showVelocity&&this.renderBodyVelocity(s,i,t.velocityColor,1,2),t.showSeparations&&this.renderSeparations(e.pairs.list,i,t.separationColor),t.showCollisions)&&this.renderCollisions(e.pairs.list,i,t.collisionColor)},renderGrid:function(t,e,i,s){e.lineStyle(1,i,s);for(var n=m.keys(t.buckets),r=0;r{t.exports={setBounce:function(t){return this.body.restitution=t,this}}},66968:t=>{t.exports={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var e=0;if(Array.isArray(t))for(var i=0;i{var s=i(22562);t.exports={applyForce:function(t){return this._tempVec2.set(this.body.position.x,this.body.position.y),s.applyForce(this.body,this._tempVec2,t),this},applyForceFrom:function(t,e){return s.applyForce(this.body,t,e),this},thrust:function(t){var e=this.body.angle;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),s.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(t){var e=this.body.angle-Math.PI/2;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),s.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(t){var e=this.body.angle+Math.PI/2;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),s.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(t){var e=this.body.angle-Math.PI;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),s.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}}},5436:t=>{t.exports={setFriction:function(t,e,i){return this.body.friction=t,void 0!==e&&(this.body.frictionAir=e),void 0!==i&&(this.body.frictionStatic=i),this},setFrictionAir:function(t){return this.body.frictionAir=t,this},setFrictionStatic:function(t){return this.body.frictionStatic=t,this}}},39858:t=>{t.exports={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}}},37302:(t,e,i)=>{var s=i(22562),n=i(26099);t.exports={setMass:function(t){return s.setMass(this.body,t),this},setDensity:function(t){return s.setDensity(this.body,t),this},centerOfMass:{get:function(){return new n(this.body.centerOfMass.x,this.body.centerOfMass.y)}}}},39132:t=>{t.exports={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}}},57772:(t,e,i)=>{var d=i(66280),p=i(22562),a=i(43855),f=i(95540),g=i(19496),m=i(85791),v=i(41598);t.exports={setRectangle:function(t,e,i){return this.setBody({type:"rectangle",width:t,height:e},i)},setCircle:function(t,e){return this.setBody({type:"circle",radius:t},e)},setPolygon:function(t,e,i){return this.setBody({type:"polygon",sides:e,radius:t},i)},setTrapezoid:function(t,e,i,s){return this.setBody({type:"trapezoid",width:t,height:e,slope:i},s)},setExistingBody:function(t,e){void 0===e&&(e=!0),this.body&&this.world.remove(this.body,!0),this.body=t;for(var i=0;i{var s=i(1121),n=i(53614),r=i(35810);t.exports={setToSleep:function(){return n.set(this.body,!0),this},setAwake:function(){return n.set(this.body,!1),this},setSleepThreshold:function(t){return this.body.sleepThreshold=t=void 0===t?60:t,this},setSleepEvents:function(t,e){return this.setSleepStartEvent(t),this.setSleepEndEvent(e),this},setSleepStartEvent:function(t){var e;return t?(e=this.world,r.on(this.body,"sleepStart",function(t){e.emit(s.SLEEP_START,t,this)})):r.off(this.body,"sleepStart"),this},setSleepEndEvent:function(t){var e;return t?(e=this.world,r.on(this.body,"sleepEnd",function(t){e.emit(s.SLEEP_END,t,this)})):r.off(this.body,"sleepEnd"),this}}},90556:(t,e,i)=>{var s=i(22562);t.exports={setStatic:function(t){return s.setStatic(this.body,t),this},isStatic:function(){return this.body.isStatic}}},85436:(t,e,i)=>{var r=i(22562),s=i(36383),n=i(86554),o=i(30954);t.exports={x:{get:function(){return this.body.position.x},set:function(t){this._tempVec2.set(t,this.y),r.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(t){this._tempVec2.set(this.x,t),r.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(t){var e=1/this._scaleX,i=1/this._scaleY;this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4,r.scale(this.body,e,i),r.scale(this.body,t,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(t){var e=1/this._scaleX,i=1/this._scaleY;this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4,r.scale(this.body,e,i),r.scale(this.body,this._scaleX,t)}},angle:{get:function(){return o(this.body.angle*s.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*s.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(t){this._rotation=n(t),r.setAngle(this.body,this._rotation)}},setPosition:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this._tempVec2.set(t,e),r.setPosition(this.body,this._tempVec2),this},setRotation:function(t){return this._rotation=n(t=void 0===t?0:t),r.setAngle(this.body,t),this},setFixedRotation:function(){return r.setInertia(this.body,1/0),this},setAngle:function(t){return this.angle=t=void 0===t?0:t,r.setAngle(this.body,this.rotation),this},setScale:function(t,e,i){void 0===t&&(t=1),void 0===e&&(e=t);var s=1/this._scaleX,n=1/this._scaleY;return this._scaleX=t,this._scaleY=e,r.scale(this.body,s,n,i),r.scale(this.body,t,e,i),this}}},42081:(t,e,i)=>{var s=i(22562);t.exports={setVelocityX:function(t){return this._tempVec2.set(t,this.body.velocity.y),s.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(t){return this._tempVec2.set(this.body.velocity.x,t),s.setVelocity(this.body,this._tempVec2),this},setVelocity:function(t,e){return this._tempVec2.set(t,e),s.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return s.getVelocity(this.body)},setAngularVelocity:function(t){return s.setAngularVelocity(this.body,t),this},getAngularVelocity:function(){return s.getAngularVelocity(this.body)},setAngularSpeed:function(t){return s.setAngularSpeed(this.body,t),this},getAngularSpeed:function(){return s.getAngularSpeed(this.body)}}},31884:(t,e,i)=>{t.exports={Bounce:i(70410),Collision:i(66968),Force:i(51607),Friction:i(5436),Gravity:i(39858),Mass:i(37302),Sensor:i(39132),SetBody:i(57772),Sleep:i(38083),Static:i(90556),Transform:i(85436),Velocity:i(42081)}},85608:t=>{t.exports="afteradd"},1213:t=>{t.exports="afterremove"},25968:t=>{t.exports="afterupdate"},67205:t=>{t.exports="beforeadd"},39438:t=>{t.exports="beforeremove"},44823:t=>{t.exports="beforeupdate"},92593:t=>{t.exports="collisionactive"},60128:t=>{t.exports="collisionend"},76861:t=>{t.exports="collisionstart"},92362:t=>{t.exports="dragend"},76408:t=>{t.exports="drag"},93971:t=>{t.exports="dragstart"},5656:t=>{t.exports="pause"},47861:t=>{t.exports="resume"},79099:t=>{t.exports="sleepend"},35906:t=>{t.exports="sleepstart"},1121:(t,e,i)=>{t.exports={AFTER_ADD:i(85608),AFTER_REMOVE:i(1213),AFTER_UPDATE:i(25968),BEFORE_ADD:i(67205),BEFORE_REMOVE:i(39438),BEFORE_UPDATE:i(44823),COLLISION_ACTIVE:i(92593),COLLISION_END:i(60128),COLLISION_START:i(76861),DRAG_END:i(92362),DRAG:i(76408),DRAG_START:i(93971),PAUSE:i(5656),RESUME:i(47861),SLEEP_END:i(79099),SLEEP_START:i(35906)}},3875:(t,e,i)=>{t.exports={BodyBounds:i(68174),Components:i(31884),Events:i(1121),Factory:i(28137),MatterGameObject:i(75803),Image:i(23181),Matter:i(19933),MatterPhysics:i(42045),PolyDecomp:i(55973),Sprite:i(34803),TileBody:i(73834),PhysicsEditorParser:i(19496),PhysicsJSONParser:i(85791),PointerConstraint:i(98713),World:i(68243)}},22562:(t,e,i)=>{var s,c={},d=(t.exports=c,i(41598)),l=i(31725),n=i(53614),u=i(53402),p=i(15647),f=i(66615);c._timeCorrection=!0,c._inertiaScale=4,c._nextCollidingGroupId=1,c._nextNonCollidingGroupId=-1,c._nextCategory=1,c._baseDelta=1e3/60,c.create=function(t){var e={id:u.nextId(),type:"body",label:"Body",parts:[],plugin:{},attractors:t.attractors||[],wrapBounds:null,angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,deltaTime:1e3/60,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}},e=(!t.hasOwnProperty("position")&&t.hasOwnProperty("vertices")?t.position=d.centre(t.vertices):t.hasOwnProperty("vertices")||(e.vertices=d.fromPath("L 0 0 L 40 0 L 40 40 L 0 40")),u.extend(e,t));return s(e,t),e.setOnCollideWith=function(t,e){return e?this.onCollideWith[t.id]=e:delete this.onCollideWith[t.id],this},e},c.nextGroup=function(t){return t?c._nextNonCollidingGroupId--:c._nextCollidingGroupId++},c.nextCategory=function(){return c._nextCategory=c._nextCategory<<1,c._nextCategory},s=function(t,e){var i,s,n,r;e=e||{},c.set(t,{bounds:t.bounds||p.create(t.vertices),positionPrev:t.positionPrev||l.clone(t.position),anglePrev:t.anglePrev||t.angle,vertices:t.vertices,parts:t.parts||[t],isStatic:t.isStatic,isSleeping:t.isSleeping,parent:t.parent||t}),d.rotate(t.vertices,t.angle,t.position),f.rotate(t.axes,t.angle),p.update(t.bounds,t.vertices,t.velocity),c.set(t,{axes:e.axes||t.axes,area:e.area||t.area,mass:e.mass||t.mass,inertia:e.inertia||t.inertia}),1===t.parts.length&&(e=t.bounds,s=t.centerOffset,n=e.max.x-e.min.x,r=e.max.y-e.min.y,(i=t.centerOfMass).x=-(e.min.x-t.position.x)/n,i.y=-(e.min.y-t.position.y)/r,s.x=n*i.x,s.y=r*i.y)},c.set=function(t,e,i){for(var s in"string"==typeof e&&(s=e,(e={})[s]=i),e)if(Object.prototype.hasOwnProperty.call(e,s))switch(i=e[s],s){case"isStatic":c.setStatic(t,i);break;case"isSleeping":n.set(t,i);break;case"mass":c.setMass(t,i);break;case"density":c.setDensity(t,i);break;case"inertia":c.setInertia(t,i);break;case"vertices":c.setVertices(t,i);break;case"position":c.setPosition(t,i);break;case"angle":c.setAngle(t,i);break;case"velocity":c.setVelocity(t,i);break;case"angularVelocity":c.setAngularVelocity(t,i);break;case"speed":c.setSpeed(t,i);break;case"angularSpeed":c.setAngularSpeed(t,i);break;case"parts":c.setParts(t,i);break;case"centre":c.setCentre(t,i);break;default:t[s]=i}},c.setStatic=function(t,e){for(var i=0;i{var c={},o=(t.exports=c,i(35810)),a=i(53402),r=i(15647),d=i(22562);c.create=function(t){return a.extend({id:a.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},wrapBounds:null,cache:{allBodies:null,allConstraints:null,allComposites:null}},t)},c.setModified=function(t,e,i,s){if(o.trigger(t,"compositeModified",t),(t.isModified=e)&&t.cache&&(t.cache.allBodies=null,t.cache.allConstraints=null,t.cache.allComposites=null),i&&t.parent&&c.setModified(t.parent,e,i,s),s)for(var n=0;n{var s={},t=(t.exports=s,i(69351));s.create=t.create,s.add=t.add,s.remove=t.remove,s.clear=t.clear,s.addComposite=t.addComposite,s.addBody=t.addBody,s.addConstraint=t.addConstraint},52284:(t,e,i)=>{var u={};t.exports=u;var c=i(41598),d=i(4506),g=[],p={overlap:0,axis:null},f={overlap:0,axis:null};u.create=function(t,e){return{pair:null,collided:!1,bodyA:t,bodyB:e,parentA:t.parent,parentB:e.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[null,null],supportCount:0}},u.collides=function(t,e,i){var s,n,r,o,a,h,l;return u._overlapAxes(p,t.vertices,e.vertices,t.axes),p.overlap<=0||(u._overlapAxes(f,e.vertices,t.vertices,e.axes),f.overlap<=0)?null:((i=i&&i.table[d.id(t,e)])?s=i.collision:((s=u.create(t,e)).collided=!0,s.bodyA=t.idb?b=r:rw?w=r:r{var e={};(t.exports=e).create=function(t){return{vertex:t,normalImpulse:0,tangentImpulse:0}}},81388:(t,e,i)=>{var A={},s=(t.exports=A,i(53402)),P=i(52284);A.create=function(t){return s.extend({bodies:[],collisions:[],pairs:null},t)},A.setBodies=function(t,e){t.bodies=e.slice(0)},A.clear=function(t){t.bodies=[],t.collisions=[]},A.collisions=function(t){var e,i=t.pairs,s=t.bodies,n=s.length,r=A.canCollide,o=P.collides,a=t.collisions,h=0;for(s.sort(A._compareBoundsX),e=0;ec)break;if(!(d<_.min.y||p>_.max.y)&&(!f||!y.isStatic&&!y.isSleeping)&&r(u.collisionFilter,y.collisionFilter)){var x=y.parts.length;if(m&&1===x)(C=o(u,y,i))&&(a[h++]=C);else for(var T=1_.max.x||l.max.x<_.min.x||l.max.y<_.min.y||l.min.y>_.max.y||(C=o(w,E,i))&&(a[h++]=C)}}}return a.length!==h&&(a.length=h),a},A.canCollide=function(t,e){return t.group===e.group&&0!==t.group?0{var n={},r=(t.exports=n,i(43424));n.create=function(t,e){var i=t.bodyA,s=t.bodyB,i={id:n.id(i,s),bodyA:i,bodyB:s,collision:t,contacts:[r.create(),r.create()],contactCount:0,separation:0,isActive:!0,isSensor:i.isSensor||s.isSensor,timeCreated:e,timeUpdated:e,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return n.update(i,t,e),i},n.update=function(t,e,i){var s=e.supports,n=e.supportCount,r=t.contacts,o=e.parentA,a=e.parentB,i=(t.isActive=!0,t.timeUpdated=i,t.collision=e,t.separation=e.depth,t.inverseMass=o.inverseMass+a.inverseMass,t.friction=(o.friction{var s={},T=(t.exports=s,i(4506)),n=i(53402);s.create=function(t){return n.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},s.update=function(t,e,i){for(var s,n,r,o=T.update,a=T.create,h=T.setActive,l=t.table,u=t.list,c=u.length,d=t.collisionStart,p=t.collisionEnd,f=t.collisionActive,g=e.length,m=0,v=0,y=0,x=0;x=i||(h(n,!1,i),0{var u={},c=(t.exports=u,i(31725)),p=i(52284),f=i(15647),d=i(66280),a=i(41598);u.collides=function(t,e){for(var i=[],s=e.length,n=t.bounds,r=p.collides,o=f.overlaps,a=0;a{var U={},p=(t.exports=U,i(41598)),X=i(53402),f=i(15647);U._restingThresh=2,U._restingThreshTangent=Math.sqrt(6),U._positionDampen=.9,U._positionWarming=.8,U._frictionNormalMultiplier=5,U._frictionMaxStatic=Number.MAX_VALUE,U.preSolvePosition=function(t){for(var e,i,s=t.length,n=0;ns&&(A.tangentImpulse=s),i=A.tangentImpulse-k),g*D+v*i),O=m*D+y*i;p.isStatic||p.isSleeping||(p.positionPrev.x+=F*p.inverseMass,p.positionPrev.y+=O*p.inverseMass,p.anglePrev+=(M*O-R*F)*p.inverseInertia),f.isStatic||f.isSleeping||(f.positionPrev.x-=F*f.inverseMass,f.positionPrev.y-=O*f.inverseMass,f.anglePrev-=(L*O-P*F)*f.inverseInertia)}}}},48140:(t,e,i)=>{var g={},o=(t.exports=g,i(41598)),m=i(31725),a=i(53614),h=i(15647),l=i(66615),u=i(53402);g._warming=.4,g._torqueDampen=1,g._minLength=1e-6,g.create=function(t){t.bodyA&&!t.pointA&&(t.pointA={x:0,y:0}),t.bodyB&&!t.pointB&&(t.pointB={x:0,y:0});var e=t.bodyA?m.add(t.bodyA.position,t.pointA):t.pointA,i=t.bodyB?m.add(t.bodyB.position,t.pointB):t.pointB,e=m.magnitude(m.sub(e,i)),i=(t.length=void 0!==t.length?t.length:e,t.id=t.id||u.nextId(),t.label=t.label||"Constraint",t.type="constraint",t.stiffness=t.stiffness||(0{var s,h={};(t.exports=h)._baseDelta=1e3/60,h._nextId=0,h._seed=0,h._nowStartTime=+new Date,h._warnedOnce={},h._decomp=null,h.extend=function(t,e){for(var i,s="boolean"==typeof e?(i=2,e):(i=1,!0),n=i;n{var f={},g=(t.exports=f,i(53614)),m=i(66272),v=i(81388),y=i(99561),x=i(35810),T=i(69351),b=i(48140),w=i(53402),l=i(22562);f._deltaMax=1e3/60,f.create=function(t){var e=w.extend({positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},gravity:{x:0,y:1,scale:.001},timing:{timestamp:0,timeScale:1,lastDelta:0,lastElapsed:0,lastUpdatesPerFrame:0}},t=t||{});return e.world=t.world||T.create({label:"World"}),e.pairs=t.pairs||y.create(),e.detector=t.detector||v.create(),e.detector.pairs=e.pairs,e.grid={buckets:[]},e.world.gravity=e.gravity,e.broadphase=e.grid,e.metrics={},e},f.update=function(t,e){var i,s=w.now(),n=t.world,r=t.detector,o=t.pairs,a=t.timing,h=a.timestamp,l=(e>f._deltaMax&&w.warnOnce("Matter.Engine.update: delta argument is recommended to be less than or equal to",f._deltaMax.toFixed(3),"ms."),e=void 0!==e?e:w._baseDelta,a.timestamp+=e*=a.timeScale,a.lastDelta=e,{timestamp:a.timestamp,delta:e}),u=(x.trigger(t,"beforeUpdate",l),T.allBodies(n)),c=T.allConstraints(n),d=T.allComposites(n);for(n.isModified&&(v.setBodies(r,u),T.setModified(n,!1,!1,!0)),t.enableSleeping&&g.update(u,e),f._bodiesApplyGravity(u,t.gravity),f.wrap(u,d),f.attractors(u),0{var s={},u=(t.exports=s,i(53402));s.on=function(t,e,i){for(var s,n=e.split(" "),r=0;r{var s={},n=(t.exports=s,i(73832)),r=i(53402);s.name="matter-js",s.version="0.20.0",s.uses=[],s.used=[],s.use=function(){n.use(s,Array.prototype.slice.call(arguments))},s.before=function(t,e){return t=t.replace(/^Matter./,""),r.chainPathBefore(s,t,e)},s.after=function(t,e){return t=t.replace(/^Matter./,""),r.chainPathAfter(s,t,e)}},73832:(t,e,i)=>{var o={},a=(t.exports=o,i(53402));o._registry={},o.register=function(t){var e,i,s;return o.isPlugin(t)||a.warn("Plugin.register:",o.toString(t),"does not implement all required fields."),t.name in o._registry?(e=o._registry[t.name],i=o.versionParse(t.version).number,(s=o.versionParse(e.version).number)=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/,e=(e.test(t)||a.warn("Plugin.versionParse:",t,"is not a valid version or range."),e.exec(t)),i=Number(e[4]),s=Number(e[5]),n=Number(e[6]);return{isRange:Boolean(e[1]||e[2]),version:e[3],range:t,operator:e[1]||e[2]||"",major:i,minor:s,patch:n,parts:[i,s,n],prerelease:e[7],number:1e8*i+1e4*s+n}},o.versionSatisfies=function(t,e){var i=o.versionParse(e=e||"*"),s=o.versionParse(t);if(i.isRange){if("*"===i.operator||"*"===t)return!0;if(">"===i.operator)return s.number>i.number;if(">="===i.operator)return s.number>=i.number;if("~"===i.operator)return s.major===i.major&&s.minor===i.minor&&s.patch>=i.patch;if("^"===i.operator)return 0=i.number:0=i.patch:s.patch===i.patch}return t===e||"*"===t}},13037:(t,e,i)=>{var p,f={},g=(t.exports=f,i(35810)),m=i(48413),v=i(53402);f._maxFrameDelta=1e3/15,f._frameDeltaFallback=1e3/60,f._timeBufferMargin=1.5,f._elapsedNextEstimate=1,f._smoothingLowerBound=.1,f._smoothingUpperBound=.9,f.create=function(t){t=v.extend({delta:1e3/60,frameDelta:null,frameDeltaSmoothing:!0,frameDeltaSnapping:!0,frameDeltaHistory:[],frameDeltaHistorySize:100,frameRequestId:null,timeBuffer:0,timeLastTick:null,maxUpdates:null,maxFrameTime:1e3/30,lastUpdatesDeferred:0,enabled:!0},t);return t.fps=0,t},f.run=function(i,s){return i.timeBuffer=f._frameDeltaFallback,function t(e){i.frameRequestId=f._onNextFrame(i,t),e&&i.enabled&&f.tick(i,s,e)}(),i},f.tick=function(t,e,i){var s,n=v.now(),r=t.delta,o=0,a=i-t.timeLastTick,h=(a&&t.timeLastTick&&!(a>Math.max(f._maxFrameDelta,t.maxFrameTime))||(a=t.frameDelta||f._frameDeltaFallback),t.frameDeltaSmoothing&&(t.frameDeltaHistory.push(a),t.frameDeltaHistory=t.frameDeltaHistory.slice(-t.frameDeltaHistorySize),s=t.frameDeltaHistory.slice(0).sort(),s=t.frameDeltaHistory.slice(s.length*f._smoothingLowerBound,s.length*f._smoothingUpperBound),a=p(s)||a),t.frameDeltaSnapping&&(a=1e3/Math.round(1e3/a)),t.frameDelta=a,t.timeLastTick=i,t.timeBuffer+=t.frameDelta,t.timeBuffer=v.clamp(t.timeBuffer,0,t.frameDelta+r*f._timeBufferMargin),t.lastUpdatesDeferred=0,t.maxUpdates||Math.ceil(t.maxFrameTime/r)),l={timestamp:e.timing.timestamp};g.trigger(t,"beforeTick",l),g.trigger(t,"tick",l);for(var u=v.now();0=r*f._timeBufferMargin;){g.trigger(t,"beforeUpdate",l),m.update(e,r),g.trigger(t,"afterUpdate",l),t.timeBuffer-=r,o+=1;var c=v.now()-n,d=v.now()-u,c=c+f._elapsedNextEstimate*d/o;if(h<=o||c>t.maxFrameTime){t.lastUpdatesDeferred=Math.round(Math.max(0,t.timeBuffer/r-f._timeBufferMargin));break}}e.timing.lastUpdatesPerFrame=o,g.trigger(t,"afterTick",l),100<=t.frameDeltaHistory.length&&(t.lastUpdatesDeferred&&Math.round(t.frameDelta/r)>h?v.warnOnce("Matter.Runner: runner reached runner.maxUpdates, see docs."):t.lastUpdatesDeferred&&v.warnOnce("Matter.Runner: runner reached runner.maxFrameTime, see docs."),void 0!==t.isFixed&&v.warnOnce("Matter.Runner: runner.isFixed is now redundant, see docs."),(t.deltaMin||t.deltaMax)&&v.warnOnce("Matter.Runner: runner.deltaMin and runner.deltaMax were removed, see docs."),0!==t.fps)&&v.warnOnce("Matter.Runner: runner.fps was replaced by runner.delta, see docs.")},f.stop=function(t){f._cancelNextFrame(t)},f._onNextFrame=function(t,e){if("undefined"!=typeof window&&window.requestAnimationFrame)return t.frameRequestId=window.requestAnimationFrame(e),t.frameRequestId;throw new Error("Matter.Runner: missing required global window.requestAnimationFrame.")},f._cancelNextFrame=function(t){if("undefined"==typeof window||!window.cancelAnimationFrame)throw new Error("Matter.Runner: missing required global window.cancelAnimationFrame.");window.cancelAnimationFrame(t.frameRequestId)},p=function(t){for(var e=0,i=t.length,s=0;s{var h={},l=(t.exports=h,i(22562)),s=i(35810),u=i(53402);h._motionWakeThreshold=.18,h._motionSleepThreshold=.08,h._minBias=.9,h.update=function(t,e){for(var i=e/u._baseDelta,s=h._motionSleepThreshold,n=0;n=r.sleepThreshold/i&&h.set(r,!0)):0e&&h.set(n,!1))}},h.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||s.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&s.trigger(t,"sleepEnd"))}},66280:(t,e,i)=>{var c={},_=(t.exports=c,i(41598)),A=i(53402),P=i(22562),M=i(15647),R=i(31725);c.rectangle=function(t,e,i,s,n){n=n||{};t={label:"Rectangle Body",position:{x:t,y:e},vertices:_.fromPath("L 0 0 L "+i+" 0 L "+i+" "+s+" L 0 "+s)};return n.chamfer&&(e=n.chamfer,t.vertices=_.chamfer(t.vertices,e.radius,e.quality,e.qualityMin,e.qualityMax),delete n.chamfer),P.create(A.extend({},t,n))},c.trapezoid=function(t,e,i,s,n,r){r=r||{},1<=n&&A.warn("Bodies.trapezoid: slope parameter must be < 1.");var o=i*(n*=.5),i=o+(1-2*n)*i,a=i+o,t={label:"Trapezoid Body",position:{x:t,y:e},vertices:_.fromPath(n<.5?"L 0 0 L "+o+" "+-s+" L "+i+" "+-s+" L "+a+" 0":"L 0 0 L "+i+" "+-s+" L "+a+" 0")};return r.chamfer&&(e=r.chamfer,t.vertices=_.chamfer(t.vertices,e.radius,e.quality,e.qualityMin,e.qualityMax),delete r.chamfer),P.create(A.extend({},t,r))},c.circle=function(t,e,i,s,n){s=s||{};var r={label:"Circle Body",circleRadius:i},n=(n=n||25,Math.ceil(Math.max(10,Math.min(n,i))));return n%2==1&&(n+=1),c.polygon(t,e,n,i,A.extend({},r,s))},c.polygon=function(t,e,i,s,n){if(n=n||{},i<3)return c.circle(t,e,s,n);for(var r=2*Math.PI/i,o="",a=.5*r,h=0;h{var p={},y=(t.exports=p,i(69351)),f=i(48140),g=i(53402),x=i(22562),u=i(66280);p.stack=function(t,e,i,s,n,r,o){for(var a,h=y.create({label:"Stack"}),l=t,u=e,c=0,d=0;d{var s={},n=(t.exports=s,i(31725)),r=i(53402);s.fromVertices=function(t){for(var e={},i=0;i{var i={};(t.exports=i).create=function(t){var e={min:{x:0,y:0},max:{x:0,y:0}};return t&&i.update(e,t),e},i.update=function(t,e,i){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var s=0;st.max.x&&(t.max.x=n.x),n.xt.max.y&&(t.max.y=n.y),n.y=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},i.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},i.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},i.shift=function(t,e){var i=t.max.x-t.min.x,s=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+s},i.wrap=function(t,e,i){var s=null,n=null;if(void 0!==e.min.x&&void 0!==e.max.x&&(t.min.x>e.max.x?s=e.min.x-t.max.x:t.max.xe.max.y?n=e.min.y-t.max.y:t.max.y{var x={},T=(t.exports=x,i(15647),i(53402));x.pathToVertices=function(t,e){"undefined"==typeof window||"SVGPathSeg"in window||T.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");function i(t,e,i){var s,i=i%2==1&&1{var i={};(t.exports=i).create=function(t,e){return{x:t||0,y:e||0}},i.clone=function(t){return{x:t.x,y:t.y}},i.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},i.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},i.rotate=function(t,e,i){var s=Math.cos(e),e=Math.sin(e),n=t.x*s-t.y*e;return(i=i||{}).y=t.x*e+t.y*s,i.x=n,i},i.rotateAbout=function(t,e,i,s){var n=Math.cos(e),e=Math.sin(e),r=i.x+((t.x-i.x)*n-(t.y-i.y)*e);return(s=s||{}).y=i.y+((t.x-i.x)*e+(t.y-i.y)*n),s.x=r,s},i.normalise=function(t){var e=i.magnitude(t);return 0===e?{x:0,y:0}:{x:t.x/e,y:t.y/e}},i.dot=function(t,e){return t.x*e.x+t.y*e.y},i.cross=function(t,e){return t.x*e.y-t.y*e.x},i.cross3=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x)},i.add=function(t,e,i){return(i=i||{}).x=t.x+e.x,i.y=t.y+e.y,i},i.sub=function(t,e,i){return(i=i||{}).x=t.x-e.x,i.y=t.y-e.y,i},i.mult=function(t,e){return{x:t.x*e,y:t.y*e}},i.div=function(t,e){return{x:t.x/e,y:t.y/e}},i.perp=function(t,e){return{x:(e=!0===e?-1:1)*-t.y,y:e*t.x}},i.neg=function(t){return{x:-t.x,y:-t.y}},i.angle=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},i._temp=[i.create(),i.create(),i.create(),i.create(),i.create(),i.create()]},41598:(t,e,i)=>{var o={},y=(t.exports=o,i(31725)),x=i(53402);o.create=function(t,e){for(var i=[],s=0;s{function C(t,e,i,s){var n,r=e[0]-t[0],e=e[1]-t[1],o=s[0]-i[0],s=s[1]-i[1];if(o*e-s*r!=0)return n=(o*(t[1]-i[1])+s*(i[0]-t[0]))/(s*r-o*e),0<=(t=(r*(i[1]-t[1])+e*(t[0]-i[0]))/(o*e-s*r))&&t<=1&&0<=n&&n<=1}function a(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function E(t,e,i){return 0o)console.warn("quickDecomp: max level ("+o+") reached.");else{for(var w=0;w{for(var s=0;s!==t.length;++s)if(s!==e&&s!==i&&(s+1)%t.length!==e&&(s+1)%t.length!==i&&C(R(t,e),R(t,i),R(t,s),R(t,s+1)))return;return 1})(T,w,S)&&(f=p,v=S%e.length);w{var n,r,o;return s?(o=l,(r=h)[0]=e[0]-t[0],r[1]=e[1]-t[1],o[0]=i[0]-e[0],o[1]=i[1]-e[1],n=r[0]*o[0]+r[1]*o[1],r=Math.sqrt(r[0]*r[0]+r[1]*r[1]),o=Math.sqrt(o[0]*o[0]+o[1]*o[1]),Math.acos(n/(r*o))i[e][0])&&(e=s);return!E(R(t,e-1),R(t,e),R(t,e+1))&&((t=>{for(var e=[],i=t.length,s=0;s!==i;s++)e.push(t.pop());for(s=0;s!==i;s++)t[s]=e[s]})(t),!0)}};var h=[],l=[];function M(t,e){var i=e[0]-t[0],e=e[1]-t[1];return i*i+e*e}function R(t,e){var i=t.length;return t[e<0?e%i+i:e%i]}function L(t,e,i,s){for(var n=i;n{i=new(i(83419))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=i},42363:t=>{t.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},37277:t=>{var n={},r={};t.exports={register:function(t,e,i,s){n[t]={plugin:e,mapping:i,custom:s=void 0===s?!1:s}},registerCustom:function(t,e,i,s){r[t]={plugin:e,mapping:i,data:s}},hasCore:function(t){return n.hasOwnProperty(t)},hasCustom:function(t){return r.hasOwnProperty(t)},getCore:function(t){return n[t]},getCustom:function(t){return r[t]},getCustomClass:function(t){return r.hasOwnProperty(t)?r[t].plugin:null},remove:function(t){n.hasOwnProperty(t)&&delete n[t]},removeCustom:function(t){r.hasOwnProperty(t)&&delete r[t]},destroyCorePlugins:function(){for(var t in n)n.hasOwnProperty(t)&&delete n[t]},destroyCustomPlugins:function(){for(var t in r)r.hasOwnProperty(t)&&delete r[t]}}},77332:(t,e,i)=>{var s=i(83419),l=i(8443),n=i(50792),r=i(74099),o=i(44603),a=i(39429),u=i(95540),g=i(37277),h=i(72905),i=new s({Extends:n,initialize:function(t){n.call(this),this.game=t,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],t.isBooted?this.boot():t.events.once(l.BOOT,this.boot,this)},boot:function(){for(var t,e,i,s,n,r,o=this.game.config,a=(a=o.installGlobalPlugins).concat(this._pendingGlobal),h=0;h{var s=i(52018),n=i(83419),r=i(44594),i=new n({Extends:s,initialize:function(t,e,i){s.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,t.sys.events.once(r.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=i},18922:(t,e,i)=>{t.exports={BasePlugin:i(52018),DefaultPlugins:i(42363),PluginCache:i(37277),PluginManager:i(77332),ScenePlugin:i(45145)}},63595:()=>{"undefined"!=typeof HTMLVideoElement&&!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(o){let a=performance.now(),h=this.getVideoPlaybackQuality(),t=this.mozPresentedFrames||this.mozPaintedFrames||h.totalVideoFrames-h.droppedVideoFrames,e=(i,s)=>{var n=this.getVideoPlaybackQuality(),r=this.mozPresentedFrames||this.mozPaintedFrames||n.totalVideoFrames-n.droppedVideoFrames;if(r>t){let t=this.mozFrameDelay||n.totalFrameDelay-h.totalFrameDelay||0,e=s-i;o(s,{presentationTime:s+1e3*t,expectedDisplayTime:s+e,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+e/1e3,presentedFrames:r,processingDuration:t}),delete this._rvfcpolyfillmap[a]}else this._rvfcpolyfillmap[a]=requestAnimationFrame(t=>e(s,t))};return this._rvfcpolyfillmap[a]=requestAnimationFrame(t=>e(a,t)),a},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(t){cancelAnimationFrame(this._rvfcpolyfillmap[t]),delete this._rvfcpolyfillmap[t]})},10312:t=>{t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},29795:t=>{t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},68627:(t,e,i)=>{var d=i(19715),l=i(32880),s=i(83419),n=i(8054),r=i(50792),p=i(92503),o=i(56373),a=i(97480),h=i(69442),u=i(61340),i=new s({Extends:r,initialize:function(t){r.call(this);var e=t.config,i=(this.config={clearBeforeRender:e.clearBeforeRender,backgroundColor:e.backgroundColor,antialias:e.antialias,roundPixels:e.roundPixels},this.game=t,this.type=n.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=t.canvas,{alpha:t.config.transparent,desynchronized:t.config.desynchronized,willReadFrequently:!1});this.gameContext=e.context||this.gameCanvas.getContext("2d",i),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=o(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new u,this._tempMatrix2=new u,this._tempMatrix3=new u,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(h.READY,this.boot,this)},boot:function(){var t=this.game,e=t.scale.baseSize;this.width=e.width,this.height=e.height,this.isBooted=!0,t.scale.on(a.RESIZE,this.onResize,this),this.resize(e.width,e.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e,this.emit(p.RESIZE,t,e)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,s=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),this.emit(p.PRE_RENDER_CLEAR),e.clearBeforeRender&&(t.clearRect(0,0,i,s),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,s))),t.save(),this.drawCount=0,this.emit(p.PRE_RENDER)},render:function(t,e,i){var s=e.length,n=(this.emit(p.RENDER,t,i),i.x),r=i.y,o=i.width,a=i.height,h=(i.renderToTexture?i:t.sys).context,l=(h.save(),this.game.scene.customViewports&&(h.beginPath(),h.rect(n,r,o,a),h.clip()),i.emit(d.PRE_RENDER,i),this.currentContext=h,i.mask);l&&l.preRenderCanvas(this,null,i._maskCamera),i.transparent||(h.fillStyle=i.backgroundColor.rgba,h.fillRect(n,r,o,a)),h.globalAlpha=i.alpha,h.globalCompositeOperation="source-over",this.drawCount+=s,i.renderToTexture&&i.emit(d.PRE_RENDER,i),i.matrix.copyToContext(h);for(var u=0;u{t.exports={CanvasRenderer:i(68627),GetBlendModes:i(56373),SetTransform:i(20926)}},56373:(t,e,i)=>{var s=i(10312),n=i(89289);t.exports=function(){var t=[],e=n.supportNewBlendModes,i="source-over";return t[s.NORMAL]=i,t[s.ADD]="lighter",t[s.MULTIPLY]=e?"multiply":i,t[s.SCREEN]=e?"screen":i,t[s.OVERLAY]=e?"overlay":i,t[s.DARKEN]=e?"darken":i,t[s.LIGHTEN]=e?"lighten":i,t[s.COLOR_DODGE]=e?"color-dodge":i,t[s.COLOR_BURN]=e?"color-burn":i,t[s.HARD_LIGHT]=e?"hard-light":i,t[s.SOFT_LIGHT]=e?"soft-light":i,t[s.DIFFERENCE]=e?"difference":i,t[s.EXCLUSION]=e?"exclusion":i,t[s.HUE]=e?"hue":i,t[s.SATURATION]=e?"saturation":i,t[s.COLOR]=e?"color":i,t[s.LUMINOSITY]=e?"luminosity":i,t[s.ERASE]="destination-out",t[s.SOURCE_IN]="source-in",t[s.SOURCE_OUT]="source-out",t[s.SOURCE_ATOP]="source-atop",t[s.DESTINATION_OVER]="destination-over",t[s.DESTINATION_IN]="destination-in",t[s.DESTINATION_OUT]="destination-out",t[s.DESTINATION_ATOP]="destination-atop",t[s.LIGHTER]="lighter",t[s.COPY]="copy",t[s.XOR]="xor",t}},20926:(t,e,i)=>{var o=i(91296);t.exports=function(t,e,i,s,n){var r=s.alpha*i.alpha;return!(r<=0||(s=o(i,s,n).calc,e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=r,e.save(),s.setToContext(e),e.imageSmoothingEnabled=i.frame?!i.frame.source.scaleMode:t.antialias,0))}},63899:t=>{t.exports="losewebgl"},6119:t=>{t.exports="postrender"},48070:t=>{t.exports="prerender"},15640:t=>{t.exports="render"},8912:t=>{t.exports="resize"},87124:t=>{t.exports="restorewebgl"},92503:(t,e,i)=>{t.exports={LOSE_WEBGL:i(63899),POST_RENDER:i(6119),PRE_RENDER:i(48070),RENDER:i(15640),RESIZE:i(8912),RESTORE_WEBGL:i(87124)}},36909:(t,e,i)=>{t.exports={Events:i(92503),Snapshot:i(89966)},t.exports.Canvas=i(55830),t.exports.WebGL=i(4159)},32880:(t,e,i)=>{var d=i(27919),p=i(40987),f=i(95540);t.exports=function(t,e){var i,s,n,r=f(e,"callback"),o=f(e,"type","image/png"),a=f(e,"encoder",.92),h=Math.abs(Math.round(f(e,"x",0))),l=Math.abs(Math.round(f(e,"y",0))),u=Math.floor(f(e,"width",t.width)),c=Math.floor(f(e,"height",t.height));f(e,"getPixel",!1)?(e=t.getContext("2d",{willReadFrequently:!1}).getImageData(h,l,1,1).data,r.call(null,new p(e[0],e[1],e[2],e[3]))):0!==h||0!==l||u!==t.width||c!==t.height?(e=(i=d.createWebGL(this,u,c)).getContext("2d",{willReadFrequently:!0}),0{var w=i(27919),S=i(40987),C=i(95540);t.exports=function(t,e){var i=C(e,"callback"),s=C(e,"type","image/png"),n=C(e,"encoder",.92),r=Math.abs(Math.round(C(e,"x",0))),o=Math.abs(Math.round(C(e,"y",0))),a=C(e,"getPixel",!1),h=C(e,"isFramebuffer",!1),l=h?C(e,"bufferWidth",1):t.drawingBufferWidth,u=h?C(e,"bufferHeight",1):t.drawingBufferHeight;if(a){a=new Uint8Array(4);t.readPixels(r,h?o:u-o,1,1,t.RGBA,t.UNSIGNED_BYTE,a),i.call(null,new S(a[0],a[1],a[2],a[3]))}else{var c=Math.floor(C(e,"width",l)),d=Math.floor(C(e,"height",u)),p=c*d*4,f=new Uint8Array(p);t.readPixels(r,u-o-d,c,d,t.RGBA,t.UNSIGNED_BYTE,f);for(var g=w.createWebGL(this,c,d),a=g.getContext("2d",{willReadFrequently:!0}),l=a.getImageData(0,0,c,d),m=l.data,v=0;v{t.exports={Canvas:i(32880),WebGL:i(88815)}},7530:(t,e,i)=>{var s=i(83419),v=i(36060),n=i(90330),y=i(82264),x=i(95540),T=i(32302),r=i(63448),o=i(31302),b=i(58918),w=i(14811),S=i(92651),a=i(96569),h=i(56527),l=i(57516),u=i(43439),c=i(81041),d=i(12385),p=i(7589),f=i(95428),g=i(72905),i=new s({initialize:function(t){this.game=t.game,this.renderer=t,this.classes=new n([[v.UTILITY_PIPELINE,p],[v.MULTI_PIPELINE,l],[v.BITMAPMASK_PIPELINE,o],[v.SINGLE_PIPELINE,d],[v.ROPE_PIPELINE,c],[v.LIGHT_PIPELINE,a],[v.POINTLIGHT_PIPELINE,u],[v.MOBILE_PIPELINE,h]]),this.postPipelineClasses=new n,this.pipelines=new n,this.postPipelineInstances=[],this.default=null,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.MOBILE_PIPELINE=null,this.FX_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderTargets=[],this.maxDimension=0,this.frameInc=32,this.targetIndex=0},boot:function(t,e,i){var s=this.renderer,n=this.renderTargets;this.frameInc=Math.floor(x(t,"frameInc",32));var r,o,a=s.width,h=s.height,l=this.game.config.disablePreFX;if(this.game.config.disablePostFX||this.postPipelineClasses.setAll([[String(w.BARREL),b.Barrel],[String(w.BLOOM),b.Bloom],[String(w.BLUR),b.Blur],[String(w.BOKEH),b.Bokeh],[String(w.CIRCLE),b.Circle],[String(w.COLOR_MATRIX),b.ColorMatrix],[String(w.DISPLACEMENT),b.Displacement],[String(w.GLOW),b.Glow],[String(w.GRADIENT),b.Gradient],[String(w.PIXELATE),b.Pixelate],[String(w.SHADOW),b.Shadow],[String(w.SHINE),b.Shine],[String(w.VIGNETTE),b.Vignette],[String(w.WIPE),b.Wipe]]),!l){this.classes.set(v.FX_PIPELINE,S);for(var u=Math.min(a,h),c=Math.ceil(u/this.frameInc),d=1;dthis.maxDimension?(this.targetIndex=e.length-3,e[this.targetIndex]):(t=3*(r(t,this.frameInc,0,!0)-1),e[this.targetIndex=t])},getSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+1]},getAltSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+2]},destroy:function(){this.flush(),this.classes.clear(),this.postPipelineClasses.clear(),this.pipelines.clear(),this.renderer=null,this.game=null,this.classes=null,this.postPipelineClasses=null,this.pipelines=null,this.default=null,this.current=null,this.previous=null}});t.exports=i},32302:(t,e,i)=>{var s=i(83419),l=i(92503),i=new s({initialize:function(t,e,i,s,n,r,o,a,h){void 0===s&&(s=1),void 0===n&&(n=0),void 0===r&&(r=!0),void 0===o&&(o=!1),void 0===a&&(a=!0),void 0===h&&(h=!0),this.renderer=t,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=s,this.minFilter=n,this.autoClear=r,this.autoResize=!0,this.hasDepthBuffer=a,this.forceClamp=h,this.init(e,i),o?this.renderer.on(l.RESIZE,this.resize,this):this.autoResize=!1},init:function(t,e){var i=this.renderer;this.texture=i.createTextureFromSource(null,t,e,this.minFilter,this.forceClamp),this.framebuffer=i.createFramebuffer(t,e,this.texture,this.hasDepthBuffer),this.width=t,this.height=e},setAutoResize:function(t){return t&&!this.autoResize?(this.renderer.on(l.RESIZE,this.resize,this),this.autoResize=!0):!t&&this.autoResize&&(this.renderer.off(l.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(t,e){var i;return this.autoResize&&this.willResize(t,e)&&((i=this.renderer).deleteFramebuffer(this.framebuffer),i.deleteTexture(this.texture),this.texture=i.createTextureFromSource(null,t,e,this.minFilter,this.forceClamp),this.framebuffer=i.createFramebuffer(t,e,this.texture,this.hasDepthBuffer),this.width=t,this.height=e),this},willResize:function(t,e){return"number"==typeof t&&"number"==typeof e&&(t=Math.round(t*this.scale),e=Math.round(e*this.scale),t=Math.max(t,1),e=Math.max(e,1),t!==this.width||e!==this.height)},bind:function(t,e,i){var s=this.renderer;(t=void 0===t?!1:t)&&s.flush(),e&&i&&this.resize(e,i),s.pushFramebuffer(this.framebuffer,!1,!1),t&&this.adjustViewport(),this.autoClear&&((e=this.renderer.gl).clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT)),s.clearStencilMask()},adjustViewport:function(){var t=this.renderer.gl;t.viewport(0,0,this.width,this.height),t.disable(t.SCISSOR_TEST)},clear:function(t,e,i,s){var n=this.renderer,r=n.gl;n.pushFramebuffer(this.framebuffer),void 0!==t&&void 0!==e&&void 0!==i&&void 0!==s?(r.enable(r.SCISSOR_TEST),r.scissor(t,e,i,s)):r.disable(r.SCISSOR_TEST),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),n.popFramebuffer(),n.resetScissor()},unbind:function(t){var e=this.renderer;return(t=void 0===t?!1:t)&&e.flush(),e.popFramebuffer()},destroy:function(){var t=this.renderer;t.off(l.RESIZE,this.resize,this),t.deleteFramebuffer(this.framebuffer),t.deleteTexture(this.texture),this.renderer=null,this.framebuffer=null,this.texture=null}});t.exports=i},70554:t=>{t.exports={getTintFromFloats:function(t,e,i,s){return((255&(255*s|0))<<24|(255&(255*t|0))<<16|(255&(255*e|0))<<8|255&(255*i|0))>>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},checkShaderMax:function(t,e){t=Math.min(16,t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS));return e&&-1!==e?Math.min(t,e):t},parseFragmentShaderMaxTextures:function(t,e){if(!t)return"";for(var i="",s=0;s{var s=i(83419),y=i(62644),n=i(50792),v=i(77085),x=i(95540),T=i(37867),b=i(92503),w=i(32302),S=i(70554),C=i(38683),i=new s({Extends:n,initialize:function(t){n.call(this);var e=t.game,i=e.renderer,s=i.gl;this.name=x(t,"name","WebGLPipeline"),this.game=e,this.renderer=i,this.manager,this.gl=s,this.view=e.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=x(t,"topology",s.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=x(t,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.isPreFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=t,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[],this.resizeUniform=x(t,"resizeUniform","")},boot:function(){var t=this.gl,e=this.config,i=this.renderer,s=(this.isPostFX||(this.projectionMatrix=(new T).identity()),this.renderTargets),n=x(e,"renderTarget",!1),r=i.width,o=i.height;if("number"==typeof(n="boolean"==typeof n?n&&1:n))for(g=0;gf&&(f=p[g].vertexSize);var m=x(e,"batchSize",i.config.batchSize),m=(this.vertexCapacity=6*m,new ArrayBuffer(this.vertexCapacity*f)),e=(this.vertexData=m,this.bytes=new Uint8Array(m),this.vertexViewF32=new Float32Array(m),this.vertexViewU32=new Uint32Array(m),x(e,"vertices",null));for(e?(this.vertexViewF32.set(e),this.vertexBuffer=i.createVertexBuffer(m,t.STATIC_DRAW)):this.vertexBuffer=i.createVertexBuffer(m.byteLength,t.DYNAMIC_DRAW),this.setVertexBuffer(),g=p.length-1;0<=g;g--)p[g].rebind();this.hasBooted=!0,i.on(b.RESIZE,this.resize,this),i.on(b.PRE_RENDER,this.onPreRender,this),i.on(b.RENDER,this.onRender,this),i.on(b.POST_RENDER,this.onPostRender,this),this.emit(v.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(t,e,i){var s=this.renderer;return t===this.currentShader&&s.currentProgram===this.currentShader.program||(this.flush(),this.setVertexBuffer(i)&&!e&&(e=!0),t.bind(e,!1),this.currentShader=t),this},getShaderByName:function(t){for(var e=this.shaders,i=0;ithis.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(t,e){t===this.width&&e===this.height||this.flush(),this.width=t,this.height=e;for(var i=this.renderTargets,s=0;s{var s=i(95428),n=i(72905),o=i(19715),r=i(83419),u=i(8054),a=i(50792),h=i(92503),c=i(50030),l=i(37867),d=i(29747),p=i(7530),f=i(32302),g=i(97480),m=i(69442),v=i(70554),y=i(88815),x=i(26128),T=i(1482),b=i(82751),w=i(84387),S=i(93567),C=i(57183),i=new r({Extends:a,initialize:function(t){a.call(this);var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!0,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference,preserveDrawingBuffer:e.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,roundPixels:e.roundPixels,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=u.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=t.canvas,this.blendModes=[],this.contextLost=!1,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.maxTextures=0,this.textureIndexes,this.glBufferWrappers=[],this.glProgramWrappers=[],this.glTextureWrappers=[],this.glFramebufferWrappers=[],this.glAttribLocationWrappers=[],this.glUniformLocationWrappers=[],this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=d,this.contextRestoredHandler=d,this.previousContextLostHandler=d,this.previousContextRestoredHandler=d,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats,this.compression,this.drawingBufferHeight=0,this.blankTexture=null,this.normalTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.maskSource=null,this.maskTarget=null,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(t){var e,i=this.game,s=this.canvas,n=t.backgroundColor;if(!(e=i.config.context||s.getContext("webgl",t.contextCreation)||s.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=e,this.setExtensions(),this.setContextHandlers(),i.context=e;for(var r=0;r<=27;r++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});return this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[e.ZERO,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_REVERSE_SUBTRACT},this.glFormats=[e.BYTE,e.SHORT,e.UNSIGNED_BYTE,e.UNSIGNED_SHORT,e.FLOAT],this.glFuncMap={mat2:{func:e.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:e.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:e.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:e.uniform1f,length:1},"1fv":{func:e.uniform1fv,length:1},"1i":{func:e.uniform1i,length:1},"1iv":{func:e.uniform1iv,length:1},"2f":{func:e.uniform2f,length:2},"2fv":{func:e.uniform2fv,length:1},"2i":{func:e.uniform2i,length:2},"2iv":{func:e.uniform2iv,length:1},"3f":{func:e.uniform3f,length:3},"3fv":{func:e.uniform3fv,length:1},"3i":{func:e.uniform3i,length:3},"3iv":{func:e.uniform3iv,length:1},"4f":{func:e.uniform4f,length:4},"4fv":{func:e.uniform4fv,length:1},"4i":{func:e.uniform4i,length:4},"4iv":{func:e.uniform4iv,length:1}},t.maxTextures&&-1!==t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(n.redGL,n.greenGL,n.blueGL,n.alphaGL),-1!==["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"].indexOf(t.mipmapFilter)&&(this.mipmapFilter=e[t.mipmapFilter]),this.maxTextures=v.checkShaderMax(e,t.maxTextures),this.textureIndexes=[],this.createTemporaryTextures(),this.pipelines=new p(this),this.setBlendMode(u.BlendModes.NORMAL),this.projectionMatrix=(new l).identity(),i.textures.once(m.READY,this.boot,this),this},boot:function(){var t=this.game,e=this.pipelines,i=t.scale.baseSize,s=i.width,i=i.height,n=(this.width=s,this.height=i,this.isBooted=!0,this.renderTarget=new f(this,s,i,1,0,!0,!0),this.maskTarget=new f(this,s,i,1,0,!0,!0),this.maskSource=new f(this,s,i,1,0,!0,!0),t.config),e=(e.boot(n.pipeline,n.defaultPipeline,n.autoMobilePipeline),this.blankTexture=t.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=t.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=t.textures.getFrame("__WHITE").glTexture,this.gl);e.bindFramebuffer(e.FRAMEBUFFER,null),e.enable(e.SCISSOR_TEST),t.scale.on(g.RESIZE,this.onResize,this),this.resize(s,i)},setExtensions:function(){var t=this.gl,e=t.getSupportedExtensions(),i=(this.supportedExtensions=e,"ANGLE_instanced_arrays"),i=(this.instancedArraysExtension=-1{var s=i(83419),n=i(95428),u=i(95540),c=i(14500),i=new s({initialize:function(t,e,i,s,n){this.pipeline=t,this.name=e,this.renderer=t.renderer,this.gl=this.renderer.gl,this.fragSrc=s,this.vertSrc=i,this.program=this.renderer.createProgram(i,s),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(n),this.createUniforms()},createAttributes:function(t){for(var e=0,i=0,s=[],n=this.vertexComponentCount=0;n{t.exports={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}}},4159:(t,e,i)=>{var s=i(14500),i=i(79291)(!1,{PipelineManager:i(7530),Pipelines:i(96615),RenderTarget:i(32302),Utils:i(70554),WebGLPipeline:i(29100),WebGLRenderer:i(74797),WebGLShader:i(38683),Wrappers:i(9503)},s);t.exports=i},31302:(t,e,i)=>{var s=i(83419),n=i(95540),r=i(78908),o=i(85191),a=i(14500),h=i(29100),i=new s({Extends:h,initialize:function(t){t.fragShader=n(t,"fragShader",r),t.vertShader=n(t,"vertShader",o),t.batchSize=n(t,"batchSize",1),t.vertices=n(t,"vertices",[-1,1,-1,-7,7,1]),t.attributes=n(t,"attributes",[{name:"inPosition",size:2,type:a.FLOAT}]),h.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(t,e){h.prototype.resize.call(this,t,e),this.set2f("uResolution",t,e)},beginMask:function(t,e,i){this.renderer.beginBitmapMask(t,i)},endMask:function(t,e,i){var s=this.gl,n=this.renderer,r=t.bitmapMask;r&&s&&(n.drawBitmapMask(r,e,this),i&&this.set2f("uResolution",i.width,i.height),this.set1i("uInvertMaskAlpha",t.invertAlpha),s.drawArrays(this.topology,0,3),i&&this.set2f("uResolution",this.width,this.height),s.bindTexture(s.TEXTURE_2D,null))}});t.exports=i},92651:(t,e,i)=>{var s=i(83419),n=i(58918),h=i(14811),l=i(95540),r=i(43558),o=i(89350),a=i(70554),i=new s({Extends:r,initialize:function(t){t.shaders=[a.setGlowQuality(o.FXGlowFrag,t.game),o.FXShadowFrag,o.FXPixelateFrag,o.FXVignetteFrag,o.FXShineFrag,o.FXBlurLowFrag,o.FXBlurMedFrag,o.FXBlurHighFrag,o.FXGradientFrag,o.FXBloomFrag,o.ColorMatrixFrag,o.FXCircleFrag,o.FXBarrelFrag,o.FXDisplacementFrag,o.FXWipeFrag,o.FXBokehFrag],r.call(this,t);t=this.game,this.glow=new n.Glow(t),this.shadow=new n.Shadow(t),this.pixelate=new n.Pixelate(t),this.vignette=new n.Vignette(t),this.shine=new n.Shine(t),this.gradient=new n.Gradient(t),this.circle=new n.Circle(t),this.barrel=new n.Barrel(t),this.wipe=new n.Wipe(t),this.bokeh=new n.Bokeh(t),t=[];t[h.GLOW]=this.onGlow,t[h.SHADOW]=this.onShadow,t[h.PIXELATE]=this.onPixelate,t[h.VIGNETTE]=this.onVignette,t[h.SHINE]=this.onShine,t[h.BLUR]=this.onBlur,t[h.GRADIENT]=this.onGradient,t[h.BLOOM]=this.onBloom,t[h.COLOR_MATRIX]=this.onColorMatrix,t[h.CIRCLE]=this.onCircle,t[h.BARREL]=this.onBarrel,t[h.DISPLACEMENT]=this.onDisplacement,t[h.WIPE]=this.onWipe,t[h.BOKEH]=this.onBokeh,this.fxHandlers=t,this.source,this.target,this.swap},onDraw:function(t,e,i){this.source=t,this.target=e,this.swap=i;var s=t.width,n=t.height,e=this.tempSprite,r=this.fxHandlers;if(e&&e.preFX)for(var o=e.preFX.list,a=0;a{var s=i(83419),n=i(95540),r=i(31063),O=i(57516),o=i(61340),a=i(26099),h=i(29100),i=new s({Extends:O,initialize:function(t){var e=n(t,"fragShader",r);t.fragShader=e.replace("%LIGHT_COUNT%",t.game.renderer.config.maxLights),O.call(this,t),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.currentNormalMap,this.lightsActive=!0,this.tempVec2=new a,this._tempMatrix=new o,this._tempMatrix2=new o},boot:function(){h.prototype.boot.call(this)},onRender:function(t,e){t=t.sys.lights;if(this.lightsActive=!1,t&&t.active){var i,s=t.getLights(e),n=s.length,r=(this.lightsActive=!0,this.renderer.height),o=e.matrix,a=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",e.x,e.y,e.rotation,e.zoom),this.set3f("uAmbientLightColor",t.ambientColor.r,t.ambientColor.g,t.ambientColor.b),this.set1i("uLightCount",n),i=0;i{var s=i(83419),n=i(95540),r=i(57516),o=i(45561),a=i(60722),h=i(14500),l=i(29100),i=new s({Extends:r,initialize:function(t){t.fragShader=n(t,"fragShader",o),t.vertShader=n(t,"vertShader",a),t.attributes=n(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:h.UNSIGNED_BYTE,normalized:!0}]),t.forceZero=!0,t.resizeUniform="uResolution",r.call(this,t)},boot:function(){l.prototype.boot.call(this);var t=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",t.width,t.height)}});t.exports=i},57516:(t,e,i)=>{var s=i(83419),T=i(94811),n=i(95540),r=i(98840),o=i(44667),a=i(61340),b=i(70554),h=i(14500),l=i(29100),i=new s({Extends:l,initialize:function(t){var e=t.game.renderer,i=n(t,"fragShader",r);t.fragShader=b.parseFragmentShaderMaxTextures(i,e.maxTextures),t.vertShader=n(t,"vertShader",o),t.attributes=n(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:h.UNSIGNED_BYTE,normalized:!0}]),t.resizeUniform="uResolution",l.call(this,t),this._tempMatrix1=new a,this._tempMatrix2=new a,this._tempMatrix3=new a,this.calcMatrix=new a,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){l.prototype.boot.call(this);var t=this.renderer;this.set1iv("uMainSampler",t.textureIndexes),this.set2f("uResolution",t.width,t.height)},batchSprite:function(t,e,i){this.manager.set(this,t);var s=this._tempMatrix1,n=this._tempMatrix2,r=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,l=o.v0,u=o.u1,c=o.v1,d=o.cutWidth,p=o.cutHeight,f=o.customPivot,g=t.displayOriginX,m=t.displayOriginY,v=-g+o.x,y=-m+o.y,x=(t.isCropped&&((x=t._crop).flipX===t.flipX&&x.flipY===t.flipY||o.updateCropUVs(x,t.flipX,t.flipY),h=x.u0,l=x.v0,u=x.u1,c=x.v1,d=x.width,p=x.height,v=-g+x.x,y=-m+x.y),1),T=1,g=(t.flipX&&(f||(v+=-o.realWidth+2*g),x=-1),t.flipY&&(f||(y+=-o.realHeight+2*m),T=-1),t.x),f=t.y,m=(e.roundPixels&&(g=Math.floor(g),f=Math.floor(f)),n.applyITRS(g,f,t.rotation,t.scaleX*x,t.scaleY*T),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),n.e=g,n.f=f):(n.e-=e.scrollX*t.scrollFactorX,n.f-=e.scrollY*t.scrollFactorY),s.multiply(n,r),r.setQuad(v,y,v+d,y+p,e.renderRoundPixels)),x=b.getTintAppendFloatAlpha,T=e.alpha,i=x(t.tintTopLeft,T*t._alphaTL),g=x(t.tintTopRight,T*t._alphaTR),f=x(t.tintBottomLeft,T*t._alphaBL),s=x(t.tintBottomRight,T*t._alphaBR),n=(this.shouldFlush(6)&&this.flush(),this.setGameObject(t,o));this.manager.preBatch(t),this.batchQuad(t,m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],h,l,u,c,i,g,f,s,t.tintFill,a,n),this.manager.postBatch(t)},batchTexture:function(t,e,i,s,n,r,o,a,B,I,N,h,l,u,c,d,p,f,g,m,v,G,U,X,Y,z,y,x,T,b,W,w,S){void 0===S&&(S=!1),this.manager.set(this,t);var C,E,_,A,P,M=this._tempMatrix1,R=this._tempMatrix2,L=this._tempMatrix3,H=f/i+y,V=g/s+x,j=(f+m)/i+y,Z=(g+v)/s+x,O=o,D=a,k=-d,F=-p,m=(t.isCropped&&(E=(C=t._crop).width,_=C.height,A=f=C.x,P=g=C.y,H=(A=h?m-C.x-E:A)/i+y,V=(P=l?v-C.y-_:P)/s+x,j=(A+(o=O=E))/i+y,Z=(P+(a=D=_))/s+x,k=-d+f,F=-p+g),h&&(O*=-1,k+=o),(l^=!W&&e.isRenderTexture?1:0)&&(D*=-1,F+=a),T.roundPixels&&(n=Math.floor(n),r=Math.floor(r)),R.applyITRS(n,r,N,B,I),M.copyFrom(T.matrix),b?(M.multiplyWithOffset(b,-T.scrollX*u,-T.scrollY*c),R.e=n,R.f=r):(R.e-=T.scrollX*u,R.f-=T.scrollY*c),M.multiply(R,L),L.setQuad(k,F,k+O,F+D,T.renderRoundPixels));null==w&&(w=this.setTexture2D(e)),t&&!S&&this.manager.preBatch(t),this.batchQuad(t,m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],H,V,j,Z,G,U,X,Y,z,e,w),t&&!S&&this.manager.postBatch(t)},batchTextureFrame:function(t,e,i,s,n,r,o){this.manager.set(this);var r=this._tempMatrix1.copyFrom(r),a=this._tempMatrix2,o=(o?r.multiply(o,a):a=r,a.setQuad(e,i,e+t.width,i+t.height)),r=this.setTexture2D(t.source.glTexture);s=b.getTintAppendFloatAlpha(s,n),this.batchQuad(null,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],t.u0,t.v0,t.u1,t.v1,s,s,s,s,0,t.glTexture,r)},batchFillRect:function(t,e,i,s,n,r){this.renderer.pipelines.set(this);var o=this.calcMatrix,r=(r&&r.multiply(n,o),o.setQuad(t,e,t+i,e+s)),n=this.fillTint;this.batchQuad(null,r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],0,0,1,1,n.TL,n.TR,n.BL,n.BR,2)},batchFillTriangle:function(t,e,i,s,n,r,o,a){this.renderer.pipelines.set(this);var h=this.calcMatrix,a=(a&&a.multiply(o,h),h.getX(t,e)),o=h.getY(t,e),t=h.getX(i,s),e=h.getY(i,s),i=h.getX(n,r),s=h.getY(n,r),h=this.fillTint;this.batchTri(null,a,o,t,e,i,s,0,0,1,1,h.TL,h.TR,h.BL,2)},batchStrokeTriangle:function(t,e,i,s,n,r,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=s,l[1].width=o,l[2].x=n,l[2].y=r,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.pipelines.set(this);var s=this.calcMatrix;i&&i.multiply(e,s);for(var n,r,o=t.length,a=this.polygonCache,h=this.fillTint.TL,l=this.fillTint.TR,u=this.fillTint.BL,c=0;c{var s=i(83419),n=i(95540),r=i(4127),o=i(89924),a=i(29100),i=new s({Extends:a,initialize:function(t){t.vertShader=n(t,"vertShader",o),t.fragShader=n(t,"fragShader",r),t.attributes=n(t,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),a.call(this,t)},onRender:function(t,e){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",e.zoom)},batchPointLight:function(t,e,i,s,n,r,o,a,h,l,u,c){var d=t.color,p=t.intensity,f=t.radius,g=t.attenuation,m=d.r*p,v=d.g*p,d=d.b*p,p=e.alpha*t.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(i,s,u,c,f,g,m,v,d,p),this.batchLightVert(n,r,u,c,f,g,m,v,d,p),this.batchLightVert(o,a,u,c,f,g,m,v,d,p),this.batchLightVert(i,s,u,c,f,g,m,v,d,p),this.batchLightVert(o,a,u,c,f,g,m,v,d,p),this.batchLightVert(h,l,u,c,f,g,m,v,d,p),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(t,e,i,s,n,r,o,a,h,l){var u=this.vertexViewF32,c=this.vertexCount*this.currentShader.vertexComponentCount-1;u[++c]=t,u[++c]=e,u[++c]=i,u[++c]=s,u[++c]=n,u[++c]=r,u[++c]=o,u[++c]=a,u[++c]=h,u[++c]=l,this.vertexCount++}});t.exports=i},84057:(t,e,i)=>{var s=i(83419),n=i(89422),r=i(95540),o=i(27681),a=i(49627),h=i(29100),i=new s({Extends:h,initialize:function(t){t.renderTarget=r(t,"renderTarget",1),t.fragShader=r(t,"fragShader",o),t.vertShader=r(t,"vertShader",a),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.batchSize=1,t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],h.call(this,t),this.isPostFX=!0,this.gameObject,this.controller,this.colorMatrix=new n,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines)},bootFX:function(){h.prototype.boot.call(this);var t=this.manager.UTILITY_PIPELINE,t=(this.fullFrame1=t.fullFrame1,this.fullFrame2=t.fullFrame2,this.halfFrame1=t.halfFrame1,this.halfFrame2=t.halfFrame2,this.renderer);this.set1i("uMainSampler",0),this.set2f("uResolution",t.width,t.height);for(var e=this.renderTargets,i=0;i{var c=i(10312),C=i(67502),s=i(83419),n=i(96293),r=i(95540),o=i(57516),a=i(27681),h=i(87841),l=i(32302),u=i(45561),d=i(60722),p=i(29100),i=new s({Extends:o,initialize:function(t){var e=r(t,"fragShader",a),i=r(t,"vertShader",d),s=r(t,"drawShader",a),e=[{name:"DrawSprite",fragShader:u,vertShader:d},{name:"CopySprite",fragShader:e,vertShader:i},{name:"DrawGame",fragShader:s,vertShader:d},{name:"ColorMatrix",fragShader:n}],s=r(t,"shaders",[]);t.shaders=e.concat(s),t.vertShader||(t.vertShader=i),t.batchSize=1,o.call(this,t),this.isPreFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.colorMatrixShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new h,this.targetBounds=new h,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){p.prototype.boot.call(this);var t=this.shaders,e=this.renderer,t=(this.drawSpriteShader=t[0],this.copyShader=t[1],this.gameShader=t[2],this.colorMatrixShader=t[3],this.fsTarget=new l(e,e.width,e.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget),new ArrayBuffer(168));this.quadVertexData=t,this.quadVertexViewF32=new Float32Array(t),this.quadVertexBuffer=e.createVertexBuffer(t,this.gl.STATIC_DRAW),this.onResize(e.width,e.height),this.currentShader=this.copyShader,this.set2f("uResolution",e.width,e.height)},onResize:function(t,e){var i=this.quadVertexViewF32;i[1]=e,i[22]=e,i[14]=t,i[28]=t,i[35]=t,i[36]=e},batchQuad:function(t,e,i,s,n,r,o,a,h,l,u,c,d,p,f,g,m,v,y){var x=Math.min(e,s,r,a),T=Math.min(i,n,o,h),b=Math.max(e,s,r,a)-x,w=Math.max(i,n,o,h)-T,x=this.spriteBounds.setTo(x,T,b,w),T=t?t.preFX.padding:0,b=Math.abs(Math.max(b+2*T,w+2*T)),w=this.manager.getRenderTarget(b),T=this.targetBounds.setTo(0,0,w.width,w.height),b=(C(T,Math.round(x.centerX),Math.round(x.centerY)),this.tempSprite=t,this.gl),x=this.renderer,S=(x.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.set2f("uResolution",x.width,x.height),this.flipProjectionMatrix(!0),t&&(this.onDrawSprite(t,w),t.preFX.onFX(this)),this.fsTarget);return this.flush(),b.viewport(0,0,x.width,x.height),b.bindFramebuffer(b.FRAMEBUFFER,S.framebuffer.webGLFramebuffer),b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,S.texture.webGLTexture,0),b.clearColor(0,0,0,0),b.clear(b.COLOR_BUFFER_BIT),this.setTexture2D(y),this.batchVert(e,i,l,u,0,v,p),this.batchVert(s,n,l,d,0,v,g),this.batchVert(r,o,c,d,0,v,m),this.batchVert(e,i,l,u,0,v,p),this.batchVert(r,o,c,d,0,v,m),this.batchVert(a,h,c,u,0,v,f),this.flush(),this.flipProjectionMatrix(!1),b.activeTexture(b.TEXTURE0),b.bindTexture(b.TEXTURE_2D,w.texture.webGLTexture),b.copyTexSubImage2D(b.TEXTURE_2D,0,0,0,T.x,T.y,T.width,T.height),b.bindFramebuffer(b.FRAMEBUFFER,null),b.bindTexture(b.TEXTURE_2D,null),this.onBatch(t),this.currentShader=this.copyShader,this.onDraw(w,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(t,e,i,s,n,r,o){void 0===i&&(i=!0),void 0===s&&(s=!0),void 0===n&&(n=!1),void 0===o&&(o=this.copyShader);var a,h=this.gl,l=this.tempSprite,u=(r&&(o=this.colorMatrixShader),this.currentShader=o,this.setVertexBuffer(this.quadVertexBuffer)),o=(o.bind(u,!1),this.renderer);this.set1i("uMainSampler",0),this.set2f("uResolution",o.width,o.height),l.preFX.onFXCopy(this),this.onCopySprite(t,e,l),r&&(this.set1fv("uColorMatrix",r.getData()),this.set1f("uAlpha",r.alpha)),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,t.texture.webGLTexture),t.height>e.height?(h.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e)):(u=e.height-t.height,h.viewport(0,u,t.width,t.height),this.resetUVs()),h.bindFramebuffer(h.FRAMEBUFFER,e.framebuffer.webGLFramebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,e.texture.webGLTexture,0),i&&(h.clearColor(0,0,0,Number(!s)),h.clear(h.COLOR_BUFFER_BIT)),n&&(a=this.renderer.currentBlendMode,this.renderer.setBlendMode(c.ERASE)),h.bufferData(h.ARRAY_BUFFER,this.quadVertexData,h.STATIC_DRAW),h.drawArrays(h.TRIANGLES,0,6),n&&this.renderer.setBlendMode(a),h.bindFramebuffer(h.FRAMEBUFFER,null)},copy:function(t,e){var i=this.gl;this.set1i("uMainSampler",0),i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,t.texture.webGLTexture),i.viewport(0,0,t.width,t.height),this.setUVs(0,0,0,1,1,1,1,0),i.bindFramebuffer(i.FRAMEBUFFER,e.framebuffer.webGLFramebuffer),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,e.texture.webGLTexture,0),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.bufferData(i.ARRAY_BUFFER,this.quadVertexData,i.STATIC_DRAW),i.drawArrays(i.TRIANGLES,0,6),i.bindFramebuffer(i.FRAMEBUFFER,null)},blendFrames:function(t,e,i,s,n){this.manager.blendFrames(t,e,i,s,n)},blendFramesAdditive:function(t,e,i,s,n){this.manager.blendFramesAdditive(t,e,i,s,n)},drawToGame:function(t){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(t)},copyToGame:function(t){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(t)},bindAndDraw:function(t){var e=this.gl,i=this.renderer,s=(this.set1i("uMainSampler",0),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(t.texture),this._tempMatrix1.loadIdentity()),n=this.targetBounds.x,r=this.targetBounds.y,o=n+t.width,t=r+t.height,a=s.getX(n,r),h=s.getX(n,t),l=s.getX(o,t),u=s.getX(o,r),c=s.getY(n,r),n=s.getY(n,t),t=s.getY(o,t),s=s.getY(o,r),o=16777215;this.batchVert(a,c,0,0,0,0,o),this.batchVert(h,n,0,1,0,0,o),this.batchVert(l,t,1,1,0,0,o),this.batchVert(a,c,0,0,0,0,o),this.batchVert(l,t,1,1,0,0,o),this.batchVert(u,s,1,0,0,0,o),i.restoreFramebuffer(!1,!0),i.currentFramebuffer||e.viewport(0,0,i.width,i.height),i.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(t){this.drawToGame(t)},setUVs:function(t,e,i,s,n,r,o,a){var h=this.quadVertexViewF32;h[2]=t,h[3]=e,h[9]=i,h[10]=s,h[16]=n,h[17]=r,h[23]=t,h[24]=e,h[30]=n,h[31]=r,h[37]=o,h[38]=a},setTargetUVs:function(t,e){e=e.height/t.height;this.setUVs(0,e=.5{var s=i(83419),n=i(95540),r=i(57516),i=new s({Extends:r,initialize:function(t){t.topology=5,t.batchSize=n(t,"batchSize",256),r.call(this,t)}});t.exports=i},12385:(t,e,i)=>{var s=i(83419),n=i(95540),r=i(57516),o=i(45561),a=i(60722),h=i(29100),i=new s({Extends:r,initialize:function(t){t.fragShader=n(t,"fragShader",o),t.vertShader=n(t,"vertShader",a),t.forceZero=!0,r.call(this,t)},boot:function(){h.prototype.boot.call(this);var t=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",t.width,t.height)}});t.exports=i},7589:(t,e,i)=>{var s=i(35407),l=i(10312),n=i(83419),r=i(89422),o=i(96293),a=i(36682),h=i(95540),u=i(48247),c=i(49627),d=i(29100),i=new n({Extends:d,initialize:function(t){t.renderTarget=h(t,"renderTarget",[{scale:1,autoResize:!0},{scale:1,autoResize:!0},{scale:.5,autoResize:!0},{scale:.5,autoResize:!0}]),t.vertShader=h(t,"vertShader",c),t.shaders=h(t,"shaders",[{name:"Copy",fragShader:a},{name:"AddBlend",fragShader:s},{name:"LinearBlend",fragShader:u},{name:"ColorMatrix",fragShader:o}]),t.attributes=h(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],t.batchSize=1,d.call(this,t),this.colorMatrix=new r,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){d.prototype.boot.call(this);var t=this.shaders,e=this.renderTargets;this.copyShader=t[0],this.addShader=t[1],this.linearShader=t[2],this.colorMatrixShader=t[3],this.fullFrame1=e[0],this.fullFrame2=e[1],this.halfFrame1=e[2],this.halfFrame2=e[3]},copyFrame:function(t,e,i,s,n){void 0===i&&(i=1),void 0===s&&(s=!0),void 0===n&&(n=!0);var r=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,t.texture.webGLTexture),e?(r.viewport(0,0,e.width,e.height),r.bindFramebuffer(r.FRAMEBUFFER,e.framebuffer.webGLFramebuffer),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.texture.webGLTexture,0)):r.viewport(0,0,t.width,t.height),s&&(n?r.clearColor(0,0,0,0):r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT)),r.bufferData(r.ARRAY_BUFFER,this.vertexData,r.STATIC_DRAW),r.drawArrays(r.TRIANGLES,0,6),r.bindFramebuffer(r.FRAMEBUFFER,null),r.bindTexture(r.TEXTURE_2D,null)},blitFrame:function(t,e,i,s,n,r,o){void 0===i&&(i=1),void 0===s&&(s=!0),void 0===n&&(n=!0),void 0===r&&(r=!1),void 0===o&&(o=!1);var a,h=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,t.texture.webGLTexture),t.height>e.height?(h.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e)):(i=e.height-t.height,h.viewport(0,i,t.width,t.height)),h.bindFramebuffer(h.FRAMEBUFFER,e.framebuffer.webGLFramebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,e.texture.webGLTexture,0),s&&(n?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),r&&(a=this.renderer.currentBlendMode,this.renderer.setBlendMode(l.ERASE)),o&&this.flipY(),h.bufferData(h.ARRAY_BUFFER,this.vertexData,h.STATIC_DRAW),h.drawArrays(h.TRIANGLES,0,6),r&&this.renderer.setBlendMode(a),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(t,e,i,s,n,r,o,a){void 0===o&&(o=!0),void 0===a&&(a=!0);var h=this.gl;h.bindFramebuffer(h.FRAMEBUFFER,t.framebuffer.webGLFramebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,t.texture.webGLTexture,0),o&&(a?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,e.texture.webGLTexture),h.copyTexSubImage2D(h.TEXTURE_2D,0,0,0,i,s,n,r),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null)},copyToGame:function(t){var e=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,t.texture.webGLTexture),e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.STATIC_DRAW),e.drawArrays(e.TRIANGLES,0,6)},drawFrame:function(t,e,i,s){void 0===i&&(i=!0),void 0===s&&(s=this.colorMatrix);var n=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",s.getData()),this.set1f("uAlpha",s.alpha),n.activeTexture(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,t.texture.webGLTexture),e?(n.viewport(0,0,e.width,e.height),n.bindFramebuffer(n.FRAMEBUFFER,e.framebuffer.webGLFramebuffer),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e.texture.webGLTexture,0)):n.viewport(0,0,t.width,t.height),i?n.clearColor(0,0,0,0):n.clearColor(0,0,0,1),n.clear(n.COLOR_BUFFER_BIT),n.bufferData(n.ARRAY_BUFFER,this.vertexData,n.STATIC_DRAW),n.drawArrays(n.TRIANGLES,0,6),n.bindFramebuffer(n.FRAMEBUFFER,null),n.bindTexture(n.TEXTURE_2D,null)},blendFrames:function(t,e,i,s,n,r){void 0===s&&(s=1),void 0===n&&(n=!0),void 0===r&&(r=this.linearShader);var o=this.gl;this.setShader(r),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",s),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,t.texture.webGLTexture),o.activeTexture(o.TEXTURE1),o.bindTexture(o.TEXTURE_2D,e.texture.webGLTexture),i?(o.bindFramebuffer(o.FRAMEBUFFER,i.framebuffer.webGLFramebuffer),o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,i.texture.webGLTexture,0),o.viewport(0,0,i.width,i.height)):o.viewport(0,0,t.width,t.height),n?o.clearColor(0,0,0,0):o.clearColor(0,0,0,1),o.clear(o.COLOR_BUFFER_BIT),o.bufferData(o.ARRAY_BUFFER,this.vertexData,o.STATIC_DRAW),o.drawArrays(o.TRIANGLES,0,6),o.bindFramebuffer(o.FRAMEBUFFER,null),o.bindTexture(o.TEXTURE_2D,null)},blendFramesAdditive:function(t,e,i,s,n){this.blendFrames(t,e,i,s,n,this.addShader)},clearFrame:function(t,e){void 0===e&&(e=!0);var i=this.gl,t=(i.viewport(0,0,t.width,t.height),i.bindFramebuffer(i.FRAMEBUFFER,t.framebuffer.webGLFramebuffer),e?i.clearColor(0,0,0,0):i.clearColor(0,0,0,1),i.clear(i.COLOR_BUFFER_BIT),this.renderer.currentFramebuffer);i.bindFramebuffer(i.FRAMEBUFFER,t.webGLFramebuffer)},setUVs:function(t,e,i,s,n,r,o,a){var h=this.vertexViewF32;h[2]=t,h[3]=e,h[6]=i,h[7]=s,h[10]=n,h[11]=r,h[14]=t,h[15]=e,h[18]=n,h[19]=r,h[22]=o,h[23]=a},setTargetUVs:function(t,e){e=e.height/t.height;this.setUVs(0,e=.5{t.exports={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline",MOBILE_PIPELINE:"MobilePipeline",FX_PIPELINE:"FxPipeline"}},84817:t=>{t.exports="pipelineafterflush"},36712:t=>{t.exports="pipelinebeforeflush"},40285:t=>{t.exports="pipelinebind"},65918:t=>{t.exports="pipelineboot"},92852:t=>{t.exports="pipelinedestroy"},56072:t=>{t.exports="pipelinerebind"},57566:t=>{t.exports="pipelineresize"},77085:(t,e,i)=>{t.exports={AFTER_FLUSH:i(84817),BEFORE_FLUSH:i(36712),BIND:i(40285),BOOT:i(65918),DESTROY:i(92852),REBIND:i(56072),RESIZE:i(57566)}},54812:(t,e,i)=>{var s=i(83419),n=i(99155),r=i(84057),i=new s({Extends:r,initialize:function(t){r.call(this,{game:t,fragShader:n}),this.amount=1},onPreRender:function(t,e){t=this.getController(t),this.set1f("amount",t.amount,e)}});t.exports=i},67329:(t,e,i)=>{var s=i(83419),n=i(24400),r=i(84057),i=new s({Extends:r,initialize:function(t){r.call(this,{game:t,fragShader:n}),this.steps=4,this.offsetX=1,this.offsetY=1,this.blurStrength=1,this.strength=1,this.glcolor=[1,1,1]},onPreRender:function(t){t=this.getController(t),this.set1f("strength",t.blurStrength),this.set3fv("color",t.glcolor)},onDraw:function(t){var e=this.getController(),i=this.fullFrame1,s=this.fullFrame2;this.copyFrame(t,s);for(var n=2/t.width*e.offsetX,r=2/t.height*e.offsetY,o=0;o{var s=i(83419),n=i(41514),r=i(51078),o=i(94328),a=i(84057),i=new s({Extends:a,initialize:function(t){a.call(this,{game:t,shaders:[{name:"Gaussian5",fragShader:n},{name:"Gaussian9",fragShader:r},{name:"Gaussian13",fragShader:o}]}),this.activeShader=this.shaders[0],this.x=2,this.y=2,this.steps=4,this.strength=1,this.glcolor=[1,1,1]},setQualityLow:function(){return this.activeShader=this.shaders[0],this},setQualityMedium:function(){return this.activeShader=this.shaders[1],this},setQualityHigh:function(){return this.activeShader=this.shaders[2],this},onDraw:function(t){var e=this.getController(),i=this.gl,s=this.fullFrame1,n=i.getParameter(i.FRAMEBUFFER_BINDING);this.bind(this.shaders[e.quality]),i.activeTexture(i.TEXTURE0),i.viewport(0,0,t.width,t.height),this.set1i("uMainSampler",0),this.set2f("resolution",t.width,t.height),this.set1f("strength",e.strength),this.set3fv("color",e.glcolor);for(var r=0;r{var s=i(83419),n=i(90610),r=i(84057),i=new s({Extends:r,initialize:function(t){r.call(this,{game:t,fragShader:n}),this.isTiltShift=!1,this.strength=1,this.blurX=1,this.blurY=1,this.radius=.5,this.amount=1,this.contrast=.2},onPreRender:function(t,e,i,s){t=this.getController(t),this.set1f("radius",t.radius,e),this.set1f("amount",t.amount,e),this.set1f("contrast",t.contrast,e),this.set1f("strength",t.strength,e),this.set2f("blur",t.blurX,t.blurY,e),this.setBoolean("isTiltShift",t.isTiltShift,e),i&&s&&this.set2f("resolution",i,s,e)},onDraw:function(t){this.set2f("resolution",t.width,t.height),this.bindAndDraw(t)}});t.exports=i},89428:(t,e,i)=>{var s=i(83419),n=i(91899),r=i(84057),i=new s({Extends:r,initialize:function(t){r.call(this,{game:t,fragShader:n}),this.scale=1,this.feather=.005,this.thickness=8,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4]},onPreRender:function(t,e,i,s){t=this.getController(t),this.set1f("scale",t.scale,e),this.set1f("feather",t.feather,e),this.set1f("thickness",t.thickness,e),this.set3fv("color",t.glcolor,e),this.set4fv("backgroundColor",t.glcolor2,e),i&&s&&this.set2f("resolution",i,s,e)},onDraw:function(t){this.set2f("resolution",t.width,t.height),this.bindAndDraw(t)}});t.exports=i},88904:(t,e,i)=>{var s=i(83419),n=i(84057),i=new s({Extends:n,initialize:function(t){n.call(this,{game:t})},onDraw:function(t){var e=this.fullFrame1;this.controller?this.manager.drawFrame(t,e,!0,this.controller):this.drawFrame(t,e),this.copyToGame(e)}});t.exports=i},63563:(t,e,i)=>{var s=i(83419),n=i(47838),r=i(84057),i=new s({Extends:r,initialize:function(t){r.call(this,{game:t,fragShader:n}),this.x=.005,this.y=.005,this.glTexture},onBoot:function(){this.setTexture("__WHITE")},setTexture:function(t){t=this.game.textures.getFrame(t);t&&(this.glTexture=t.glTexture)},onDraw:function(t){var e=this.getController(),i=this.fullFrame1;this.bind(),this.set1i("uMainSampler",0),this.set1i("uDisplacementSampler",1),this.set2f("amount",e.x,e.y),this.bindTexture(e.glTexture,1),this.copySprite(t,i),this.copyToGame(i)}});t.exports=i},94045:(t,e,i)=>{var s=i(83419),n=i(95540),r=i(98656),o=i(84057),a=i(70554),i=new s({Extends:o,initialize:function(t,e){var i=n(e,"quality",.1),e=n(e,"distance",10);o.call(this,{game:t,fragShader:a.setGlowQuality(r,t,i,e)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(t,e,i,s){t=this.getController(t),this.set1f("outerStrength",t.outerStrength,e),this.set1f("innerStrength",t.innerStrength,e),this.set4fv("glowColor",t.glcolor,e),this.setBoolean("knockout",t.knockout,e),i&&s&&this.set2f("resolution",i,s,e)},onDraw:function(t){this.set2f("resolution",t.width,t.height),this.bindAndDraw(t)}});t.exports=i},74088:(t,e,i)=>{var s=i(83419),n=i(70463),r=i(84057),i=new s({Extends:r,initialize:function(t){r.call(this,{game:t,fragShader:n}),this.alpha=.2,this.size=0,this.fromX=0,this.fromY=0,this.toX=0,this.toY=1,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0]},onPreRender:function(t,e){t=this.getController(t),this.set1f("alpha",t.alpha,e),this.set1i("size",t.size,e),this.set3fv("color1",t.glcolor1,e),this.set3fv("color2",t.glcolor2,e),this.set2f("positionFrom",t.fromX,t.fromY,e),this.set2f("positionTo",t.toX,t.toY,e)}});t.exports=i},99636:(t,e,i)=>{var s=i(83419),n=i(50831),r=i(84057),i=new s({Extends:r,initialize:function(t){r.call(this,{game:t,fragShader:n}),this.amount=1},onPreRender:function(t,e,i,s){t=this.getController(t),this.set1f("amount",t.amount,e),i&&s&&this.set2f("resolution",i,s,e)},onDraw:function(t){this.set2f("resolution",t.width,t.height),this.bindAndDraw(t)}});t.exports=i},34700:(t,e,i)=>{var s=i(83419),n=i(92595),r=i(84057),i=new s({Extends:r,initialize:function(t){r.call(this,{game:t,fragShader:n}),this.x=0,this.y=0,this.decay=.1,this.power=1,this.glcolor=[0,0,0,1],this.samples=6,this.intensity=1},onPreRender:function(t,e){var i=(t=this.getController(t)).samples;this.set1i("samples",i,e),this.set1f("intensity",t.intensity,e),this.set1f("decay",t.decay,e),this.set1f("power",t.power/i,e),this.set2f("lightPosition",t.x,t.y,e),this.set4fv("color",t.glcolor,e)}});t.exports=i},91157:(t,e,i)=>{var s=i(83419),n=i(72464),r=i(84057),i=new s({Extends:r,initialize:function(t){r.call(this,{game:t,fragShader:n}),this.speed=.5,this.lineWidth=.5,this.gradient=3,this.reveal=!1},onPreRender:function(t,e,i,s){t=this.getController(t),this.setTime("time",e),this.set1f("speed",t.speed,e),this.set1f("lineWidth",t.lineWidth,e),this.set1f("gradient",t.gradient,e),this.setBoolean("reveal",t.reveal,e),i&&s&&this.set2f("resolution",i,s,e)},onDraw:function(t){this.set2f("resolution",t.width,t.height),this.bindAndDraw(t)}});t.exports=i},27797:(t,e,i)=>{var s=i(83419),n=i(39249),r=i(84057),i=new s({Extends:r,initialize:function(t){r.call(this,{game:t,fragShader:n}),this.x=.5,this.y=.5,this.radius=.5,this.strength=.5},onPreRender:function(t,e){t=this.getController(t),this.set1f("radius",t.radius,e),this.set1f("strength",t.strength,e),this.set2f("position",t.x,t.y,e)}});t.exports=i},67603:(t,e,i)=>{var s=i(83419),n=i(2878),r=i(84057),i=new s({Extends:r,initialize:function(t){r.call(this,{game:t,fragShader:n}),this.progress=0,this.wipeWidth=.1,this.direction=0,this.axis=0,this.reveal=!1},onPreRender:function(t,e){var i=(t=this.getController(t)).progress;this.set4f("config",i,t.wipeWidth,t.direction,t.axis,e),this.setBoolean("reveal",t.reveal,e)}});t.exports=i},58918:(t,e,i)=>{i={Barrel:i(54812),Bloom:i(67329),Blur:i(8861),Bokeh:i(51051),Circle:i(89428),ColorMatrix:i(88904),Displacement:i(63563),Glow:i(94045),Gradient:i(74088),Pixelate:i(99636),Shadow:i(34700),Shine:i(91157),Vignette:i(27797),Wipe:i(67603)};t.exports=i},96615:(t,e,i)=>{var s=i(36060),i=i(79291)(!1,{FX:i(58918),BitmapMaskPipeline:i(31302),Events:i(77085),FXPipeline:i(92651),LightPipeline:i(96569),MobilePipeline:i(56527),MultiPipeline:i(57516),PointLightPipeline:i(43439),PostFXPipeline:i(84057),PreFXPipeline:i(43558),RopePipeline:i(81041),SinglePipeline:i(12385),UtilityPipeline:i(7589)},s);t.exports=i},35407:t=>{t.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = frame1 + frame2 * uStrength;","}"].join("\n")},78908:t=>{t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","precision mediump float;","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," if (!uInvertMaskAlpha)"," {"," mainColor *= maskColor.a;"," }"," else"," {"," mainColor *= (1.0 - maskColor.a);"," }"," gl_FragColor = mainColor;","}"].join("\n")},85191:t=>{t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","precision mediump float;","attribute vec2 inPosition;","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}"].join("\n")},96293:t=>{t.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","varying vec2 outTexCoord;","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);"," if (uAlpha == 0.0)"," {"," gl_FragColor = c;"," return;"," }"," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }"," vec4 result;"," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];"," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);"," rgb *= result.a;"," gl_FragColor = vec4(rgb, result.a);","}"].join("\n")},36682:t=>{t.exports=["#define SHADER_NAME PHASER_COPY_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uBrightness;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}"].join("\n")},99155:t=>{t.exports=["#define SHADER_NAME BARREL_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float amount;","varying vec2 outTexCoord;","vec2 Distort(vec2 p)","{"," float theta = atan(p.y, p.x);"," float radius = length(p);"," radius = pow(radius, amount);"," p.x = radius * cos(theta);"," p.y = radius * sin(theta);"," return 0.5 * (p + 1.0);","}","void main()","{"," vec2 xy = 2.0 * outTexCoord - 1.0;"," vec2 texCoord = outTexCoord;"," if (length(xy) < 1.0)"," {"," texCoord = Distort(xy);"," }"," gl_FragColor = texture2D(uMainSampler, texCoord);","}"].join("\n")},24400:t=>{t.exports=["#define SHADER_NAME BLOOM_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec4 sum = texture2D(uMainSampler, outTexCoord) * 0.204164 * strength;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord - offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 3.294215) * 0.093913;"," gl_FragColor = (sum + texture2D(uMainSampler, outTexCoord - offset * 3.294215) * 0.093913) * vec4(color, 1);","}"].join("\n")},94328:t=>{t.exports=["#define SHADER_NAME BLUR_HIGH_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.411764705882353) * offset * strength;"," vec2 off2 = vec2(3.2941176470588234) * offset * strength;"," vec2 off3 = vec2(5.176470588235294) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.1964825501511404;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv + (off3 / resolution)) * 0.010381362401148057;"," col += texture2D(uMainSampler, uv - (off3 / resolution)) * 0.010381362401148057;"," gl_FragColor = col * vec4(color, 1.0);","}"].join("\n")},41514:t=>{t.exports=["#define SHADER_NAME BLUR_LOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 offset = vec2(1.333) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.29411764705882354;"," col += texture2D(uMainSampler, uv + (offset / resolution)) * 0.35294117647058826;"," col += texture2D(uMainSampler, uv - (offset / resolution)) * 0.35294117647058826;"," gl_FragColor = col * vec4(color, 1.0);","}"].join("\n")},51078:t=>{t.exports=["#define SHADER_NAME BLUR_MED_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.3846153846) * offset * strength;"," vec2 off2 = vec2(3.2307692308) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.2270270270;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.0702702703;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.0702702703;"," gl_FragColor = col * vec4(color, 1.0);","}"].join("\n")},90610:t=>{t.exports=["#define SHADER_NAME BOKEH_FS","precision mediump float;","#define ITERATIONS 100.0","#define ONEOVER_ITR 1.0 / ITERATIONS","#define PI 3.141596","#define GOLDEN_ANGLE 2.39996323","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float radius;","uniform float amount;","uniform float contrast;","uniform bool isTiltShift;","uniform float strength;","uniform vec2 blur;","varying vec2 outTexCoord;","vec2 Sample (in float theta, inout float r)","{"," r += 1.0 / r;"," return (r - 1.0) * vec2(cos(theta), sin(theta)) * 0.06;","}","vec3 Bokeh (sampler2D tex, vec2 uv, float radius)","{"," vec3 acc = vec3(0.0);"," vec3 div = vec3(0.0);"," vec2 pixel = vec2(resolution.y / resolution.x, 1.0) * radius * .025;"," float r = 1.0;"," for (float j = 0.0; j < GOLDEN_ANGLE * ITERATIONS; j += GOLDEN_ANGLE)"," {"," vec3 col = texture2D(tex, uv + pixel * Sample(j, r)).xyz;"," col = contrast > 0.0 ? col * col * (1.0 + contrast) : col;"," vec3 bokeh = vec3(0.5) + pow(col, vec3(10.0)) * amount;"," acc += col * bokeh;"," div += bokeh;"," }"," return acc / div;","}","void main ()","{"," float shift = 1.0;"," if (isTiltShift)"," {"," vec2 uv = vec2(gl_FragCoord.xy / resolution + vec2(-0.5, -0.5)) * 2.0;"," float centerStrength = 1.0;"," shift = length(uv * blur * strength) * centerStrength;"," }"," gl_FragColor = vec4(Bokeh(uMainSampler, outTexCoord * vec2(1.0, 1.0), radius * shift), 0.0);","}"].join("\n")},91899:t=>{t.exports=["#define SHADER_NAME CIRCLE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec3 color;","uniform vec4 backgroundColor;","uniform float thickness;","uniform float scale;","uniform float feather;","varying vec2 outTexCoord;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 position = (gl_FragCoord.xy / resolution.xy) * 2.0 - 1.0;"," float aspectRatio = resolution.x / resolution.y;"," position.x *= aspectRatio;"," float grad = length(position);"," float outer = aspectRatio;"," float inner = outer - (thickness * 2.0 / resolution.y);"," if (aspectRatio >= 1.0)"," {"," float f = 2.0 + (resolution.y / resolution.x);"," outer = 1.0;"," inner = 1.0 - (thickness * f / resolution.x);"," }"," outer *= scale;"," inner *= scale;"," float circle = smoothstep(outer, outer - 0.01, grad);"," float ring = circle - smoothstep(inner, inner - feather, grad);"," texture = mix(backgroundColor * backgroundColor.a, texture, texture.a);"," texture = (texture * (circle - ring));"," gl_FragColor = vec4(texture.rgb + (ring * color), texture.a);","}"].join("\n")},47838:t=>{t.exports=["#define SHADER_NAME DISPLACEMENT_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform sampler2D uDisplacementSampler;","uniform vec2 amount;","varying vec2 outTexCoord;","void main ()","{"," vec2 disp = (-vec2(0.5, 0.5) + texture2D(uDisplacementSampler, outTexCoord).rr) * amount;"," gl_FragColor = texture2D(uMainSampler, outTexCoord + disp).rgba;","}"].join("\n")},98656:t=>{t.exports=["#define SHADER_NAME GLOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform float outerStrength;","uniform float innerStrength;","uniform vec2 resolution;","uniform vec4 glowColor;","uniform bool knockout;","const float PI = 3.14159265358979323846264;","const float DIST = __DIST__;","const float SIZE = min(__SIZE__, PI * 2.0);","const float STEP = ceil(PI * 2.0 / SIZE);","const float MAX_ALPHA = STEP * DIST * (DIST + 1.0) / 2.0;","void main ()","{"," vec2 px = vec2(1.0 / resolution.x, 1.0 / resolution.y);"," float totalAlpha = 0.0;"," vec2 direction;"," vec2 displaced;"," vec4 color;"," for (float angle = 0.0; angle < PI * 2.0; angle += SIZE)"," {"," direction = vec2(cos(angle), sin(angle)) * px;"," for (float curDistance = 0.0; curDistance < DIST; curDistance++)"," {"," displaced = outTexCoord + direction * (curDistance + 1.0);"," color = texture2D(uMainSampler, displaced);"," totalAlpha += (DIST - curDistance) * color.a;"," }"," }"," color = texture2D(uMainSampler, outTexCoord);"," float alphaRatio = (totalAlpha / MAX_ALPHA);"," float innerGlowAlpha = (1.0 - alphaRatio) * innerStrength * color.a;"," float innerGlowStrength = min(1.0, innerGlowAlpha);"," vec4 innerColor = mix(color, glowColor, innerGlowStrength);"," float outerGlowAlpha = alphaRatio * outerStrength * (1.0 - color.a);"," float outerGlowStrength = min(1.0 - innerColor.a, outerGlowAlpha);"," vec4 outerGlowColor = outerGlowStrength * glowColor.rgba;"," if (knockout)"," {"," float resultAlpha = outerGlowAlpha + innerGlowAlpha;"," gl_FragColor = vec4(glowColor.rgb * resultAlpha, resultAlpha);"," }"," else"," {"," gl_FragColor = innerColor + outerGlowColor;"," }","}"].join("\n")},70463:t=>{t.exports=["#define SHADER_NAME GRADIENT_FS","#define SRGB_TO_LINEAR(c) pow((c), vec3(2.2))","#define LINEAR_TO_SRGB(c) pow((c), vec3(1.0 / 2.2))","#define SRGB(r, g, b) SRGB_TO_LINEAR(vec3(float(r), float(g), float(b)) / 255.0)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 positionFrom;","uniform vec2 positionTo;","uniform vec3 color1;","uniform vec3 color2;","uniform float alpha;","uniform int size;","varying vec2 outTexCoord;","float gradientNoise(in vec2 uv)","{"," const vec3 magic = vec3(0.06711056, 0.00583715, 52.9829189);"," return fract(magic.z * fract(dot(uv, magic.xy)));","}","float stepped (in float s, in float scale, in int steps)","{"," return steps > 0 ? floor( s / ((1.0 * scale) / float(steps))) * 1.0 / float(steps - 1) : s;","}","void main ()","{"," vec2 a = positionFrom;"," vec2 b = positionTo;"," vec2 ba = b - a;"," float d = dot(outTexCoord - a, ba) / dot(ba, ba);"," float t = size > 0 ? stepped(d, 1.0, size) : d;"," t = smoothstep(0.0, 1.0, clamp(t, 0.0, 1.0));"," vec3 color = mix(SRGB(color1.r, color1.g, color1.b), SRGB(color2.r, color2.g, color2.b), t);"," color = LINEAR_TO_SRGB(color);"," color += (1.0 / 255.0) * gradientNoise(outTexCoord) - (0.5 / 255.0);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = vec4(mix(color.rgb, texture.rgb, alpha), 1.0) * texture.a;","}"].join("\n")},50831:t=>{t.exports=["#define SHADER_NAME PIXELATE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float amount;","varying vec2 outTexCoord;","void main ()","{"," float pixelSize = floor(2.0 + amount);"," vec2 center = pixelSize * floor(outTexCoord * resolution / pixelSize) + pixelSize * vec2(0.5, 0.5);"," vec2 corner1 = center + pixelSize * vec2(-0.5, -0.5);"," vec2 corner2 = center + pixelSize * vec2(+0.5, -0.5);"," vec2 corner3 = center + pixelSize * vec2(+0.5, +0.5);"," vec2 corner4 = center + pixelSize * vec2(-0.5, +0.5);"," vec4 pixel = 0.4 * texture2D(uMainSampler, center / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner1 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner2 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner3 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner4 / resolution);"," gl_FragColor = pixel;","}"].join("\n")},92595:t=>{t.exports=["#define SHADER_NAME SHADOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform vec2 lightPosition;","uniform vec4 color;","uniform float decay;","uniform float power;","uniform float intensity;","uniform int samples;","const int MAX = 12;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 pc = (lightPosition - outTexCoord) * intensity;"," float shadow = 0.0;"," float limit = max(float(MAX), float(samples));"," for (int i = 0; i < MAX; ++i)"," {"," if (i >= samples)"," {"," break;"," }"," shadow += texture2D(uMainSampler, outTexCoord + float(i) * decay / limit * pc).a * power;"," }"," float mask = 1.0 - texture.a;"," gl_FragColor = mix(texture, color, shadow * mask);","}"].join("\n")},72464:t=>{t.exports=["#define SHADER_NAME SHINE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform bool reveal;","uniform float speed;","uniform float time;","uniform float lineWidth;","uniform float gradient;","varying vec2 outTexCoord;","void main ()","{","\tvec2 uv = gl_FragCoord.xy / resolution.xy;"," vec4 tex = texture2D(uMainSampler, outTexCoord);"," vec4 col1 = vec4(0.3, 0.0, 0.0, 1.0);"," vec4 col2 = vec4(0.85, 0.85, 0.85, 1.0);"," uv.x = uv.x - mod(time * speed, 2.0) + 0.5;"," float y = uv.x * gradient;"," float s = smoothstep(y - lineWidth, y, uv.y) - smoothstep(y, y + lineWidth, uv.y);"," gl_FragColor = (((s * col1) + (s * col2)) * tex);"," if (!reveal)"," {"," gl_FragColor += tex;"," }","}"].join("\n")},39249:t=>{t.exports=["#define SHADER_NAME VIGNETTE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float radius;","uniform float strength;","uniform vec2 position;","varying vec2 outTexCoord;","void main ()","{"," vec4 col = vec4(1.0);"," float d = length(outTexCoord - position);"," if (d <= radius)"," {"," float g = d / radius;"," g = sin(g * 3.14 * strength);"," \tcol = vec4(g * g * g);"," }"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = texture * (1.0 - col);","}"].join("\n")},2878:t=>{t.exports=["#define SHADER_NAME WIPE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec4 config;","uniform bool reveal;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 color0;"," vec4 color1;"," if (reveal)"," {"," color0 = vec4(0);"," color1 = texture2D(uMainSampler, uv);"," }"," else"," {"," color0 = texture2D(uMainSampler, uv);"," color1 = vec4(0);"," }"," float distance = config.x;"," float width = config.y;"," float direction = config.z;"," float axis = uv.x;"," if (config.w == 1.0)"," {"," axis = uv.y;"," }"," float adjust = mix(width, -width, distance);"," float value = smoothstep(distance - width, distance + width, abs(direction - axis) + adjust);"," gl_FragColor = mix(color1, color0, value);","}"].join("\n")},31063:t=>{t.exports=["#define SHADER_NAME PHASER_LIGHT_FS","precision mediump float;","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","const int kMaxLights = %LIGHT_COUNT%;","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","uniform int uLightCount;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;"," for (int index = 0; index < kMaxLights; ++index)"," {"," if (index < uLightCount)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }"," }"," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);"," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}"].join("\n")},48247:t=>{t.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}"].join("\n")},41214:t=>{t.exports=["#define SHADER_NAME PHASER_MESH_FS","precision mediump float;","uniform vec3 uLightPosition;","uniform vec3 uLightAmbient;","uniform vec3 uLightDiffuse;","uniform vec3 uLightSpecular;","uniform vec3 uFogColor;","uniform float uFogNear;","uniform float uFogFar;","uniform vec3 uMaterialAmbient;","uniform vec3 uMaterialDiffuse;","uniform vec3 uMaterialSpecular;","uniform float uMaterialShine;","uniform vec3 uCameraPosition;","uniform sampler2D uTexture;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main (void)","{"," vec4 color = texture2D(uTexture, vTextureCoord);"," vec3 ambient = uLightAmbient * uMaterialAmbient;"," vec3 norm = normalize(vNormal);"," vec3 lightDir = normalize(uLightPosition - vPosition);"," float diff = max(dot(norm, lightDir), 0.0);"," vec3 diffuse = uLightDiffuse * (diff * uMaterialDiffuse);"," vec3 viewDir = normalize(uCameraPosition - vPosition);"," vec3 reflectDir = reflect(-lightDir, norm);"," float spec = pow(max(dot(viewDir, reflectDir), 0.0), uMaterialShine);"," vec3 specular = uLightSpecular * (spec * uMaterialSpecular);"," vec3 result = (ambient + diffuse + specular) * color.rgb;"," float depth = gl_FragCoord.z / gl_FragCoord.w;"," float fogFactor = smoothstep(uFogNear, uFogFar, depth);"," gl_FragColor.rgb = mix(result.rgb, uFogColor, fogFactor);"," gl_FragColor.a = color.a;","}"].join("\n")},39653:t=>{t.exports=["#define SHADER_NAME PHASER_MESH_VS","precision mediump float;","attribute vec3 aVertexPosition;","attribute vec3 aVertexNormal;","attribute vec2 aTextureCoord;","uniform mat4 uViewProjectionMatrix;","uniform mat4 uModelMatrix;","uniform mat4 uNormalMatrix;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main ()","{"," vTextureCoord = aTextureCoord;"," vPosition = vec3(uModelMatrix * vec4(aVertexPosition, 1.0));"," vNormal = vec3(uNormalMatrix * vec4(aVertexNormal, 1.0));"," gl_Position = uViewProjectionMatrix * uModelMatrix * vec4(aVertexPosition, 1.0);","}"].join("\n")},62143:t=>{t.exports=["#define SHADER_NAME PHASER_MOBILE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join("\n")},47940:t=>{t.exports=["#define SHADER_NAME PHASER_MOBILE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join("\n")},98840:t=>{t.exports=["#define SHADER_NAME PHASER_MULTI_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler[%count%];","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture;"," %forloop%"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join("\n")},44667:t=>{t.exports=["#define SHADER_NAME PHASER_MULTI_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join("\n")},4127:t=>{t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","precision mediump float;","uniform vec2 uResolution;","uniform float uCameraZoom;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);"," float distToSurf = length(center - gl_FragCoord.xy);"," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);"," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);"," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;"," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}"].join("\n")},89924:t=>{t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}"].join("\n")},27681:t=>{t.exports=["#define SHADER_NAME PHASER_POSTFX_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}"].join("\n")},49627:t=>{t.exports=["#define SHADER_NAME PHASER_QUAD_VS","precision mediump float;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","varying vec2 outFragCoord;","varying vec2 outTexCoord;","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;"," gl_Position = vec4(inPosition, 0, 1);","}"].join("\n")},45561:t=>{t.exports=["#define SHADER_NAME PHASER_SINGLE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join("\n")},60722:t=>{t.exports=["#define SHADER_NAME PHASER_SINGLE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join("\n")},89350:(t,e,i)=>{t.exports={AddBlendFrag:i(35407),BitmapMaskFrag:i(78908),BitmapMaskVert:i(85191),ColorMatrixFrag:i(96293),CopyFrag:i(36682),FXBarrelFrag:i(99155),FXBloomFrag:i(24400),FXBlurHighFrag:i(94328),FXBlurLowFrag:i(41514),FXBlurMedFrag:i(51078),FXBokehFrag:i(90610),FXCircleFrag:i(91899),FXDisplacementFrag:i(47838),FXGlowFrag:i(98656),FXGradientFrag:i(70463),FXPixelateFrag:i(50831),FXShadowFrag:i(92595),FXShineFrag:i(72464),FXVignetteFrag:i(39249),FXWipeFrag:i(2878),LightFrag:i(31063),LinearBlendFrag:i(48247),MeshFrag:i(41214),MeshVert:i(39653),MobileFrag:i(62143),MobileVert:i(47940),MultiFrag:i(98840),MultiVert:i(44667),PointLightFrag:i(4127),PointLightVert:i(89924),PostFXFrag:i(27681),QuadVert:i(49627),SingleFrag:i(45561),SingleVert:i(60722)}},93567:(t,e,i)=>{i=new(i(83419))({initialize:function(t,e,i){this.webGLAttribLocation=-1,this.gl=t,this.program=e,this.name=i,this.createResource()},createResource:function(){var t;null!==this.program.webGLProgram?(t=this.gl).isContextLost()||(this.webGLAttribLocation=t.getAttribLocation(this.program.webGLProgram,this.name)):this.webGLAttribLocation=-1},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLAttribLocation=-1}});t.exports=i},26128:(t,e,i)=>{i=new(i(83419))({initialize:function(t,e,i,s){this.webGLBuffer=null,this.gl=t,this.initialDataOrSize=e,this.bufferType=i,this.bufferUsage=s,this.createResource()},createResource:function(){var t,e,i;null===this.initialDataOrSize||(t=this.gl).isContextLost()||(e=this.bufferType,i=t.createBuffer(),this.webGLBuffer=i,t.bindBuffer(e,this.webGLBuffer),t.bufferData(e,this.initialDataOrSize,this.bufferUsage),t.bindBuffer(e,null))},destroy:function(){var t=this.gl;t.isContextLost()||t.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.initialDataOrSize=null,this.gl=null}});t.exports=i},84387:(t,e,i)=>{var i=i(83419),s={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},i=new i({initialize:function(t,e,i,s,n){this.webGLFramebuffer=null,this.gl=t,this.width=e,this.height=i,this.renderTexture=s,this.addDepthStencilBuffer=!!n,this.createResource()},createResource:function(){var t=this.gl;if(!t.isContextLost()){var e=this.renderTexture,i=t.createFramebuffer();if(this.webGLFramebuffer=i,t.bindFramebuffer(t.FRAMEBUFFER,i),e.isRenderTexture=!0,e.isAlphaPremultiplied=!1,t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e.webGLTexture,0),(i=t.checkFramebufferStatus(t.FRAMEBUFFER))!==t.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer status: "+(s[i]||i));this.addDepthStencilBuffer&&(e=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,e),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,this.width,this.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)),t.bindFramebuffer(t.FRAMEBUFFER,null)}},destroy:function(){var t,e;null!==this.webGLFramebuffer&&((t=this.gl).isContextLost()||(t.bindFramebuffer(t.FRAMEBUFFER,this.webGLFramebuffer),null!==(e=t.getFramebufferAttachmentParameter(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME))&&(t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,null,0),t.deleteTexture(e)),null!==(e=t.getFramebufferAttachmentParameter(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME))&&t.deleteRenderbuffer(e),t.bindFramebuffer(t.FRAMEBUFFER,null),t.deleteFramebuffer(this.webGLFramebuffer)),this.renderTexture=null,this.webGLFramebuffer=null,this.gl=null)}});t.exports=i},1482:(t,e,i)=>{i=new(i(83419))({initialize:function(t,e,i){this.webGLProgram=null,this.gl=t,this.vertexSource=e,this.fragmentSource=i,this.createResource()},createResource:function(){var t=this.gl;if(!t.isContextLost()){var e=t.createProgram(),i=t.createShader(t.VERTEX_SHADER),s=t.createShader(t.FRAGMENT_SHADER),n=(t.shaderSource(i,this.vertexSource),t.shaderSource(s,this.fragmentSource),t.compileShader(i),t.compileShader(s),"Shader failed:\n");if(!t.getShaderParameter(i,t.COMPILE_STATUS))throw new Error("Vertex "+n+t.getShaderInfoLog(i));if(!t.getShaderParameter(s,t.COMPILE_STATUS))throw new Error("Fragment "+n+t.getShaderInfoLog(s));if(t.attachShader(e,i),t.attachShader(e,s),t.linkProgram(e),!t.getProgramParameter(e,t.LINK_STATUS))throw new Error("Link "+n+t.getProgramInfoLog(e));t.useProgram(e),this.webGLProgram=e}},destroy:function(){this.webGLProgram&&(this.gl.isContextLost()||this.gl.deleteProgram(this.webGLProgram),this.webGLProgram=null,this.gl=null)}});t.exports=i},82751:(t,e,i)=>{var s=i(83419),l=i(50030),n=new s({initialize:function(t,e,i,s,n,r,o,a,h,l,u,c,d){this.webGLTexture=null,this.isRenderTexture=!1,this.gl=t,this.mipLevel=e,this.minFilter=i,this.magFilter=s,this.wrapT=n,this.wrapS=r,this.format=o,this.pixels=a,this.width=h,this.height=l,this.pma=null==u||u,this.forceSize=!!c,this.flipY=!!d,this.__SPECTOR_Metadata={},this.createResource()},createResource:function(){var t=this.gl;t.isContextLost()||(this.pixels instanceof n?this.webGLTexture=this.pixels.webGLTexture:((t=t.createTexture()).__SPECTOR_Metadata=this.__SPECTOR_Metadata,this.webGLTexture=t,this._processTexture()))},update:function(t,e,i,s,n,r,o,a,h){0!==e&&0!==i&&(this.pixels=t,this.width=e,this.height=i,this.flipY=s,this.wrapS=n,this.wrapT=r,this.minFilter=o,this.magFilter=a,this.format=h,this.gl.isContextLost()||this._processTexture())},_processTexture:function(){var t=this.gl,e=(t.activeTexture(t.TEXTURE0),t.getParameter(t.TEXTURE_BINDING_2D)),i=(t.bindTexture(t.TEXTURE_2D,this.webGLTexture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,this.minFilter),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,this.magFilter),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,this.wrapS),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,this.wrapT),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.pma),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,this.flipY),this.pixels),s=this.mipLevel,n=this.width,r=this.height,o=this.format,a=!1;if(null==i)t.texImage2D(t.TEXTURE_2D,s,o,n,r,0,o,t.UNSIGNED_BYTE,null),a=l(n,r);else if(i.compressed)for(var n=i.width,r=i.height,a=i.generateMipmap,h=0;h{i=new(i(83419))({initialize:function(t,e,i){this.webGLUniformLocation=null,this.gl=t,this.program=e,this.name=i,this.createResource()},createResource:function(){var t;null!==this.program.webGLProgram?(t=this.gl).isContextLost()||(this.webGLUniformLocation=t.getUniformLocation(this.program.webGLProgram,this.name)):this.webGLUniformLocation=null},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLUniformLocation=null}});t.exports=i},9503:(t,e,i)=>{i={WebGLAttribLocationWrapper:i(93567),WebGLBufferWrapper:i(26128),WebGLProgramWrapper:i(1482),WebGLTextureWrapper:i(82751),WebGLFramebufferWrapper:i(84387),WebGLUniformLocationWrapper:i(57183)};t.exports=i},76531:(t,e,i)=>{var h=i(13560),s=i(83419),n=i(50792),r=i(97480),o=i(8443),a=i(57811),l=i(74403),u=i(45818),c=i(29747),d=i(87841),p=i(86555),f=i(56583),g=i(26099),m=i(38058),i=new s({Extends:n,initialize:function(t){n.call(this),this.game=t,this.canvas,this.canvasBounds=new d,this.parent=null,this.parentIsWindow=!1,this.parentSize=new p,this.gameSize=new p,this.baseSize=new p,this.displaySize=new p,this.scaleMode=h.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new g(1,1),this.autoRound=!1,this.autoCenter=h.CENTER.NO_CENTER,this.orientation=h.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.domlisteners={orientationChange:c,windowResize:c,fullScreenChange:c,fullScreenError:c}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(o.BOOT,this.boot,this)},boot:function(){var t=this.game,e=(this.canvas=t.canvas,this.fullscreen=t.device.fullscreen,this.scaleMode);e!==h.SCALE_MODE.RESIZE&&e!==h.SCALE_MODE.EXPAND&&this.displaySize.setAspectMode(e),e===h.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),0=n.width?i.width:i.width-(n.width-s.width)*r.x,i=n.height<=s.height?i.height:i.height-(n.height-s.height)*r.y;return e.setTo(o,a,h,i),t&&(e.width/=t.zoomX,e.height/=t.zoomY,e.centerX=t.centerX+t.scrollX,e.centerY=t.centerY+t.scrollY),e},step:function(t,e){this.parent&&(this._lastCheck+=e,this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0)},stopListeners:function(){var e=this.domlisteners;screen.orientation&&screen.orientation.addEventListener?screen.orientation.removeEventListener("change",e.orientationChange,!1):window.removeEventListener("orientationchange",e.orientationChange,!1),window.removeEventListener("resize",e.windowResize,!1),["webkit","moz",""].forEach(function(t){document.removeEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.removeEventListener(t+"fullscreenerror",e.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",e.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===h.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===h.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=i},64743:t=>{t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},39218:t=>{t.exports={LANDSCAPE:"landscape-primary",LANDSCAPE_SECONDARY:"landscape-secondary",PORTRAIT:"portrait-primary",PORTRAIT_SECONDARY:"portrait-secondary"}},81050:t=>{t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5,EXPAND:6}},80805:t=>{t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},13560:(t,e,i)=>{i={CENTER:i(64743),ORIENTATION:i(39218),SCALE_MODE:i(81050),ZOOM:i(80805)};t.exports=i},56139:t=>{t.exports="enterfullscreen"},2336:t=>{t.exports="fullscreenfailed"},47412:t=>{t.exports="fullscreenunsupported"},51452:t=>{t.exports="leavefullscreen"},20666:t=>{t.exports="orientationchange"},47945:t=>{t.exports="resize"},97480:(t,e,i)=>{t.exports={ENTER_FULLSCREEN:i(56139),FULLSCREEN_FAILED:i(2336),FULLSCREEN_UNSUPPORTED:i(47412),LEAVE_FULLSCREEN:i(51452),ORIENTATION_CHANGE:i(20666),RESIZE:i(47945)}},93364:(t,e,i)=>{var s=i(79291),n=i(13560),i=s(!1,{Center:i(64743),Events:i(97480),Orientation:i(39218),ScaleManager:i(76531),ScaleModes:i(81050),Zoom:i(80805)},n.CENTER);i=s(!1,i,n.ORIENTATION),i=s(!1,i,n.SCALE_MODE),i=s(!1,i,n.ZOOM),t.exports=i},27397:(t,e,i)=>{var n=i(95540),r=i(35355);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,t=n(t.settings,"physics",!1);if(e||t){var i=[];if(e&&i.push(r(e+"Physics")),t)for(var s in t)s=r(s.concat("Physics")),-1===i.indexOf(s)&&i.push(s);return i}}},52106:(t,e,i)=>{var s=i(95540);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),t=s(t.settings,"plugins",!1);return Array.isArray(t)?t:e||[]}},87033:t=>{t.exports={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},97482:(t,e,i)=>{var s=i(83419),n=i(2368),i=new s({initialize:function(t){this.sys=new n(this,t),this.game,this.anims,this.cache,this.registry,this.sound,this.textures,this.events,this.cameras,this.add,this.make,this.scene,this.children,this.lights,this.data,this.input,this.load,this.time,this.tweens,this.physics,this.matter,this.scale,this.plugins,this.renderer},update:function(){}});t.exports=i},60903:(t,e,i)=>{var s=i(83419),o=i(89993),n=i(44594),r=i(8443),l=i(35154),a=i(54899),h=i(29747),u=i(97482),c=i(2368),i=new s({initialize:function(t,e){if(this.game=t,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,e){Array.isArray(e)||(e=[e]);for(var i=0;io.START&&s.settings.status<=o.RUNNING&&s.step(t,e),s.scenePlugin&&s.scenePlugin._target&&s.scenePlugin.step(t,e)}},render:function(t){for(var e=0;e=o.LOADING&&i.settings.status=o.START&&r<=o.CREATING)){if(r>=o.RUNNING&&r<=o.SLEEPING)n.shutdown(),n.sceneUpdate=h,n.start(e);else if(n.sceneUpdate=h,n.start(e),(s=n.load?n.load:s)&&n.settings.hasOwnProperty("pack")&&(s.reset(),s.addPack({payload:n.settings.pack})))return n.settings.status=o.LOADING,s.once(a.COMPLETE,this.payloadComplete,this),s.start(),this;this.bootScene(i)}}else console.warn("Scene key not found: "+t)}else this._data[t]={autoStart:!0,data:e};return this},stop:function(t,e){var i,t=this.getScene(t);return t&&!t.sys.isTransitioning()&&t.sys.settings.status!==o.SHUTDOWN&&((i=t.sys.load)&&(i.off(a.COMPLETE,this.loadComplete,this),i.off(a.COMPLETE,this.payloadComplete,this)),t.sys.shutdown(e)),this},switch:function(t,e,i){var s=this.getScene(t),n=this.getScene(e);return s&&n&&s!==n&&(this.sleep(t),this.isSleeping(e)?this.wake(e,i):this.start(e,i)),this},getAt:function(t){return this.scenes[t]},getIndex:function(t){t=this.getScene(t);return this.scenes.indexOf(t)},bringToTop:function(t){var e,i;return this.isProcessing?this.queueOp("bringToTop",t):(e=this.getIndex(t),i=this.scenes,-1!==e&&e{var s=i(45319),n=i(83419),o=i(44594),a=i(95540),i=i(37277),n=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.pluginStart,this)},boot:function(){this.systems.events.once(o.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(o.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){var e,i,s,n=a(t=void 0===t?{}:t,"target",!1),r=this.manager.getScene(n);return!(!n||!this.checkValidTransition(r)||(e=a(t,"duration",1e3),this._elapsed=0,this._target=r,this._duration=e,this._willSleep=a(t,"sleep",!1),this._willRemove=a(t,"remove",!1),(s=a(t,"onUpdate",null))&&(this._onUpdate=s,this._onUpdateScope=a(t,"onUpdateScope",this.scene)),s=a(t,"allowInput",!1),this.settings.transitionAllowInput=s,(i=r.sys.settings).isTransition=!0,i.transitionFrom=this.scene,i.transitionDuration=e,i.transitionAllowInput=s,a(t,"moveAbove",!1)?this.manager.moveAbove(this.key,n):a(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,n),r.sys.isSleeping()?r.sys.wake(a(t,"data")):this.manager.start(n,a(t,"data")),i=a(t,"onStart",null),s=a(t,"onStartScope",this.scene),i&&i.call(s,this.scene,r,e),this.systems.events.emit(o.TRANSITION_OUT,r,e),0))},checkValidTransition:function(t){return!(!t||t.sys.isActive()||t.sys.isTransitioning()||t===this.scene||this.systems.isTransitioning())},step:function(t,e){this._elapsed+=e,this.transitionProgress=s(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;t.events.emit(o.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(t,e,i,s){return this.manager.add(t,e,i,s)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t,e){return t!==this.key&&this.manager.queueOp("switch",this.key,t,e),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);e=this.manager.getScene(e);return e&&e.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);e=this.manager.getScene(e);return e&&e.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return t!==(e=void 0===e?this.key:e)&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return t!==(e=void 0===e?this.key:e)&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return t!==(e=void 0===e?this.key:e)&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getStatus:function(t){t=this.manager.getScene(t);if(t)return t.sys.getStatus()},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(o.SHUTDOWN,this.shutdown,this),t.off(o.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(o.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});i.register("ScenePlugin",n,"scenePlugin"),t.exports=n},55681:(t,e,i)=>{var s=i(89993),n=i(35154),r=i(46975),o=i(87033);t.exports={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:s.PENDING,key:n(t,"key",""),active:n(t,"active",!1),visible:n(t,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:n(t,"pack",!1),cameras:n(t,"cameras",null),map:n(t,"map",r(o,n(t,"mapAdd",{}))),physics:n(t,"physics",{}),loader:n(t,"loader",{}),plugins:n(t,"plugins",!1),input:n(t,"input",{})}}}},2368:(t,e,i)=>{var s=i(83419),n=i(89993),r=i(42363),o=i(44594),a=i(27397),h=i(52106),l=i(29747),u=i(55681),i=new s({initialize:function(t,e){this.scene=t,this.game,this.renderer,this.config=e,this.settings=u.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.scale,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList,this.sceneUpdate=l},init:function(t){this.settings.status=n.INIT,this.sceneUpdate=l,this.game=t,this.renderer=t.renderer,this.canvas=t.canvas,this.context=t.context;t=t.plugins;(this.plugins=t).addToScene(this,r.Global,[r.CoreScene,h(this),a(this)]),this.events.emit(o.BOOT,this),this.settings.isBooted=!0},step:function(t,e){var i=this.events;i.emit(o.PRE_UPDATE,t,e),i.emit(o.UPDATE,t,e),this.sceneUpdate.call(this.scene,t,e),i.emit(o.POST_UPDATE,t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.events.emit(o.PRE_RENDER,t),this.cameras.render(t,e),this.events.emit(o.RENDER,t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(t){var e=this.settings,i=this.getStatus();return i!==n.CREATING&&i!==n.RUNNING?console.warn("Cannot pause non-running Scene",e.key):this.settings.active&&(e.status=n.PAUSED,e.active=!1,this.events.emit(o.PAUSE,this,t)),this},resume:function(t){var e=this.events,i=this.settings;return this.settings.active||(i.status=n.RUNNING,i.active=!0,e.emit(o.RESUME,this,t)),this},sleep:function(t){var e=this.settings,i=this.getStatus();return i!==n.CREATING&&i!==n.RUNNING?console.warn("Cannot sleep non-running Scene",e.key):(e.status=n.SLEEPING,e.active=!1,e.visible=!1,this.events.emit(o.SLEEP,this,t)),this},wake:function(t){var e=this.events,i=this.settings;return i.status=n.RUNNING,i.active=!0,i.visible=!0,e.emit(o.WAKE,this,t),i.isTransition&&e.emit(o.TRANSITION_WAKE,i.transitionFrom,i.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var t=this.settings.status;return t>n.PENDING&&t<=n.RUNNING},isSleeping:function(){return this.settings.status===n.SLEEPING},isActive:function(){return this.settings.status===n.RUNNING},isPaused:function(){return this.settings.status===n.PAUSED},isTransitioning:function(){return this.settings.isTransition||null!==this.scenePlugin._target},isTransitionOut:function(){return null!==this.scenePlugin._target&&0{t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},69830:t=>{t.exports="addedtoscene"},7919:t=>{t.exports="boot"},46763:t=>{t.exports="create"},11763:t=>{t.exports="destroy"},71555:t=>{t.exports="pause"},36735:t=>{t.exports="postupdate"},3809:t=>{t.exports="prerender"},90716:t=>{t.exports="preupdate"},58262:t=>{t.exports="ready"},91633:t=>{t.exports="removedfromscene"},10319:t=>{t.exports="render"},87132:t=>{t.exports="resume"},81961:t=>{t.exports="shutdown"},90194:t=>{t.exports="sleep"},6265:t=>{t.exports="start"},33178:t=>{t.exports="transitioncomplete"},43063:t=>{t.exports="transitioninit"},11259:t=>{t.exports="transitionout"},61611:t=>{t.exports="transitionstart"},45209:t=>{t.exports="transitionwake"},22966:t=>{t.exports="update"},21747:t=>{t.exports="wake"},44594:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(69830),BOOT:i(7919),CREATE:i(46763),DESTROY:i(11763),PAUSE:i(71555),POST_UPDATE:i(36735),PRE_RENDER:i(3809),PRE_UPDATE:i(90716),READY:i(58262),REMOVED_FROM_SCENE:i(91633),RENDER:i(10319),RESUME:i(87132),SHUTDOWN:i(81961),SLEEP:i(90194),START:i(6265),TRANSITION_COMPLETE:i(33178),TRANSITION_INIT:i(43063),TRANSITION_OUT:i(11259),TRANSITION_START:i(61611),TRANSITION_WAKE:i(45209),UPDATE:i(22966),WAKE:i(21747)}},62194:(t,e,i)=>{var s=i(89993),i=i(79291)(!1,{Events:i(44594),GetPhysicsPlugins:i(27397),GetScenePlugins:i(52106),SceneManager:i(60903),ScenePlugin:i(52209),Settings:i(55681),Systems:i(2368)},s);t.exports=i},30341:(t,e,i)=>{var s=i(83419),n=i(50792),r=i(14463),o=i(79291),i=i(29747),s=new s({Extends:n,initialize:function(t,e,i){n.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=o(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name||(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),1):(t=o(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},t),this.markers[t.name]=t,0)))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name||(this.markers[t.name]?(this.markers[t.name]=o(!0,this.markers[t.name],t),0):(console.warn("Audio Marker: "+t.name+" missing in Sound: "+this.key),1)))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if("object"==typeof(t=void 0===t?"":t)&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return console.warn("Marker: "+t+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=o(this.currentConfig,e),this.isPlaying=!0,!(this.isPaused=!1)},pause:function(){return!(this.isPaused||!this.isPlaying||(this.isPlaying=!1,this.isPaused=!0,0))},resume:function(){return!(!this.isPaused||this.isPlaying||(this.isPlaying=!0,this.isPaused=!1))},stop:function(){return!(!this.isPaused&&!this.isPlaying||(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),0))},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop,this.pan=this.currentConfig.pan},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:i,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,t=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*t},destroy:function(){this.pendingRemove||(this.stop(),this.emit(r.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});t.exports=s},85034:(t,e,i)=>{var s=i(83419),o=i(41786),n=i(50792),r=i(14463),a=i(8443),h=i(46710),l=i(58731),u=i(29747),c=i(26099),i=new s({Extends:n,initialize:function(t){n.call(this),this.game=t,this.jsonCache=t.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.gameLostFocus=!1,this.listenerPosition=new c,t.events.on(a.BLUR,this.onGameBlur,this),t.events.on(a.FOCUS,this.onGameFocus,this),t.events.on(a.PRE_STEP,this.update,this),t.events.once(a.DESTROY,this.destroy,this)},add:u,addAudioSprite:function(t,e){var i,s,n,r=this.add(t,e=void 0===e?{}:e);for(i in r.spritemap=this.jsonCache.get(t).spritemap,r.spritemap)r.spritemap.hasOwnProperty(i)&&(s=o(e),n=r.spritemap[i],s.loop=!!n.hasOwnProperty("loop")&&n.loop,r.addMarker({name:i,start:n.start,duration:n.end-n.start,config:s}));return r},get:function(t){return l(this.sounds,"key",t)},getAll:function(t){return t?h(this.sounds,"key",t):h(this.sounds)},getAllPlaying:function(){return h(this.sounds,"isPlaying",!0)},play:function(t,e){t=this.add(t);return t.once(r.COMPLETE,t.destroy,t),e?e.name?(t.addMarker(e),t.play(e.name)):t.play(e):t.play()},playAudioSprite:function(t,e,i){t=this.addAudioSprite(t);return t.once(r.COMPLETE,t.destroy,t),t.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeAll:function(){this.sounds.forEach(function(t){t.destroy()}),this.sounds.length=0},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;0<=i;i--){var s=this.sounds[i];s.key===t&&(s.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound(function(t){t.pause()}),this.emit(r.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(t){t.resume()}),this.emit(r.RESUME_ALL,this)},setListenerPosition:u,stopAll:function(){this.forEachActiveSound(function(t){t.stop()}),this.emit(r.STOP_ALL,this)},stopByKey:function(t){var e=0;return this.getAll(t).forEach(function(t){t.stop()&&e++}),e},isPlaying:function(t){var e,i=this.sounds.length-1;if(void 0===t){for(;0<=i;i--)if((e=this.sounds[i]).isPlaying)return!0}else for(;0<=i;i--)if((e=this.sounds[i]).key===t&&e.isPlaying)return!0;return!1},unlock:u,onBlur:u,onFocus:u,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(e,i){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(r.UNLOCKED,this));for(var t=this.sounds.length-1;0<=t;t--)this.sounds[t].pendingRemove&&this.sounds.splice(t,1);this.sounds.forEach(function(t){t.update(e,i)})},destroy:function(){this.game.events.off(a.BLUR,this.onGameBlur,this),this.game.events.off(a.FOCUS,this.onGameFocus,this),this.game.events.off(a.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.listenerPosition=null,this.game=null},forEachActiveSound:function(i,s){var n=this;this.sounds.forEach(function(t,e){t&&!t.pendingRemove&&i.call(s||n,t,e,n.sounds)})},setRate:function(t){return this.rate=t,this},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit(r.GLOBAL_RATE,this,t)}},setDetune:function(t){return this.detune=t,this},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound(function(t){t.calculateRate()}),this.emit(r.GLOBAL_DETUNE,this,t)}}});t.exports=i},14747:(t,e,i)=>{var s=i(33684),n=i(25960),r=i(57490);t.exports={create:function(t){var e=t.config.audio,i=t.device.audio;return new(e.noAudio||!i.webAudio&&!i.audioData?n:i.webAudio&&!e.disableWebAudio?r:s)(t)}}},19723:t=>{t.exports="complete"},98882:t=>{t.exports="decodedall"},57506:t=>{t.exports="decoded"},73146:t=>{t.exports="destroy"},11305:t=>{t.exports="detune"},40577:t=>{t.exports="detune"},30333:t=>{t.exports="mute"},20394:t=>{t.exports="rate"},21802:t=>{t.exports="volume"},1299:t=>{t.exports="looped"},99190:t=>{t.exports="loop"},97125:t=>{t.exports="mute"},89259:t=>{t.exports="pan"},79986:t=>{t.exports="pauseall"},17586:t=>{t.exports="pause"},19618:t=>{t.exports="play"},42306:t=>{t.exports="rate"},10387:t=>{t.exports="resumeall"},48959:t=>{t.exports="resume"},9960:t=>{t.exports="seek"},19180:t=>{t.exports="stopall"},98328:t=>{t.exports="stop"},50401:t=>{t.exports="unlocked"},52498:t=>{t.exports="volume"},14463:(t,e,i)=>{t.exports={COMPLETE:i(19723),DECODED:i(57506),DECODED_ALL:i(98882),DESTROY:i(73146),DETUNE:i(11305),GLOBAL_DETUNE:i(40577),GLOBAL_MUTE:i(30333),GLOBAL_RATE:i(20394),GLOBAL_VOLUME:i(21802),LOOP:i(99190),LOOPED:i(1299),MUTE:i(97125),PAN:i(89259),PAUSE_ALL:i(79986),PAUSE:i(17586),PLAY:i(19618),RATE:i(42306),RESUME_ALL:i(10387),RESUME:i(48959),SEEK:i(9960),STOP_ALL:i(19180),STOP:i(98328),UNLOCKED:i(50401),VOLUME:i(52498)}},64895:(t,e,i)=>{var s=i(30341),n=i(83419),r=i(14463),o=i(45319),i=new n({Extends:s,initialize:function(t,e,i){if(void 0===i&&(i={}),this.tags=t.game.cache.audio.get(e),!this.tags)throw new Error('No cached audio asset with key "'+e);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,s.call(this,t,e,i)},play:function(t,e){return!(this.manager.isLocked(this,"play",[t,e])||!s.prototype.play.call(this,t,e)||!this.pickAndPlayAudioTag()||(this.emit(r.PLAY,this),0))},pause:function(){return!(this.manager.isLocked(this,"pause")||0=e-this.manager.loopEndOffset?(this.audio.currentTime=t+Math.max(0,i-e),i=this.audio.currentTime):i{var s=i(85034),n=i(83419),o=i(14463),r=i(64895),i=new n({Extends:s,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,s.call(this,t)},add:function(t,e){t=new r(this,t,e);return this.sounds.push(t),t},unlock:function(){this.locked=!1;var e,i,s,r=this;this.game.cache.audio.entries.each(function(t,e){for(var i=0;i{t.exports={SoundManagerCreator:i(14747),Events:i(14463),BaseSound:i(30341),BaseSoundManager:i(85034),WebAudioSound:i(71741),WebAudioSoundManager:i(57490),HTML5AudioSound:i(64895),HTML5AudioSoundManager:i(33684),NoAudioSound:i(4603),NoAudioSoundManager:i(25960)}},4603:(t,e,i)=>{function s(){return!1}function n(){return null}function r(){return this}var o=i(30341),a=i(83419),h=i(50792),l=i(79291),i=i(29747),a=new a({Extends:h,initialize:function(t,e,i){void 0===i&&(i={}),h.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=l({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.pan=0,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:s,updateMarker:s,removeMarker:n,play:s,pause:s,resume:s,stop:s,setMute:r,setVolume:r,setRate:r,setDetune:r,setSeek:r,setLoop:r,setPan:r,applyConfig:n,resetConfig:n,update:i,calculateRate:n,destroy:function(){o.prototype.destroy.call(this)}});t.exports=a},25960:(t,e,i)=>{var s=i(85034),n=i(83419),r=i(50792),o=i(4603),i=i(29747),n=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){t=new o(this,t,e);return this.sounds.push(t),t},addAudioSprite:function(t,e){t=this.add(t,e);return t.spritemap={},t},get:function(t){return s.prototype.get.call(this,t)},getAll:function(t){return s.prototype.getAll.call(this,t)},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return s.prototype.remove.call(this,t)},removeAll:function(){return s.prototype.removeAll.call(this)},removeByKey:function(t){return s.prototype.removeByKey.call(this,t)},stopByKey:function(t){return s.prototype.stopByKey.call(this,t)},onBlur:i,onFocus:i,onGameBlur:i,onGameFocus:i,pauseAll:i,resumeAll:i,stopAll:i,update:i,setRate:i,setDetune:i,setMute:i,setVolume:i,unlock:i,forEachActiveSound:function(t,e){s.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){s.prototype.destroy.call(this)}});t.exports=n},71741:(t,e,i)=>{var s=i(30341),n=i(83419),r=i(14463),o=i(95540),i=new n({Extends:s,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('Audio key "'+e+'" not found in cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.pannerNode=null,this.spatialNode=null,this.spatialSource=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),t.context.createPanner&&(this.spatialNode=t.context.createPanner(),this.volumeNode.connect(this.spatialNode)),(t.context.createStereoPanner?(this.pannerNode=t.context.createStereoPanner(),(t.context.createPanner?this.spatialNode:this.volumeNode).connect(this.pannerNode),this.pannerNode):t.context.createPanner?this.spatialNode:this.volumeNode).connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,s.call(this,t,e,i)},play:function(t,e){return!!s.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime{var l=i(53134),r=i(85034),s=i(83419),u=i(14463),n=i(8443),o=i(71741),a=i(95540),i=new s({Extends:r,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),r.call(this,t),this.locked&&t.isBooted?this.unlock():t.events.once(n.BOOT,this.unlock,this)},createAudioContext:function(t){t=t.config.audio;return t.context?(t.context.resume(),t.context):window.hasOwnProperty("AudioContext")?new AudioContext:window.hasOwnProperty("webkitAudioContext")?new window.webkitAudioContext:void 0},setAudioContext:function(t){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=t,this.masterMuteNode=t.createGain(),this.masterVolumeNode=t.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(t.destination),this.destination=this.masterMuteNode,this},add:function(t,e){t=new o(this,t,e);return this.sounds.push(t),t},decodeAudio:function(t,e){for(var i=Array.isArray(t)?t:[{key:t,data:e}],s=this.game.cache.audio,n=i.length,r=0;r{var n=i(37105),s=i(83419),r=i(29747),o=i(19186),i=new s({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=r,this.removeCallback=r,this._sortKey=""},add:function(t,e){return e?n.Add(this.list,t):n.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?n.AddAt(this.list,t,e):n.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(i,t){return i&&o(this.list,t=void 0===t?function(t,e){return t[i]-e[i]}:t),this},getByName:function(t){return n.GetFirst(this.list,"name",t)},getRandom:function(t,e){return n.GetRandom(this.list,t,e)},getFirst:function(t,e,i,s){return n.GetFirst(this.list,t,e,i,s)},getAll:function(t,e,i,s){return n.GetAll(this.list,t,e,i,s)},count:function(t,e){return n.CountAllMatching(this.list,t,e)},swap:function(t,e){n.Swap(this.list,t,e)},moveTo:function(t,e){return n.MoveTo(this.list,t,e)},moveAbove:function(t,e){return n.MoveAbove(this.list,t,e)},moveBelow:function(t,e){return n.MoveBelow(this.list,t,e)},remove:function(t,e){return e?n.Remove(this.list,t):n.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?n.RemoveAt(this.list,t):n.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?n.RemoveBetween(this.list,t,e):n.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return n.BringToTop(this.list,t)},sendToBack:function(t){return n.SendToBack(this.list,t)},moveUp:function(t){return n.MoveUp(this.list,t),t},moveDown:function(t){return n.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return n.Shuffle(this.list),this},replace:function(t,e){return n.Replace(this.list,t,e)},exists:function(t){return-1{i=new(i(83419))({initialize:function(t){this.entries={},this.size=0,this.setAll(t)},setAll:function(t){if(Array.isArray(t))for(var e=0;e{var s=i(83419),n=i(50792),r=i(82348),i=new s({Extends:n,initialize:function(){n.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(t){return-1{var a=i(43886);function s(t){if(!(this instanceof s))return new s(t);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function p(t,e){f(t,0,t.children.length,e,t)}function f(t,e,i,s,n){(n=n||m(null)).minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(var r,o=e;o=t.minX&&e.maxY>=t.minY}function m(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,s,n){for(var r,o=[e,i];o.length;)(i=o.pop())-(e=o.pop())<=s||(r=e+Math.ceil((i-e)/s/2)*s,a(t,r,e,i,n),o.push(e,r,r,i))}s.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],s=this.toBBox;if(l(t,e))for(var n,r,o,a,h=[];e;){for(n=0,r=e.children.length;n{if(!i)return e.indexOf(t);for(var s=0;sthis._maxEntries;)this._split(n,e),e--;this._adjustParentBBoxes(i,n,e)},_split:function(t,e){var i=t[e],s=i.children.length,n=this._minEntries,n=(this._chooseSplitAxis(i,n,s),this._chooseSplitIndex(i,n,s)),s=m(i.children.splice(n,i.children.length-n));s.height=i.height,s.leaf=i.leaf,p(i,this.toBBox),p(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(i,s)},_splitRoot:function(t,e){this.data=m([t,e]),this.data.height=t.height+1,this.data.leaf=!1,p(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){for(var s,n,r,o,a,h,l,u,c,d=r=1/0,p=e;p<=i-e;p++)c=s=f(t,0,p,this.toBBox),a=n=f(t,p,i,this.toBBox),0,h=Math.max(c.minX,a.minX),l=Math.max(c.minY,a.minY),u=Math.min(c.maxX,a.maxX),c=Math.min(c.maxY,a.maxY),a=Math.max(0,u-h)*Math.max(0,c-l),u=g(s)+g(n),a{var s=new(i(83419))({initialize:function(t){if(this.entries=[],Array.isArray(t))for(var e=0;e{var s=i(45319),n=i(83419),r=i(56583),o=i(26099),a=new n({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=null),this._width=t,this._height=e,this._parent=s,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return this.aspectMode=t=void 0===t?0:t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=s(t,0,this.maxWidth),this.minHeight=s(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=s(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=s(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=s(t,this.minWidth,this.maxWidth),t=e&&this._parent&&t>this._parent.width?Math.max(this.minWidth,this._parent.width):t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=s(t,this.minHeight,this.maxHeight),t=e&&this._parent&&t>this._parent.height?Math.max(this.minHeight,this._parent.height):t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var s=this.snapTo,n=0===e?1:t/e;return i&&this.aspectRatio>n||!i&&this.aspectRation)&&(t=(e=r(e,s.y))*this.aspectRatio,0{t.exports="add"},56187:t=>{t.exports="remove"},82348:(t,e,i)=>{t.exports={PROCESS_QUEUE_ADD:i(15238),PROCESS_QUEUE_REMOVE:i(56187)}},41392:(t,e,i)=>{t.exports={Events:i(82348),List:i(73162),Map:i(90330),ProcessQueue:i(25774),RTree:i(59542),Set:i(35072),Size:i(86555)}},57382:(t,e,i)=>{var s=i(83419),d=i(45319),p=i(40987),n=i(8054),r=i(50030),o=i(79237),i=new s({Extends:o,initialize:function(t,e,i,s,n){o.call(this,t,e,i,s,n),this.add("__BASE",0,0,0,s,n),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=s,this.height=n,this.imageData=this.context.getImageData(0,0,s,n),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===n.WEBGL&&this.refresh(),this},draw:function(t,e,i,s){return void 0===s&&(s=!0),this.context.drawImage(i,t,e),s&&this.update(),this},drawFrame:function(t,e,i,s,n){void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=!0);var r,o,a,t=this.manager.getFrame(t,e);return t&&(e=t.canvasData,r=t.cutWidth,o=t.cutHeight,a=t.source.resolution,this.context.drawImage(t.source.image,e.x,e.y,r,o,i,s,r/a,o/a),n)&&this.update(),this},setPixel:function(t,e,i,s,n,r){var o;return void 0===r&&(r=255),t=Math.abs(Math.floor(t)),e=Math.abs(Math.floor(e)),-1{var u=i(10312),a=i(38058),h=i(27919),s=i(83419),l=i(8054),w=i(4327),g=i(95540),c=i(36060),d=i(32302),p=i(79237),f=i(70554),i=new s({Extends:p,initialize:function(t,e,i,s){void 0===i&&(i=256),void 0===s&&(s=256),this.type="DynamicTexture";var n=t.game.renderer,r=n&&n.type===l.CANVAS,o=r?h.create2D(this,i,s):[this];p.call(this,t,e,o,i,s),this.add("__BASE",0,0,0,i,s),this.renderer=n,this.width=-1,this.height=-1,this.isDrawing=!1,this.canvas=r?o:null,this.context=r?o.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new a(0,0,i,s).setScene(t.game.scene.systemScene,!1),this.renderTarget=r?null:new d(n,i,s,1,0,!1,!1,!0,!1),this.pipeline=r?null:n.pipelines.get(c.SINGLE_PIPELINE),this.setSize(i,s)},setSize:function(t,e){void 0===e&&(e=t);var i,s=this.get(),n=s.source;return t!==this.width||e!==this.height?(this.canvas&&(this.canvas.width=t,this.canvas.height=e),(i=this.renderTarget)&&(i.willResize(t,e)&&i.resize(t,e),i.texture!==n.glTexture&&this.renderer.deleteTexture(n.glTexture),this.setFromRenderTarget()),this.camera.setSize(t,e),n.width=t,n.height=e,s.setSize(t,e),this.width=t,this.height=e):(i=this.getSourceImage(),s.cutX+t>i.width&&(t=i.width-s.cutX),s.cutY+e>i.height&&(e=i.height-s.cutY),s.setSize(t,e,s.cutX,s.cutY)),this},setFromRenderTarget:function(){var t=this.get().source,e=this.renderTarget;return t.isRenderTexture=!0,t.isGLTexture=!0,t.glTexture=e.texture,this},setIsSpriteTexture:function(t){return this.isSpriteTexture=t,this},fill:function(t,e,i,s,n,r){var o,a,h,l=this.camera,u=this.renderer,c=(void 0===e&&(e=1),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=this.width),void 0===r&&(r=this.height),t>>16&255),d=t>>8&255,t=255&t,p=this.renderTarget;return l.preRender(),p?(p.bind(!0),l=this.pipeline.manager.set(this.pipeline),o=u.width/p.width,a=u.height/p.height,h=p.height-(s+r),l.drawFillRect(i*o,h*a,n*o,r*a,f.getTintFromFloats(t/255,d/255,c/255,1),e),p.unbind(!0)):(l=this.context,u.setContext(l),l.globalCompositeOperation="source-over",l.fillStyle="rgba("+c+","+d+","+t+","+e+")",l.fillRect(i,s,n,r),u.setContext()),this.dirty=!0,this},clear:function(t,e,i,s){var n,r;return this.dirty&&(n=this.context,(r=this.renderTarget)?r.clear(t,e,i,s):n&&(void 0!==t&&void 0!==e&&void 0!==i&&void 0!==s?n.clearRect(t,e,i,s):(n.save(),n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,this.width,this.height),n.restore())),this.dirty=!1),this},stamp:function(t,e,i,s,n){void 0===i&&(i=0),void 0===s&&(s=0);var r=g(n,"alpha",1),o=g(n,"tint",16777215),a=g(n,"angle",0),h=g(n,"rotation",0),l=g(n,"scale",1),u=g(n,"scaleX",l),l=g(n,"scaleY",l),c=g(n,"originX",.5),d=g(n,"originY",.5),p=g(n,"blendMode",0),f=g(n,"erase",!1),n=g(n,"skipBatch",!1),r=this.manager.resetStamp(r,o);return r.setAngle(0),0!==a?r.setAngle(a):0!==h&&r.setRotation(h),r.setScale(u,l),r.setTexture(t,e),r.setOrigin(c,d),r.setBlendMode(p),f&&(this._eraseMode=!0),n?this.batchGameObject(r,i,s):this.draw(r,i,s),f&&(this._eraseMode=!1),this},erase:function(t,e,i){return this._eraseMode=!0,this.draw(t,e,i),this._eraseMode=!1,this},draw:function(t,e,i,s,n){return this.beginDraw(),this.batchDraw(t,e,i,s,n),this.endDraw(),this},drawFrame:function(t,e,i,s,n,r){return this.beginDraw(),this.batchDrawFrame(t,e,i,s,n,r),this.endDraw(),this},repeat:function(t,e,i,s,n,r,o,a,h){if(void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=this.width),void 0===r&&(r=this.height),void 0===o&&(o=1),void 0===a&&(a=16777215),void 0===h&&(h=!1),e=t instanceof w?t:this.manager.getFrame(t,e)){var l=this.manager.resetStamp(o,a),u=(l.setFrame(e),l.setOrigin(0),e.width),c=e.height,d=(n=Math.floor(n),r=Math.floor(r),Math.ceil(n/u)),p=Math.ceil(r/c),f=d*u-n,g=p*c-r,m=(0{var s=i(83419),T=i(45319),n=i(79291),r=new s({initialize:function(t,e,i,s,n,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0},is3Slice:!1,scale9:!1,scale9Borders:{x:0,y:0,w:0,h:0}},this.setSize(r,o,s,n)},setCutPosition:function(t,e){return void 0===e&&(e=0),this.cutX=t=void 0===t?0:t,this.cutY=e,this.updateUVs()},setCutSize:function(t,e){return this.cutWidth=t,this.cutHeight=e,this.updateUVs()},setSize:function(t,e,i,s){this.setCutPosition(i=void 0===i?0:i,s=void 0===s?0:s),this.setCutSize(t,e),this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var n=this.data,r=n.cut,r=(r.x=i,r.y=s,r.w=t,r.h=e,r.r=i+t,r.b=s+e,n.sourceSize.w=t,n.sourceSize.h=e,n.spriteSourceSize.w=t,n.spriteSourceSize.h=e,n.radius=.5*Math.sqrt(t*t+e*e),n.drawImage);return r.x=i,r.y=s,r.width=t,r.height=e,this.updateUVs()},setTrim:function(t,e,i,s,n,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=s,a.w=n,a.h=r,a.r=i+n,a.b=s+r,this.x=i,this.y=s,this.width=n,this.height=r,this.halfWidth=.5*n,this.halfHeight=.5*r,this.centerX=Math.floor(n/2),this.centerY=Math.floor(r/2),this.updateUVs()},setScale9:function(t,e,i,s){var n=this.data;return n.scale9=!0,n.is3Slice=0===e&&s===this.height,n.scale9Borders.x=t,n.scale9Borders.y=e,n.scale9Borders.w=i,n.scale9Borders.h=s,this},setCropUVs:function(t,e,i,s,n,r,o){var a,h,l,u=this.cutX,c=this.cutY,d=this.cutWidth,p=this.cutHeight,f=this.realWidth,g=this.realHeight,m=u+(e=T(e,0,f)),v=c+(i=T(i,0,g)),f=s=T(s,0,f-e),g=n=T(n,0,g-i),y=this.data,y=(y.trim?(y=y.spriteSourceSize,h=e+(s=T(s,0,d-e)),l=i+(n=T(n,0,p-i)),y.rh||y.y>l?g=f=v=m=0:(x=Math.max(y.x,e),a=Math.max(y.y,i),h=Math.min(y.r,h)-x,l=Math.min(y.b,l)-a,m=r?u+(d-(x-y.x)-h):u+(x-y.x),v=o?c+(p-(a-y.y)-l):c+(a-y.y),e=x,i=a,s=f=h,n=g=l)):(r&&(m=u+(d-e-s)),o&&(v=c+(p-i-n))),this.source.width),x=this.source.height;return t.u0=Math.max(0,m/y),t.v0=Math.max(0,v/x),t.u1=Math.min(1,(m+f)/y),t.v1=Math.min(1,(v+g)/x),t.x=e,t.y=i,t.cx=m,t.cy=v,t.cw=f,t.ch=g,t.width=s,t.height=n,t.flipX=r,t.flipY=o,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,s,n,r){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=s,this.u1=n,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,s=this.cutHeight,n=this.data.drawImage,n=(n.width=i,n.height=s,this.source.width),r=this.source.height;return this.u0=t/n,this.v0=e/r,this.u1=(t+i)/n,this.v1=(e+s)/r,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new r(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=n(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.texture=null,this.source=null,this.customData=null,this.data=null},glTexture:{get:function(){return this.source.glTexture}},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},scale9:{get:function(){return this.data.scale9}},is3Slice:{get:function(){return this.data.is3Slice}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=r},79237:(t,e,i)=>{var s=i(83419),o=i(4327),a=i(11876),n='Texture "%s" has no frame "%s"',i=new s({initialize:function(t,e,i,s,n){Array.isArray(i)||(i=[i]),this.manager=t,this.key=e,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE";for(var r=this.frameTotal=0;r{var a=i(27919),n=i(57382),s=i(83419),r=i(40987),o=i(8054),h=i(81320),l=i(50792),u=i(69442),c=i(4327),d=i(8443),p=i(99584),f=i(35154),g=i(88571),m=i(41212),v=i(61309),y=i(87841),x=i(79237),i=new s({Extends:l,initialize:function(t){l.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=a.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new y,this.silentWarnings=!1,t.events.once(d.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(u.LOAD,this.updatePending,this),this.on(u.ERROR,this.updatePending,this);var t=this.game.config;null!==t.defaultImage&&this.addBase64("__DEFAULT",t.defaultImage),null!==t.missingImage&&this.addBase64("__MISSING",t.missingImage),null!==t.whiteImage&&this.addBase64("__WHITE",t.whiteImage),this.game.renderer&&this.game.renderer.gl&&this.addUint8Array("__NORMAL",new Uint8Array([127,127,255,255]),1,1),this.game.events.once(d.DESTROY,this.destroy,this),this.game.events.once(d.SYSTEM_READY,function(t){this.stamp=new g(t).setOrigin(0)},this)},updatePending:function(){this._pending--,0===this._pending&&(this.off(u.LOAD),this.off(u.ERROR),this.emit(u.READY))},checkKey:function(t){return!(!t||"string"!=typeof t||this.exists(t))||(this.silentWarnings||console.error("Texture key already in use: "+t),!1)},remove:function(t){if("string"==typeof t){if(!this.exists(t))return this.silentWarnings||console.warn("No texture found matching key: "+t),this;t=this.get(t)}var e=t.key;return this.list.hasOwnProperty(e)&&(t.destroy(),this.emit(u.REMOVE,e),this.emit(u.REMOVE_KEY+e)),this},removeKey:function(t){return this.list.hasOwnProperty(t)&&delete this.list[t],this},addBase64:function(e,t){var i,s;return this.checkKey(e)&&(i=this,(s=new Image).onerror=function(){i.emit(u.ERROR,e)},s.onload=function(){var t=i.create(e,s);v.Image(t,0),i.emit(u.ADD,e,t),i.emit(u.ADD_KEY+e,t),i.emit(u.LOAD,e,t)},s.src=t),this},getBase64:function(t,e,i,s){void 0===i&&(i="image/png"),void 0===s&&(s=.92);var n,r,o="",t=this.getFrame(t,e);return t&&(t.source.isRenderTexture||t.source.isGLTexture)?this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture"):t&&(e=t.canvasData,r=(n=a.create2D(this,e.width,e.height)).getContext("2d",{willReadFrequently:!0}),0=s.y&&e=s.y&&e{var s=i(27919),n=i(83419),o=i(50030),a=i(29795),h=i(82751),i=new n({initialize:function(t,e,i,s,n){void 0===n&&(n=!1);var r=t.manager.game;this.renderer=r.renderer,this.texture=t,this.source=e,this.image=e.compressed?null:e,this.compressionAlgorithm=e.compressed?e.format:null,this.resolution=1,this.width=i||e.naturalWidth||e.videoWidth||e.width||0,this.height=s||e.naturalHeight||e.videoHeight||e.height||0,this.scaleMode=a.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&e instanceof HTMLVideoElement,this.isRenderTexture="RenderTexture"===e.type||"DynamicTexture"===e.type,this.isGLTexture=e instanceof h,this.isPowerOf2=o(this.width,this.height),this.glTexture=null,this.flipY=n,this.init(r)},init:function(t){var e,i,s,n,r,o,a=this.renderer;a&&(e=this.source,a.gl?(i=this.image,s=this.flipY,n=this.width,r=this.height,o=this.scaleMode,this.isCanvas?this.glTexture=a.createCanvasTexture(i,!1,s):this.isVideo?this.glTexture=a.createVideoTexture(i,!1,s):this.isRenderTexture?this.glTexture=a.createTextureFromSource(null,n,r,o):this.isGLTexture?this.glTexture=e:this.compressionAlgorithm?this.glTexture=a.createTextureFromSource(e,void 0,void 0,o):e instanceof Uint8Array?this.glTexture=a.createUint8ArrayTexture(e,n,r,o):this.glTexture=a.createTextureFromSource(i,n,r,o)):this.isRenderTexture&&(this.image=e.canvas)),t.config.antialias||this.setFilter(1)},setFilter:function(t){this.renderer&&this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,t),this.scaleMode=t},setFlipY:function(t){return(t=void 0===t?!0:t)!==this.flipY&&(this.flipY=t,this.update()),this},update:function(){var t=this.renderer,e=this.image,i=this.flipY,s=t.gl;s&&this.isCanvas?t.updateCanvasTexture(e,this.glTexture,i):s&&this.isVideo&&t.updateVideoTexture(e,this.glTexture,i)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&s.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});t.exports=i},19673:t=>{t.exports={LINEAR:0,NEAREST:1}},44538:t=>{t.exports="addtexture"},63486:t=>{t.exports="addtexture-"},94851:t=>{t.exports="onerror"},29099:t=>{t.exports="onload"},8678:t=>{t.exports="ready"},86415:t=>{t.exports="removetexture"},30879:t=>{t.exports="removetexture-"},69442:(t,e,i)=>{t.exports={ADD:i(44538),ADD_KEY:i(63486),ERROR:i(94851),LOAD:i(29099),READY:i(8678),REMOVE:i(86415),REMOVE_KEY:i(30879)}},27458:(t,e,i)=>{var s=i(79291),n=i(19673),s=s(!1,{CanvasTexture:i(57382),DynamicTexture:i(81320),Events:i(69442),FilterMode:n,Frame:i(4327),Parsers:i(61309),Texture:i(79237),TextureManager:i(17130),TextureSource:i(11876)},n);t.exports=s},89905:t=>{t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var n=i.getElementsByTagName("SubTexture"),r=0;r{t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},4832:t=>{t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},78566:(t,e,i)=>{var u=i(41786);t.exports=function(t,e,i){if(i.frames||i.textures){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var n,r,o=(Array.isArray(i.textures)?i.textures[e]:i).frames,a=0;a{var u=i(41786);t.exports=function(t,e,i){if(i.frames){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);var n,r,o,a,h,l=i.frames;for(r in l)l.hasOwnProperty(r)&&(o=l[r],(n=t.add(r,e,o.frame.x,o.frame.y,o.frame.w,o.frame.h))?(o.trimmed&&n.setTrim(o.sourceSize.w,o.sourceSize.h,o.spriteSourceSize.x,o.spriteSourceSize.y,o.spriteSourceSize.w,o.spriteSourceSize.h),o.rotated&&(n.rotated=!0,n.updateUVsInverted()),(a=o.anchor||o.pivot)&&(n.customPivot=!0,n.pivotX=a.x,n.pivotY=a.y),o.scale9Borders&&n.setScale9(o.scale9Borders.x,o.scale9Borders.y,o.scale9Borders.w,o.scale9Borders.h),n.customData=u(o)):console.warn("Invalid atlas json, frame already exists: "+r));for(h in i)"frames"!==h&&(Array.isArray(i[h])?t.customData[h]=i[h].slice(0):t.customData[h]=i[h]);return t}console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object")}},31403:t=>{t.exports=function(t){var e=[171,75,84,88,32,49,49,187,13,10,26,10],i=new Uint8Array(t,0,12);for(f=0;f>1),p=Math.max(1,p>>1),c+=g}return{mipmaps:u,width:a,height:h,internalFormat:o,compressed:!0,generateMipmap:!1}}console.warn("KTXParser - Only compressed formats supported")}},82038:t=>{function i(t,e,i,s,n,r,o){return void 0===o&&(o=16),Math.floor((t+i)/n)*Math.floor((e+s)/r)*o}function e(t,e){return(t=Math.max(t,16))*Math.max(e,8)/4}function s(t,e){return(t=Math.max(t,8))*Math.max(e,8)/2}function n(t,e){return Math.ceil(t/4)*Math.ceil(e/4)*16}function r(t,e){return i(t,e,3,3,4,4,8)}function o(t,e){return i(t,e,3,3,4,4)}var f={0:{sizeFunc:e,glFormat:[35841]},1:{sizeFunc:e,glFormat:[35843]},2:{sizeFunc:s,glFormat:[35840]},3:{sizeFunc:s,glFormat:[35842]},6:{sizeFunc:r,glFormat:[36196]},7:{sizeFunc:r,glFormat:[33776,35916]},8:{sizeFunc:o,glFormat:[33777,35917]},9:{sizeFunc:o,glFormat:[33778,35918]},11:{sizeFunc:o,glFormat:[33779,35919]},14:{sizeFunc:n,glFormat:[36494,36495]},15:{sizeFunc:n,glFormat:[36492,36493]},22:{sizeFunc:r,glFormat:[37492,37493]},23:{sizeFunc:o,glFormat:[37496,37497]},24:{sizeFunc:r,glFormat:[37494,37495]},25:{sizeFunc:r,glFormat:[37488]},26:{sizeFunc:o,glFormat:[37490]},27:{sizeFunc:o,glFormat:[37808,37840]},28:{sizeFunc:function(t,e){return i(t,e,4,3,5,4)},glFormat:[37809,37841]},29:{sizeFunc:function(t,e){return i(t,e,4,4,5,5)},glFormat:[37810,37842]},30:{sizeFunc:function(t,e){return i(t,e,5,4,6,5)},glFormat:[37811,37843]},31:{sizeFunc:function(t,e){return i(t,e,5,5,6,6)},glFormat:[37812,37844]},32:{sizeFunc:function(t,e){return i(t,e,7,4,8,5)},glFormat:[37813,37845]},33:{sizeFunc:function(t,e){return i(t,e,7,5,8,6)},glFormat:[37814,37846]},34:{sizeFunc:function(t,e){return i(t,e,7,7,8,8)},glFormat:[37815,37847]},35:{sizeFunc:function(t,e){return i(t,e,9,4,10,5)},glFormat:[37816,37848]},36:{sizeFunc:function(t,e){return i(t,e,9,5,10,6)},glFormat:[37817,37849]},37:{sizeFunc:function(t,e){return i(t,e,9,7,10,8)},glFormat:[37818,37850]},38:{sizeFunc:function(t,e){return i(t,e,9,9,10,10)},glFormat:[37819,37851]},39:{sizeFunc:function(t,e){return i(t,e,11,9,12,10)},glFormat:[37820,37852]},40:{sizeFunc:function(t,e){return i(t,e,11,11,12,12)},glFormat:[37821,37853]}};t.exports=function(t){for(var e=new Uint32Array(t,0,13),i=55727696===e[0]?e[2]:e[3],s=f[i].glFormat[e[4]],n=f[i].sizeFunc,r=e[11],i=e[7],o=e[6],a=new Uint8Array(t,52+e[12]),h=new Array(r),l=0,u=i,c=o,d=0;d>1),c=Math.max(1,c>>1),l+=p}return{mipmaps:h,width:i,height:o,internalFormat:s,compressed:!0,generateMipmap:!1}}},75549:(t,e,i)=>{var S=i(95540);t.exports=function(t,e,i,s,n,r,o){var a=S(o,"frameWidth",null),h=S(o,"frameHeight",a);if(null===a)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var l=t.source[e],u=(t.add("__BASE",e,0,0,l.width,l.height),S(o,"startFrame",0)),c=S(o,"endFrame",-1),d=S(o,"margin",0),p=S(o,"spacing",0),f=Math.floor((n-d+p)/(a+p))*Math.floor((r-d+p)/(h+p));0==f&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",t.key),(u=fn&&(g=d,m+=h+p)}return t}},47534:(t,e,i)=>{var I=i(95540);t.exports=function(t,e,i){var s=I(i,"frameWidth",null),n=I(i,"frameHeight",s);if(!s)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var r=t.source[0];t.add("__BASE",0,0,0,r.width,r.height);var r=I(i,"startFrame",0),B=I(i,"endFrame",-1),o=I(i,"margin",0),a=I(i,"spacing",0),h=e.cutX,l=e.cutY,i=e.cutWidth,u=e.cutHeight,c=e.realWidth,d=e.realHeight,p=Math.floor((c-o+a)/(s+a)),f=Math.floor((d-o+a)/(n+a)),g=p*f,m=e.x,v=s-m,y=s-(c-i-m),x=e.y,T=n-x,b=n-(d-u-x);(r=g{function f(t,e,i,s){var n=g-s.y-s.height;t.add(i,e,s.x,n,s.width,s.height)}var g;t.exports=function(t,e,i){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height),g=s.height;for(var n=i.split("\n"),r=/^[ ]*(- )*(\w+)+[: ]+(.*)/,o="",a="",h={x:0,y:0,width:0,height:0},l=0;l{var o=i(50030);function s(t){for(var e=t.mipmaps,i=0;i{t.exports={AtlasXML:i(89905),Canvas:i(72893),Image:i(4832),JSONArray:i(78566),JSONHash:i(39711),KTXParser:i(31403),PVRParser:i(82038),SpriteSheet:i(75549),SpriteSheetFromAtlas:i(47534),UnityYAML:i(86147)}},80341:t=>{t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},16536:(t,e,i)=>{i=new(i(83419))({initialize:function(t,e,i,s,n,r,o){(void 0===i||i<=0)&&(i=32),(void 0===s||s<=0)&&(s=32),void 0===n&&(n=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|s,this.imageMargin=0|n,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&t{i=new(i(83419))({initialize:function(t){if(this.gids=[],void 0!==t)for(var e=0;e{var l=i(80341),u=i(87010),c=i(46177),d=i(49075);t.exports=function(t,e,i,s,n,r,o,a){void 0===i&&(i=32),void 0===s&&(s=32),void 0===n&&(n=10),void 0===r&&(r=10),void 0===a&&(a=!1);var h=null;return Array.isArray(o)?h=c(void 0!==e?e:"map",l.ARRAY_2D,o,i,s,a):void 0!==e&&((o=t.cache.tilemap.get(e))?h=c(e,o.format,o.data,i,s,a):console.warn("No map data found for key "+e)),null===h&&(h=new u({tileWidth:i,tileHeight:s,width:n,height:r})),new d(t,h)}},23029:(t,e,i)=>{var s=i(83419),n=i(31401),r=i(91907),o=i(62644),a=i(93232),i=new s({Mixins:[n.AlphaSingle,n.Flip,n.Visible],initialize:function(t,e,i,s,n,r,o,a){this.layer=t,this.index=e,this.x=i,this.y=s,this.width=n,this.height=r,this.right,this.bottom,this.baseWidth=void 0!==o?o:n,this.baseHeight=void 0!==a?a:r,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,(this.collisionCallbackContext=this).tint=16777215,this.tintFill=!1,this.physics={}},containsPoint:function(t,e){return!(tthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=o(t.properties),this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldXY(this.x,this.y,void 0,t).x:this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldXY(this.x,this.y,void 0,t).y:this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return(e=void 0===e?new a:e).x=this.getLeft(t),e.y=this.getTop(t),e.width=this.getRight(t)-e.x,e.height=this.getBottom(t)-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},intersects:function(t,e,i,s){return!(i<=this.pixelX||s<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){return void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,s,n){return void 0===e&&(e=t),void 0===i&&(i=t),void 0===s&&(s=t),void 0===n&&(n=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=s,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=s,n&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,s){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==s&&(this.baseHeight=s),this.updatePixelXY(),this},updatePixelXY:function(){var t,e,i,s=this.layer.orientation;return s===r.ORTHOGONAL?(this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight):s===r.ISOMETRIC?(this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5):s===r.STAGGERED?(this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2)):s===r.HEXAGONAL&&(s=this.layer.staggerAxis,e=this.layer.staggerIndex,i=this.layer.hexSideLength,"y"===s?(t=(this.baseHeight-i)/2+i,this.pixelX="odd"===e?this.x*this.baseWidth+this.y%2*(this.baseWidth/2):this.x*this.baseWidth-this.y%2*(this.baseWidth/2),this.pixelY=this.y*t):"x"===s&&(t=(this.baseWidth-i)/2+i,this.pixelX=this.x*t,this.pixelY="odd"===e?this.y*this.baseHeight+this.x%2*(this.baseHeight/2):this.y*this.baseHeight-this.x%2*(this.baseHeight/2))),this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||void 0!==this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){t=t.gidMap[this.index];if(t)return t}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=i},49075:(t,e,i)=>{var u=i(84101),s=i(83419),E=i(39506),c=i(80341),_=i(95540),d=i(14977),A=i(27462),P=i(91907),M=i(36305),n=i(19133),R=i(68287),p=i(23029),h=i(81086),f=i(20442),g=i(33629),i=new s({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.renderOrder=e.renderOrder,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tiles=e.tiles,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0,this.hexSideLength=e.hexSideLength;t=this.orientation;this._convert={WorldToTileXY:h.GetWorldToTileXYFunction(t),WorldToTileX:h.GetWorldToTileXFunction(t),WorldToTileY:h.GetWorldToTileYFunction(t),TileToWorldXY:h.GetTileToWorldXYFunction(t),TileToWorldX:h.GetTileToWorldXFunction(t),TileToWorldY:h.GetTileToWorldYFunction(t),GetTileCorners:h.GetTileCornersFunction(t)}},setRenderOrder:function(t){var e=["right-down","left-down","right-up","left-up"];return"number"==typeof t&&(t=e[t]),-1{var s=i(44603),n=i(31989);s.register("tilemap",function(t){t=void 0!==t?t:{};return n(this.scene,t.key,t.tileWidth,t.tileHeight,t.width,t.height,t.data,t.insertNull)})},46029:(t,e,i)=>{var s=i(39429),a=i(31989);s.register("tilemap",function(t,e,i,s,n,r,o){return a(this.scene,t=null===t?void 0:t,e=null===e?void 0:e,i=null===i?void 0:i,s=null===s?void 0:s,n=null===n?void 0:n,r,o)})},20442:(t,e,i)=>{var s=i(83419),n=i(78389),r=i(31401),o=i(95643),a=i(81086),h=i(19218),l=i(26099),i=new s({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Depth,r.Flip,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.PostPipeline,r.Transform,r.Visible,r.ScrollFactor,n,h],initialize:function(t,e,i,s,n,r){o.call(this,t,"TilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],(this.layer.tilemapLayer=this).tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=a.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new l,this.collisionCategory=1,this.collisionMask=1,this.setTilesets(s),this.setAlpha(this.layer.alpha),this.setPosition(n,r),this.setOrigin(0,0),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(t){var e=[],i=[],s=this.tilemap;Array.isArray(t)||(t=[t]);for(var n=0;n{var i=i(61340),b=new i,w=new i,S=new i;t.exports=function(t,e,i,s){var n=e.cull(i),r=n.length,o=i.alpha*e.alpha;if(!(0===r||o<=0)){var a=b,h=w,l=S,u=(h.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),a.copyFrom(i.matrix),t.currentContext),c=e.gidMap;u.save(),(s?(a.multiplyWithOffset(s,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),h.e=e.x,h.f=e.y,a.multiply(h,l),l):(h.e-=i.scrollX*e.scrollFactorX,h.f-=i.scrollY*e.scrollFactorY,h)).copyToContext(u),(!t.antialias||1{i(29747);var s=i(99558),i=i(16153);t.exports={renderWebGL:s,renderCanvas:i}},99558:(t,e,i)=>{var R=i(70554);t.exports=function(t,e,i){var s=e.cull(i),n=s.length,r=i.alpha*e.alpha;if(!(0===n||r<=0)){var o=e.gidMap,a=t.pipelines.set(e.pipeline,e),h=R.getTintAppendFloatAlpha,l=e.scrollFactorX,u=e.scrollFactorY,c=e.x,d=e.y,p=e.scaleX,f=e.scaleY;t.pipelines.preBatch(e);for(var g=0;g{var s=i(83419),l=i(26099),i=new s({initialize:function(t,e,i,s,n,r,o,a,h){(void 0===i||i<=0)&&(i=32),(void 0===s||s<=0)&&(s=32),void 0===n&&(n=0),void 0===r&&(r=0),void 0===o&&(o={}),void 0===a&&(a={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=s,this.tileMargin=n,this.tileSpacing=r,this.tileProperties=o,this.tileData=a,this.tileOffset=new l,void 0!==h&&this.tileOffset.set(h.x,h.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){t=this.getTileData(t);return t&&t.objectgroup?t.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&tt.width||e.height>t.height?this.updateTileData(e.width,e.height):this.updateTileData(t.width,t.height,t.x,t.y),this},setTileSize:function(t,e){return void 0!==t&&(this.tileWidth=t),void 0!==e&&(this.tileHeight=e),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(t,e){return void 0!==t&&(this.tileMargin=t),void 0!==e&&(this.tileSpacing=e),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0);e=(e-2*this.tileMargin+this.tileSpacing)/(this.tileHeight+this.tileSpacing),t=(t-2*this.tileMargin+this.tileSpacing)/(this.tileWidth+this.tileSpacing);e%1==0&&t%1==0||console.warn("Image tile area not tile size multiple in: "+this.name),e=Math.floor(e),t=Math.floor(t),this.rows=e,this.columns=t,this.total=e*t,this.texCoordinates.length=0;for(var n=this.tileMargin+i,r=this.tileMargin+s,o=0;o{var a=i(7423);t.exports=function(t,e,i){var s=a(t,e,!0,i),n=a(t,e-1,!0,i),r=a(t,e+1,!0,i),o=a(t-1,e,!0,i),t=a(t+1,e,!0,i),e=s&&s.collides;return e&&(s.faceTop=!0,s.faceBottom=!0,s.faceLeft=!0,s.faceRight=!0),n&&n.collides&&(e&&(s.faceTop=!1),n.faceBottom=!e),r&&r.collides&&(e&&(s.faceBottom=!1),r.faceTop=!e),o&&o.collides&&(e&&(s.faceLeft=!1),o.faceRight=!e),t&&t.collides&&(e&&(s.faceRight=!1),t.faceLeft=!e),s&&!s.collides&&s.resetFaces(),s}},42573:(t,e,i)=>{var d=i(7423),p=i(7386);t.exports=function(t,e,i,s,n){for(var r,o,a,h,l=p(t,e,i,s,null,n),u=0;u{var a=new(i(26099));t.exports=function(t,e,i,s){var n=i.tilemapLayer,r=n.cullPaddingX,o=n.cullPaddingY,t=n.tilemap.tileToWorldXY(t,e,a,s,n);return t.x>s.worldView.x+n.scaleX*i.tileWidth*(-r-.5)&&t.xs.worldView.y+n.scaleY*i.tileHeight*(-o-1)&&t.y{var m=i(42573),v=i(7386),y=i(62991),x=i(23029);t.exports=function(t,e,i,s,n,r,o,a){void 0===o&&(o=!0);var h=v(t,e,i,s,null,a),l=[];h.forEach(function(t){var e=new x(t.layer,t.index,t.x,t.y,t.width,t.height,t.baseWidth,t.baseHeight);e.copy(t),l.push(e)});for(var u=n-t,c=r-e,d=0;d{var T=i(62644),b=i(7386),w=i(27987);t.exports=function(t,e,i,s,n,r){i=i||{},Array.isArray(t)||(t=[t]);var o=r.tilemapLayer;s=s||o.scene,n=n||s.cameras.main;for(var a=r.width,h=r.height,l=b(0,0,a,h,null,r),u=[],c=0;c{var s=i(87841),o=i(63448),a=i(56583),h=new s;t.exports=function(t,e){var i=t.tilemapLayer.tilemap,t=t.tilemapLayer,s=Math.floor(i.tileWidth*t.scaleX),i=Math.floor(i.tileHeight*t.scaleY),n=a(e.worldView.x-t.x,s,0,!0)-t.cullPaddingX,s=o(e.worldView.right-t.x,s,0,!0)+t.cullPaddingX,r=a(e.worldView.y-t.y,i,0,!0)-t.cullPaddingY,e=o(e.worldView.bottom-t.y,i,0,!0)+t.cullPaddingY;return h.setTo(n,r,s-n,e-r)}},30003:(t,e,i)=>{var r=i(19545),o=i(32483);t.exports=function(t,e,i,s){void 0===s&&(s=0),(i=void 0===i?[]:i).length=0;var n=t.tilemapLayer,e=r(t,e);return!n.skipCull&&1===n.scrollFactorX&&1===n.scrollFactorY||(e.left=0,e.right=t.width,e.top=0,e.bottom=t.height),o(t,e,s,i),i}},35137:(t,e,i)=>{var u=i(7386),c=i(42573),d=i(20576);t.exports=function(t,e,i,s,n,r,o){for(var a=-1!==o.collideIndexes.indexOf(t),h=u(e,i,s,n,null,o),l=0;l{var h=i(7386);t.exports=function(t,e,i,s,n,r,o,a){return h(i,s,n,r,o,a).filter(t,e)}},52692:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=0);var n,r,o,a=0;if(i=void 0===i?!1:i){for(r=s.height-1;0<=r;r--)for(n=s.width-1;0<=n;n--)if((o=s.data[r][n])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;r{var h=i(7386);t.exports=function(t,e,i,s,n,r,o,a){return h(i,s,n,r,o,a).find(t,e)||null}},97560:(t,e,i)=>{var h=i(7386);t.exports=function(t,e,i,s,n,r,o,a){h(i,s,n,r,o,a).forEach(t,e)}},43305:(t,e,i)=>{var s=i(91907),n=i(30003),r=i(9474),o=i(14018),a=i(29747),h=i(54503);t.exports=function(t){return t===s.ORTHOGONAL?n:t===s.HEXAGONAL?r:t===s.STAGGERED?h:t===s.ISOMETRIC?o:a}},7423:(t,e,i)=>{var n=i(62991);t.exports=function(t,e,i,s){return n(t,e,s)&&(s=s.data[e][t]||null)&&(-1!==s.index||i)?s:null}},60540:(t,e,i)=>{var r=i(7423),o=new(i(26099));t.exports=function(t,e,i,s,n){return n.tilemapLayer.worldToTileXY(t,e,!0,o,s),r(o.x,o.y,i,n)}},55826:(t,e,i)=>{var h=i(26099);t.exports=function(t,e,i,s){var n=s.baseTileWidth,r=s.baseTileHeight,s=s.tilemapLayer,o=0,a=0,i=(s&&(i=i||s.scene.cameras.main,o=s.x+i.scrollX*(1-s.scrollFactorX),a=s.y+i.scrollY*(1-s.scrollFactorY),n*=s.scaleX,r*=s.scaleY),o+t*n),s=a+e*r;return[new h(i,s),new h(i+n,s),new h(i+n,s+r),new h(i,s+r)]}},11758:(t,e,i)=>{var s=i(91907),n=i(27229),r=i(29747),o=i(55826);t.exports=function(t){return t===s.ORTHOGONAL?o:t===s.ISOMETRIC?r:t===s.HEXAGONAL?n:(s.STAGGERED,r)}},39167:(t,e,i)=>{var s=i(91907),n=i(29747),r=i(97281);t.exports=function(t){return t===s.ORTHOGONAL?r:n}},62e3:(t,e,i)=>{var s=i(91907),n=i(19951),r=i(14127),o=i(29747),a=i(97202),h=i(70326);t.exports=function(t){return t===s.ORTHOGONAL?h:t===s.ISOMETRIC?r:t===s.HEXAGONAL?n:t===s.STAGGERED?a:o}},5984:(t,e,i)=>{var s=i(91907),n=i(29747),r=i(28054),o=i(29650);t.exports=function(t){return t===s.ORTHOGONAL?o:t===s.STAGGERED?r:n}},7386:(t,e,i)=>{var p=i(95540);t.exports=function(t,e,i,s,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=r.width),void 0===s&&(s=r.height);var o=p(n=n||{},"isNotEmpty",!1),a=p(n,"isColliding",!1),h=p(n,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(s+=e,e=0),t+i>r.width&&(i=Math.max(r.width-t,0)),r.height{function f(t,e){return v.RectangleToTriangle(e,t)}var g=i(55738),m=i(7386),v=i(91865),y=i(29747),i=i(26099),x=new i,T=new i,b=new i;t.exports=function(t,e,i,s){if(void 0===t)return[];var n=y,r=(t instanceof g.Circle?n=v.CircleToRectangle:t instanceof g.Rectangle?n=v.RectangleToRectangle:t instanceof g.Triangle?n=f:t instanceof g.Line&&(n=v.LineToRectangle),s.tilemapLayer.worldToTileXY(t.left,t.top,!0,T,i),T.x),o=T.y,a=(s.tilemapLayer.worldToTileXY(t.right,t.bottom,!1,b,i),Math.ceil(b.x)),h=Math.ceil(b.y),a=Math.max(a-r,1),h=Math.max(h-o,1),l=m(r,o,a,h,e,s),r=s.tileWidth,o=s.tileHeight;s.tilemapLayer&&(r*=s.tilemapLayer.scaleX,o*=s.tilemapLayer.scaleY);for(var u=[],c=new g.Rectangle(0,0,r,o),d=0;d{var u=i(7386),i=i(26099),c=new i,d=new i;t.exports=function(t,e,i,s,n,r,o){var a=o.tilemapLayer.tilemap._convert.WorldToTileXY,h=(a(t,e,!0,c,r,o),c.x),l=c.y,a=(a(t+i,e+s,!1,d,r,o),Math.ceil(d.x)),t=Math.ceil(d.y);return u(h,l,a-h,t-l,n,o)}},96113:(t,e,i)=>{var s=i(91907),n=i(20242),r=i(10095);t.exports=function(t){return t===s.ORTHOGONAL?r:n}},16926:(t,e,i)=>{var s=i(91907),n=i(86625),r=i(96897),o=i(29747),a=i(15108),h=i(85896);t.exports=function(t){return t===s.ORTHOGONAL?h:t===s.ISOMETRIC?r:t===s.HEXAGONAL?n:t===s.STAGGERED?a:o}},55762:(t,e,i)=>{var s=i(91907),n=i(20242),r=i(51900),o=i(63288);t.exports=function(t){return t===s.ORTHOGONAL?o:t===s.STAGGERED?r:n}},45091:(t,e,i)=>{var s=i(62991);t.exports=function(t,e,i){return!!s(t,e,i)&&null!==(i=i.data[e][t])&&-1{var n=i(45091),r=new(i(26099));t.exports=function(t,e,i,s){s.tilemapLayer.worldToTileXY(t,e,!0,r,i);t=r.x,e=r.y;return n(t,e,s)}},90454:(t,e,i)=>{var l=i(63448),u=i(56583);t.exports=function(t,e){var i,s,n,r=t.tilemapLayer.tilemap,o=t.tilemapLayer,a=Math.floor(r.tileWidth*o.scaleX),r=Math.floor(r.tileHeight*o.scaleY),h=t.hexSideLength;return a="y"===t.staggerAxis?(t=(r-h)/2+h,i=u(e.worldView.x-o.x,a,0,!0)-o.cullPaddingX,s=l(e.worldView.right-o.x,a,0,!0)+o.cullPaddingX,n=u(e.worldView.y-o.y,t,0,!0)-o.cullPaddingY,l(e.worldView.bottom-o.y,t,0,!0)+o.cullPaddingY):(i=u(e.worldView.x-o.x,t=(a-h)/2+h,0,!0)-o.cullPaddingX,s=l(e.worldView.right-o.x,t,0,!0)+o.cullPaddingX,n=u(e.worldView.y-o.y,r,0,!0)-o.cullPaddingY,l(e.worldView.bottom-o.y,r,0,!0)+o.cullPaddingY),{left:i,right:s,top:n,bottom:a}}},9474:(t,e,i)=>{var r=i(90454),o=i(32483);t.exports=function(t,e,i,s){void 0===s&&(s=0),(i=void 0===i?[]:i).length=0;var n=t.tilemapLayer,e=r(t,e);return n.skipCull&&1===n.scrollFactorX&&1===n.scrollFactorY&&(e.left=0,e.right=t.width,e.top=0,e.bottom=t.height),o(t,e,s,i),i}},27229:(t,e,i)=>{var p=i(19951),f=i(26099),g=new f;t.exports=function(t,e,i,s){var n=s.baseTileWidth,r=s.baseTileHeight,o=s.tilemapLayer;o&&(n*=o.scaleX,r*=o.scaleY);for(var a,h=p(t,e,g,i,s),l=[],o=.5773502691896257,u="y"===s.staggerAxis?(a=o*n,r/2):(a=n/2,o*r),c=0;c<6;c++){var d=2*Math.PI*(.5-c)/6;l.push(new f(h.x+a*Math.cos(d),h.y+u*Math.sin(d)))}return l}},19951:(t,e,i)=>{var p=i(26099);t.exports=function(t,e,i,s,n){i=i||new p;var r=n.baseTileWidth,o=n.baseTileHeight,a=n.tilemapLayer,h=0,l=0;a&&(s=s||a.scene.cameras.main,h=a.x+s.scrollX*(1-a.scrollFactorX),l=a.y+s.scrollY*(1-a.scrollFactorY),r*=a.scaleX,o*=a.scaleY);var u,c,s=r/2,a=o/2,d=n.staggerAxis,n=n.staggerIndex;return"y"===d?(u=h+r*t+r,c=l+1.5*e*a+a,e%2==0&&("odd"===n?u-=s:u+=s)):"x"===d&&"odd"===n&&(u=h+1.5*t*s+s,c=l+o*t+o,t%2==0)&&("odd"===n?c-=a:c+=a),i.set(u,c)}},86625:(t,e,i)=>{var g=i(26099);t.exports=function(t,e,i,s,n,r){s=s||new g;var o=r.baseTileWidth,a=r.baseTileHeight,h=r.tilemapLayer;h&&(n=n||h.scene.cameras.main,t-=h.x+n.scrollX*(1-h.scrollFactorX),e-=h.y+n.scrollY*(1-h.scrollFactorY),o*=h.scaleX,a*=h.scaleY);var l,u,n=.5773502691896257,h=-.3333333333333333,c=.6666666666666666,d=o/2,p=a/2,o="y"===r.staggerAxis?(u=n*(f=(t-d)/(n*o))+h*(l=(e-p)/p),0*f+c*l):(u=h*(f=(t-d)/d)+n*(l=(e-p)/(n*a)),c*f+0*l),h=-u-o,t=Math.round(u),d=Math.round(o),e=Math.round(h),p=Math.abs(t-u),n=Math.abs(d-o),a=Math.abs(e-h),c=(n{t.exports=function(t,e,i){return 0<=t&&t{var f=i(33528);t.exports=function(t,e,i,s){void 0===s&&(s=0),(i=void 0===i?[]:i).length=0;var n,r,o,a=t.tilemapLayer,h=t.data,l=t.width,u=t.height,c=a.skipCull,d=l,p=u;if(0===s)for(r=0;r{var l=i(26099);t.exports=function(t,e,i,s,n){i=i||new l;var r=n.baseTileWidth,o=n.baseTileHeight,n=n.tilemapLayer,a=0,h=0;return n&&(s=s||n.scene.cameras.main,a=n.x+s.scrollX*(1-n.scrollFactorX),r*=n.scaleX,h=n.y+s.scrollY*(1-n.scrollFactorY),o*=n.scaleY),i.set(a+r/2*(t-e),h+(t+e)*(o/2))}},96897:(t,e,i)=>{var l=i(26099);t.exports=function(t,e,i,s,n,r,o){s=s||new l;var a=r.baseTileWidth,h=r.baseTileHeight,r=r.tilemapLayer,n=(r&&(n=n||r.scene.cameras.main,e-=r.y+n.scrollY*(1-r.scrollFactorY),h*=r.scaleY,t-=r.x+n.scrollX*(1-r.scrollFactorX),a*=r.scaleX),a/2),r=h/2,a=(o||(e-=h),.5*((t-=n)/n+e/r)),o=.5*(-t/n+e/r);return i&&(a=Math.floor(a),o=Math.floor(o)),s.set(a,o)}},71558:(t,e,i)=>{var l=i(23029),u=i(62991),c=i(72023),d=i(20576);t.exports=function(t,e,i,s,n){var r,o,a,h;return void 0===s&&(s=!0),u(e,i,n)?(r=(r=n.data[i][e])&&r.collides,t instanceof l?(null===n.data[i][e]&&(n.data[i][e]=new l(n,t.index,e,i,n.tileWidth,n.tileHeight)),n.data[i][e].copy(t)):(h=t,null===n.data[i][e]?n.data[i][e]=new l(n,h,e,i,n.tileWidth,n.tileHeight):n.data[i][e].index=h),o=n.data[i][e],a=-1!==n.collideIndexes.indexOf(o.index),-1===(h=t instanceof l?t.index:t)?(o.width=n.tileWidth,o.height=n.tileHeight):(h=(t=n.tilemapLayer.tilemap).tiles[h][2],t=t.tilesets[h],o.width=t.tileWidth,o.height=t.tileHeight),d(o,a),s&&r!==o.collides&&c(e,i,n),o):null}},26303:(t,e,i)=>{var o=i(71558),a=new(i(26099));t.exports=function(t,e,i,s,n,r){return r.tilemapLayer.worldToTileXY(e,i,!0,a,n,r),o(t,a.x,a.y,s,r)}},14051:(t,e,i)=>{var u=i(42573),c=i(71558);t.exports=function(t,e,i,s,n){if(void 0===s&&(s=!0),!Array.isArray(t))return null;for(var r=(t=Array.isArray(t[0])?t:[t]).length,o=t[0].length,a=0;a{var h=i(7386),l=i(26546);t.exports=function(t,e,i,s,n,r){var o,a=h(t,e,i,s,{},r);if(!n)for(n=[],o=0;o{var o=i(23029),a=i(62991),h=i(72023);t.exports=function(t,e,i,s,n){var r;return void 0===i&&(i=!0),void 0===s&&(s=!0),a(t,e,n)&&(r=n.data[e][t])?(n.data[e][t]=i?null:new o(n,-1,t,e,n.tileWidth,n.tileHeight),s&&r&&r.collides&&h(t,e,n),r):null}},94178:(t,e,i)=>{var o=i(63557),a=new(i(26099));t.exports=function(t,e,i,s,n,r){return r.tilemapLayer.worldToTileXY(t,e,!0,a,n,r),o(a.x,a.y,i,s,r)}},15533:(t,e,i)=>{var f=i(7386),i=i(3956),g=new i(105,210,231,150),m=new i(243,134,48,200),v=new i(40,39,37,150);t.exports=function(t,e,i){var s=void 0!==(e=void 0===e?{}:e).tileColor?e.tileColor:g,n=void 0!==e.collidingTileColor?e.collidingTileColor:m,r=void 0!==e.faceColor?e.faceColor:v,o=f(0,0,i.width,i.height,null,i);t.translateCanvas(i.tilemapLayer.x,i.tilemapLayer.y),t.scaleCanvas(i.tilemapLayer.scaleX,i.tilemapLayer.scaleY);for(var a=0;a{var l=i(7386);t.exports=function(t,e,i,s,n,r,o){for(var a=l(i,s,n,r,null,o),h=0;h{t.exports=function(t,e,i,s){var n,r,o,a=t.data,h=t.width,l=t.height,t=t.tilemapLayer,u=Math.max(0,e.left),c=Math.min(h,e.right),d=Math.max(0,e.top),p=Math.min(l,e.bottom);if(0===i)for(r=d;r{var l=i(20576),u=i(42573),c=i(9589);t.exports=function(t,e,i,s,n){void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===n&&(n=!0),Array.isArray(t)||(t=[t]);for(var r=0;r{var u=i(20576),c=i(42573),d=i(9589);t.exports=function(t,e,i,s,n,r){if(void 0===i&&(i=!0),void 0===s&&(s=!0),void 0===r&&(r=!0),!(e=t&&l.index<=e&&u(l,i)}s&&c(0,0,n.width,n.height,n)}}},75661:(t,e,i)=>{var a=i(20576),h=i(42573),l=i(9589);t.exports=function(t,e,i,s){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var n=0;n{var u=i(20576),c=i(42573),d=i(97022);t.exports=function(t,e,i,s){void 0===e&&(e=!0),void 0===i&&(i=!0);for(var n=0;n{var a=i(20576),h=i(42573);t.exports=function(t,e,i){void 0===t&&(t=!0),void 0===e&&(e=!0);for(var s=0;s{t.exports=function(t,e,i){var s=i.collideIndexes.indexOf(t);e&&-1===s?i.collideIndexes.push(t):e||-1===s||i.collideIndexes.splice(s,1)}},20576:t=>{t.exports=function(t,e){e?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)}},79583:t=>{t.exports=function(t,e,i,s){if("number"==typeof t)s.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var n=0,r=t.length;n{var l=i(7386);t.exports=function(t,e,i,s,n,r,o){for(var a=l(t,e,i,s,null,o),h=0;h{var h=i(7386),l=i(33680);t.exports=function(t,e,i,s,n){var r=h(t,e,i,s,null,n),o=r.map(function(t){return t.index});l(o);for(var a=0;a{var n=i(63448),r=i(56583);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,t=t.tilemapLayer,s=Math.floor(i.tileWidth*t.scaleX),i=Math.floor(i.tileHeight*t.scaleY);return{left:r(e.worldView.x-t.x,s,0,!0)-t.cullPaddingX,right:n(e.worldView.right-t.x,s,0,!0)+t.cullPaddingX,top:r(e.worldView.y-t.y,i/2,0,!0)-t.cullPaddingY,bottom:n(e.worldView.bottom-t.y,i/2,0,!0)+t.cullPaddingY}}},54503:(t,e,i)=>{var r=i(61325),o=i(32483);t.exports=function(t,e,i,s){void 0===s&&(s=0),(i=void 0===i?[]:i).length=0;var n=t.tilemapLayer,e=r(t,e);return n.skipCull&&1===n.scrollFactorX&&1===n.scrollFactorY&&(e.left=0,e.right=t.width,e.top=0,e.bottom=t.height),o(t,e,s,i),i}},97202:(t,e,i)=>{var l=i(26099);t.exports=function(t,e,i,s,n){i=i||new l;var r=n.baseTileWidth,o=n.baseTileHeight,n=n.tilemapLayer,a=0,h=0;return n&&(s=s||n.scene.cameras.main,a=n.x+s.scrollX*(1-n.scrollFactorX),r*=n.scaleX,h=n.y+s.scrollY*(1-n.scrollFactorY),o*=n.scaleY),i.set(a+t*r+e%2*(r/2),h+e*(o/2))}},28054:t=>{t.exports=function(t,e,i){var s=i.baseTileHeight,i=i.tilemapLayer,n=0;return i&&(void 0===e&&(e=i.scene.cameras.main),n=i.y+e.scrollY*(1-i.scrollFactorY),s*=i.scaleY),n+t*(s/2)+s}},15108:(t,e,i)=>{var h=i(26099);t.exports=function(t,e,i,s,n,r){s=s||new h;var o=r.baseTileWidth,a=r.baseTileHeight,r=r.tilemapLayer,n=(r&&(n=n||r.scene.cameras.main,e-=r.y+n.scrollY*(1-r.scrollFactorY),a*=r.scaleY,t-=r.x+n.scrollX*(1-r.scrollFactorX),o*=r.scaleX),i?Math.floor(e/(a/2)):e/(a/2)),r=i?Math.floor((t+n%2*.5*o)/o):(t+n%2*.5*o)/o;return s.set(r,n)}},51900:t=>{t.exports=function(t,e,i,s){var n=s.baseTileHeight,s=s.tilemapLayer;return s&&(i=i||s.scene.cameras.main,t-=s.y+i.scrollY*(1-s.scrollFactorY),n*=s.scaleY),e?Math.floor(t/(n/2)):t/(n/2)}},86560:(t,e,i)=>{var l=i(7386);t.exports=function(t,e,i,s,n,r,o){for(var a=l(i,s,n,r,null,o),h=0;h{t.exports=function(t,e,i){var s=i.baseTileWidth,i=i.tilemapLayer,n=0;return i&&(e=e||i.scene.cameras.main,n=i.x+e.scrollX*(1-i.scrollFactorX),s*=i.scaleX),n+t*s}},70326:(t,e,i)=>{var r=i(97281),o=i(29650),a=i(26099);t.exports=function(t,e,i,s,n){return(i=i||new a(0,0)).x=r(t,s,n),i.y=o(e,s,n),i}},29650:t=>{t.exports=function(t,e,i){var s=i.baseTileHeight,i=i.tilemapLayer,n=0;return i&&(e=e||i.scene.cameras.main,n=i.y+e.scrollY*(1-i.scrollFactorY),s*=i.scaleY),n+t*s}},77366:(t,e,i)=>{var f=i(7386),g=i(75508);t.exports=function(t,e,i,s,n,r){if(n){for(var o=f(t,e,i,s,null,r),a=0,h=0;h{var n=i(85896),r=new(i(26099));t.exports=function(t,e,i,s){return n(t,0,e,r,i,s),r.x}},85896:(t,e,i)=>{var h=i(26099);t.exports=function(t,e,i,s,n,r){void 0===i&&(i=!0),s=s||new h;var o=r.baseTileWidth,a=r.baseTileHeight,r=r.tilemapLayer,n=(r&&(n=n||r.scene.cameras.main,t-=r.x+n.scrollX*(1-r.scrollFactorX),e-=r.y+n.scrollY*(1-r.scrollFactorY),o*=r.scaleX,a*=r.scaleY),t/o),r=e/a;return i&&(n=Math.floor(n),r=Math.floor(r)),s.set(n,r)}},63288:(t,e,i)=>{var n=i(85896),r=new(i(26099));t.exports=function(t,e,i,s){return n(0,t,e,r,i,s),r.y}},81086:(t,e,i)=>{t.exports={CalculateFacesAt:i(72023),CalculateFacesWithin:i(42573),CheckIsoBounds:i(33528),Copy:i(1785),CreateFromTiles:i(78419),CullBounds:i(19545),CullTiles:i(30003),Fill:i(35137),FilterTiles:i(40253),FindByIndex:i(52692),FindTile:i(66151),ForEachTile:i(97560),GetCullTilesFunction:i(43305),GetTileAt:i(7423),GetTileAtWorldXY:i(60540),GetTileCorners:i(55826),GetTileCornersFunction:i(11758),GetTilesWithin:i(7386),GetTilesWithinShape:i(91141),GetTilesWithinWorldXY:i(96523),GetTileToWorldXFunction:i(39167),GetTileToWorldXYFunction:i(62e3),GetTileToWorldYFunction:i(5984),GetWorldToTileXFunction:i(96113),GetWorldToTileXYFunction:i(16926),GetWorldToTileYFunction:i(55762),HasTileAt:i(45091),HasTileAtWorldXY:i(24152),HexagonalCullBounds:i(90454),HexagonalCullTiles:i(9474),HexagonalGetTileCorners:i(27229),HexagonalTileToWorldXY:i(19951),HexagonalWorldToTileXY:i(86625),IsInLayerBounds:i(62991),IsometricCullTiles:i(14018),IsometricTileToWorldXY:i(14127),IsometricWorldToTileXY:i(96897),PutTileAt:i(71558),PutTileAtWorldXY:i(26303),PutTilesAt:i(14051),Randomize:i(77389),RemoveTileAt:i(63557),RemoveTileAtWorldXY:i(94178),RenderDebug:i(15533),ReplaceByIndex:i(27987),RunCull:i(32483),SetCollision:i(57068),SetCollisionBetween:i(37266),SetCollisionByExclusion:i(75661),SetCollisionByProperty:i(64740),SetCollisionFromCollisionGroup:i(63307),SetLayerCollisionIndex:i(9589),SetTileCollision:i(20576),SetTileIndexCallback:i(79583),SetTileLocationCallback:i(93254),Shuffle:i(32903),StaggeredCullBounds:i(61325),StaggeredCullTiles:i(54503),StaggeredTileToWorldXY:i(97202),StaggeredTileToWorldY:i(28054),StaggeredWorldToTileXY:i(15108),StaggeredWorldToTileY:i(51900),SwapByIndex:i(86560),TileToWorldX:i(97281),TileToWorldXY:i(70326),TileToWorldY:i(29650),WeightedRandomize:i(77366),WorldToTileX:i(10095),WorldToTileXY:i(85896),WorldToTileY:i(63288)}},91907:t=>{t.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},21829:(t,e,i)=>{i={ORIENTATION:i(91907)};t.exports=i},62501:(t,e,i)=>{var s=i(79291),n=i(21829),s=s(!1,{Components:i(81086),Parsers:i(57442),Formats:i(80341),ImageCollection:i(16536),ParseToTilemap:i(31989),Tile:i(23029),Tilemap:i(49075),TilemapCreator:i(45939),TilemapFactory:i(46029),Tileset:i(33629),TilemapLayer:i(20442),Orientation:i(91907),LayerData:i(14977),MapData:i(87010),ObjectLayer:i(48700)},n.ORIENTATION);t.exports=s},14977:(t,e,i)=>{var s=i(83419),n=i(91907),r=i(95540),i=new s({initialize:function(t){this.name=r(t=void 0===t?{}:t,"name","layer"),this.id=r(t,"id",0),this.x=r(t,"x",0),this.y=r(t,"y",0),this.width=r(t,"width",0),this.height=r(t,"height",0),this.tileWidth=r(t,"tileWidth",0),this.tileHeight=r(t,"tileHeight",0),this.baseTileWidth=r(t,"baseTileWidth",this.tileWidth),this.baseTileHeight=r(t,"baseTileHeight",this.tileHeight),this.orientation=r(t,"orientation",n.ORTHOGONAL),this.widthInPixels=r(t,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=r(t,"heightInPixels",this.height*this.baseTileHeight),this.alpha=r(t,"alpha",1),this.visible=r(t,"visible",!0),this.properties=r(t,"properties",[]),this.indexes=r(t,"indexes",[]),this.collideIndexes=r(t,"collideIndexes",[]),this.callbacks=r(t,"callbacks",[]),this.bodies=r(t,"bodies",[]),this.data=r(t,"data",[]),this.tilemapLayer=r(t,"tilemapLayer",null),this.hexSideLength=r(t,"hexSideLength",0),this.staggerAxis=r(t,"staggerAxis","y"),this.staggerIndex=r(t,"staggerIndex","odd")}});t.exports=i},87010:(t,e,i)=>{var s=i(83419),n=i(91907),r=i(95540),i=new s({initialize:function(t){this.name=r(t=void 0===t?{}:t,"name","map"),this.width=r(t,"width",0),this.height=r(t,"height",0),this.infinite=r(t,"infinite",!1),this.tileWidth=r(t,"tileWidth",0),this.tileHeight=r(t,"tileHeight",0),this.widthInPixels=r(t,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=r(t,"heightInPixels",this.height*this.tileHeight),this.format=r(t,"format",null),this.orientation=r(t,"orientation",n.ORTHOGONAL),this.renderOrder=r(t,"renderOrder","right-down"),this.version=r(t,"version","1"),this.properties=r(t,"properties",{}),this.layers=r(t,"layers",[]),this.images=r(t,"images",[]),this.objects=r(t,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=r(t,"collision",{}),this.tilesets=r(t,"tilesets",[]),this.imageCollections=r(t,"imageCollections",[]),this.tiles=r(t,"tiles",[]),this.hexSideLength=r(t,"hexSideLength",0),this.staggerAxis=r(t,"staggerAxis","y"),this.staggerIndex=r(t,"staggerIndex","odd")}});t.exports=i},48700:(t,e,i)=>{var s=i(83419),n=i(95540),i=new s({initialize:function(t){this.name=n(t=void 0===t?{}:t,"name","object layer"),this.id=n(t,"id",0),this.opacity=n(t,"opacity",1),this.properties=n(t,"properties",{}),this.propertyTypes=n(t,"propertytypes",{}),this.type=n(t,"type","objectgroup"),this.visible=n(t,"visible",!0),this.objects=n(t,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});t.exports=i},6641:(t,e,i)=>{var s=i(91907);t.exports=function(t){return"isometric"===(t=t.toLowerCase())?s.ISOMETRIC:"staggered"===t?s.STAGGERED:"hexagonal"===t?s.HEXAGONAL:s.ORTHOGONAL}},46177:(t,e,i)=>{var a=i(80341),h=i(2342),l=i(82593),u=i(46594),c=i(87021);t.exports=function(t,e,i,s,n,r){var o;switch(e){case a.ARRAY_2D:o=h(t,i,s,n,r);break;case a.CSV:o=l(t,i,s,n,r);break;case a.TILED_JSON:o=u(t,i,r);break;case a.WELTMEISTER:o=c(t,i,r);break;default:console.warn("Unrecognized tilemap data format: "+e),o=null}return o}},2342:(t,e,i)=>{var p=i(80341),f=i(14977),g=i(87010),m=i(23029);t.exports=function(t,e,i,s,n){for(var r=new f({tileWidth:i,tileHeight:s}),t=new g({name:t,tileWidth:i,tileHeight:s,format:p.ARRAY_2D,layers:[r]}),o=[],a=e.length,h=0,l=0;l{var r=i(80341),o=i(2342);t.exports=function(t,e,i,s,n){e=e.trim().split("\n").map(function(t){return t.split(",")}),t=o(t,e,i,s,n);return t.format=r.CSV,t}},6656:(t,e,i)=>{var c=i(14977),d=i(23029);t.exports=function(t,e){for(var i=[],s=0;s{var o=i(33629);t.exports=function(t){for(var e=[],i=[],s=0;s{var o=i(80341),a=i(87010),h=i(6656),l=i(96483);t.exports=function(t,e,i){if(0===e.layer.length)return console.warn("No layers found in the Weltmeister map: "+t),null;for(var s=0,n=0,r=0;rs&&(s=e.layer[r].width),e.layer[r].height>n&&(n=e.layer[r].height);t=new a({width:s,height:n,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:o.WELTMEISTER});return t.layers=h(e,i),t.tilesets=l(e),t}},52833:(t,e,i)=>{t.exports={ParseTileLayers:i(6656),ParseTilesets:i(96483),ParseWeltmeister:i(87021)}},57442:(t,e,i)=>{t.exports={FromOrientationString:i(6641),Parse:i(46177),Parse2DArray:i(2342),ParseCSV:i(82593),Impact:i(52833),Tiled:i(96761)}},51233:(t,e,i)=>{var h=i(79291);t.exports=function(t){for(var e,i=0;i{t.exports=function(t){for(var e=window.atob(t),i=e.length,s=new Array(i/4),n=0;n>>0;return s}},84101:(t,e,i)=>{var f=i(33629);t.exports=function(t){for(var e,i=[],s=0;s{var r=i(95540);t.exports=function(t,e,i){var s,n;return e?(s=e.x+r(e,"startx",0)*t.tilewidth+r(e,"offsetx",0),n=e.y+r(e,"starty",0)*t.tileheight+r(e,"offsety",0),{i:0,layers:e.layers,name:i.name+e.name+"/",opacity:i.opacity*e.opacity,visible:i.visible&&e.visible,x:i.x+s,y:i.y+n}):{i:0,layers:t.layers,name:"",opacity:1,visible:!0,x:0,y:0}}},29920:t=>{t.exports=function(t){var e=Boolean(2147483648&t),i=Boolean(1073741824&t),s=Boolean(536870912&t),n=(t&=536870911,0),r=!1;return e&&i&&s?(n=Math.PI/2,r=!0):e&&i&&!s?(n=Math.PI,r=!1):e&&!i&&s?(n=Math.PI/2,r=!1):!e||i||s?!e&&i&&s?(n=3*Math.PI/2,r=!1):e||!i||s?e||i||!s?e||i||s||(n=0,r=!1):(n=3*Math.PI/2,r=!0):(n=Math.PI,r=!0):r=!(n=0),{gid:t,flippedHorizontal:e,flippedVertical:i,flippedAntiDiagonal:s,rotation:n,flipped:r}}},12635:(t,e,i)=>{var a=i(95540),h=i(79677);t.exports=function(t){for(var e=[],i=[],s=h(t);s.i=s.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}s=i.pop()}else{var n,r,o=s.layers[s.i];s.i++,"imagelayer"===o.type?(r=a(o,"offsetx",0)+a(o,"startx",0),n=a(o,"offsety",0)+a(o,"starty",0),e.push({name:s.name+o.name,image:o.image,x:s.x+r+o.x,y:s.y+n+o.y,alpha:s.opacity*o.opacity,visible:s.visible&&o.visible,properties:a(o,"properties",{})})):"group"===o.type&&(r=h(t,o,s),i.push(s),s=r)}return e}},46594:(t,e,i)=>{var s=i(51233),n=i(84101),r=i(91907),o=i(62644),a=i(80341),h=i(6641),l=i(87010),u=i(12635),c=i(22611),d=i(28200),p=i(24619);t.exports=function(t,e,i){e=o(e),t=new l({width:e.width,height:e.height,name:t,tileWidth:e.tilewidth,tileHeight:e.tileheight,orientation:h(e.orientation),format:a.TILED_JSON,version:e.version,properties:e.properties,renderOrder:e.renderorder,infinite:e.infinite}),t.orientation===r.HEXAGONAL&&(t.hexSideLength=e.hexsidelength,t.staggerAxis=e.staggeraxis,t.staggerIndex=e.staggerindex),t.layers=d(e,i),t.images=u(e),i=p(e);return t.tilesets=i.tilesets,t.imageCollections=i.imageCollections,t.objects=c(e),t.tiles=n(t),s(t),t}},52205:(t,e,i)=>{function n(t){return{x:t.x,y:t.y}}var r=i(18254),o=i(29920),a=["id","name","type","rotation","properties","visible","x","y","width","height"];t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var s=r(t,a);return s.x+=e,s.y+=i,t.gid?(e=o(t.gid),s.gid=e.gid,s.flippedHorizontal=e.flippedHorizontal,s.flippedVertical=e.flippedVertical,s.flippedAntiDiagonal=e.flippedAntiDiagonal):t.polyline?s.polyline=t.polyline.map(n):t.polygon?s.polygon=t.polygon.map(n):t.ellipse?s.ellipse=t.ellipse:t.text?s.text=t.text:t.point?s.point=!0:s.rectangle=!0,s}},22611:(t,e,i)=>{var c=i(95540),d=i(52205),p=i(48700),f=i(79677);t.exports=function(t){for(var e=[],i=[],s=f(t);s.i=s.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}s=i.pop()}else{var n=s.layers[s.i];if(s.i++,n.opacity*=s.opacity,n.visible=s.visible&&n.visible,"objectgroup"===n.type){n.name=s.name+n.name;for(var r=s.x+c(n,"startx",0)+c(n,"offsetx",0),o=s.y+c(n,"starty",0)+c(n,"offsety",0),a=[],h=0;h{var R=i(41868),L=i(91907),O=i(79677),D=i(6641),k=i(95540),F=i(14977),B=i(29920),I=i(23029);t.exports=function(t,e){for(var i=k(t,"infinite",!1),s=[],n=[],r=O(t);r.i=r.layers.length){if(n.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=n.pop()}else{var o,a=r.layers[r.i];if(r.i++,"tilelayer"===a.type)if(a.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+a.name+"'");else{if(a.encoding&&"base64"===a.encoding){if(a.chunks)for(var h=0;h{var T=i(33629),b=i(16536),w=i(52205),S=i(57880);t.exports=function(t){for(var e,i=[],s=[],n=null,r=0;r{t.exports=function(t,e){for(var i=0;i{t.exports={AssignTileProperties:i(51233),Base64Decode:i(41868),BuildTilesetIndex:i(84101),CreateGroupLayer:i(79677),ParseGID:i(29920),ParseImageLayers:i(12635),ParseJSONTiled:i(46594),ParseObject:i(52205),ParseObjectLayers:i(22611),ParseTileLayers:i(28200),ParseTilesets:i(24619)}},33385:(t,e,i)=>{var s=i(83419),n=i(37277),r=i(44594),o=i(94880),a=i(72905),i=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var t=this.systems.events;t.on(r.PRE_UPDATE,this.preUpdate,this),t.on(r.UPDATE,this.update,this),t.once(r.SHUTDOWN,this.shutdown,this)},addEvent:function(t){var e;return t instanceof o?(this.removeEvent(e=t),e.elapsed=e.startAt,e.hasDispatched=!1,e.repeatCount=-1===e.repeat||e.loop?999999999999:e.repeat):e=new o(t),this._pendingInsertion.push(e),e},delayedCall:function(t,e,i,s){return this.addEvent({delay:t,callback:e,args:i,callbackScope:s})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e=s.delay)){var n=s.elapsed-s.delay;if(s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),0=s.delay)for(;n>=s.delay&&0{var s=i(83419),n=i(50792),r=i(39429),a=i(95540),o=i(44594),h=i(89809),l=new s({Extends:n,initialize:function(t,e){n.call(this),this.scene=t,this.systems=t.sys,this.elapsed=0,this.timeScale=1,this.paused=!0,this.complete=!1,this.totalComplete=0,this.loop=0,this.iteration=0,this.events=[];t=this.systems.events;t.on(o.PRE_UPDATE,this.preUpdate,this),t.on(o.UPDATE,this.update,this),t.once(o.SHUTDOWN,this.destroy,this),e&&this.add(e)},preUpdate:function(t,e){this.paused||(this.elapsed+=e*this.timeScale)},update:function(){if(!this.paused&&!this.complete){for(var t,e=this.events,i=!1,s=this.systems,n=0;n=e.length&&(0!==this.loop&&(-1===this.loop||this.loop>this.iteration)?(this.iteration++,this.reset(!0)):this.complete=!0),this.complete&&this.emit(h.COMPLETE,this)}},play:function(t){return void 0===t&&(t=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,t&&this.reset(),this},pause:function(){this.paused=!0;for(var t=this.events,e=0;e{var s=i(83419),n=i(95540),i=new s({initialize:function(t){this.delay=0,this.repeat=0,this.repeatCount=0,this.loop=!1,this.callback,this.callbackScope,this.args,this.timeScale=1,this.startAt=0,this.elapsed=0,this.paused=!1,this.hasDispatched=!1,this.reset(t)},reset:function(t){if(this.delay=n(t,"delay",0),this.repeat=n(t,"repeat",0),this.loop=n(t,"loop",!1),this.callback=n(t,"callback",void 0),this.callbackScope=n(t,"callbackScope",this),this.args=n(t,"args",[]),this.timeScale=n(t,"timeScale",1),this.startAt=n(t,"startAt",0),this.paused=n(t,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=-1===this.repeat||this.loop?999999999999:this.repeat,0===this.delay&&(0{t.exports="complete"},89809:(t,e,i)=>{t.exports={COMPLETE:i(35945)}},90291:(t,e,i)=>{t.exports={Clock:i(33385),Events:i(89809),Timeline:i(96120),TimerEvent:i(94880)}},40382:(t,e,i)=>{var s=i(72905),n=i(83419),a=i(43491),r=i(88032),o=i(37277),h=i(44594),l=i(93109),u=i(86081),c=i(8357),d=i(43960),p=i(26012),i=new n({initialize:function(t){this.scene=t,this.events=t.sys.events,this.timeScale=1,this.paused=!1,this.processing=!1,this.tweens=[],this.time=0,this.startTime=0,this.nextTime=0,this.prevTime=0,this.maxLag=500,this.lagSkip=33,this.gap=1e3/240,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.events.once(h.DESTROY,this.destroy,this)},start:function(){this.timeScale=1,this.paused=!1,this.startTime=Date.now(),this.prevTime=this.startTime,this.nextTime=this.gap,this.events.on(h.UPDATE,this.update,this),this.events.once(h.SHUTDOWN,this.shutdown,this)},create:function(t){Array.isArray(t)||(t=[t]);for(var e=[],i=0;ithis.maxLag&&(this.startTime+=e-this.lagSkip),this.prevTime+=e,this.prevTime-this.startTime),i=e-this.nextTime,s=e-1e3*this.time;return 0=this.gap?4:this.gap-i)):s=0,s},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(t){var e=this.getDelta(t=void 0===t?!1:t);if(!(e<=0)){this.processing=!0;for(var i=[],s=this.tweens,n=0;n{t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},6113:(t,e,i)=>{var o=i(62640),a=i(35355);t.exports=function(t,e){var i,s,n,r=o.Power0;return"string"==typeof t?(o.hasOwnProperty(t)||(i="",t.indexOf(".")&&("in"===(s=(i=t.substring(t.indexOf(".")+1)).toLowerCase())?i="easeIn":"out"===s?i="easeOut":"inout"===s&&(i="easeInOut")),t=a(t.substring(0,t.indexOf(".")+1)+i),o.hasOwnProperty(t)))&&(r=o[t]):"function"==typeof t&&(r=t),e?((n=e.slice(0)).unshift(0),function(t){return n[0]=t,r.apply(this,n)}):r}},91389:(t,e,i)=>{var s=i(89318),n=i(77259),r={bezier:s,catmull:n,catmullrom:n,linear:i(28392)};t.exports=function(t){var e;return null===t?null:(e=r.linear,"string"==typeof t?r.hasOwnProperty(t)&&(e=r[t]):"function"==typeof t&&(e=t),e)}},55292:t=>{t.exports=function(o,a,t){var e=o.hasOwnProperty(a)?"function"==typeof o[a]?function(t,e,i,s,n,r){return o[a](t,e,i,s,n,r)}:function(){return o[a]}:"function"==typeof t?t:function(){return t};return e}},82985:(t,e,i)=>{var s=i(81076);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substring(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===s.indexOf(e)&&"_"!==e.substring(0,1)&&i.push({key:e,value:t[e]});return i}},62329:(t,e,i)=>{var s=i(35154);t.exports=function(t){t=s(t,"targets",null);return t=null===t||("function"==typeof t&&(t=t.call()),Array.isArray(t))?t:[t]}},17777:(t,e,i)=>{var g=i(30976),m=i(99472);function v(t){return t.getActive&&"function"==typeof t.getActive}function y(t){return t.getStart&&"function"==typeof t.getStart}function x(t){return t.getEnd&&"function"==typeof t.getEnd}function T(t,e){var i,s=function(t,e,i){return i},n=function(t,e,i){return i},r=null,o=typeof e;if("number"==o)s=function(){return e};else if(Array.isArray(e))n=function(){return e[0]},s=function(){return e[e.length-1]};else if("string"==o){var a="random"===(p=e.toLowerCase()).substring(0,6),h="int"===p.substring(0,3);if(a||h){var h=p.indexOf("("),l=p.indexOf(")"),u=p.indexOf(",");if(!(h&&l&&u))throw new Error("invalid random() format");var c=parseFloat(p.substring(h+1,u)),d=parseFloat(p.substring(u+1,l)),s=a?function(){return m(c,d)}:function(){return g(c,d)}}else{var p=p[0],f=parseFloat(e.substr(2));switch(p){case"+":s=function(t,e,i){return i+f};break;case"-":s=function(t,e,i){return i-f};break;case"*":s=function(t,e,i){return i*f};break;case"/":s=function(t,e,i){return i/f};break;default:s=function(){return parseFloat(e)}}}}else"function"==o?s=e:"object"==o&&(y(h=e)||x(h)||v(h)?(v(e)&&(r=e.getActive),x(e)&&(s=e.getEnd),y(e)&&(n=e.getStart)):e.hasOwnProperty("value")?i=T(t,e.value):(u=e.hasOwnProperty("to"),l=e.hasOwnProperty("from"),a=e.hasOwnProperty("start"),u&&(l||a)&&(i=T(t,e.to),a&&(p=T(t,e.start),i.getActive=p.getEnd),l)&&(o=T(t,e.from),i.getStart=o.getEnd)));return i=i||{getActive:r,getEnd:s,getStart:n}}t.exports=T},88032:(t,e,i)=>{var g=i(70402),m=i(69902),v=i(23568),y=i(57355),x=i(6113),T=i(55292),b=i(35154),w=i(17777),S=i(269),C=i(86081);t.exports=function(t,e,i){if(e instanceof C)return e.parent=t,e;i=void 0===i?m:S(m,i);var s=b(e,"from",0),n=b(e,"to",1),r=[{value:s}],o=b(e,"delay",i.delay),a=b(e,"easeParams",i.easeParams),h=b(e,"ease",i.ease),n=w("value",n),l=new C(t,r),t=l.add(0,"value",n.getEnd,n.getStart,n.getActive,x(b(e,"ease",h),b(e,"easeParams",a)),T(e,"delay",o),b(e,"duration",i.duration),y(e,"yoyo",i.yoyo),b(e,"hold",i.hold),b(e,"repeat",i.repeat),b(e,"repeatDelay",i.repeatDelay),!1,!1);t.start=s,t.current=s,l.completeDelay=v(e,"completeDelay",0),l.loop=Math.round(v(e,"loop",0)),l.loopDelay=Math.round(v(e,"loopDelay",0)),l.paused=y(e,"paused",!1),l.persist=y(e,"persist",!1),l.callbackScope=b(e,"callbackScope",l);for(var u=g.TYPES,c=0;c{var E=i(6113),_=i(35154),A=i(36383);t.exports=function(t,e){var o=_(e=void 0===e?{}:e,"start",0),i=_(e,"ease",null),s=_(e,"grid",null),a=_(e,"from",0),h="first"===a,l="center"===a,u="last"===a,c="number"==typeof a,d=Array.isArray(t),p=d?parseFloat(t[0]):parseFloat(t),f=d?parseFloat(t[1]):0,g=Math.max(p,f);if(d&&(o+=p),s){var m=s[0],v=s[1],n=0,r=0,y=[];u?(n=m-1,r=v-1):c?(n=a%m,r=Math.floor(a/m)):l&&(n=(m-1)/2,r=(v-1)/2);for(var x=A.MIN_SAFE_INTEGER,T=0;T{var A=i(70402),P=i(69902),M=i(23568),R=i(57355),L=i(6113),O=i(91389),D=i(55292),k=i(82985),F=i(62329),B=i(35154),I=i(17777),N=i(269),G=i(86081);t.exports=function(t,e,i){if(e instanceof G)return e.parent=t,e;i=void 0===i?P:N(P,i);var s=F(e);!s&&i.targets&&(s=i.targets);for(var n=k(e),o=B(e,"delay",i.delay),a=B(e,"duration",i.duration),h=B(e,"easeParams",i.easeParams),l=B(e,"ease",i.ease),u=B(e,"hold",i.hold),c=B(e,"repeat",i.repeat),d=B(e,"repeatDelay",i.repeatDelay),p=R(e,"yoyo",i.yoyo),f=R(e,"flipX",i.flipX),g=R(e,"flipY",i.flipY),m=B(e,"interpolation",i.interpolation),r=function(t,e,i,s){var n,r;"texture"===i?(n=s,r=void 0,Array.isArray(s)?(n=s[0],r=s[1]):s.hasOwnProperty("value")?(n=s.value,Array.isArray(s.value)?(n=s.value[0],r=s.value[1]):"string"==typeof s.value&&(n=s.value)):"string"==typeof s&&(n=s),t.addFrame(e,n,r,D(s,"delay",o),B(s,"duration",a),B(s,"hold",u),B(s,"repeat",c),B(s,"repeatDelay",d),R(s,"flipX",f),R(s,"flipY",g))):(n=I(i,s),r=O(B(s,"interpolation",m)),t.add(e,i,n.getEnd,n.getStart,n.getActive,L(B(s,"ease",l),B(s,"easeParams",h)),D(s,"delay",o),B(s,"duration",a),R(s,"yoyo",p),B(s,"hold",u),B(s,"repeat",c),B(s,"repeatDelay",d),R(s,"flipX",f),R(s,"flipY",g),r,r?s:null))},v=new G(t,s),y=0;y{var c=i(70402),d=i(23568),p=i(57355),f=i(62329),g=i(35154),m=i(8357),v=i(43960);t.exports=function(t,e){if(e instanceof v)return e.parent=t,e;var i=new v(t),s=(i.startDelay=g(e,"delay",0),i.completeDelay=d(e,"completeDelay",0),i.loop=Math.round(d(e,"loop",g(e,"repeat",0))),i.loopDelay=Math.round(d(e,"loopDelay",g(e,"repeatDelay",0))),i.paused=p(e,"paused",!1),i.persist=p(e,"persist",!1),i.callbackScope=g(e,"callbackScope",i),c.TYPES);for(u=0;u{t.exports={GetBoolean:i(57355),GetEaseFunction:i(6113),GetInterpolationFunction:i(91389),GetNewValue:i(55292),GetProps:i(82985),GetTargets:i(62329),GetValueOp:i(17777),NumberTweenBuilder:i(88032),StaggerBuilder:i(93109),TweenBuilder:i(8357)}},73685:t=>{t.exports="active"},98540:t=>{t.exports="complete"},67233:t=>{t.exports="loop"},2859:t=>{t.exports="pause"},98336:t=>{t.exports="repeat"},25764:t=>{t.exports="resume"},32193:t=>{t.exports="start"},84371:t=>{t.exports="stop"},70766:t=>{t.exports="update"},55659:t=>{t.exports="yoyo"},842:(t,e,i)=>{t.exports={TWEEN_ACTIVE:i(73685),TWEEN_COMPLETE:i(98540),TWEEN_LOOP:i(67233),TWEEN_PAUSE:i(2859),TWEEN_RESUME:i(25764),TWEEN_REPEAT:i(98336),TWEEN_START:i(32193),TWEEN_STOP:i(84371),TWEEN_UPDATE:i(70766),TWEEN_YOYO:i(55659)}},43066:(t,e,i)=>{i={States:i(86353),Builders:i(30231),Events:i(842),TweenManager:i(40382),Tween:i(86081),TweenData:i(48177),TweenFrameData:i(42220),BaseTween:i(70402),TweenChain:i(43960)};t.exports=i},70402:(t,e,i)=>{var s=i(83419),n=i(50792),r=i(842),o=i(86353),i=new s({Extends:n,initialize:function(t){n.call(this),this.parent=t,this.data=[],this.totalData=0,this.startDelay=0,this.hasStarted=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=o.PENDING,this.paused=!1,this.callbacks={onActive:null,onComplete:null,onLoop:null,onPause:null,onRepeat:null,onResume:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope,this.persist=!1},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return!this.paused&&this.isActive()},isPaused:function(){return this.paused},pause:function(){return this.paused||(this.paused=!0,this.dispatchEvent(r.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(r.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(r.TWEEN_COMPLETE,"onComplete")},complete:function(t){return(t=void 0===t?0:t)?(this.setCompleteDelayState(),this.countdown=t):this.onCompleteHandler(),this},completeAfterLoop:function(t){return this.loopCounter>(t=void 0===t?0:t)&&(this.loopCounter=t),this},remove:function(){return this.parent&&this.parent.remove(this),this},stop:function(){return!this.parent||this.isRemoved()||this.isPendingRemove()||this.isDestroyed()||(this.dispatchEvent(r.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(t){this.countdown-=t,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(r.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(t){return this.countdown-=t,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(r.TWEEN_START,"onStart"),t=0),t},updateCompleteDelay:function(t){this.countdown-=t,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(t,e,i){return void 0===i&&(i=[]),this.callbacks.hasOwnProperty(t)&&(this.callbacks[t]={func:e,params:i}),this},setPendingState:function(){this.state=o.PENDING},setActiveState:function(){this.state=o.ACTIVE,this.hasStarted=!1},setLoopDelayState:function(){this.state=o.LOOP_DELAY},setCompleteDelayState:function(){this.state=o.COMPLETE_DELAY},setStartDelayState:function(){this.state=o.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=o.PENDING_REMOVE},setRemovedState:function(){this.state=o.REMOVED},setFinishedState:function(){this.state=o.FINISHED},setDestroyedState:function(){this.state=o.DESTROYED},isPending:function(){return this.state===o.PENDING},isActive:function(){return this.state===o.ACTIVE},isLoopDelayed:function(){return this.state===o.LOOP_DELAY},isCompleteDelayed:function(){return this.state===o.COMPLETE_DELAY},isStartDelayed:function(){return this.state===o.START_DELAY},isPendingRemove:function(){return this.state===o.PENDING_REMOVE},isRemoved:function(){return this.state===o.REMOVED},isFinished:function(){return this.state===o.FINISHED},isDestroyed:function(){return this.state===o.DESTROYED},destroy:function(){this.data&&this.data.forEach(function(t){t.destroy()}),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});i.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],t.exports=i},95042:(t,e,i)=>{var s=i(83419),l=i(842),r=i(86353),i=new s({initialize:function(t,e,i,s,n,r,o,a,h,l){this.tween=t,this.targetIndex=e,this.duration=s,this.totalDuration=0,this.delay=0,this.getDelay=i,this.yoyo=n,this.hold=r,this.repeat=o,this.repeatDelay=a,this.repeatCounter=0,this.flipX=h,this.flipY=l,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(t){void 0===t&&(t=this.current),this.tween.targets[this.targetIndex][this.key]=t},setCreatedState:function(){this.state=r.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=r.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=r.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=r.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=r.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=r.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=r.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=r.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===r.CREATED},isDelayed:function(){return this.state===r.DELAY},isPendingRender:function(){return this.state===r.PENDING_RENDER},isPlayingForward:function(){return this.state===r.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===r.PLAYING_BACKWARD},isHolding:function(){return this.state===r.HOLD_DELAY},isRepeating:function(){return this.state===r.REPEAT_DELAY},isComplete:function(){return this.state===r.COMPLETE},setStateFromEnd:function(t){this.yoyo?this.onRepeat(t,!0,!0):0t.duration&&(t.duration=this.totalDuration),this.delay{t.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1,persist:!1,interpolation:null}},81076:t=>{t.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","interpolation","loop","loopDelay","onActive","onActiveParams","onComplete","onCompleteParams","onLoop","onLoopParams","onPause","onPauseParams","onRepeat","onRepeatParams","onResume","onResumeParams","onStart","onStartParams","onStop","onStopParams","onUpdate","onUpdateParams","onYoyo","onYoyoParams","paused","persist","props","repeat","repeatDelay","targets","yoyo"]},86081:(t,e,i)=>{var s=i(70402),n=i(83419),r=i(842),o=i(44603),a=i(39429),h=i(36383),l=i(86353),m=i(48177),u=i(42220),i=new n({Extends:s,initialize:function(t,e){s.call(this,t),this.targets=e,this.totalTargets=e.length,this.isSeeking=!1,this.isInfinite=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0},add:function(t,e,i,s,n,r,o,a,h,l,u,c,d,p,f,g){t=new m(this,t,e,i,s,n,r,o,a,h,l,u,c,d,p,f,g);return this.totalData=this.data.push(t),t},addFrame:function(t,e,i,s,n,r,o,a,h,l){t=new u(this,t,e,i,s,n,r,o,a,h,l);return this.totalData=this.data.push(t),t},getValue:function(t){void 0===t&&(t=0);var e=null;return e=this.data?this.data[t].current:e},hasTarget:function(t){return this.targets&&-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){if(void 0===i&&(i=!1),"texture"!==t)for(var s=0;s{var s=i(72905),n=i(70402),r=i(83419),o=i(842),a=i(44603),h=i(39429),l=i(86353),i=new r({Extends:n,initialize:function(t){n.call(this,t),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=-1===this.loop?l.MAX:this.loop,this.setCurrentTween(0),0{var v=i(95042),a=i(45319),s=i(83419),h=i(842),i=new s({Extends:v,initialize:function(t,e,i,s,n,r,o,a,h,l,u,c,d,p,f,g,m){v.call(this,t,e,a,h,l,u,c,d,p,f),this.key=i,this.getActiveValue=r,this.getEndValue=s,this.getStartValue=n,this.ease=o,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=g,this.interpolationData=m},reset:function(t){v.prototype.reset.call(this);var e=this.tween.targets[this.targetIndex],i=this.key;t&&(e[i]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(e[i]=this.getActiveValue(e,i,0))},update:function(t){var e,i=this.tween,s=i.totalTargets,n=this.targetIndex,r=i.targets[n],o=this.key;return r?(this.isCountdown&&(this.elapsed-=t,this.elapsed<=0)&&(t=this.elapsed=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(h.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0)),this.isPendingRender()?(this.start=this.getStartValue(r,o,r[o],n,s,i),this.end=this.getEndValue(r,o,this.start,n,s,i),this.current=this.start,r[o]=this.start,this.setPlayingForwardState(),!0):(n=this.isPlayingForward(),s=this.isPlayingBackward(),(n||s)&&(i=this.elapsed,s=0,e=!1,(i+=t)>=(t=this.duration)?(s=i-t,i=t,e=!0):i<0&&(i=0),t=a(i/t,0,1),this.elapsed=i,this.progress=t,this.previous=this.current,e?n?(this.current=this.end,r[o]=this.end,0{var c=i(95042),o=i(45319),s=i(83419),a=i(842),i=new s({Extends:c,initialize:function(t,e,i,s,n,r,o,a,h,l,u){c.call(this,t,e,n,r,!1,o,a,h,l,u),this.key="texture",this.startTexture=null,this.endTexture=i,this.startFrame=null,this.endFrame=s,this.yoyo=0!==a},reset:function(t){c.prototype.reset.call(this);var e=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=e.texture.key,this.startFrame=e.frame.name),t&&e.setTexture(this.startTexture,this.startFrame)},update:function(t){var e,i,s,n=this.tween,r=this.targetIndex,n=n.targets[r];return n?(this.isCountdown&&(this.elapsed-=t,this.elapsed<=0)&&(t=this.elapsed=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(a.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0)),this.isPendingRender()?(this.startTexture&&n.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0):(r=this.isPlayingForward(),e=this.isPlayingBackward(),(r||e)&&(e=this.elapsed,i=0,s=!1,(e+=t)>=(t=this.duration)?(i=e-t,e=t,s=!0):e<0&&(e=0),t=o(e/t,0,1),this.elapsed=e,this.progress=t,s&&(r?(n.setTexture(this.endTexture,this.endFrame),0{t.exports={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999}},83419:t=>{function r(t,e,i,s){for(var n in e)if(e.hasOwnProperty(n)){r=e,o=n,r=(a=i)?r[o]:Object.getOwnPropertyDescriptor(r,o);a=!!((r=!a&&r.value&&"object"==typeof r.value?r.value:r)&&((o=r).get&&"function"==typeof o.get||o.set&&"function"==typeof o.set))&&(void 0===r.enumerable&&(r.enumerable=!0),void 0===r.configurable&&(r.configurable=!0),r);if(!1!==a){if(o=(s||t).prototype,r=n,(o=Object.getOwnPropertyDescriptor(o,r))&&!1===(o=o.value&&"object"==typeof o.value?o.value:o).configurable){if(h.ignoreFinals)continue;throw new Error("cannot override final property '"+n+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,n,a)}else t.prototype[n]=e[n]}var r,o,a}function o(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i{t.exports=function(){}},20242:t=>{t.exports=function(){return null}},71146:t=>{t.exports=function(t,e,i,s,n){if(void 0===n&&(n=t),0{t.exports=function(t,e,i,s,n,r){if(void 0===i&&(i=0),void 0===r&&(r=t),0{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i{var a=i(82011);t.exports=function(t,e,i,s,n){void 0===n&&(n=t.length);var r=0;if(a(t,s=void 0===s?0:s,n))for(var o=s;o{t.exports=function(t,e,i){for(var s=[null],n=3;n{var a=i(82011);t.exports=function(t,e,i,s,n){if(void 0===n&&(n=t.length),a(t,s=void 0===s?0:s,n)){for(var r=[null],o=5;o{t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var s,n,r=1;if(i){if(t{function s(t,e){void 0===e&&(e=[]);for(var i=0;i{var h=i(82011);t.exports=function(t,e,i,s,n){void 0===n&&(n=t.length);var r=[];if(h(t,s=void 0===s?0:s,n))for(var o=s;o{var a=i(82011);t.exports=function(t,e,i,s,n){if(void 0===n&&(n=t.length),a(t,s=void 0===s?0:s,n))for(var r=s;r{t.exports=function(t,e,i){void 0===i&&(i=t.length);e=(e=void 0===e?0:e)+Math.floor(Math.random()*i);return void 0===t[e]?null:t[e]}},85835:t=>{t.exports=function(t,e,i){if(e!==i){var s=t.indexOf(e),n=t.indexOf(i);if(s<0||n<0)throw new Error("Supplied items must be elements of the same array");n{t.exports=function(t,e,i){if(e!==i){var s=t.indexOf(e),i=t.indexOf(i);if(s<0||i<0)throw new Error("Supplied items must be elements of the same array");s{t.exports=function(t,e){var i,s,n=t.indexOf(e);return 0{t.exports=function(t,e,i){var s=t.indexOf(e);if(-1===s||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return s!==i&&(t.splice(s,1),t.splice(i,0,e)),e}},40853:t=>{t.exports=function(t,e){var i,s,n=t.indexOf(e);return-1!==n&&n{t.exports=function(t,e,i,s){var n,r=[],o=!1;if((i||s)&&(o=!0,i=i||"",s=s||""),e{var o=i(2284);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===i&&(i=1),null===(e=void 0===e?null:e)&&(e=t,t=0);for(var s=[],n=Math.max(o((e-t)/(i||1)),0),r=0;r{function p(t,e,i){var s=t[e];t[e]=t[i],t[i]=s}function f(t,e){return t{var d=i(35154),p=i(33680);t.exports=function(t,e,i){var s=d(i,"max",0),n=d(i,"qty",1),r=d(i,"random",!1),o=d(i,"randomB",!1),a=d(i,"repeat",0),h=d(i,"yoyo",!1),l=[];o&&p(e),-1===a&&(a=0===s?0:(i=t.length*e.length*n,h&&(i*=2),Math.ceil(s/i)));for(var u=0;u<=a;u++){var c=((t,e,i)=>{for(var s=[],n=0;n{var h=i(19133);t.exports=function(t,e,i,s){var n;if(void 0===s&&(s=t),!Array.isArray(e))return-1!==(n=t.indexOf(e))?(h(t,n),i&&i.call(s,e),e):null;for(var r=e.length-1,o=[];0<=r;){var a=e[r];-1!==(n=t.indexOf(a))&&(h(t,n),o.push(a),i)&&i.call(s,a),r--}return o}},60248:(t,e,i)=>{var n=i(19133);t.exports=function(t,e,i,s){if(void 0===s&&(s=t),e<0||e>t.length-1)throw new Error("Index out of bounds");t=n(t,e);return i&&i.call(s,t),t}},81409:(t,e,i)=>{var h=i(82011);t.exports=function(t,e,i,s,n){if(void 0===i&&(i=t.length),void 0===n&&(n=t),h(t,e=void 0===e?0:e,i)){var r=t.splice(e,i-e);if(s)for(var o=0;o{var s=i(19133);t.exports=function(t,e,i){void 0===i&&(i=t.length);e=(e=void 0===e?0:e)+Math.floor(Math.random()*i);return s(t,e)}},42169:t=>{t.exports=function(t,e,i){var e=t.indexOf(e),s=t.indexOf(i);return-1!==e&&-1===s&&(t[e]=i,!0)}},86003:t=>{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e,i,s){t=t.length;if(e<0||t{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&0{var a=i(82011);t.exports=function(t,e,i,s,n){if(void 0===n&&(n=t.length),a(t,s=void 0===s?0:s,n))for(var r=s;r{t.exports=function(t){for(var e=t.length-1;0{t.exports=function(t){var i=/\D/g;return t.sort(function(t,e){return parseInt(t.replace(i,""),10)-parseInt(e.replace(i,""),10)}),t}},19133:t=>{t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,s=t[e],n=e;n{var s=i(82264);function n(t,e){return String(t).localeCompare(e)}function o(t,e,i,s){for(var n,r,o,a,h=t.length,l=0,u=2*i,c=0;c{var i=t.length;if(!(i<=1))for(var s=new Array(i),n=1;n{t.exports=function(t,e,i){if(e!==i){var s=t.indexOf(e),n=t.indexOf(i);if(s<0||n<0)throw new Error("Supplied items must be elements of the same array");t[s]=i,t[n]=e}return t}},37105:(t,e,i)=>{t.exports={Matrix:i(54915),Add:i(71146),AddAt:i(51067),BringToTop:i(66905),CountAllMatching:i(21612),Each:i(95428),EachInRange:i(36914),FindClosestInSorted:i(81957),Flatten:i(43491),GetAll:i(46710),GetFirst:i(58731),GetRandom:i(26546),MoveDown:i(70864),MoveTo:i(69693),MoveUp:i(40853),MoveAbove:i(85835),MoveBelow:i(83371),NumberArray:i(20283),NumberArrayStep:i(593),QuickSelect:i(43886),Range:i(88492),Remove:i(72905),RemoveAt:i(60248),RemoveBetween:i(81409),RemoveRandomElement:i(31856),Replace:i(42169),RotateLeft:i(86003),RotateRight:i(49498),SafeRange:i(82011),SendToBack:i(89545),SetAll:i(17810),Shuffle:i(33680),SortByDigits:i(90126),SpliceOne:i(19133),StableSort:i(19186),Swap:i(25630)}},86922:t=>{t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i{var o=i(41836),a=i(86922);t.exports=function(t){var e="";if(a(t))for(var i=0;i{t.exports=function(t){return t.reverse()}},21224:t=>{t.exports=function(t){for(var e=0;e{var s=i(37829);t.exports=function(t){return s(t,180)}},44657:(t,e,i)=>{var s=i(37829);t.exports=function(t,e){void 0===e&&(e=1);for(var i=0;i{var s=i(86922),n=i(2429);t.exports=function(t,e){if(void 0===e&&(e=90),!s(t))return null;if(90===(e="string"!=typeof e?(e%360+360)%360:e)||-270===e||"rotateLeft"===e)(t=n(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=n(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i{var s=i(37829);t.exports=function(t,e){void 0===e&&(e=1);for(var i=0;i{var r=i(86003),o=i(49498);t.exports=function(t,e,i){if(void 0===e&&(e=0),0!==(i=void 0===i?0:i)&&(i<0?r(t,Math.abs(i)):o(t,i)),0!==e)for(var s=0;s{t.exports=function(t){for(var e=t.length,i=t[0].length,s=new Array(i),n=0;n{t.exports={CheckMatrix:i(86922),MatrixToString:i(63362),ReverseColumns:i(92598),ReverseRows:i(21224),Rotate180:i(98717),RotateLeft:i(44657),RotateMatrix:i(37829),RotateRight:i(92632),Translate:i(69512),TransposeMatrix:i(2429)}},71334:t=>{var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";t.exports=function(t,e){for(var i=new Uint8Array(t),s=i.length,n=e?"data:"+e+";base64,":"",r=0;r>2])+o[(3&i[r])<<4|i[r+1]>>4])+o[(15&i[r+1])<<2|i[r+2]>>6])+o[63&i[r+2]];return s%3==2?n=n.substring(0,n.length-1)+"=":s%3==1&&(n=n.substring(0,n.length-2)+"=="),n}},53134:t=>{for(var u=new Uint8Array(256),e=0;e<64;e++)u["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(e)]=e;t.exports=function(t){var e,i,s,n,r=(t=t.substr(t.indexOf(",")+1)).length,o=.75*r,a=0;"="===t[r-1]&&(o--,"="===t[r-2])&&o--;for(var o=new ArrayBuffer(o),h=new Uint8Array(o),l=0;l>4,h[a++]=(15&i)<<4|s>>2,h[a++]=(3&s)<<6|63&n;return o}},65839:(t,e,i)=>{t.exports={ArrayBufferToBase64:i(71334),Base64ToArrayBuffer:i(53134)}},91799:(t,e,i)=>{t.exports={Array:i(37105),Base64:i(65839),Objects:i(1183),String:i(31749),NOOP:i(29747),NULL:i(20242)}},41786:t=>{t.exports=function(t){var e,i={};for(e in t)Array.isArray(t[e])?i[e]=t[e].slice(0):i[e]=t[e];return i}},62644:t=>{function n(t){var e,i,s;if("object"!=typeof t||null===t)return t;for(s in e=Array.isArray(t)?[]:{},t)i=t[s],e[s]=n(i);return e}t.exports=n},79291:(t,e,i)=>{function l(){var t,e,i,s,n,r=arguments[0]||{},o=1,a=arguments.length,h=!1;for("boolean"==typeof r&&(h=r,r=arguments[1]||{},o=2),a===o&&(r=this,--o);o{var s=i(75508),n=i(35154);t.exports=function(t,e,i){t=n(t,e,null);if(null===t)return i;if(Array.isArray(t))return s.RND.pick(t);if("object"==typeof t){if(t.hasOwnProperty("randInt"))return s.RND.integerInRange(t.randInt[0],t.randInt[1]);if(t.hasOwnProperty("randFloat"))return s.RND.realInRange(t.randFloat[0],t.randFloat[1])}else if("function"==typeof t)return t(e);return t}},95540:t=>{t.exports=function(t,e,i){var s=typeof t;return t&&"number"!=s&&"string"!=s&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},82840:(t,e,i)=>{var r=i(35154),o=i(45319);t.exports=function(t,e,i,s,n){t=r(t,e,n=void 0===n?i:n);return o(t,i,s)}},35154:t=>{t.exports=function(t,e,i,s){if(!t&&!s||"number"==typeof t)return i;if(t&&t.hasOwnProperty(e))return t[e];if(s&&s.hasOwnProperty(e))return s[e];if(-1===e.indexOf("."))return i;for(var n=e.split("."),r=t,o=s,a=i,h=i,l=!0,u=!0,c=0;c{t.exports=function(t,e){for(var i=0;i{t.exports=function(t,e){for(var i=0;i{t.exports=function(t,e){return t.hasOwnProperty(e)}},41212:t=>{t.exports=function(t){if(!t||"object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},46975:(t,e,i)=>{var n=i(41786);t.exports=function(t,e){var i,s=n(t);for(i in e)s.hasOwnProperty(i)||(s[i]=e[i]);return s}},269:(t,e,i)=>{var n=i(41786);t.exports=function(t,e){var i,s=n(t);for(i in e)s.hasOwnProperty(i)&&(s[i]=e[i]);return s}},18254:(t,e,i)=>{var r=i(97022);t.exports=function(t,e){for(var i={},s=0;s{t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))t[e]=i;else{if(-1===e.indexOf("."))return!1;for(var s=e.split("."),n=t,r=t,o=0;o{t.exports={Clone:i(41786),DeepCopy:i(62644),Extend:i(79291),GetAdvancedValue:i(23568),GetFastValue:i(95540),GetMinMaxValue:i(82840),GetValue:i(35154),HasAll:i(69036),HasAny:i(1985),HasValue:i(97022),IsPlainObject:i(41212),Merge:i(46975),MergeRight:i(269),Pick:i(18254),SetValue:i(61622)}},27902:t=>{t.exports=function(t,i){return t.replace(/%([0-9]+)/g,function(t,e){return i[Number(e)-1]})}},41836:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=" "),void 0===s&&(s=3);var n;if((e=void 0===e?0:e)+1>=(t=t.toString()).length)switch(s){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((n=e-t.length)/2);t=new Array(n-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},33628:t=>{t.exports=function(t,e){return 0===e?t.slice(1):t.slice(0,e-1)+t.slice(e)}},27671:t=>{t.exports=function(t){return t.split("").reverse().join("")}},45650:t=>{t.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}},35355:t=>{t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},31749:(t,e,i)=>{t.exports={Format:i(27902),Pad:i(41836),RemoveAt:i(33628),Reverse:i(27671),UppercaseFirst:i(35355),UUID:i(45650)}}},n={},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i(85454);function i(t){var e=n[t];return void 0!==e||(e=n[t]={exports:{}},s[t](e,e.exports,i)),e.exports}var s,n});var LZString=(()=>{var v=String.fromCharCode,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",n={};function r(t,e){if(!n[t]){n[t]={};for(var i=0;i>>8,i[2*s+1]=r%256}return i},decompressFromUint8Array:function(t){if(null==t)return o.decompress(t);for(var e=new Array(t.length/2),i=0,s=e.length;i>=1}else{for(n=1,s=0;s>=1}0==--u&&(u=Math.pow(2,d),d++),delete h[l]}else for(n=a[l],s=0;s>=1;0==--u&&(u=Math.pow(2,d),d++),a[o]=c++,l=String(r)}if(""!==l){if(Object.prototype.hasOwnProperty.call(h,l)){if(l.charCodeAt(0)<256){for(s=0;s>=1}else{for(n=1,s=0;s>=1}0==--u&&(u=Math.pow(2,d),d++),delete h[l]}else for(n=a[l],s=0;s>=1;0==--u&&(u=Math.pow(2,d),d++)}for(n=2,s=0;s>=1;for(;;){if(f<<=1,g==e-1){p.push(i(f));break}g++}return p.join("")},decompress:function(e){return null==e?"":""==e?null:o._decompress(e.length,32768,function(t){return e.charCodeAt(t)})},_decompress:function(t,e,i){for(var s,n,r,o,a,h,l=[],u=4,c=4,d=3,p="",f=[],g={val:i(0),position:e,index:1},m=0;m<3;m+=1)l[m]=m;for(n=0,o=Math.pow(2,2),a=1;a!=o;)r=g.val&g.position,g.position>>=1,0==g.position&&(g.position=e,g.val=i(g.index++)),n|=(0>=1,0==g.position&&(g.position=e,g.val=i(g.index++)),n|=(0>=1,0==g.position&&(g.position=e,g.val=i(g.index++)),n|=(0>=1,0==g.position&&(g.position=e,g.val=i(g.index++)),n|=(0>=1,0==g.position&&(g.position=e,g.val=i(g.index++)),n|=(0>=1,0==g.position&&(g.position=e,g.val=i(g.index++)),n|=(0{"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).gridjs={})})(this,function(r){var B=function(t,e){return(B=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}))(t,e)};function t(t,e){function i(){this.constructor=t}B(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var o=function(){return(o=Object.assign||function(t){for(var e,i=1,s=arguments.length;ia[0]&&e[1]{var h,l,u,c,d,p=i.props,f=e.props;if(n="svg"===e.type||n,null!=r)for(h=0;h{for(var r in i)"children"===r||"key"===r||r in e||$(t,r,null,i[r],s);for(r in e)n&&"function"!=typeof e[r]||"children"===r||"key"===r||"value"===r||"checked"===r||i[r]===e[r]||$(t,r,e[r],i[r],s)})(t,f,p,n,a),c?e.__k=[]:(h=e.props.children,K(t,Array.isArray(h)?h:[h],e,i,s,"foreignObject"!==e.type&&n,r,o,w,a)),a||("value"in f&&void 0!==(h=f.value)&&(h!==t.value||"progress"===e.type&&!h)&&$(t,"value",h,p.value,!1),"checked"in f&&void 0!==(h=f.checked)&&h!==t.checked&&$(t,"checked",h,p.checked,!1))}return t})(i.__e,e,i,s,n,r,o,h);(l=b.diffed)&&l(e)}catch(t){e.__v=null,!h&&null==r||(e.__e=a,e.__h=!!h,r[r.indexOf(a)]=null),b.__e(t,e,i)}return e.__e}function st(t,e){b.__c&&b.__c(e,t),t.some(function(e){try{t=e.__h,e.__h=[],t.some(function(t){t.call(e)})}catch(t){b.__e(t,e.__v)}})}function nt(t,e,i){try{"function"==typeof t?t(e):t.current=e}catch(t){b.__e(t,i)}}function rt(t,e,i){return this.constructor(t,i)}function ot(t,e,i){var s,n,r;b.__&&b.__(t,e),n=(s=i===ht)?null:i&&i.__k||e.__k,t=d(C,null,[t]),r=[],it(e,(!s&&i||e).__k=t,n||w,w,void 0!==e.ownerSVGElement,i&&!s?[i]:!n&&e.childNodes.length?z.slice.call(e.childNodes):null,r,i||w,s),st(r,t)}function at(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})}b={__e:function(t,e){for(var i,s,n,r=e.__h;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&null!=s.getDerivedStateFromError&&(i.setState(s.getDerivedStateFromError(t)),n=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t),n=i.__d),n)return e.__h=r,i.__E=i}catch(e){t=e}throw t},__v:0},G=function(t){return null!=t&&void 0===t.constructor},E.prototype.setState=function(t,e){var i=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=S({},this.state);(t="function"==typeof t?t(S({},i),this.props):t)&&S(i,t),null!=t&&this.__v&&(e&&this.__h.push(e),Z(this))},E.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Z(this))},E.prototype.render=C,U=[],X="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,q.__r=0;var ht=w,lt=0,ut=(Object.defineProperty(ct.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),ct);function ct(t){this._id=t||at()}var dt={search:{placeholder:"Type a keyword..."},sort:{sortAsc:"Sort column ascending",sortDesc:"Sort column descending"},pagination:{previous:"Previous",next:"Next",navigate:function(t,e){return"Page "+t+" of "+e},page:function(t){return"Page "+t},showing:"Showing",of:"of",to:"to",results:"results"},loading:"Loading...",noRecordsFound:"No matching records found",error:"An error happened while fetching the data"},pt=(ft.prototype.getString=function(t,e){var i,s;return e&&t&&e[i=(t=t.split("."))[0]]?"string"==typeof(s=e[i])?function(){return s}:"function"==typeof s?s:this.getString(t.slice(1).join("."),s):null},ft.prototype.translate=function(t){for(var e,i=[],s=1;s=this.pages||t<0||t===this.state.page)return null;this.setState({page:t}),this.processor.setProps({page:t})},p.prototype.setTotal=function(t){this.setState({total:t})},p.prototype.renderPages=function(){var t,e,i=this;return this.props.buttonsCount<=0?null:(t=Math.min(this.pages,this.props.buttonsCount),e=Math.min(this.state.page,Math.floor(t/2)),this.state.page+Math.floor(t/2)>=this.pages&&(e=t-(this.pages-this.state.page)),d(C,null,this.pages>t&&0t&&this.pages>this.state.page+e+1&&d(C,null,d("button",{tabIndex:-1,className:l(h("spread"),this.config.className.paginationButton)},"..."),d("button",{tabIndex:0,role:"button",onClick:this.setPage.bind(this,this.pages-1),title:this._("pagination.page",this.pages),"aria-label":this._("pagination.page",this.pages),className:this.config.className.paginationButton},this._(""+this.pages)))))},p.prototype.renderSummary=function(){return d(C,null,this.props.summary&&0=e?[4,o.process(s)]:[3,4]):[3,6];case 3:return s=t.sent(),this.cache.set(o.id,s),[3,5];case 4:s=this.cache.get(o.id),t.label=5;case 5:return n++,[3,2];case 6:return[3,8];case 7:throw a=t.sent(),u.error(a),this.emit("error",s),a;case 8:return this.lastProcessorIndexUpdated=i.length,this.emit("afterProcess",s),[2,s]}})})},x.prototype.findProcessorIndexByID=function(e){return this.steps.findIndex(function(t){return t.id==e})},x.prototype.setLastProcessorIndex=function(t){t=this.findProcessorIndexByID(t.id);this.lastProcessorIndexUpdated>t&&(this.lastProcessorIndexUpdated=t)},x.prototype.processorPropsUpdated=function(t){this.setLastProcessorIndex(t),this.emit("propsUpdated"),this.emit("updated",t)},x.prototype.afterRegistered=function(t){this.setLastProcessorIndex(t),this.emit("afterRegister"),this.emit("updated",t)},x),Oe=(t(Ye,we=a),Object.defineProperty(Ye.prototype,"type",{get:function(){return n.Extractor},enumerable:!1,configurable:!0}),Ye.prototype._process=function(e){return I(this,void 0,void 0,function(){return N(this,function(t){switch(t.label){case 0:return[4,this.props.storage.get(e)];case 1:return[2,t.sent()]}})})},Ye),De=(t(Xe,be=a),Object.defineProperty(Xe.prototype,"type",{get:function(){return n.Transformer},enumerable:!1,configurable:!0}),Xe.prototype._process=function(t){var e=At.fromArray(t.data);return e.length=t.total,e},Xe),ke=(t(Ue,Te=a),Object.defineProperty(Ue.prototype,"type",{get:function(){return n.Initiator},enumerable:!1,configurable:!0}),Ue.prototype._process=function(){return Object.entries(this.props.serverStorageOptions).filter(function(t){return t[0],"function"!=typeof t[1]}).reduce(function(t,e){var i=e[0],e=e[1];return o(o({},t),((t={})[i]=e,t))},{})},Ue),Fe=(t(Ge,xe=a),Object.defineProperty(Ge.prototype,"type",{get:function(){return n.Transformer},enumerable:!1,configurable:!0}),Ge.prototype.castData=function(t){var e;return t&&t.length?this.props.header&&this.props.header.columns?(e=v.leafColumns(this.props.header.columns),t[0]instanceof Array?t.map(function(i){var s=0;return e.map(function(t,e){return void 0!==t.data?(s++,"function"==typeof t.data?t.data(i):t.data):i[e-s]})}):"object"!=typeof t[0]||t[0]instanceof Array?[]:t.map(function(i){return e.map(function(t,e){return void 0!==t.data?"function"==typeof t.data?t.data(i):t.data:t.id?i[t.id]:(u.error("Could not find the correct cell for column at position "+e+".\n Make sure either 'id' or 'selector' is defined for all columns."),null)})})):t:[]},Ge.prototype._process=function(t){return{data:this.castData(t.data),total:t.total}},Ge),Be=(Ne.createFromConfig=function(t){var e=new Le;return t.storage instanceof Me&&e.register(new ke({serverStorageOptions:t.server})),e.register(new Oe({storage:t.storage})),e.register(new Fe({header:t.header})),e.register(new De),e},Ne),Ie=(y.prototype.assign=function(t){for(var e=0,i=Object.keys(t);e=e.__.length&&e.__.push({}),e.__[t]}function Xi(){Ri.forEach(function(e){if(e.__P)try{e.__H.__h.forEach(zi),e.__H.__h.forEach(Wi),e.__H.__h=[]}catch(t){e.__H.__h=[],b.__e(t,e.__v)}}),Ri=[]}b.__b=function(t){D=null,Li&&Li(t)},b.__r=function(t){Oi&&Oi(t),mi=0;t=(D=t.__c).__H;t&&(t.__h.forEach(zi),t.__h.forEach(Wi),t.__h=[])},b.diffed=function(t){Di&&Di(t);t=t.__c;t&&t.__H&&t.__H.__h.length&&(1!==Ri.push(t)&&vi===b.requestAnimationFrame||((vi=b.requestAnimationFrame)||function(t){function e(){clearTimeout(s),Yi&&cancelAnimationFrame(i),setTimeout(t)}var i,s=setTimeout(e,100);Yi&&(i=requestAnimationFrame(e))})(Xi)),D=void 0},b.__c=function(t,i){i.some(function(e){try{e.__h.forEach(zi),e.__h=e.__h.filter(function(t){return!t.__||Wi(t)})}catch(t){i.some(function(t){t.__h&&(t.__h=[])}),i=[],b.__e(t,e.__v)}}),ki&&ki(t,i)},b.unmount=function(t){Fi&&Fi(t);var e=t.__c;if(e&&e.__H)try{e.__H.__.forEach(zi)}catch(t){b.__e(t,e.__v)}};var Yi="function"==typeof requestAnimationFrame;function zi(t){var e=D;"function"==typeof t.__c&&t.__c(),D=e}function Wi(t){var e=D;t.__c=t.__(),D=e}function Hi(i,t){return!i||i.length!==t.length||t.some(function(t,e){return t!==i[e]})}r.BaseActions=Yt,r.BaseComponent=e,r.BaseStore=Ut,r.Cell=St,r.Component=E,r.Config=Ie,r.Dispatcher=Ae,r.Grid=ut,r.PluginBaseComponent=Ht,r.Row=Ct,r.className=h,r.createElement=d,r.createRef=function(){return{current:null}},r.h=d,r.html=Tt,r.useEffect=function(t,e){var i=Ui(mi++,3);!b.__s&&Hi(i.__H,e)&&(i.__=t,i.__H=e,D.__H.__h.push(i))},r.useRef=function(t){return Mi=5,e=function(){return{current:t}},i=[],Hi((s=Ui(mi++,7)).__H,i)&&(s.__=e(),s.__H=i,s.__h=e),s.__;var e,i,s},Object.defineProperty(r,"__esModule",{value:!0})}),((t,e)=>{"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.axios=e():t.axios=e()})(this,function(){return s=[function(t,e,i){t.exports=i(1)},function(t,e,i){function s(t){var t=new o(t),e=r(o.prototype.request,t);return n.extend(e,o.prototype,t),n.extend(e,t),e}var n=i(2),r=i(3),o=i(4),a=i(22),h=s(i(10));h.Axios=o,h.create=function(t){return s(a(h.defaults,t))},h.Cancel=i(23),h.CancelToken=i(24),h.isCancel=i(9),h.all=function(t){return Promise.all(t)},h.spread=i(25),h.isAxiosError=i(26),t.exports=h,t.exports.default=h},function(t,e,i){function r(t){return"[object Array]"===u.call(t)}function s(t){return void 0===t}function n(t){return null!==t&&"object"==typeof t}function o(t){return"[object Object]"===u.call(t)&&(null===(t=Object.getPrototypeOf(t))||t===Object.prototype)}function a(t){return"[object Function]"===u.call(t)}function h(t,e){if(null!=t)if(r(t="object"!=typeof t?[t]:t))for(var i=0,s=t.length;i{var S=e.document,t=function(){var d,p,f,g,n,o,a,r,h,m,l={},u={},c=!1,v=13,y=27,x=32,T=[],u={buttons:{holder:'',submit:'',ok:'',cancel:''},input:'
',message:'

{{message}}

',log:'
{{message}}
'},t=function(){var t,e,i=!1,s=S.createElement("fakeelement"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"};for(t in n)if(s.style[t]!==w){e=n[t],i=!0;break}return{type:e,supported:i}},b=function(t){return S.getElementById(t)};return{alert:function(t,e,i){return l.dialog(t,"alert",e,"",i),this},confirm:function(t,e,i){return l.dialog(t,"confirm",e,"",i),this},extend:(l={labels:{ok:"OK",cancel:"Cancel"},delay:5e3,buttonReverse:!1,buttonFocus:"ok",transition:w,addListeners:function(e){var i=void 0!==p,s=void 0!==d,n=void 0!==m,r="",o=this,a=function(t){return void 0!==t.preventDefault&&t.preventDefault(),l(t),void 0!==m&&(r=m.value),"function"==typeof e&&(void 0!==m?e(!0,r):e(!0)),!1},h=function(t){return void 0!==t.preventDefault&&t.preventDefault(),l(t),"function"==typeof e&&e(!1),!1},l=function(t){o.hide(),o.unbind(S.body,"keyup",u),o.unbind(f,"focus",c),i&&o.unbind(p,"click",a),s&&o.unbind(d,"click",h)},u=function(t){var e=t.keyCode;(e===x&&!n||n&&e===v)&&a(t),e===y&&s&&h(t)},c=function(t){(n?m:!s||o.buttonReverse?p:d).focus()};this.bind(f,"focus",c),this.bind(g,"focus",c),i&&this.bind(p,"click",a),s&&this.bind(d,"click",h),this.bind(S.body,"keyup",u),this.transition.supported||this.setFocus()},bind:function(t,e,i){"function"==typeof t.addEventListener?t.addEventListener(e,i,!1):t.attachEvent&&t.attachEvent("on"+e,i)},handleErrors:function(){var s;return void 0!==e.onerror&&(s=this,e.onerror=function(t,e,i){s.error("["+t+" on line "+i+" of "+e+"]",0)},!0)},appendButtons:function(t,e){return this.buttonReverse?e+t:t+e},build:function(t){var e="",i=t.type,s=t.cssClass||"",e=e+'
'+'Reset Focus';switch("none"===l.buttonFocus&&(e+=''),"prompt"===i&&(e+='
'),e=(e+='
')+u.message.replace("{{message}}",t.message),"prompt"===i&&(e+=u.input),e=e+u.buttons.holder+"
","prompt"===i&&(e+="
"),e=e+'Reset Focus'+"
",i){case"confirm":e=(e=e.replace("{{buttons}}",this.appendButtons(u.buttons.cancel,u.buttons.ok))).replace("{{ok}}",this.labels.ok).replace("{{cancel}}",this.labels.cancel);break;case"prompt":e=(e=e.replace("{{buttons}}",this.appendButtons(u.buttons.cancel,u.buttons.submit))).replace("{{ok}}",this.labels.ok).replace("{{cancel}}",this.labels.cancel);break;case"alert":e=(e=e.replace("{{buttons}}",u.buttons.ok)).replace("{{ok}}",this.labels.ok)}return r.className="alertify alertify-"+i+" "+s,a.className="alertify-cover",e},close:function(t,e){var i,s,n=e&&!isNaN(e)?+e:this.delay,r=this;this.bind(t,"click",function(){i(t)}),s=function(t){t.stopPropagation(),r.unbind(this,r.transition.type,s),h.removeChild(this),h.hasChildNodes()||(h.className+=" alertify-logs-hidden")},i=function(t){void 0!==t&&t.parentNode===h&&(r.transition.supported?(r.bind(t,r.transition.type,s),t.className+=" alertify-log-hide"):(h.removeChild(t),h.hasChildNodes()||(h.className+=" alertify-logs-hidden")))},0!==e&&setTimeout(function(){i(t)},n)},dialog:function(t,e,i,s,n){o=S.activeElement;var r=function(){h&&null!==h.scrollTop&&a&&null!==a.scrollTop||r()};if("string"!=typeof t)throw new Error("message must be a string");if("string"!=typeof e)throw new Error("type must be a string");if(void 0!==i&&"function"!=typeof i)throw new Error("fn must be a function");return this.init(),r(),T.push({type:e,message:t,callback:i,placeholder:s,cssClass:n}),c||this.setup(),this},extend:function(i){if("string"!=typeof i)throw new Error("extend method must have exactly one paramter");return function(t,e){return this.log(t,i,e),this}},hide:function(){var e,i=this;T.splice(0,1),0{this.BackButton.setTexture(n,"backbutton_clic"),GameStatus.PlaySound&&s.play(),this.scene.start("Hall2")},this).on(POINTER_UP,()=>{this.BackButton.setTexture(n,"backbutton")}).on(POINTER_OUT,()=>{this.BackButton.setTexture(n,"backbutton")}).on(POINTER_OVER,()=>{this.BackButton.setTexture(n,"backbutton_hover")}),this.ChangePass.setInteractive({userHandCursor:!0}).on("pointerdown",()=>{this.ChangePass.setTexture(n,"acceptbutton_clic"),GameStatus.PlaySound&&s.play();var t=document.getElementById("oldpassword").value,e=document.getElementById("newpassword").value,i=document.getElementById("confirmpassword").value;""!=t?""!=e?e==i?Socket.socket.emit("changePass",t,e):this.Message.text="新密码不一致!":this.Message.text="请输入新密码!":this.Message.text="请输入旧密码!"}).on(POINTER_UP,()=>{this.ChangePass.setTexture(n,"acceptbutton")}).on(POINTER_OUT,()=>{this.ChangePass.setTexture(n,"acceptbutton")}).on(POINTER_OVER,()=>{this.ChangePass.setTexture(n,"acceptbutton_hover")}),Socket.add("changePass",(...t)=>{this.scene.isActive("HallChangePass")&&(this.Message.text=JSON.parse(t[0][1].OutMsg).msg)})}update(){}dropCreate(){}render(){}}class DrawLu{constructor(){}DrawLu(t,e,i){let s,n,r,o,a;switch(t){case"LuZhuImageBase64":s=e.MainLuZhu.split("@"),n=e.MainDalu.split("@"),r=e.MainXiaoLu[0].split("@"),o=e.MainXiaoLu[1].split("@"),a=e.MainXiaoLu[2].split("@");break;case"WenLuZhuangLuZhuImageBase64":s=e.ZhuangWenLu.LuZhu.split("@"),n=e.ZhuangWenLu.DaLu.split("@"),r=e.ZhuangWenLu.XiaoLu[0].split("@"),o=e.ZhuangWenLu.XiaoLu[1].split("@"),a=e.ZhuangWenLu.XiaoLu[2].split("@");break;case"WenLuXianLuZhuImageBase64":s=e.XianWenLu.LuZhu.split("@"),n=e.XianWenLu.DaLu.split("@"),r=e.XianWenLu.XiaoLu[0].split("@"),o=e.XianWenLu.XiaoLu[1].split("@"),a=e.XianWenLu.XiaoLu[2].split("@")}var t=i,h=t.getContext("2d"),l=(t.height=325,t.width=1892,t.height),u=26.5,c=34.5,d=43.5;h.beginPath(),h.fillStyle=C_White,h.strokeStyle=C_White,h.lineWidth=1,h.fillRect(0,0,t.width,l);for(let e=0;e<6;e++)for(let t=0;t<20;t++)switch(s[t+20*e+1]){case"A":h.beginPath(),h.arc(54*t+26,54*e+u,25,0,2*Math.PI,!1),h.lineWidth=3.5,h.strokeStyle=C_Red,h.stroke(),h.font="28px Courier",h.fillStyle=C_Red,h.fill(),h.fillStyle=C_White,h.fillText("庄",54*t+11,54*e+c);break;case"B":h.beginPath(),h.arc(54*t+26,54*e+u,25,0,2*Math.PI,!1),h.lineWidth=3.5,h.strokeStyle=C_Blue,h.stroke(),h.font="28px Courier",h.fillStyle=C_Blue,h.fill(),h.fillStyle=C_White,h.fillText("闲",54*t+11,54*e+c);break;case"C":h.beginPath(),h.arc(54*t+26,54*e+u,25,0,2*Math.PI,!1),h.lineWidth=3.5,h.strokeStyle=C_Green,h.stroke(),h.font="28px Courier",h.fillStyle=C_Green,h.fill(),h.fillStyle=C_White,h.fillText("和",54*t+11,54*e+c);break;case"D":h.beginPath(),h.arc(54*t+26,54*e+u,25,0,2*Math.PI,!1),h.lineWidth=3.5,h.strokeStyle=C_Red,h.stroke(),h.fillStyle=C_Red,h.fill(),h.beginPath(),h.arc(54*t+8,54*e+8,6.5,0,2*Math.PI,!1),h.strokeStyle=C_White,h.stroke(),h.fillStyle=C_Red,h.fill(),h.font="28px Courier",h.fillStyle=C_White,h.fillText("庄",54*t+11,54*e+c);break;case"E":h.beginPath(),h.arc(54*t+26,54*e+u,25,0,2*Math.PI,!1),h.lineWidth=3.5,h.strokeStyle=C_Blue,h.stroke(),h.fillStyle=C_Blue,h.fill(),h.beginPath(),h.arc(54*t+8,54*e+8,6.5,0,2*Math.PI,!1),h.strokeStyle=C_White,h.stroke(),h.fillStyle=C_Red,h.fill(),h.font="28px Courier",h.fillStyle=C_White,h.fillText("闲",54*t+11,54*e+c);break;case"F":h.beginPath(),h.arc(54*t+26,54*e+u,25,0,2*Math.PI,!1),h.lineWidth=3.5,h.strokeStyle=C_Green,h.stroke(),h.fillStyle=C_Green,h.fill(),h.beginPath(),h.arc(54*t+8,54*e+8,6.5,0,2*Math.PI,!1),h.strokeStyle=C_White,h.stroke(),h.fillStyle=C_Red,h.fill(),h.font="28px Courier",h.fillStyle=C_White,h.fillText("和",54*t+11,54*e+c);break;case"G":h.beginPath(),h.arc(54*t+26,54*e+u,25,0,2*Math.PI,!1),h.lineWidth=3.5,h.strokeStyle=C_Red,h.stroke(),h.fillStyle=C_Red,h.fill(),h.beginPath(),h.arc(54*t+d,54*e+d,6.5,0,2*Math.PI,!1),h.strokeStyle=C_White,h.stroke(),h.fillStyle=C_Blue,h.fill(),h.font="28px Courier",h.fillStyle=C_White,h.fillText("庄",54*t+11,54*e+c);break;case"H":h.beginPath(),h.arc(54*t+26,54*e+u,25,0,2*Math.PI,!1),h.lineWidth=3.5,h.strokeStyle=C_Blue,h.stroke(),h.fillStyle=C_Blue,h.fill(),h.beginPath(),h.arc(54*t+d,54*e+d,6.5,0,2*Math.PI,!1),h.strokeStyle=C_White,h.stroke(),h.fillStyle=C_Blue,h.fill(),h.font="28px Courier",h.fillStyle=C_White,h.fillText("闲",54*t+11,54*e+c);break;case"I":h.beginPath(),h.arc(54*t+26,54*e+u,25,0,2*Math.PI,!1),h.lineWidth=3.5,h.strokeStyle=C_Green,h.stroke(),h.fillStyle=C_Green,h.fill(),h.beginPath(),h.arc(54*t+d,54*e+d,6.5,0,2*Math.PI,!1),h.strokeStyle=C_White,h.stroke(),h.fillStyle=C_Blue,h.fill(),h.font="28px Courier",h.fillStyle=C_White,h.fillText("和",54*t+11,54*e+c);break;case"J":h.beginPath(),h.arc(54*t+26,54*e+u,25,0,2*Math.PI,!1),h.lineWidth=3.5,h.strokeStyle=C_Red,h.stroke(),h.fillStyle=C_Red,h.fill(),h.beginPath(),h.arc(54*t+8,54*e+8,6.5,0,2*Math.PI,!1),h.strokeStyle=C_White,h.stroke(),h.fillStyle=C_Red,h.fill(),h.beginPath(),h.arc(54*t+d,54*e+d,6.5,0,2*Math.PI,!1),h.strokeStyle=C_White,h.stroke(),h.fillStyle=C_Blue,h.fill(),h.font="28px Courier",h.fillStyle=C_White,h.fillText("庄",54*t+11,54*e+c);break;case"K":h.beginPath(),h.arc(54*t+26,54*e+u,25,0,2*Math.PI,!1),h.lineWidth=3.5,h.strokeStyle=C_Blue,h.stroke(),h.fillStyle=C_Blue,h.fill(),h.beginPath(),h.arc(54*t+8,54*e+8,6.5,0,2*Math.PI,!1),h.strokeStyle=C_White,h.stroke(),h.fillStyle=C_Red,h.fill(),h.beginPath(),h.arc(54*t+d,54*e+d,6.5,0,2*Math.PI,!1),h.strokeStyle=C_White,h.stroke(),h.fillStyle=C_Blue,h.fill(),h.font="28px Courier",h.fillStyle=C_White,h.fillText("闲",54*t+11,54*e+c);break;case"L":h.beginPath(),h.arc(54*t+26,54*e+u,25,0,2*Math.PI,!1),h.lineWidth=3.5,h.strokeStyle=C_Green,h.stroke(),h.fillStyle=C_Green,h.fill(),h.beginPath(),h.arc(54*t+8,54*e+8,6.5,0,2*Math.PI,!1),h.strokeStyle=C_White,h.stroke(),h.fillStyle=C_Red,h.fill(),h.beginPath(),h.arc(54*t+d,54*e+d,6.5,0,2*Math.PI,!1),h.strokeStyle=C_White,h.stroke(),h.fillStyle=C_Blue,h.fill(),h.font="28px Courier",h.fillStyle=C_White,h.fillText("和",54*t+11,54*e+c)}h.fillStyle=C_Black,h.strokeStyle=C_Black;for(let t=0;t<6;t++)h.fillRect(0,54*t,1890,1),h.fillRect(810,54*t+27,1080,1);h.fillRect(0,324,1890,1);for(let t=0;t<36;t++)h.fillRect(54*t,0,1,l);for(let t=0;t<40;t++)h.fillRect(810+54*t/2,0,1,l);for(let e=0;e<6;e++)for(let t=0;t<40;t++){switch(n[t+40*e+1].substring(0,1)){case"A":h.beginPath(),h.arc(27*t+824,27*e+13,11,0,2*Math.PI,!1),h.lineWidth=2,h.strokeStyle=C_Red,h.stroke();break;case"B":h.beginPath(),h.arc(27*t+824,27*e+13,11,0,2*Math.PI,!1),h.lineWidth=2,h.strokeStyle=C_Blue,h.stroke();break;case"C":h.beginPath(),h.arc(27*t+824,27*e+13,11,.5,2*Math.PI,!1),h.lineWidth=2,h.strokeStyle=C_Red,h.stroke(),h.font="20px Courier",h.fillStyle="rgba(0,0,0,1)",h.fillText(n[t+40*e+1].substring(1,2),27*t-5+824,27*e+18),h.beginPath(),h.arc(27*t+824,27*e+13,11,0,.5*Math.PI,!1),h.lineWidth=4,h.strokeStyle=C_Green,h.stroke();break;case"D":h.beginPath(),h.arc(27*t+824,27*e+13,11,.5,2*Math.PI,!1),h.lineWidth=2,h.strokeStyle=C_Blue,h.stroke(),h.font="20px Courier",h.fillStyle="rgba(0,0,0,1)",h.fillText(n[t+40*e+1].substring(1,2),27*t-5+824,27*e+18),h.beginPath(),h.arc(27*t+824,27*e+13,11,0,.5*Math.PI,!1),h.lineWidth=4,h.strokeStyle=C_Green,h.stroke()}switch(r[t+40*e+1]){case"A":h.beginPath(),h.arc(13.5*t+818,13.5*e+169,5,0,2*Math.PI,!1),h.fillStyle=C_White,h.fill(),h.lineWidth=2,h.strokeStyle=C_Red,h.stroke();break;case"B":h.beginPath(),h.arc(13.5*t+818,13.5*e+169,5,0,2*Math.PI,!1),h.fillStyle=C_White,h.fill(),h.lineWidth=2,h.strokeStyle=C_Blue,h.stroke()}switch(o[t+40*e+1]){case"C":h.beginPath(),h.arc(13.5*t+818,13.5*e+250,5,0,2*Math.PI,!1),h.fillStyle=C_Red,h.fill(),h.lineWidth=2,h.strokeStyle=C_Red,h.stroke();break;case"D":h.beginPath(),h.arc(13.5*t+818,13.5*e+250,5,0,2*Math.PI,!1),h.fillStyle=C_Blue,h.fill(),h.lineWidth=2,h.strokeStyle=C_Blue,h.stroke()}switch(a[t+40*e+1]){case"E":h.beginPath(),h.moveTo(13.5*t+839+515,13*e-5+260),h.lineTo(13.5*t+839+522,13*e-5+252),h.lineWidth=3,h.strokeStyle=C_Red,h.lineCap="round",h.stroke();break;case"F":h.beginPath(),h.moveTo(13.5*t+839+515,13*e-5+260),h.lineTo(13.5*t+839+522,13*e-5+252),h.lineWidth=3,h.strokeStyle=C_Blue,h.lineCap="round",h.stroke()}}i.getContext("2d").putImageData(h.getImageData(0,0,t.width,t.height),0,0)}}class DrawLuHall{constructor(t){this.game=t,this.squareSize=27,this.BGWidth=1080,this.BGHeight=161,this.distX=16,this.distY=16,this.emptyDaLu=[],this.currentDalu=[[],[],[],[]];for(let t=0;t<241;t++)this.emptyDaLu[t]="0";this.emptyDaLu[0]=""}DrawBackground(t,e){var i=e,s=i.getContext("2d");s.beginPath(),s.fillStyle=C_White,s.strokeStyle=C_White,s.lineWidth=1,s.fillRect(0,0,1.03*this.BGWidth,1.2*this.BGHeight),s.fillStyle=C_Black,s.strokeStyle=C_Black;for(let e=0;e<7;e++)for(let t=0;t<41;t++)s.fillRect(this.distX+t*this.squareSize,this.distY,1,this.BGHeight),s.fillRect(this.distX,this.distY+e*this.squareSize,this.BGWidth,1);i=s.getImageData(0,0,i.width,i.height);e.getContext("2d").putImageData(i,0,0),this.currentDalu[t]=this.emptyDaLu}DrawTing(n,t,e){var r=t[n].MainDalu.split("@");if(JSON.stringify(r)!=JSON.stringify(this.emptyDaLu)){this.isMoving(n,r)&&this.DrawBackground(n,e);var o,a=this.squareSize/2-2,t=e,h=t.getContext("2d");t.width=this.BGWidth+2,t.height=this.BGHeight+2;let i,s;for(let e=0;e<6;e++)for(let t=0;t<40;t++)if(r[o=t+40*e+1]!=this.currentDalu[n][o]){switch(i=void 0,s=!1,r[o].substring(0,1)){case"A":i=C_Red;break;case"B":i=C_Blue;break;case"C":i=C_Red,s=!0;break;case"D":i=C_Blue,s=!0}i&&(h.beginPath(),h.arc(this.distX+t*this.squareSize+a+2,this.distY+e*this.squareSize+a+2,a,0,2*Math.PI,!1),h.lineWidth=3.5,h.strokeStyle=i,h.stroke(),s)&&(h.beginPath(),h.arc(this.distX+t*this.squareSize+a+2,this.distY+e*this.squareSize+a+2,a-3.5,0,2*Math.PI,!1),h.lineWidth=3.5,h.strokeStyle=C_White,h.stroke(),h.fillStyle=C_White,h.fill(),h.font="25px Courier",h.fillStyle=C_Black,h.fillText(r[o].substring(1,2),this.distX+t*this.squareSize+a/2,this.distY+e*this.squareSize+21.5),h.beginPath(),h.arc(this.distX+t*this.squareSize+a+2,this.distY+e*this.squareSize+a+2,a,0,.5*Math.PI,!1),h.lineWidth=3.5,h.strokeStyle=C_Green,h.stroke())}this.currentDalu[n]=r;t=h.getImageData(0,0,t.width,t.height);e.getContext("2d").putImageData(t,0,0)}else this.currentDalu[n]=this.emptyDaLu,this.DrawBackground(n,e)}isMoving(t,e){let i=1,s=!0;for(;e[i]!=this.currentDalu[t][i+1]&&(s=!1),++i<40||1==s;);return s}}class DrawLuPreview{constructor(){this.game=game,this.squareSize=54,this.BGWidth=1080,this.BGHeight=161,this.distX=16,this.distY=16,this.emptyDaLu=[],this.currentDalu=[[],[],[],[]];for(let t=0;t<241;t++)this.emptyDaLu[t]="0";this.emptyDaLu[0]=""}DrawBackground(t,e){var i=e.getContext("2d"),s=(e.height=325,e.width=1892,e.height);i.beginPath(),i.fillStyle=C_White,i.strokeStyle=C_White,i.lineWidth=1,i.fillRect(0,0,e.width,s)}DrawLu(t,e,i){var s=e[t].MainDalu.split("@"),n=e[t].MainXiaoLu[0].split("@"),r=e[t].MainXiaoLu[1].split("@"),o=e[t].MainXiaoLu[2].split("@"),e=i,a=e.getContext("2d"),h=(e.height=325,e.width=1892,e.height);this.DrawBackground(t,i);a.fillStyle=C_Black,a.strokeStyle=C_Black;for(let t=0;t<6;t++)a.fillRect(0,t*this.squareSize,20*this.squareSize,1),a.fillRect(0,t*this.squareSize+this.squareSize/2,20*this.squareSize,1);a.fillRect(0,6*this.squareSize,20*this.squareSize,1);for(let t=0;t<41;t++)a.fillRect(t*this.squareSize/2,0,1,h);for(let e=0;e<6;e++)for(let t=0;t<40;t++){switch(s[t+40*e+1].substring(0,1)){case"A":a.beginPath(),a.arc(27*t+14,27*e+13,11,0,2*Math.PI,!1),a.lineWidth=2,a.strokeStyle=C_Red,a.stroke();break;case"B":a.beginPath(),a.arc(27*t+14,27*e+13,11,0,2*Math.PI,!1),a.lineWidth=2,a.strokeStyle=C_Blue,a.stroke();break;case"C":a.beginPath(),a.arc(27*t+14,27*e+13,11,.5,2*Math.PI,!1),a.lineWidth=2,a.strokeStyle=C_Red,a.stroke(),a.font="20px Courier",a.fillStyle=C_Black,a.fillText(s[t+40*e+1].substring(1,2),27*t-5+14,27*e+18),a.beginPath(),a.arc(27*t+14,27*e+13,11,0,.5*Math.PI,!1),a.lineWidth=4,a.strokeStyle=C_Green,a.stroke();break;case"D":a.beginPath(),a.arc(27*t+14,27*e+13,11,.5,2*Math.PI,!1),a.lineWidth=2,a.strokeStyle=C_Blue,a.stroke(),a.font="20px Courier",a.fillStyle=C_Black,a.fillText(s[t+40*e+1].substring(1,2),27*t-5+14,27*e+18),a.beginPath(),a.arc(27*t+14,27*e+13,11,0,.5*Math.PI,!1),a.lineWidth=4,a.strokeStyle=C_Green,a.stroke()}switch(n[t+40*e+1]){case"A":a.beginPath(),a.arc(13.5*t+8,13.5*e+169,5,0,2*Math.PI,!1),a.fillStyle=C_White,a.fill(),a.lineWidth=2,a.strokeStyle=C_Red,a.stroke();break;case"B":a.beginPath(),a.arc(13.5*t+8,13.5*e+169,5,0,2*Math.PI,!1),a.fillStyle=C_White,a.fill(),a.lineWidth=2,a.strokeStyle=C_Blue,a.stroke()}switch(r[t+40*e+1]){case"C":a.beginPath(),a.arc(13.5*t+8,13.5*e+250,5,0,2*Math.PI,!1),a.fillStyle=C_Red,a.fill(),a.lineWidth=2,a.strokeStyle=C_Red,a.stroke();break;case"D":a.beginPath(),a.arc(13.5*t+8,13.5*e+250,5,0,2*Math.PI,!1),a.fillStyle=C_Blue,a.fill(),a.lineWidth=2,a.strokeStyle=C_Blue,a.stroke()}switch(o[t+40*e+1]){case"E":a.beginPath(),a.moveTo(13.5*t+29+515,13*e-5+260),a.lineTo(13.5*t+29+522,13*e-5+252),a.lineWidth=3,a.strokeStyle=C_Red,a.lineCap="round",a.stroke();break;case"F":a.beginPath(),a.moveTo(13.5*t+29+515,13*e-5+260),a.lineTo(13.5*t+29+522,13*e-5+252),a.lineWidth=3,a.strokeStyle=C_Blue,a.lineCap="round",a.stroke()}}i.getContext("2d").putImageData(a.getImageData(0,0,e.width,e.height),0,0)}}class HallReport extends Phaser.Scene{constructor(){super("HallReport")}preload(){}create(){let n=gridjs.html;let t=this.sound.add("audioClick"),e=(currentScene=this,"recordAtlas");this.add.sprite(CENTER_X,CENTER_Y,e,"background"),this.BackButton=this.add.sprite(190,16,e,"backbutton").setOrigin(.5,0),this.ReportType={},this.BottonButton={},this.TopButton={},this.TopButton[0]=this.add.image(30,100,e,"backtablebutton").setOrigin(0,.5);var i=this.add.dom(CENTER_X,120).createFromCache("Report");function r(t){t=(t+="").split(".");return t[0].replace(/(\d{1,3})(?=(\d{3})+$)/g,"$1,")+(2==t.length?"."+t[1]:"")}i.scale=.8,i.setOrigin(.5,0),this.TopButton[0].visible=!1,this.BackButton.setInteractive({userHandCursor:!0}).on("pointerdown",()=>{this.BackButton.setTexture(e,"backbutton_clic"),GameStatus.PlaySound&&t.play(),this.scene.start("Hall2")},this).on(POINTER_UP,()=>{this.BackButton.setTexture(e,"backbutton")}).on(POINTER_OUT,()=>{this.BackButton.setTexture(e,"backbutton")}).on(POINTER_OVER,()=>{this.BackButton.setTexture(e,"backbutton_hover")}),this.TopButton[0].setInteractive({userHandCursor:!0}).on("pointerdown",()=>{this.TopButton[0].setTexture(e,"backtablebutton_clic"),this.loadPanel.visible=!0,"total"!=this.ReportType.Type&&(Socket.socket.emit("GetBetReportTotal"),this.TopButton[0].visible=!1)}).on(POINTER_UP,()=>{this.TopButton[0].setTexture(e,"backtablebutton")}).on(POINTER_OUT,()=>{this.TopButton[0].setTexture(e,"backtablebutton")}).on(POINTER_OVER,()=>{this.TopButton[0].setTexture(e,"backtablebutton_hover")}),this.IsShowMaYong=!1,Socket.add("GetBetReportTotal",t=>{this.loadPanel.visible=!1;t=JSON.parse(t);s(t,"total"),this.loadPanel.visible=!1}),Socket.add("GetBetReport",t=>{this.loadPanel.visible=!1,this.TopButton[0].visible=!0,0"結果"}},pagination:{limit:10}}).render(document.getElementById("wrapper"));let s=(e,t)=>{var i={search:!1};if(this.ReportType.Type=t,0n(` ${e.cells[0].data}`)},"输赢","注数"],i.data=[];for(var s=0;s{t!=GameStatus.VideoIndex&&(switchVideoServer(t),P[t].setTexture(r,"changeserver_clic"),z.text=M[t].text,W())}).on(POINTER_UP,()=>{H()}).on(POINTER_OUT,()=>{t!=GameStatus.VideoIndex&&P[t].setTexture(r,"changeserver")}).on(POINTER_OVER,()=>{t!=GameStatus.VideoIndex&&P[t].setTexture(r,"changeserver_hover")});function W(){n.tweens.add({targets:_,y:A.y-210,duration:200,onComplete:function(){_.visible=!1,A.setTexture(r,"changeserver")}})}function H(){for(let t=0;t<5;t++)P[t].setTexture(r,"changeserver");P[GameStatus.VideoIndex].setTexture(r,"changeserver_clic")}u.add(X[5]),l.add(E[5]),A.setInteractive({userHandCursor:!0}).on(POINTER_DOWN,()=>{_.visible?(W(),A.setTexture(r,"changeserver_searchclic")):(H(),A.setTexture(r,"changeserver_clic"),_.visible=!0,this.tweens.add({targets:_,y:A.y,duration:200}))}).on(POINTER_UP,()=>{_.visible?A.setTexture(r,"changeserver_search"):A.setTexture(r,"changeserver")}).on(POINTER_OUT,()=>{_.visible?A.setTexture(r,"changeserver_search"):A.setTexture(r,"changeserver")}).on(POINTER_OVER,()=>{_.visible||A.setTexture(r,"changeserver_hover")});for(let t=0;t<8;t++)this.ConfirmBetPanel.add(this.ConfirmBetMessage[t]);this.ConfirmBetPanel.add(m),this.ConfirmBetPanel.add(v),this.ConfirmBetPanel.add(f),g.add(this.TableTitle),g.add(this.DateTimeText),g.add(this.NameTitle),g.add(this.AccountMoney),l.add(this.LimitText),l.add(this.limitTitle),c.setInteractive({userHandCursor:!0}).on(POINTER_DOWN,()=>{c.setTexture(r,"backbutton_clic"),VideoWorker.postMessage(["Disconnect"]),VideoMaskMain.visible=!0,n.scene.start("Hall2"),GameStatus.PlaySound&&s.play()}).on(POINTER_UP,()=>{c.setTexture(r,"backbutton")}).on(POINTER_OUT,()=>{c.setTexture(r,"backbutton")}).on(POINTER_OVER,()=>{c.setTexture(r,"backbutton_hover")}),this.SoundControl.setInteractive({userHandCursor:!0}),this.SoundControl.on(POINTER_DOWN,()=>{GameStatus.PlaySound?(GameStatus.PlaySound=!1,this.SoundControl.setTexture(r,"soundbutton_clic")):(GameStatus.PlaySound=!0,this.SoundControl.setTexture(r,"soundbutton"))}).on(POINTER_OVER,()=>{GameStatus.PlaySound?this.SoundControl.setTexture(r,"soundbutton_hover"):this.SoundControl.setTexture(r,"soundbutton_clichover")}).on(POINTER_OUT,()=>{GameStatus.PlaySound?this.SoundControl.setTexture(r,"soundbutton"):this.SoundControl.setTexture(r,"soundbutton_clic")}),GameStatus.PlaySound?this.SoundControl.setTexture(r,"soundbutton"):this.SoundControl.setTexture(r,"soundbutton_clic"),this.Timer.text="现在接受投注 "+Socket.MainTimer[GameStatus.CurrentTable],this.Timer.setOrigin(.5,.5);for(let e=0;e<4;e++)d[e]=this.add.image(175,825+65*e,r,"change_table_static").setOrigin(.5).setInteractive({userHandCursor:!0}),this.ChangeTableText[e]=this.add.text(d[e].x+45,d[e].y+1,"0",p).setOrigin(.5,.5),this.add.text(d[e].x-35,d[e].y+1,"VIP"+(e+1),p).setOrigin(.5,.5),d[e].on(POINTER_DOWN,()=>{R(),GameStatus.CurrentBetXiangmu[GameStatus.CurrentTable]=0,GameStatus.CurrentTable=e,loadVideo(),VideoMaskMain.visible=!0,VideoMaskMain.play(!0);for(let t=0;t<5;t++)this.confBetText[t].text="0";if(this.Timer.text="现在接受投注 "+Socket.MainTimer[GameStatus.CurrentTable],0{document.getElementById("InputBox"+GameStatus.CurrentBetXiangmu[GameStatus.CurrentTable]).disabled="",document.getElementById("InputBox"+GameStatus.CurrentBetXiangmu[GameStatus.CurrentTable]).focus()},100)}).on(POINTER_UP,()=>{d[e].setTexture(r,"change_table_static"),d[GameStatus.CurrentTable].setTexture(r,"change_table_on"),this.smallLudanRun=!1}).on(POINTER_OVER,()=>{GameStatus.CurrentTable!=e&&(d[e].setTexture(r,"change_table_hover"),this.Drawlu.DrawLu(e,GameStatus.AfterAnalayse,this.LuDanBigIamgePreviewer),this.smallLudanRun=!0)}).on(POINTER_OUT,()=>{d[e].setTexture(r,"change_table_static"),d[GameStatus.CurrentTable].setTexture(r,"change_table_on"),this.smallLudanRun=!1});this.ChangeTableText[GameStatus.CurrentTable].setColor(T),d[GameStatus.CurrentTable].setTexture(r,"change_table_on"),Socket.AllowBet[GameStatus.CurrentTable]||(this.TimeGreen.setTexture(r,"timer_red"),this.Timer.setColor("#ffdf7c")),VideoBmd=t,VidoeBmdctx=t.getContext("2d"),e.play(!0),VideoMaskMain=e,this.luzhuPanCan=luzhuPanCan,this.DrawLuF.DrawLu("LuZhuImageBase64",GameStatus.AfterAnalayse[GameStatus.CurrentTable],luzhuPanCan);for(let t=0;t<5;t++)document.getElementById("InputBox"+t).disabled="disabled";function V(t){if("Enter"==t.key&&(""!=t.target.value||0{document.getElementById("InputBox"+GameStatus.CurrentBetXiangmu[GameStatus.CurrentTable]).disabled="",document.getElementById("InputBox"+GameStatus.CurrentBetXiangmu[GameStatus.CurrentTable]).focus()},100),R(),L();let j=["bankerbutton_clic","playerbutton_clic","tiebutton_clic","BPbutton_clic","PPbutton_clic"],Z=["bankerbutton_hover","playerbutton_hover","tiebutton_hover","BPbutton_hover","PPbutton_hover"];for(let t=0;t<5;t++)document.getElementById("InputBox"+t).onkeydown=V,this.baccaratBetArreal[t].setInteractive({userHandCursor:!0}),this.baccaratBetArreal[t].on(POINTER_DOWN,()=>{if(R(),O(),0{document.getElementById("InputBox"+t).disabled="",document.getElementById("InputBox"+t).focus()},100),this.baccaratBetInputBox[t].visible=!0}}),this.baccaratBetArreal[t].on(POINTER_UP,()=>{O()}),this.baccaratBetArreal[t].on(POINTER_OUT,()=>{O()}),this.baccaratBetArreal[t].on(POINTER_OVER,()=>{O(),this.baccaratBetArreal[t].setTexture(r,Z[t])}),this.BetAreal.add([this.baccaratBetArreal[t],this.baccaratBetInputBox[t]]);function O(){try{n.baccaratBetArreal[1].setTexture(r,"playerbutton_static"),n.baccaratBetArreal[2].setTexture(r,"tiebutton_static"),n.baccaratBetArreal[0].setTexture(r,"bankerbutton_static"),n.baccaratBetArreal[4].setTexture(r,"PPbutton_static"),n.baccaratBetArreal[3].setTexture(r,"BPbutton_static")}catch(t){isdebug&&console.log(t)}}this.ChouMaArray[0]=this.add.container(1526,400),this.ChouMaArray[1]=this.add.container(1969,400),this.ChouMaArray[2]=this.add.container(1667,525),this.ChouMaArray[3]=this.add.container(1380,525),this.ChouMaArray[4]=this.add.container(2e3,525),this.ChouMaArray[5]=this.add.container(1250,350),this.ChouMaArray[6]=this.add.container(1720,350),this.ChouMaArray[7]=this.add.container(1600,550),this.ChouMaArray[8]=this.add.container(1250,550),this.ChouMaArray[9]=this.add.container(1850,550);for(let t=0;t<10;t++)this.ChouMaArray[t].setScale(.7);this.ChouMaPan=[];let D=["100coin","500coin","1000coin","5000coin","10000coin","50000coin"],k=0;for(let t=0;t<6;t++){3==t&&(k=1);this.ChouMaPan[t]=this.add.image(0+90*k,90*t-270*k,r,D[t]+"_static").setOrigin(.5),this.ChouMaPan[t].setInteractive({userHandCursor:!0}),this.ChouMaPan[t].on(POINTER_DOWN,()=>{this.ChouMaPan[t].setTexture(r,D[t]+"_clic"),""==document.getElementById("InputBox"+GameStatus.CurrentBetXiangmu[GameStatus.CurrentTable]).value?GameStatus.CurrentBet[GameStatus.CurrentTable][GameStatus.CurrentBetXiangmu[GameStatus.CurrentTable]]=q(t):GameStatus.CurrentBet[GameStatus.CurrentTable][GameStatus.CurrentBetXiangmu[GameStatus.CurrentTable]]=q(t)+GameStatus.CurrentBet[GameStatus.CurrentTable][GameStatus.CurrentBetXiangmu[GameStatus.CurrentTable]],document.getElementById("InputBox"+GameStatus.CurrentBetXiangmu[GameStatus.CurrentTable]).value=GameStatus.CurrentBet[GameStatus.CurrentTable][GameStatus.CurrentBetXiangmu[GameStatus.CurrentTable]],GameStatus.PlaySound&&s.play()}),this.ChouMaPan[t].on(POINTER_UP,()=>{this.ChouMaPan[t].setTexture(r,D[t]+"_static")}),this.ChouMaPan[t].on(POINTER_OUT,()=>{this.ChouMaPan[t].setTexture(r,D[t]+"_static")}),this.ChouMaPan[t].on(POINTER_OVER,()=>{this.ChouMaPan[t].setTexture(r,D[t]+"_hover")}),a.add(this.ChouMaPan[t])}function q(t){switch(t){case 0:return 100;case 1:return 500;case 2:return 1e3;case 3:return 5e3;case 4:return 1e4;case 5:return 5e4}}this.BetcomfirmButton.setInteractive({userHandCursor:!0}),this.BetcomfirmButton.on(POINTER_DOWN,()=>{this.BetcomfirmButton.setTexture(r,"button_clic");let e;for(let t=0;t<5;t++)e=parseInt(document.getElementById("InputBox"+t).value),isNaN(e)&&(e=0),GameStatus.CurrentBet[GameStatus.CurrentTable][t]=e;K(),GameStatus.PlaySound&&s.play();for(let t=0;t<5;t++)this.baccaratBetInputBox[t].visible=!1}),this.BetcomfirmButton.on(POINTER_UP,()=>{this.BetcomfirmButton.setTexture(r,"button_static")}),this.BetcomfirmButton.on(POINTER_OUT,()=>{this.BetcomfirmButton.setTexture(r,"button_static")}),this.BetcomfirmButton.on(POINTER_OVER,()=>{this.BetcomfirmButton.setTexture(r,"button_hover")}),this.BetCancel.setInteractive({userHandCursor:!0}),this.BetCancel.on(POINTER_DOWN,()=>{this.BetCancel.setTexture(r,"button_clic");for(let t=0;t<5;t++)GameStatus.CurrentBet[GameStatus.CurrentTable][t]=0,document.getElementById("InputBox"+t).value="";GameStatus.PlaySound&&s.play()}),this.BetCancel.on(POINTER_UP,()=>{this.BetCancel.setTexture(r,"button_static")}),this.BetCancel.on(POINTER_OUT,()=>{this.BetCancel.setTexture(r,"button_static")}),this.BetCancel.on(POINTER_OVER,()=>{this.BetCancel.setTexture(r,"button_hover")}),Socket.add("LuDanChange",i=>{if(Socket.socket.emit("AccountMoney"),this.scene.isActive("Hall3")&&(GameStatus.Ting[i[1]]=i[0],GameStatus.AfterAnalayse[i[1]]=i[2],GameStatus.CurrentTable==i[1])&&(n.DrawLuF.DrawLu("WenLuXianLuZhuImageBase64",GameStatus.AfterAnalayse[GameStatus.CurrentTable],luzhuPanCan),this.DrawLuF.DrawLu("LuZhuImageBase64",GameStatus.AfterAnalayse[GameStatus.CurrentTable],luzhuPanCan),F(GameStatus.AfterAnalayse[GameStatus.CurrentTable].WenLuStr),""!=i[0].SetsModel.Results)){this.PaiDianIsRun=!0;{i=i[0].SetsModel.Results;let t=0,e=(n.PaiDian[2].visible=!1,n.PaiDian[3].visible=!1,2);switch(i){case"1":e=0,GameStatus.PlaySound&&n.audioMusicWinlose[0].play(),t=.95*GameStatus.LocalZhuDan[GameStatus.CurrentTable][0]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][1]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][2]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][3]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][4];break;case"2":e=1,GameStatus.PlaySound&&n.audioMusicWinlose[4].play(),t=+GameStatus.LocalZhuDan[GameStatus.CurrentTable][1]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][0]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][2]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][3]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][4];break;case"3":e=2,GameStatus.PlaySound&&n.audioMusicWinlose[8].play(),t=8*GameStatus.LocalZhuDan[GameStatus.CurrentTable][2]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][3]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][4];break;case"4":e=0,n.PaiDian[2].visible=!0,GameStatus.PlaySound&&n.audioMusicWinlose[1].play(),t=.95*GameStatus.LocalZhuDan[GameStatus.CurrentTable][0]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][1]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][2]+11*GameStatus.LocalZhuDan[GameStatus.CurrentTable][3]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][4];break;case"5":e=0,n.PaiDian[3].visible=!0,GameStatus.PlaySound&&n.audioMusicWinlose[2].play(),t=.95*GameStatus.LocalZhuDan[GameStatus.CurrentTable][0]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][1]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][2]+11*GameStatus.LocalZhuDan[GameStatus.CurrentTable][4]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][3];break;case"6":e=0,n.PaiDian[2].visible=!0,n.PaiDian[3].visible=!0,GameStatus.PlaySound&&n.audioMusicWinlose[3].play(),t=.95*GameStatus.LocalZhuDan[GameStatus.CurrentTable][0]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][1]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][2]+11*GameStatus.LocalZhuDan[GameStatus.CurrentTable][3]+11*GameStatus.LocalZhuDan[GameStatus.CurrentTable][4];break;case"7":e=1,n.PaiDian[2].visible=!0,GameStatus.PlaySound&&n.audioMusicWinlose[5].play(),t=+GameStatus.LocalZhuDan[GameStatus.CurrentTable][1]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][0]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][2]+11*GameStatus.LocalZhuDan[GameStatus.CurrentTable][3]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][4];break;case"8":e=1,n.PaiDian[3].visible=!0,GameStatus.PlaySound&&n.audioMusicWinlose[6].play(),t=+GameStatus.LocalZhuDan[GameStatus.CurrentTable][1]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][0]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][2]+11*GameStatus.LocalZhuDan[GameStatus.CurrentTable][4]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][3];break;case"9":e=1,n.PaiDian[2].visible=!0,n.PaiDian[3].visible=!0,GameStatus.PlaySound&&n.audioMusicWinlose[7].play(),t=+GameStatus.LocalZhuDan[GameStatus.CurrentTable][1]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][0]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][2]+11*GameStatus.LocalZhuDan[GameStatus.CurrentTable][3]+11*GameStatus.LocalZhuDan[GameStatus.CurrentTable][4];break;case"10":e=2,n.PaiDian[2].visible=!0,GameStatus.PlaySound&&n.audioMusicWinlose[9].play(),t=8*GameStatus.LocalZhuDan[GameStatus.CurrentTable][2]+11*GameStatus.LocalZhuDan[GameStatus.CurrentTable][3]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][4];break;case"11":e=2,n.PaiDian[3].visible=!0,GameStatus.PlaySound&&n.audioMusicWinlose[10].play(),t=8*GameStatus.LocalZhuDan[GameStatus.CurrentTable][2]+11*GameStatus.LocalZhuDan[GameStatus.CurrentTable][4]-GameStatus.LocalZhuDan[GameStatus.CurrentTable][3];break;case"12":e=2,n.PaiDian[2].visible=!0,n.PaiDian[3].visible=!0,GameStatus.PlaySound&&n.audioMusicWinlose[11].play(),t=8*GameStatus.LocalZhuDan[GameStatus.CurrentTable][2]+11*GameStatus.LocalZhuDan[GameStatus.CurrentTable][4]+11*GameStatus.LocalZhuDan[GameStatus.CurrentTable][3]}n.PaiDian[1].setTexture(r,["bankerw","playerw","tiew"][e]),0{this.PaiDianIsRun=!1},5e3)}}),Socket.add("StopTime",t=>{if(this.scene.isActive("Hall3")&&t[1]==GameStatus.CurrentTable){this.BetcomfirmButton.visible=!1,this.BetCancel.visible=!1,this.BetcomfirmButtonText.visible=!1,this.BetCancelText.visible=!1,L();for(let t=0;t<5;t++)n.baccaratBetInputBox[t].visible=!1,document.getElementById("InputBox"+t).value=""}}),Socket.add("JuId",e=>{GameStatus.Ting[e[1]]=e[0];for(let t=0;t<5;t++)GameStatus.CurrentBet[e[1]][t]=0,GameStatus.LocalZhuDan[e[1]][t]=0,GameStatus.CurrentBetString[e[1]]="";if(this.scene.isActive("Hall3")&&e[1]==GameStatus.CurrentTable){this.TableTitle.text="VIP"+(GameStatus.CurrentTable+1)+" 第"+GameStatus.Ting[GameStatus.CurrentTable].LastBootNum+"靴 第"+GameStatus.Ting[GameStatus.CurrentTable].LastSetNum+"局",3{this.scene.isActive("Hall3")&&(GameStatus.Ting[t[1]].BaccaratPool=t[0][1],GameStatus.CurrentTable==t[1]&&(this.CaiChi[0].text=B(t[0][1].Banker),this.CaiChi[1].text=B(t[0][1].Player),this.CaiChi[2].text=B(t[0][1].Tie),this.CaiChi[3].text=B(t[0][1].BankerPair),this.CaiChi[4].text=B(t[0][1].PlayerPair)),this.DateTimeText.text=t[2][0]+"年"+t[2][1]+"月"+t[2][2]+"日")}),this.TableTitle.text="VIP"+(GameStatus.CurrentTable+1)+" 第"+GameStatus.Ting[GameStatus.CurrentTable].LastBootNum+"靴 第"+GameStatus.Ting[GameStatus.CurrentTable].LastSetNum+"局",Socket.add("AccountMoney",t=>{this.scene.isActive("Hall3")&&(this.AccountMoney.text="账户余额:"+B(Math.floor(t)))}),Socket.socket.emit("AccountMoney"),this.events.on(Phaser.Scenes.Events.SHUTDOWN,()=>{this.textures.removeKey("Luzhupan"),this.textures.removeKey("smallLudan"),this.textures.removeKey("video")}),this.ConfirmBetMessage[6].setInteractive({userHandCursor:!0}),this.ConfirmBetMessage[6].on(POINTER_DOWN,()=>{this.ConfirmBetMessage[6].setTexture(r,"confirmbutton_clic");var t=new Array;t.push(GameStatus.CurrentTable),t.push(GameStatus.CurrentBet[GameStatus.CurrentTable][5]),t.push(7),t.push(GameStatus.CurrentBet[GameStatus.CurrentTable][0]),t.push(GameStatus.CurrentBet[GameStatus.CurrentTable][1]),t.push(GameStatus.CurrentBet[GameStatus.CurrentTable][2]),t.push(GameStatus.CurrentBet[GameStatus.CurrentTable][3]),t.push(GameStatus.CurrentBet[GameStatus.CurrentTable][4]),t.push(1),t.push(GameStatus.CurrentBet[GameStatus.CurrentTable][6]),GameStatus.PlaySound&&s.play(),Socket.socket.emit("TouZhuProc",t),this.ConfirmBetPanel.visible=!1,$();for(let t=0;t<5;t++)GameStatus.CurrentBet[GameStatus.CurrentTable][t]=0,document.getElementById("InputBox"+t).value="",document.getElementById("InputBox"+t).blur(),document.getElementById("InputBox"+t).blur(),this.baccaratBetInputBox[t].visible=!1}).on(POINTER_UP,()=>{this.ConfirmBetMessage[6].setTexture(r,"confirmbutton")}).on(POINTER_OUT,()=>{this.ConfirmBetMessage[6].setTexture(r,"confirmbutton")}).on(POINTER_OVER,()=>{this.ConfirmBetMessage[6].setTexture(r,"confirmbutton_hover")});x=Phaser.Input.Keyboard.KeyCodes;this.input.keyboard.addKey(x.ENTER).on("down",function(t,e){if(!n.HtmlEnter){if(n.ConfirmBetPanel.visible){var i=new Array;i.push(GameStatus.CurrentTable),i.push(GameStatus.CurrentBet[GameStatus.CurrentTable][5]),i.push(7),i.push(GameStatus.CurrentBet[GameStatus.CurrentTable][0]),i.push(GameStatus.CurrentBet[GameStatus.CurrentTable][1]),i.push(GameStatus.CurrentBet[GameStatus.CurrentTable][2]),i.push(GameStatus.CurrentBet[GameStatus.CurrentTable][3]),i.push(GameStatus.CurrentBet[GameStatus.CurrentTable][4]),i.push(1),i.push(GameStatus.CurrentBet[GameStatus.CurrentTable][6]),GameStatus.PlaySound&&s.play(),Socket.socket.emit("TouZhuProc",i),n.ConfirmBetPanel.visible=!1;for(let t=0;t<5;t++)GameStatus.CurrentBet[GameStatus.CurrentTable][t]=0,document.getElementById("InputBox"+t).value="",document.getElementById("InputBox"+t).blur()}if(R(),n.BetHistoryPanel.visible){GameStatus.PlaySound&&s.play(),n.BetHistoryPanel.visible=!1;for(let t=0;t<5;t++)n.baccaratBetInputBox[t].visible=!1}}}),this.ConfirmBetMessage[7].setInteractive({userHandCursor:!0}),this.ConfirmBetMessage[7].on(POINTER_DOWN,()=>{this.ConfirmBetMessage[7].setTexture(r,"cancelbutton_clic"),GameStatus.PlaySound&&s.play(),this.ConfirmBetPanel.visible=!1,$(),R()}).on(POINTER_UP,()=>{this.ConfirmBetMessage[7].setTexture(r,"cancelbutton")}).on(POINTER_OUT,()=>{this.ConfirmBetMessage[7].setTexture(r,"cancelbutton")}).on(POINTER_OVER,()=>{this.ConfirmBetMessage[7].setTexture(r,"cancelbutton_hover")}),this.ConfirmBetPanel.visible=!1,this.BetHistory[1].setInteractive(),this.BetHistory[1].on(POINTER_DOWN,()=>{this.BetHistory[1].setTexture(r,"button_static"),GameStatus.PlaySound&&s.play(),this.BetHistoryPanel.visible=!1,R()}).on(POINTER_UP,()=>{this.BetHistory[1].setTexture(r,"button_static")}).on(POINTER_OUT,()=>{this.BetHistory[1].setTexture(r,"button_static")}).on(POINTER_OVER,()=>{this.BetHistory[1].setTexture(r,"button_hover")});for(let t=0;t<3;t++)this.BetHistoryPanel.add(this.BetHistory[t]);function K(){if(0t[0]+GameStatus.LocalZhuDan[GameStatus.CurrentTable][0]&&0t[1]+GameStatus.LocalZhuDan[GameStatus.CurrentTable][1]&&0t[2]+GameStatus.LocalZhuDan[GameStatus.CurrentTable][2]&&0t[3]+GameStatus.LocalZhuDan[GameStatus.CurrentTable][3]+GameStatus.LocalZhuDan[GameStatus.CurrentTable][4]&&0t[4]+GameStatus.LocalZhuDan[GameStatus.CurrentTable][3]+GameStatus.LocalZhuDan[GameStatus.CurrentTable][4]&&0{GameStatus.IdelCount=0;t=JSON.parse(t);if(t.Success){t=JSON.parse(t.OutMsg);if(t.TableID==GameStatus.CurrentTable+1){var e=t.CaiChi.split(","),i=(this.CaiChi[0].text=B(parseInt(e[0])),this.CaiChi[1].text=B(parseInt(e[1])),this.CaiChi[2].text=B(parseInt(e[2])),this.CaiChi[3].text=B(parseInt(e[3])),this.CaiChi[4].text=B(parseInt(e[4])),t.BetValue.split(","));for(let t=0;t<5;t++)0{switch(e){case 0:return"庄 "+B(t[e])+"@0.95";case 1:return"闲 "+B(t[e])+"@1";case 2:return"和 "+B(t[e])+"@8";case 3:return"庄对 "+B(t[e])+"@11";case 4:return"闲对 "+B(t[e])+"@11"}})(i,t)+"\r\n"+GameStatus.CurrentBetString[GameStatus.CurrentTable],GameStatus.LocalZhuDan[GameStatus.CurrentTable][t]=GameStatus.LocalZhuDan[GameStatus.CurrentTable][t]+parseInt(i[t]),n.confBetText[t].text=B(GameStatus.LocalZhuDan[GameStatus.CurrentTable][t])),movebet(GameStatus.LocalZhuDan[GameStatus.CurrentTable][t],this.ChouMaArray[t+5],this);Socket.socket.emit("AccountMoney"),this.BetHistory[2].text=GameStatus.CurrentBetString[GameStatus.CurrentTable]}this.BetHistoryPanel.visible=!0;for(let t=0;t<5;t++)this.baccaratBetInputBox[t].visible=!1}else try{loadScene.msgBOX("账户余额不足",0,CENTER_Y-50,CENTER_X+450)}catch(t){}}),this.BetHistoryButton.setInteractive(),this.BetHistoryButton.on(POINTER_DOWN,()=>{if(this.BetHistoryButton.setTexture(r,"button_static"),this.BetHistoryPanel.visible=!this.BetHistoryPanel.visible,this.BetHistoryPanel.visible)for(let t=0;t<5;t++)this.baccaratBetInputBox[t].visible=!1;else R(),Socket.AllowBet[GameStatus.CurrentTable]&&setTimeout(()=>{document.getElementById("InputBox"+GameStatus.CurrentBetXiangmu[GameStatus.CurrentTable]).focus()},100);this.BetHistory[2].text=GameStatus.CurrentBetString[GameStatus.CurrentTable],GameStatus.PlaySound&&s.play()}),this.BetHistoryButton.on(POINTER_UP,()=>{this.BetHistoryButton.setTexture(r,"button_static")}),this.BetHistoryButton.on(POINTER_OUT,()=>{this.BetHistoryButton.setTexture(r,"button_static")}),this.BetHistoryButton.on(POINTER_OVER,()=>{this.BetHistoryButton.setTexture(r,"button_hover")}),this.GameLogoutButton.on(POINTER_DOWN,()=>{this.GameLogoutButton.setTexture(r,"button_static"),GameStatus.PlaySound&&s.play(),n.scene.start("Hall1"),Socket.Logout()}).on(POINTER_UP,()=>{this.GameLogoutButton.setTexture(r,"button_static")}).on(POINTER_OUT,()=>{this.GameLogoutButton.setTexture(r,"button_static")}).on(POINTER_OVER,()=>{this.GameLogoutButton.setTexture(r,"button_hover")}),this.wenlubackImageZhuang.on(POINTER_DOWN,()=>{Q(!0),GameStatus.PlaySound&&s.play()}),this.wenlubackImageXian.on(POINTER_DOWN,()=>{Q(!1),GameStatus.PlaySound&&s.play()}),F(GameStatus.AfterAnalayse[GameStatus.CurrentTable].WenLuStr),this.smallMask=this.add.sprite(0,0,"ludanMask").setOrigin(0,0),this.smallMask2=this.add.sprite(0,0,"ludanMask").setOrigin(0,0),this.smallMask2.alpha=.2,this.smallMask.scaleX=.825,this.smallMask.scaleY=.9,this.smallMask2.scaleX=.825,this.smallMask2.scaleY=.9;m=this.add.image(375,141,r,"whitebg");m.scaleX=.4,m.scaleY=.75,this.LuDanBigIamgePreviewer=this.textures.createCanvas("smallLudan",1081,325),this.smallLudan=this.add.image(m.x,m.y,this.LuDanBigIamgePreviewer),this.smallLudan.scale=.54,this.smallLudanRun=!1,this.smallLudanPanel=this.add.container(285,778),this.smallLudanPanel.add(this.smallMask),this.smallLudanPanel.add(this.smallMask2),this.smallLudanPanel.add(m),this.smallLudanPanel.add(this.smallLudan),this.JieGuoDisplayPanel=this.add.container(CENTER_X+115,MAX_HEIGHT+150),this.PaiDian[0]=this.add.sprite(0,0,"ludanMask"),this.PaiDian[0].scaleX=1.18,this.PaiDian[0].scaleY=1.33,this.PaiDian[4]=this.add.text(0,100,"8",{font:"normal 100px Verdana",fill:"#0000ff",align:"center",shadow:{color:o,fill:!0,offsetX:0,offsetY:0,blur:4}}).setOrigin(.5),this.PaiDian[1]=this.add.sprite(0,-80,r,"bankerw"),this.PaiDian[1].scaleX=.8,this.PaiDian[1].scaleY=.8,this.PaiDian[2]=this.add.sprite(380,-80,r,"bpw"),this.PaiDian[2].scaleX=.8,this.PaiDian[2].scaleY=.8,this.PaiDian[3]=this.add.sprite(-340,-80,r,"ppw"),this.PaiDian[3].scaleX=.8,this.PaiDian[3].scaleY=.8;for(let t=1;t<5;t++)this.PaiDian[t].alpha=.9;for(let t=0;t<5;t++)this.JieGuoDisplayPanel.add(this.PaiDian[t]);function Q(e){for(var t=0;t{if(this.scene.isActive("Hall3")&&(this.ChangeTableText[t[0]].text=t[1],this.ChangeTableText[t[0]].setOrigin(.5,.5),t[0]==GameStatus.CurrentTable))if(this.Timer.text="现在接受投注 "+t[1],this.Timer.setOrigin(.5,.5),11==t[1]&&GameStatus.PlaySound&&I.play(),0{if(this.scene.isActive("Hall3")&&t[0]==GameStatus.CurrentTable){GameStatus.PlaySound&&U.play();for(let t=0;t<5;t++)document.getElementById("InputBox"+t).value="",this.confBetText[t].text="0";R(),this.BetcomfirmButton.visible=!0,this.BetCancel.visible=!0,this.BetcomfirmButtonText.visible=!0,this.BetCancelText.visible=!0}})}update(){try{this.BetcomfirmButtonText.visible=this.BetcomfirmButton.visible,this.BetCancelText.visible=this.BetCancel.visible}catch(t){}-3020MAX_HEIGHT-150&&(this.JieGuoDisplayPanel.y-=10):this.JieGuoDisplayPanel.y{e.setTexture(r,p),GameStatus.PlaySound&&n.play(),s.scene.start("HallChangePass")}).on(POINTER_OVER,()=>{e.setTexture(r,f)}).on(POINTER_OUT,()=>{e.setTexture(r,d)}).on(POINTER_UP,()=>{e.setTexture(r,d)}),h.on(POINTER_DOWN,()=>{h.setTexture(r,p),GameStatus.PlaySound&&n.play(),s.scene.start("HallReport")}).on(POINTER_OVER,()=>{h.setTexture(r,f)}).on(POINTER_OUT,()=>{h.setTexture(r,d)}).on(POINTER_UP,()=>{h.setTexture(r,d)}),l.on(POINTER_DOWN,()=>{l.setTexture(r,p),GameStatus.PlaySound&&n.play(),s.scene.start("Hall1"),Socket.Logout(),Socket={}}).on(POINTER_OVER,()=>{l.setTexture(r,f)}).on(POINTER_OUT,()=>{l.setTexture(r,d)}).on(POINTER_UP,()=>{l.setTexture(r,d)});for(let e=0;e{o[e].setTexture(r,"VIP"+(e+1)+"button_clic");var t=e;GameStatus.PlaySound&&n.play(),s.scene.start("Hall3"),GameStatus.CurrentTable=t,loadVideo();try{VideoMaskMain.play(!0)}catch(t){}}).on(POINTER_OVER,()=>{o[e].setTexture(r,"VIP"+(e+1)+"button_hover")}).on(POINTER_OUT,()=>{o[e].setTexture(r,"VIP"+(e+1)+"button_static")}).on(POINTER_UP,()=>{o[e].setTexture(r,"VIP"+(e+1)+"button_static")}),this.add.image(o[e].x-4,o[e].y+2*o[e].height,r,"datacontainer"),o[e].name=e,this.TableTime[e]=this.add.text(o[e].x-45,o[e].y-15,"0",{font:"bold 30px Arial",fill:u,align:"right"}).setOrigin(1,0),this.TableStatus[e]=this.add.text(o[e].x-121,o[e].y+90,"",{font:"bold 35px Arial",fill:u,align:"left"}),0{this.scene.isActive("Hall2")&&(this.TableTime[t[0]].text=t[1],this.TableTime[t[0]].setOrigin(1,0),0{this.scene.isActive("Hall2")&&(GameStatus.Ting[t[1]]=t[0],GameStatus.AfterAnalayse[t[1]]=t[2],a.DrawTing(t[1],GameStatus.AfterAnalayse,tableCanvas[t[1]]),tableCanvas[t[1]].update(),this.LuZhiCounterB[i].text="庄:"+GameStatus.AfterAnalayse[t[1]].Banker,this.LuZhiCounterP[i].text="闲:"+GameStatus.AfterAnalayse[t[1]].Player,this.LuZhiCounterT[i].text="和:"+GameStatus.AfterAnalayse[t[1]].Tie)}),VideoWorker.postMessage(["Init",!0]),this.events.on(Phaser.Scenes.Events.SHUTDOWN,()=>{for(let t=0;t<4;t++)this.textures.removeKey("tableCanvas"+t)})}update(){this.BoardMessageText.x>0-25*this.BoardMessageText.text.length?this.BoardMessageText.x=this.BoardMessageText.x-2:this.BoardMessageText.x=1423}dropCrate(){}render(){}}let audioClick;class Hall1 extends Phaser.Scene{constructor(){super("Hall1")}preload(){}create(){audioClick=this.sound.add("audioClick");let e=this;var t=(currentScene=this).add.dom(MAX_WIDTH-300,CENTER_Y+50).createFromCache("nameform");let i="loginAtlas";document.getElementById("username").focus(),document.getElementById("password").onkeydown=function(t){"Enter"==t.key&&n()},this.add.image(CENTER_X,CENTER_Y,i,"background");var s=this.add.image(t.x-2,CENTER_Y+15,i,"input_blank");s.scaleX=1.04;this.add.image(s.x,CENTER_Y+96,i,"input_blank").scaleX=1.04,this.add.text(t.x-190,t.y-20,"账号:",{fontSize:"25px"}).setOrigin(1),this.add.text(t.x-190,CENTER_Y+109,"密码:",{fontSize:"25px"}).setOrigin(1);s=MAX_WIDTH-200;function n(){e.Message.text="",e.loginbt.removeInteractive(),(GameStatus=new GameStatusClass).PlaySound&&audioClick.play(),Socket=new GameSocket,GameStatus.username=document.getElementById("username").value,GameStatus.password=document.getElementById("password").value,Socket.ConnectWebSocket(e),Socket.add("LoginStatus",t=>{if(e.scene.isActive("Hall1")){if(t[0]){GameStatus.userObject=t[1],GameStatus.Ting=t[2],GameStatus.AfterAnalayse=t[3],Socket.initTime(t[2]),ToDayString=t[4][0]+"年"+t[4][1]+"月"+t[4][2]+"日";for(let t=0;t<4;t++)gameTime[t]=new Date,gameTime[t]-=1e3*(45-Socket.MainTimer[t])-1;e.scene.start("HallLI")}else setTimeout(()=>{e.loginbt.setTexture(i,"loginbutton_static"),e.Message.text="用户名或密码错误 登录失败!\nWrong Username or Password, Login failed!",e.Message.setOrigin(.5)},100);setTimeout(()=>{try{e.loginbt.setInteractive({useHandCursor:!0})}catch(t){}},100)}})}this.loginbt=this.add.image(t.x-10,CENTER_Y+170,i,"loginbutton_static"),this.add.image(this.loginbt.x,412,i,"logo"),this.agentbt2=this.add.image(100+s,30,i,"greenbutton_static"),this.agentbt1=this.add.image(this.agentbt2.x-this.agentbt2.width-10,30,i,"greenbutton_static"),this.add.text(this.agentbt1.x,this.agentbt1.y,"代理登录1",buttonTextStyle).setOrigin(.5,.5),this.add.text(this.agentbt2.x,this.agentbt2.y,"代理登录2",buttonTextStyle).setOrigin(.5,.5),this.cameras.main.fadeIn(500,0,0,0),this.Message=this.add.text(s-90,CENTER_Y+290,"",buttonTextStyle),this.loginbt.setInteractive({useHandCursor:!0}).on(POINTER_DOWN,function(){e.loginbt.setTexture(i,"loginbutton_clic"),n()}).on(POINTER_UP,function(){e.loginbt.setTexture(i,"loginbutton_static")}).on(POINTER_OUT,function(){e.loginbt.setTexture(i,"loginbutton_static")}).on(POINTER_OVER,function(){e.loginbt.setTexture(i,"loginbutton_hover")}),this.agentbt1.setInteractive({useHandCursor:!0}).on(POINTER_DOWN,async function(){var t=(await axios.get("/AgentWebUrl")).data.url;window.open(t),e.agentbt1.setTexture(i,"greenbutton_clic")}).on(POINTER_UP,function(){e.agentbt1.setTexture(i,"greenbutton_static")}).on(POINTER_OUT,function(){e.agentbt1.setTexture(i,"greenbutton_static")}).on(POINTER_OVER,function(){e.agentbt1.setTexture(i,"greenbutton_hover")}),this.agentbt2.setInteractive({useHandCursor:!0}).on(POINTER_DOWN,async function(){var t=(await axios.get("/AgentWebUrl2")).data.url;window.open(t),e.agentbt2.setTexture(i,"greenbutton_clic")}).on(POINTER_UP,function(){e.agentbt2.setTexture(i,"greenbutton_static")}).on(POINTER_OUT,function(){e.agentbt2.setTexture(i,"greenbutton_static")}).on(POINTER_OVER,function(){e.agentbt2.setTexture(i,"greenbutton_hover")})}update(){}}let firstClick;class HallLI extends Phaser.Scene{constructor(){super("HallLI")}preload(){}create(){firstClick=!1;let t=this,e=this.sound.add("audioClick"),i=(currentScene=this,"LIAtlas");this.add.sprite(CENTER_X-10,CENTER_Y,i,"background");this.add.dom(CENTER_X-115,CENTER_Y+2).createFromCache("licForm");let s=this.add.image(MAX_WIDTH-400,MAX_HEIGHT-70,i,"button_static"),n=this.add.image(s.x,MAX_HEIGHT-80-s.height,i,"button_static");this.add.text(n.x,n.y,"同意",licButtonStyle).setOrigin(.5,.5),this.add.text(s.x,s.y,"不同意",licButtonStyle).setOrigin(.5,.5),n.setInteractive({useHandCursor:!0}).on(POINTER_DOWN,()=>{n.setTexture(i,"button_clic"),GameStatus.PlaySound&&e.play(),t.scene.start("Hall2")}).on(POINTER_OUT,()=>{n.setTexture(i,"button_static")}).on(POINTER_UP,()=>{n.setTexture(i,"button_static")}).on(POINTER_OVER,()=>{n.setTexture(i,"button_hover")}),s.setInteractive({useHandCursor:!0}).on(POINTER_DOWN,()=>{s.setTexture("buttonClic"),GameStatus.PlaySound&&e.play(),t.scene.start("Hall1"),Socket.Logout()}).on(POINTER_OUT,()=>{s.setTexture(i,"button_static")}).on(POINTER_UP,()=>{s.setTexture(i,"button_static")}).on(POINTER_OVER,()=>{s.setTexture(i,"button_hover")})}dropCrate(){}update(){}}class GameSocket{constructor(){this.handleFunc={},this.MainTimer={},this.NowDate={},this.AllowBet={},this.challengeVerified=!1}Logout(){this.socket.close(),clearInterval(this.Timer)}add(t,e){this.handleFunc[t]?-1===this.handleFunc[t].findIndex(t=>t.toString()==e.toString())&&this.handleFunc[t].push(e):this.handleFunc[t]=[e]}fire(t,e){try{if(1===arguments.length)for(var i=this.handleFunc[t],s=i.length,n=0;n{try{t.call(this,e)}catch(t){}})}initTime(e){this.MainTimer=[],this.StartNumber=[],this.StartTime=[];for(let t=0;t{for(let t=0;t{try{var t=await axios.get("/data");e=io(t.data.server,{transports:["websocket"]}),i.socket=e,GameStatus.VideoIndex=t.data.count,this.createSocket(e,i),isdebug&&console.log(t.data)}catch(t){isdebug&&console.error(t)}},n=new URLSearchParams(window.location.search).get("serverip");n?(e=io("wss://"+n),this.socket=e,this.createSocket(e,i)):s(),window.onfocus=function(){try{(currentScene.scene.isActive("Hall3")||currentScene.scene.isActive("Hall2")||currentScene.scene.isActive("Hall1"))&¤tScene.refreshOnBack()}catch(t){}try{currentDateTime=new Date}catch(t){}}}createSocket(s,r){s.on("connect_failed",function(){isdebug&&alertify.error("Connection failed!"),r.trigger("connect_failed");try{loadScene.msgBOX("连接失败!")}catch(t){}}),s.on("connect",function(){r.challengeVerified=!1,isdebug&&alertify.success("Successfully connected to the server! Waiting for verification..."),r.trigger("connect");try{currentScene.scene.isActive("Hall1")||currentScene.scene.isActive("HallLI")||currentScene.scene.isActive("HallChangePass")?currentScene.scene.isActive("HallChangePass")&&loadScene.msgBOX("重新连接服务器成功!",0,CENTER_Y+400):loadScene.msgBOX("重新连接服务器成功!")}catch(t){}}),s.on("challenge",async function(e){try{var i=window.location.hostname;let t="";try{t=new URL(window.location.href).hostname}catch(t){}s.emit("verifyChallenge",{nonce:e.nonce,host:i,origin:t,signature:e.signature})}catch(t){isdebug&&console.error("challenge error",t),s.disconnect()}}),s.on("challengeVerified",function(){r.challengeVerified=!0,s.emit("authenticate",{username:GameStatus.username,password:GameStatus.password,token:GameStatus.Token,clienttype:"desktop"}),isdebug&&alertify.success("Verification success, authenticating...")}),s.on("authenticate",function(t){isdebug&&alertify.success("Authentication success!")}),s.on("reconnect",function(){isdebug&&alertify.success("Successfully reconnected to the server!");try{currentScene.scene.isActive("Hall1")||currentScene.scene.isActive("HallLI")||currentScene.scene.isActive("HallChangePass")?currentScene.scene.isActive("HallChangePass")&&loadScene.msgBOX("成功重连服务器!",0,CENTER_Y+400):loadScene.msgBOX("成功重连服务器!")}catch(t){}r.trigger("reconnect");try{(currentScene.scene.isActive("Hall3")||currentScene.scene.isActive("Hall2"))&¤tScene.refreshOnBack()}catch(t){isdebug&&console.log(t)}}),s.on("reconnecting",function(){isdebug&&alertify.error("Attempting to reconnect to the server!"),r.trigger("reconnecting");try{currentScene.scene.isActive("Hall1")||currentScene.scene.isActive("HallLI")||currentScene.scene.isActive("HallChangePass")?currentScene.scene.isActive("HallChangePass")&&loadScene.msgBOX("重连服务器失败",-1,CENTER_Y+400):loadScene.msgBOX("重连服务器失败",-1)}catch(t){}}),s.on("disconnect",function(){isdebug&&alertify.error("Disconnected from the server");try{currentScene.scene.isActive("Hall1")||currentScene.scene.isActive("HallLI")||currentScene.scene.isActive("HallChangePass")?currentScene.scene.isActive("HallChangePass")&&loadScene.msgBOX("服务器端断开连接",0,CENTER_Y+400):loadScene.msgBOX("服务器端断开连接")}catch(t){}r.trigger("disconnect")}),s.on("ServerSideClose",function(){try{currentScene.scene.start("Hall1"),Socket.Logout()}catch(t){}}),s.on("StopTime",(t,e)=>{this.AllowBet[e]=!1,r.trigger("StopTime",t,e)}),s.on("LoginStatus",(t,e,i,s,n)=>{if(t&&(e=decompressData(e),i=decompressData(i),s=decompressData(s)),r.trigger("LoginStatus",t,e,i,s,n),t)for(let t=0;t{r.trigger("changePass",t,e)}),s.on("InitData",function(t,e){}),s.on("GetTableTime",function(t){}),s.on("OnlineUser",function(t,e){}),s.on("JuId",function(t,e){t=decompressData(t),r.trigger("JuId",t,e);try{currentScene.scene.isActive("Hall3")&&GameStatus.CurrentTable==e&&(currentScene.JuNumText.text=t.LastSetNum)}catch(t){}}),s.on("SanGongResult",function(t,e){}),s.on("LuDan",function(t,e,i){t=decompressData(t),i=decompressData(i),r.trigger("LuDanChange",t,e,i)}),s.on("Time",function(t,e){r.MainTimer[e]=t,r.AllowBet[e]=!0,r.StartTime[e]=new Date,r.StartNumber[e]=t,r.trigger("TimeStart",e,t)}),s.on("SetLimit",function(t){if(LoadFinish){var e=JSON.parse(t);Hall3L.RenHongChoose[0].visible=!1;for(var i=0;i{this.NowDate=new Date(i),r.trigger("CaiChi",t,e)}),s.on("GetBankCard",function(t,e){LoadFinish&&"Hall3"===game.state.current&&(1!=t.Success?window.location.href="/tiedcard":window.location.href=0==e?"/topUp":"/withdrawals")}),s.on("AccountMoney",function(t){t=Math.floor(t);r.trigger("AccountMoney",t)}),s.on("SitDown",function(t,e){if(t.Success){JSON.parse(t.OutMsg);if(alertify.success("你已经坐在 You are already sitting"+ConvertToSitNumber(e)+"位!Bit!"),CurrentSit=parseInt(e),"7"!=e){for(var i=0;i<5;i++)Hall5LNew.MoveBet(0,Hall5LNew.ChouMaArray[7+8*i]);Hall5LNew.sitUserName[7].setText("")}else{if(3==Ting[GameStatus.CurrentTable].Type||5==Ting[GameStatus.CurrentTable].Type)for(i=0;i<12;i++)Hall5LNew.MoveBet(LocalZhuDan[GameStatus.CurrentTable][i],Hall5LNew.ChouMaArray[i+40]);else for(i=0;i<5;i++)Hall5LNew.MoveBet(LocalZhuDan[GameStatus.CurrentTable][i],Hall5LNew.ChouMaArray[7+8*i]);Hall5LNew.sitUserName[7].setText(AccountName)}for(i=0;i<5;i++)CurrentBet[GameStatus.CurrentTable][i]=0}else alertify.error("对不起,该座位已经有人了!Sorry, the sit is already occupied!")}),s.on("GetBetReport",function(t){r.trigger("GetBetReport",t)}),s.on("GetBetReportTotal",function(t){r.trigger("GetBetReportTotal",t)})}}class GameStatusClass{constructor(){this.PlaySound=!0,this.IdelCount=0,this.CurrentTable=0,this.CurrentSit={},this.CurrentBetXiangmu=new Array,this.CurrentChouMa={},this.LocalZhuDan={},this.VideoIndex=0,this.CurrentBet=new Array,this.AllowBet=new Array,this.ZhuDanText=new Array,this.ShowMessage=!0,this.DataInit=!1,this.username="",this.password="",this.userObject={},this.Ting={},this.AfterAnalayse={},this.MainTimer={},this.CurrentBetString={};for(let e=0;e<4;e++){this.CurrentSit[e]=0,this.ZhuDanText[e]="",this.CurrentBetString[e]="",this.AllowBet[e]=!1,this.CurrentBetXiangmu[e]=0,this.LocalZhuDan[e]=new Array,this.CurrentBet[e]=new Array;for(let t=0;t<5;t++)this.LocalZhuDan[e][t]=0;for(let t=0;t<12;t++)this.CurrentBet[e][t]=0}this.handleFunc={}}add(t,e){this.handleFunc[t]?-1===this.handleFunc[t].indexOf(e)&&this.handleFunc[t].push(e):this.handleFunc[t]=[e]}remove(t,e){try{var i=this.handleFunc[t],s=i.indexOf(e);if(-1===s)throw error;i.splice(s,1)}catch(t){console.error("别老想搞什么飞机,删除我有的东西!")}}once(t,e){this.fire(t,e)&&this.remove(t,e)}trigger(t,...e){void 0!==this.handleFunc[t]&&this.handleFunc[t].forEach(t=>{t.call(this,e)})}}class SkinManager{constructor(){this.currentSkin="default",this.skinPath="/skins/default/",this.skinConfig=null,this.initialized=!1}async init(e="default"){try{this.currentSkin=e,this.skinPath=`/skins/${e}/`;var t=await fetch(this.skinPath+"config.json");return this.skinConfig=await t.json(),this.initialized=!0,localStorage.setItem("selectedSkin",e),this.skinConfig}catch(t){if(console.error("皮肤加载失败:",t),"default"!==e)return this.init("default")}}getAssetPath(t,e){if(!this.initialized||!this.skinConfig)return console.warn("皮肤管理器未初始化"),null;var i,t=t.split(".");let s=this.skinConfig.assets;for(i of t)if(!(s=s[i]))return null;return(s="object"==typeof s&&e?s[e]:s)?""+this.skinPath+s:null}getThemeColor(t){return this.skinConfig&&this.skinConfig.theme&&this.skinConfig.theme.colors?this.skinConfig.theme.colors[t]:null}getThemeFont(t){return this.skinConfig&&this.skinConfig.theme&&this.skinConfig.theme.fonts?this.skinConfig.theme.fonts[t]:null}getSkinPath(){return this.skinPath}getImagePath(t){var e=this.findAssetInConfig(t);if(e)return""+this.skinPath+e;var i;for(i of["images/","DesktopImage/","images2/","images3/","images4/","images5/"])return t.includes("/")?""+this.skinPath+t:""+this.skinPath+i+t;return this.skinPath+"images/"+t}findAssetInConfig(t,e=null){for(var i in e=e||this.skinConfig.assets)if("string"==typeof e[i]){if(e[i].includes(t))return e[i]}else if("object"==typeof e[i]){i=this.findAssetInConfig(t,e[i]);if(i)return i}return null}async switchSkin(t){return t!==this.currentSkin&&(await this.init(t),window.game&&window.game.events&&window.game.events.emit("skinChanged",t),!0)}getCurrentSkinId(){return this.currentSkin}static getSavedSkin(){return localStorage.getItem("selectedSkin")||"default"}}window.skinManager=new SkinManager;let EVENTS=Phaser.Input.Events,POINTER_DOWN="pointerdown",POINTER_OVER="pointerover",POINTER_OUT="pointerout",POINTER_UP="pointerup",buttonTextStyle={font:"22px Verdana",align:"center",color:"#ffd96b"},licButtonStyle={font:"bold 21px Verdana",align:"center",color:"#ffd96b"},loadScene;class Load extends Phaser.Scene{constructor(){super("Load")}preload(){let t,e,i;var s=(currentScene=this).add.container(CENTER_X,CENTER_Y),n=this.add.video(CENTER_X,CENTER_Y-200,"logovid"),n=(n.setScale(.5),n.play(!1),this.add.image(0,100,"loadingAtlas","loadingbar_0"));let r=this.add.image(0,100,"loadingAtlas","loading_bar100"),o=this.make.graphics(),a=(o.x=CENTER_X,o.y=CENTER_Y,o.fillRect(0,0,.6*n.width,n.height),r.mask=new Phaser.Display.Masks.GeometryMask(this,o),this.add.text(0,100,"0%",{fontSize:"50px",fill:"#ffffff"}));a.setOrigin(.5,.5),this.load.on("progress",function(t){a.setText(parseInt(100*t)+"%"),o.x=CENTER_X-.6*r.width*1.5+.6*r.width*(parseInt(100*t)/100)},this),s.add([n,r,o,a]),s.setScale(.6),i=isdebug?(t=skinManager.getSkinPath()+"assets/",e="assets/HTML",".png"):(t=skinManager.getSkinPath()+"assets/",e="Html",".webp"),this.load.atlas("loginAtlas",t+"ui/spritesheet/spritesheet_login"+i,t+"spriteJSON/spritesheet_login.json"),this.load.atlas("LIAtlas",t+"ui/spritesheet/spritesheet_tosscreen"+i,t+"spriteJSON/spritesheet_tosscreen.json"),this.load.atlas("mainAtlas",t+"ui/spritesheet/spritesheet_gamecreen1"+i,t+"spriteJSON/spritesheet_gamecreen1.json"),this.load.atlas("recordAtlas",t+"ui/spritesheet/spritesheet_record"+i,t+"spriteJSON/spritesheet_record.json"),this.load.atlas("passwordAtlas",t+"ui/spritesheet/spritesheet_passwords"+i,t+"spriteJSON/spritesheet_passwords.json"),this.load.atlas("theGameAtlas",t+"ui/spritesheet/spritesheet_gamescreen2"+i,t+"spriteJSON/spritesheet_gamescreen2.json"),this.load.html("nameform",e+"/loginformDesktop.html"),this.load.html("licForm",e+"/LI_Agreement.html"),this.load.html("Report",e+"/Report.html"),this.load.html("passwordinput",e+"/ChangePass.html"),this.load.video("wormhole",skinManager.getSkinPath()+"DesktopImage/610.mp4","loadeddata",!1,!0);let h;h=isdebug?"assets/HTML/":"../Html/",this.load.html("InputBox0",h+"InputBox0.html"),this.load.html("InputBox1",h+"InputBox1.html"),this.load.html("InputBox2",h+"InputBox2.html"),this.load.html("InputBox3",h+"InputBox3.html"),this.load.html("InputBox4",h+"InputBox4.html"),this.load.image("ludanMask",t+"ui/Game/win_icons/ludanMask"+i),this.load.audio("aduioZhuang",skinManager.getSkinPath()+"Audio/aduioZhuang.mp3"),this.load.audio("aduioZhuangZD",skinManager.getSkinPath()+"Audio/aduioZhuangZD.mp3"),this.load.audio("aduioZhuangXD",skinManager.getSkinPath()+"Audio/aduioZhuangXD.mp3"),this.load.audio("aduioZhuangZXD",skinManager.getSkinPath()+"Audio/aduioZhuangZXD.mp3"),this.load.audio("aduioXian",skinManager.getSkinPath()+"Audio/aduioXian.mp3"),this.load.audio("aduioXianZD",skinManager.getSkinPath()+"Audio/aduioXianZD.mp3"),this.load.audio("aduioXianXD",skinManager.getSkinPath()+"Audio/aduioXianXD.mp3"),this.load.audio("aduioXianZXD",skinManager.getSkinPath()+"Audio/aduioXianZXD.mp3"),this.load.audio("aduioHe",skinManager.getSkinPath()+"Audio/aduioHe.mp3"),this.load.audio("aduioHeZD",skinManager.getSkinPath()+"Audio/aduioHeZD.mp3"),this.load.audio("aduioHeXD",skinManager.getSkinPath()+"Audio/aduioHeXD.mp3"),this.load.audio("aduioHeZXD",skinManager.getSkinPath()+"Audio/aduioHeZXD.mp3"),this.load.audio("Last10miao",skinManager.getSkinPath()+"Audio/Last10miao.mp3"),this.load.audio("audioStartBet",skinManager.getSkinPath()+"Audio/start.mp3"),this.load.audio("audioDi",skinManager.getSkinPath()+"Audio/ding.mp3"),this.load.audio("audioClick",skinManager.getSkinPath()+"Audio/click.mp3"),this.load.audio("SendCards",skinManager.getSkinPath()+"Audio/startsendcards.mp3"),this.load.audio("audioWin",skinManager.getSkinPath()+"Audio/Win.mp3");n=(blackTexture=this.textures.createCanvas("blackTexture",MAX_WIDTH,MAX_HEIGHT)).getContext("2d");n.beginPath(),n.fillStyle="rgba(0,0,0)",n.strokeStyle="rgba(0,0,0)",n.lineWidth=1,n.fillRect(0,0,MAX_WIDTH,MAX_HEIGHT),blackTexture.getContext("2d").putImageData(n.getImageData(0,0,MAX_WIDTH,MAX_HEIGHT),0,0);let l,u=(l=isdebug?"assets/ui/Game/":skinManager.getSkinPath()+"images/",this.load.image("loadKuang",l+"loadKuang.webp"),this.load.image("loadKuang1",l+"loadKuang1.webp"),loadScene=this,{font:"normal 32px Copperplate",fill:"#debe9b",align:"left"}),c,d,p;this.msgBOX=function(t,e,i,s){clearTimeout(p),i=i||CENTER_Y-400,s=s||CENTER_X;try{c.destroy(),d.destroy()}catch(t){}c=currentScene.add.image(s,i,blackTexture),d=currentScene.add.text(c.x,c.y,t,u).setOrigin(.5),c.scaleY=.2,c.scaleX=.5,c.alpha=.6,0<(e=e||3)&&(p=setTimeout(()=>{try{c.destroy(),c=void 0,d.destroy(),d=void 0}catch(t){}},1e3*e))}}create(){this.scene.switch("Hall1")}}let Config={type:Phaser.CANVAS,width:1920,height:1080,parent:"game",dom:{createContainer:!0},scene:[screenLoad,Load,Hall1,HallLI,Hall2,Hall3,HallChangePass,HallReport],audio:{disableWebAudio:!0},scale:{mode:Phaser.Scale.FIT,autoCenter:Phaser.Scale.CENTER_BOTH},callbacks:{postBoot:async function(t){t.domContainer.style.pointerEvents="none",t.domContainer.style.pointerEvents="none";t=SkinManager.getSavedSkin();await window.skinManager.init(t)}},physics:{default:"arcade"}},game=new Phaser.Game(Config),GameStatus;game.scene.start("screenLoad");let Socket,width=800,height=460,VidoeBmdctx,VideoBmd,VideoMaskMain,TableLuZhu=[],VideoCanvas,context,ShowVideo=!1,MAX_WIDTH=(VideoCanvas=document.createElement("canvas"),VideoCanvas.width=width,VideoCanvas.height=height,context=VideoCanvas.getContext("2d"),Config.width),MAX_HEIGHT=Config.height,CENTER_X=MAX_WIDTH/2,CENTER_Y=MAX_HEIGHT/2,isdebug=JSON.parse(document.getElementById("IsDebug").value),imageData=new ImageData(800,460),wasmVersion="1.3.0",videoURL="",VideoWorker=(videoURL=isdebug?"/wasm/open.js?v="+wasmVersion:"/dist/video.min.js?v="+wasmVersion,new Worker(videoURL)),tableCanvas=[],luzhuPanCan,currentScene,gameTime=[],currentDateTime,ToDayString,videoT,C_White="#d8dcdc",C_Red="rgb(175,42,37)",C_Blue="rgb(31,90,168)",C_Green="rgb(91,146,0)",C_Black="#303030",blackTexture,VideoReadyCount=0;function VideoOnPlay(){VideoMaskMain.visible=!1,VideoMaskMain.stop()}function Getscreenshot(t){try{lastVideoData==t&¤tScene.scene.isActive("Hall3")&&loadVideo()}catch(t){}var e=new Uint8ClampedArray(t),e=new ImageData(e,width,height);VideoBmd.putData(e,0,0),VideoBmd.refresh(),lastVideoData=t}function loadVideo(){var t=GameStatus.Ting[0].VideoAddressList[GameStatus.VideoIndex].Url.split(":")[0],e=(VideoWorker.postMessage(["Disconnect"]),550+GameStatus.CurrentTable);ShowVideo=!1,VideoWorker.postMessage(["ConnetToWebSocket","wss://"+window.location.host+"/videovip"+(GameStatus.CurrentTable+1)+"/","videovip"+(GameStatus.CurrentTable+1)]),clearTimeout(videoT),videoT=setTimeout(()=>{ShowVideo=!0},2e3),isdebug&&console.log("Video url: wss://"+t+":"+e+"/")}function switchVideoServer(t){console.log("Video server show mask! switchVideoServer"),VideoMaskMain.visible=!0,VideoMaskMain.play(!0),GameStatus.VideoIndex!=t&&(GameStatus.VideoIndex=t,loadVideo())}VideoWorker.addEventListener("message",function(t){var e,i;if(Array.isArray(t.data))switch(t.data[0]){case"VideoData":Getscreenshot(t.data[1]);break;case"VideoReady":ShowVideo&&VideoOnPlay()}else t.data&&"object"==typeof t.data&&"setAuthCookie"===t.data.type&&(e=t.data.token,(i=new Date).setTime(i.getTime()+36e5),document.cookie=`auth=${encodeURIComponent(e)}; `+`expires=${i.toUTCString()}; `+"path=/; secure; samesite=strict",window.dispatchEvent(new CustomEvent("wasmAuthReady",{detail:{timestamp:t.data.timestamp,fallback:t.data.fallback||!1}})))});