"),o.push(""),o.push("");var l=[o.join(` `)],f=this;try{var u=new window.Blob(l,{type:"image/svg+xml;charset=utf-8"})}catch{f.state=c.FILE_ERRORED,f.onProcessComplete();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){h.revokeObjectURL(f.data),f.onProcessComplete()},this.data.onerror=function(){h.revokeObjectURL(f.data),f.onProcessError()},h.createObjectURL(this.data,u,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});r.register("htmlTexture",function(a,i,o,l,f){if(Array.isArray(a))for(var u=0;u{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=t(98356),a=new d({Extends:h,initialize:function i(o,l,f,u,v){var m="png",x;if(e(l)){var g=l;l=n(g,"key"),f=n(g,"url"),x=n(g,"normalMap"),u=n(g,"xhrSettings"),m=n(g,"extension",m),v=n(g,"frameConfig")}Array.isArray(f)&&(x=f[1],f=f[0]);var y={type:"image",cache:o.textureManager,extension:m,responseType:"blob",key:l,url:f,xhrSettings:u,config:v};if(h.call(this,o,y),x){var T=new i(o,this.key,x,u,v);T.type="normalMap",this.setLink(T),o.addFile(T)}this.useImageElementLoad=o.imageLoadType==="HTMLImageElement"||this.base64,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var i=this;this.data.onload=function(){h.revokeObjectURL(i.data),i.onProcessComplete()},this.data.onerror=function(){h.revokeObjectURL(i.data),i.onProcessError()},h.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var i=this.state;this.state=c.FILE_PROCESSING,i===c.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=c.FILE_LOADING,this.src=s(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var i=this;this.data.onload=function(){i.state=c.FILE_LOADED,i.loader.nextFile(i,!0)},this.data.onerror=function(){i.loader.nextFile(i,!1)},this.data.src=this.src},addToCache:function(){var i=this.linkFile;i?i.state>=c.FILE_COMPLETE&&(i.type==="spritesheet"?i.addToCache():this.type==="normalMap"?this.cache.addImage(this.key,i.data,this.data):this.cache.addImage(this.key,this.data,i.data)):this.cache.addImage(this.key,this.data)}});r.register("image",function(i,o,l){if(Array.isArray(i))for(var f=0;f{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(35154),s=t(41212),a=new d({Extends:h,initialize:function(o,l,f,u,v){var m="json";if(s(l)){var x=l;l=n(x,"key"),f=n(x,"url"),u=n(x,"xhrSettings"),m=n(x,"extension",m),v=n(x,"dataKey",v)}var g={type:"json",cache:o.cacheManager.json,extension:m,responseType:"text",key:l,url:f,xhrSettings:u,config:v};h.call(this,o,g),s(f)&&(v?this.data=e(f,v):this.data=f,this.state=c.FILE_POPULATED)},onProcess:function(){if(this.state!==c.FILE_POPULATED){this.state=c.FILE_PROCESSING;try{var i=JSON.parse(this.xhrLoader.responseText)}catch(l){throw this.onProcessError(),l}var o=this.config;typeof o=="string"?this.data=e(i,o,i):this.data=i}this.onProcessComplete()}});r.register("json",function(i,o,l,f){if(Array.isArray(i))for(var u=0;u{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(74099),h=t(95540),r=t(19550),n=t(41212),e=t(518),s=t(26430),a=new d({Extends:s,initialize:function(o,l,f,u,v,m,x){if(n(l)){var g=l;l=h(g,"key"),h(g,"url",!1)?f=h(g,"url"):f=h(g,"atlasURL"),m=h(g,"xhrSettings"),u=h(g,"path"),v=h(g,"baseURL"),x=h(g,"textureXhrSettings")}var y=new e(o,l,f,m);s.call(this,o,"multiatlas",l,[y]),this.config.path=u,this.config.baseURL=v,this.config.textureXhrSettings=x},onFileComplete:function(i){var o=this.files.indexOf(i);if(o!==-1&&(this.pending--,i.type==="json"&&i.data.hasOwnProperty("textures"))){var l=i.data.textures,f=this.config,u=this.loader,v=u.baseURL,m=u.path,x=u.prefix,g=h(f,"baseURL",this.baseURL),y=h(f,"path",this.path),T=h(f,"prefix",this.prefix),C=h(f,"textureXhrSettings");u.setBaseURL(g),u.setPath(y),u.setPrefix(T);for(var E=0;E{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(74099),h=t(95540),r=t(41212),n=t(26430),e=t(34328),s=new d({Extends:n,initialize:function(i,o,l,f){var u="js",v=[];if(r(o)){var m=o;o=h(m,"key"),l=h(m,"url"),f=h(m,"xhrSettings"),u=h(m,"extension",u)}Array.isArray(l)||(l=[l]);for(var x=0;x{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(74099),h=t(95540),r=t(41212),n=t(26430),e=t(85048),s=t(61485),a=t(78776),i=new d({Extends:n,initialize:function(l,f,u,v,m,x){var g,y,T=l.cacheManager.obj;if(r(f)){var C=f;f=h(C,"key"),g=new a(l,{key:f,type:"obj",cache:T,url:h(C,"url"),extension:h(C,"extension","obj"),xhrSettings:h(C,"xhrSettings"),config:{flipUV:h(C,"flipUV",m)}}),v=h(C,"matURL"),v&&(y=new a(l,{key:f,type:"mat",cache:T,url:v,extension:h(C,"matExtension","mat"),xhrSettings:h(C,"xhrSettings")}))}else g=new a(l,{key:f,url:u,type:"obj",cache:T,extension:"obj",xhrSettings:x,config:{flipUV:m}}),v&&(y=new a(l,{key:f,url:v,type:"mat",cache:T,extension:"mat",xhrSettings:x}));n.call(this,l,"obj",f,[g,y])},addToCache:function(){if(this.isReadyToProcess()){var o=this.files[0],l=this.files[1],f=e(o.data,o.config.flipUV);l&&(f.materials=s(l.data)),o.cache.add(o.key,f),this.complete=!0}}});c.register("obj",function(o,l,f,u,v){var m;if(Array.isArray(o))for(var x=0;x{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(23906),h=t(74099),r=t(518),n=new d({Extends:r,initialize:function(s,a,i,o,l){r.call(this,s,a,i,o,l),this.type="packfile"},onProcess:function(){if(this.state!==c.FILE_POPULATED&&(this.state=c.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var e={};e[this.config]=this.data,this.data=e}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});h.register("pack",function(e,s,a,i){if(Array.isArray(e))for(var o=0;o{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,o,l,f,u,v){var m="js";if(e(o)){var x=o;o=n(x,"key"),l=n(x,"url"),v=n(x,"xhrSettings"),m=n(x,"extension",m),f=n(x,"start"),u=n(x,"mapping")}var g={type:"plugin",cache:!1,extension:m,responseType:"text",key:o,url:l,xhrSettings:v,config:{start:f,mapping:u}};h.call(this,i,g),typeof l=="function"&&(this.data=l,this.state=c.FILE_POPULATED)},onProcess:function(){var a=this.loader.systems.plugins,i=this.config,o=n(i,"start",!1),l=n(i,"mapping",null);if(this.state===c.FILE_POPULATED)a.install(this.key,this.data,o,l);else{this.state=c.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);var f=a.install(this.key,window[this.key],o,l);(o||l)&&(this.loader.systems[l]=f,this.loader.scene[l]=f)}this.onProcessComplete()}});r.register("plugin",function(a,i,o,l,f){if(Array.isArray(a))for(var u=0;u{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,o,l,f,u){var v="svg";if(e(o)){var m=o;o=n(m,"key"),l=n(m,"url"),f=n(m,"svgConfig",{}),u=n(m,"xhrSettings"),v=n(m,"extension",v)}var x={type:"svg",cache:i.textureManager,extension:v,responseType:"text",key:o,url:l,xhrSettings:u,config:{width:n(f,"width"),height:n(f,"height"),scale:n(f,"scale")}};h.call(this,i,x)},onProcess:function(){this.state=c.FILE_PROCESSING;var a=this.xhrLoader.responseText,i=[a],o=this.config.width,l=this.config.height,f=this.config.scale;t:if(o&&l||f){var u=null,v=new DOMParser;u=v.parseFromString(a,"text/xml");var m=u.getElementsByTagName("svg")[0],x=m.hasAttribute("viewBox"),g=parseFloat(m.getAttribute("width")),y=parseFloat(m.getAttribute("height"));if(!x&&g&&y)m.setAttribute("viewBox","0 0 "+g+" "+y);else if(x&&!g&&!y){var T=m.getAttribute("viewBox").split(/\s+|,/);g=T[2],y=T[3]}if(f)if(g&&y)o=g*f,l=y*f;else break t;m.setAttribute("width",o.toString()+"px"),m.setAttribute("height",l.toString()+"px"),i=[new XMLSerializer().serializeToString(m)]}try{var C=new window.Blob(i,{type:"image/svg+xml;charset=utf-8"})}catch{this.onProcessError();return}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var E=this,M=!1;this.data.onload=function(){M||h.revokeObjectURL(E.data),E.onProcessComplete()},this.data.onerror=function(){M?E.onProcessError():(M=!0,h.revokeObjectURL(E.data),E.data.src="data:image/svg+xml,"+encodeURIComponent(i.join("")))},h.createObjectURL(this.data,C,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});r.register("svg",function(a,i,o,l){if(Array.isArray(a))for(var f=0;f{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,o,l,f){var u="js";if(e(o)){var v=o;o=n(v,"key"),l=n(v,"url"),f=n(v,"xhrSettings"),u=n(v,"extension",u)}var m={type:"text",extension:u,responseType:"text",key:o,url:l,xhrSettings:f};h.call(this,i,m)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var a=this.data.concat(`(function(){ return new `+this.key+`(); }).call(this);`),i=eval;this.loader.sceneManager.add(this.key,i(a)),this.complete=!0}});r.register("sceneFile",function(a,i,o){if(Array.isArray(a))for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,o,l,f,u,v){var m="js";if(e(o)){var x=o;o=n(x,"key"),l=n(x,"url"),v=n(x,"xhrSettings"),m=n(x,"extension",m),f=n(x,"systemKey"),u=n(x,"sceneKey")}var g={type:"scenePlugin",cache:!1,extension:m,responseType:"text",key:o,url:l,xhrSettings:v,config:{systemKey:f,sceneKey:u}};h.call(this,i,g),typeof l=="function"&&(this.data=l,this.state=c.FILE_POPULATED)},onProcess:function(){var a=this.loader.systems.plugins,i=this.config,o=this.key,l=n(i,"systemKey",o),f=n(i,"sceneKey",o);this.state===c.FILE_POPULATED?a.installScenePlugin(l,this.data,f,this.loader.scene,!0):(this.state=c.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),a.installScenePlugin(l,window[this.key],f,this.loader.scene,!0)),this.onProcessComplete()}});r.register("scenePlugin",function(a,i,o,l,f){if(Array.isArray(a))for(var u=0;u{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,o,l,f,u){var v="js";if(e(o)){var m=o;o=n(m,"key"),l=n(m,"url"),f=n(m,"type","script"),u=n(m,"xhrSettings"),v=n(m,"extension",v)}else f===void 0&&(f="script");var x={type:f,cache:!1,extension:v,responseType:"text",key:o,url:l,xhrSettings:u};h.call(this,i,x)},onProcess:function(){this.state=c.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(a,i,o,l){if(Array.isArray(a))for(var f=0;f{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(23906),h=t(74099),r=t(19550),n=new d({Extends:r,initialize:function(s,a,i,o,l){r.call(this,s,a,i,l,o),this.type="spritesheet"},addToCache:function(){var e=this.linkFile;e?e.state>=c.FILE_COMPLETE&&(this.type==="normalMap"?this.cache.addSpriteSheet(this.key,e.data,this.config,this.data):this.cache.addSpriteSheet(this.key,this.data,this.config,e.data)):this.cache.addSpriteSheet(this.key,this.data,this.config)}});h.register("spritesheet",function(e,s,a,i){if(Array.isArray(e))for(var o=0;o{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=new d({Extends:h,initialize:function(i,o,l,f){var u="text",v="txt",m=i.cacheManager.text;if(e(o)){var x=o;o=n(x,"key"),l=n(x,"url"),f=n(x,"xhrSettings"),v=n(x,"extension",v),u=n(x,"type",u),m=n(x,"cache",m)}var g={type:u,cache:m,extension:v,responseType:"text",key:o,url:l,xhrSettings:f};h.call(this,i,g)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});r.register("text",function(a,i,o){if(Array.isArray(a))for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=t(80341),a=new d({Extends:h,initialize:function(o,l,f,u){var v="csv";if(e(l)){var m=l;l=n(m,"key"),f=n(m,"url"),u=n(m,"xhrSettings"),v=n(m,"extension",v)}var x={type:"tilemapCSV",cache:o.cacheManager.tilemap,extension:v,responseType:"text",key:l,url:f,xhrSettings:u};h.call(this,o,x),this.tilemapFormat=s.CSV},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var i={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,i)}});r.register("tilemapCSV",function(i,o,l){if(Array.isArray(i))for(var f=0;f{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(74099),h=t(518),r=t(80341),n=new d({Extends:h,initialize:function(s,a,i,o){h.call(this,s,a,i,o),this.type="tilemapJSON",this.cache=s.cacheManager.tilemap},addToCache:function(){var e={format:r.WELTMEISTER,data:this.data};this.cache.add(this.key,e)}});c.register("tilemapImpact",function(e,s,a){if(Array.isArray(e))for(var i=0;i{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(74099),h=t(518),r=t(80341),n=new d({Extends:h,initialize:function(s,a,i,o){h.call(this,s,a,i,o),this.type="tilemapJSON",this.cache=s.cacheManager.tilemap},addToCache:function(){var e={format:r.TILED_JSON,data:this.data};this.cache.add(this.key,e)}});c.register("tilemapTiledJSON",function(e,s,a){if(Array.isArray(e))for(var i=0;i{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(74099),h=t(95540),r=t(19550),n=t(41212),e=t(26430),s=t(78776),a=new d({Extends:e,initialize:function(o,l,f,u,v,m){var x,g;if(n(l)){var y=l;l=h(y,"key"),x=new r(o,{key:l,url:h(y,"textureURL"),extension:h(y,"textureExtension","png"),normalMap:h(y,"normalMap"),xhrSettings:h(y,"textureXhrSettings")}),g=new s(o,{key:l,url:h(y,"atlasURL"),extension:h(y,"atlasExtension","txt"),xhrSettings:h(y,"atlasXhrSettings")})}else x=new r(o,l,f,v),g=new s(o,l,u,m);x.linkFile?e.call(this,o,"unityatlas",l,[x,g,x.linkFile]):e.call(this,o,"unityatlas",l,[x,g])},addToCache:function(){if(this.isReadyToProcess()){var i=this.files[0],o=this.files[1],l=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(i.key,i.data,o.data,l),this.complete=!0}}});c.register("unityAtlas",function(i,o,l,f,u){var v;if(Array.isArray(i))for(var m=0;m{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(98356),e=t(95540),s=t(41212),a=new d({Extends:h,initialize:function(o,l,f,u){if(u===void 0&&(u=!1),s(l)){var v=l;l=e(v,"key"),f=e(v,"url",[]),u=e(v,"noAudio",!1)}var m=o.systems.game.device.video.getVideoURL(f);m||console.warn("VideoFile: No supported format for "+l);var x={type:"video",cache:o.cacheManager.video,extension:m.type,key:l,url:m.url,config:{noAudio:u}};h.call(this,o,x)},onProcess:function(){this.data={url:this.src,noAudio:this.config.noAudio,crossOrigin:this.crossOrigin},this.onProcessComplete()},load:function(){this.src=n(this,this.loader.baseURL),this.state=c.FILE_LOADED,this.loader.nextFile(this,!0)}});r.register("video",function(i,o,l){if(Array.isArray(i))for(var f=0;f{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(23906),h=t(41299),r=t(74099),n=t(95540),e=t(41212),s=t(56836),a=new d({Extends:h,initialize:function(o,l,f,u){var v="xml";if(e(l)){var m=l;l=n(m,"key"),f=n(m,"url"),u=n(m,"xhrSettings"),v=n(m,"extension",v)}var x={type:"xml",cache:o.cacheManager.xml,extension:v,responseType:"text",key:l,url:f,xhrSettings:u};h.call(this,o,x)},onProcess:function(){this.state=c.FILE_PROCESSING,this.data=s(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});r.register("xml",function(i,o,l){if(Array.isArray(i))for(var f=0;f{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={AnimationJSONFile:t(14135),AsepriteFile:t(76272),AtlasJSONFile:t(38734),AtlasXMLFile:t(74599),AudioFile:t(21097),AudioSpriteFile:t(89524),BinaryFile:t(85722),BitmapFontFile:t(97025),CompressedTextureFile:t(69559),CSSFile:t(16024),FontFile:t(87674),GLSLFile:t(47931),HTML5AudioFile:t(89749),HTMLFile:t(88470),HTMLTextureFile:t(14643),ImageFile:t(19550),JSONFile:t(518),MultiAtlasFile:t(59327),MultiScriptFile:t(99297),OBJFile:t(41846),PackFile:t(58610),PluginFile:t(48988),SceneFile:t(88423),ScenePluginFile:t(56812),ScriptFile:t(34328),SpriteSheetFile:t(85035),SVGFile:t(67397),TextFile:t(78776),TilemapCSVFile:t(49477),TilemapImpactFile:t(40807),TilemapJSONFile:t(56775),UnityAtlasFile:t(25771),VideoFile:t(33720),XMLFile:t(57318)}},57777:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(23906),c=t(79291),h={Events:t(54899),FileTypes:t(64589),File:t(41299),FileTypesManager:t(74099),GetURL:t(98356),LoaderPlugin:t(74261),MergeXHRSettings:t(3374),MultiFile:t(26430),XHRLoader:t(84376),XHRSettings:t(92638)};h=c(!1,h,d),p.exports=h},53307:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){for(var d=0,c=0;c{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(6411),c=function(h,r){return d(h)/d(r)/d(h-r)};p.exports=c},30976:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){return Math.floor(Math.random()*(d-t+1)+t)};p.exports=S},87842:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h,r){var n=(h-d)*.5,e=(r-c)*.5,s=t*t,a=t*s;return(2*c-2*h+n+e)*a+(-3*c+3*h-2*n-e)*s+n*t+c};p.exports=S},26302:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){d===void 0&&(d=0),c===void 0&&(c=10);var h=Math.pow(c,-d);return Math.ceil(t*h)/h};p.exports=S},45319:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){return Math.max(d,Math.min(c,t))};p.exports=S},39506:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(36383),c=function(h){return h*d.DEG_TO_RAD};p.exports=c},61241:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){return Math.abs(t-d)};p.exports=S},38857:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(45319),c=t(83419),h=t(37867),r=t(29747),n=new h,e=new c({initialize:function s(a,i,o,l){a===void 0&&(a=0),i===void 0&&(i=0),o===void 0&&(o=0),l===void 0&&(l=s.DefaultOrder),this._x=a,this._y=i,this._z=o,this._order=l,this.onChangeCallback=r},x:{get:function(){return this._x},set:function(s){this._x=s,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(s){this._y=s,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(s){this._z=s,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(s){this._order=s,this.onChangeCallback(this)}},set:function(s,a,i,o){return o===void 0&&(o=this._order),this._x=s,this._y=a,this._z=i,this._order=o,this.onChangeCallback(this),this},copy:function(s){return this.set(s.x,s.y,s.z,s.order)},setFromQuaternion:function(s,a,i){return a===void 0&&(a=this._order),i===void 0&&(i=!1),n.fromQuat(s),this.setFromRotationMatrix(n,a,i)},setFromRotationMatrix:function(s,a,i){a===void 0&&(a=this._order),i===void 0&&(i=!1);var o=s.val,l=o[0],f=o[4],u=o[8],v=o[1],m=o[5],x=o[9],g=o[2],y=o[6],T=o[10],C=0,E=0,M=0,P=.99999;switch(a){case"XYZ":{E=Math.asin(d(u,-1,1)),Math.abs(u){/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){if(t===0)return 1;for(var d=t;--t;)d*=t;return d};p.exports=S},99472:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){return Math.random()*(d-t)+t};p.exports=S},77623:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){d===void 0&&(d=0),c===void 0&&(c=10);var h=Math.pow(c,-d);return Math.floor(t*h)/h};p.exports=S},62945:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(45319),c=function(h,r,n){return h=d(h,0,1),(n-r)*h+r};p.exports=c},38265:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){return t/d/1e3};p.exports=S},78702:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return t==parseFloat(t)?!(t%2):void 0};p.exports=S},94883:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return t===parseFloat(t)?!(t%2):void 0};p.exports=S},28915:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){return(d-t)*c+t};p.exports=S},94908:p=>{/** * @author Greg McLean * @copyright 2021 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){return c===void 0&&(c=0),t.clone().lerp(d,c)};p.exports=S},94434:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=new d({initialize:function(r){this.val=new Float32Array(9),r?this.copy(r):this.identity()},clone:function(){return new c(this)},set:function(h){return this.copy(h)},copy:function(h){var r=this.val,n=h.val;return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r[4]=n[4],r[5]=n[5],r[6]=n[6],r[7]=n[7],r[8]=n[8],this},fromMat4:function(h){var r=h.val,n=this.val;return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[4],n[4]=r[5],n[5]=r[6],n[6]=r[8],n[7]=r[9],n[8]=r[10],this},fromArray:function(h){var r=this.val;return r[0]=h[0],r[1]=h[1],r[2]=h[2],r[3]=h[3],r[4]=h[4],r[5]=h[5],r[6]=h[6],r[7]=h[7],r[8]=h[8],this},identity:function(){var h=this.val;return h[0]=1,h[1]=0,h[2]=0,h[3]=0,h[4]=1,h[5]=0,h[6]=0,h[7]=0,h[8]=1,this},transpose:function(){var h=this.val,r=h[1],n=h[2],e=h[5];return h[1]=h[3],h[2]=h[6],h[3]=r,h[5]=h[7],h[6]=n,h[7]=e,this},invert:function(){var h=this.val,r=h[0],n=h[1],e=h[2],s=h[3],a=h[4],i=h[5],o=h[6],l=h[7],f=h[8],u=f*a-i*l,v=-f*s+i*o,m=l*s-a*o,x=r*u+n*v+e*m;return x?(x=1/x,h[0]=u*x,h[1]=(-f*n+e*l)*x,h[2]=(i*n-e*a)*x,h[3]=v*x,h[4]=(f*r-e*o)*x,h[5]=(-i*r+e*s)*x,h[6]=m*x,h[7]=(-l*r+n*o)*x,h[8]=(a*r-n*s)*x,this):null},adjoint:function(){var h=this.val,r=h[0],n=h[1],e=h[2],s=h[3],a=h[4],i=h[5],o=h[6],l=h[7],f=h[8];return h[0]=a*f-i*l,h[1]=e*l-n*f,h[2]=n*i-e*a,h[3]=i*o-s*f,h[4]=r*f-e*o,h[5]=e*s-r*i,h[6]=s*l-a*o,h[7]=n*o-r*l,h[8]=r*a-n*s,this},determinant:function(){var h=this.val,r=h[0],n=h[1],e=h[2],s=h[3],a=h[4],i=h[5],o=h[6],l=h[7],f=h[8];return r*(f*a-i*l)+n*(-f*s+i*o)+e*(l*s-a*o)},multiply:function(h){var r=this.val,n=r[0],e=r[1],s=r[2],a=r[3],i=r[4],o=r[5],l=r[6],f=r[7],u=r[8],v=h.val,m=v[0],x=v[1],g=v[2],y=v[3],T=v[4],C=v[5],E=v[6],M=v[7],P=v[8];return r[0]=m*n+x*a+g*l,r[1]=m*e+x*i+g*f,r[2]=m*s+x*o+g*u,r[3]=y*n+T*a+C*l,r[4]=y*e+T*i+C*f,r[5]=y*s+T*o+C*u,r[6]=E*n+M*a+P*l,r[7]=E*e+M*i+P*f,r[8]=E*s+M*o+P*u,this},translate:function(h){var r=this.val,n=h.x,e=h.y;return r[6]=n*r[0]+e*r[3]+r[6],r[7]=n*r[1]+e*r[4]+r[7],r[8]=n*r[2]+e*r[5]+r[8],this},rotate:function(h){var r=this.val,n=r[0],e=r[1],s=r[2],a=r[3],i=r[4],o=r[5],l=Math.sin(h),f=Math.cos(h);return r[0]=f*n+l*a,r[1]=f*e+l*i,r[2]=f*s+l*o,r[3]=f*a-l*n,r[4]=f*i-l*e,r[5]=f*o-l*s,this},scale:function(h){var r=this.val,n=h.x,e=h.y;return r[0]=n*r[0],r[1]=n*r[1],r[2]=n*r[2],r[3]=e*r[3],r[4]=e*r[4],r[5]=e*r[5],this},fromQuat:function(h){var r=h.x,n=h.y,e=h.z,s=h.w,a=r+r,i=n+n,o=e+e,l=r*a,f=r*i,u=r*o,v=n*i,m=n*o,x=e*o,g=s*a,y=s*i,T=s*o,C=this.val;return C[0]=1-(v+x),C[3]=f+T,C[6]=u-y,C[1]=f-T,C[4]=1-(l+x),C[7]=m+g,C[2]=u+y,C[5]=m-g,C[8]=1-(l+v),this},normalFromMat4:function(h){var r=h.val,n=this.val,e=r[0],s=r[1],a=r[2],i=r[3],o=r[4],l=r[5],f=r[6],u=r[7],v=r[8],m=r[9],x=r[10],g=r[11],y=r[12],T=r[13],C=r[14],E=r[15],M=e*l-s*o,P=e*f-a*o,A=e*u-i*o,F=s*f-a*l,L=s*u-i*l,B=a*u-i*f,N=v*T-m*y,U=v*C-x*y,z=v*E-g*y,I=m*C-x*T,G=m*E-g*T,O=x*E-g*C,b=M*O-P*G+A*I+F*z-L*U+B*N;return b?(b=1/b,n[0]=(l*O-f*G+u*I)*b,n[1]=(f*z-o*O-u*U)*b,n[2]=(o*G-l*z+u*N)*b,n[3]=(a*G-s*O-i*I)*b,n[4]=(e*O-a*z+i*U)*b,n[5]=(s*z-e*G-i*N)*b,n[6]=(T*B-C*L+E*F)*b,n[7]=(C*A-y*B-E*P)*b,n[8]=(y*L-T*A+E*M)*b,this):null}});p.exports=c},37867:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(25836),h=1e-6,r=new d({initialize:function(l){this.val=new Float32Array(16),l?this.copy(l):this.identity()},clone:function(){return new r(this)},set:function(o){return this.copy(o)},setValues:function(o,l,f,u,v,m,x,g,y,T,C,E,M,P,A,F){var L=this.val;return L[0]=o,L[1]=l,L[2]=f,L[3]=u,L[4]=v,L[5]=m,L[6]=x,L[7]=g,L[8]=y,L[9]=T,L[10]=C,L[11]=E,L[12]=M,L[13]=P,L[14]=A,L[15]=F,this},copy:function(o){var l=o.val;return this.setValues(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],l[9],l[10],l[11],l[12],l[13],l[14],l[15])},fromArray:function(o){return this.setValues(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8],o[9],o[10],o[11],o[12],o[13],o[14],o[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(o,l,f){var u=n.fromQuat(f),v=u.val,m=l.x,x=l.y,g=l.z;return this.setValues(v[0]*m,v[1]*m,v[2]*m,0,v[4]*x,v[5]*x,v[6]*x,0,v[8]*g,v[9]*g,v[10]*g,0,o.x,o.y,o.z,1)},xyz:function(o,l,f){this.identity();var u=this.val;return u[12]=o,u[13]=l,u[14]=f,this},scaling:function(o,l,f){this.zero();var u=this.val;return u[0]=o,u[5]=l,u[10]=f,u[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 o=this.val,l=o[1],f=o[2],u=o[3],v=o[6],m=o[7],x=o[11];return o[1]=o[4],o[2]=o[8],o[3]=o[12],o[4]=l,o[6]=o[9],o[7]=o[13],o[8]=f,o[9]=v,o[11]=o[14],o[12]=u,o[13]=m,o[14]=x,this},getInverse:function(o){return this.copy(o),this.invert()},invert:function(){var o=this.val,l=o[0],f=o[1],u=o[2],v=o[3],m=o[4],x=o[5],g=o[6],y=o[7],T=o[8],C=o[9],E=o[10],M=o[11],P=o[12],A=o[13],F=o[14],L=o[15],B=l*x-f*m,N=l*g-u*m,U=l*y-v*m,z=f*g-u*x,I=f*y-v*x,G=u*y-v*g,O=T*A-C*P,b=T*F-E*P,D=T*L-M*P,X=C*F-E*A,V=C*L-M*A,W=E*L-M*F,K=B*W-N*V+U*X+z*D-I*b+G*O;return K?(K=1/K,this.setValues((x*W-g*V+y*X)*K,(u*V-f*W-v*X)*K,(A*G-F*I+L*z)*K,(E*I-C*G-M*z)*K,(g*D-m*W-y*b)*K,(l*W-u*D+v*b)*K,(F*U-P*G-L*N)*K,(T*G-E*U+M*N)*K,(m*V-x*D+y*O)*K,(f*D-l*V-v*O)*K,(P*I-A*U+L*B)*K,(C*U-T*I-M*B)*K,(x*b-m*X-g*O)*K,(l*X-f*b+u*O)*K,(A*N-P*z-F*B)*K,(T*z-C*N+E*B)*K)):this},adjoint:function(){var o=this.val,l=o[0],f=o[1],u=o[2],v=o[3],m=o[4],x=o[5],g=o[6],y=o[7],T=o[8],C=o[9],E=o[10],M=o[11],P=o[12],A=o[13],F=o[14],L=o[15];return this.setValues(x*(E*L-M*F)-C*(g*L-y*F)+A*(g*M-y*E),-(f*(E*L-M*F)-C*(u*L-v*F)+A*(u*M-v*E)),f*(g*L-y*F)-x*(u*L-v*F)+A*(u*y-v*g),-(f*(g*M-y*E)-x*(u*M-v*E)+C*(u*y-v*g)),-(m*(E*L-M*F)-T*(g*L-y*F)+P*(g*M-y*E)),l*(E*L-M*F)-T*(u*L-v*F)+P*(u*M-v*E),-(l*(g*L-y*F)-m*(u*L-v*F)+P*(u*y-v*g)),l*(g*M-y*E)-m*(u*M-v*E)+T*(u*y-v*g),m*(C*L-M*A)-T*(x*L-y*A)+P*(x*M-y*C),-(l*(C*L-M*A)-T*(f*L-v*A)+P*(f*M-v*C)),l*(x*L-y*A)-m*(f*L-v*A)+P*(f*y-v*x),-(l*(x*M-y*C)-m*(f*M-v*C)+T*(f*y-v*x)),-(m*(C*F-E*A)-T*(x*F-g*A)+P*(x*E-g*C)),l*(C*F-E*A)-T*(f*F-u*A)+P*(f*E-u*C),-(l*(x*F-g*A)-m*(f*F-u*A)+P*(f*g-u*x)),l*(x*E-g*C)-m*(f*E-u*C)+T*(f*g-u*x))},determinant:function(){var o=this.val,l=o[0],f=o[1],u=o[2],v=o[3],m=o[4],x=o[5],g=o[6],y=o[7],T=o[8],C=o[9],E=o[10],M=o[11],P=o[12],A=o[13],F=o[14],L=o[15],B=l*x-f*m,N=l*g-u*m,U=l*y-v*m,z=f*g-u*x,I=f*y-v*x,G=u*y-v*g,O=T*A-C*P,b=T*F-E*P,D=T*L-M*P,X=C*F-E*A,V=C*L-M*A,W=E*L-M*F;return B*W-N*V+U*X+z*D-I*b+G*O},multiply:function(o){var l=this.val,f=l[0],u=l[1],v=l[2],m=l[3],x=l[4],g=l[5],y=l[6],T=l[7],C=l[8],E=l[9],M=l[10],P=l[11],A=l[12],F=l[13],L=l[14],B=l[15],N=o.val,U=N[0],z=N[1],I=N[2],G=N[3];return l[0]=U*f+z*x+I*C+G*A,l[1]=U*u+z*g+I*E+G*F,l[2]=U*v+z*y+I*M+G*L,l[3]=U*m+z*T+I*P+G*B,U=N[4],z=N[5],I=N[6],G=N[7],l[4]=U*f+z*x+I*C+G*A,l[5]=U*u+z*g+I*E+G*F,l[6]=U*v+z*y+I*M+G*L,l[7]=U*m+z*T+I*P+G*B,U=N[8],z=N[9],I=N[10],G=N[11],l[8]=U*f+z*x+I*C+G*A,l[9]=U*u+z*g+I*E+G*F,l[10]=U*v+z*y+I*M+G*L,l[11]=U*m+z*T+I*P+G*B,U=N[12],z=N[13],I=N[14],G=N[15],l[12]=U*f+z*x+I*C+G*A,l[13]=U*u+z*g+I*E+G*F,l[14]=U*v+z*y+I*M+G*L,l[15]=U*m+z*T+I*P+G*B,this},multiplyLocal:function(o){var l=this.val,f=o.val;return this.setValues(l[0]*f[0]+l[1]*f[4]+l[2]*f[8]+l[3]*f[12],l[0]*f[1]+l[1]*f[5]+l[2]*f[9]+l[3]*f[13],l[0]*f[2]+l[1]*f[6]+l[2]*f[10]+l[3]*f[14],l[0]*f[3]+l[1]*f[7]+l[2]*f[11]+l[3]*f[15],l[4]*f[0]+l[5]*f[4]+l[6]*f[8]+l[7]*f[12],l[4]*f[1]+l[5]*f[5]+l[6]*f[9]+l[7]*f[13],l[4]*f[2]+l[5]*f[6]+l[6]*f[10]+l[7]*f[14],l[4]*f[3]+l[5]*f[7]+l[6]*f[11]+l[7]*f[15],l[8]*f[0]+l[9]*f[4]+l[10]*f[8]+l[11]*f[12],l[8]*f[1]+l[9]*f[5]+l[10]*f[9]+l[11]*f[13],l[8]*f[2]+l[9]*f[6]+l[10]*f[10]+l[11]*f[14],l[8]*f[3]+l[9]*f[7]+l[10]*f[11]+l[11]*f[15],l[12]*f[0]+l[13]*f[4]+l[14]*f[8]+l[15]*f[12],l[12]*f[1]+l[13]*f[5]+l[14]*f[9]+l[15]*f[13],l[12]*f[2]+l[13]*f[6]+l[14]*f[10]+l[15]*f[14],l[12]*f[3]+l[13]*f[7]+l[14]*f[11]+l[15]*f[15])},premultiply:function(o){return this.multiplyMatrices(o,this)},multiplyMatrices:function(o,l){var f=o.val,u=l.val,v=f[0],m=f[4],x=f[8],g=f[12],y=f[1],T=f[5],C=f[9],E=f[13],M=f[2],P=f[6],A=f[10],F=f[14],L=f[3],B=f[7],N=f[11],U=f[15],z=u[0],I=u[4],G=u[8],O=u[12],b=u[1],D=u[5],X=u[9],V=u[13],W=u[2],K=u[6],Z=u[10],Q=u[14],j=u[3],$=u[7],_=u[11],et=u[15];return this.setValues(v*z+m*b+x*W+g*j,y*z+T*b+C*W+E*j,M*z+P*b+A*W+F*j,L*z+B*b+N*W+U*j,v*I+m*D+x*K+g*$,y*I+T*D+C*K+E*$,M*I+P*D+A*K+F*$,L*I+B*D+N*K+U*$,v*G+m*X+x*Z+g*_,y*G+T*X+C*Z+E*_,M*G+P*X+A*Z+F*_,L*G+B*X+N*Z+U*_,v*O+m*V+x*Q+g*et,y*O+T*V+C*Q+E*et,M*O+P*V+A*Q+F*et,L*O+B*V+N*Q+U*et)},translate:function(o){return this.translateXYZ(o.x,o.y,o.z)},translateXYZ:function(o,l,f){var u=this.val;return u[12]=u[0]*o+u[4]*l+u[8]*f+u[12],u[13]=u[1]*o+u[5]*l+u[9]*f+u[13],u[14]=u[2]*o+u[6]*l+u[10]*f+u[14],u[15]=u[3]*o+u[7]*l+u[11]*f+u[15],this},scale:function(o){return this.scaleXYZ(o.x,o.y,o.z)},scaleXYZ:function(o,l,f){var u=this.val;return u[0]=u[0]*o,u[1]=u[1]*o,u[2]=u[2]*o,u[3]=u[3]*o,u[4]=u[4]*l,u[5]=u[5]*l,u[6]=u[6]*l,u[7]=u[7]*l,u[8]=u[8]*f,u[9]=u[9]*f,u[10]=u[10]*f,u[11]=u[11]*f,this},makeRotationAxis:function(o,l){var f=Math.cos(l),u=Math.sin(l),v=1-f,m=o.x,x=o.y,g=o.z,y=v*m,T=v*x;return this.setValues(y*m+f,y*x-u*g,y*g+u*x,0,y*x+u*g,T*x+f,T*g-u*m,0,y*g-u*x,T*g+u*m,v*g*g+f,0,0,0,0,1)},rotate:function(o,l){var f=this.val,u=l.x,v=l.y,m=l.z,x=Math.sqrt(u*u+v*v+m*m);if(Math.abs(x){/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){return Math.min(t+d,c)};p.exports=S},50040:p=>{/** * @author Vladislav Forsh * @copyright 2021 RoboWhale * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){var d=t.length;if(d===0)return 0;t.sort(function(h,r){return h-r});var c=Math.floor(d/2);return d%2===0?(t[c]+t[c-1])/2:t[c]};p.exports=S},37204:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){return Math.max(t-d,c)};p.exports=S},65201:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h){c===void 0&&(c=d+1);var r=(t-d)/(c-d);return r>1?h!==void 0?(r=(h-t)/(h-c),r<0&&(r=0)):r=1:r<0&&(r=0),r};p.exports=S},15746:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(94434),h=t(29747),r=t(25836),n=1e-6,e=new Int8Array([1,2,0]),s=new Float32Array([0,0,0]),a=new r(1,0,0),i=new r(0,1,0),o=new r,l=new c,f=new d({initialize:function(v,m,x,g){this.onChangeCallback=h,this.set(v,m,x,g)},x:{get:function(){return this._x},set:function(u){this._x=u,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(u){this._y=u,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(u){this._z=u,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(u){this._w=u,this.onChangeCallback(this)}},copy:function(u){return this.set(u)},set:function(u,v,m,x,g){return g===void 0&&(g=!0),typeof u=="object"?(this._x=u.x||0,this._y=u.y||0,this._z=u.z||0,this._w=u.w||0):(this._x=u||0,this._y=v||0,this._z=m||0,this._w=x||0),g&&this.onChangeCallback(this),this},add:function(u){return this._x+=u.x,this._y+=u.y,this._z+=u.z,this._w+=u.w,this.onChangeCallback(this),this},subtract:function(u){return this._x-=u.x,this._y-=u.y,this._z-=u.z,this._w-=u.w,this.onChangeCallback(this),this},scale:function(u){return this._x*=u,this._y*=u,this._z*=u,this._w*=u,this.onChangeCallback(this),this},length:function(){var u=this.x,v=this.y,m=this.z,x=this.w;return Math.sqrt(u*u+v*v+m*m+x*x)},lengthSq:function(){var u=this.x,v=this.y,m=this.z,x=this.w;return u*u+v*v+m*m+x*x},normalize:function(){var u=this.x,v=this.y,m=this.z,x=this.w,g=u*u+v*v+m*m+x*x;return g>0&&(g=1/Math.sqrt(g),this._x=u*g,this._y=v*g,this._z=m*g,this._w=x*g),this.onChangeCallback(this),this},dot:function(u){return this.x*u.x+this.y*u.y+this.z*u.z+this.w*u.w},lerp:function(u,v){v===void 0&&(v=0);var m=this.x,x=this.y,g=this.z,y=this.w;return this.set(m+v*(u.x-m),x+v*(u.y-x),g+v*(u.z-g),y+v*(u.w-y))},rotationTo:function(u,v){var m=u.x*v.x+u.y*v.y+u.z*v.z;return m<-.999999?(o.copy(a).cross(u).length().999999?this.set(0,0,0,1):(o.copy(u).cross(v),this._x=o.x,this._y=o.y,this._z=o.z,this._w=1+m,this.normalize())},setAxes:function(u,v,m){var x=l.val;return x[0]=v.x,x[3]=v.y,x[6]=v.z,x[1]=m.x,x[4]=m.y,x[7]=m.z,x[2]=-u.x,x[5]=-u.y,x[8]=-u.z,this.fromMat3(l).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(u,v){v=v*.5;var m=Math.sin(v);return this.set(m*u.x,m*u.y,m*u.z,Math.cos(v))},multiply:function(u){var v=this.x,m=this.y,x=this.z,g=this.w,y=u.x,T=u.y,C=u.z,E=u.w;return this.set(v*E+g*y+m*C-x*T,m*E+g*T+x*y-v*C,x*E+g*C+v*T-m*y,g*E-v*y-m*T-x*C)},slerp:function(u,v){var m=this.x,x=this.y,g=this.z,y=this.w,T=u.x,C=u.y,E=u.z,M=u.w,P=m*T+x*C+g*E+y*M;P<0&&(P=-P,T=-T,C=-C,E=-E,M=-M);var A=1-v,F=v;if(1-P>n){var L=Math.acos(P),B=Math.sin(L);A=Math.sin((1-v)*L)/B,F=Math.sin(v*L)/B}return this.set(A*m+F*T,A*x+F*C,A*g+F*E,A*y+F*M)},invert:function(){var u=this.x,v=this.y,m=this.z,x=this.w,g=u*u+v*v+m*m+x*x,y=g?1/g:0;return this.set(-u*y,-v*y,-m*y,x*y)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(u){u*=.5;var v=this.x,m=this.y,x=this.z,g=this.w,y=Math.sin(u),T=Math.cos(u);return this.set(v*T+g*y,m*T+x*y,x*T-m*y,g*T-v*y)},rotateY:function(u){u*=.5;var v=this.x,m=this.y,x=this.z,g=this.w,y=Math.sin(u),T=Math.cos(u);return this.set(v*T-x*y,m*T+g*y,x*T+v*y,g*T-m*y)},rotateZ:function(u){u*=.5;var v=this.x,m=this.y,x=this.z,g=this.w,y=Math.sin(u),T=Math.cos(u);return this.set(v*T+m*y,m*T-v*y,x*T+g*y,g*T-x*y)},calculateW:function(){var u=this.x,v=this.y,m=this.z;return this.w=-Math.sqrt(1-u*u-v*v-m*m),this},setFromEuler:function(u,v){var m=u.x/2,x=u.y/2,g=u.z/2,y=Math.cos(m),T=Math.cos(x),C=Math.cos(g),E=Math.sin(m),M=Math.sin(x),P=Math.sin(g);switch(u.order){case"XYZ":{this.set(E*T*C+y*M*P,y*M*C-E*T*P,y*T*P+E*M*C,y*T*C-E*M*P,v);break}case"YXZ":{this.set(E*T*C+y*M*P,y*M*C-E*T*P,y*T*P-E*M*C,y*T*C+E*M*P,v);break}case"ZXY":{this.set(E*T*C-y*M*P,y*M*C+E*T*P,y*T*P+E*M*C,y*T*C-E*M*P,v);break}case"ZYX":{this.set(E*T*C-y*M*P,y*M*C+E*T*P,y*T*P-E*M*C,y*T*C+E*M*P,v);break}case"YZX":{this.set(E*T*C+y*M*P,y*M*C+E*T*P,y*T*P-E*M*C,y*T*C-E*M*P,v);break}case"XZY":{this.set(E*T*C-y*M*P,y*M*C-E*T*P,y*T*P+E*M*C,y*T*C+E*M*P,v);break}}return this},setFromRotationMatrix:function(u){var v=u.val,m=v[0],x=v[4],g=v[8],y=v[1],T=v[5],C=v[9],E=v[2],M=v[6],P=v[10],A=m+T+P,F;return A>0?(F=.5/Math.sqrt(A+1),this.set((M-C)*F,(g-E)*F,(y-x)*F,.25/F)):m>T&&m>P?(F=2*Math.sqrt(1+m-T-P),this.set(.25*F,(x+y)/F,(g+E)/F,(M-C)/F)):T>P?(F=2*Math.sqrt(1+T-m-P),this.set((x+y)/F,.25*F,(C+M)/F,(g-E)/F)):(F=2*Math.sqrt(1+P-m-T),this.set((g+E)/F,(C+M)/F,.25*F,(y-x)/F)),this},fromMat3:function(u){var v=u.val,m=v[0]+v[4]+v[8],x;if(m>0)x=Math.sqrt(m+1),this.w=.5*x,x=.5/x,this._x=(v[7]-v[5])*x,this._y=(v[2]-v[6])*x,this._z=(v[3]-v[1])*x;else{var g=0;v[4]>v[0]&&(g=1),v[8]>v[g*3+g]&&(g=2);var y=e[g],T=e[y];x=Math.sqrt(v[g*3+g]-v[y*3+y]-v[T*3+T]+1),s[g]=.5*x,x=.5/x,s[y]=(v[y*3+g]+v[g*3+y])*x,s[T]=(v[T*3+g]+v[g*3+T])*x,this._x=s[0],this._y=s[1],this._z=s[2],this._w=(v[T*3+y]-v[y*3+T])*x}return this.onChangeCallback(this),this}});p.exports=f},43396:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(36383),c=function(h){return h*d.RAD_TO_DEG};p.exports=c},74362:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){d===void 0&&(d=1);var c=Math.random()*2*Math.PI;return t.x=Math.cos(c)*d,t.y=Math.sin(c)*d,t};p.exports=S},60706:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){d===void 0&&(d=1);var c=Math.random()*2*Math.PI,h=Math.random()*2-1,r=Math.sqrt(1-h*h)*d;return t.x=Math.cos(c)*r,t.y=Math.sin(c)*r,t.z=h*d,t};p.exports=S},67421:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){return d===void 0&&(d=1),t.x=(Math.random()*2-1)*d,t.y=(Math.random()*2-1)*d,t.z=(Math.random()*2-1)*d,t.w=(Math.random()*2-1)*d,t};p.exports=S},36305:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){var c=t.x,h=t.y;return t.x=c*Math.cos(d)-h*Math.sin(d),t.y=c*Math.sin(d)+h*Math.cos(d),t};p.exports=S},11520:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h){var r=Math.cos(h),n=Math.sin(h),e=t.x-d,s=t.y-c;return t.x=e*r-s*n+d,t.y=e*n+s*r+c,t};p.exports=S},1163:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h,r){var n=h+Math.atan2(t.y-c,t.x-d);return t.x=d+r*Math.cos(n),t.y=c+r*Math.sin(n),t};p.exports=S},70336:p=>{/** * @author samme * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h,r){return t.x=d+r*Math.cos(h),t.y=c+r*Math.sin(h),t};p.exports=S},72678:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(25836),c=t(37867),h=t(15746),r=new c,n=new h,e=new d,s=function(a,i,o){return n.setAxisAngle(i,o),r.fromRotationTranslation(n,e.set(0,0,0)),a.transformMat4(r)};p.exports=s},2284:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return t>0?Math.ceil(t):Math.floor(t)};p.exports=S},41013:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){d===void 0&&(d=0),c===void 0&&(c=10);var h=Math.pow(c,-d);return Math.round(t*h)/h};p.exports=S},16922:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h){d===void 0&&(d=1),c===void 0&&(c=1),h===void 0&&(h=1),h*=Math.PI/t;for(var r=[],n=[],e=0;e{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){return t<=d?0:t>=c?1:(t=(t-d)/(c-d),t*t*(3-2*t))};p.exports=S},54261:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){return t=Math.max(0,Math.min(1,(t-d)/(c-d))),t*t*t*(t*(t*6-15)+10)};p.exports=S},44408:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(26099),c=function(h,r,n,e){e===void 0&&(e=new d);var s=0,a=0,i=r*n;return h>0&&h<=i&&(h>r-1?(a=Math.floor(h/r),s=h-a*r):s=h),e.set(s,a)};p.exports=c},85955:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(26099),c=function(h,r,n,e,s,a,i,o){o===void 0&&(o=new d);var l=Math.sin(s),f=Math.cos(s),u=f*a,v=l*a,m=-l*i,x=f*i,g=1/(u*x+m*-v);return o.x=x*g*h+-m*g*r+(e*m-n*x)*g,o.y=u*g*r+-v*g*h+(-e*u+n*v)*g,o};p.exports=c},26099:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(43855),h=new d({initialize:function(n,e){this.x=0,this.y=0,typeof n=="object"?(this.x=n.x||0,this.y=n.y||0):(e===void 0&&(e=n),this.x=n||0,this.y=e||0)},clone:function(){return new h(this.x,this.y)},copy:function(r){return this.x=r.x||0,this.y=r.y||0,this},setFromObject:function(r){return this.x=r.x||0,this.y=r.y||0,this},set:function(r,n){return n===void 0&&(n=r),this.x=r,this.y=n,this},setTo:function(r,n){return this.set(r,n)},setToPolar:function(r,n){return n==null&&(n=1),this.x=Math.cos(r)*n,this.y=Math.sin(r)*n,this},equals:function(r){return this.x===r.x&&this.y===r.y},fuzzyEquals:function(r,n){return c(this.x,r.x,n)&&c(this.y,r.y,n)},angle:function(){var r=Math.atan2(this.y,this.x);return r<0&&(r+=2*Math.PI),r},setAngle:function(r){return this.setToPolar(r,this.length())},add:function(r){return this.x+=r.x,this.y+=r.y,this},subtract:function(r){return this.x-=r.x,this.y-=r.y,this},multiply:function(r){return this.x*=r.x,this.y*=r.y,this},scale:function(r){return isFinite(r)?(this.x*=r,this.y*=r):(this.x=0,this.y=0),this},divide:function(r){return this.x/=r.x,this.y/=r.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(r){var n=r.x-this.x,e=r.y-this.y;return Math.sqrt(n*n+e*e)},distanceSq:function(r){var n=r.x-this.x,e=r.y-this.y;return n*n+e*e},length:function(){var r=this.x,n=this.y;return Math.sqrt(r*r+n*n)},setLength:function(r){return this.normalize().scale(r)},lengthSq:function(){var r=this.x,n=this.y;return r*r+n*n},normalize:function(){var r=this.x,n=this.y,e=r*r+n*n;return e>0&&(e=1/Math.sqrt(e),this.x=r*e,this.y=n*e),this},normalizeRightHand:function(){var r=this.x;return this.x=this.y*-1,this.y=r,this},normalizeLeftHand:function(){var r=this.x;return this.x=this.y,this.y=r*-1,this},dot:function(r){return this.x*r.x+this.y*r.y},cross:function(r){return this.x*r.y-this.y*r.x},lerp:function(r,n){n===void 0&&(n=0);var e=this.x,s=this.y;return this.x=e+n*(r.x-e),this.y=s+n*(r.y-s),this},transformMat3:function(r){var n=this.x,e=this.y,s=r.val;return this.x=s[0]*n+s[3]*e+s[6],this.y=s[1]*n+s[4]*e+s[7],this},transformMat4:function(r){var n=this.x,e=this.y,s=r.val;return this.x=s[0]*n+s[4]*e+s[12],this.y=s[1]*n+s[5]*e+s[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(r){var n=this.length();return n&&n>r&&this.scale(r/n),this},reflect:function(r){return r=r.clone().normalize(),this.subtract(r.scale(2*this.dot(r)))},mirror:function(r){return this.reflect(r).negate()},rotate:function(r){var n=Math.cos(r),e=Math.sin(r);return this.set(n*this.x-e*this.y,e*this.x+n*this.y)},project:function(r){var n=this.dot(r)/r.dot(r);return this.copy(r).scale(n)}});h.ZERO=new h,h.RIGHT=new h(1,0),h.LEFT=new h(-1,0),h.UP=new h(0,-1),h.DOWN=new h(0,1),h.ONE=new h(1,1),p.exports=h},25836:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=new d({initialize:function(r,n,e){this.x=0,this.y=0,this.z=0,typeof r=="object"?(this.x=r.x||0,this.y=r.y||0,this.z=r.z||0):(this.x=r||0,this.y=n||0,this.z=e||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(h){return this.x=Math.min(this.x,h.x),this.y=Math.min(this.y,h.y),this.z=Math.min(this.z,h.z),this},max:function(h){return this.x=Math.max(this.x,h.x),this.y=Math.max(this.y,h.y),this.z=Math.max(this.z,h.z),this},clone:function(){return new c(this.x,this.y,this.z)},addVectors:function(h,r){return this.x=h.x+r.x,this.y=h.y+r.y,this.z=h.z+r.z,this},subVectors:function(h,r){return this.x=h.x-r.x,this.y=h.y-r.y,this.z=h.z-r.z,this},crossVectors:function(h,r){var n=h.x,e=h.y,s=h.z,a=r.x,i=r.y,o=r.z;return this.x=e*o-s*i,this.y=s*a-n*o,this.z=n*i-e*a,this},equals:function(h){return this.x===h.x&&this.y===h.y&&this.z===h.z},copy:function(h){return this.x=h.x,this.y=h.y,this.z=h.z||0,this},set:function(h,r,n){return typeof h=="object"?(this.x=h.x||0,this.y=h.y||0,this.z=h.z||0):(this.x=h||0,this.y=r||0,this.z=n||0),this},setFromMatrixPosition:function(h){return this.fromArray(h.val,12)},setFromMatrixColumn:function(h,r){return this.fromArray(h.val,r*4)},fromArray:function(h,r){return r===void 0&&(r=0),this.x=h[r],this.y=h[r+1],this.z=h[r+2],this},add:function(h){return this.x+=h.x,this.y+=h.y,this.z+=h.z||0,this},addScalar:function(h){return this.x+=h,this.y+=h,this.z+=h,this},addScale:function(h,r){return this.x+=h.x*r,this.y+=h.y*r,this.z+=h.z*r||0,this},subtract:function(h){return this.x-=h.x,this.y-=h.y,this.z-=h.z||0,this},multiply:function(h){return this.x*=h.x,this.y*=h.y,this.z*=h.z||1,this},scale:function(h){return isFinite(h)?(this.x*=h,this.y*=h,this.z*=h):(this.x=0,this.y=0,this.z=0),this},divide:function(h){return this.x/=h.x,this.y/=h.y,this.z/=h.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(h){var r=h.x-this.x,n=h.y-this.y,e=h.z-this.z||0;return Math.sqrt(r*r+n*n+e*e)},distanceSq:function(h){var r=h.x-this.x,n=h.y-this.y,e=h.z-this.z||0;return r*r+n*n+e*e},length:function(){var h=this.x,r=this.y,n=this.z;return Math.sqrt(h*h+r*r+n*n)},lengthSq:function(){var h=this.x,r=this.y,n=this.z;return h*h+r*r+n*n},normalize:function(){var h=this.x,r=this.y,n=this.z,e=h*h+r*r+n*n;return e>0&&(e=1/Math.sqrt(e),this.x=h*e,this.y=r*e,this.z=n*e),this},dot:function(h){return this.x*h.x+this.y*h.y+this.z*h.z},cross:function(h){var r=this.x,n=this.y,e=this.z,s=h.x,a=h.y,i=h.z;return this.x=n*i-e*a,this.y=e*s-r*i,this.z=r*a-n*s,this},lerp:function(h,r){r===void 0&&(r=0);var n=this.x,e=this.y,s=this.z;return this.x=n+r*(h.x-n),this.y=e+r*(h.y-e),this.z=s+r*(h.z-s),this},applyMatrix3:function(h){var r=this.x,n=this.y,e=this.z,s=h.val;return this.x=s[0]*r+s[3]*n+s[6]*e,this.y=s[1]*r+s[4]*n+s[7]*e,this.z=s[2]*r+s[5]*n+s[8]*e,this},applyMatrix4:function(h){var r=this.x,n=this.y,e=this.z,s=h.val,a=1/(s[3]*r+s[7]*n+s[11]*e+s[15]);return this.x=(s[0]*r+s[4]*n+s[8]*e+s[12])*a,this.y=(s[1]*r+s[5]*n+s[9]*e+s[13])*a,this.z=(s[2]*r+s[6]*n+s[10]*e+s[14])*a,this},transformMat3:function(h){var r=this.x,n=this.y,e=this.z,s=h.val;return this.x=r*s[0]+n*s[3]+e*s[6],this.y=r*s[1]+n*s[4]+e*s[7],this.z=r*s[2]+n*s[5]+e*s[8],this},transformMat4:function(h){var r=this.x,n=this.y,e=this.z,s=h.val;return this.x=s[0]*r+s[4]*n+s[8]*e+s[12],this.y=s[1]*r+s[5]*n+s[9]*e+s[13],this.z=s[2]*r+s[6]*n+s[10]*e+s[14],this},transformCoordinates:function(h){var r=this.x,n=this.y,e=this.z,s=h.val,a=r*s[0]+n*s[4]+e*s[8]+s[12],i=r*s[1]+n*s[5]+e*s[9]+s[13],o=r*s[2]+n*s[6]+e*s[10]+s[14],l=r*s[3]+n*s[7]+e*s[11]+s[15];return this.x=a/l,this.y=i/l,this.z=o/l,this},transformQuat:function(h){var r=this.x,n=this.y,e=this.z,s=h.x,a=h.y,i=h.z,o=h.w,l=o*r+a*e-i*n,f=o*n+i*r-s*e,u=o*e+s*n-a*r,v=-s*r-a*n-i*e;return this.x=l*o+v*-s+f*-i-u*-a,this.y=f*o+v*-a+u*-s-l*-i,this.z=u*o+v*-i+l*-a-f*-s,this},project:function(h){var r=this.x,n=this.y,e=this.z,s=h.val,a=s[0],i=s[1],o=s[2],l=s[3],f=s[4],u=s[5],v=s[6],m=s[7],x=s[8],g=s[9],y=s[10],T=s[11],C=s[12],E=s[13],M=s[14],P=s[15],A=1/(r*l+n*m+e*T+P);return this.x=(r*a+n*f+e*x+C)*A,this.y=(r*i+n*u+e*g+E)*A,this.z=(r*o+n*v+e*y+M)*A,this},projectViewMatrix:function(h,r){return this.applyMatrix4(h).applyMatrix4(r)},unprojectViewMatrix:function(h,r){return this.applyMatrix4(h).applyMatrix4(r)},unproject:function(h,r){var n=h.x,e=h.y,s=h.z,a=h.w,i=this.x-n,o=a-this.y-1-e,l=this.z;return this.x=2*i/s-1,this.y=2*o/a-1,this.z=2*l-1,this.project(r)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});c.ZERO=new c,c.RIGHT=new c(1,0,0),c.LEFT=new c(-1,0,0),c.UP=new c(0,-1,0),c.DOWN=new c(0,1,0),c.FORWARD=new c(0,0,1),c.BACK=new c(0,0,-1),c.ONE=new c(1,1,1),p.exports=c},61369:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=new d({initialize:function(r,n,e,s){this.x=0,this.y=0,this.z=0,this.w=0,typeof r=="object"?(this.x=r.x||0,this.y=r.y||0,this.z=r.z||0,this.w=r.w||0):(this.x=r||0,this.y=n||0,this.z=e||0,this.w=s||0)},clone:function(){return new c(this.x,this.y,this.z,this.w)},copy:function(h){return this.x=h.x,this.y=h.y,this.z=h.z||0,this.w=h.w||0,this},equals:function(h){return this.x===h.x&&this.y===h.y&&this.z===h.z&&this.w===h.w},set:function(h,r,n,e){return typeof h=="object"?(this.x=h.x||0,this.y=h.y||0,this.z=h.z||0,this.w=h.w||0):(this.x=h||0,this.y=r||0,this.z=n||0,this.w=e||0),this},add:function(h){return this.x+=h.x,this.y+=h.y,this.z+=h.z||0,this.w+=h.w||0,this},subtract:function(h){return this.x-=h.x,this.y-=h.y,this.z-=h.z||0,this.w-=h.w||0,this},scale:function(h){return this.x*=h,this.y*=h,this.z*=h,this.w*=h,this},length:function(){var h=this.x,r=this.y,n=this.z,e=this.w;return Math.sqrt(h*h+r*r+n*n+e*e)},lengthSq:function(){var h=this.x,r=this.y,n=this.z,e=this.w;return h*h+r*r+n*n+e*e},normalize:function(){var h=this.x,r=this.y,n=this.z,e=this.w,s=h*h+r*r+n*n+e*e;return s>0&&(s=1/Math.sqrt(s),this.x=h*s,this.y=r*s,this.z=n*s,this.w=e*s),this},dot:function(h){return this.x*h.x+this.y*h.y+this.z*h.z+this.w*h.w},lerp:function(h,r){r===void 0&&(r=0);var n=this.x,e=this.y,s=this.z,a=this.w;return this.x=n+r*(h.x-n),this.y=e+r*(h.y-e),this.z=s+r*(h.z-s),this.w=a+r*(h.w-a),this},multiply:function(h){return this.x*=h.x,this.y*=h.y,this.z*=h.z||1,this.w*=h.w||1,this},divide:function(h){return this.x/=h.x,this.y/=h.y,this.z/=h.z||1,this.w/=h.w||1,this},distance:function(h){var r=h.x-this.x,n=h.y-this.y,e=h.z-this.z||0,s=h.w-this.w||0;return Math.sqrt(r*r+n*n+e*e+s*s)},distanceSq:function(h){var r=h.x-this.x,n=h.y-this.y,e=h.z-this.z||0,s=h.w-this.w||0;return r*r+n*n+e*e+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(h){var r=this.x,n=this.y,e=this.z,s=this.w,a=h.val;return this.x=a[0]*r+a[4]*n+a[8]*e+a[12]*s,this.y=a[1]*r+a[5]*n+a[9]*e+a[13]*s,this.z=a[2]*r+a[6]*n+a[10]*e+a[14]*s,this.w=a[3]*r+a[7]*n+a[11]*e+a[15]*s,this},transformQuat:function(h){var r=this.x,n=this.y,e=this.z,s=h.x,a=h.y,i=h.z,o=h.w,l=o*r+a*e-i*n,f=o*n+i*r-s*e,u=o*e+s*n-a*r,v=-s*r-a*n-i*e;return this.x=l*o+v*-s+f*-i-u*-a,this.y=f*o+v*-a+u*-s-l*-i,this.z=u*o+v*-i+l*-a-f*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});c.prototype.sub=c.prototype.subtract,c.prototype.mul=c.prototype.multiply,c.prototype.div=c.prototype.divide,c.prototype.dist=c.prototype.distance,c.prototype.distSq=c.prototype.distanceSq,c.prototype.len=c.prototype.length,c.prototype.lenSq=c.prototype.lengthSq,p.exports=c},60417:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){return Math.abs(t-d)<=c};p.exports=S},15994:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){var h=c-d;return d+((t-d)%h+h)%h};p.exports=S},31040:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h){return Math.atan2(h-d,c-t)};p.exports=S},55495:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){return Math.atan2(d.y-t.y,d.x-t.x)};p.exports=S},128:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){return Math.atan2(d.x-t.x,d.y-t.y)};p.exports=S},41273:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h){return Math.atan2(c-t,h-d)};p.exports=S},1432:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(36383),c=function(h){return h>Math.PI&&(h-=d.PI2),Math.abs(((h+d.TAU)%d.PI2-d.PI2)%d.PI2)};p.exports=c},49127:(p,S,t)=>{/** * @author samme * @copyright 2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(12407),c=function(h,r){return d(r-h)};p.exports=c},52285:(p,S,t)=>{/** * @author samme * @copyright 2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(12407),c=2*Math.PI,h=function(r,n){var e=d(n-r);return e>0&&(e-=c),e};p.exports=h},67317:(p,S,t)=>{/** * @author samme * @copyright 2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(86554),c=function(h,r){return d(r-h)};p.exports=c},12407:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return t=t%(2*Math.PI),t>=0?t:t+2*Math.PI};p.exports=S},53993:(p,S,t)=>{/** * @author Richard Davey * @author @samme * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(99472),c=function(){return d(-Math.PI,Math.PI)};p.exports=c},86564:(p,S,t)=>{/** * @author Richard Davey * @author @samme * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(99472),c=function(){return d(-180,180)};p.exports=c},90154:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(12407),c=function(h){return d(h+Math.PI)};p.exports=c},48736:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(36383),c=function(h,r,n){return n===void 0&&(n=.05),h===r||(Math.abs(r-h)<=n||Math.abs(r-h)>=d.PI2-n?h=r:(Math.abs(r-h)>Math.PI&&(rh?h+=n:r{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){var c=d-t;if(c===0)return 0;var h=Math.floor((c- -180)/360);return c-h*360};p.exports=S},86554:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(15994),c=function(h){return d(h,-Math.PI,Math.PI)};p.exports=c},30954:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(15994),c=function(h){return d(h,-180,180)};p.exports=c},25588:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={Between:t(31040),BetweenPoints:t(55495),BetweenPointsY:t(128),BetweenY:t(41273),CounterClockwise:t(1432),GetClockwiseDistance:t(49127),GetCounterClockwiseDistance:t(52285),GetShortestDistance:t(67317),Normalize:t(12407),Random:t(53993),RandomDegrees:t(86564),Reverse:t(90154),RotateTo:t(48736),ShortestBetween:t(61430),Wrap:t(86554),WrapDegrees:t(30954)}},36383:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={PI2:Math.PI*2,TAU:Math.PI*.5,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};p.exports=S},20339:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h){var r=t-c,n=d-h;return Math.sqrt(r*r+n*n)};p.exports=S},52816:p=>{/** * @author samme * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){var c=t.x-d.x,h=t.y-d.y;return Math.sqrt(c*c+h*h)};p.exports=S},64559:p=>{/** * @author samme * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){var c=t.x-d.x,h=t.y-d.y;return c*c+h*h};p.exports=S},82340:p=>{/** * @author samme * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h){return Math.max(Math.abs(t-c),Math.abs(d-h))};p.exports=S},14390:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h,r){return r===void 0&&(r=2),Math.sqrt(Math.pow(c-t,r)+Math.pow(h-d,r))};p.exports=S},2243:p=>{/** * @author samme * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h){return Math.abs(t-c)+Math.abs(d-h)};p.exports=S},89774:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h){var r=t-c,n=d-h;return r*r+n*n};p.exports=S},50994:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={Between:t(20339),BetweenPoints:t(52816),BetweenPointsSquared:t(64559),Chebyshev:t(82340),Power:t(14390),Snake:t(2243),Squared:t(89774)}},62640:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(54178),c=t(41521),h=t(79980),r=t(85433),n=t(99140),e=t(48857),s=t(81596),a=t(59133),i=t(98516),o=t(35248),l=t(82500),f=t(49752);p.exports={Power0:s,Power1:a.Out,Power2:r.Out,Power3:i.Out,Power4:o.Out,Linear:s,Quad:a.Out,Cubic:r.Out,Quart:i.Out,Quint:o.Out,Sine:l.Out,Expo:e.Out,Circ:h.Out,Elastic:n.Out,Back:d.Out,Bounce:c.Out,Stepped:f,"Quad.easeIn":a.In,"Cubic.easeIn":r.In,"Quart.easeIn":i.In,"Quint.easeIn":o.In,"Sine.easeIn":l.In,"Expo.easeIn":e.In,"Circ.easeIn":h.In,"Elastic.easeIn":n.In,"Back.easeIn":d.In,"Bounce.easeIn":c.In,"Quad.easeOut":a.Out,"Cubic.easeOut":r.Out,"Quart.easeOut":i.Out,"Quint.easeOut":o.Out,"Sine.easeOut":l.Out,"Expo.easeOut":e.Out,"Circ.easeOut":h.Out,"Elastic.easeOut":n.Out,"Back.easeOut":d.Out,"Bounce.easeOut":c.Out,"Quad.easeInOut":a.InOut,"Cubic.easeInOut":r.InOut,"Quart.easeInOut":i.InOut,"Quint.easeInOut":o.InOut,"Sine.easeInOut":l.InOut,"Expo.easeInOut":e.InOut,"Circ.easeInOut":h.InOut,"Elastic.easeInOut":n.InOut,"Back.easeInOut":d.InOut,"Bounce.easeInOut":c.InOut}},1639:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){return d===void 0&&(d=1.70158),t*t*((d+1)*t-d)};p.exports=S},50099:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){d===void 0&&(d=1.70158);var c=d*1.525;return(t*=2)<1?.5*(t*t*((c+1)*t-c)):.5*((t-=2)*t*((c+1)*t+c)+2)};p.exports=S},41286:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){return d===void 0&&(d=1.70158),--t*t*((d+1)*t+d)+1};p.exports=S},54178:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={In:t(1639),Out:t(41286),InOut:t(50099)}},59590:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return t=1-t,t<.36363636363636365?1-7.5625*t*t:t<.7272727272727273?1-(7.5625*(t-=.5454545454545454)*t+.75):t<.9090909090909091?1-(7.5625*(t-=.8181818181818182)*t+.9375):1-(7.5625*(t-=.9545454545454546)*t+.984375)};p.exports=S},41788:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){var d=!1;return t<.5?(t=1-t*2,d=!0):t=t*2-1,t<.36363636363636365?t=7.5625*t*t:t<.7272727272727273?t=7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?t=7.5625*(t-=.8181818181818182)*t+.9375:t=7.5625*(t-=.9545454545454546)*t+.984375,d?(1-t)*.5:t*.5+.5};p.exports=S},69905:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return t<.36363636363636365?7.5625*t*t:t<.7272727272727273?7.5625*(t-=.5454545454545454)*t+.75:t<.9090909090909091?7.5625*(t-=.8181818181818182)*t+.9375:7.5625*(t-=.9545454545454546)*t+.984375};p.exports=S},41521:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={In:t(59590),Out:t(69905),InOut:t(41788)}},91861:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return 1-Math.sqrt(1-t*t)};p.exports=S},4177:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)};p.exports=S},57512:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return Math.sqrt(1- --t*t)};p.exports=S},79980:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={In:t(91861),Out:t(57512),InOut:t(4177)}},51150:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return t*t*t};p.exports=S},82820:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)};p.exports=S},35033:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return--t*t*t+1};p.exports=S},85433:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={In:t(51150),Out:t(35033),InOut:t(82820)}},69965:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){if(d===void 0&&(d=.1),c===void 0&&(c=.1),t===0)return 0;if(t===1)return 1;var h=c/4;return d<1?d=1:h=c*Math.asin(1/d)/(2*Math.PI),-(d*Math.pow(2,10*(t-=1))*Math.sin((t-h)*(2*Math.PI)/c))};p.exports=S},50665:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){if(d===void 0&&(d=.1),c===void 0&&(c=.1),t===0)return 0;if(t===1)return 1;var h=c/4;return d<1?d=1:h=c*Math.asin(1/d)/(2*Math.PI),(t*=2)<1?-.5*(d*Math.pow(2,10*(t-=1))*Math.sin((t-h)*(2*Math.PI)/c)):d*Math.pow(2,-10*(t-=1))*Math.sin((t-h)*(2*Math.PI)/c)*.5+1};p.exports=S},7744:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){if(d===void 0&&(d=.1),c===void 0&&(c=.1),t===0)return 0;if(t===1)return 1;var h=c/4;return d<1?d=1:h=c*Math.asin(1/d)/(2*Math.PI),d*Math.pow(2,-10*t)*Math.sin((t-h)*(2*Math.PI)/c)+1};p.exports=S},99140:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={In:t(69965),Out:t(7744),InOut:t(50665)}},24590:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return Math.pow(2,10*(t-1))-.001};p.exports=S},87844:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))};p.exports=S},89433:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return 1-Math.pow(2,-10*t)};p.exports=S},48857:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={In:t(24590),Out:t(89433),InOut:t(87844)}},48820:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={Back:t(54178),Bounce:t(41521),Circular:t(79980),Cubic:t(85433),Elastic:t(99140),Expo:t(48857),Linear:t(81596),Quadratic:t(59133),Quartic:t(98516),Quintic:t(35248),Sine:t(82500),Stepped:t(49752)}},7147:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return t};p.exports=S},81596:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports=t(7147)},34826:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return t*t};p.exports=S},20544:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)};p.exports=S},92029:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return t*(2-t)};p.exports=S},59133:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={In:t(34826),Out:t(92029),InOut:t(20544)}},64413:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return t*t*t*t};p.exports=S},78137:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)};p.exports=S},45840:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return 1- --t*t*t*t};p.exports=S},98516:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={In:t(64413),Out:t(45840),InOut:t(78137)}},87745:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return t*t*t*t*t};p.exports=S},16509:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)};p.exports=S},17868:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return--t*t*t*t*t+1};p.exports=S},35248:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={In:t(87745),Out:t(17868),InOut:t(16509)}},80461:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return t===0?0:t===1?1:1-Math.cos(t*Math.PI/2)};p.exports=S},34025:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return t===0?0:t===1?1:.5*(1-Math.cos(Math.PI*t))};p.exports=S},52768:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return t===0?0:t===1?1:Math.sin(t*Math.PI/2)};p.exports=S},82500:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={In:t(80461),Out:t(52768),InOut:t(34025)}},72251:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){return d===void 0&&(d=1),t<=0?0:t>=1?1:((d*t|0)+1)*(1/d)};p.exports=S},49752:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports=t(72251)},75698:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){return d===void 0&&(d=1e-4),Math.ceil(t-d)};p.exports=S},43855:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){return c===void 0&&(c=1e-4),Math.abs(t-d){/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){return d===void 0&&(d=1e-4),Math.floor(t+d)};p.exports=S},5470:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){return c===void 0&&(c=1e-4),t>d-c};p.exports=S},94977:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){return c===void 0&&(c=1e-4),t{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={Ceil:t(75698),Equal:t(43855),Floor:t(25777),GreaterThan:t(5470),LessThan:t(94977)}},75508:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(36383),c=t(79291),h={Angle:t(25588),Distance:t(50994),Easing:t(48820),Fuzzy:t(48379),Interpolation:t(38289),Pow2:t(49001),Snap:t(73697),RandomDataGenerator:t(28453),Average:t(53307),Bernstein:t(85710),Between:t(30976),CatmullRom:t(87842),CeilTo:t(26302),Clamp:t(45319),DegToRad:t(39506),Difference:t(61241),Euler:t(38857),Factorial:t(6411),FloatBetween:t(99472),FloorTo:t(77623),FromPercent:t(62945),GetSpeed:t(38265),IsEven:t(78702),IsEvenStrict:t(94883),Linear:t(28915),LinearXY:t(94908),MaxAdd:t(86883),Median:t(50040),MinSub:t(37204),Percent:t(65201),RadToDeg:t(43396),RandomXY:t(74362),RandomXYZ:t(60706),RandomXYZW:t(67421),Rotate:t(36305),RotateAround:t(11520),RotateAroundDistance:t(1163),RotateTo:t(70336),RoundAwayFromZero:t(2284),RoundTo:t(41013),SinCosTableGenerator:t(16922),SmootherStep:t(54261),SmoothStep:t(7602),ToXY:t(44408),TransformXY:t(85955),Within:t(60417),Wrap:t(15994),Vector2:t(26099),Vector3:t(25836),Vector4:t(61369),Matrix3:t(94434),Matrix4:t(37867),Quaternion:t(15746),RotateVec3:t(72678)};h=c(!1,h,d),p.exports=h},89318:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(85710),c=function(h,r){for(var n=0,e=h.length-1,s=0;s<=e;s++)n+=Math.pow(1-r,e-s)*Math.pow(r,s)*h[s]*d(e,s);return n};p.exports=c},77259:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(87842),c=function(h,r){var n=h.length-1,e=n*r,s=Math.floor(e);return h[0]===h[n]?(r<0&&(s=Math.floor(e=n*(1+r))),d(e-s,h[(s-1+n)%n],h[s],h[(s+1)%n],h[(s+2)%n])):r<0?h[0]-(d(-e,h[0],h[0],h[1],h[1])-h[0]):r>1?h[n]-(d(e-n,h[n],h[n],h[n-1],h[n-1])-h[n]):d(e-s,h[s?s-1:0],h[s],h[n{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */function S(r,n){var e=1-r;return e*e*e*n}function t(r,n){var e=1-r;return 3*e*e*r*n}function d(r,n){return 3*(1-r)*r*r*n}function c(r,n){return r*r*r*n}var h=function(r,n,e,s,a){return S(r,n)+t(r,e)+d(r,s)+c(r,a)};p.exports=h},28392:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(28915),c=function(h,r){var n=h.length-1,e=n*r,s=Math.floor(e);return r<0?d(h[0],h[1],e):r>1?d(h[n],h[n-1],n-e):d(h[s],h[s+1>n?n:s+1],e-s)};p.exports=c},32112:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */function S(h,r){var n=1-h;return n*n*r}function t(h,r){return 2*(1-h)*h*r}function d(h,r){return h*h*r}var c=function(h,r,n,e){return S(h,r)+t(h,n)+d(h,e)};p.exports=c},47235:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(7602),c=function(h,r,n){return r+(n-r)*d(h,0,1)};p.exports=c},50178:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(54261),c=function(h,r,n){return r+(n-r)*d(h,0,1)};p.exports=c},38289:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={Bezier:t(89318),CatmullRom:t(77259),CubicBezier:t(36316),Linear:t(28392),QuadraticBezier:t(32112),SmoothStep:t(47235),SmootherStep:t(50178)}},98439:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){var d=Math.log(t)/.6931471805599453;return 1<{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){return t>0&&(t&t-1)===0&&d>0&&(d&d-1)===0};p.exports=S},81230:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return t>0&&(t&t-1)===0};p.exports=S},49001:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={GetNext:t(98439),IsSize:t(50030),IsValue:t(81230)}},28453:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=new d({initialize:function(r){r===void 0&&(r=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],r&&this.init(r)},rnd:function(){var h=2091639*this.s0+this.c*23283064365386963e-26;return this.c=h|0,this.s0=this.s1,this.s1=this.s2,this.s2=h-this.c,this.s2},hash:function(h){var r,n=this.n;h=h.toString();for(var e=0;e>>0,r-=n,r*=n,n=r>>>0,r-=n,n+=r*4294967296;return this.n=n,(n>>>0)*23283064365386963e-26},init:function(h){typeof h=="string"?this.state(h):this.sow(h)},sow:function(h){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,!!h)for(var r=0;r0;n--){var e=Math.floor(this.frac()*(n+1)),s=h[e];h[e]=h[n],h[n]=s}return h}});p.exports=c},63448:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h){return c===void 0&&(c=0),d===0?t:(t-=c,t=d*Math.ceil(t/d),h?(c+t)/d:c+t)};p.exports=S},56583:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h){return c===void 0&&(c=0),d===0?t:(t-=c,t=d*Math.floor(t/d),h?(c+t)/d:c+t)};p.exports=S},77720:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h){return c===void 0&&(c=0),d===0?t:(t-=c,t=d*Math.round(t/d),h?(c+t)/d:c+t)};p.exports=S},73697:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={Ceil:t(63448),Floor:t(56583),To:t(77720)}},85454:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */t(63595);var d=t(8054),c=t(79291),h={Actions:t(61061),Animations:t(60421),BlendModes:t(10312),Cache:t(83388),Cameras:t(26638),Core:t(42857),Class:t(83419),Create:t(15822),Curves:t(25410),Data:t(44965),Display:t(27460),DOM:t(84902),Events:t(93055),FX:t(66064),Game:t(50127),GameObjects:t(77856),Geom:t(55738),Input:t(14350),Loader:t(57777),Math:t(75508),Physics:t(44563),Plugins:t(18922),Renderer:t(36909),Scale:t(93364),ScaleModes:t(29795),Scene:t(97482),Scenes:t(62194),Structs:t(41392),Textures:t(27458),Tilemaps:t(62501),Time:t(90291),Tweens:t(43066),Utils:t(91799)};h.Sound=t(23717),h=c(!1,h,d),p.exports=h,t.g.Phaser=h},71289:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(92209),h=t(88571),r=new d({Extends:h,Mixins:[c.Acceleration,c.Angular,c.Bounce,c.Collision,c.Debug,c.Drag,c.Enable,c.Friction,c.Gravity,c.Immovable,c.Mass,c.Pushable,c.Size,c.Velocity],initialize:function(e,s,a,i,o){h.call(this,e,s,a,i,o),this.body=null}});p.exports=r},86689:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(39506),h=t(20339),r=t(89774),n=t(66022),e=t(95540),s=t(46975),a=t(72441),i=t(47956),o=t(37277),l=t(44594),f=t(26099),u=t(82248),v=new d({initialize:function(x){this.scene=x,this.systems=x.sys,this.config=this.getConfig(),this.world,this.add,this._category=1,x.sys.events.once(l.BOOT,this.boot,this),x.sys.events.on(l.START,this.start,this)},boot:function(){this.world=new u(this.scene,this.config),this.add=new n(this.world),this.systems.events.once(l.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new u(this.scene,this.config),this.add=new n(this.world));var m=this.systems.events;e(this.config,"customUpdate",!1)||m.on(l.UPDATE,this.world.update,this.world),m.on(l.POST_UPDATE,this.world.postUpdate,this.world),m.once(l.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(l.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(l.UPDATE,this.world.update,this.world)},getConfig:function(){var m=this.systems.game.config.physics,x=this.systems.settings.physics,g=s(e(x,"arcade",{}),e(m,"arcade",{}));return g},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(m,x,g,y,T){return g===void 0&&(g=null),y===void 0&&(y=null),T===void 0&&(T=g),this.world.collideObjects(m,x,g,y,T,!0)},collide:function(m,x,g,y,T){return g===void 0&&(g=null),y===void 0&&(y=null),T===void 0&&(T=g),this.world.collideObjects(m,x,g,y,T,!1)},collideTiles:function(m,x,g,y,T){return this.world.collideTiles(m,x,g,y,T)},overlapTiles:function(m,x,g,y,T){return this.world.overlapTiles(m,x,g,y,T)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(m,x,g,y,T,C){y===void 0&&(y=60);var E=Math.atan2(g-m.y,x-m.x);return m.body.acceleration.setToPolar(E,y),T!==void 0&&C!==void 0&&m.body.maxVelocity.set(T,C),E},accelerateToObject:function(m,x,g,y,T){return this.accelerateTo(m,x.x,x.y,g,y,T)},closest:function(m,x){x||(x=this.world.bodies.entries);for(var g=Number.MAX_VALUE,y=null,T=m.x,C=m.y,E=x.length,M=0;Mg&&(y=P,g=F)}}return y},moveTo:function(m,x,g,y,T){y===void 0&&(y=60),T===void 0&&(T=0);var C=Math.atan2(g-m.y,x-m.x);return T>0&&(y=h(m.x,m.y,x,g)/(T/1e3)),m.body.velocity.setToPolar(C,y),C},moveToObject:function(m,x,g,y){return this.moveTo(m,x.x,x.y,g,y)},velocityFromAngle:function(m,x,g){return x===void 0&&(x=60),g===void 0&&(g=new f),g.setToPolar(c(m),x)},velocityFromRotation:function(m,x,g){return x===void 0&&(x=60),g===void 0&&(g=new f),g.setToPolar(m,x)},overlapRect:function(m,x,g,y,T,C){return i(this.world,m,x,g,y,T,C)},overlapCirc:function(m,x,g,y,T){return a(this.world,m,x,g,y,T)},shutdown:function(){if(this.world){var m=this.systems.events;m.off(l.UPDATE,this.world.update,this.world),m.off(l.POST_UPDATE,this.world.postUpdate,this.world),m.off(l.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null,this._category=1}},destroy:function(){this.shutdown(),this.scene.sys.events.off(l.START,this.start,this),this.scene=null,this.systems=null}});o.register("ArcadePhysics",v,"arcadePhysics"),p.exports=v},13759:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(92209),h=t(68287),r=new d({Extends:h,Mixins:[c.Acceleration,c.Angular,c.Bounce,c.Collision,c.Debug,c.Drag,c.Enable,c.Friction,c.Gravity,c.Immovable,c.Mass,c.Pushable,c.Size,c.Velocity],initialize:function(e,s,a,i,o){h.call(this,e,s,a,i,o),this.body=null}});p.exports=r},37742:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(78389),h=t(37747),r=t(63012),n=t(43396),e=t(87841),s=t(37303),a=t(95829),i=t(26099),o=new d({Mixins:[c],initialize:function(f,u){var v=64,m=64,x={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},g=u!==void 0;g&&u.displayWidth&&(v=u.displayWidth,m=u.displayHeight),g||(u=x),this.world=f,this.gameObject=g?u:void 0,this.isBody=!0,this.transform={x:u.x,y:u.y,rotation:u.angle,scaleX:u.scaleX,scaleY:u.scaleY,displayOriginX:u.displayOriginX,displayOriginY:u.displayOriginY},this.debugShowBody=f.defaults.debugShowBody,this.debugShowVelocity=f.defaults.debugShowVelocity,this.debugBodyColor=f.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new i,this.position=new i(u.x-u.scaleX*u.displayOriginX,u.y-u.scaleY*u.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=u.angle,this.preRotation=u.angle,this.width=v,this.height=m,this.sourceWidth=v,this.sourceHeight=m,u.frame&&(this.sourceWidth=u.frame.realWidth,this.sourceHeight=u.frame.realHeight),this.halfWidth=Math.abs(v/2),this.halfHeight=Math.abs(m/2),this.center=new i(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new i,this.newVelocity=new i,this.deltaMax=new i,this.acceleration=new i,this.allowDrag=!0,this.drag=new i,this.allowGravity=!0,this.gravity=new i,this.bounce=new i,this.worldBounce=null,this.customBoundsRectangle=f.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new i(1e4,1e4),this.maxSpeed=-1,this.friction=new i(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=h.FACING_NONE,this.immovable=!1,this.pushable=!0,this.slideFactor=new i(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=a(!1),this.touching=a(!0),this.wasTouching=a(!0),this.blocked=a(!0),this.syncBounds=!1,this.physicsType=h.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._sx=u.scaleX,this._sy=u.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new e,this.directControl=!1,this.autoFrame=this.position.clone()},updateBounds:function(){var l=this.gameObject,f=this.transform;if(l.parentContainer){var u=l.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);f.x=u.tx,f.y=u.ty,f.rotation=n(u.rotation),f.scaleX=u.scaleX,f.scaleY=u.scaleY,f.displayOriginX=l.displayOriginX,f.displayOriginY=l.displayOriginY}else f.x=l.x,f.y=l.y,f.rotation=l.angle,f.scaleX=l.scaleX,f.scaleY=l.scaleY,f.displayOriginX=l.displayOriginX,f.displayOriginY=l.displayOriginY;var v=!1;if(this.syncBounds){var m=l.getBounds(this._bounds);this.width=m.width,this.height=m.height,v=!0}else{var x=Math.abs(f.scaleX),g=Math.abs(f.scaleY);(this._sx!==x||this._sy!==g)&&(this.width=this.sourceWidth*x,this.height=this.sourceHeight*g,this._sx=x,this._sy=g,v=!0)}v&&(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 l=this.transform;this.position.x=l.x+l.scaleX*(this.offset.x-l.displayOriginX),this.position.y=l.y+l.scaleY*(this.offset.y-l.displayOriginY),this.updateCenter()},resetFlags:function(l){l===void 0&&(l=!1);var f=this.wasTouching,u=this.touching,v=this.blocked;l?a(!0,f):(f.none=u.none,f.up=u.up,f.down=u.down,f.left=u.left,f.right=u.right),a(!0,u),a(!0,v),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(l,f){if(l&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves){var u=this.position;this.prev.x=u.x,this.prev.y=u.y,this.prevFrame.x=u.x,this.prevFrame.y=u.y}l&&this.update(f)},update:function(l){var f=this.prev,u=this.position,v=this.velocity;if(f.set(u.x,u.y),!this.moves){this._dx=u.x-f.x,this._dy=u.y-f.y;return}if(this.directControl){var m=this.autoFrame;v.set((u.x-m.x)/l,(u.y-m.y)/l),this.world.updateMotion(this,l),this._dx=u.x-m.x,this._dy=u.y-m.y}else this.world.updateMotion(this,l),this.newVelocity.set(v.x*l,v.y*l),u.add(this.newVelocity),this._dx=u.x-f.x,this._dy=u.y-f.y;var x=v.x,g=v.y;if(this.updateCenter(),this.angle=Math.atan2(g,x),this.speed=Math.sqrt(x*x+g*g),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var y=this.blocked;this.world.emit(r.WORLD_BOUNDS,this,y.up,y.down,y.left,y.right)}},postUpdate:function(){var l=this.position,f=l.x-this.prevFrame.x,u=l.y-this.prevFrame.y,v=this.gameObject;if(this.moves){var m=this.deltaMax.x,x=this.deltaMax.y;m!==0&&f!==0&&(f<0&&f<-m?f=-m:f>0&&f>m&&(f=m)),x!==0&&u!==0&&(u<0&&u<-x?u=-x:u>0&&u>x&&(u=x)),v&&(v.x+=f,v.y+=u)}f<0?this.facing=h.FACING_LEFT:f>0&&(this.facing=h.FACING_RIGHT),u<0?this.facing=h.FACING_UP:u>0&&(this.facing=h.FACING_DOWN),this.allowRotation&&v&&(v.angle+=this.deltaZ()),this._tx=f,this._ty=u,this.autoFrame.set(l.x,l.y)},setBoundsRectangle:function(l){return this.customBoundsRectangle=l||this.world.bounds,this},checkWorldBounds:function(){var l=this.position,f=this.velocity,u=this.blocked,v=this.customBoundsRectangle,m=this.world.checkCollision,x=this.worldBounce?-this.worldBounce.x:-this.bounce.x,g=this.worldBounce?-this.worldBounce.y:-this.bounce.y,y=!1;return l.xv.right&&m.right&&(l.x=v.right-this.width,f.x*=x,u.right=!0,y=!0),l.yv.bottom&&m.down&&(l.y=v.bottom-this.height,f.y*=g,u.down=!0,y=!0),y&&(this.blocked.none=!1,this.updateCenter()),y},setOffset:function(l,f){return f===void 0&&(f=l),this.offset.set(l,f),this},setGameObject:function(l,f){if(f===void 0&&(f=!0),!l||!l.hasTransformComponent)return this;var u=this.world;return this.gameObject&&this.gameObject.body&&(u.disable(this.gameObject),this.gameObject.body=null),l.body&&u.disable(l),this.gameObject=l,l.body=this,this.setSize(),this.enable=f,this},setSize:function(l,f,u){u===void 0&&(u=!0);var v=this.gameObject;if(v&&(!l&&v.frame&&(l=v.frame.realWidth),!f&&v.frame&&(f=v.frame.realHeight)),this.sourceWidth=l,this.sourceHeight=f,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(),u&&v&&v.getCenter){var m=(v.width-l)/2,x=(v.height-f)/2;this.offset.set(m,x)}return this.isCircle=!1,this.radius=0,this},setCircle:function(l,f,u){return f===void 0&&(f=this.offset.x),u===void 0&&(u=this.offset.y),l>0?(this.isCircle=!0,this.radius=l,this.sourceWidth=l*2,this.sourceHeight=l*2,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.offset.set(f,u),this.updateCenter()):this.isCircle=!1,this},reset:function(l,f){this.stop();var u=this.gameObject;u&&(u.setPosition(l,f),this.rotation=u.angle,this.preRotation=u.angle);var v=this.position;u&&u.getTopLeft?u.getTopLeft(v):v.set(l,f),this.prev.copy(v),this.prevFrame.copy(v),this.autoFrame.copy(v),u&&this.updateBounds(),this.updateCenter(),this.collideWorldBounds&&this.checkWorldBounds(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(l){return l.x=this.x,l.y=this.y,l.right=this.right,l.bottom=this.bottom,l},hitTest:function(l,f){if(!this.isCircle)return s(this,l,f);if(this.radius>0&&l>=this.left&&l<=this.right&&f>=this.top&&f<=this.bottom){var u=(this.center.x-l)*(this.center.x-l),v=(this.center.y-f)*(this.center.y-f);return u+v<=this.radius*this.radius}return!1},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(l){var f=this.position,u=f.x+this.halfWidth,v=f.y+this.halfHeight;this.debugShowBody&&(l.lineStyle(l.defaultStrokeWidth,this.debugBodyColor),this.isCircle?l.strokeCircle(u,v,this.width/2):(this.checkCollision.up&&l.lineBetween(f.x,f.y,f.x+this.width,f.y),this.checkCollision.right&&l.lineBetween(f.x+this.width,f.y,f.x+this.width,f.y+this.height),this.checkCollision.down&&l.lineBetween(f.x,f.y+this.height,f.x+this.width,f.y+this.height),this.checkCollision.left&&l.lineBetween(f.x,f.y,f.x,f.y+this.height))),this.debugShowVelocity&&(l.lineStyle(l.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),l.lineBetween(u,v,u+this.velocity.x/2,v+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(l){return l===void 0&&(l=!0),this.directControl=l,this},setCollideWorldBounds:function(l,f,u,v){l===void 0&&(l=!0),this.collideWorldBounds=l;var m=f!==void 0,x=u!==void 0;return(m||x)&&(this.worldBounce||(this.worldBounce=new i),m&&(this.worldBounce.x=f),x&&(this.worldBounce.y=u)),v!==void 0&&(this.onWorldBounds=v),this},setVelocity:function(l,f){return this.velocity.set(l,f),l=this.velocity.x,f=this.velocity.y,this.speed=Math.sqrt(l*l+f*f),this},setVelocityX:function(l){return this.setVelocity(l,this.velocity.y)},setVelocityY:function(l){return this.setVelocity(this.velocity.x,l)},setMaxVelocity:function(l,f){return this.maxVelocity.set(l,f),this},setMaxVelocityX:function(l){return this.maxVelocity.x=l,this},setMaxVelocityY:function(l){return this.maxVelocity.y=l,this},setMaxSpeed:function(l){return this.maxSpeed=l,this},setSlideFactor:function(l,f){return this.slideFactor.set(l,f),this},setBounce:function(l,f){return this.bounce.set(l,f),this},setBounceX:function(l){return this.bounce.x=l,this},setBounceY:function(l){return this.bounce.y=l,this},setAcceleration:function(l,f){return this.acceleration.set(l,f),this},setAccelerationX:function(l){return this.acceleration.x=l,this},setAccelerationY:function(l){return this.acceleration.y=l,this},setAllowDrag:function(l){return l===void 0&&(l=!0),this.allowDrag=l,this},setAllowGravity:function(l){return l===void 0&&(l=!0),this.allowGravity=l,this},setAllowRotation:function(l){return l===void 0&&(l=!0),this.allowRotation=l,this},setDrag:function(l,f){return this.drag.set(l,f),this},setDamping:function(l){return this.useDamping=l,this},setDragX:function(l){return this.drag.x=l,this},setDragY:function(l){return this.drag.y=l,this},setGravity:function(l,f){return this.gravity.set(l,f),this},setGravityX:function(l){return this.gravity.x=l,this},setGravityY:function(l){return this.gravity.y=l,this},setFriction:function(l,f){return this.friction.set(l,f),this},setFrictionX:function(l){return this.friction.x=l,this},setFrictionY:function(l){return this.friction.y=l,this},setAngularVelocity:function(l){return this.angularVelocity=l,this},setAngularAcceleration:function(l){return this.angularAcceleration=l,this},setAngularDrag:function(l){return this.angularDrag=l,this},setMass:function(l){return this.mass=l,this},setImmovable:function(l){return l===void 0&&(l=!0),this.immovable=l,this},setEnable:function(l){return l===void 0&&(l=!0),this.enable=l,this},processX:function(l,f,u,v){this.x+=l,this.updateCenter(),f!==null&&(this.velocity.x=f*this.slideFactor.x);var m=this.blocked;u&&(m.left=!0,m.none=!1),v&&(m.right=!0,m.none=!1)},processY:function(l,f,u,v){this.y+=l,this.updateCenter(),f!==null&&(this.velocity.y=f*this.slideFactor.y);var m=this.blocked;u&&(m.up=!0,m.none=!1),v&&(m.down=!0,m.none=!1)},x:{get:function(){return this.position.x},set:function(l){this.position.x=l}},y:{get:function(){return this.position.y},set:function(l){this.position.y=l}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});p.exports=o},79342:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=new d({initialize:function(r,n,e,s,a,i,o){this.world=r,this.name="",this.active=!0,this.overlapOnly=n,this.object1=e,this.object2=s,this.collideCallback=a,this.processCallback=i,this.callbackContext=o},setName:function(h){return this.name=h,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}});p.exports=c},66022:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(71289),c=t(13759),h=t(37742),r=t(83419),n=t(37747),e=t(60758),s=t(72624),a=t(71464),i=new r({initialize:function(l){this.world=l,this.scene=l.scene,this.sys=l.scene.sys},collider:function(o,l,f,u,v){return this.world.addCollider(o,l,f,u,v)},overlap:function(o,l,f,u,v){return this.world.addOverlap(o,l,f,u,v)},existing:function(o,l){var f=l?n.STATIC_BODY:n.DYNAMIC_BODY;return this.world.enableBody(o,f),o},staticImage:function(o,l,f,u){var v=new d(this.scene,o,l,f,u);return this.sys.displayList.add(v),this.world.enableBody(v,n.STATIC_BODY),v},image:function(o,l,f,u){var v=new d(this.scene,o,l,f,u);return this.sys.displayList.add(v),this.world.enableBody(v,n.DYNAMIC_BODY),v},staticSprite:function(o,l,f,u){var v=new c(this.scene,o,l,f,u);return this.sys.displayList.add(v),this.sys.updateList.add(v),this.world.enableBody(v,n.STATIC_BODY),v},sprite:function(o,l,f,u){var v=new c(this.scene,o,l,f,u);return this.sys.displayList.add(v),this.sys.updateList.add(v),this.world.enableBody(v,n.DYNAMIC_BODY),v},staticGroup:function(o,l){return this.sys.updateList.add(new a(this.world,this.world.scene,o,l))},group:function(o,l){return this.sys.updateList.add(new e(this.world,this.world.scene,o,l))},body:function(o,l,f,u){var v=new h(this.world);return v.position.set(o,l),f&&u&&v.setSize(f,u),this.world.add(v,n.DYNAMIC_BODY),v},staticBody:function(o,l,f,u){var v=new s(this.world);return v.position.set(o,l),f&&u&&v.setSize(f,u),this.world.add(v,n.STATIC_BODY),v},destroy:function(){this.world=null,this.scene=null,this.sys=null}});p.exports=i},79599:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){var d=0;if(!Array.isArray(t))d=t;else for(var c=0;c{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(37747),c=function(h,r,n,e){var s=0,a=h.deltaAbsX()+r.deltaAbsX()+e;return h._dx===0&&r._dx===0?(h.embedded=!0,r.embedded=!0):h._dx>r._dx?(s=h.right-r.x,s>a&&!n||h.checkCollision.right===!1||r.checkCollision.left===!1?s=0:(h.touching.none=!1,h.touching.right=!0,r.touching.none=!1,r.touching.left=!0,r.physicsType===d.STATIC_BODY&&!n&&(h.blocked.none=!1,h.blocked.right=!0),h.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.left=!0))):h._dxa&&!n||h.checkCollision.left===!1||r.checkCollision.right===!1?s=0:(h.touching.none=!1,h.touching.left=!0,r.touching.none=!1,r.touching.right=!0,r.physicsType===d.STATIC_BODY&&!n&&(h.blocked.none=!1,h.blocked.left=!0),h.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.right=!0))),h.overlapX=s,r.overlapX=s,s};p.exports=c},45170:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(37747),c=function(h,r,n,e){var s=0,a=h.deltaAbsY()+r.deltaAbsY()+e;return h._dy===0&&r._dy===0?(h.embedded=!0,r.embedded=!0):h._dy>r._dy?(s=h.bottom-r.y,s>a&&!n||h.checkCollision.down===!1||r.checkCollision.up===!1?s=0:(h.touching.none=!1,h.touching.down=!0,r.touching.none=!1,r.touching.up=!0,r.physicsType===d.STATIC_BODY&&!n&&(h.blocked.none=!1,h.blocked.down=!0),h.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.up=!0))):h._dya&&!n||h.checkCollision.up===!1||r.checkCollision.down===!1?s=0:(h.touching.none=!1,h.touching.up=!0,r.touching.none=!1,r.touching.down=!0,r.physicsType===d.STATIC_BODY&&!n&&(h.blocked.none=!1,h.blocked.up=!0),h.physicsType===d.STATIC_BODY&&!n&&(r.blocked.none=!1,r.blocked.down=!0))),h.overlapY=s,r.overlapY=s,s};p.exports=c},60758:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(13759),c=t(83419),h=t(78389),r=t(37747),n=t(95540),e=t(26479),s=t(41212),a=new c({Extends:e,Mixins:[h],initialize:function(o,l,f,u){if(!f&&!u)u={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else if(s(f))u=f,f=null,u.internalCreateCallback=this.createCallbackHandler,u.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(f)&&s(f[0])){var v=this;f.forEach(function(m){m.internalCreateCallback=v.createCallbackHandler,m.internalRemoveCallback=v.removeCallbackHandler,m.classType=n(m,"classType",d)}),u=null}else u={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=o,u&&(u.classType=n(u,"classType",d)),this.physicsType=r.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=2147483647,this.defaults={setCollideWorldBounds:n(u,"collideWorldBounds",!1),setBoundsRectangle:n(u,"customBoundsRectangle",null),setAccelerationX:n(u,"accelerationX",0),setAccelerationY:n(u,"accelerationY",0),setAllowDrag:n(u,"allowDrag",!0),setAllowGravity:n(u,"allowGravity",!0),setAllowRotation:n(u,"allowRotation",!0),setDamping:n(u,"useDamping",!1),setBounceX:n(u,"bounceX",0),setBounceY:n(u,"bounceY",0),setDragX:n(u,"dragX",0),setDragY:n(u,"dragY",0),setEnable:n(u,"enable",!0),setGravityX:n(u,"gravityX",0),setGravityY:n(u,"gravityY",0),setFrictionX:n(u,"frictionX",0),setFrictionY:n(u,"frictionY",0),setMaxSpeed:n(u,"maxSpeed",-1),setMaxVelocityX:n(u,"maxVelocityX",1e4),setMaxVelocityY:n(u,"maxVelocityY",1e4),setVelocityX:n(u,"velocityX",0),setVelocityY:n(u,"velocityY",0),setAngularVelocity:n(u,"angularVelocity",0),setAngularAcceleration:n(u,"angularAcceleration",0),setAngularDrag:n(u,"angularDrag",0),setMass:n(u,"mass",1),setImmovable:n(u,"immovable",!1)},e.call(this,l,f,u),this.type="PhysicsGroup"},createCallbackHandler:function(i){i.body||this.world.enableBody(i,r.DYNAMIC_BODY);var o=i.body;for(var l in this.defaults)o[l](this.defaults[l])},removeCallbackHandler:function(i){i.body&&this.world.disableBody(i)},setVelocity:function(i,o,l){l===void 0&&(l=0);for(var f=this.getChildren(),u=0;u{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S,t,d,c,h,r,n,e,s,a,i,o,l,f,u,v,m,x=function(M,P,A){S=M,t=P;var F=S.velocity.x,L=t.velocity.x;return d=S.pushable,s=S._dx<0,a=S._dx>0,i=S._dx===0,u=Math.abs(S.right-t.x)<=Math.abs(t.right-S.x),n=L-F*S.bounce.x,c=t.pushable,o=t._dx<0,l=t._dx>0,f=t._dx===0,v=!u,e=F-L*t.bounce.x,m=Math.abs(A),g()},g=function(){return a&&u&&t.blocked.right?(S.processX(-m,n,!1,!0),1):s&&v&&t.blocked.left?(S.processX(m,n,!0),1):l&&v&&S.blocked.right?(t.processX(-m,e,!1,!0),2):o&&u&&S.blocked.left?(t.processX(m,e,!0),2):0},y=function(){var M=S.velocity.x,P=t.velocity.x,A=Math.sqrt(P*P*t.mass/S.mass)*(P>0?1:-1),F=Math.sqrt(M*M*S.mass/t.mass)*(M>0?1:-1),L=(A+F)*.5;return A-=L,F-=L,h=L+A*S.bounce.x,r=L+F*t.bounce.x,s&&v?T(0):o&&u?T(1):a&&u?T(2):l&&v?T(3):!1},T=function(M){if(d&&c)m*=.5,M===0||M===3?(S.processX(m,h),t.processX(-m,r)):(S.processX(-m,h),t.processX(m,r));else if(d&&!c)M===0||M===3?S.processX(m,n,!0):S.processX(-m,n,!1,!0);else if(!d&&c)M===0||M===3?t.processX(-m,e,!1,!0):t.processX(m,e,!0);else{var P=m*.5;M===0?f?(S.processX(m,0,!0),t.processX(0,null,!1,!0)):l?(S.processX(P,0,!0),t.processX(-P,0,!1,!0)):(S.processX(P,t.velocity.x,!0),t.processX(-P,null,!1,!0)):M===1?i?(S.processX(0,null,!1,!0),t.processX(m,0,!0)):a?(S.processX(-P,0,!1,!0),t.processX(P,0,!0)):(S.processX(-P,null,!1,!0),t.processX(P,S.velocity.x,!0)):M===2?f?(S.processX(-m,0,!1,!0),t.processX(0,null,!0)):o?(S.processX(-P,0,!1,!0),t.processX(P,0,!0)):(S.processX(-P,t.velocity.x,!1,!0),t.processX(P,null,!0)):M===3&&(i?(S.processX(0,null,!0),t.processX(-m,0,!1,!0)):s?(S.processX(P,0,!0),t.processX(-P,0,!1,!0)):(S.processX(P,t.velocity.y,!0),t.processX(-P,null,!1,!0)))}return!0},C=function(M){if(M===1?t.velocity.x=0:u?t.processX(m,e,!0):t.processX(-m,e,!1,!0),S.moves){var P=S.directControl?S.y-S.autoFrame.y:S.y-S.prev.y;t.y+=P*S.friction.y,t._dy=t.y-t.prev.y}},E=function(M){if(M===2?S.velocity.x=0:v?S.processX(m,n,!0):S.processX(-m,n,!1,!0),t.moves){var P=t.directControl?t.y-t.autoFrame.y:t.y-t.prev.y;S.y+=P*t.friction.y,S._dy=S.y-S.prev.y}};p.exports={BlockCheck:g,Check:y,Set:x,Run:T,RunImmovableBody1:C,RunImmovableBody2:E}},47962:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S,t,d,c,h,r,n,e,s,a,i,o,l,f,u,v,m,x=function(M,P,A){S=M,t=P;var F=S.velocity.y,L=t.velocity.y;return d=S.pushable,s=S._dy<0,a=S._dy>0,i=S._dy===0,u=Math.abs(S.bottom-t.y)<=Math.abs(t.bottom-S.y),n=L-F*S.bounce.y,c=t.pushable,o=t._dy<0,l=t._dy>0,f=t._dy===0,v=!u,e=F-L*t.bounce.y,m=Math.abs(A),g()},g=function(){return a&&u&&t.blocked.down?(S.processY(-m,n,!1,!0),1):s&&v&&t.blocked.up?(S.processY(m,n,!0),1):l&&v&&S.blocked.down?(t.processY(-m,e,!1,!0),2):o&&u&&S.blocked.up?(t.processY(m,e,!0),2):0},y=function(){var M=S.velocity.y,P=t.velocity.y,A=Math.sqrt(P*P*t.mass/S.mass)*(P>0?1:-1),F=Math.sqrt(M*M*S.mass/t.mass)*(M>0?1:-1),L=(A+F)*.5;return A-=L,F-=L,h=L+A*S.bounce.y,r=L+F*t.bounce.y,s&&v?T(0):o&&u?T(1):a&&u?T(2):l&&v?T(3):!1},T=function(M){if(d&&c)m*=.5,M===0||M===3?(S.processY(m,h),t.processY(-m,r)):(S.processY(-m,h),t.processY(m,r));else if(d&&!c)M===0||M===3?S.processY(m,n,!0):S.processY(-m,n,!1,!0);else if(!d&&c)M===0||M===3?t.processY(-m,e,!1,!0):t.processY(m,e,!0);else{var P=m*.5;M===0?f?(S.processY(m,0,!0),t.processY(0,null,!1,!0)):l?(S.processY(P,0,!0),t.processY(-P,0,!1,!0)):(S.processY(P,t.velocity.y,!0),t.processY(-P,null,!1,!0)):M===1?i?(S.processY(0,null,!1,!0),t.processY(m,0,!0)):a?(S.processY(-P,0,!1,!0),t.processY(P,0,!0)):(S.processY(-P,null,!1,!0),t.processY(P,S.velocity.y,!0)):M===2?f?(S.processY(-m,0,!1,!0),t.processY(0,null,!0)):o?(S.processY(-P,0,!1,!0),t.processY(P,0,!0)):(S.processY(-P,t.velocity.y,!1,!0),t.processY(P,null,!0)):M===3&&(i?(S.processY(0,null,!0),t.processY(-m,0,!1,!0)):s?(S.processY(P,0,!0),t.processY(-P,0,!1,!0)):(S.processY(P,t.velocity.y,!0),t.processY(-P,null,!1,!0)))}return!0},C=function(M){if(M===1?t.velocity.y=0:u?t.processY(m,e,!0):t.processY(-m,e,!1,!0),S.moves){var P=S.directControl?S.x-S.autoFrame.x:S.x-S.prev.x;t.x+=P*S.friction.x,t._dx=t.x-t.prev.x}},E=function(M){if(M===2?S.velocity.y=0:v?S.processY(m,n,!0):S.processY(-m,n,!1,!0),t.moves){var P=t.directControl?t.x-t.autoFrame.x:t.x-t.prev.x;S.x+=P*t.friction.x,S._dx=S.x-S.prev.x}};p.exports={BlockCheck:g,Check:y,Set:x,Run:T,RunImmovableBody1:C,RunImmovableBody2:E}},14087:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(64897),c=t(3017),h=function(r,n,e,s,a){a===void 0&&(a=d(r,n,e,s));var i=r.immovable,o=n.immovable;if(e||a===0||i&&o||r.customSeparateX||n.customSeparateX)return a!==0||r.embedded&&n.embedded;var l=c.Set(r,n,a);return!i&&!o?l>0?!0:c.Check():(i?c.RunImmovableBody1(l):o&&c.RunImmovableBody2(l),!0)};p.exports=h},89936:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(45170),c=t(47962),h=function(r,n,e,s,a){a===void 0&&(a=d(r,n,e,s));var i=r.immovable,o=n.immovable;if(e||a===0||i&&o||r.customSeparateY||n.customSeparateY)return a!==0||r.embedded&&n.embedded;var l=c.Set(r,n,a);return!i&&!o?l>0?!0:c.Check():(i?c.RunImmovableBody1(l):o&&c.RunImmovableBody2(l),!0)};p.exports=h},95829:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){return d===void 0&&(d={}),d.none=t,d.up=!1,d.down=!1,d.left=!1,d.right=!1,t||(d.up=!0,d.down=!0,d.left=!0,d.right=!0),d};p.exports=S},72624:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(87902),c=t(83419),h=t(78389),r=t(37747),n=t(37303),e=t(95829),s=t(26099),a=new c({Mixins:[h],initialize:function(o,l){var f=64,u=64,v={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0},m=l!==void 0;m&&l.displayWidth&&(f=l.displayWidth,u=l.displayHeight),m||(l=v),this.world=o,this.gameObject=m?l:void 0,this.isBody=!0,this.debugShowBody=o.defaults.debugShowStaticBody,this.debugBodyColor=o.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new s,this.position=new s(l.x-f*l.originX,l.y-u*l.originY),this.width=f,this.height=u,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new s(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=s.ZERO,this.allowGravity=!1,this.gravity=s.ZERO,this.bounce=s.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=e(!1),this.touching=e(!0),this.wasTouching=e(!0),this.blocked=e(!0),this.physicsType=r.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._dx=0,this._dy=0},setGameObject:function(i,o,l){if(o===void 0&&(o=!0),l===void 0&&(l=!0),!i||!i.hasTransformComponent)return this;var f=this.world;return this.gameObject&&this.gameObject.body&&(f.disable(this.gameObject),this.gameObject.body=null),i.body&&f.disable(i),this.gameObject=i,i.body=this,this.setSize(),o&&this.updateFromGameObject(),this.enable=l,this},updateFromGameObject:function(){this.world.staticTree.remove(this);var i=this.gameObject;return i.getTopLeft(this.position),this.width=i.displayWidth,this.height=i.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(i,o){return o===void 0&&(o=i),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(i,o),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(i,o,l){l===void 0&&(l=!0);var f=this.gameObject;if(f&&f.frame&&(i||(i=f.frame.realWidth),o||(o=f.frame.realHeight)),this.world.staticTree.remove(this),this.width=i,this.height=o,this.halfWidth=Math.floor(i/2),this.halfHeight=Math.floor(o/2),l&&f&&f.getCenter){var u=f.displayWidth/2,v=f.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(u-this.halfWidth,v-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(i,o,l){return o===void 0&&(o=this.offset.x),l===void 0&&(l=this.offset.y),i>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=i,this.width=i*2,this.height=i*2,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(o,l),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(i,o){var l=this.gameObject;i===void 0&&(i=l.x),o===void 0&&(o=l.y),this.world.staticTree.remove(this),l.setPosition(i,o),l.getTopLeft(this.position),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(i){return i.x=this.x,i.y=this.y,i.right=this.right,i.bottom=this.bottom,i},hitTest:function(i,o){return this.isCircle?d(this,i,o):n(this,i,o)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(i){var o=this.position,l=o.x+this.halfWidth,f=o.y+this.halfHeight;this.debugShowBody&&(i.lineStyle(i.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?i.strokeCircle(l,f,this.width/2):i.strokeRect(o.x,o.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(i){return i<=0&&(i=.1),this.mass=i,this},x:{get:function(){return this.position.x},set:function(i){this.world.staticTree.remove(this),this.position.x=i,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(i){this.world.staticTree.remove(this),this.position.y=i,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});p.exports=a},71464:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(13759),c=t(83419),h=t(78389),r=t(37747),n=t(95540),e=t(26479),s=t(41212),a=new c({Extends:e,Mixins:[h],initialize:function(o,l,f,u){!f&&!u?u={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:d}:s(f)?(u=f,f=null,u.internalCreateCallback=this.createCallbackHandler,u.internalRemoveCallback=this.removeCallbackHandler,u.createMultipleCallback=this.createMultipleCallbackHandler,u.classType=n(u,"classType",d)):Array.isArray(f)&&s(f[0])?(u=f,f=null,u.forEach(function(v){v.internalCreateCallback=this.createCallbackHandler,v.internalRemoveCallback=this.removeCallbackHandler,v.createMultipleCallback=this.createMultipleCallbackHandler,v.classType=n(v,"classType",d)})):u={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler},this.world=o,this.physicsType=r.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,e.call(this,l,f,u),this.type="StaticPhysicsGroup"},createCallbackHandler:function(i){i.body||this.world.enableBody(i,r.STATIC_BODY)},removeCallbackHandler:function(i){i.body&&this.world.disableBody(i)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var i=this.children.entries,o=0;o{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(55495),c=t(37742),h=t(45319),r=t(83419),n=t(79342),e=t(37747),s=t(20339),a=t(52816),i=t(50792),o=t(63012),l=t(43855),f=t(5470),u=t(94977),v=t(64897),m=t(45170),x=t(96523),g=t(35154),y=t(36383),T=t(25774),C=t(96602),E=t(87841),M=t(59542),P=t(40012),A=t(14087),F=t(89936),L=t(35072),B=t(72624),N=t(2483),U=t(61340),z=t(26099),I=t(15994),G=new r({Extends:i,initialize:function(b,D){i.call(this),this.scene=b,this.bodies=new L,this.staticBodies=new L,this.pendingDestroy=new L,this.colliders=new T,this.gravity=new z(g(D,"gravity.x",0),g(D,"gravity.y",0)),this.bounds=new E(g(D,"x",0),g(D,"y",0),g(D,"width",b.sys.scale.width),g(D,"height",b.sys.scale.height)),this.checkCollision={up:g(D,"checkCollision.up",!0),down:g(D,"checkCollision.down",!0),left:g(D,"checkCollision.left",!0),right:g(D,"checkCollision.right",!0)},this.fps=g(D,"fps",60),this.fixedStep=g(D,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=g(D,"timeScale",1),this.OVERLAP_BIAS=g(D,"overlapBias",4),this.TILE_BIAS=g(D,"tileBias",16),this.forceX=g(D,"forceX",!1),this.isPaused=g(D,"isPaused",!1),this._total=0,this.drawDebug=g(D,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:g(D,"debugShowBody",!0),debugShowStaticBody:g(D,"debugShowStaticBody",!0),debugShowVelocity:g(D,"debugShowVelocity",!0),bodyDebugColor:g(D,"debugBodyColor",16711935),staticBodyDebugColor:g(D,"debugStaticBodyColor",255),velocityDebugColor:g(D,"debugVelocityColor",65280)},this.maxEntries=g(D,"maxEntries",16),this.useTree=g(D,"useTree",!0),this.tree=new M(this.maxEntries),this.staticTree=new M(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new U,this._tempMatrix2=new U,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(O,b){b===void 0&&(b=e.DYNAMIC_BODY),Array.isArray(O)||(O=[O]);for(var D=0;D=V;for(this.fixedStep||(X=b*.001,Z=!0,this._elapsed=0),D=0;D=V;)this._elapsed-=V,this.step(X)}},step:function(O){var b,D,X=this.bodies.entries,V=X.length;for(b=0;b0){var Q=this.tree,j=this.staticTree;for(D=Z.entries,X=D.length,O=0;O-1&&O.velocity.length()>_&&(O.velocity.normalize().scale(_),$=_),O.speed=$},separate:function(O,b,D,X,V){var W,K,Z=!1,Q=!0;if(!O.enable||!b.enable||O.checkCollision.none||b.checkCollision.none||!this.intersects(O,b)||!(O.collisionMask&b.collisionCategory)||!(b.collisionMask&O.collisionCategory)||D&&D.call(X,O.gameObject||O,b.gameObject||b)===!1)return Z;if(O.isCircle||b.isCircle){var j=this.separateCircle(O,b,V);j.result?(Z=!0,Q=!1):(W=j.x,K=j.y,Q=!0)}if(Q){var $=!1,_=!1,et=this.OVERLAP_BIAS;V?($=A(O,b,V,et,W),_=F(O,b,V,et,K)):this.forceX||Math.abs(this.gravity.y+O.gravity.y)st&&(_=s(q,rt,st,tt)-ot):rt>nt&&(qst&&(_=s(q,rt,st,nt)-ot)),_*=-1}else _=O.halfWidth+b.halfWidth-a(W,K);O.overlapR=_,b.overlapR=_;var ut=d(W,K),pt=(_+y.EPSILON)*Math.cos(ut),xt=(_+y.EPSILON)*Math.sin(ut),dt={overlap:_,result:!1,x:pt,y:xt};if(D&&(!et||et&&_!==0))return dt.result=!0,dt;if(!et&&_===0||Z&&Q||O.customSeparateX||b.customSeparateX)return dt.x=void 0,dt.y=void 0,dt;var vt=!O.pushable&&!b.pushable;if(et){var yt=W.x-K.x,Pt=W.y-K.y,mt=Math.sqrt(Math.pow(yt,2)+Math.pow(Pt,2)),Tt=(K.x-W.x)/mt||0,Ct=(K.y-W.y)/mt||0,Rt=2*(j.x*Tt+j.y*Ct-$.x*Tt-$.y*Ct)/(O.mass+b.mass);(Z||Q||!O.pushable||!b.pushable)&&(Rt*=2),!Z&&O.pushable&&(j.x=j.x-Rt/O.mass*Tt,j.y=j.y-Rt/O.mass*Ct,j.multiply(O.bounce)),!Q&&b.pushable&&($.x=$.x+Rt/b.mass*Tt,$.y=$.y+Rt/b.mass*Ct,$.multiply(b.bounce)),!Z&&!Q&&(pt*=.5,xt*=.5),(!Z||O.pushable||vt)&&(O.x-=pt,O.y-=xt,O.updateCenter()),(!Q||b.pushable||vt)&&(b.x+=pt,b.y+=xt,b.updateCenter()),dt.result=!0}else!Z&&(O.pushable||vt)&&(O.x-=pt,O.y-=xt,O.updateCenter()),!Q&&(b.pushable||vt)&&(b.x+=pt,b.y+=xt,b.updateCenter()),dt.x=void 0,dt.y=void 0;return dt},intersects:function(O,b){return O===b?!1:!O.isCircle&&!b.isCircle?!(O.right<=b.left||O.bottom<=b.top||O.left>=b.right||O.top>=b.bottom):O.isCircle?b.isCircle?a(O.center,b.center)<=O.halfWidth+b.halfWidth:this.circleBodyIntersects(O,b):this.circleBodyIntersects(b,O)},circleBodyIntersects:function(O,b){var D=h(O.center.x,b.left,b.right),X=h(O.center.y,b.top,b.bottom),V=(O.center.x-D)*(O.center.x-D),W=(O.center.y-X)*(O.center.y-X);return V+W<=O.halfWidth*O.halfWidth},overlap:function(O,b,D,X,V){return D===void 0&&(D=null),X===void 0&&(X=null),V===void 0&&(V=D),this.collideObjects(O,b,D,X,V,!0)},collide:function(O,b,D,X,V){return D===void 0&&(D=null),X===void 0&&(X=null),V===void 0&&(V=D),this.collideObjects(O,b,D,X,V,!1)},collideObjects:function(O,b,D,X,V,W){var K,Z;O.isParent&&(O.physicsType===void 0||b===void 0||O===b)&&(O=O.children.entries),b&&b.isParent&&b.physicsType===void 0&&(b=b.children.entries);var Q=Array.isArray(O),j=Array.isArray(b);if(this._total=0,!Q&&!j)this.collideHandler(O,b,D,X,V,W);else if(!Q&&j)for(K=0;K0},collideHandler:function(O,b,D,X,V,W){if(b===void 0&&O.isParent)return this.collideGroupVsGroup(O,O,D,X,V,W);if(!O||!b)return!1;if(O.body||O.isBody){if(b.body||b.isBody)return this.collideSpriteVsSprite(O,b,D,X,V,W);if(b.isParent)return this.collideSpriteVsGroup(O,b,D,X,V,W);if(b.isTilemap)return this.collideSpriteVsTilemapLayer(O,b,D,X,V,W)}else if(O.isParent){if(b.body||b.isBody)return this.collideSpriteVsGroup(b,O,D,X,V,W);if(b.isParent)return this.collideGroupVsGroup(O,b,D,X,V,W);if(b.isTilemap)return this.collideGroupVsTilemapLayer(O,b,D,X,V,W)}else if(O.isTilemap){if(b.body||b.isBody)return this.collideSpriteVsTilemapLayer(b,O,D,X,V,W);if(b.isParent)return this.collideGroupVsTilemapLayer(b,O,D,X,V,W)}},canCollide:function(O,b){return O&&b&&(O.collisionMask&b.collisionCategory)!==0&&(b.collisionMask&O.collisionCategory)!==0},collideSpriteVsSprite:function(O,b,D,X,V,W){var K=O.isBody?O:O.body,Z=b.isBody?b:b.body;return this.canCollide(K,Z)?(this.separate(K,Z,X,V,W)&&(D&&D.call(V,O,b),this._total++),!0):!1},collideSpriteVsGroup:function(O,b,D,X,V,W){var K=O.isBody?O:O.body;if(!(b.getLength()===0||!K||!K.enable||K.checkCollision.none||!this.canCollide(K,b))){var Z,Q,j;if(this.useTree||b.physicsType===e.STATIC_BODY){var $=this.treeMinMax;$.minX=K.left,$.minY=K.top,$.maxX=K.right,$.maxY=K.bottom;var _=b.physicsType===e.DYNAMIC_BODY?this.tree.search($):this.staticTree.search($);for(Q=_.length,Z=0;Z{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={setAcceleration:function(t,d){return this.body.acceleration.set(t,d),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}};p.exports=S},59023:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={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}};p.exports=S},62069:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={setBounce:function(t,d){return this.body.bounce.set(t,d),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,d,c,h){return this.body.setCollideWorldBounds(t,d,c,h),this}};p.exports=S},78389:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(79599),c={setCollisionCategory:function(h){var r=this.body?this.body:this;return r.collisionCategory=h,this},willCollideWith:function(h){var r=this.body?this.body:this;return(r.collisionMask&h)!==0},addCollidesWith:function(h){var r=this.body?this.body:this;return r.collisionMask=r.collisionMask|h,this},removeCollidesWith:function(h){var r=this.body?this.body:this;return r.collisionMask=r.collisionMask&~h,this},setCollidesWith:function(h){var r=this.body?this.body:this;return r.collisionMask=d(h),this},resetCollisionCategory:function(){var h=this.body?this.body:this;return h.collisionCategory=1,h.collisionMask=2147483647,this}};p.exports=c},87118:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={setDebug:function(t,d,c){return this.debugShowBody=t,this.debugShowVelocity=d,this.debugBodyColor=c,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}}};p.exports=S},52819:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={setDrag:function(t,d){return this.body.drag.set(t,d),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}};p.exports=S},4074:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={setDirectControl:function(t){return this.body.setDirectControl(t),this},enableBody:function(t,d,c,h,r){return t&&this.body.reset(d,c),h&&(this.body.gameObject.active=!0),r&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,d){return t===void 0&&(t=!1),d===void 0&&(d=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),d&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};p.exports=S},40831:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={setFriction:function(t,d){return this.body.friction.set(t,d),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}};p.exports=S},26775:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={setGravity:function(t,d){return this.body.gravity.set(t,d),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}};p.exports=S},9437:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={setImmovable:function(t){return t===void 0&&(t=!0),this.body.immovable=t,this}};p.exports=S},30621:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={setMass:function(t){return this.body.mass=t,this}};p.exports=S},72441:(p,S,t)=>{var d=t(47956),c=t(96503),h=t(2044),r=t(81491),n=function(e,s,a,i,o,l){var f=d(e,s-i,a-i,2*i,2*i,o,l);if(f.length===0)return f;for(var u=new c(s,a,i),v=new c,m=[],x=0;x{var S=function(t,d,c,h,r,n,e){n===void 0&&(n=!0),e===void 0&&(e=!1);var s=[],a=[],i=t.treeMinMax;if(i.minX=d,i.minY=c,i.maxX=d+h,i.maxY=c+r,e&&(a=t.staticTree.search(i)),n&&t.useTree)s=t.tree.search(i);else if(n){var o=t.bodies,l={position:{x:d,y:c},left:d,top:c,right:d+h,bottom:c+r,isCircle:!1},f=t.intersects;o.iterate(function(u){f(u,l)&&s.push(u)})}return a.concat(s)};p.exports=S},62121:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={setPushable:function(t){return t===void 0&&(t=!0),this.body.pushable=t,this}};p.exports=S},29384:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={setOffset:function(t,d){return this.body.setOffset(t,d),this},setSize:function(t,d,c){return this.body.setSize(t,d,c),this},setBodySize:function(t,d,c){return this.body.setSize(t,d,c),this},setCircle:function(t,d,c){return this.body.setCircle(t,d,c),this}};p.exports=S},15098:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={setVelocity:function(t,d){return this.body.setVelocity(t,d),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,d){return this.body.maxVelocity.set(t,d),this}};p.exports=S},92209:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={Acceleration:t(1093),Angular:t(59023),Bounce:t(62069),Collision:t(78389),Debug:t(87118),Drag:t(52819),Enable:t(4074),Friction:t(40831),Gravity:t(26775),Immovable:t(9437),Mass:t(30621),OverlapCirc:t(72441),OverlapRect:t(47956),Pushable:t(62121),Size:t(29384),Velocity:t(15098)}},37747:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={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};p.exports=S},20009:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="collide"},36768:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="overlap"},60473:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="pause"},89954:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="resume"},61804:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="tilecollide"},7161:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="tileoverlap"},34689:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="worldbounds"},16006:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="worldstep"},63012:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={COLLIDE:t(20009),OVERLAP:t(36768),PAUSE:t(60473),RESUME:t(89954),TILE_COLLIDE:t(61804),TILE_OVERLAP:t(7161),WORLD_BOUNDS:t(34689),WORLD_STEP:t(16006)}},27064:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(37747),c=t(79291),h={ArcadePhysics:t(86689),Body:t(37742),Collider:t(79342),Components:t(92209),Events:t(63012),Factory:t(66022),GetCollidesWith:t(79599),GetOverlapX:t(64897),GetOverlapY:t(45170),SeparateX:t(14087),SeparateY:t(89936),Group:t(60758),Image:t(71289),Sprite:t(13759),StaticBody:t(72624),StaticGroup:t(71464),Tilemap:t(55173),World:t(82248)};h=c(!1,h,d),p.exports=h},96602:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,d,t):t.layer.callbacks[t.index]?!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,d,t):!0};p.exports=S},36294:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){d<0?(t.blocked.none=!1,t.blocked.left=!0):d>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=d,t.updateCenter(),t.bounce.x===0?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x};p.exports=S},67013:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){d<0?(t.blocked.none=!1,t.blocked.up=!0):d>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=d,t.updateCenter(),t.bounce.y===0?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y};p.exports=S},40012:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(21329),c=t(53442),h=t(2483),r=function(n,e,s,a,i,o,l){var f=a.left,u=a.top,v=a.right,m=a.bottom,x=s.faceLeft||s.faceRight,g=s.faceTop||s.faceBottom;if(l||(x=!0,g=!0),!x&&!g)return!1;var y=0,T=0,C=0,E=1;if(e.deltaAbsX()>e.deltaAbsY()?C=-1:e.deltaAbsX(){/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(36294),c=function(h,r,n,e,s,a){var i=0,o=r.faceLeft,l=r.faceRight,f=r.collideLeft,u=r.collideRight;return a||(o=!0,l=!0,f=!0,u=!0),h.deltaX()<0&&u&&h.checkCollision.left?l&&h.x0&&f&&h.checkCollision.right&&o&&h.right>n&&(i=h.right-n,i>s&&(i=0)),i!==0&&(h.customSeparateX?h.overlapX=i:d(h,i)),i};p.exports=c},53442:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(67013),c=function(h,r,n,e,s,a){var i=0,o=r.faceTop,l=r.faceBottom,f=r.collideUp,u=r.collideDown;return a||(o=!0,l=!0,f=!0,u=!0),h.deltaY()<0&&u&&h.checkCollision.up?l&&h.y0&&f&&h.checkCollision.down&&o&&h.bottom>n&&(i=h.bottom-n,i>s&&(i=0)),i!==0&&(h.customSeparateY?h.overlapY=i:d(h,i)),i};p.exports=c},2483:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){return!(d.right<=t.left||d.bottom<=t.top||d.position.x>=t.right||d.position.y>=t.bottom)};p.exports=S},55173:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d={ProcessTileCallbacks:t(96602),ProcessTileSeparationX:t(36294),ProcessTileSeparationY:t(67013),SeparateTile:t(40012),TileCheckX:t(21329),TileCheckY:t(53442),TileIntersectsBody:t(2483)};p.exports=d},44563:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={Arcade:t(27064),Matter:t(3875)}},68174:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(26099),h=new d({initialize:function(){this.boundsCenter=new c,this.centerDiff=new c},parseBody:function(r){if(r=r.hasOwnProperty("body")?r.body:r,!r.hasOwnProperty("bounds")||!r.hasOwnProperty("centerOfMass"))return!1;var n=this.boundsCenter,e=this.centerDiff,s=r.bounds.max.x-r.bounds.min.x,a=r.bounds.max.y-r.bounds.min.y,i=s*r.centerOfMass.x,o=a*r.centerOfMass.y;return n.set(s/2,a/2),e.set(i-n.x,o-n.y),!0},getTopLeft:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,a=this.centerDiff;return new c(n+s.x+a.x,e+s.y+a.y)}return!1},getTopCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,a=this.centerDiff;return new c(n+a.x,e+s.y+a.y)}return!1},getTopRight:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,a=this.centerDiff;return new c(n-(s.x-a.x),e+s.y+a.y)}return!1},getLeftCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,a=this.centerDiff;return new c(n+s.x+a.x,e+a.y)}return!1},getCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.centerDiff;return new c(n+s.x,e+s.y)}return!1},getRightCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,a=this.centerDiff;return new c(n-(s.x-a.x),e+a.y)}return!1},getBottomLeft:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,a=this.centerDiff;return new c(n+s.x+a.x,e-(s.y-a.y))}return!1},getBottomCenter:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,a=this.centerDiff;return new c(n+a.x,e-(s.y-a.y))}return!1},getBottomRight:function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),this.parseBody(r)){var s=this.boundsCenter,a=this.centerDiff;return new c(n-(s.x-a.x),e-(s.y-a.y))}return!1}});p.exports=h},19933:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(6790);d.Body=t(22562),d.Composite=t(69351),d.World=t(4372),d.Collision=t(52284),d.Detector=t(81388),d.Pairs=t(99561),d.Pair=t(4506),d.Query=t(73296),d.Resolver=t(66272),d.Constraint=t(48140),d.Common=t(53402),d.Engine=t(48413),d.Events=t(35810),d.Sleeping=t(53614),d.Plugin=t(73832),d.Bodies=t(66280),d.Composites=t(74116),d.Axes=t(66615),d.Bounds=t(15647),d.Svg=t(74058),d.Vector=t(31725),d.Vertices=t(41598),d.World.add=d.Composite.add,d.World.remove=d.Composite.remove,d.World.addComposite=d.Composite.addComposite,d.World.addBody=d.Composite.addBody,d.World.addConstraint=d.Composite.addConstraint,d.World.clear=d.Composite.clear,p.exports=d},28137:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(66280),c=t(83419),h=t(74116),r=t(48140),n=t(74058),e=t(75803),s=t(23181),a=t(34803),i=t(73834),o=t(19496),l=t(85791),f=t(98713),u=t(41598),v=new c({initialize:function(x){this.world=x,this.scene=x.scene,this.sys=x.scene.sys},rectangle:function(m,x,g,y,T){var C=d.rectangle(m,x,g,y,T);return this.world.add(C),C},trapezoid:function(m,x,g,y,T,C){var E=d.trapezoid(m,x,g,y,T,C);return this.world.add(E),E},circle:function(m,x,g,y,T){var C=d.circle(m,x,g,y,T);return this.world.add(C),C},polygon:function(m,x,g,y,T){var C=d.polygon(m,x,g,y,T);return this.world.add(C),C},fromVertices:function(m,x,g,y,T,C,E){typeof g=="string"&&(g=u.fromPath(g));var M=d.fromVertices(m,x,g,y,T,C,E);return this.world.add(M),M},fromPhysicsEditor:function(m,x,g,y,T){T===void 0&&(T=!0);var C=o.parseBody(m,x,g,y);return T&&!this.world.has(C)&&this.world.add(C),C},fromSVG:function(m,x,g,y,T,C){y===void 0&&(y=1),T===void 0&&(T={}),C===void 0&&(C=!0);for(var E=g.getElementsByTagName("path"),M=[],P=0;P{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(31884),c=t(95540),h=t(26099);function r(e){return!!e.get&&typeof e.get=="function"||!!e.set&&typeof e.set=="function"}var n=function(e,s,a,i){a===void 0&&(a={}),i===void 0&&(i=!0);var o=s.x,l=s.y;s.body={temp:!0,position:{x:o,y:l}};var f=[d.Bounce,d.Collision,d.Force,d.Friction,d.Gravity,d.Mass,d.Sensor,d.SetBody,d.Sleep,d.Static,d.Transform,d.Velocity];if(f.forEach(function(v){for(var m in v)r(v[m])?Object.defineProperty(s,m,{get:v[m].get,set:v[m].set}):Object.defineProperty(s,m,{value:v[m]})}),s.world=e,s._tempVec2=new h(o,l),a.hasOwnProperty("type")&&a.type==="body")s.setExistingBody(a,i);else{var u=c(a,"shape",null);u||(u="rectangle"),a.addToWorld=i,s.setBody(u,a)}return s};p.exports=n},23181:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(31884),h=t(95643),r=t(95540),n=t(88571),e=t(72699),s=t(26099),a=new d({Extends:n,Mixins:[c.Bounce,c.Collision,c.Force,c.Friction,c.Gravity,c.Mass,c.Sensor,c.SetBody,c.Sleep,c.Static,c.Transform,c.Velocity,e],initialize:function(o,l,f,u,v,m){h.call(this,o.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(u,v),this.setSizeToFrame(),this.setOrigin(),this.world=o,this._tempVec2=new s(l,f);var x=r(m,"shape",null);x?this.setBody(x,m):this.setRectangle(this.width,this.height,m),this.setPosition(l,f),this.initPipeline(),this.initPostPipeline(!0)}});p.exports=a},42045:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(60461),c=t(66615),h=t(66280),r=t(22562),n=t(68174),e=t(15647),s=t(83419),a=t(52284),i=t(53402),o=t(69351),l=t(74116),f=t(48140),u=t(81388),v=t(20339),m=t(28137),x=t(95540),g=t(35154),y=t(46975),T=t(4506),C=t(99561),E=t(37277),M=t(73296),P=t(66272),A=t(44594),F=t(74058),L=t(31725),B=t(41598),N=t(68243);i.setDecomp(t(55973));var U=new s({initialize:function(I){this.scene=I,this.systems=I.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=r,this.composite=o,this.collision=a,this.detector=u,this.pair=T,this.pairs=C,this.query=M,this.resolver=P,this.constraint=f,this.bodies=h,this.composites=l,this.axes=c,this.bounds=e,this.svg=F,this.vector=L,this.vertices=B,this.verts=B,this._tempVec2=L.create(),P._restingThresh=g(this.config,"restingThresh",4),P._restingThreshTangent=g(this.config,"restingThreshTangent",6),P._positionDampen=g(this.config,"positionDampen",.9),P._positionWarming=g(this.config,"positionWarming",.8),P._frictionNormalMultiplier=g(this.config,"frictionNormalMultiplier",5),I.sys.events.once(A.BOOT,this.boot,this),I.sys.events.on(A.START,this.start,this)},boot:function(){this.world=new N(this.scene,this.config),this.add=new m(this.world),this.bodyBounds=new n,this.systems.events.once(A.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new N(this.scene,this.config),this.add=new m(this.world));var z=this.systems.events;z.on(A.UPDATE,this.world.update,this.world),z.on(A.POST_UPDATE,this.world.postUpdate,this.world),z.once(A.SHUTDOWN,this.shutdown,this)},getConfig:function(){var z=this.systems.game.config.physics,I=this.systems.settings.physics,G=y(x(I,"matter",{}),x(z,"matter",{}));return G},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(z,I){this.world.step(z,I)},containsPoint:function(z,I,G){z=this.getMatterBodies(z);var O=L.create(I,G),b=M.point(z,O);return b.length>0},intersectPoint:function(z,I,G){G=this.getMatterBodies(G);var O=L.create(z,I),b=[],D=M.point(G,O);return D.forEach(function(X){b.indexOf(X)===-1&&b.push(X)}),b},intersectRect:function(z,I,G,O,b,D){b===void 0&&(b=!1),D=this.getMatterBodies(D);var X={min:{x:z,y:I},max:{x:z+G,y:I+O}},V=[],W=M.region(D,X,b);return W.forEach(function(K){V.indexOf(K)===-1&&V.push(K)}),V},intersectRay:function(z,I,G,O,b,D){b===void 0&&(b=1),D=this.getMatterBodies(D);for(var X=[],V=M.ray(D,L.create(z,I),L.create(G,O),b),W=0;W{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(9674),c=t(83419),h=t(31884),r=t(95643),n=t(95540),e=t(72699),s=t(68287),a=t(26099),i=new c({Extends:s,Mixins:[h.Bounce,h.Collision,h.Force,h.Friction,h.Gravity,h.Mass,h.Sensor,h.SetBody,h.Sleep,h.Static,h.Transform,h.Velocity,e],initialize:function(l,f,u,v,m,x){r.call(this,l.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new d(this),this.setTexture(v,m),this.setSizeToFrame(),this.setOrigin(),this.world=l,this._tempVec2=new a(f,u);var g=n(x,"shape",null);g?this.setBody(g,x):this.setRectangle(this.width,this.height,x),this.setPosition(f,u),this.initPipeline(),this.initPostPipeline(!0)}});p.exports=i},73834:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(66280),c=t(22562),h=t(83419),r=t(31884),n=t(62644),e=t(50792),s=t(95540),a=t(97022),i=t(41598),o=new h({Extends:e,Mixins:[r.Bounce,r.Collision,r.Friction,r.Gravity,r.Mass,r.Sensor,r.Sleep,r.Static],initialize:function(f,u,v){e.call(this),this.tile=u,this.world=f,u.physics.matterBody&&u.physics.matterBody.destroy(),u.physics.matterBody=this;var m=s(v,"body",null),x=s(v,"addToWorld",!0);if(m)this.setBody(m,x);else{var g=u.getCollisionGroup(),y=s(g,"objects",[]);y.length>0?this.setFromTileCollision(v):this.setFromTileRectangle(v)}if(u.flipX||u.flipY){var T={x:u.getCenterX(),y:u.getCenterY()},C=u.flipX?-1:1,E=u.flipY?-1:1;c.scale(m,C,E,T)}},setFromTileRectangle:function(l){l===void 0&&(l={}),a(l,"isStatic")||(l.isStatic=!0),a(l,"addToWorld")||(l.addToWorld=!0);var f=this.tile.getBounds(),u=f.x+f.width/2,v=f.y+f.height/2,m=d.rectangle(u,v,f.width,f.height,l);return this.setBody(m,l.addToWorld),this},setFromTileCollision:function(l){l===void 0&&(l={}),a(l,"isStatic")||(l.isStatic=!0),a(l,"addToWorld")||(l.addToWorld=!0);for(var f=this.tile.tilemapLayer.scaleX,u=this.tile.tilemapLayer.scaleY,v=this.tile.getLeft(),m=this.tile.getTop(),x=this.tile.getCollisionGroup(),g=s(x,"objects",[]),y=[],T=0;T1){var z=n(l);z.parts=y,this.setBody(c.create(z),z.addToWorld)}return this},setBody:function(l,f){return f===void 0&&(f=!0),this.body&&this.removeBody(),this.body=l,this.body.gameObject=this,f&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0,this.removeAllListeners()}});p.exports=o},19496:(p,S,t)=>{/** * @author Joachim Grill * @author Richard Davey * @copyright 2018 CodeAndWeb GmbH * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(66280),c=t(22562),h=t(53402),r=t(95540),n=t(41598),e={parseBody:function(s,a,i,o){o===void 0&&(o={});for(var l=r(i,"fixtures",[]),f=[],u=0;u{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(66280),c=t(22562),h={parseBody:function(r,n,e,s){s===void 0&&(s={});var a,i=e.vertices;if(i.length===1)s.vertices=i[0],a=c.create(s),d.flagCoincidentParts(a.parts);else{for(var o=[],l=0;l{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(15647),c=t(83419),h=t(69351),r=t(48140),n=t(81388),e=t(1121),s=t(8214),a=t(46975),i=t(53614),o=t(26099),l=t(41598),f=new c({initialize:function(v,m,x){x===void 0&&(x={});var g={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.scene=v,this.world=m,this.camera=null,this.pointer=null,this.active=!0,this.position=new o,this.body=null,this.part=null,this.constraint=r.create(a(x,g)),this.world.on(e.BEFORE_UPDATE,this.update,this),v.sys.input.on(s.POINTER_DOWN,this.onDown,this),v.sys.input.on(s.POINTER_UP,this.onUp,this)},onDown:function(u){this.pointer||(this.pointer=u,this.camera=u.camera)},onUp:function(u){u===this.pointer&&(this.pointer=null)},getBody:function(u){var v=this.position,m=this.constraint;this.camera.getWorldPoint(u.x,u.y,v);for(var x=h.allBodies(this.world.localWorld),g=0;g1?1:0,y=g;y{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(66280),c=t(22562),h=t(83419),r=t(53402),n=t(69351),e=t(48413),s=t(50792),a=t(1121),i=t(95540),o=t(35154),l=t(22562),f=t(35810),u=t(73834),v=t(4372),m=t(13037),x=t(31725),g=new h({Extends:s,initialize:function(T,C){s.call(this),this.scene=T,this.engine=e.create(C),this.localWorld=this.engine.world;var E=o(C,"gravity",null);E?this.setGravity(E.x,E.y,E.scale):E===!1&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=o(C,"enabled",!0),this.getDelta=o(C,"getDelta",this.update60Hz);var M=i(C,"runner",{}),P=i(M,"fps",!1);P&&(M.delta=1e3/i(M,"fps",60)),this.runner=m.create(M),this.autoUpdate=o(C,"autoUpdate",!0);var A=o(C,"debug",!1);if(this.drawDebug=typeof A=="object"?!0:A,this.debugGraphic,this.debugConfig={showAxes:i(A,"showAxes",!1),showAngleIndicator:i(A,"showAngleIndicator",!1),angleColor:i(A,"angleColor",15208787),showBroadphase:i(A,"showBroadphase",!1),broadphaseColor:i(A,"broadphaseColor",16757760),showBounds:i(A,"showBounds",!1),boundsColor:i(A,"boundsColor",16777215),showVelocity:i(A,"showVelocity",!1),velocityColor:i(A,"velocityColor",44783),showCollisions:i(A,"showCollisions",!1),collisionColor:i(A,"collisionColor",16094476),showSeparations:i(A,"showSeparations",!1),separationColor:i(A,"separationColor",16753920),showBody:i(A,"showBody",!0),showStaticBody:i(A,"showStaticBody",!0),showInternalEdges:i(A,"showInternalEdges",!1),renderFill:i(A,"renderFill",!1),renderLine:i(A,"renderLine",!0),fillColor:i(A,"fillColor",1075465),fillOpacity:i(A,"fillOpacity",1),lineColor:i(A,"lineColor",2678297),lineOpacity:i(A,"lineOpacity",1),lineThickness:i(A,"lineThickness",1),staticFillColor:i(A,"staticFillColor",857979),staticLineColor:i(A,"staticLineColor",1255396),showSleeping:i(A,"showSleeping",!1),staticBodySleepOpacity:i(A,"staticBodySleepOpacity",.7),sleepFillColor:i(A,"sleepFillColor",4605510),sleepLineColor:i(A,"sleepLineColor",10066585),showSensors:i(A,"showSensors",!0),sensorFillColor:i(A,"sensorFillColor",857979),sensorLineColor:i(A,"sensorLineColor",1255396),showPositions:i(A,"showPositions",!0),positionSize:i(A,"positionSize",4),positionColor:i(A,"positionColor",14697178),showJoint:i(A,"showJoint",!0),jointColor:i(A,"jointColor",14737474),jointLineOpacity:i(A,"jointLineOpacity",1),jointLineThickness:i(A,"jointLineThickness",2),pinSize:i(A,"pinSize",4),pinColor:i(A,"pinColor",4382944),springColor:i(A,"springColor",14697184),anchorColor:i(A,"anchorColor",15724527),anchorSize:i(A,"anchorSize",4),showConvexHulls:i(A,"showConvexHulls",!1),hullColor:i(A,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),i(C,"setBounds",!1)){var F=C.setBounds;if(typeof F=="boolean")this.setBounds();else{var L=i(F,"x",0),B=i(F,"y",0),N=i(F,"width",T.sys.scale.width),U=i(F,"height",T.sys.scale.height),z=i(F,"thickness",64),I=i(F,"left",!0),G=i(F,"right",!0),O=i(F,"top",!0),b=i(F,"bottom",!0);this.setBounds(L,B,N,U,z,I,G,O,b)}}},setCompositeRenderStyle:function(y){var T=y.bodies,C=y.constraints,E=y.composites,M,P,A;for(M=0;M0&&M.map(function(F){P=F.bodyA,A=F.bodyB,P.gameObject&&P.gameObject.emit("collide",P,A,F),A.gameObject&&A.gameObject.emit("collide",A,P,F),f.trigger(P,"onCollide",{pair:F}),f.trigger(A,"onCollide",{pair:F}),P.onCollideCallback&&P.onCollideCallback(F),A.onCollideCallback&&A.onCollideCallback(F),P.onCollideWith[A.id]&&P.onCollideWith[A.id](A,F),A.onCollideWith[P.id]&&A.onCollideWith[P.id](P,F)}),y.emit(a.COLLISION_START,E,P,A)}),f.on(T,"collisionActive",function(E){var M=E.pairs,P,A;M.length>0&&M.map(function(F){P=F.bodyA,A=F.bodyB,P.gameObject&&P.gameObject.emit("collideActive",P,A,F),A.gameObject&&A.gameObject.emit("collideActive",A,P,F),f.trigger(P,"onCollideActive",{pair:F}),f.trigger(A,"onCollideActive",{pair:F}),P.onCollideActiveCallback&&P.onCollideActiveCallback(F),A.onCollideActiveCallback&&A.onCollideActiveCallback(F)}),y.emit(a.COLLISION_ACTIVE,E,P,A)}),f.on(T,"collisionEnd",function(E){var M=E.pairs,P,A;M.length>0&&M.map(function(F){P=F.bodyA,A=F.bodyB,P.gameObject&&P.gameObject.emit("collideEnd",P,A,F),A.gameObject&&A.gameObject.emit("collideEnd",A,P,F),f.trigger(P,"onCollideEnd",{pair:F}),f.trigger(A,"onCollideEnd",{pair:F}),P.onCollideEndCallback&&P.onCollideEndCallback(F),A.onCollideEndCallback&&A.onCollideEndCallback(F)}),y.emit(a.COLLISION_END,E,P,A)})},setBounds:function(y,T,C,E,M,P,A,F,L){return y===void 0&&(y=0),T===void 0&&(T=0),C===void 0&&(C=this.scene.sys.scale.width),E===void 0&&(E=this.scene.sys.scale.height),M===void 0&&(M=64),P===void 0&&(P=!0),A===void 0&&(A=!0),F===void 0&&(F=!0),L===void 0&&(L=!0),this.updateWall(P,"left",y-M,T-M,M,E+M*2),this.updateWall(A,"right",y+C,T-M,M,E+M*2),this.updateWall(F,"top",y,T-M,C,M),this.updateWall(L,"bottom",y,T+E,C,M),this},updateWall:function(y,T,C,E,M,P){var A=this.walls[T];y?(A&&v.remove(this.localWorld,A),C+=M/2,E+=P/2,this.walls[T]=this.create(C,E,M,P,{isStatic:!0,friction:0,frictionStatic:0})):(A&&v.remove(this.localWorld,A),this.walls[T]=null)},createDebugGraphic:function(){var y=this.scene.sys.add.graphics({x:0,y:0});return y.setDepth(Number.MAX_VALUE),this.debugGraphic=y,this.drawDebug=!0,y},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(y,T,C){return y===void 0&&(y=0),T===void 0&&(T=1),C===void 0&&(C=.001),this.localWorld.gravity.x=y,this.localWorld.gravity.y=T,this.localWorld.gravity.scale=C,this},create:function(y,T,C,E,M){var P=d.rectangle(y,T,C,E,M);return v.add(this.localWorld,P),P},add:function(y){return v.add(this.localWorld,y),this},remove:function(y,T){Array.isArray(y)||(y=[y]);for(var C=0;CMath.max(m._maxFrameDelta,C.maxFrameTime))&&(A=C.frameDelta||m._frameDeltaFallback),C.frameDeltaSmoothing){C.frameDeltaHistory.push(A),C.frameDeltaHistory=C.frameDeltaHistory.slice(-C.frameDeltaHistorySize);var F=C.frameDeltaHistory.slice(0).sort(),L=C.frameDeltaHistory.slice(F.length*m._smoothingLowerBound,F.length*m._smoothingUpperBound),B=m._mean(L);A=B||A}C.frameDeltaSnapping&&(A=1e3/Math.round(1e3/A)),C.frameDelta=A,C.timeLastTick=y,C.timeBuffer+=C.frameDelta,C.timeBuffer=r.clamp(C.timeBuffer,0,C.frameDelta+M*m._timeBufferMargin),C.lastUpdatesDeferred=0;for(var N=C.maxUpdates||Math.ceil(C.maxFrameTime/M),U=r.now();M>0&&C.timeBuffer>=M*m._timeBufferMargin;){e.update(T,M),C.timeBuffer-=M,P+=1;var z=r.now()-E,I=r.now()-U,G=z+m._elapsedNextEstimate*I/P;if(P>=N||G>C.maxFrameTime){C.lastUpdatesDeferred=Math.round(Math.max(0,C.timeBuffer/M-m._timeBufferMargin));break}}}},step:function(y){e.update(this.engine,y)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(y){var T=y.hasOwnProperty("body")?y.body:y;return n.get(this.localWorld,T.id,T.type)!==null},getAllBodies:function(){return n.allBodies(this.localWorld)},getAllConstraints:function(){return n.allConstraints(this.localWorld)},getAllComposites:function(){return n.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var y=this.debugConfig,T=this.engine,C=this.debugGraphic,E=n.allBodies(this.localWorld);this.debugGraphic.clear(),y.showBroadphase&&T.broadphase.controller&&this.renderGrid(T.broadphase,C,y.broadphaseColor,.5),y.showBounds&&this.renderBodyBounds(E,C,y.boundsColor,.5),(y.showBody||y.showStaticBody)&&this.renderBodies(E),y.showJoint&&this.renderJoints(),(y.showAxes||y.showAngleIndicator)&&this.renderBodyAxes(E,C,y.showAxes,y.angleColor,.5),y.showVelocity&&this.renderBodyVelocity(E,C,y.velocityColor,1,2),y.showSeparations&&this.renderSeparations(T.pairs.list,C,y.separationColor),y.showCollisions&&this.renderCollisions(T.pairs.list,C,y.collisionColor)}},renderGrid:function(y,T,C,E){T.lineStyle(1,C,E);for(var M=r.keys(y.buckets),P=0;P0){var N=B[0].vertex.x,U=B[0].vertex.y;M.contactCount===2&&(N=(B[0].vertex.x+B[1].vertex.x)/2,U=(B[0].vertex.y+B[1].vertex.y)/2),L.bodyB===L.supports[0].body||L.bodyA.isStatic?T.lineBetween(N-L.normal.x*8,U-L.normal.y*8,N,U):T.lineBetween(N+L.normal.x*8,U+L.normal.y*8,N,U)}}return this},renderBodyBounds:function(y,T,C,E){T.lineStyle(1,C,E);for(var M=0;M1?1:0;L1?1:0;B1?1:0;B1&&this.renderConvexHull(O,T,I,X)}}},renderBody:function(y,T,C,E,M,P,A,F){E===void 0&&(E=null),M===void 0&&(M=null),P===void 0&&(P=1),A===void 0&&(A=null),F===void 0&&(F=null);for(var L=this.debugConfig,B=L.sensorFillColor,N=L.sensorLineColor,U=y.parts,z=U.length,I=z>1?1:0;I1){var A=y.vertices;T.lineStyle(E,C),T.beginPath(),T.moveTo(A[0].x,A[0].y);for(var F=1;F0&&(T.fillStyle(A),T.fillCircle(U.x,U.y,F),T.fillCircle(z.x,z.y,F)),this},resetCollisionIDs:function(){return c._nextCollidingGroupId=1,c._nextNonCollidingGroupId=-1,c._nextCategory=1,this},shutdown:function(){f.off(this.engine),this.removeAllListeners(),v.clear(this.localWorld,!1),e.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});p.exports=g},70410:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={setBounce:function(t){return this.body.restitution=t,this}};p.exports=S},66968:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var d=0;if(!Array.isArray(t))d=t;else for(var c=0;c{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(22562),c={applyForce:function(h){return this._tempVec2.set(this.body.position.x,this.body.position.y),d.applyForce(this.body,this._tempVec2,h),this},applyForceFrom:function(h,r){return d.applyForce(this.body,h,r),this},thrust:function(h){var r=this.body.angle;return this._tempVec2.set(h*Math.cos(r),h*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(h){var r=this.body.angle-Math.PI/2;return this._tempVec2.set(h*Math.cos(r),h*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(h){var r=this.body.angle+Math.PI/2;return this._tempVec2.set(h*Math.cos(r),h*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(h){var r=this.body.angle-Math.PI;return this._tempVec2.set(h*Math.cos(r),h*Math.sin(r)),d.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};p.exports=c},5436:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={setFriction:function(t,d,c){return this.body.friction=t,d!==void 0&&(this.body.frictionAir=d),c!==void 0&&(this.body.frictionStatic=c),this},setFrictionAir:function(t){return this.body.frictionAir=t,this},setFrictionStatic:function(t){return this.body.frictionStatic=t,this}};p.exports=S},39858:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}};p.exports=S},37302:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(22562),c=t(26099),h={setMass:function(r){return d.setMass(this.body,r),this},setDensity:function(r){return d.setDensity(this.body,r),this},centerOfMass:{get:function(){return new c(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};p.exports=h},39132:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}};p.exports=S},57772:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(66280),c=t(22562),h=t(43855),r=t(95540),n=t(19496),e=t(85791),s=t(41598),a={setRectangle:function(i,o,l){return this.setBody({type:"rectangle",width:i,height:o},l)},setCircle:function(i,o){return this.setBody({type:"circle",radius:i},o)},setPolygon:function(i,o,l){return this.setBody({type:"polygon",sides:o,radius:i},l)},setTrapezoid:function(i,o,l,f){return this.setBody({type:"trapezoid",width:i,height:o,slope:l},f)},setExistingBody:function(i,o){o===void 0&&(o=!0),this.body&&this.world.remove(this.body,!0),this.body=i;for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(1121),c=t(53614),h=t(35810),r={setToSleep:function(){return c.set(this.body,!0),this},setAwake:function(){return c.set(this.body,!1),this},setSleepThreshold:function(n){return n===void 0&&(n=60),this.body.sleepThreshold=n,this},setSleepEvents:function(n,e){return this.setSleepStartEvent(n),this.setSleepEndEvent(e),this},setSleepStartEvent:function(n){if(n){var e=this.world;h.on(this.body,"sleepStart",function(s){e.emit(d.SLEEP_START,s,this)})}else h.off(this.body,"sleepStart");return this},setSleepEndEvent:function(n){if(n){var e=this.world;h.on(this.body,"sleepEnd",function(s){e.emit(d.SLEEP_END,s,this)})}else h.off(this.body,"sleepEnd");return this}};p.exports=r},90556:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(22562),c={setStatic:function(h){return d.setStatic(this.body,h),this},isStatic:function(){return this.body.isStatic}};p.exports=c},85436:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(22562),c=t(36383),h=t(86554),r=t(30954),n=4,e={x:{get:function(){return this.body.position.x},set:function(s){this._tempVec2.set(s,this.y),d.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(s){this._tempVec2.set(this.x,s),d.setPosition(this.body,this._tempVec2)}},scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(s){this.setScale(s,s)}},scaleX:{get:function(){return this._scaleX},set:function(s){var a=1/this._scaleX,i=1/this._scaleY;this._scaleX=s,this._scaleX===0?this.renderFlags&=~n:this.renderFlags|=n,d.scale(this.body,a,i),d.scale(this.body,s,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(s){var a=1/this._scaleX,i=1/this._scaleY;this._scaleY=s,this._scaleY===0?this.renderFlags&=~n:this.renderFlags|=n,d.scale(this.body,a,i),d.scale(this.body,this._scaleX,s)}},angle:{get:function(){return r(this.body.angle*c.RAD_TO_DEG)},set:function(s){this.rotation=r(s)*c.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(s){this._rotation=h(s),d.setAngle(this.body,this._rotation)}},setPosition:function(s,a){return s===void 0&&(s=0),a===void 0&&(a=s),this._tempVec2.set(s,a),d.setPosition(this.body,this._tempVec2),this},setRotation:function(s){return s===void 0&&(s=0),this._rotation=h(s),d.setAngle(this.body,s),this},setFixedRotation:function(){return d.setInertia(this.body,1/0),this},setAngle:function(s){return s===void 0&&(s=0),this.angle=s,d.setAngle(this.body,this.rotation),this},setScale:function(s,a,i){s===void 0&&(s=1),a===void 0&&(a=s);var o=1/this._scaleX,l=1/this._scaleY;return this._scaleX=s,this._scaleY=a,d.scale(this.body,o,l,i),d.scale(this.body,s,a,i),this}};p.exports=e},42081:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(22562),c={setVelocityX:function(h){return this._tempVec2.set(h,this.body.velocity.y),d.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(h){return this._tempVec2.set(this.body.velocity.x,h),d.setVelocity(this.body,this._tempVec2),this},setVelocity:function(h,r){return this._tempVec2.set(h,r),d.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return d.getVelocity(this.body)},setAngularVelocity:function(h){return d.setAngularVelocity(this.body,h),this},getAngularVelocity:function(){return d.getAngularVelocity(this.body)},setAngularSpeed:function(h){return d.setAngularSpeed(this.body,h),this},getAngularSpeed:function(){return d.getAngularSpeed(this.body)}};p.exports=c},31884:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={Bounce:t(70410),Collision:t(66968),Force:t(51607),Friction:t(5436),Gravity:t(39858),Mass:t(37302),Sensor:t(39132),SetBody:t(57772),Sleep:t(38083),Static:t(90556),Transform:t(85436),Velocity:t(42081)}},85608:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="afteradd"},1213:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="afterremove"},25968:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="afterupdate"},67205:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="beforeadd"},39438:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="beforeremove"},44823:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="beforeupdate"},92593:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="collisionactive"},60128:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="collisionend"},76861:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="collisionstart"},92362:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="dragend"},76408:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="drag"},93971:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="dragstart"},5656:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="pause"},47861:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="resume"},79099:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="sleepend"},35906:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="sleepstart"},1121:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={AFTER_ADD:t(85608),AFTER_REMOVE:t(1213),AFTER_UPDATE:t(25968),BEFORE_ADD:t(67205),BEFORE_REMOVE:t(39438),BEFORE_UPDATE:t(44823),COLLISION_ACTIVE:t(92593),COLLISION_END:t(60128),COLLISION_START:t(76861),DRAG_END:t(92362),DRAG:t(76408),DRAG_START:t(93971),PAUSE:t(5656),RESUME:t(47861),SLEEP_END:t(79099),SLEEP_START:t(35906)}},3875:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={BodyBounds:t(68174),Components:t(31884),Events:t(1121),Factory:t(28137),MatterGameObject:t(75803),Image:t(23181),Matter:t(19933),MatterPhysics:t(42045),PolyDecomp:t(55973),Sprite:t(34803),TileBody:t(73834),PhysicsEditorParser:t(19496),PhysicsJSONParser:t(85791),PointerConstraint:t(98713),World:t(68243)}},22562:(p,S,t)=>{var d={};p.exports=d;var c=t(41598),h=t(31725),r=t(53614),n=t(53402),e=t(15647),s=t(66615);(function(){d._timeCorrection=!0,d._inertiaScale=4,d._nextCollidingGroupId=1,d._nextNonCollidingGroupId=-1,d._nextCategory=1,d._baseDelta=16.666666666666668,d.create=function(i){var o={id:n.nextId(),type:"body",label:"Body",parts:[],plugin:{},attractors:i.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:16.666666666666668,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:{}};!i.hasOwnProperty("position")&&i.hasOwnProperty("vertices")?i.position=c.centre(i.vertices):i.hasOwnProperty("vertices")||(o.vertices=c.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var l=n.extend(o,i);return a(l,i),l.setOnCollideWith=function(f,u){return u?this.onCollideWith[f.id]=u:delete this.onCollideWith[f.id],this},l},d.nextGroup=function(i){return i?d._nextNonCollidingGroupId--:d._nextCollidingGroupId++},d.nextCategory=function(){return d._nextCategory=d._nextCategory<<1,d._nextCategory};var a=function(i,o){if(o=o||{},d.set(i,{bounds:i.bounds||e.create(i.vertices),positionPrev:i.positionPrev||h.clone(i.position),anglePrev:i.anglePrev||i.angle,vertices:i.vertices,parts:i.parts||[i],isStatic:i.isStatic,isSleeping:i.isSleeping,parent:i.parent||i}),c.rotate(i.vertices,i.angle,i.position),s.rotate(i.axes,i.angle),e.update(i.bounds,i.vertices,i.velocity),d.set(i,{axes:o.axes||i.axes,area:o.area||i.area,mass:o.mass||i.mass,inertia:o.inertia||i.inertia}),i.parts.length===1){var l=i.bounds,f=i.centerOfMass,u=i.centerOffset,v=l.max.x-l.min.x,m=l.max.y-l.min.y;f.x=-(l.min.x-i.position.x)/v,f.y=-(l.min.y-i.position.y)/m,u.x=v*f.x,u.y=m*f.y}};d.set=function(i,o,l){var f;typeof o=="string"&&(f=o,o={},o[f]=l);for(f in o)if(Object.prototype.hasOwnProperty.call(o,f))switch(l=o[f],f){case"isStatic":d.setStatic(i,l);break;case"isSleeping":r.set(i,l);break;case"mass":d.setMass(i,l);break;case"density":d.setDensity(i,l);break;case"inertia":d.setInertia(i,l);break;case"vertices":d.setVertices(i,l);break;case"position":d.setPosition(i,l);break;case"angle":d.setAngle(i,l);break;case"velocity":d.setVelocity(i,l);break;case"angularVelocity":d.setAngularVelocity(i,l);break;case"speed":d.setSpeed(i,l);break;case"angularSpeed":d.setAngularSpeed(i,l);break;case"parts":d.setParts(i,l);break;case"centre":d.setCentre(i,l);break;default:i[f]=l}},d.setStatic=function(i,o){for(var l=0;l0&&h.rotateAbout(v.position,f,i.position,v.position)}},d.setVelocity=function(i,o){var l=i.deltaTime/d._baseDelta;i.positionPrev.x=i.position.x-o.x*l,i.positionPrev.y=i.position.y-o.y*l,i.velocity.x=(i.position.x-i.positionPrev.x)/l,i.velocity.y=(i.position.y-i.positionPrev.y)/l,i.speed=h.magnitude(i.velocity)},d.getVelocity=function(i){var o=d._baseDelta/i.deltaTime;return{x:(i.position.x-i.positionPrev.x)*o,y:(i.position.y-i.positionPrev.y)*o}},d.getSpeed=function(i){return h.magnitude(d.getVelocity(i))},d.setSpeed=function(i,o){d.setVelocity(i,h.mult(h.normalise(d.getVelocity(i)),o))},d.setAngularVelocity=function(i,o){var l=i.deltaTime/d._baseDelta;i.anglePrev=i.angle-o*l,i.angularVelocity=(i.angle-i.anglePrev)/l,i.angularSpeed=Math.abs(i.angularVelocity)},d.getAngularVelocity=function(i){return(i.angle-i.anglePrev)*d._baseDelta/i.deltaTime},d.getAngularSpeed=function(i){return Math.abs(d.getAngularVelocity(i))},d.setAngularSpeed=function(i,o){d.setAngularVelocity(i,n.sign(d.getAngularVelocity(i))*o)},d.translate=function(i,o,l){d.setPosition(i,h.add(i.position,o),l)},d.rotate=function(i,o,l,f){if(!l)d.setAngle(i,i.angle+o,f);else{var u=Math.cos(o),v=Math.sin(o),m=i.position.x-l.x,x=i.position.y-l.y;d.setPosition(i,{x:l.x+(m*u-x*v),y:l.y+(m*v+x*u)},f),d.setAngle(i,i.angle+o,f)}},d.scale=function(i,o,l,f){var u=0,v=0;f=f||i.position;for(var m=i.inertia===1/0,x=0;x0&&(u+=g.area,v+=g.inertia),g.position.x=f.x+(g.position.x-f.x)*o,g.position.y=f.y+(g.position.y-f.y)*l,e.update(g.bounds,g.vertices,i.velocity)}i.parts.length>1&&(i.area=u,i.isStatic||(d.setMass(i,i.density*u),d.setInertia(i,v))),i.circleRadius&&(o===l?i.circleRadius*=o:i.circleRadius=null),m&&d.setInertia(i,1/0)},d.update=function(i,o){o=(typeof o<"u"?o:16.666666666666668)*i.timeScale;var l=o*o,f=d._timeCorrection?o/(i.deltaTime||o):1,u=1-i.frictionAir*(o/n._baseDelta),v=(i.position.x-i.positionPrev.x)*f,m=(i.position.y-i.positionPrev.y)*f;i.velocity.x=v*u+i.force.x/i.mass*l,i.velocity.y=m*u+i.force.y/i.mass*l,i.positionPrev.x=i.position.x,i.positionPrev.y=i.position.y,i.position.x+=i.velocity.x,i.position.y+=i.velocity.y,i.deltaTime=o,i.angularVelocity=(i.angle-i.anglePrev)*u*f+i.torque/i.inertia*l,i.anglePrev=i.angle,i.angle+=i.angularVelocity,i.speed=h.magnitude(i.velocity),i.angularSpeed=Math.abs(i.angularVelocity);for(var x=0;x0&&(g.position.x+=i.velocity.x,g.position.y+=i.velocity.y),i.angularVelocity!==0&&(c.rotate(g.vertices,i.angularVelocity,i.position),s.rotate(g.axes,i.angularVelocity),x>0&&h.rotateAbout(g.position,i.angularVelocity,i.position,g.position)),e.update(g.bounds,g.vertices,i.velocity)}},d.updateVelocities=function(i){var o=d._baseDelta/i.deltaTime,l=i.velocity;l.x=(i.position.x-i.positionPrev.x)*o,l.y=(i.position.y-i.positionPrev.y)*o,i.speed=Math.sqrt(l.x*l.x+l.y*l.y),i.angularVelocity=(i.angle-i.anglePrev)*o,i.angularSpeed=Math.abs(i.angularVelocity)},d.applyForce=function(i,o,l){var f={x:o.x-i.position.x,y:o.y-i.position.y};i.force.x+=l.x,i.force.y+=l.y,i.torque+=f.x*l.y-f.y*l.x},d._totalProperties=function(i){for(var o={mass:0,area:0,inertia:0,centre:{x:0,y:0}},l=i.parts.length===1?0:1;l{var d={};p.exports=d;var c=t(35810),h=t(53402),r=t(15647),n=t(22562);(function(){d.create=function(e){return h.extend({id:h.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},wrapBounds:null,cache:{allBodies:null,allConstraints:null,allComposites:null}},e)},d.setModified=function(e,s,a,i){if(c.trigger(e,"compositeModified",e),e.isModified=s,s&&e.cache&&(e.cache.allBodies=null,e.cache.allConstraints=null,e.cache.allComposites=null),a&&e.parent&&d.setModified(e.parent,s,a,i),i)for(var o=0;o{var d={};p.exports=d;var c=t(69351);(function(){d.create=c.create,d.add=c.add,d.remove=c.remove,d.clear=c.clear,d.addComposite=c.addComposite,d.addBody=c.addBody,d.addConstraint=c.addConstraint})()},52284:(p,S,t)=>{var d={};p.exports=d;var c=t(41598),h=t(4506);(function(){var r=[],n={overlap:0,axis:null},e={overlap:0,axis:null};d.create=function(s,a){return{pair:null,collided:!1,bodyA:s,bodyB:a,parentA:s.parent,parentB:a.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[null,null],supportCount:0}},d.collides=function(s,a,i){if(d._overlapAxes(n,s.vertices,a.vertices,s.axes),n.overlap<=0||(d._overlapAxes(e,a.vertices,s.vertices,a.axes),e.overlap<=0))return null;var o=i&&i.table[h.id(s,a)],l;o?l=o.collision:(l=d.create(s,a),l.collided=!0,l.bodyA=s.id=0&&(T=-T,C=-C),u.x=T,u.y=C,v.x=-C,v.y=T,m.x=T*g,m.y=C*g,l.depth=g;var P=d._findSupports(s,a,u,1),A=0;if(c.contains(s.vertices,P[0])&&(x[A++]=P[0]),c.contains(s.vertices,P[1])&&(x[A++]=P[1]),A<2){var F=d._findSupports(a,s,u,-1);c.contains(a.vertices,F[0])&&(x[A++]=F[0]),A<2&&c.contains(a.vertices,F[1])&&(x[A++]=F[1])}return A===0&&(x[A++]=P[0]),l.supportCount=A,l},d._overlapAxes=function(s,a,i,o){var l=a.length,f=i.length,u=a[0].x,v=a[0].y,m=i[0].x,x=i[0].y,g=o.length,y=Number.MAX_VALUE,T=0,C,E,M,P,A,F;for(A=0;AI?I=P:PG?G=P:P{var S={};p.exports=S,function(){S.create=function(t){return{vertex:t,normalImpulse:0,tangentImpulse:0}}}()},81388:(p,S,t)=>{var d={};p.exports=d;var c=t(53402),h=t(52284);(function(){d.create=function(r){var n={bodies:[],collisions:[],pairs:null};return c.extend(n,r)},d.setBodies=function(r,n){r.bodies=n.slice(0)},d.clear=function(r){r.bodies=[],r.collisions=[]},d.collisions=function(r){var n=r.pairs,e=r.bodies,s=e.length,a=d.canCollide,i=h.collides,o=r.collisions,l=0,f,u;for(e.sort(d._compareBoundsX),f=0;fx)break;if(!(gP.max.y)&&!(T&&(M.isStatic||M.isSleeping))&&a(v.collisionFilter,M.collisionFilter)){var A=M.parts.length;if(E&&A===1){var F=i(v,M,n);F&&(o[l++]=F)}else for(var L=C>1?1:0,B=A>1?1:0,N=L;NP.max.x||m.max.xP.max.y)){var F=i(U,I,n);F&&(o[l++]=F)}}}}}return o.length!==l&&(o.length=l),o},d.canCollide=function(r,n){return r.group===n.group&&r.group!==0?r.group>0:(r.mask&n.category)!==0&&(n.mask&r.category)!==0},d._compareBoundsX=function(r,n){return r.bounds.min.x-n.bounds.min.x}})()},4506:(p,S,t)=>{var d={};p.exports=d;var c=t(43424);(function(){d.create=function(h,r){var n=h.bodyA,e=h.bodyB,s={id:d.id(n,e),bodyA:n,bodyB:e,collision:h,contacts:[c.create(),c.create()],contactCount:0,separation:0,isActive:!0,isSensor:n.isSensor||e.isSensor,timeCreated:r,timeUpdated:r,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return d.update(s,h,r),s},d.update=function(h,r,n){var e=r.supports,s=r.supportCount,a=h.contacts,i=r.parentA,o=r.parentB;h.isActive=!0,h.timeUpdated=n,h.collision=r,h.separation=r.depth,h.inverseMass=i.inverseMass+o.inverseMass,h.friction=i.frictiono.frictionStatic?i.frictionStatic:o.frictionStatic,h.restitution=i.restitution>o.restitution?i.restitution:o.restitution,h.slop=i.slop>o.slop?i.slop:o.slop,h.contactCount=s,r.pair=h;var l=e[0],f=a[0],u=e[1],v=a[1];(v.vertex===l||f.vertex===u)&&(a[1]=f,a[0]=f=v,v=a[1]),f.vertex=l,v.vertex=u},d.setActive=function(h,r,n){r?(h.isActive=!0,h.timeUpdated=n):(h.isActive=!1,h.contactCount=0)},d.id=function(h,r){return h.id{var d={};p.exports=d;var c=t(4506),h=t(53402);(function(){d.create=function(r){return h.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},r)},d.update=function(r,n,e){var s=c.update,a=c.create,i=c.setActive,o=r.table,l=r.list,f=l.length,u=f,v=r.collisionStart,m=r.collisionEnd,x=r.collisionActive,g=n.length,y=0,T=0,C=0,E,M,P;for(P=0;P=e?l[u++]=M:(i(M,!1,e),M.collision.bodyA.sleepCounter>0&&M.collision.bodyB.sleepCounter>0?l[u++]=M:(m[T++]=M,delete o[M.id]));l.length!==u&&(l.length=u),v.length!==y&&(v.length=y),m.length!==T&&(m.length=T),x.length!==C&&(x.length=C)},d.clear=function(r){return r.table={},r.list.length=0,r.collisionStart.length=0,r.collisionActive.length=0,r.collisionEnd.length=0,r}})()},73296:(p,S,t)=>{var d={};p.exports=d;var c=t(31725),h=t(52284),r=t(15647),n=t(66280),e=t(41598);(function(){d.collides=function(s,a){for(var i=[],o=a.length,l=s.bounds,f=h.collides,u=r.overlaps,v=0;v{var d={};p.exports=d;var c=t(41598),h=t(53402),r=t(15647);(function(){d._restingThresh=2,d._restingThreshTangent=Math.sqrt(6),d._positionDampen=.9,d._positionWarming=.8,d._frictionNormalMultiplier=5,d._frictionMaxStatic=Number.MAX_VALUE,d.preSolvePosition=function(n){var e,s,a,i=n.length;for(e=0;ept?(x=st>0?st:-st,m=T.friction*(st>0?1:-1)*i,m<-x?m=-x:m>x&&(m=x)):(m=st,x=u);var xt=Z*A-Q*P,dt=j*A-$*P,vt=I/(B+E.inverseInertia*xt*xt+M.inverseInertia*dt*dt),yt=(1+T.restitution)*tt*vt;if(m*=vt,tt0&&(W.normalImpulse=0),yt=W.normalImpulse-Pt}if(st<-l||st>l)W.tangentImpulse=0;else{var mt=W.tangentImpulse;W.tangentImpulse+=m,W.tangentImpulse<-x&&(W.tangentImpulse=-x),W.tangentImpulse>x&&(W.tangentImpulse=x),m=W.tangentImpulse-mt}var Tt=P*yt+F*m,Ct=A*yt+L*m;E.isStatic||E.isSleeping||(E.positionPrev.x+=Tt*E.inverseMass,E.positionPrev.y+=Ct*E.inverseMass,E.anglePrev+=(Z*Ct-Q*Tt)*E.inverseInertia),M.isStatic||M.isSleeping||(M.positionPrev.x-=Tt*M.inverseMass,M.positionPrev.y-=Ct*M.inverseMass,M.anglePrev-=(j*Ct-$*Tt)*M.inverseInertia)}}}}})()},48140:(p,S,t)=>{var d={};p.exports=d;var c=t(41598),h=t(31725),r=t(53614),n=t(15647),e=t(66615),s=t(53402);(function(){d._warming=.4,d._torqueDampen=1,d._minLength=1e-6,d.create=function(a){var i=a;i.bodyA&&!i.pointA&&(i.pointA={x:0,y:0}),i.bodyB&&!i.pointB&&(i.pointB={x:0,y:0});var o=i.bodyA?h.add(i.bodyA.position,i.pointA):i.pointA,l=i.bodyB?h.add(i.bodyB.position,i.pointB):i.pointB,f=h.magnitude(h.sub(o,l));i.length=typeof i.length<"u"?i.length:f,i.id=i.id||s.nextId(),i.label=i.label||"Constraint",i.type="constraint",i.stiffness=i.stiffness||(i.length>0?1:.7),i.damping=i.damping||0,i.angularStiffness=i.angularStiffness||0,i.angleA=i.bodyA?i.bodyA.angle:i.angleA,i.angleB=i.bodyB?i.bodyB.angle:i.angleB,i.plugin={};var u={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return i.length===0&&i.stiffness>.1?(u.type="pin",u.anchors=!1):i.stiffness<.9&&(u.type="spring"),i.render=s.extend(u,i.render),i},d.preSolveAll=function(a){for(var i=0;i=1||a.length===0,C=T?a.stiffness*i:a.stiffness*i*i,E=a.damping*i,M=h.mult(x,y*C),P=(o?o.inverseMass:0)+(l?l.inverseMass:0),A=(o?o.inverseInertia:0)+(l?l.inverseInertia:0),F=P+A,L,B,N,U,z;if(E>0){var I=h.create();N=h.div(x,g),z=h.sub(l&&h.sub(l.position,l.positionPrev)||I,o&&h.sub(o.position,o.positionPrev)||I),U=h.dot(N,z)}o&&!o.isStatic&&(B=o.inverseMass/P,o.constraintImpulse.x-=M.x*B,o.constraintImpulse.y-=M.y*B,o.position.x-=M.x*B,o.position.y-=M.y*B,E>0&&(o.positionPrev.x-=E*N.x*U*B,o.positionPrev.y-=E*N.y*U*B),L=h.cross(f,M)/F*d._torqueDampen*o.inverseInertia*(1-a.angularStiffness),o.constraintImpulse.angle-=L,o.angle-=L),l&&!l.isStatic&&(B=l.inverseMass/P,l.constraintImpulse.x+=M.x*B,l.constraintImpulse.y+=M.y*B,l.position.x+=M.x*B,l.position.y+=M.y*B,E>0&&(l.positionPrev.x+=E*N.x*U*B,l.positionPrev.y+=E*N.y*U*B),L=h.cross(u,M)/F*d._torqueDampen*l.inverseInertia*(1-a.angularStiffness),l.constraintImpulse.angle+=L,l.angle+=L)}}},d.postSolveAll=function(a){for(var i=0;i0&&(u.position.x+=l.x,u.position.y+=l.y),l.angle!==0&&(c.rotate(u.vertices,l.angle,o.position),e.rotate(u.axes,l.angle),f>0&&h.rotateAbout(u.position,l.angle,o.position,u.position)),n.update(u.bounds,u.vertices,o.velocity)}l.angle*=d._warming,l.x*=d._warming,l.y*=d._warming}}},d.pointAWorld=function(a){return{x:(a.bodyA?a.bodyA.position.x:0)+(a.pointA?a.pointA.x:0),y:(a.bodyA?a.bodyA.position.y:0)+(a.pointA?a.pointA.y:0)}},d.pointBWorld=function(a){return{x:(a.bodyB?a.bodyB.position.x:0)+(a.pointB?a.pointB.x:0),y:(a.bodyB?a.bodyB.position.y:0)+(a.pointB?a.pointB.y:0)}},d.currentLength=function(a){var i=(a.bodyA?a.bodyA.position.x:0)+(a.pointA?a.pointA.x:0),o=(a.bodyA?a.bodyA.position.y:0)+(a.pointA?a.pointA.y:0),l=(a.bodyB?a.bodyB.position.x:0)+(a.pointB?a.pointB.x:0),f=(a.bodyB?a.bodyB.position.y:0)+(a.pointB?a.pointB.y:0),u=i-l,v=o-f;return Math.sqrt(u*u+v*v)}})()},53402:(p,S,t)=>{var d={};p.exports=d,function(){d._baseDelta=16.666666666666668,d._nextId=0,d._seed=0,d._nowStartTime=+new Date,d._warnedOnce={},d._decomp=null,d.extend=function(h,r){var n,e;typeof r=="boolean"?(n=2,e=r):(n=1,e=!0);for(var s=n;s0;r--){var n=Math.floor(d.random()*(r+1)),e=h[r];h[r]=h[n],h[n]=e}return h},d.choose=function(h){return h[Math.floor(d.random()*h.length)]},d.isElement=function(h){return typeof HTMLElement<"u"?h instanceof HTMLElement:!!(h&&h.nodeType&&h.nodeName)},d.isArray=function(h){return Object.prototype.toString.call(h)==="[object Array]"},d.isFunction=function(h){return typeof h=="function"},d.isPlainObject=function(h){return typeof h=="object"&&h.constructor===Object},d.isString=function(h){return toString.call(h)==="[object String]"},d.clamp=function(h,r,n){return hn?n:h},d.sign=function(h){return h<0?-1:1},d.now=function(){if(typeof window<"u"&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return Date.now?Date.now():new Date-d._nowStartTime},d.random=function(h,r){return h=typeof h<"u"?h:0,r=typeof r<"u"?r:1,h+c()*(r-h)};var c=function(){return d._seed=(d._seed*9301+49297)%233280,d._seed/233280};d.colorToNumber=function(h){return h=h.replace("#",""),h.length==3&&(h=h.charAt(0)+h.charAt(0)+h.charAt(1)+h.charAt(1)+h.charAt(2)+h.charAt(2)),parseInt(h,16)},d.logLevel=1,d.log=function(){console&&d.logLevel>0&&d.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},d.info=function(){console&&d.logLevel>0&&d.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},d.warn=function(){console&&d.logLevel>0&&d.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},d.warnOnce=function(){var h=Array.prototype.slice.call(arguments).join(" ");d._warnedOnce[h]||(d.warn(h),d._warnedOnce[h]=!0)},d.deprecated=function(h,r,n){h[r]=d.chain(function(){d.warnOnce("🔅 deprecated 🔅",n)},h[r])},d.nextId=function(){return d._nextId++},d.indexOf=function(h,r){if(h.indexOf)return h.indexOf(r);for(var n=0;n{var d={};p.exports=d;var c=t(53614),h=t(66272),r=t(81388),n=t(99561),e=t(35810),s=t(69351),a=t(48140),i=t(53402),o=t(22562);(function(){d._deltaMax=16.666666666666668,d.create=function(l){l=l||{};var f={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}},u=i.extend(f,l);return u.world=l.world||s.create({label:"World"}),u.pairs=l.pairs||n.create(),u.detector=l.detector||r.create(),u.detector.pairs=u.pairs,u.grid={buckets:[]},u.world.gravity=u.gravity,u.broadphase=u.grid,u.metrics={},u},d.update=function(l,f){var u=i.now(),v=l.world,m=l.detector,x=l.pairs,g=l.timing,y=g.timestamp,T;f>d._deltaMax&&i.warnOnce("Matter.Engine.update: delta argument is recommended to be less than or equal to",d._deltaMax.toFixed(3),"ms."),f=typeof f<"u"?f:i._baseDelta,f*=g.timeScale,g.timestamp+=f,g.lastDelta=f;var C={timestamp:g.timestamp,delta:f};e.trigger(l,"beforeUpdate",C);var E=s.allBodies(v),M=s.allConstraints(v),P=s.allComposites(v);for(v.isModified&&(r.setBodies(m,E),s.setModified(v,!1,!1,!0)),l.enableSleeping&&c.update(E,f),d._bodiesApplyGravity(E,l.gravity),d.wrap(E,P),d.attractors(E),f>0&&d._bodiesUpdate(E,f),e.trigger(l,"beforeSolve",C),a.preSolveAll(E),T=0;T0&&e.trigger(l,"collisionStart",{pairs:x.collisionStart,timestamp:g.timestamp,delta:f});var F=i.clamp(20/l.positionIterations,0,1);for(h.preSolvePosition(x.list),T=0;T0&&e.trigger(l,"collisionActive",{pairs:x.collisionActive,timestamp:g.timestamp,delta:f}),x.collisionEnd.length>0&&e.trigger(l,"collisionEnd",{pairs:x.collisionEnd,timestamp:g.timestamp,delta:f}),d._bodiesClearForces(E),e.trigger(l,"afterUpdate",C),l.timing.lastElapsed=i.now()-u,l},d.merge=function(l,f){if(i.extend(l,f),f.world){l.world=f.world,d.clear(l);for(var u=s.allBodies(l.world),v=0;v0)for(var m=0;m{var d={};p.exports=d;var c=t(53402);(function(){d.on=function(h,r,n){for(var e=r.split(" "),s,a=0;a0){n||(n={}),e=r.split(" ");for(var l=0;l{var d={};p.exports=d;var c=t(73832),h=t(53402);(function(){d.name="matter-js",d.version="0.20.0",d.uses=[],d.used=[],d.use=function(){c.use(d,Array.prototype.slice.call(arguments))},d.before=function(r,n){return r=r.replace(/^Matter./,""),h.chainPathBefore(d,r,n)},d.after=function(r,n){return r=r.replace(/^Matter./,""),h.chainPathAfter(d,r,n)}})()},73832:(p,S,t)=>{var d={};p.exports=d;var c=t(53402);(function(){d._registry={},d.register=function(h){if(d.isPlugin(h)||c.warn("Plugin.register:",d.toString(h),"does not implement all required fields."),h.name in d._registry){var r=d._registry[h.name],n=d.versionParse(h.version).number,e=d.versionParse(r.version).number;n>e?(c.warn("Plugin.register:",d.toString(r),"was upgraded to",d.toString(h)),d._registry[h.name]=h):n-1},d.isFor=function(h,r){var n=h.for&&d.dependencyParse(h.for);return!h.for||r.name===n.name&&d.versionSatisfies(r.version,n.range)},d.use=function(h,r){if(h.uses=(h.uses||[]).concat(r||[]),h.uses.length===0){c.warn("Plugin.use:",d.toString(h),"does not specify any dependencies to install.");return}for(var n=d.dependencies(h),e=c.topologicalSort(n),s=[],a=0;a0&&!i.silent&&c.info(s.join(" "))},d.dependencies=function(h,r){var n=d.dependencyParse(h),e=n.name;if(r=r||{},!(e in r)){h=d.resolve(h)||h,r[e]=c.map(h.uses||[],function(a){d.isPlugin(a)&&d.register(a);var i=d.dependencyParse(a),o=d.resolve(a);return o&&!d.versionSatisfies(o.version,i.range)?(c.warn("Plugin.dependencies:",d.toString(o),"does not satisfy",d.toString(i),"used by",d.toString(n)+"."),o._warned=!0,h._warned=!0):o||(c.warn("Plugin.dependencies:",d.toString(a),"used by",d.toString(n),"could not be resolved."),h._warned=!0),i.name});for(var s=0;s=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;r.test(h)||c.warn("Plugin.versionParse:",h,"is not a valid version or range.");var n=r.exec(h),e=Number(n[4]),s=Number(n[5]),a=Number(n[6]);return{isRange:!!(n[1]||n[2]),version:n[3],range:h,operator:n[1]||n[2]||"",major:e,minor:s,patch:a,parts:[e,s,a],prerelease:n[7],number:e*1e8+s*1e4+a}},d.versionSatisfies=function(h,r){r=r||"*";var n=d.versionParse(r),e=d.versionParse(h);if(n.isRange){if(n.operator==="*"||h==="*")return!0;if(n.operator===">")return e.number>n.number;if(n.operator===">=")return e.number>=n.number;if(n.operator==="~")return e.major===n.major&&e.minor===n.minor&&e.patch>=n.patch;if(n.operator==="^")return n.major>0?e.major===n.major&&e.number>=n.number:n.minor>0?e.minor===n.minor&&e.patch>=n.patch:e.patch===n.patch}return h===r||h==="*"}})()},13037:(p,S,t)=>{var d={};p.exports=d;var c=t(35810),h=t(48413),r=t(53402);(function(){d._maxFrameDelta=66.66666666666667,d._frameDeltaFallback=16.666666666666668,d._timeBufferMargin=1.5,d._elapsedNextEstimate=1,d._smoothingLowerBound=.1,d._smoothingUpperBound=.9,d.create=function(e){var s={delta:16.666666666666668,frameDelta:null,frameDeltaSmoothing:!0,frameDeltaSnapping:!0,frameDeltaHistory:[],frameDeltaHistorySize:100,frameRequestId:null,timeBuffer:0,timeLastTick:null,maxUpdates:null,maxFrameTime:33.333333333333336,lastUpdatesDeferred:0,enabled:!0},a=r.extend(s,e);return a.fps=0,a},d.run=function(e,s){return e.timeBuffer=d._frameDeltaFallback,function a(i){e.frameRequestId=d._onNextFrame(e,a),i&&e.enabled&&d.tick(e,s,i)}(),e},d.tick=function(e,s,a){var i=r.now(),o=e.delta,l=0,f=a-e.timeLastTick;if((!f||!e.timeLastTick||f>Math.max(d._maxFrameDelta,e.maxFrameTime))&&(f=e.frameDelta||d._frameDeltaFallback),e.frameDeltaSmoothing){e.frameDeltaHistory.push(f),e.frameDeltaHistory=e.frameDeltaHistory.slice(-e.frameDeltaHistorySize);var u=e.frameDeltaHistory.slice(0).sort(),v=e.frameDeltaHistory.slice(u.length*d._smoothingLowerBound,u.length*d._smoothingUpperBound),m=n(v);f=m||f}e.frameDeltaSnapping&&(f=1e3/Math.round(1e3/f)),e.frameDelta=f,e.timeLastTick=a,e.timeBuffer+=e.frameDelta,e.timeBuffer=r.clamp(e.timeBuffer,0,e.frameDelta+o*d._timeBufferMargin),e.lastUpdatesDeferred=0;var x=e.maxUpdates||Math.ceil(e.maxFrameTime/o),g={timestamp:s.timing.timestamp};c.trigger(e,"beforeTick",g),c.trigger(e,"tick",g);for(var y=r.now();o>0&&e.timeBuffer>=o*d._timeBufferMargin;){c.trigger(e,"beforeUpdate",g),h.update(s,o),c.trigger(e,"afterUpdate",g),e.timeBuffer-=o,l+=1;var T=r.now()-i,C=r.now()-y,E=T+d._elapsedNextEstimate*C/l;if(l>=x||E>e.maxFrameTime){e.lastUpdatesDeferred=Math.round(Math.max(0,e.timeBuffer/o-d._timeBufferMargin));break}}s.timing.lastUpdatesPerFrame=l,c.trigger(e,"afterTick",g),e.frameDeltaHistory.length>=100&&(e.lastUpdatesDeferred&&Math.round(e.frameDelta/o)>x?r.warnOnce("Matter.Runner: runner reached runner.maxUpdates, see docs."):e.lastUpdatesDeferred&&r.warnOnce("Matter.Runner: runner reached runner.maxFrameTime, see docs."),typeof e.isFixed<"u"&&r.warnOnce("Matter.Runner: runner.isFixed is now redundant, see docs."),(e.deltaMin||e.deltaMax)&&r.warnOnce("Matter.Runner: runner.deltaMin and runner.deltaMax were removed, see docs."),e.fps!==0&&r.warnOnce("Matter.Runner: runner.fps was replaced by runner.delta, see docs."))},d.stop=function(e){d._cancelNextFrame(e)},d._onNextFrame=function(e,s){if(typeof window<"u"&&window.requestAnimationFrame)e.frameRequestId=window.requestAnimationFrame(s);else throw new Error("Matter.Runner: missing required global window.requestAnimationFrame.");return e.frameRequestId},d._cancelNextFrame=function(e){if(typeof window<"u"&&window.cancelAnimationFrame)window.cancelAnimationFrame(e.frameRequestId);else throw new Error("Matter.Runner: missing required global window.cancelAnimationFrame.")};var n=function(e){for(var s=0,a=e.length,i=0;i{var d={};p.exports=d;var c=t(22562),h=t(35810),r=t(53402);(function(){d._motionWakeThreshold=.18,d._motionSleepThreshold=.08,d._minBias=.9,d.update=function(n,e){for(var s=e/r._baseDelta,a=d._motionSleepThreshold,i=0;i0&&o.motion=o.sleepThreshold/s&&d.set(o,!0)):o.sleepCounter>0&&(o.sleepCounter-=1)}},d.afterCollisions=function(n){for(var e=d._motionSleepThreshold,s=0;se&&d.set(f,!1)}}}},d.set=function(n,e){var s=n.isSleeping;e?(n.isSleeping=!0,n.sleepCounter=n.sleepThreshold,n.positionImpulse.x=0,n.positionImpulse.y=0,n.positionPrev.x=n.position.x,n.positionPrev.y=n.position.y,n.anglePrev=n.angle,n.speed=0,n.angularSpeed=0,n.motion=0,s||h.trigger(n,"sleepStart")):(n.isSleeping=!1,n.sleepCounter=0,s&&h.trigger(n,"sleepEnd"))}})()},66280:(p,S,t)=>{var d={};p.exports=d;var c=t(41598),h=t(53402),r=t(22562),n=t(15647),e=t(31725);(function(){d.rectangle=function(s,a,i,o,l){l=l||{};var f={label:"Rectangle Body",position:{x:s,y:a},vertices:c.fromPath("L 0 0 L "+i+" 0 L "+i+" "+o+" L 0 "+o)};if(l.chamfer){var u=l.chamfer;f.vertices=c.chamfer(f.vertices,u.radius,u.quality,u.qualityMin,u.qualityMax),delete l.chamfer}return r.create(h.extend({},f,l))},d.trapezoid=function(s,a,i,o,l,f){f=f||{},l>=1&&h.warn("Bodies.trapezoid: slope parameter must be < 1."),l*=.5;var u=(1-l*2)*i,v=i*l,m=v+u,x=m+v,g;l<.5?g="L 0 0 L "+v+" "+-o+" L "+m+" "+-o+" L "+x+" 0":g="L 0 0 L "+m+" "+-o+" L "+x+" 0";var y={label:"Trapezoid Body",position:{x:s,y:a},vertices:c.fromPath(g)};if(f.chamfer){var T=f.chamfer;y.vertices=c.chamfer(y.vertices,T.radius,T.quality,T.qualityMin,T.qualityMax),delete f.chamfer}return r.create(h.extend({},y,f))},d.circle=function(s,a,i,o,l){o=o||{};var f={label:"Circle Body",circleRadius:i};l=l||25;var u=Math.ceil(Math.max(10,Math.min(l,i)));return u%2===1&&(u+=1),d.polygon(s,a,u,i,h.extend({},f,o))},d.polygon=function(s,a,i,o,l){if(l=l||{},i<3)return d.circle(s,a,o,l);for(var f=2*Math.PI/i,u="",v=f*.5,m=0;m0&&c.area(z)1?(g=r.create(h.extend({parts:y.slice(0)},o)),r.setPosition(g,{x:s,y:a}),g):y[0]},d.flagCoincidentParts=function(s,a){a===void 0&&(a=5);for(var i=0;i{var d={};p.exports=d;var c=t(69351),h=t(48140),r=t(53402),n=t(22562),e=t(66280);(function(){d.stack=function(s,a,i,o,l,f,u){for(var v=c.create({label:"Stack"}),m=s,x=a,g,y=0,T=0;TC&&(C=P),n.translate(M,{x:A*.5,y:P*.5}),m=M.bounds.max.x+l,c.addBody(v,M),g=M,y+=1}else m+=l}x+=C+f,m=s}return v},d.chain=function(s,a,i,o,l,f){for(var u=s.bodies,v=1;v0)for(v=0;v0&&(g=f[v-1+(u-1)*a],c.addConstraint(s,h.create(r.extend({bodyA:g,bodyB:x},l)))),o&&vC)){g=C-g;var M=g,P=i-1-g;if(!(xP)){T===1&&n.translate(y,{x:(x+(i%2===1?1:-1))*E,y:0});var A=y?x*E:0;return u(s+A+x*l,m,x,g,y,T)}}})},d.newtonsCradle=function(s,a,i,o,l){for(var f=c.create({label:"Newtons Cradle"}),u=0;u{var d={};p.exports=d;var c=t(31725),h=t(53402);(function(){d.fromVertices=function(r){for(var n={},e=0;e{var S={};p.exports=S,function(){S.create=function(t){var d={min:{x:0,y:0},max:{x:0,y:0}};return t&&S.update(d,t),d},S.update=function(t,d,c){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var h=0;ht.max.x&&(t.max.x=r.x),r.xt.max.y&&(t.max.y=r.y),r.y0?t.max.x+=c.x:t.min.x+=c.x,c.y>0?t.max.y+=c.y:t.min.y+=c.y)},S.contains=function(t,d){return d.x>=t.min.x&&d.x<=t.max.x&&d.y>=t.min.y&&d.y<=t.max.y},S.overlaps=function(t,d){return t.min.x<=d.max.x&&t.max.x>=d.min.x&&t.max.y>=d.min.y&&t.min.y<=d.max.y},S.translate=function(t,d){t.min.x+=d.x,t.max.x+=d.x,t.min.y+=d.y,t.max.y+=d.y},S.shift=function(t,d){var c=t.max.x-t.min.x,h=t.max.y-t.min.y;t.min.x=d.x,t.max.x=d.x+c,t.min.y=d.y,t.max.y=d.y+h},S.wrap=function(t,d,c){var h=null,r=null;if(typeof d.min.x<"u"&&typeof d.max.x<"u"&&(t.min.x>d.max.x?h=d.min.x-t.max.x:t.max.xd.max.y?r=d.min.y-t.max.y:t.max.y{var d={};p.exports=d,t(15647);var c=t(53402);(function(){d.pathToVertices=function(h,r){typeof window<"u"&&!("SVGPathSeg"in window)&&c.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var n,e,s,a,i,o,l,f,u,v,m=[],x,g,y=0,T=0,C=0;r=r||15;var E=function(P,A,F){var L=F%2===1&&F>1;if(!u||P!=u.x||A!=u.y){u&&L?(x=u.x,g=u.y):(x=0,g=0);var B={x:x+P,y:g+A};(L||!u)&&(u=B),m.push(B),T=x+P,C=g+A}},M=function(P){var A=P.pathSegTypeAsLetter.toUpperCase();if(A!=="Z"){switch(A){case"M":case"L":case"T":case"C":case"S":case"Q":T=P.x,C=P.y;break;case"H":T=P.x;break;case"V":C=P.y;break}E(T,C,P.pathSegType)}};for(d._svgPathToAbsolute(h),s=h.getTotalLength(),o=[],n=0;n{var S={};p.exports=S,function(){S.create=function(t,d){return{x:t||0,y:d||0}},S.clone=function(t){return{x:t.x,y:t.y}},S.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},S.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},S.rotate=function(t,d,c){var h=Math.cos(d),r=Math.sin(d);c||(c={});var n=t.x*h-t.y*r;return c.y=t.x*r+t.y*h,c.x=n,c},S.rotateAbout=function(t,d,c,h){var r=Math.cos(d),n=Math.sin(d);h||(h={});var e=c.x+((t.x-c.x)*r-(t.y-c.y)*n);return h.y=c.y+((t.x-c.x)*n+(t.y-c.y)*r),h.x=e,h},S.normalise=function(t){var d=S.magnitude(t);return d===0?{x:0,y:0}:{x:t.x/d,y:t.y/d}},S.dot=function(t,d){return t.x*d.x+t.y*d.y},S.cross=function(t,d){return t.x*d.y-t.y*d.x},S.cross3=function(t,d,c){return(d.x-t.x)*(c.y-t.y)-(d.y-t.y)*(c.x-t.x)},S.add=function(t,d,c){return c||(c={}),c.x=t.x+d.x,c.y=t.y+d.y,c},S.sub=function(t,d,c){return c||(c={}),c.x=t.x-d.x,c.y=t.y-d.y,c},S.mult=function(t,d){return{x:t.x*d,y:t.y*d}},S.div=function(t,d){return{x:t.x/d,y:t.y/d}},S.perp=function(t,d){return d=d===!0?-1:1,{x:d*-t.y,y:d*t.x}},S.neg=function(t){return{x:-t.x,y:-t.y}},S.angle=function(t,d){return Math.atan2(d.y-t.y,d.x-t.x)},S._temp=[S.create(),S.create(),S.create(),S.create(),S.create(),S.create()]}()},41598:(p,S,t)=>{var d={};p.exports=d;var c=t(31725),h=t(53402);(function(){d.create=function(r,n){for(var e=[],s=0;s0)return!1;i=o}return!0},d.scale=function(r,n,e,s){if(n===1&&e===1)return r;s=s||d.centre(r);for(var a,i,o=0;o=0?o-1:r.length-1],f=r[o],u=r[(o+1)%r.length],v=n[o0&&(n|=2),n===3)return!1;return n!==0?!0:null},d.hull=function(r){var n=[],e=[],s,a;for(r=r.slice(0),r.sort(function(i,o){var l=i.x-o.x;return l!==0?l:i.y-o.y}),a=0;a=2&&c.cross3(e[e.length-2],e[e.length-1],s)<=0;)e.pop();e.push(s)}for(a=r.length-1;a>=0;a-=1){for(s=r[a];n.length>=2&&c.cross3(n[n.length-2],n[n.length-1],s)<=0;)n.pop();n.push(s)}return n.pop(),e.pop(),n.concat(e)}})()},55973:p=>{/** * @author Stefan Hedman (http://steffe.se) * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={decomp:M,quickDecomp:L,isSimple:A,removeCollinearPoints:B,removeDuplicatePoints:N,makeCCW:u};function S(I,G,O){O=O||0;var b=[0,0],D,X,V,W,K,Z,Q;return D=I[1][1]-I[0][1],X=I[0][0]-I[1][0],V=D*I[0][0]+X*I[0][1],W=G[1][1]-G[0][1],K=G[0][0]-G[1][0],Z=W*G[0][0]+K*G[0][1],Q=D*K-W*X,U(Q,0,O)||(b[0]=(K*V-X*Z)/Q,b[1]=(D*Z-W*V)/Q),b}function t(I,G,O,b){var D=G[0]-I[0],X=G[1]-I[1],V=b[0]-O[0],W=b[1]-O[1];if(V*X-W*D===0)return!1;var K=(D*(O[1]-I[1])+X*(I[0]-O[0]))/(V*X-W*D),Z=(V*(I[1]-O[1])+W*(O[0]-I[0]))/(W*D-V*X);return K>=0&&K<=1&&Z>=0&&Z<=1}function d(I,G,O){return(G[0]-I[0])*(O[1]-I[1])-(O[0]-I[0])*(G[1]-I[1])}function c(I,G,O){return d(I,G,O)>0}function h(I,G,O){return d(I,G,O)>=0}function r(I,G,O){return d(I,G,O)<0}function n(I,G,O){return d(I,G,O)<=0}var e=[],s=[];function a(I,G,O,b){if(b){var D=e,X=s;D[0]=G[0]-I[0],D[1]=G[1]-I[1],X[0]=O[0]-G[0],X[1]=O[1]-G[1];var V=D[0]*X[0]+D[1]*X[1],W=Math.sqrt(D[0]*D[0]+D[1]*D[1]),K=Math.sqrt(X[0]*X[0]+X[1]*X[1]),Z=Math.acos(V/(W*K));return ZO[G][0])&&(G=b);return c(o(I,G-1),o(I,G),o(I,G+1))?!1:(v(I),!0)}function v(I){for(var G=[],O=I.length,b=0;b!==O;b++)G.push(I.pop());for(var b=0;b!==O;b++)I[b]=G[b]}function m(I,G){return r(o(I,G-1),o(I,G),o(I,G+1))}var x=[],g=[];function y(I,G,O){var b,D,X=x,V=g;if(h(o(I,G+1),o(I,G),o(I,O))&&n(o(I,G-1),o(I,G),o(I,O)))return!1;D=i(o(I,G),o(I,O));for(var W=0;W!==I.length;++W)if(!((W+1)%I.length===G||W===G)&&h(o(I,G),o(I,O),o(I,W+1))&&n(o(I,G),o(I,O),o(I,W))&&(X[0]=o(I,G),X[1]=o(I,O),V[0]=o(I,W),V[1]=o(I,W+1),b=S(X,V),i(o(I,G),b)0?P(I,G):[I]}function P(I,G){if(G.length===0)return[I];if(G instanceof Array&&G.length&&G[0]instanceof Array&&G[0].length===2&&G[0][0]instanceof Array){for(var O=[I],b=0;bX)return console.warn("quickDecomp: max level ("+X+") reached."),G;for(var nt=0;ntet&&(et+=I.length),_=Number.MAX_VALUE,et3&&b>=0;--b)a(o(I,b-1),o(I,b),o(I,b+1),G)&&(I.splice(b%I.length,1),O++);return O}function N(I,G){for(var O=I.length-1;O>=1;--O)for(var b=I[O],D=O-1;D>=0;--D)if(z(b,I[D],G)){I.splice(O,1);continue}}function U(I,G,O){return O=O||0,Math.abs(I-G)<=O}function z(I,G,O){return U(I[0],G[0],O)&&U(I[1],G[1],O)}},52018:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */var d=t(83419),c=new d({initialize:function(r){this.pluginManager=r,this.game=r.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});p.exports=c},42363:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={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"]};p.exports=S},37277:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={},t={},d={};d.register=function(c,h,r,n){n===void 0&&(n=!1),S[c]={plugin:h,mapping:r,custom:n}},d.registerCustom=function(c,h,r,n){t[c]={plugin:h,mapping:r,data:n}},d.hasCore=function(c){return S.hasOwnProperty(c)},d.hasCustom=function(c){return t.hasOwnProperty(c)},d.getCore=function(c){return S[c]},d.getCustom=function(c){return t[c]},d.getCustomClass=function(c){return t.hasOwnProperty(c)?t[c].plugin:null},d.remove=function(c){S.hasOwnProperty(c)&&delete S[c]},d.removeCustom=function(c){t.hasOwnProperty(c)&&delete t[c]},d.destroyCorePlugins=function(){for(var c in S)S.hasOwnProperty(c)&&delete S[c]},d.destroyCustomPlugins=function(){for(var c in t)t.hasOwnProperty(c)&&delete t[c]},p.exports=d},77332:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(8443),h=t(50792),r=t(74099),n=t(44603),e=t(39429),s=t(95540),a=t(37277),i=t(72905),o=t(8054),l=new d({Extends:h,initialize:function(u){h.call(this),this.game=u,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],u.isBooted||u.config.renderType===o.HEADLESS?this.boot():u.events.once(c.BOOT,this.boot,this)},boot:function(){var f,u,v,m,x,g,y,T=this.game.config,C=T.installGlobalPlugins;for(C=C.concat(this._pendingGlobal),f=0;f{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */var d=t(52018),c=t(83419),h=t(44594),r=new c({Extends:d,initialize:function(e,s,a){d.call(this,s),this.scene=e,this.systems=e.sys,this.pluginKey=a,e.sys.events.once(h.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});p.exports=r},18922:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={BasePlugin:t(52018),DefaultPlugins:t(42363),PluginCache:t(37277),PluginManager:t(77332),ScenePlugin:t(45145)}},63595:()=>{typeof HTMLVideoElement<"u"&&!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(p){const S=performance.now(),t=this.getVideoPlaybackQuality(),d=this.mozPresentedFrames||this.mozPaintedFrames||t.totalVideoFrames-t.droppedVideoFrames,c=(h,r)=>{const n=this.getVideoPlaybackQuality(),e=this.mozPresentedFrames||this.mozPaintedFrames||n.totalVideoFrames-n.droppedVideoFrames;if(e>d){const s=this.mozFrameDelay||n.totalFrameDelay-t.totalFrameDelay||0,a=r-h;p(r,{presentationTime:r+s*1e3,expectedDisplayTime:r+a,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+a/1e3,presentedFrames:e,processingDuration:s}),delete this._rvfcpolyfillmap[S]}else this._rvfcpolyfillmap[S]=requestAnimationFrame(s=>c(r,s))};return this._rvfcpolyfillmap[S]=requestAnimationFrame(h=>c(S,h)),S},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(p){cancelAnimationFrame(this._rvfcpolyfillmap[p]),delete this._rvfcpolyfillmap[p]})},10312:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.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:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={DEFAULT:0,LINEAR:0,NEAREST:1};p.exports=S},68627:(p,S,t)=>{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(19715),c=t(32880),h=t(83419),r=t(8054),n=t(50792),e=t(92503),s=t(56373),a=t(97480),i=t(69442),o=t(8443),l=t(61340),f=new h({Extends:n,initialize:function(v){n.call(this);var m=v.config;this.config={clearBeforeRender:m.clearBeforeRender,backgroundColor:m.backgroundColor,antialias:m.antialias,roundPixels:m.roundPixels,transparent:m.transparent},this.game=v,this.type=r.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=v.canvas;var x={alpha:m.transparent,desynchronized:m.desynchronized,willReadFrequently:!1};this.gameContext=m.context?m.context:this.gameCanvas.getContext("2d",x),this.currentContext=this.gameContext,this.antialias=m.antialias,this.blendModes=s(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new l,this._tempMatrix2=new l,this._tempMatrix3=new l,this.isBooted=!1,this.init()},init:function(){var u=this.game;u.events.once(o.BOOT,function(){var v=this.config;if(!v.transparent){var m=this.gameContext,x=this.gameCanvas;m.fillStyle=v.backgroundColor.rgba,m.fillRect(0,0,x.width,x.height)}},this),u.textures.once(i.READY,this.boot,this)},boot:function(){var u=this.game,v=u.scale.baseSize;this.width=v.width,this.height=v.height,this.isBooted=!0,u.scale.on(a.RESIZE,this.onResize,this),this.resize(v.width,v.height)},onResize:function(u,v){(v.width!==this.width||v.height!==this.height)&&this.resize(v.width,v.height)},resize:function(u,v){this.width=u,this.height=v,this.emit(e.RESIZE,u,v)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(u){return this.currentContext.globalCompositeOperation=u,this},setContext:function(u){return this.currentContext=u||this.gameContext,this},setAlpha:function(u){return this.currentContext.globalAlpha=u,this},preRender:function(){var u=this.gameContext,v=this.config,m=this.width,x=this.height;u.globalAlpha=1,u.globalCompositeOperation="source-over",u.setTransform(1,0,0,1,0,0),this.emit(e.PRE_RENDER_CLEAR),v.clearBeforeRender&&(u.clearRect(0,0,m,x),v.transparent||(u.fillStyle=v.backgroundColor.rgba,u.fillRect(0,0,m,x))),u.save(),this.drawCount=0,this.emit(e.PRE_RENDER)},render:function(u,v,m){var x=v.length;this.emit(e.RENDER,u,m);var g=m.x,y=m.y,T=m.width,C=m.height,E=m.renderToTexture?m.context:u.sys.context;E.save(),this.game.scene.customViewports&&(E.beginPath(),E.rect(g,y,T,C),E.clip()),m.emit(d.PRE_RENDER,m),this.currentContext=E;var M=m.mask;M&&M.preRenderCanvas(this,null,m._maskCamera),m.transparent||(E.fillStyle=m.backgroundColor.rgba,E.fillRect(g,y,T,C)),E.globalAlpha=m.alpha,E.globalCompositeOperation="source-over",this.drawCount+=x,m.renderToTexture&&m.emit(d.PRE_RENDER,m),m.matrix.copyToContext(E);for(var P=0;P=0?z=-(z+A):z<0&&(z=Math.abs(z)-A)),u.flipY&&(I>=0?I=-(I+F):I<0&&(I=Math.abs(I)-F))}var O=1,b=1;u.flipX&&(L||(z+=-v.realWidth+N*2),O=-1),u.flipY&&(L||(I+=-v.realHeight+U*2),b=-1);var D=u.x,X=u.y;if(m.roundPixels&&(D=Math.floor(D),X=Math.floor(X)),C.applyITRS(D,X,u.rotation,u.scaleX*O,u.scaleY*b),T.copyFrom(m.matrix),x?(T.multiplyWithOffset(x,-m.scrollX*u.scrollFactorX,-m.scrollY*u.scrollFactorY),C.e=D,C.f=X):(C.e-=m.scrollX*u.scrollFactorX,C.f-=m.scrollY*u.scrollFactorY),T.multiply(C),m.renderRoundPixels&&(T.e=Math.floor(T.e+.5),T.f=Math.floor(T.f+.5)),y.save(),T.setToContext(y),y.globalCompositeOperation=this.blendModes[u.blendMode],y.globalAlpha=g,y.imageSmoothingEnabled=!v.source.scaleMode,u.mask&&u.mask.preRenderCanvas(this,u,m),A>0&&F>0){var V=A/B,W=F/B;m.roundPixels&&(z=Math.floor(z+.5),I=Math.floor(I+.5),V+=.5,W+=.5),y.drawImage(v.source.image,M,P,A,F,z,I,V,W)}u.mask&&u.mask.postRenderCanvas(this,u,m),y.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});p.exports=f},55830:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={CanvasRenderer:t(68627),GetBlendModes:t(56373),SetTransform:t(20926)}},56373:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(10312),c=t(89289),h=function(){var r=[],n=c.supportNewBlendModes,e="source-over";return r[d.NORMAL]=e,r[d.ADD]="lighter",r[d.MULTIPLY]=n?"multiply":e,r[d.SCREEN]=n?"screen":e,r[d.OVERLAY]=n?"overlay":e,r[d.DARKEN]=n?"darken":e,r[d.LIGHTEN]=n?"lighten":e,r[d.COLOR_DODGE]=n?"color-dodge":e,r[d.COLOR_BURN]=n?"color-burn":e,r[d.HARD_LIGHT]=n?"hard-light":e,r[d.SOFT_LIGHT]=n?"soft-light":e,r[d.DIFFERENCE]=n?"difference":e,r[d.EXCLUSION]=n?"exclusion":e,r[d.HUE]=n?"hue":e,r[d.SATURATION]=n?"saturation":e,r[d.COLOR]=n?"color":e,r[d.LUMINOSITY]=n?"luminosity":e,r[d.ERASE]="destination-out",r[d.SOURCE_IN]="source-in",r[d.SOURCE_OUT]="source-out",r[d.SOURCE_ATOP]="source-atop",r[d.DESTINATION_OVER]="destination-over",r[d.DESTINATION_IN]="destination-in",r[d.DESTINATION_OUT]="destination-out",r[d.DESTINATION_ATOP]="destination-atop",r[d.LIGHTER]="lighter",r[d.COPY]="copy",r[d.XOR]="xor",r};p.exports=h},20926:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(91296),c=function(h,r,n,e,s){var a=e.alpha*n.alpha;if(a<=0)return!1;var i=d(n,e,s).calc;return r.globalCompositeOperation=h.blendModes[n.blendMode],r.globalAlpha=a,r.save(),i.setToContext(r),r.imageSmoothingEnabled=n.frame?!n.frame.source.scaleMode:h.antialias,!0};p.exports=c},63899:p=>{/** * @author Benjamin D. Richards * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="losewebgl"},6119:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="postrender"},48070:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="prerender"},15640:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="render"},8912:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="resize"},87124:p=>{/** * @author Benjamin D. Richards * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="restorewebgl"},92503:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={LOSE_WEBGL:t(63899),POST_RENDER:t(6119),PRE_RENDER:t(48070),RENDER:t(15640),RESIZE:t(8912),RESTORE_WEBGL:t(87124)}},36909:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={Events:t(92503),Snapshot:t(89966)},p.exports.Canvas=t(55830),p.exports.WebGL=t(4159)},32880:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(27919),c=t(40987),h=t(95540),r=function(n,e){var s=h(e,"callback"),a=h(e,"type","image/png"),i=h(e,"encoder",.92),o=Math.abs(Math.round(h(e,"x",0))),l=Math.abs(Math.round(h(e,"y",0))),f=Math.floor(h(e,"width",n.width)),u=Math.floor(h(e,"height",n.height)),v=h(e,"getPixel",!1);if(v){var m=n.getContext("2d",{willReadFrequently:!1}),x=m.getImageData(o,l,1,1),g=x.data;s.call(null,new c(g[0],g[1],g[2],g[3]))}else if(o!==0||l!==0||f!==n.width||u!==n.height){var y=d.createWebGL(this,f,u),T=y.getContext("2d",{willReadFrequently:!0});f>0&&u>0&&T.drawImage(n,o,l,f,u,0,0,f,u);var C=new Image;C.onerror=function(){s.call(null),d.remove(y)},C.onload=function(){s.call(null,C),d.remove(y)},C.src=y.toDataURL(a,i)}else{var E=new Image;E.onerror=function(){s.call(null)},E.onload=function(){s.call(null,E)},E.src=n.toDataURL(a,i)}};p.exports=r},88815:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(27919),c=t(40987),h=t(95540),r=function(n,e){var s=n,a=h(e,"callback"),i=h(e,"type","image/png"),o=h(e,"encoder",.92),l=Math.abs(Math.round(h(e,"x",0))),f=Math.abs(Math.round(h(e,"y",0))),u=h(e,"getPixel",!1),v=h(e,"isFramebuffer",!1),m=v?h(e,"bufferWidth",1):s.drawingBufferWidth,x=v?h(e,"bufferHeight",1):s.drawingBufferHeight;if(u){var g=new Uint8Array(4),y=v?f:x-f;s.readPixels(l,y,1,1,s.RGBA,s.UNSIGNED_BYTE,g),a.call(null,new c(g[0],g[1],g[2],g[3]))}else{var T=Math.floor(h(e,"width",m)),C=Math.floor(h(e,"height",x)),E=T*C*4,M=new Uint8Array(E);s.readPixels(l,x-f-C,T,C,s.RGBA,s.UNSIGNED_BYTE,M);for(var P=d.createWebGL(this,T,C),A=P.getContext("2d",{willReadFrequently:!0}),F=A.getImageData(0,0,T,C),L=F.data,B=0;B{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={Canvas:t(32880),WebGL:t(88815)}},7530:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(36060),h=t(90330),r=t(82264),n=t(95540),e=t(32302),s=t(63448),a=t(31302),i=t(58918),o=t(14811),l=t(92651),f=t(96569),u=t(56527),v=t(57516),m=t(43439),x=t(81041),g=t(12385),y=t(7589),T=t(95428),C=t(72905),E=new d({initialize:function(P){this.game=P.game,this.renderer=P,this.classes=new h([[c.UTILITY_PIPELINE,y],[c.MULTI_PIPELINE,v],[c.BITMAPMASK_PIPELINE,a],[c.SINGLE_PIPELINE,g],[c.ROPE_PIPELINE,x],[c.LIGHT_PIPELINE,f],[c.POINTLIGHT_PIPELINE,m],[c.MOBILE_PIPELINE,u]]),this.postPipelineClasses=new h,this.pipelines=new h,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(M,P,A){var F=this.renderer,L=this.renderTargets;this.frameInc=Math.floor(n(M,"frameInc",32));var B=F.width,N=F.height,U=this.game.config.disablePreFX,z=this.game.config.disablePostFX;if(z||this.postPipelineClasses.setAll([[String(o.BARREL),i.Barrel],[String(o.BLOOM),i.Bloom],[String(o.BLUR),i.Blur],[String(o.BOKEH),i.Bokeh],[String(o.CIRCLE),i.Circle],[String(o.COLOR_MATRIX),i.ColorMatrix],[String(o.DISPLACEMENT),i.Displacement],[String(o.GLOW),i.Glow],[String(o.GRADIENT),i.Gradient],[String(o.PIXELATE),i.Pixelate],[String(o.SHADOW),i.Shadow],[String(o.SHINE),i.Shine],[String(o.VIGNETTE),i.Vignette],[String(o.WIPE),i.Wipe]]),!U){this.classes.set(c.FX_PIPELINE,l);for(var I=Math.min(B,N),G=Math.ceil(I/this.frameInc),O=1;O=0;A--){var F=P[A];F.active&&F.preBatch(M)}}},postBatch:function(M){if(M.hasPostPipeline){this.flush();for(var P=M.postPipelines,A=0;A=0;A--){var F=P[A];F.active&&F.preBatch(M)}}},postBatchCamera:function(M){if(M.hasPostPipeline){this.flush();for(var P=M.postPipelines,A=0;Athis.maxDimension)return this.targetIndex=P.length-A,P[this.targetIndex];var F=(s(M,this.frameInc,0,!0)-1)*A;return this.targetIndex=F,P[F]},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}});p.exports=E},32302:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(92503),h=new d({initialize:function(n,e,s,a,i,o,l,f,u){a===void 0&&(a=1),i===void 0&&(i=0),o===void 0&&(o=!0),l===void 0&&(l=!1),f===void 0&&(f=!0),u===void 0&&(u=!0),this.renderer=n,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=a,this.minFilter=i,this.autoClear=o,this.autoResize=!0,this.hasDepthBuffer=f,this.forceClamp=u,this.init(e,s),l?this.renderer.on(c.RESIZE,this.resize,this):this.autoResize=!1},init:function(r,n){var e=this.renderer;this.texture=e.createTextureFromSource(null,r,n,this.minFilter,this.forceClamp),this.framebuffer=e.createFramebuffer(r,n,this.texture,this.hasDepthBuffer),this.width=r,this.height=n},setAutoResize:function(r){return r&&!this.autoResize?(this.renderer.on(c.RESIZE,this.resize,this),this.autoResize=!0):!r&&this.autoResize&&(this.renderer.off(c.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(r,n){if(this.autoResize&&this.willResize(r,n)){var e=this.renderer;e.deleteFramebuffer(this.framebuffer),e.deleteTexture(this.texture),this.texture=e.createTextureFromSource(null,r,n,this.minFilter,this.forceClamp),this.framebuffer=e.createFramebuffer(r,n,this.texture,this.hasDepthBuffer),this.width=r,this.height=n}return this},willResize:function(r,n){return typeof r!="number"||typeof n!="number"?!1:(r=Math.round(r*this.scale),n=Math.round(n*this.scale),r=Math.max(r,1),n=Math.max(n,1),r!==this.width||n!==this.height)},bind:function(r,n,e){r===void 0&&(r=!1);var s=this.renderer;if(r&&s.flush(),n&&e&&this.resize(n,e),s.pushFramebuffer(this.framebuffer,!1,!1),r&&this.adjustViewport(),this.autoClear){var a=this.renderer.gl;a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT)}s.clearStencilMask()},adjustViewport:function(){var r=this.renderer.gl;r.viewport(0,0,this.width,this.height),r.disable(r.SCISSOR_TEST)},clear:function(r,n,e,s){var a=this.renderer,i=a.gl;a.pushFramebuffer(this.framebuffer),r!==void 0&&n!==void 0&&e!==void 0&&s!==void 0?(i.enable(i.SCISSOR_TEST),i.scissor(r,n,e,s)):i.disable(i.SCISSOR_TEST),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),a.popFramebuffer(),a.resetScissor()},unbind:function(r){r===void 0&&(r=!1);var n=this.renderer;return r&&n.flush(),n.popFramebuffer()},destroy:function(){var r=this.renderer;r.off(c.RESIZE,this.resize,this),r.deleteFramebuffer(this.framebuffer),r.deleteTexture(this.texture),this.renderer=null,this.framebuffer=null,this.texture=null}});p.exports=h},70554:p=>{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @author Matthew Groves <@doormat> * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={getTintFromFloats:function(S,t,d,c){var h=(S*255|0)&255,r=(t*255|0)&255,n=(d*255|0)&255,e=(c*255|0)&255;return(e<<24|h<<16|r<<8|n)>>>0},getTintAppendFloatAlpha:function(S,t){var d=(t*255|0)&255;return(d<<24|S)>>>0},getTintAppendFloatAlphaAndSwap:function(S,t){var d=(S>>16|0)&255,c=(S>>8|0)&255,h=(S|0)&255,r=(t*255|0)&255;return(r<<24|h<<16|c<<8|d)>>>0},getFloatsFromUintRGB:function(S){var t=(S>>16|0)&255,d=(S>>8|0)&255,c=(S|0)&255;return[t/255,d/255,c/255]},checkShaderMax:function(S,t){var d=Math.min(16,S.getParameter(S.MAX_TEXTURE_IMAGE_UNITS));return!t||t===-1?d:Math.min(d,t)},parseFragmentShaderMaxTextures:function(S,t){if(!S)return"";for(var d="",c=0;c0&&(d+=` else `),c{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(62644),h=t(50792),r=t(77085),n=t(95540),e=t(37867),s=t(92503),a=t(32302),i=t(70554),o=t(38683),l=new d({Extends:h,initialize:function(u){h.call(this);var v=u.game,m=v.renderer,x=m.gl;this.name=n(u,"name","WebGLPipeline"),this.game=v,this.renderer=m,this.manager,this.gl=x,this.view=v.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=n(u,"topology",x.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=n(u,"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=u,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[],this.resizeUniform=n(u,"resizeUniform","")},boot:function(){var f,u=this.gl,v=this.config,m=this.renderer;this.isPostFX||(this.projectionMatrix=new e().identity());var x=this.renderTargets,g=n(v,"renderTarget",!1);typeof g=="boolean"&&g&&(g=1);var y=m.width,T=m.height;if(typeof g=="number")for(f=0;fB&&(B=L[f].vertexSize);var N=n(v,"batchSize",m.config.batchSize);this.vertexCapacity=N*6;var U=new ArrayBuffer(this.vertexCapacity*B);this.vertexData=U,this.bytes=new Uint8Array(U),this.vertexViewF32=new Float32Array(U),this.vertexViewU32=new Uint32Array(U);var z=n(v,"vertices",null);for(z?(this.vertexViewF32.set(z),this.vertexBuffer=m.createVertexBuffer(U,u.STATIC_DRAW)):this.vertexBuffer=m.createVertexBuffer(U.byteLength,u.DYNAMIC_DRAW),this.setVertexBuffer(),f=L.length-1;f>=0;f--)L[f].rebind();this.hasBooted=!0,m.on(s.RESIZE,this.resize,this),m.on(s.PRE_RENDER,this.onPreRender,this),m.on(s.RENDER,this.onRender,this),m.on(s.POST_RENDER,this.onPostRender,this),this.emit(r.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(f,u,v){var m=this.renderer;if(f!==this.currentShader||m.currentProgram!==this.currentShader.program){this.flush();var x=this.setVertexBuffer(v);x&&!u&&(u=!0),f.bind(u,!1),this.currentShader=f}return this},getShaderByName:function(f){for(var u=this.shaders,v=0;v-1&&(L=I.substring(20))}B&&N&&A.push(new o(this,L,B,N,c(U)))}this.shaders=A}return this.shaders.length===0?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},createBatch:function(f){return this.currentBatch={start:this.vertexCount,count:0,texture:[f],unit:0,maxUnit:0},this.currentUnit=0,this.currentTexture=f,this.batch.push(this.currentBatch),0},addTextureToBatch:function(f){var u=this.currentBatch;u&&(u.texture.push(f),u.unit++,u.maxUnit++)},pushBatch:function(f){if(!this.currentBatch||this.forceZero&&f!==this.currentTexture)return this.createBatch(f);if(f===this.currentTexture)return this.currentUnit;var u=this.currentBatch,v=u.texture.indexOf(f);return v===-1?u.texture.length===this.renderer.maxTextures?this.createBatch(f):(u.unit++,u.maxUnit++,u.texture.push(f),this.currentUnit=u.unit,this.currentTexture=f,u.unit):(this.currentUnit=v,this.currentTexture=f,v)},setGameObject:function(f,u){return u===void 0&&(u=f.frame),this.pushBatch(u.source.glTexture)},shouldFlush:function(f){return f===void 0&&(f=0),this.vertexCount+f>this.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(f,u){(f!==this.width||u!==this.height)&&this.flush(),this.width=f,this.height=u;for(var v=this.renderTargets,m=0;m=0;v--){var m=u[v].rebind();(!f||m===f)&&(this.currentShader=m)}return this.activeTextures.length=0,this.emit(r.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},restoreContext:function(){var f=this.shaders,u=!!this.vertexBuffer;this.activeBuffer=null,this.activeTextures.length=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,u&&this.setVertexBuffer();for(var v=0;v0){this.emit(r.BEFORE_FLUSH,this,f),this.onBeforeFlush(f);var u=this.gl,v=this.vertexCount,m=this.currentShader.vertexSize,x=this.topology;if(this.active){this.setVertexBuffer(),v===this.vertexCapacity?u.bufferData(u.ARRAY_BUFFER,this.vertexData,u.DYNAMIC_DRAW):u.bufferSubData(u.ARRAY_BUFFER,0,this.bytes.subarray(0,v*m));var g,y,T,C=this.batch,E=this.activeTextures;if(this.forceZero)for(E[0]||u.activeTexture(u.TEXTURE0),g=0;g{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(95428),c=t(72905),h=t(19715),r=t(83419),n=t(8054),e=t(50792),s=t(92503),a=t(50030),i=t(37867),o=t(29747),l=t(7530),f=t(32302),u=t(97480),v=t(69442),m=t(70554),x=t(88815),g=t(26128),y=t(1482),T=t(82751),C=t(84387),E=t(93567),M=t(57183),P=new r({Extends:e,initialize:function(F){e.call(this);var L=F.config,B={alpha:L.transparent,desynchronized:L.desynchronized,depth:!0,antialias:L.antialiasGL,premultipliedAlpha:L.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:L.failIfMajorPerformanceCaveat,powerPreference:L.powerPreference,preserveDrawingBuffer:L.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:L.clearBeforeRender,antialias:L.antialias,backgroundColor:L.backgroundColor,contextCreation:B,roundPixels:L.roundPixels,maxTextures:L.maxTextures,maxTextureSize:L.maxTextureSize,batchSize:L.batchSize,maxLights:L.maxLights,mipmapFilter:L.mipmapFilter},this.game=F,this.type=n.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=F.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=o,this.contextRestoredHandler=o,this.previousContextLostHandler=o,this.previousContextRestoredHandler=o,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(A){var F,L=this.game,B=this.canvas,N=A.backgroundColor;if(L.config.context?F=L.config.context:F=B.getContext("webgl",A.contextCreation)||B.getContext("experimental-webgl",A.contextCreation),!F||F.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=F,this.setExtensions(),this.setContextHandlers(),L.context=F;for(var U=0;U<=27;U++)this.blendModes.push({func:[F.ONE,F.ONE_MINUS_SRC_ALPHA],equation:F.FUNC_ADD});this.blendModes[1].func=[F.ONE,F.DST_ALPHA],this.blendModes[2].func=[F.DST_COLOR,F.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[F.ONE,F.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[F.ZERO,F.ONE_MINUS_SRC_ALPHA],equation:F.FUNC_REVERSE_SUBTRACT},this.glFormats=[F.BYTE,F.SHORT,F.UNSIGNED_BYTE,F.UNSIGNED_SHORT,F.FLOAT],this.glFuncMap={mat2:{func:F.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:F.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:F.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:F.uniform1f,length:1},"1fv":{func:F.uniform1fv,length:1},"1i":{func:F.uniform1i,length:1},"1iv":{func:F.uniform1iv,length:1},"2f":{func:F.uniform2f,length:2},"2fv":{func:F.uniform2fv,length:1},"2i":{func:F.uniform2i,length:2},"2iv":{func:F.uniform2iv,length:1},"3f":{func:F.uniform3f,length:3},"3fv":{func:F.uniform3fv,length:1},"3i":{func:F.uniform3i,length:3},"3iv":{func:F.uniform3iv,length:1},"4f":{func:F.uniform4f,length:4},"4fv":{func:F.uniform4fv,length:1},"4i":{func:F.uniform4i,length:4},"4iv":{func:F.uniform4iv,length:1}},(!A.maxTextures||A.maxTextures===-1)&&(A.maxTextures=F.getParameter(F.MAX_TEXTURE_IMAGE_UNITS)),A.maxTextureSize||(A.maxTextureSize=F.getParameter(F.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),F.disable(F.DEPTH_TEST),F.disable(F.CULL_FACE),F.enable(F.BLEND),F.clearColor(N.redGL,N.greenGL,N.blueGL,N.alphaGL),F.clear(F.COLOR_BUFFER_BIT);var z=["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"];return z.indexOf(A.mipmapFilter)!==-1&&(this.mipmapFilter=F[A.mipmapFilter]),this.maxTextures=m.checkShaderMax(F,A.maxTextures),this.textureIndexes=[],this.createTemporaryTextures(),this.pipelines=new l(this),this.setBlendMode(n.BlendModes.NORMAL),this.projectionMatrix=new i().identity(),L.textures.once(v.READY,this.boot,this),this},boot:function(){var A=this.game,F=this.pipelines,L=A.scale.baseSize,B=L.width,N=L.height;this.width=B,this.height=N,this.isBooted=!0,this.renderTarget=new f(this,B,N,1,0,!0,!0),this.maskTarget=new f(this,B,N,1,0,!0,!0),this.maskSource=new f(this,B,N,1,0,!0,!0);var U=A.config;F.boot(U.pipeline,U.defaultPipeline,U.autoMobilePipeline),this.blankTexture=A.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=A.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=A.textures.getFrame("__WHITE").glTexture;var z=this.gl;z.bindFramebuffer(z.FRAMEBUFFER,null),z.enable(z.SCISSOR_TEST),A.scale.on(u.RESIZE,this.onResize,this),this.resize(B,N)},setExtensions:function(){var A=this.gl,F=A.getSupportedExtensions();this.supportedExtensions=F;var L="ANGLE_instanced_arrays";this.instancedArraysExtension=F.indexOf(L)>-1?A.getExtension(L):null;var B="OES_vertex_array_object";this.vaoExtension=F.indexOf(B)>-1?A.getExtension(B):null},setContextHandlers:function(A,F){this.previousContextLostHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextLostHandler,!1),this.previousContextRestoredHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextRestoredHandler,!1),typeof A=="function"?this.contextLostHandler=A.bind(this):this.contextLostHandler=this.dispatchContextLost.bind(this),typeof F=="function"?this.contextRestoredHandler=F.bind(this):this.contextRestoredHandler=this.dispatchContextRestored.bind(this),this.canvas.addEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),this.previousContextLostHandler=this.contextLostHandler,this.previousContextRestoredHandler=this.contextRestoredHandler},dispatchContextLost:function(A){this.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),this.emit(s.LOSE_WEBGL,this),A.preventDefault()},dispatchContextRestored:function(A){var F=this.gl;if(F.isContextLost()){console&&console.log("WebGL Context restored, but context is still lost");return}this.currentProgram=null,this.currentFramebuffer=null,this.setBlendMode(n.BlendModes.NORMAL),F.disable(F.BLEND),F.disable(F.DEPTH_TEST),F.enable(F.CULL_FACE),this.compression=this.getCompressedTextures();var L=function(B){B.createResource()};d(this.glTextureWrappers,L),d(this.glBufferWrappers,L),d(this.glFramebufferWrappers,L),d(this.glProgramWrappers,L),d(this.glAttribLocationWrappers,L),d(this.glUniformLocationWrappers,L),this.createTemporaryTextures(),this.pipelines.restoreContext(),this.resize(this.game.scale.baseSize.width,this.game.scale.baseSize.height),this.setExtensions(),this.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),this.emit(s.RESTORE_WEBGL,this),A.preventDefault()},createTemporaryTextures:function(){for(var A=this.gl,F=0;F0&&B>0;if(z&&I){var G=z[0],O=z[1],b=z[2],D=z[3];I=G!==A||O!==F||b!==L||D!==B}I&&(this.flush(),U.scissor(A,N-F-B,L,B))},resetScissor:function(){var A=this.gl;A.enable(A.SCISSOR_TEST);var F=this.currentScissor;if(F){var L=F[0],B=F[1],N=F[2],U=F[3];N>0&&U>0&&A.scissor(L,this.drawingBufferHeight-B-U,N,U)}},popScissor:function(){var A=this.scissorStack;A.pop();var F=A[A.length-1];F&&this.setScissor(F[0],F[1],F[2],F[3]),this.currentScissor=F},hasActiveStencilMask:function(){var A=this.currentMask.mask,F=this.currentCameraMask.mask;return A&&A.isStencil||F&&F.isStencil},resetViewport:function(){var A=this.gl;A.viewport(0,0,this.width,this.height),this.drawingBufferHeight=A.drawingBufferHeight},setBlendMode:function(A,F){F===void 0&&(F=!1);var L=this.gl,B=this.blendModes[A];return F||A!==n.BlendModes.SKIP_CHECK&&this.currentBlendMode!==A?(this.flush(),L.enable(L.BLEND),L.blendEquation(B.equation),B.func.length>2?L.blendFuncSeparate(B.func[0],B.func[1],B.func[2],B.func[3]):L.blendFunc(B.func[0],B.func[1]),this.currentBlendMode=A,!0):!1},addBlendMode:function(A,F){var L=this.blendModes.push({func:A,equation:F});return L-1},updateBlendMode:function(A,F,L){return this.blendModes[A]&&(this.blendModes[A].func=F,L&&(this.blendModes[A].equation=L)),this},removeBlendMode:function(A){return A>17&&this.blendModes[A]&&this.blendModes.splice(A,1),this},pushFramebuffer:function(A,F,L,B,N){return A===this.currentFramebuffer?this:(this.fboStack.push(A),this.setFramebuffer(A,F,L,B,N))},setFramebuffer:function(A,F,L,B,N){if(F===void 0&&(F=!1),L===void 0&&(L=!0),B===void 0&&(B=null),N===void 0&&(N=!1),A===this.currentFramebuffer)return this;var U=this.gl,z=this.width,I=this.height;return A&&A.renderTexture&&L?(z=A.renderTexture.width,I=A.renderTexture.height):this.flush(),A?U.bindFramebuffer(U.FRAMEBUFFER,A.webGLFramebuffer):U.bindFramebuffer(U.FRAMEBUFFER,null),L&&U.viewport(0,0,z,I),B&&U.framebufferTexture2D(U.FRAMEBUFFER,U.COLOR_ATTACHMENT0,U.TEXTURE_2D,B.webGLTexture,0),N&&(U.clearColor(0,0,0,0),U.clear(U.COLOR_BUFFER_BIT)),F&&(A?(this.drawingBufferHeight=I,this.pushScissor(0,0,z,I)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=A,this},popFramebuffer:function(A,F){A===void 0&&(A=!1),F===void 0&&(F=!0);var L=this.fboStack;L.pop();var B=L[L.length-1];return B||(B=null),this.setFramebuffer(B,A,F),B},restoreFramebuffer:function(A,F){A===void 0&&(A=!1),F===void 0&&(F=!0);var L=this.fboStack,B=L[L.length-1];B||(B=null),this.currentFramebuffer=null,this.setFramebuffer(B,A,F)},setProgram:function(A){return A!==this.currentProgram?(this.flush(),this.gl.useProgram(A.webGLProgram),this.currentProgram=A,!0):!1},resetProgram:function(){return this.gl.useProgram(this.currentProgram.webGLProgramWrapper),this},createTextureFromSource:function(A,F,L,B,N){N===void 0&&(N=!1);var U=this.gl,z=U.NEAREST,I=U.NEAREST,G=U.CLAMP_TO_EDGE,O=null;F=A?A.width:F,L=A?A.height:L;var b=a(F,L);if(b&&!N&&(G=U.REPEAT),B===n.ScaleModes.LINEAR&&this.config.antialias){var D=A&&A.compressed,X=!D&&b||D&&A.mipmaps.length>1;z=this.mipmapFilter&&X?this.mipmapFilter:U.LINEAR,I=U.LINEAR}return!A&&typeof F=="number"&&typeof L=="number"?O=this.createTexture2D(0,z,I,G,G,U.RGBA,null,F,L):O=this.createTexture2D(0,z,I,G,G,U.RGBA,A),O},createTexture2D:function(A,F,L,B,N,U,z,I,G,O,b,D){typeof I!="number"&&(I=z?z.width:1),typeof G!="number"&&(G=z?z.height:1);var X=new T(this.gl,A,F,L,B,N,U,z,I,G,O,b,D);return this.glTextureWrappers.push(X),X},createFramebuffer:function(A,F,L,B){this.currentFramebuffer=null;var N=new C(this.gl,A,F,L,B);return this.glFramebufferWrappers.push(N),N},beginBitmapMask:function(A,F){var L=this.gl;L&&(this.flush(),this.maskTarget.bind(!0),this.currentCameraMask.mask!==A&&(this.currentMask.mask=A,this.currentMask.camera=F))},drawBitmapMask:function(A,F,L){this.flush(),this.maskSource.bind(),this.setBlendMode(0,!0),A.renderWebGL(this,A,F),this.maskSource.unbind(!0),this.maskTarget.unbind();var B=this.gl,N=this.getCurrentStencilMask();N?(B.enable(B.STENCIL_TEST),N.mask.applyStencil(this,N.camera,!0)):this.currentMask.mask=null,this.pipelines.set(L),B.activeTexture(B.TEXTURE0),B.bindTexture(B.TEXTURE_2D,this.maskTarget.texture.webGLTexture),B.activeTexture(B.TEXTURE1),B.bindTexture(B.TEXTURE_2D,this.maskSource.texture.webGLTexture)},createProgram:function(A,F){var L=new y(this.gl,A,F);return this.glProgramWrappers.push(L),L},createVertexBuffer:function(A,F){var L=this.gl,B=new g(L,A,L.ARRAY_BUFFER,F);return this.glBufferWrappers.push(B),B},createAttribLocation:function(A,F){var L=new E(this.gl,A,F);return this.glAttribLocationWrappers.push(L),L},createUniformLocation:function(A,F){var L=new M(this.gl,A,F);return this.glUniformLocationWrappers.push(L),L},createIndexBuffer:function(A,F){var L=this.gl,B=new g(L,A,L.ELEMENT_ARRAY_BUFFER,F);return this.glBufferWrappers.push(B),B},deleteTexture:function(A){if(A)return c(this.glTextureWrappers,A),A.destroy(),this},deleteFramebuffer:function(A){return A?(c(this.fboStack,A),c(this.glFramebufferWrappers,A),A.destroy(),this):this},deleteProgram:function(A){return A&&(c(this.glProgramWrappers,A),A.destroy()),this},deleteAttribLocation:function(A){return A&&(c(this.glAttribLocationWrappers,A),A.destroy()),this},deleteUniformLocation:function(A){return A&&(c(this.glUniformLocationWrappers,A),A.destroy()),this},deleteBuffer:function(A){return A?(c(this.glBufferWrappers,A),A.destroy(),this):this},preRenderCamera:function(A){var F=A.x,L=A.y,B=A.width,N=A.height,U=A.backgroundColor;if(A.emit(h.PRE_RENDER,A),this.pipelines.preBatchCamera(A),this.pushScissor(F,L,B,N),A.mask&&(this.currentCameraMask.mask=A.mask,this.currentCameraMask.camera=A._maskCamera,A.mask.preRenderWebGL(this,A,A._maskCamera)),U.alphaGL>0){var z=this.pipelines.setMulti();z.drawFillRect(F,L,B,N,m.getTintFromFloats(U.blueGL,U.greenGL,U.redGL,1),U.alphaGL)}},getCurrentStencilMask:function(){var A=null,F=this.maskStack,L=this.currentCameraMask;return F.length>0?A=F[F.length-1]:L.mask&&L.mask.isStencil&&(A=L),A},postRenderCamera:function(A){var F=A.flashEffect,L=A.fadeEffect;if(F.isRunning||L.isRunning||L.isComplete){var B=this.pipelines.setMulti();F.postRenderWebGL(B,m.getTintFromFloats),L.postRenderWebGL(B,m.getTintFromFloats)}A.dirty=!1,this.popScissor(),A.mask&&(this.currentCameraMask.mask=null,A.mask.postRenderWebGL(this,A._maskCamera)),this.pipelines.postBatchCamera(A),A.emit(h.POST_RENDER,A)},preRender:function(){if(!this.contextLost){var A=this.gl;if(A.bindFramebuffer(A.FRAMEBUFFER,null),this.emit(s.PRE_RENDER_CLEAR),this.config.clearBeforeRender){var F=this.config.backgroundColor;A.clearColor(F.redGL,F.greenGL,F.blueGL,F.alphaGL),A.clear(A.COLOR_BUFFER_BIT|A.DEPTH_BUFFER_BIT|A.STENCIL_BUFFER_BIT)}A.enable(A.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&A.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(s.PRE_RENDER)}},render:function(A,F,L){if(!this.contextLost){var B=F.length;if(this.emit(s.RENDER,A,L),this.preRenderCamera(L),B===0){this.setBlendMode(n.BlendModes.NORMAL),this.postRenderCamera(L);return}this.currentType="";for(var N=this.currentMask,U=0;U{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(95428),h=t(95540),r=t(14500),n=new d({initialize:function(s,a,i,o,l){this.pipeline=s,this.name=a,this.renderer=s.renderer,this.gl=this.renderer.gl,this.fragSrc=o,this.vertSrc=i,this.program=this.renderer.createProgram(i,o),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(l),this.createUniforms()},createAttributes:function(e){var s=0,a=0,i=[];this.vertexComponentCount=0;for(var o=0;o=0?(s.enableVertexAttribArray(C.webGLAttribLocation),s.vertexAttribPointer(C.webGLAttribLocation,v,m,T,i,x),u.enabled=!0,u.location=C):C.webGLAttribLocation!==-1&&s.disableVertexAttribArray(C.webGLAttribLocation)}else g?s.vertexAttribPointer(y.webGLAttribLocation,v,m,T,i,x):!g&&y!==-1&&y.webGLAttribLocation>-1&&(s.disableVertexAttribArray(y.webGLAttribLocation),u.location=-1)}return this},createUniforms:function(){var e=this.gl,s=this.program,a=this.uniforms,i,o,l,f=e.getProgramParameter(s.webGLProgram,e.ACTIVE_UNIFORMS);for(i=0;i0&&(o=o.substr(0,v),a.hasOwnProperty(o)||(l=this.renderer.createUniformLocation(s,o),l!==null&&(a[o]={name:o,location:l,setter:null,value1:null,value2:null,value3:null,value4:null})))}}return this},syncUniforms:function(){var e=this.gl;this.renderer.setProgram(this.program);for(var s in this.uniforms){var a=this.uniforms[s];a.setter&&a.setter.call(e,a.location.webGLUniformLocation,a.value1,a.value2,a.value3,a.value4)}},hasUniform:function(e){return this.uniforms.hasOwnProperty(e)},resetUniform:function(e){var s=this.uniforms[e];return s&&(s.value1=null,s.value2=null,s.value3=null,s.value4=null),this},setUniform1:function(e,s,a,i){var o=this.uniforms[s];return o?((i||o.value1!==a)&&(o.setter||(o.setter=e),o.value1=a,this.renderer.setProgram(this.program),e.call(this.gl,o.location.webGLUniformLocation,a),this.pipeline.currentShader=this),this):this},setUniform2:function(e,s,a,i,o){var l=this.uniforms[s];return l?((o||l.value1!==a||l.value2!==i)&&(l.setter||(l.setter=e),l.value1=a,l.value2=i,this.renderer.setProgram(this.program),e.call(this.gl,l.location.webGLUniformLocation,a,i),this.pipeline.currentShader=this),this):this},setUniform3:function(e,s,a,i,o,l){var f=this.uniforms[s];return f?((l||f.value1!==a||f.value2!==i||f.value3!==o)&&(f.setter||(f.setter=e),f.value1=a,f.value2=i,f.value3=o,this.renderer.setProgram(this.program),e.call(this.gl,f.location.webGLUniformLocation,a,i,o),this.pipeline.currentShader=this),this):this},setUniform4:function(e,s,a,i,o,l,f){var u=this.uniforms[s];return u?((f||u.value1!==a||u.value2!==i||u.value3!==o||u.value4!==l)&&(u.setter||(u.setter=e),u.value1=a,u.value2=i,u.value3=o,u.value4=l,this.renderer.setProgram(this.program),e.call(this.gl,u.location.webGLUniformLocation,a,i,o,l),this.pipeline.currentShader=this),this):this},setBoolean:function(e,s){return this.setUniform1(this.gl.uniform1i,e,Number(s))},set1f:function(e,s){return this.setUniform1(this.gl.uniform1f,e,s)},set2f:function(e,s,a){return this.setUniform2(this.gl.uniform2f,e,s,a)},set3f:function(e,s,a,i){return this.setUniform3(this.gl.uniform3f,e,s,a,i)},set4f:function(e,s,a,i,o){return this.setUniform4(this.gl.uniform4f,e,s,a,i,o)},set1fv:function(e,s){return this.setUniform1(this.gl.uniform1fv,e,s,!0)},set2fv:function(e,s){return this.setUniform1(this.gl.uniform2fv,e,s,!0)},set3fv:function(e,s){return this.setUniform1(this.gl.uniform3fv,e,s,!0)},set4fv:function(e,s){return this.setUniform1(this.gl.uniform4fv,e,s,!0)},set1iv:function(e,s){return this.setUniform1(this.gl.uniform1iv,e,s,!0)},set2iv:function(e,s){return this.setUniform1(this.gl.uniform2iv,e,s,!0)},set3iv:function(e,s){return this.setUniform1(this.gl.uniform3iv,e,s,!0)},set4iv:function(e,s){return this.setUniform1(this.gl.uniform4iv,e,s,!0)},set1i:function(e,s){return this.setUniform1(this.gl.uniform1i,e,s)},set2i:function(e,s,a){return this.setUniform2(this.gl.uniform2i,e,s,a)},set3i:function(e,s,a,i){return this.setUniform3(this.gl.uniform3i,e,s,a,i)},set4i:function(e,s,a,i,o){return this.setUniform4(this.gl.uniform4i,e,s,a,i,o)},setMatrix2fv:function(e,s,a){return this.setUniform2(this.gl.uniformMatrix2fv,e,s,a,!0)},setMatrix3fv:function(e,s,a){return this.setUniform2(this.gl.uniformMatrix3fv,e,s,a,!0)},setMatrix4fv:function(e,s,a){return this.setUniform2(this.gl.uniformMatrix4fv,e,s,a,!0)},createProgram:function(e,s){return e===void 0&&(e=this.vertSrc),s===void 0&&(s=this.fragSrc),this.program&&this.renderer.deleteProgram(this.program),this.vertSrc=e,this.fragSrc=s,this.program=this.renderer.createProgram(e,s),this.createUniforms(),this.rebind()},destroy:function(){var e=this.renderer;c(this.uniforms,function(s){e.deleteUniformLocation(s.location)}),this.uniforms=null,c(this.attributes,function(s){e.deleteAttribLocation(s.location)}),this.attributes=null,e.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null}});p.exports=n},14500:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={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}};p.exports=S},4159:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(14500),c=t(79291),h={PipelineManager:t(7530),Pipelines:t(96615),RenderTarget:t(32302),Utils:t(70554),WebGLPipeline:t(29100),WebGLRenderer:t(74797),WebGLShader:t(38683),Wrappers:t(9503)};h=c(!1,h,d),p.exports=h},31302:(p,S,t)=>{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(95540),h=t(78908),r=t(85191),n=t(14500),e=t(29100),s=new d({Extends:e,initialize:function(i){i.fragShader=c(i,"fragShader",h),i.vertShader=c(i,"vertShader",r),i.batchSize=c(i,"batchSize",1),i.vertices=c(i,"vertices",[-1,1,-1,-7,7,1]),i.attributes=c(i,"attributes",[{name:"inPosition",size:2,type:n.FLOAT}]),e.call(this,i)},boot:function(){e.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(a,i){e.prototype.resize.call(this,a,i),this.set2f("uResolution",a,i)},beginMask:function(a,i,o){this.renderer.beginBitmapMask(a,o)},endMask:function(a,i,o){var l=this.gl,f=this.renderer,u=a.bitmapMask;u&&l&&(f.drawBitmapMask(u,i,this),o&&this.set2f("uResolution",o.width,o.height),this.set1i("uInvertMaskAlpha",a.invertAlpha),l.drawArrays(this.topology,0,3),o&&this.set2f("uResolution",this.width,this.height),l.bindTexture(l.TEXTURE_2D,null))}});p.exports=s},92651:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(58918),h=t(14811),r=t(95540),n=t(43558),e=t(89350),s=t(70554),a=new d({Extends:n,initialize:function(o){o.shaders=[s.setGlowQuality(e.FXGlowFrag,o.game),e.FXShadowFrag,e.FXPixelateFrag,e.FXVignetteFrag,e.FXShineFrag,e.FXBlurLowFrag,e.FXBlurMedFrag,e.FXBlurHighFrag,e.FXGradientFrag,e.FXBloomFrag,e.ColorMatrixFrag,e.FXCircleFrag,e.FXBarrelFrag,e.FXDisplacementFrag,e.FXWipeFrag,e.FXBokehFrag],n.call(this,o);var l=this.game;this.glow=new c.Glow(l),this.shadow=new c.Shadow(l),this.pixelate=new c.Pixelate(l),this.vignette=new c.Vignette(l),this.shine=new c.Shine(l),this.gradient=new c.Gradient(l),this.circle=new c.Circle(l),this.barrel=new c.Barrel(l),this.wipe=new c.Wipe(l),this.bokeh=new c.Bokeh(l);var f=[];f[h.GLOW]=this.onGlow,f[h.SHADOW]=this.onShadow,f[h.PIXELATE]=this.onPixelate,f[h.VIGNETTE]=this.onVignette,f[h.SHINE]=this.onShine,f[h.BLUR]=this.onBlur,f[h.GRADIENT]=this.onGradient,f[h.BLOOM]=this.onBloom,f[h.COLOR_MATRIX]=this.onColorMatrix,f[h.CIRCLE]=this.onCircle,f[h.BARREL]=this.onBarrel,f[h.DISPLACEMENT]=this.onDisplacement,f[h.WIPE]=this.onWipe,f[h.BOKEH]=this.onBokeh,this.fxHandlers=f,this.source,this.target,this.swap},onDraw:function(i,o,l){this.source=i,this.target=o,this.swap=l;var f=i.width,u=i.height,v=this.tempSprite,m=this.fxHandlers;if(v&&v.preFX)for(var x=v.preFX.list,g=0;g{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(95540),h=t(31063),r=t(57516),n=t(61340),e=t(26099),s=t(29100),a=new d({Extends:r,initialize:function(o){var l=c(o,"fragShader",h);o.fragShader=l.replace("%LIGHT_COUNT%",o.game.renderer.config.maxLights),r.call(this,o),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.currentNormalMap,this.lightsActive=!0,this.tempVec2=new e,this._tempMatrix=new n,this._tempMatrix2=new n},boot:function(){s.prototype.boot.call(this)},onRender:function(i,o){var l=i.sys.lights;if(this.lightsActive=!1,!(!l||!l.active)){var f=l.getLights(o),u=f.length;this.lightsActive=!0;var v,m=this.renderer,x=m.height,g=o.matrix,y=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",o.x,o.y,o.rotation,o.zoom),this.set3f("uAmbientLightColor",l.ambientColor.r,l.ambientColor.g,l.ambientColor.b),this.set1i("uLightCount",u),v=0;v0&&this.flush();var o=this.inverseRotationMatrix;if(i){var l=-i,f=Math.cos(l),u=Math.sin(l);o[1]=u,o[3]=-u,o[0]=o[4]=f}else o[0]=o[4]=1,o[1]=o[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,o),this.currentNormalMapRotation=i}},setTexture2D:function(i,o){var l=this.renderer;i===void 0&&(i=l.whiteTexture);var f=this.getNormalMap(o);this.isNewNormalMap(i,f)&&(this.flush(),this.createBatch(i),this.addTextureToBatch(f),this.currentNormalMap=f);var u=0;if(o&&o.parentContainer){var v=o.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);u=v.rotationNormalized}else o&&(u=o.rotation);return this.currentBatch===null&&(this.createBatch(i),this.addTextureToBatch(f)),this.setNormalMapRotation(u),0},setGameObject:function(i,o){o===void 0&&(o=i.frame);var l=o.glTexture,f=this.getNormalMap(i);if(this.isNewNormalMap(l,f)&&(this.flush(),this.createBatch(l),this.addTextureToBatch(f),this.currentNormalMap=f),i.parentContainer){var u=i.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(u.rotationNormalized)}else this.setNormalMapRotation(i.rotation);return this.currentBatch===null&&(this.createBatch(l),this.addTextureToBatch(f)),0},isNewNormalMap:function(i,o){return this.currentTexture!==i||this.currentNormalMap!==o},getNormalMap:function(i){var o;if(i)i.displayTexture?o=i.displayTexture.dataSource[i.displayFrame.sourceIndex]:i.texture?o=i.texture.dataSource[i.frame.sourceIndex]:i.tileset&&(Array.isArray(i.tileset)?o=i.tileset[0].image.dataSource[0]:o=i.tileset.image.dataSource[0]);else return this.renderer.normalTexture;return o?o.glTexture:this.renderer.normalTexture},batchSprite:function(i,o,l){this.lightsActive&&r.prototype.batchSprite.call(this,i,o,l)},batchTexture:function(i,o,l,f,u,v,m,x,g,y,T,C,E,M,P,A,F,L,B,N,U,z,I,G,O,b,D,X,V,W,K,Z){this.lightsActive&&r.prototype.batchTexture.call(this,i,o,l,f,u,v,m,x,g,y,T,C,E,M,P,A,F,L,B,N,U,z,I,G,O,b,D,X,V,W,K,Z)},batchTextureFrame:function(i,o,l,f,u,v,m){this.lightsActive&&r.prototype.batchTextureFrame.call(this,i,o,l,f,u,v,m)}});p.exports=a},56527:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(95540),h=t(57516),r=t(45561),n=t(60722),e=t(14500),s=t(29100),a=new d({Extends:h,initialize:function(o){o.fragShader=c(o,"fragShader",r),o.vertShader=c(o,"vertShader",n),o.attributes=c(o,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),o.forceZero=!0,o.resizeUniform="uResolution",h.call(this,o)},boot:function(){s.prototype.boot.call(this);var i=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",i.width,i.height)}});p.exports=a},57516:(p,S,t)=>{/** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(94811),h=t(95540),r=t(98840),n=t(44667),e=t(61340),s=t(70554),a=t(14500),i=t(29100),o=new d({Extends:i,initialize:function(f){var u=f.game.renderer,v=h(f,"fragShader",r);f.fragShader=s.parseFragmentShaderMaxTextures(v,u.maxTextures),f.vertShader=h(f,"vertShader",n),f.attributes=h(f,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:a.UNSIGNED_BYTE,normalized:!0}]),f.resizeUniform="uResolution",i.call(this,f),this._tempMatrix1=new e,this._tempMatrix2=new e,this._tempMatrix3=new e,this.calcMatrix=new e,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(){i.prototype.boot.call(this);var l=this.renderer;this.set1iv("uMainSampler",l.textureIndexes),this.set2f("uResolution",l.width,l.height)},batchSprite:function(l,f,u){this.manager.set(this,l);var v=this._tempMatrix1,m=this._tempMatrix2,x=this._tempMatrix3,g=l.frame,y=g.glTexture,T=g.u0,C=g.v0,E=g.u1,M=g.v1,P=g.x,A=g.y,F=g.cutWidth,L=g.cutHeight,B=g.customPivot,N=l.displayOriginX,U=l.displayOriginY,z=-N+P,I=-U+A;if(l.isCropped){var G=l._crop;(G.flipX!==l.flipX||G.flipY!==l.flipY)&&g.updateCropUVs(G,l.flipX,l.flipY),T=G.u0,C=G.v0,E=G.u1,M=G.v1,F=G.width,L=G.height,P=G.x,A=G.y,z=-N+P,I=-U+A}var O=1,b=1;l.flipX&&(B||(z+=-g.realWidth+N*2),O=-1),l.flipY&&(B||(I+=-g.realHeight+U*2),b=-1);var D=l.x,X=l.y;f.roundPixels&&(D=Math.floor(D),X=Math.floor(X)),m.applyITRS(D,X,l.rotation,l.scaleX*O,l.scaleY*b),v.copyFrom(f.matrix),u?(v.multiplyWithOffset(u,-f.scrollX*l.scrollFactorX,-f.scrollY*l.scrollFactorY),m.e=D,m.f=X):(m.e-=f.scrollX*l.scrollFactorX,m.f-=f.scrollY*l.scrollFactorY),v.multiply(m,x);var V=x.setQuad(z,I,z+F,I+L,f.renderRoundPixels),W=s.getTintAppendFloatAlpha,K=f.alpha,Z=W(l.tintTopLeft,K*l._alphaTL),Q=W(l.tintTopRight,K*l._alphaTR),j=W(l.tintBottomLeft,K*l._alphaBL),$=W(l.tintBottomRight,K*l._alphaBR);this.shouldFlush(6)&&this.flush();var _=this.setGameObject(l,g);this.manager.preBatch(l),this.batchQuad(l,V[0],V[1],V[2],V[3],V[4],V[5],V[6],V[7],T,C,E,M,Z,Q,j,$,l.tintFill,y,_),this.manager.postBatch(l)},batchTexture:function(l,f,u,v,m,x,g,y,T,C,E,M,P,A,F,L,B,N,U,z,I,G,O,b,D,X,V,W,K,Z,Q,j,$){$===void 0&&($=!1),this.manager.set(this,l);var _=this._tempMatrix1,et=this._tempMatrix2,q=this._tempMatrix3,rt=N/u+V,ot=U/v+W,ht=(N+z)/u+V,tt=(U+I)/v+W,st=g,nt=y,ut=-L,pt=-B;if(l.isCropped){var xt=l._crop,dt=xt.width,vt=xt.height;st=dt,nt=vt,g=dt,y=vt,N=xt.x,U=xt.y;var yt=N,Pt=U;M&&(yt=z-xt.x-dt),P&&(Pt=I-xt.y-vt),rt=yt/u+V,ot=Pt/v+W,ht=(yt+dt)/u+V,tt=(Pt+vt)/v+W,ut=-L+N,pt=-B+U}P=P^(!Q&&f.isRenderTexture?1:0),M&&(st*=-1,ut+=g),P&&(nt*=-1,pt+=y),K.roundPixels&&(m=Math.floor(m),x=Math.floor(x)),et.applyITRS(m,x,E,T,C),_.copyFrom(K.matrix),Z?(_.multiplyWithOffset(Z,-K.scrollX*A,-K.scrollY*F),et.e=m,et.f=x):(et.e-=K.scrollX*A,et.f-=K.scrollY*F),_.multiply(et,q);var mt=q.setQuad(ut,pt,ut+st,pt+nt,K.renderRoundPixels);j==null&&(j=this.setTexture2D(f)),l&&!$&&this.manager.preBatch(l),this.batchQuad(l,mt[0],mt[1],mt[2],mt[3],mt[4],mt[5],mt[6],mt[7],rt,ot,ht,tt,G,O,b,D,X,f,j),l&&!$&&this.manager.postBatch(l)},batchTextureFrame:function(l,f,u,v,m,x,g){this.manager.set(this);var y=this._tempMatrix1.copyFrom(x),T=this._tempMatrix2;g?y.multiply(g,T):T=y;var C=T.setQuad(f,u,f+l.width,u+l.height),E=this.setTexture2D(l.source.glTexture);v=s.getTintAppendFloatAlpha(v,m),this.batchQuad(null,C[0],C[1],C[2],C[3],C[4],C[5],C[6],C[7],l.u0,l.v0,l.u1,l.v1,v,v,v,v,0,l.glTexture,E)},batchFillRect:function(l,f,u,v,m,x){this.renderer.pipelines.set(this);var g=this.calcMatrix;x&&x.multiply(m,g);var y=g.setQuad(l,f,l+u,f+v),T=this.fillTint;this.batchQuad(null,y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],0,0,1,1,T.TL,T.TR,T.BL,T.BR,2)},batchFillTriangle:function(l,f,u,v,m,x,g,y){this.renderer.pipelines.set(this);var T=this.calcMatrix;y&&y.multiply(g,T);var C=T.getX(l,f),E=T.getY(l,f),M=T.getX(u,v),P=T.getY(u,v),A=T.getX(m,x),F=T.getY(m,x),L=this.fillTint;this.batchTri(null,C,E,M,P,A,F,0,0,1,1,L.TL,L.TR,L.BL,2)},batchStrokeTriangle:function(l,f,u,v,m,x,g,y,T){var C=this.tempTriangle;C[0].x=l,C[0].y=f,C[0].width=g,C[1].x=u,C[1].y=v,C[1].width=g,C[2].x=m,C[2].y=x,C[2].width=g,C[3].x=l,C[3].y=f,C[3].width=g,this.batchStrokePath(C,g,!1,y,T)},batchFillPath:function(l,f,u){this.renderer.pipelines.set(this);var v=this.calcMatrix;u&&u.multiply(f,v);for(var m=l.length,x=this.polygonCache,g,y,T=this.fillTint.TL,C=this.fillTint.TR,E=this.fillTint.BL,M=0;M0&&st[4]?this.batchQuad(null,_,et,Z,Q,st[0],st[1],st[2],st[3],0,0,1,1,rt,ot,ht,tt,2):(nt[0]=_,nt[1]=et,nt[2]=Z,nt[3]=Q,nt[4]=1),T&&nt[4]?this.batchQuad(null,W,K,j,$,nt[0],nt[1],nt[2],nt[3],0,0,1,1,rt,ot,ht,tt,2):(st[0]=W,st[1]=K,st[2]=j,st[3]=$,st[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,i.prototype.destroy.call(this),this}});p.exports=o},43439:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(95540),h=t(4127),r=t(89924),n=t(29100),e=new d({Extends:n,initialize:function(a){a.vertShader=c(a,"vertShader",r),a.fragShader=c(a,"fragShader",h),a.attributes=c(a,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),n.call(this,a)},onRender:function(s,a){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",a.zoom)},batchPointLight:function(s,a,i,o,l,f,u,v,m,x,g,y){var T=s.color,C=s.intensity,E=s.radius,M=s.attenuation,P=T.r*C,A=T.g*C,F=T.b*C,L=a.alpha*s.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(i,o,g,y,E,M,P,A,F,L),this.batchLightVert(l,f,g,y,E,M,P,A,F,L),this.batchLightVert(u,v,g,y,E,M,P,A,F,L),this.batchLightVert(i,o,g,y,E,M,P,A,F,L),this.batchLightVert(u,v,g,y,E,M,P,A,F,L),this.batchLightVert(m,x,g,y,E,M,P,A,F,L),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(s,a,i,o,l,f,u,v,m,x){var g=this.vertexViewF32,y=this.vertexCount*this.currentShader.vertexComponentCount-1;g[++y]=s,g[++y]=a,g[++y]=i,g[++y]=o,g[++y]=l,g[++y]=f,g[++y]=u,g[++y]=v,g[++y]=m,g[++y]=x,this.vertexCount++}});p.exports=e},84057:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(89422),h=t(95540),r=t(27681),n=t(49627),e=t(29100),s=new d({Extends:e,initialize:function(i){i.renderTarget=h(i,"renderTarget",1),i.fragShader=h(i,"fragShader",r),i.vertShader=h(i,"vertShader",n),i.attributes=h(i,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),i.batchSize=1,i.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],e.call(this,i),this.isPostFX=!0,this.gameObject,this.controller,this.colorMatrix=new c,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines)},bootFX:function(){e.prototype.boot.call(this);var a=this.manager.UTILITY_PIPELINE;this.fullFrame1=a.fullFrame1,this.fullFrame2=a.fullFrame2,this.halfFrame1=a.halfFrame1,this.halfFrame2=a.halfFrame2;var i=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",i.width,i.height);for(var o=this.renderTargets,l=0;l{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(10312),c=t(67502),h=t(83419),r=t(96293),n=t(95540),e=t(57516),s=t(27681),a=t(87841),i=t(32302),o=t(45561),l=t(60722),f=t(29100),u=new h({Extends:e,initialize:function(m){var x=n(m,"fragShader",s),g=n(m,"vertShader",l),y=n(m,"drawShader",s),T=[{name:"DrawSprite",fragShader:o,vertShader:l},{name:"CopySprite",fragShader:x,vertShader:g},{name:"DrawGame",fragShader:y,vertShader:l},{name:"ColorMatrix",fragShader:r}],C=n(m,"shaders",[]);m.shaders=T.concat(C),m.vertShader||(m.vertShader=g),m.batchSize=1,e.call(this,m),this.isPreFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.colorMatrixShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new a,this.targetBounds=new a,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){f.prototype.boot.call(this);var v=this.shaders,m=this.renderer;this.drawSpriteShader=v[0],this.copyShader=v[1],this.gameShader=v[2],this.colorMatrixShader=v[3],this.fsTarget=new i(m,m.width,m.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var x=new ArrayBuffer(168);this.quadVertexData=x,this.quadVertexViewF32=new Float32Array(x),this.quadVertexBuffer=m.createVertexBuffer(x,this.gl.STATIC_DRAW),this.onResize(m.width,m.height),this.currentShader=this.copyShader,this.set2f("uResolution",m.width,m.height)},onResize:function(v,m){var x=this.quadVertexViewF32;x[1]=m,x[22]=m,x[14]=v,x[28]=v,x[35]=v,x[36]=m},batchQuad:function(v,m,x,g,y,T,C,E,M,P,A,F,L,B,N,U,z,I,G){var O=Math.min(m,g,T,E),b=Math.min(x,y,C,M),D=Math.max(m,g,T,E),X=Math.max(x,y,C,M),V=D-O,W=X-b,K=this.spriteBounds.setTo(O,b,V,W),Z=v?v.preFX.padding:0,Q=V+Z*2,j=W+Z*2,$=Math.abs(Math.max(Q,j)),_=this.manager.getRenderTarget($),et=this.targetBounds.setTo(0,0,_.width,_.height);c(et,Math.round(K.centerX),Math.round(K.centerY)),this.tempSprite=v;var q=this.gl,rt=this.renderer;rt.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.set2f("uResolution",rt.width,rt.height),this.flipProjectionMatrix(!0),v&&(this.onDrawSprite(v,_),v.preFX.onFX(this));var ot=this.fsTarget;return this.flush(),q.viewport(0,0,rt.width,rt.height),q.bindFramebuffer(q.FRAMEBUFFER,ot.framebuffer.webGLFramebuffer),q.framebufferTexture2D(q.FRAMEBUFFER,q.COLOR_ATTACHMENT0,q.TEXTURE_2D,ot.texture.webGLTexture,0),q.clearColor(0,0,0,0),q.clear(q.COLOR_BUFFER_BIT),this.setTexture2D(G),this.batchVert(m,x,P,A,0,I,B),this.batchVert(g,y,P,L,0,I,U),this.batchVert(T,C,F,L,0,I,z),this.batchVert(m,x,P,A,0,I,B),this.batchVert(T,C,F,L,0,I,z),this.batchVert(E,M,F,A,0,I,N),this.flush(),this.flipProjectionMatrix(!1),q.activeTexture(q.TEXTURE0),q.bindTexture(q.TEXTURE_2D,_.texture.webGLTexture),q.copyTexSubImage2D(q.TEXTURE_2D,0,0,0,et.x,et.y,et.width,et.height),q.bindFramebuffer(q.FRAMEBUFFER,null),q.bindTexture(q.TEXTURE_2D,null),this.onBatch(v),this.currentShader=this.copyShader,this.onDraw(_,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(v,m,x,g,y,T,C){x===void 0&&(x=!0),g===void 0&&(g=!0),y===void 0&&(y=!1),C===void 0&&(C=this.copyShader);var E=this.gl,M=this.tempSprite;T&&(C=this.colorMatrixShader),this.currentShader=C;var P=this.setVertexBuffer(this.quadVertexBuffer);C.bind(P,!1);var A=this.renderer;if(this.set1i("uMainSampler",0),this.set2f("uResolution",A.width,A.height),M.preFX.onFXCopy(this),this.onCopySprite(v,m,M),T&&(this.set1fv("uColorMatrix",T.getData()),this.set1f("uAlpha",T.alpha)),E.activeTexture(E.TEXTURE0),E.bindTexture(E.TEXTURE_2D,v.texture.webGLTexture),v.height>m.height)E.viewport(0,0,v.width,v.height),this.setTargetUVs(v,m);else{var F=m.height-v.height;E.viewport(0,F,v.width,v.height),this.resetUVs()}if(E.bindFramebuffer(E.FRAMEBUFFER,m.framebuffer.webGLFramebuffer),E.framebufferTexture2D(E.FRAMEBUFFER,E.COLOR_ATTACHMENT0,E.TEXTURE_2D,m.texture.webGLTexture,0),x&&(E.clearColor(0,0,0,+!g),E.clear(E.COLOR_BUFFER_BIT)),y){var L=this.renderer.currentBlendMode;this.renderer.setBlendMode(d.ERASE)}E.bufferData(E.ARRAY_BUFFER,this.quadVertexData,E.STATIC_DRAW),E.drawArrays(E.TRIANGLES,0,6),y&&this.renderer.setBlendMode(L),E.bindFramebuffer(E.FRAMEBUFFER,null)},copy:function(v,m){var x=this.gl;this.set1i("uMainSampler",0),x.activeTexture(x.TEXTURE0),x.bindTexture(x.TEXTURE_2D,v.texture.webGLTexture),x.viewport(0,0,v.width,v.height),this.setUVs(0,0,0,1,1,1,1,0),x.bindFramebuffer(x.FRAMEBUFFER,m.framebuffer.webGLFramebuffer),x.framebufferTexture2D(x.FRAMEBUFFER,x.COLOR_ATTACHMENT0,x.TEXTURE_2D,m.texture.webGLTexture,0),x.clearColor(0,0,0,0),x.clear(x.COLOR_BUFFER_BIT),x.bufferData(x.ARRAY_BUFFER,this.quadVertexData,x.STATIC_DRAW),x.drawArrays(x.TRIANGLES,0,6),x.bindFramebuffer(x.FRAMEBUFFER,null)},blendFrames:function(v,m,x,g,y){this.manager.blendFrames(v,m,x,g,y)},blendFramesAdditive:function(v,m,x,g,y){this.manager.blendFramesAdditive(v,m,x,g,y)},drawToGame:function(v){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(v)},copyToGame:function(v){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(v)},bindAndDraw:function(v){var m=this.gl,x=this.renderer;this.set1i("uMainSampler",0),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(v.texture);var g=this._tempMatrix1.loadIdentity(),y=this.targetBounds.x,T=this.targetBounds.y,C=y+v.width,E=T+v.height,M=g.getX(y,T),P=g.getX(y,E),A=g.getX(C,E),F=g.getX(C,T),L=g.getY(y,T),B=g.getY(y,E),N=g.getY(C,E),U=g.getY(C,T),z=16777215;this.batchVert(M,L,0,0,0,0,z),this.batchVert(P,B,0,1,0,0,z),this.batchVert(A,N,1,1,0,0,z),this.batchVert(M,L,0,0,0,0,z),this.batchVert(A,N,1,1,0,0,z),this.batchVert(F,U,1,0,0,0,z),x.restoreFramebuffer(!1,!0),x.currentFramebuffer||m.viewport(0,0,x.width,x.height),x.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(v){this.drawToGame(v)},setUVs:function(v,m,x,g,y,T,C,E){var M=this.quadVertexViewF32;M[2]=v,M[3]=m,M[9]=x,M[10]=g,M[16]=y,M[17]=T,M[23]=v,M[24]=m,M[30]=y,M[31]=T,M[37]=C,M[38]=E},setTargetUVs:function(v,m){var x=m.height/v.height;x>.5?x=.5-(x-.5):x=.5+(.5-x),this.setUVs(0,x,0,1+x,1,1+x,1,x)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)},destroy:function(){return this.renderer.deleteBuffer(this.quadVertexBuffer),this.drawSpriteShader=null,this.copyShader=null,this.gameShader=null,this.colorMatrixShader=null,this.quadVertexData=null,this.quadVertexBuffer=null,this.quadVertexViewF32=null,this.fsTarget=null,this.tempSprite=null,e.prototype.destroy.call(this),this}});p.exports=u},81041:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(95540),h=t(57516),r=new d({Extends:h,initialize:function(e){e.topology=5,e.batchSize=c(e,"batchSize",256),h.call(this,e)}});p.exports=r},12385:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(95540),h=t(57516),r=t(45561),n=t(60722),e=t(29100),s=new d({Extends:h,initialize:function(i){i.fragShader=c(i,"fragShader",r),i.vertShader=c(i,"vertShader",n),i.forceZero=!0,h.call(this,i)},boot:function(){e.prototype.boot.call(this);var a=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",a.width,a.height)}});p.exports=s},7589:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(35407),c=t(10312),h=t(83419),r=t(89422),n=t(96293),e=t(36682),s=t(95540),a=t(48247),i=t(49627),o=t(29100),l=new h({Extends:o,initialize:function(u){u.renderTarget=s(u,"renderTarget",[{scale:1,autoResize:!0},{scale:1,autoResize:!0},{scale:.5,autoResize:!0},{scale:.5,autoResize:!0}]),u.vertShader=s(u,"vertShader",i),u.shaders=s(u,"shaders",[{name:"Copy",fragShader:e},{name:"AddBlend",fragShader:d},{name:"LinearBlend",fragShader:a},{name:"ColorMatrix",fragShader:n}]),u.attributes=s(u,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),u.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],u.batchSize=1,o.call(this,u),this.colorMatrix=new r,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){o.prototype.boot.call(this);var f=this.shaders,u=this.renderTargets;this.copyShader=f[0],this.addShader=f[1],this.linearShader=f[2],this.colorMatrixShader=f[3],this.fullFrame1=u[0],this.fullFrame2=u[1],this.halfFrame1=u[2],this.halfFrame2=u[3]},copyFrame:function(f,u,v,m,x){v===void 0&&(v=1),m===void 0&&(m=!0),x===void 0&&(x=!0);var g=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",v),g.activeTexture(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,f.texture.webGLTexture),u?(g.viewport(0,0,u.width,u.height),g.bindFramebuffer(g.FRAMEBUFFER,u.framebuffer.webGLFramebuffer),g.framebufferTexture2D(g.FRAMEBUFFER,g.COLOR_ATTACHMENT0,g.TEXTURE_2D,u.texture.webGLTexture,0)):g.viewport(0,0,f.width,f.height),m&&(x?g.clearColor(0,0,0,0):g.clearColor(0,0,0,1),g.clear(g.COLOR_BUFFER_BIT)),g.bufferData(g.ARRAY_BUFFER,this.vertexData,g.STATIC_DRAW),g.drawArrays(g.TRIANGLES,0,6),g.bindFramebuffer(g.FRAMEBUFFER,null),g.bindTexture(g.TEXTURE_2D,null)},blitFrame:function(f,u,v,m,x,g,y){v===void 0&&(v=1),m===void 0&&(m=!0),x===void 0&&(x=!0),g===void 0&&(g=!1),y===void 0&&(y=!1);var T=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",v),T.activeTexture(T.TEXTURE0),T.bindTexture(T.TEXTURE_2D,f.texture.webGLTexture),f.height>u.height)T.viewport(0,0,f.width,f.height),this.setTargetUVs(f,u);else{var C=u.height-f.height;T.viewport(0,C,f.width,f.height)}if(T.bindFramebuffer(T.FRAMEBUFFER,u.framebuffer.webGLFramebuffer),T.framebufferTexture2D(T.FRAMEBUFFER,T.COLOR_ATTACHMENT0,T.TEXTURE_2D,u.texture.webGLTexture,0),m&&(x?T.clearColor(0,0,0,0):T.clearColor(0,0,0,1),T.clear(T.COLOR_BUFFER_BIT)),g){var E=this.renderer.currentBlendMode;this.renderer.setBlendMode(c.ERASE)}y&&this.flipY(),T.bufferData(T.ARRAY_BUFFER,this.vertexData,T.STATIC_DRAW),T.drawArrays(T.TRIANGLES,0,6),g&&this.renderer.setBlendMode(E),T.bindFramebuffer(T.FRAMEBUFFER,null),T.bindTexture(T.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(f,u,v,m,x,g,y,T){y===void 0&&(y=!0),T===void 0&&(T=!0);var C=this.gl;C.bindFramebuffer(C.FRAMEBUFFER,f.framebuffer.webGLFramebuffer),C.framebufferTexture2D(C.FRAMEBUFFER,C.COLOR_ATTACHMENT0,C.TEXTURE_2D,f.texture.webGLTexture,0),y&&(T?C.clearColor(0,0,0,0):C.clearColor(0,0,0,1),C.clear(C.COLOR_BUFFER_BIT)),C.activeTexture(C.TEXTURE0),C.bindTexture(C.TEXTURE_2D,u.texture.webGLTexture),C.copyTexSubImage2D(C.TEXTURE_2D,0,0,0,v,m,x,g),C.bindFramebuffer(C.FRAMEBUFFER,null),C.bindTexture(C.TEXTURE_2D,null)},copyToGame:function(f){var u=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),u.activeTexture(u.TEXTURE0),u.bindTexture(u.TEXTURE_2D,f.texture.webGLTexture),u.bufferData(u.ARRAY_BUFFER,this.vertexData,u.STATIC_DRAW),u.drawArrays(u.TRIANGLES,0,6)},drawFrame:function(f,u,v,m){v===void 0&&(v=!0),m===void 0&&(m=this.colorMatrix);var x=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",m.getData()),this.set1f("uAlpha",m.alpha),x.activeTexture(x.TEXTURE0),x.bindTexture(x.TEXTURE_2D,f.texture.webGLTexture),u?(x.viewport(0,0,u.width,u.height),x.bindFramebuffer(x.FRAMEBUFFER,u.framebuffer.webGLFramebuffer),x.framebufferTexture2D(x.FRAMEBUFFER,x.COLOR_ATTACHMENT0,x.TEXTURE_2D,u.texture.webGLTexture,0)):x.viewport(0,0,f.width,f.height),v?x.clearColor(0,0,0,0):x.clearColor(0,0,0,1),x.clear(x.COLOR_BUFFER_BIT),x.bufferData(x.ARRAY_BUFFER,this.vertexData,x.STATIC_DRAW),x.drawArrays(x.TRIANGLES,0,6),x.bindFramebuffer(x.FRAMEBUFFER,null),x.bindTexture(x.TEXTURE_2D,null)},blendFrames:function(f,u,v,m,x,g){m===void 0&&(m=1),x===void 0&&(x=!0),g===void 0&&(g=this.linearShader);var y=this.gl;this.setShader(g),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",m),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,f.texture.webGLTexture),y.activeTexture(y.TEXTURE1),y.bindTexture(y.TEXTURE_2D,u.texture.webGLTexture),v?(y.bindFramebuffer(y.FRAMEBUFFER,v.framebuffer.webGLFramebuffer),y.framebufferTexture2D(y.FRAMEBUFFER,y.COLOR_ATTACHMENT0,y.TEXTURE_2D,v.texture.webGLTexture,0),y.viewport(0,0,v.width,v.height)):y.viewport(0,0,f.width,f.height),x?y.clearColor(0,0,0,0):y.clearColor(0,0,0,1),y.clear(y.COLOR_BUFFER_BIT),y.bufferData(y.ARRAY_BUFFER,this.vertexData,y.STATIC_DRAW),y.drawArrays(y.TRIANGLES,0,6),y.bindFramebuffer(y.FRAMEBUFFER,null),y.bindTexture(y.TEXTURE_2D,null)},blendFramesAdditive:function(f,u,v,m,x){this.blendFrames(f,u,v,m,x,this.addShader)},clearFrame:function(f,u){u===void 0&&(u=!0);var v=this.gl;v.viewport(0,0,f.width,f.height),v.bindFramebuffer(v.FRAMEBUFFER,f.framebuffer.webGLFramebuffer),u?v.clearColor(0,0,0,0):v.clearColor(0,0,0,1),v.clear(v.COLOR_BUFFER_BIT);var m=this.renderer.currentFramebuffer;v.bindFramebuffer(v.FRAMEBUFFER,m.webGLFramebuffer)},setUVs:function(f,u,v,m,x,g,y,T){var C=this.vertexViewF32;C[2]=f,C[3]=u,C[6]=v,C[7]=m,C[10]=x,C[11]=g,C[14]=f,C[15]=u,C[18]=x,C[19]=g,C[22]=y,C[23]=T},setTargetUVs:function(f,u){var v=u.height/f.height;v>.5?v=.5-(v-.5):v=.5+(.5-v),this.setUVs(0,v,0,1+v,1,1+v,1,v)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});p.exports=l},36060:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={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"};p.exports=S},84817:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="pipelineafterflush"},36712:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="pipelinebeforeflush"},40285:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="pipelinebind"},65918:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="pipelineboot"},92852:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="pipelinedestroy"},56072:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="pipelinerebind"},57566:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="pipelineresize"},77085:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={AFTER_FLUSH:t(84817),BEFORE_FLUSH:t(36712),BIND:t(40285),BOOT:t(65918),DESTROY:t(92852),REBIND:t(56072),RESIZE:t(57566)}},54812:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(99155),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.amount=1},onPreRender:function(n,e){n=this.getController(n),this.set1f("amount",n.amount,e)}});p.exports=r},67329:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(24400),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.steps=4,this.offsetX=1,this.offsetY=1,this.blurStrength=1,this.strength=1,this.glcolor=[1,1,1]},onPreRender:function(n){n=this.getController(n),this.set1f("strength",n.blurStrength),this.set3fv("color",n.glcolor)},onDraw:function(n){var e=this.getController(),s=this.fullFrame1,a=this.fullFrame2;this.copyFrame(n,a);for(var i=2/n.width*e.offsetX,o=2/n.height*e.offsetY,l=0;l{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(41514),h=t(51078),r=t(94328),n=t(84057),e=new d({Extends:n,initialize:function(a){n.call(this,{game:a,shaders:[{name:"Gaussian5",fragShader:c},{name:"Gaussian9",fragShader:h},{name:"Gaussian13",fragShader:r}]}),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(s){var a=this.getController(),i=this.gl,o=this.fullFrame1,l=i.getParameter(i.FRAMEBUFFER_BINDING);this.bind(this.shaders[a.quality]),i.activeTexture(i.TEXTURE0),i.viewport(0,0,s.width,s.height),this.set1i("uMainSampler",0),this.set2f("resolution",s.width,s.height),this.set1f("strength",a.strength),this.set3fv("color",a.glcolor);for(var f=0;f{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(90610),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.isTiltShift=!1,this.strength=1,this.blurX=1,this.blurY=1,this.radius=.5,this.amount=1,this.contrast=.2},onPreRender:function(n,e,s,a){n=this.getController(n),this.set1f("radius",n.radius,e),this.set1f("amount",n.amount,e),this.set1f("contrast",n.contrast,e),this.set1f("strength",n.strength,e),this.set2f("blur",n.blurX,n.blurY,e),this.setBoolean("isTiltShift",n.isTiltShift,e),s&&a&&this.set2f("resolution",s,a,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});p.exports=r},89428:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(91899),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.scale=1,this.feather=.005,this.thickness=8,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4]},onPreRender:function(n,e,s,a){n=this.getController(n),this.set1f("scale",n.scale,e),this.set1f("feather",n.feather,e),this.set1f("thickness",n.thickness,e),this.set3fv("color",n.glcolor,e),this.set4fv("backgroundColor",n.glcolor2,e),s&&a&&this.set2f("resolution",s,a,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});p.exports=r},88904:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(84057),h=new d({Extends:c,initialize:function(n){c.call(this,{game:n})},onDraw:function(r){var n=this.fullFrame1;this.controller?this.manager.drawFrame(r,n,!0,this.controller):this.drawFrame(r,n),this.copyToGame(n)}});p.exports=h},63563:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(47838),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.x=.005,this.y=.005,this.glTexture},onBoot:function(){this.setTexture("__WHITE")},setTexture:function(n){var e=this.game.textures.getFrame(n);e&&(this.glTexture=e.glTexture)},onDraw:function(n){var e=this.getController(),s=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(n,s),this.copyToGame(s)}});p.exports=r},94045:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(95540),h=t(98656),r=t(84057),n=t(70554),e=new d({Extends:r,initialize:function(a,i){var o=c(i,"quality",.1),l=c(i,"distance",10);r.call(this,{game:a,fragShader:n.setGlowQuality(h,a,o,l)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(s,a,i,o){s=this.getController(s),this.set1f("outerStrength",s.outerStrength,a),this.set1f("innerStrength",s.innerStrength,a),this.set4fv("glowColor",s.glcolor,a),this.setBoolean("knockout",s.knockout,a),i&&o&&this.set2f("resolution",i,o,a)},onDraw:function(s){this.set2f("resolution",s.width,s.height),this.bindAndDraw(s)}});p.exports=e},74088:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(70463),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),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(n,e){n=this.getController(n),this.set1f("alpha",n.alpha,e),this.set1i("size",n.size,e),this.set3fv("color1",n.glcolor1,e),this.set3fv("color2",n.glcolor2,e),this.set2f("positionFrom",n.fromX,n.fromY,e),this.set2f("positionTo",n.toX,n.toY,e)}});p.exports=r},99636:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(50831),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.amount=1},onPreRender:function(n,e,s,a){n=this.getController(n),this.set1f("amount",n.amount,e),s&&a&&this.set2f("resolution",s,a,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});p.exports=r},34700:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(92595),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),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(n,e){n=this.getController(n);var s=n.samples;this.set1i("samples",s,e),this.set1f("intensity",n.intensity,e),this.set1f("decay",n.decay,e),this.set1f("power",n.power/s,e),this.set2f("lightPosition",n.x,n.y,e),this.set4fv("color",n.glcolor,e)}});p.exports=r},91157:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(72464),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.speed=.5,this.lineWidth=.5,this.gradient=3,this.reveal=!1},onPreRender:function(n,e,s,a){n=this.getController(n),this.setTime("time",e),this.set1f("speed",n.speed,e),this.set1f("lineWidth",n.lineWidth,e),this.set1f("gradient",n.gradient,e),this.setBoolean("reveal",n.reveal,e),s&&a&&this.set2f("resolution",s,a,e)},onDraw:function(n){this.set2f("resolution",n.width,n.height),this.bindAndDraw(n)}});p.exports=r},27797:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(39249),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.x=.5,this.y=.5,this.radius=.5,this.strength=.5},onPreRender:function(n,e){n=this.getController(n),this.set1f("radius",n.radius,e),this.set1f("strength",n.strength,e),this.set2f("position",n.x,n.y,e)}});p.exports=r},67603:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(2878),h=t(84057),r=new d({Extends:h,initialize:function(e){h.call(this,{game:e,fragShader:c}),this.progress=0,this.wipeWidth=.1,this.direction=0,this.axis=0,this.reveal=!1},onPreRender:function(n,e){n=this.getController(n);var s=n.progress,a=n.wipeWidth,i=n.direction,o=n.axis;this.set4f("config",s,a,i,o,e),this.setBoolean("reveal",n.reveal,e)}});p.exports=r},58918:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d={Barrel:t(54812),Bloom:t(67329),Blur:t(8861),Bokeh:t(51051),Circle:t(89428),ColorMatrix:t(88904),Displacement:t(63563),Glow:t(94045),Gradient:t(74088),Pixelate:t(99636),Shadow:t(34700),Shine:t(91157),Vignette:t(27797),Wipe:t(67603)};p.exports=d},96615:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(36060),c=t(79291),h={FX:t(58918),BitmapMaskPipeline:t(31302),Events:t(77085),FXPipeline:t(92651),LightPipeline:t(96569),MobilePipeline:t(56527),MultiPipeline:t(57516),PointLightPipeline:t(43439),PostFXPipeline:t(84057),PreFXPipeline:t(43558),RopePipeline:t(81041),SinglePipeline:t(12385),UtilityPipeline:t(7589)};h=c(!1,h,d),p.exports=h},35407:p=>{p.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(` `)},78908:p=>{p.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(` `)},85191:p=>{p.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(` `)},96293:p=>{p.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(` `)},36682:p=>{p.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(` `)},99155:p=>{p.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(` `)},24400:p=>{p.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(` `)},94328:p=>{p.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(` `)},41514:p=>{p.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(` `)},51078:p=>{p.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(` `)},90610:p=>{p.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(` `)},91899:p=>{p.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(` `)},47838:p=>{p.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(` `)},98656:p=>{p.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(` `)},70463:p=>{p.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(` `)},50831:p=>{p.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(` `)},92595:p=>{p.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(` `)},72464:p=>{p.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 ()","{"," vec2 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(` `)},39249:p=>{p.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);"," col = vec4(g * g * g);"," }"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = texture * (1.0 - col);","}"].join(` `)},2878:p=>{p.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(` `)},31063:p=>{p.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(` `)},48247:p=>{p.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(` `)},41214:p=>{p.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(` `)},39653:p=>{p.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(` `)},62143:p=>{p.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(` `)},47940:p=>{p.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(` `)},98840:p=>{p.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(` `)},44667:p=>{p.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(` `)},4127:p=>{p.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(` `)},89924:p=>{p.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(` `)},27681:p=>{p.exports=["#define SHADER_NAME PHASER_POSTFX_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}"].join(` `)},49627:p=>{p.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(` `)},45561:p=>{p.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(` `)},60722:p=>{p.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(` `)},89350:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={AddBlendFrag:t(35407),BitmapMaskFrag:t(78908),BitmapMaskVert:t(85191),ColorMatrixFrag:t(96293),CopyFrag:t(36682),FXBarrelFrag:t(99155),FXBloomFrag:t(24400),FXBlurHighFrag:t(94328),FXBlurLowFrag:t(41514),FXBlurMedFrag:t(51078),FXBokehFrag:t(90610),FXCircleFrag:t(91899),FXDisplacementFrag:t(47838),FXGlowFrag:t(98656),FXGradientFrag:t(70463),FXPixelateFrag:t(50831),FXShadowFrag:t(92595),FXShineFrag:t(72464),FXVignetteFrag:t(39249),FXWipeFrag:t(2878),LightFrag:t(31063),LinearBlendFrag:t(48247),MeshFrag:t(41214),MeshVert:t(39653),MobileFrag:t(62143),MobileVert:t(47940),MultiFrag:t(98840),MultiVert:t(44667),PointLightFrag:t(4127),PointLightVert:t(89924),PostFXFrag:t(27681),QuadVert:t(49627),SingleFrag:t(45561),SingleVert:t(60722)}},93567:(p,S,t)=>{/** * @author Benjamin D. Richards * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=new d({initialize:function(r,n,e){this.webGLAttribLocation=-1,this.gl=r,this.program=n,this.name=e,this.createResource()},createResource:function(){if(this.program.webGLProgram===null){this.webGLAttribLocation=-1;return}var h=this.gl;h.isContextLost()||(this.webGLAttribLocation=h.getAttribLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLAttribLocation=-1}});p.exports=c},26128:(p,S,t)=>{/** * @author Benjamin D. Richards * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=new d({initialize:function(r,n,e,s){this.webGLBuffer=null,this.gl=r,this.initialDataOrSize=n,this.bufferType=e,this.bufferUsage=s,this.createResource()},createResource:function(){if(this.initialDataOrSize!==null){var h=this.gl;if(!h.isContextLost()){var r=this.bufferType,n=h.createBuffer();this.webGLBuffer=n,h.bindBuffer(r,this.webGLBuffer),h.bufferData(r,this.initialDataOrSize,this.bufferUsage),h.bindBuffer(r,null)}}},destroy:function(){var h=this.gl;h.isContextLost()||h.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.initialDataOrSize=null,this.gl=null}});p.exports=c},84387:(p,S,t)=>{/** * @author Benjamin D. Richards * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},h=new d({initialize:function(n,e,s,a,i){this.webGLFramebuffer=null,this.gl=n,this.width=e,this.height=s,this.renderTexture=a,this.addDepthStencilBuffer=!!i,this.createResource()},createResource:function(){var r=this.gl;if(!r.isContextLost()){var n=this.renderTexture,e=0,s=r.createFramebuffer();if(this.webGLFramebuffer=s,r.bindFramebuffer(r.FRAMEBUFFER,s),n.isRenderTexture=!0,n.isAlphaPremultiplied=!1,r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,n.webGLTexture,0),e=r.checkFramebufferStatus(r.FRAMEBUFFER),e!==r.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer status: "+(c[e]||e));if(this.addDepthStencilBuffer){var a=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,a),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,this.width,this.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,a)}r.bindFramebuffer(r.FRAMEBUFFER,null)}},destroy:function(){if(this.webGLFramebuffer!==null){var r=this.gl;if(!r.isContextLost()){r.bindFramebuffer(r.FRAMEBUFFER,this.webGLFramebuffer);var n=r.getFramebufferAttachmentParameter(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);n!==null&&(r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,null,0),r.deleteTexture(n));var e=r.getFramebufferAttachmentParameter(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);e!==null&&r.deleteRenderbuffer(e),r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(this.webGLFramebuffer)}this.renderTexture=null,this.webGLFramebuffer=null,this.gl=null}}});p.exports=h},1482:(p,S,t)=>{/** * @author Benjamin D. Richards * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=new d({initialize:function(r,n,e){this.webGLProgram=null,this.gl=r,this.vertexSource=n,this.fragmentSource=e,this.createResource()},createResource:function(){var h=this.gl;if(!h.isContextLost()){var r=h.createProgram(),n=h.createShader(h.VERTEX_SHADER),e=h.createShader(h.FRAGMENT_SHADER);h.shaderSource(n,this.vertexSource),h.shaderSource(e,this.fragmentSource),h.compileShader(n),h.compileShader(e);var s=`Shader failed: `;if(!h.getShaderParameter(n,h.COMPILE_STATUS))throw new Error("Vertex "+s+h.getShaderInfoLog(n));if(!h.getShaderParameter(e,h.COMPILE_STATUS))throw new Error("Fragment "+s+h.getShaderInfoLog(e));if(h.attachShader(r,n),h.attachShader(r,e),h.linkProgram(r),!h.getProgramParameter(r,h.LINK_STATUS))throw new Error("Link "+s+h.getProgramInfoLog(r));h.useProgram(r),this.webGLProgram=r}},destroy:function(){this.webGLProgram&&(this.gl.isContextLost()||this.gl.deleteProgram(this.webGLProgram),this.webGLProgram=null,this.gl=null)}});p.exports=c},82751:(p,S,t)=>{/** * @author Benjamin D. Richards * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(50030),h=new d({initialize:function(n,e,s,a,i,o,l,f,u,v,m,x,g){this.webGLTexture=null,this.isRenderTexture=!1,this.gl=n,this.mipLevel=e,this.minFilter=s,this.magFilter=a,this.wrapT=i,this.wrapS=o,this.format=l,this.pixels=f,this.width=u,this.height=v,this.pma=m??!0,this.forceSize=!!x,this.flipY=!!g,this.__SPECTOR_Metadata={},this.createResource()},createResource:function(){var r=this.gl;if(!r.isContextLost()){if(this.pixels instanceof h){this.webGLTexture=this.pixels.webGLTexture;return}var n=r.createTexture();n.__SPECTOR_Metadata=this.__SPECTOR_Metadata,this.webGLTexture=n,this._processTexture()}},update:function(r,n,e,s,a,i,o,l,f){if(!(n===0||e===0)){this.pixels=r,this.width=n,this.height=e,this.flipY=s,this.wrapS=a,this.wrapT=i,this.minFilter=o,this.magFilter=l,this.format=f;var u=this.gl;u.isContextLost()||this._processTexture()}},_processTexture:function(){var r=this.gl;r.activeTexture(r.TEXTURE0);var n=r.getParameter(r.TEXTURE_BINDING_2D);r.bindTexture(r.TEXTURE_2D,this.webGLTexture),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,this.minFilter),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,this.magFilter),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this.wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this.wrapT),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.pma),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,this.flipY);var e=this.pixels,s=this.mipLevel,a=this.width,i=this.height,o=this.format,l=!1;if(e==null)r.texImage2D(r.TEXTURE_2D,s,o,a,i,0,o,r.UNSIGNED_BYTE,null),l=c(a,i);else if(e.compressed){a=e.width,i=e.height,l=e.generateMipmap;for(var f=0;f{/** * @author Benjamin D. Richards * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=new d({initialize:function(r,n,e){this.webGLUniformLocation=null,this.gl=r,this.program=n,this.name=e,this.createResource()},createResource:function(){if(this.program.webGLProgram===null){this.webGLUniformLocation=null;return}var h=this.gl;h.isContextLost()||(this.webGLUniformLocation=h.getUniformLocation(this.program.webGLProgram,this.name))},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLUniformLocation=null}});p.exports=c},9503:(p,S,t)=>{/** * @author Benjamin D. Richards * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d={WebGLAttribLocationWrapper:t(93567),WebGLBufferWrapper:t(26128),WebGLProgramWrapper:t(1482),WebGLTextureWrapper:t(82751),WebGLFramebufferWrapper:t(84387),WebGLUniformLocationWrapper:t(57183)};p.exports=d},76531:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(13560),c=t(83419),h=t(45319),r=t(50792),n=t(97480),e=t(8443),s=t(57811),a=t(74403),i=t(45818),o=t(29747),l=t(87841),f=t(86555),u=t(56583),v=t(26099),m=t(38058),x=new c({Extends:r,initialize:function(y){r.call(this),this.game=y,this.canvas,this.canvasBounds=new l,this.parent=null,this.parentIsWindow=!1,this.parentSize=new f,this.gameSize=new f,this.baseSize=new f,this.displaySize=new f,this.scaleMode=d.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new v(1,1),this.autoRound=!1,this.autoCenter=d.CENTER.NO_CENTER,this.orientation=d.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:o,windowResize:o,fullScreenChange:o,fullScreenError:o}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(e.BOOT,this.boot,this)},boot:function(){var g=this.game;this.canvas=g.canvas,this.fullscreen=g.device.fullscreen;var y=this.scaleMode;y!==d.SCALE_MODE.RESIZE&&y!==d.SCALE_MODE.EXPAND&&this.displaySize.setAspectMode(y),y===d.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),g.events.on(e.PRE_STEP,this.step,this),g.events.once(e.READY,this.refresh,this),g.events.once(e.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(g){this.getParent(g),this.getParentBounds();var y=g.width,T=g.height,C=g.scaleMode,E=g.zoom,M=g.autoRound;if(typeof y=="string")if(y.substr(-1)!=="%")y=parseInt(y,10);else{var P=this.parentSize.width;P===0&&(P=window.innerWidth);var A=parseInt(y,10)/100;y=Math.floor(P*A)}if(typeof T=="string")if(T.substr(-1)!=="%")T=parseInt(T,10);else{var F=this.parentSize.height;F===0&&(F=window.innerHeight);var L=parseInt(T,10)/100;T=Math.floor(F*L)}this.scaleMode=C,this.autoRound=M,this.autoCenter=g.autoCenter,this.resizeInterval=g.resizeInterval,M&&(y=Math.floor(y),T=Math.floor(T)),this.gameSize.setSize(y,T),E===d.ZOOM.MAX_ZOOM&&(E=this.getMaxZoom()),this.zoom=E,E!==1&&(this._resetZoom=!0),this.baseSize.setSize(y,T),M&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),g.minWidth>0&&this.displaySize.setMin(g.minWidth*E,g.minHeight*E),g.maxWidth>0&&this.displaySize.setMax(g.maxWidth*E,g.maxHeight*E),this.displaySize.setSize(y,T),(g.snapWidth>0||g.snapHeight>0)&&this.displaySize.setSnap(g.snapWidth,g.snapHeight),this.orientation=i(y,T)},getParent:function(g){var y=g.parent;if(y!==null){if(this.parent=a(y),this.parentIsWindow=this.parent===document.body,g.expandParent&&g.scaleMode!==d.SCALE_MODE.NONE){var T=this.parent.getBoundingClientRect();(this.parentIsWindow||T.height===0)&&(document.documentElement.style.height="100%",document.body.style.height="100%",T=this.parent.getBoundingClientRect(),!this.parentIsWindow&&T.height===0&&(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}g.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=a(g.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var g=this.parentSize,y=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(y.height=s(!0));var T=y.width,C=y.height;if(g.width!==T||g.height!==C)return g.setSize(T,C),!0;if(this.canvas){var E=this.canvasBounds,M=this.canvas.getBoundingClientRect();if(M.x!==E.x||M.y!==E.y)return!0}return!1},lockOrientation:function(g){var y=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return y?y.call(screen,g):!1},setParentSize:function(g,y){return this.parentSize.setSize(g,y),this.refresh()},setGameSize:function(g,y){var T=this.autoRound;T&&(g=Math.floor(g),y=Math.floor(y));var C=this.width,E=this.height;return this.gameSize.resize(g,y),this.baseSize.resize(g,y),T&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(g/y),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(C,E)},resize:function(g,y){var T=this.zoom,C=this.autoRound;C&&(g=Math.floor(g),y=Math.floor(y));var E=this.width,M=this.height;this.gameSize.resize(g,y),this.baseSize.resize(g,y),C&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(g*T,y*T),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var P=this.canvas.style,A=g*T,F=y*T;return C&&(A=Math.floor(A),F=Math.floor(F)),(A!==g||F!==y)&&(P.width=A+"px",P.height=F+"px"),this.refresh(E,M)},setZoom:function(g){return this.zoom=g,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},setSnap:function(g,y){return g===void 0&&(g=0),y===void 0&&(y=g),this.displaySize.setSnap(g,y),this.refresh()},refresh:function(g,y){g===void 0&&(g=this.width),y===void 0&&(y=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var T=this.game.domContainer;if(T){this.baseSize.setCSS(T);var C=this.canvas.style,E=T.style;E.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",E.marginLeft=C.marginLeft,E.marginTop=C.marginTop}return this.emit(n.RESIZE,this.gameSize,this.baseSize,this.displaySize,g,y),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var g=i(this.width,this.height);g!==this.orientation&&(this.orientation=g,this.emit(n.ORIENTATION_CHANGE,g))}},updateScale:function(){var g=this.canvas.style,y=this.gameSize.width,T=this.gameSize.height,C,E,M=this.zoom,P=this.autoRound;if(this.scaleMode===d.SCALE_MODE.NONE)this.displaySize.setSize(y*M,T*M),C=this.displaySize.width,E=this.displaySize.height,P&&(C=Math.floor(C),E=Math.floor(E)),this._resetZoom&&(g.width=C+"px",g.height=E+"px",this._resetZoom=!1);else if(this.scaleMode===d.SCALE_MODE.RESIZE)this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),C=this.displaySize.width,E=this.displaySize.height,P&&(C=Math.floor(C),E=Math.floor(E)),this.canvas.width=C,this.canvas.height=E;else if(this.scaleMode===d.SCALE_MODE.EXPAND){var A=this.game.config.width,F=this.game.config.height,L=this.parentSize.width,B=this.parentSize.height,N=L/A,U=B/F,z,I;N=0?0:-(E.x*M.x),A=E.y>=0?0:-(E.y*M.y),F;C.width>=E.width?F=T.width:F=T.width-(E.width-C.width)*M.x;var L;return C.height>=E.height?L=T.height:L=T.height-(E.height-C.height)*M.y,y.setTo(P,A,F,L),g&&(y.width/=g.zoomX,y.height/=g.zoomY,y.centerX=g.centerX+g.scrollX,y.centerY=g.centerY+g.scrollY),y},step:function(g,y){this.parent&&(this._lastCheck+=y,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var g=this.domlisteners;screen.orientation&&screen.orientation.addEventListener?screen.orientation.removeEventListener("change",g.orientationChange,!1):window.removeEventListener("orientationchange",g.orientationChange,!1),window.removeEventListener("resize",g.windowResize,!1);var y=["webkit","moz",""];y.forEach(function(T){document.removeEventListener(T+"fullscreenchange",g.fullScreenChange,!1),document.removeEventListener(T+"fullscreenerror",g.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",g.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",g.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===d.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===d.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});p.exports=x},64743:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},39218:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={LANDSCAPE:"landscape-primary",LANDSCAPE_SECONDARY:"landscape-secondary",PORTRAIT:"portrait-primary",PORTRAIT_SECONDARY:"portrait-secondary"}},81050:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5,EXPAND:6}},80805:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},13560:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d={CENTER:t(64743),ORIENTATION:t(39218),SCALE_MODE:t(81050),ZOOM:t(80805)};p.exports=d},56139:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="enterfullscreen"},2336:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="fullscreenfailed"},47412:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="fullscreenunsupported"},51452:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="leavefullscreen"},20666:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="orientationchange"},47945:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="resize"},97480:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={ENTER_FULLSCREEN:t(56139),FULLSCREEN_FAILED:t(2336),FULLSCREEN_UNSUPPORTED:t(47412),LEAVE_FULLSCREEN:t(51452),ORIENTATION_CHANGE:t(20666),RESIZE:t(47945)}},93364:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(79291),c=t(13560),h={Center:t(64743),Events:t(97480),Orientation:t(39218),ScaleManager:t(76531),ScaleModes:t(81050),Zoom:t(80805)};h=d(!1,h,c.CENTER),h=d(!1,h,c.ORIENTATION),h=d(!1,h,c.SCALE_MODE),h=d(!1,h,c.ZOOM),p.exports=h},27397:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(95540),c=t(35355),h=function(r){var n=r.game.config.defaultPhysicsSystem,e=d(r.settings,"physics",!1);if(!(!n&&!e)){var s=[];if(n&&s.push(c(n+"Physics")),e)for(var a in e)a=c(a.concat("Physics")),s.indexOf(a)===-1&&s.push(a);return s}};p.exports=h},52106:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(95540),c=function(h){var r=h.plugins.getDefaultScenePlugins(),n=d(h.settings,"plugins",!1);return Array.isArray(n)?n:r||[]};p.exports=c},87033:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={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"};p.exports=S},97482:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(2368),h=new d({initialize:function(n){this.sys=new c(this,n),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(){}});p.exports=h},60903:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(89993),h=t(44594),r=t(8443),n=t(35154),e=t(54899),s=t(29747),a=t(97482),i=t(2368),o=new d({initialize:function(f,u){if(this.game=f,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,u){Array.isArray(u)||(u=[u]);for(var v=0;v-1&&(delete this.keys[v],this.scenes.splice(u,1),this._start.indexOf(v)>-1&&(u=this._start.indexOf(v),this._start.splice(u,1)),f.sys.destroy()),this},bootScene:function(l){var f=l.sys,u=f.settings;f.sceneUpdate=s,l.init&&(l.init.call(l,u.data),u.status=c.INIT,u.isTransition&&f.events.emit(h.TRANSITION_INIT,u.transitionFrom,u.transitionDuration));var v;f.load&&(v=f.load,v.reset()),v&&l.preload?(l.preload.call(l),u.status=c.LOADING,v.once(e.COMPLETE,this.loadComplete,this),v.start()):this.create(l)},loadComplete:function(l){this.create(l.scene)},payloadComplete:function(l){this.bootScene(l.scene)},update:function(l,f){this.processQueue(),this.isProcessing=!0;for(var u=this.scenes.length-1;u>=0;u--){var v=this.scenes[u].sys;v.settings.status>c.START&&v.settings.status<=c.RUNNING&&v.step(l,f),v.scenePlugin&&v.scenePlugin._target&&v.scenePlugin.step(l,f)}},render:function(l){for(var f=0;f=c.LOADING&&u.settings.status=c.START&&m<=c.CREATING)return this;if(m>=c.RUNNING&&m<=c.SLEEPING)v.shutdown(),v.sceneUpdate=s,v.start(f);else{v.sceneUpdate=s,v.start(f);var x;if(v.load&&(x=v.load),x&&v.settings.hasOwnProperty("pack")&&(x.reset(),x.addPack({payload:v.settings.pack})))return v.settings.status=c.LOADING,x.once(e.COMPLETE,this.payloadComplete,this),x.start(),this}return this.bootScene(u),this},stop:function(l,f){var u=this.getScene(l);if(u&&!u.sys.isTransitioning()&&u.sys.settings.status!==c.SHUTDOWN){var v=u.sys.load;v&&(v.off(e.COMPLETE,this.loadComplete,this),v.off(e.COMPLETE,this.payloadComplete,this)),u.sys.shutdown(f)}return this},switch:function(l,f,u){var v=this.getScene(l),m=this.getScene(f);return v&&m&&v!==m&&(this.sleep(l),this.isSleeping(f)?this.wake(f,u):this.start(f,u)),this},getAt:function(l){return this.scenes[l]},getIndex:function(l){var f=this.getScene(l);return this.scenes.indexOf(f)},bringToTop:function(l){if(this.isProcessing)return this.queueOp("bringToTop",l);var f=this.getIndex(l),u=this.scenes;if(f!==-1&&f0){var u=this.getScene(l);this.scenes.splice(f,1),this.scenes.unshift(u)}return this},moveDown:function(l){if(this.isProcessing)return this.queueOp("moveDown",l);var f=this.getIndex(l);if(f>0){var u=f-1,v=this.getScene(l),m=this.getAt(u);this.scenes[f]=m,this.scenes[u]=v}return this},moveUp:function(l){if(this.isProcessing)return this.queueOp("moveUp",l);var f=this.getIndex(l);if(fu),0,m)}return this},moveBelow:function(l,f){if(l===f)return this;if(this.isProcessing)return this.queueOp("moveBelow",l,f);var u=this.getIndex(l),v=this.getIndex(f);if(u!==-1&&v!==-1&&v>u){var m=this.getAt(v);this.scenes.splice(v,1),u===0?this.scenes.unshift(m):this.scenes.splice(u-(v{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(45319),c=t(83419),h=t(44594),r=t(95540),n=t(37277),e=new c({initialize:function(a){this.scene=a,this.systems=a.sys,this.settings=a.sys.settings,this.key=a.sys.settings.key,this.manager=a.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,a.sys.events.once(h.BOOT,this.boot,this),a.sys.events.on(h.START,this.pluginStart,this)},boot:function(){this.systems.events.once(h.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(h.SHUTDOWN,this.shutdown,this)},start:function(s,a){return s===void 0&&(s=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",s,a),this},restart:function(s){var a=this.key;return this.manager.queueOp("stop",a),this.manager.queueOp("start",a,s),this},transition:function(s){s===void 0&&(s={});var a=r(s,"target",!1),i=this.manager.getScene(a);if(!a||!this.checkValidTransition(i))return!1;var o=r(s,"duration",1e3);this._elapsed=0,this._target=i,this._duration=o,this._willSleep=r(s,"sleep",!1),this._willRemove=r(s,"remove",!1);var l=r(s,"onUpdate",null);l&&(this._onUpdate=l,this._onUpdateScope=r(s,"onUpdateScope",this.scene));var f=r(s,"allowInput",!1);this.settings.transitionAllowInput=f;var u=i.sys.settings;u.isTransition=!0,u.transitionFrom=this.scene,u.transitionDuration=o,u.transitionAllowInput=f,r(s,"moveAbove",!1)?this.manager.moveAbove(this.key,a):r(s,"moveBelow",!1)&&this.manager.moveBelow(this.key,a),i.sys.isSleeping()?i.sys.wake(r(s,"data")):this.manager.start(a,r(s,"data"));var v=r(s,"onStart",null),m=r(s,"onStartScope",this.scene);return v&&v.call(m,this.scene,i,o),this.systems.events.emit(h.TRANSITION_OUT,i,o),!0},checkValidTransition:function(s){return!(!s||s.sys.isActive()||s.sys.isTransitioning()||s===this.scene||this.systems.isTransitioning())},step:function(s,a){this._elapsed+=a,this.transitionProgress=d(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var s=this._target.sys,a=this._target.sys.settings;s.events.emit(h.TRANSITION_COMPLETE,this.scene),a.isTransition=!1,a.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(s,a,i,o){return this.manager.add(s,a,i,o)},launch:function(s,a){return s&&s!==this.key&&this.manager.queueOp("start",s,a),this},run:function(s,a){return s&&s!==this.key&&this.manager.queueOp("run",s,a),this},pause:function(s,a){return s===void 0&&(s=this.key),this.manager.queueOp("pause",s,a),this},resume:function(s,a){return s===void 0&&(s=this.key),this.manager.queueOp("resume",s,a),this},sleep:function(s,a){return s===void 0&&(s=this.key),this.manager.queueOp("sleep",s,a),this},wake:function(s,a){return s===void 0&&(s=this.key),this.manager.queueOp("wake",s,a),this},switch:function(s,a){return s!==this.key&&this.manager.queueOp("switch",this.key,s,a),this},stop:function(s,a){return s===void 0&&(s=this.key),this.manager.queueOp("stop",s,a),this},setActive:function(s,a,i){a===void 0&&(a=this.key);var o=this.manager.getScene(a);return o&&o.sys.setActive(s,i),this},setVisible:function(s,a){a===void 0&&(a=this.key);var i=this.manager.getScene(a);return i&&i.sys.setVisible(s),this},isSleeping:function(s){return s===void 0&&(s=this.key),this.manager.isSleeping(s)},isActive:function(s){return s===void 0&&(s=this.key),this.manager.isActive(s)},isPaused:function(s){return s===void 0&&(s=this.key),this.manager.isPaused(s)},isVisible:function(s){return s===void 0&&(s=this.key),this.manager.isVisible(s)},swapPosition:function(s,a){return a===void 0&&(a=this.key),s!==a&&this.manager.swapPosition(s,a),this},moveAbove:function(s,a){return a===void 0&&(a=this.key),s!==a&&this.manager.moveAbove(s,a),this},moveBelow:function(s,a){return a===void 0&&(a=this.key),s!==a&&this.manager.moveBelow(s,a),this},remove:function(s){return s===void 0&&(s=this.key),this.manager.remove(s),this},moveUp:function(s){return s===void 0&&(s=this.key),this.manager.moveUp(s),this},moveDown:function(s){return s===void 0&&(s=this.key),this.manager.moveDown(s),this},bringToTop:function(s){return s===void 0&&(s=this.key),this.manager.bringToTop(s),this},sendToBack:function(s){return s===void 0&&(s=this.key),this.manager.sendToBack(s),this},get:function(s){return this.manager.getScene(s)},getStatus:function(s){var a=this.manager.getScene(s);if(a)return a.sys.getStatus()},getIndex:function(s){return s===void 0&&(s=this.key),this.manager.getIndex(s)},shutdown:function(){var s=this.systems.events;s.off(h.SHUTDOWN,this.shutdown,this),s.off(h.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(h.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});n.register("ScenePlugin",e,"scenePlugin"),p.exports=e},55681:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(89993),c=t(35154),h=t(46975),r=t(87033),n={create:function(e){return typeof e=="string"?e={key:e}:e===void 0&&(e={}),{status:d.PENDING,key:c(e,"key",""),active:c(e,"active",!1),visible:c(e,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:c(e,"pack",!1),cameras:c(e,"cameras",null),map:c(e,"map",h(r,c(e,"mapAdd",{}))),physics:c(e,"physics",{}),loader:c(e,"loader",{}),plugins:c(e,"plugins",!1),input:c(e,"input",{})}}};p.exports=n},2368:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(89993),h=t(42363),r=t(44594),n=t(27397),e=t(52106),s=t(29747),a=t(55681),i=new d({initialize:function(l,f){this.scene=l,this.game,this.renderer,this.config=f,this.settings=a.create(f),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=s},init:function(o){this.settings.status=c.INIT,this.sceneUpdate=s,this.game=o,this.renderer=o.renderer,this.canvas=o.canvas,this.context=o.context;var l=o.plugins;this.plugins=l,l.addToScene(this,h.Global,[h.CoreScene,e(this),n(this)]),this.events.emit(r.BOOT,this),this.settings.isBooted=!0},step:function(o,l){var f=this.events;f.emit(r.PRE_UPDATE,o,l),f.emit(r.UPDATE,o,l),this.sceneUpdate.call(this.scene,o,l),f.emit(r.POST_UPDATE,o,l)},render:function(o){var l=this.displayList;l.depthSort(),this.events.emit(r.PRE_RENDER,o),this.cameras.render(o,l),this.events.emit(r.RENDER,o)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(o){var l=this.settings,f=this.getStatus();return f!==c.CREATING&&f!==c.RUNNING?console.warn("Cannot pause non-running Scene",l.key):this.settings.active&&(l.status=c.PAUSED,l.active=!1,this.events.emit(r.PAUSE,this,o)),this},resume:function(o){var l=this.events,f=this.settings;return this.settings.active||(f.status=c.RUNNING,f.active=!0,l.emit(r.RESUME,this,o)),this},sleep:function(o){var l=this.settings,f=this.getStatus();return f!==c.CREATING&&f!==c.RUNNING?console.warn("Cannot sleep non-running Scene",l.key):(l.status=c.SLEEPING,l.active=!1,l.visible=!1,this.events.emit(r.SLEEP,this,o)),this},wake:function(o){var l=this.events,f=this.settings;return f.status=c.RUNNING,f.active=!0,f.visible=!0,l.emit(r.WAKE,this,o),f.isTransition&&l.emit(r.TRANSITION_WAKE,f.transitionFrom,f.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var o=this.settings.status;return o>c.PENDING&&o<=c.RUNNING},isSleeping:function(){return this.settings.status===c.SLEEPING},isActive:function(){return this.settings.status===c.RUNNING},isPaused:function(){return this.settings.status===c.PAUSED},isTransitioning:function(){return this.settings.isTransition||this.scenePlugin._target!==null},isTransitionOut:function(){return this.scenePlugin._target!==null&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(o){return this.settings.visible=o,this},setActive:function(o,l){return o?this.resume(l):this.pause(l)},start:function(o){var l=this.events,f=this.settings;o&&(f.data=o),f.status=c.START,f.active=!0,f.visible=!0,l.emit(r.START,this),l.emit(r.READY,this,o)},shutdown:function(o){var l=this.events,f=this.settings;l.off(r.TRANSITION_INIT),l.off(r.TRANSITION_START),l.off(r.TRANSITION_COMPLETE),l.off(r.TRANSITION_OUT),f.status=c.SHUTDOWN,f.active=!1,f.visible=!1,l.emit(r.SHUTDOWN,this,o)},destroy:function(){var o=this.events,l=this.settings;l.status=c.DESTROYED,l.active=!1,l.visible=!1,o.emit(r.DESTROY,this),o.removeAllListeners();for(var f=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],u=0;u{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9};p.exports=S},69830:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="addedtoscene"},7919:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="boot"},46763:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="create"},11763:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="destroy"},71555:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="pause"},36735:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="postupdate"},3809:p=>{/** * @author samme * @copyright 2021 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="prerender"},90716:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="preupdate"},58262:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="ready"},91633:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="removedfromscene"},10319:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="render"},87132:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="resume"},81961:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="shutdown"},90194:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="sleep"},6265:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="start"},33178:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="transitioncomplete"},43063:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="transitioninit"},11259:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="transitionout"},61611:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="transitionstart"},45209:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="transitionwake"},22966:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="update"},21747:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="wake"},44594:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={ADDED_TO_SCENE:t(69830),BOOT:t(7919),CREATE:t(46763),DESTROY:t(11763),PAUSE:t(71555),POST_UPDATE:t(36735),PRE_RENDER:t(3809),PRE_UPDATE:t(90716),READY:t(58262),REMOVED_FROM_SCENE:t(91633),RENDER:t(10319),RESUME:t(87132),SHUTDOWN:t(81961),SLEEP:t(90194),START:t(6265),TRANSITION_COMPLETE:t(33178),TRANSITION_INIT:t(43063),TRANSITION_OUT:t(11259),TRANSITION_START:t(61611),TRANSITION_WAKE:t(45209),UPDATE:t(22966),WAKE:t(21747)}},62194:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(89993),c=t(79291),h={Events:t(44594),GetPhysicsPlugins:t(27397),GetScenePlugins:t(52106),SceneManager:t(60903),ScenePlugin:t(52209),Settings:t(55681),Systems:t(2368)};h=c(!1,h,d),p.exports=h},30341:(p,S,t)=>{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(50792),h=t(14463),r=t(79291),n=t(29747),e=new d({Extends:c,initialize:function(a,i,o){c.call(this),this.manager=a,this.key=i,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=r(this.config,o),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(s){return!s||!s.name||typeof s.name!="string"?!1:this.markers[s.name]?(console.error("addMarker "+s.name+" already exists in Sound"),!1):(s=r(!0,{name:"",start:0,duration:this.totalDuration-(s.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},s),this.markers[s.name]=s,!0)},updateMarker:function(s){return!s||!s.name||typeof s.name!="string"?!1:this.markers[s.name]?(this.markers[s.name]=r(!0,this.markers[s.name],s),!0):(console.warn("Audio Marker: "+s.name+" missing in Sound: "+this.key),!1)},removeMarker:function(s){var a=this.markers[s];return a?(this.markers[s]=null,a):null},play:function(s,a){if(s===void 0&&(s=""),typeof s=="object"&&(a=s,s=""),typeof s!="string")return!1;if(!s)this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;else{if(!this.markers[s])return console.warn("Marker: "+s+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[s],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}return this.resetConfig(),this.currentConfig=r(this.currentConfig,a),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return this.isPaused||!this.isPlaying?!1:(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!this.isPaused||this.isPlaying?!1:(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!this.isPaused&&!this.isPlaying?!1:(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:n,calculateRate:function(){var s=1.0005777895065548,a=this.currentConfig.detune+this.manager.detune,i=Math.pow(s,a);this.totalRate=this.currentConfig.rate*this.manager.rate*i},destroy:function(){this.pendingRemove||(this.stop(),this.emit(h.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});p.exports=e},85034:(p,S,t)=>{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(41786),h=t(50792),r=t(14463),n=t(8443),e=t(46710),s=t(58731),a=t(29747),i=t(26099),o=new d({Extends:h,initialize:function(f){h.call(this),this.game=f,this.jsonCache=f.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 i;var u=f.events;u.on(n.BLUR,this.onGameBlur,this),u.on(n.FOCUS,this.onGameFocus,this),u.on(n.PRE_STEP,this.update,this),u.once(n.DESTROY,this.destroy,this)},add:a,addAudioSprite:function(l,f){f===void 0&&(f={});var u=this.add(l,f);u.spritemap=this.jsonCache.get(l).spritemap;for(var v in u.spritemap)if(u.spritemap.hasOwnProperty(v)){var m=c(f),x=u.spritemap[v];m.loop=x.hasOwnProperty("loop")?x.loop:!1,u.addMarker({name:v,start:x.start,duration:x.end-x.start,config:m})}return u},get:function(l){return s(this.sounds,"key",l)},getAll:function(l){return l?e(this.sounds,"key",l):e(this.sounds)},getAllPlaying:function(){return e(this.sounds,"isPlaying",!0)},play:function(l,f){var u=this.add(l);return u.once(r.COMPLETE,u.destroy,u),f?f.name?(u.addMarker(f),u.play(f.name)):u.play(f):u.play()},playAudioSprite:function(l,f,u){var v=this.addAudioSprite(l);return v.once(r.COMPLETE,v.destroy,v),v.play(f,u)},remove:function(l){var f=this.sounds.indexOf(l);return f!==-1?(l.destroy(),this.sounds.splice(f,1),!0):!1},removeAll:function(){this.sounds.forEach(function(l){l.destroy()}),this.sounds.length=0},removeByKey:function(l){for(var f=0,u=this.sounds.length-1;u>=0;u--){var v=this.sounds[u];v.key===l&&(v.destroy(),this.sounds.splice(u,1),f++)}return f},pauseAll:function(){this.forEachActiveSound(function(l){l.pause()}),this.emit(r.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(l){l.resume()}),this.emit(r.RESUME_ALL,this)},setListenerPosition:a,stopAll:function(){this.forEachActiveSound(function(l){l.stop()}),this.emit(r.STOP_ALL,this)},stopByKey:function(l){var f=0;return this.getAll(l).forEach(function(u){u.stop()&&f++}),f},isPlaying:function(l){var f=this.sounds,u=f.length-1,v;if(l===void 0){for(;u>=0;u--)if(v=this.sounds[u],v.isPlaying)return!0}else for(;u>=0;u--)if(v=this.sounds[u],v.key===l&&v.isPlaying)return!0;return!1},unlock:a,onBlur:a,onFocus:a,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(l,f){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(r.UNLOCKED,this));for(var u=this.sounds.length-1;u>=0;u--)this.sounds[u].pendingRemove&&this.sounds.splice(u,1);this.sounds.forEach(function(v){v.update(l,f)})},destroy:function(){this.game.events.off(n.BLUR,this.onGameBlur,this),this.game.events.off(n.FOCUS,this.onGameFocus,this),this.game.events.off(n.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.listenerPosition=null,this.game=null},forEachActiveSound:function(l,f){var u=this;this.sounds.forEach(function(v,m){v&&!v.pendingRemove&&l.call(f||u,v,m,u.sounds)})},setRate:function(l){return this.rate=l,this},rate:{get:function(){return this._rate},set:function(l){this._rate=l,this.forEachActiveSound(function(f){f.calculateRate()}),this.emit(r.GLOBAL_RATE,this,l)}},setDetune:function(l){return this.detune=l,this},detune:{get:function(){return this._detune},set:function(l){this._detune=l,this.forEachActiveSound(function(f){f.calculateRate()}),this.emit(r.GLOBAL_DETUNE,this,l)}}});p.exports=o},14747:(p,S,t)=>{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(33684),c=t(25960),h=t(57490),r={create:function(n){var e=n.config.audio,s=n.device.audio;return e.noAudio||!s.webAudio&&!s.audioData?new c(n):s.webAudio&&!e.disableWebAudio?new h(n):new d(n)}};p.exports=r},19723:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="complete"},98882:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="decodedall"},57506:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="decoded"},73146:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="destroy"},11305:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="detune"},40577:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="detune"},30333:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="mute"},20394:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="rate"},21802:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="volume"},1299:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="looped"},99190:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="loop"},97125:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="mute"},89259:p=>{/** * @author pi-kei * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="pan"},79986:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="pauseall"},17586:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="pause"},19618:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="play"},42306:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="rate"},10387:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="resumeall"},48959:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="resume"},9960:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="seek"},19180:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="stopall"},98328:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="stop"},50401:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="unlocked"},52498:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="volume"},14463:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={COMPLETE:t(19723),DECODED:t(57506),DECODED_ALL:t(98882),DESTROY:t(73146),DETUNE:t(11305),GLOBAL_DETUNE:t(40577),GLOBAL_MUTE:t(30333),GLOBAL_RATE:t(20394),GLOBAL_VOLUME:t(21802),LOOP:t(99190),LOOPED:t(1299),MUTE:t(97125),PAN:t(89259),PAUSE_ALL:t(79986),PAUSE:t(17586),PLAY:t(19618),RATE:t(42306),RESUME_ALL:t(10387),RESUME:t(48959),SEEK:t(9960),STOP_ALL:t(19180),STOP:t(98328),UNLOCKED:t(50401),VOLUME:t(52498)}},64895:(p,S,t)=>{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(30341),c=t(83419),h=t(14463),r=t(45319),n=new c({Extends:d,initialize:function(s,a,i){if(i===void 0&&(i={}),this.tags=s.game.cache.audio.get(a),!this.tags)throw new Error('No cached audio asset with key "'+a);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,d.call(this,s,a,i)},play:function(e,s){return this.manager.isLocked(this,"play",[e,s])||!d.prototype.play.call(this,e,s)||!this.pickAndPlayAudioTag()?!1:(this.emit(h.PLAY,this),!0)},pause:function(){return this.manager.isLocked(this,"pause")||this.startTime>0||!d.prototype.pause.call(this)?!1:(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(h.PAUSE,this),!0)},resume:function(){return this.manager.isLocked(this,"resume")||this.startTime>0||!d.prototype.resume.call(this)||!this.pickAndPlayAudioTag()?!1:(this.emit(h.RESUME,this),!0)},stop:function(){return this.manager.isLocked(this,"stop")||!d.prototype.stop.call(this)?!1:(this.stopAndReleaseAudioTag(),this.emit(h.STOP,this),!0)},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var e=this.currentConfig.seek,s=this.currentConfig.delay,a=(this.currentMarker?this.currentMarker.start:0)+e;return this.previousTime=a,this.audio.currentTime=a,this.applyConfig(),s===0?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+s*1e3,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var e=0;e0){this.startTime=a-this.manager.loopEndOffset?(this.audio.currentTime=s+Math.max(0,i-a),i=this.audio.currentTime):i=a){this.reset(),this.stopAndReleaseAudioTag(),this.emit(h.COMPLETE,this);return}this.previousTime=i}},destroy:function(){d.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=r(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){d.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(e){this.currentConfig.mute=e,!this.manager.isLocked(this,"mute",e)&&(this.updateMute(),this.emit(h.MUTE,this,e))}},setMute:function(e){return this.mute=e,this},volume:{get:function(){return this.currentConfig.volume},set:function(e){this.currentConfig.volume=e,!this.manager.isLocked(this,"volume",e)&&(this.updateVolume(),this.emit(h.VOLUME,this,e))}},setVolume:function(e){return this.volume=e,this},rate:{get:function(){return this.currentConfig.rate},set:function(e){this.currentConfig.rate=e,!this.manager.isLocked(this,h.RATE,e)&&(this.calculateRate(),this.emit(h.RATE,this,e))}},setRate:function(e){return this.rate=e,this},detune:{get:function(){return this.currentConfig.detune},set:function(e){this.currentConfig.detune=e,!this.manager.isLocked(this,h.DETUNE,e)&&(this.calculateRate(),this.emit(h.DETUNE,this,e))}},setDetune:function(e){return this.detune=e,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(e){this.manager.isLocked(this,"seek",e)||this.startTime>0||(this.isPlaying||this.isPaused)&&(e=Math.min(Math.max(0,e),this.duration),this.isPlaying?(this.previousTime=e,this.audio.currentTime=e):this.isPaused&&(this.currentConfig.seek=e),this.emit(h.SEEK,this,e))}},setSeek:function(e){return this.seek=e,this},loop:{get:function(){return this.currentConfig.loop},set:function(e){this.currentConfig.loop=e,!this.manager.isLocked(this,"loop",e)&&(this.audio&&(this.audio.loop=e),this.emit(h.LOOP,this,e))}},setLoop:function(e){return this.loop=e,this},pan:{get:function(){return this.currentConfig.pan},set:function(e){this.currentConfig.pan=e,this.emit(h.PAN,this,e)}},setPan:function(e){return this.pan=e,this}});p.exports=n},33684:(p,S,t)=>{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(85034),c=t(83419),h=t(14463),r=t(64895),n=new c({Extends:d,initialize:function(s){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,d.call(this,s)},add:function(e,s){var a=new r(this,e,s);return this.sounds.push(a),a},unlock:function(){this.locked=!1;var e=this;if(this.game.cache.audio.entries.each(function(o,l){for(var f=0;f{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={SoundManagerCreator:t(14747),Events:t(14463),BaseSound:t(30341),BaseSoundManager:t(85034),WebAudioSound:t(71741),WebAudioSoundManager:t(57490),HTML5AudioSound:t(64895),HTML5AudioSoundManager:t(33684),NoAudioSound:t(4603),NoAudioSoundManager:t(25960)}},4603:(p,S,t)=>{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(30341),c=t(83419),h=t(50792),r=t(79291),n=t(29747),e=function(){return!1},s=function(){return null},a=function(){return this},i=new c({Extends:h,initialize:function(l,f,u){u===void 0&&(u={}),h.call(this),this.manager=l,this.key=f,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=r({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},u),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:e,updateMarker:e,removeMarker:s,play:e,pause:e,resume:e,stop:e,setMute:a,setVolume:a,setRate:a,setDetune:a,setSeek:a,setLoop:a,setPan:a,applyConfig:s,resetConfig:s,update:n,calculateRate:s,destroy:function(){d.prototype.destroy.call(this)}});p.exports=i},25960:(p,S,t)=>{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(85034),c=t(83419),h=t(50792),r=t(4603),n=t(29747),e=new c({Extends:h,initialize:function(a){h.call(this),this.game=a,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(s,a){var i=new r(this,s,a);return this.sounds.push(i),i},addAudioSprite:function(s,a){var i=this.add(s,a);return i.spritemap={},i},get:function(s){return d.prototype.get.call(this,s)},getAll:function(s){return d.prototype.getAll.call(this,s)},play:function(s,a){return!1},playAudioSprite:function(s,a,i){return!1},remove:function(s){return d.prototype.remove.call(this,s)},removeAll:function(){return d.prototype.removeAll.call(this)},removeByKey:function(s){return d.prototype.removeByKey.call(this,s)},stopByKey:function(s){return d.prototype.stopByKey.call(this,s)},onBlur:n,onFocus:n,onGameBlur:n,onGameFocus:n,pauseAll:n,resumeAll:n,stopAll:n,update:n,setRate:n,setDetune:n,setMute:n,setVolume:n,unlock:n,forEachActiveSound:function(s,a){d.prototype.forEachActiveSound.call(this,s,a)},destroy:function(){d.prototype.destroy.call(this)}});p.exports=e},71741:(p,S,t)=>{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(30341),c=t(83419),h=t(14463),r=t(95540),n=new c({Extends:d,initialize:function(s,a,i){if(i===void 0&&(i={}),this.audioBuffer=s.game.cache.audio.get(a),!this.audioBuffer)throw new Error('Audio key "'+a+'" not found in cache');this.source=null,this.loopSource=null,this.muteNode=s.context.createGain(),this.volumeNode=s.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),s.context.createPanner&&(this.spatialNode=s.context.createPanner(),this.volumeNode.connect(this.spatialNode)),s.context.createStereoPanner?(this.pannerNode=s.context.createStereoPanner(),s.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(s.destination)):s.context.createPanner?this.spatialNode.connect(s.destination):this.volumeNode.connect(s.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,d.call(this,s,a,i)},play:function(e,s){return d.prototype.play.call(this,e,s)?(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(h.PLAY,this),!0):!1},pause:function(){return this.manager.context.currentTime{/** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(53134),c=t(85034),h=t(83419),r=t(14463),n=t(8443),e=t(71741),s=t(95540),a=new h({Extends:c,initialize:function(o){this.context=this.createAudioContext(o),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=this.context.state==="suspended",c.call(this,o),this.locked&&(o.isBooted?this.unlock():o.events.once(n.BOOT,this.unlock,this)),o.events.on(n.VISIBLE,this.onGameVisible,this)},onGameVisible:function(){var i=this.context;window.setTimeout(function(){i&&(i.suspend(),i.resume())},100)},createAudioContext:function(i){var o=i.config.audio;if(o.context)return o.context.resume(),o.context;if(window.hasOwnProperty("AudioContext"))return new AudioContext;if(window.hasOwnProperty("webkitAudioContext"))return new window.webkitAudioContext},setAudioContext:function(i){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=i,this.masterMuteNode=i.createGain(),this.masterVolumeNode=i.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(i.destination),this.destination=this.masterMuteNode,this},add:function(i,o){var l=new e(this,i,o);return this.sounds.push(l),l},decodeAudio:function(i,o){var l;Array.isArray(i)?l=i:l=[{key:i,data:o}];for(var f=this.game.cache.audio,u=l.length,v=0;v{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(37105),c=t(83419),h=t(29747),r=t(19186),n=new c({initialize:function(s){this.parent=s,this.list=[],this.position=0,this.addCallback=h,this.removeCallback=h,this._sortKey=""},add:function(e,s){return s?d.Add(this.list,e):d.Add(this.list,e,0,this.addCallback,this)},addAt:function(e,s,a){return a?d.AddAt(this.list,e,s):d.AddAt(this.list,e,s,0,this.addCallback,this)},getAt:function(e){return this.list[e]},getIndex:function(e){return this.list.indexOf(e)},sort:function(e,s){return e?(s===void 0&&(s=function(a,i){return a[e]-i[e]}),r(this.list,s),this):this},getByName:function(e){return d.GetFirst(this.list,"name",e)},getRandom:function(e,s){return d.GetRandom(this.list,e,s)},getFirst:function(e,s,a,i){return d.GetFirst(this.list,e,s,a,i)},getAll:function(e,s,a,i){return d.GetAll(this.list,e,s,a,i)},count:function(e,s){return d.CountAllMatching(this.list,e,s)},swap:function(e,s){d.Swap(this.list,e,s)},moveTo:function(e,s){return d.MoveTo(this.list,e,s)},moveAbove:function(e,s){return d.MoveAbove(this.list,e,s)},moveBelow:function(e,s){return d.MoveBelow(this.list,e,s)},remove:function(e,s){return s?d.Remove(this.list,e):d.Remove(this.list,e,this.removeCallback,this)},removeAt:function(e,s){return s?d.RemoveAt(this.list,e):d.RemoveAt(this.list,e,this.removeCallback,this)},removeBetween:function(e,s,a){return a?d.RemoveBetween(this.list,e,s):d.RemoveBetween(this.list,e,s,this.removeCallback,this)},removeAll:function(e){for(var s=this.list.length;s--;)this.remove(this.list[s],e);return this},bringToTop:function(e){return d.BringToTop(this.list,e)},sendToBack:function(e){return d.SendToBack(this.list,e)},moveUp:function(e){return d.MoveUp(this.list,e),e},moveDown:function(e){return d.MoveDown(this.list,e),e},reverse:function(){return this.list.reverse(),this},shuffle:function(){return d.Shuffle(this.list),this},replace:function(e,s){return d.Replace(this.list,e,s)},exists:function(e){return this.list.indexOf(e)>-1},setAll:function(e,s,a,i){return d.SetAll(this.list,e,s,a,i),this},each:function(e,s){for(var a=[null],i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});p.exports=n},90330:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=new d({initialize:function(r){this.entries={},this.size=0,this.setAll(r)},setAll:function(h){if(Array.isArray(h))for(var r=0;r{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(50792),h=t(82348),r=new d({Extends:c,initialize:function(){c.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(n){return this._active.indexOf(n)>-1},isPending:function(n){return this._toProcess>0&&this._pending.indexOf(n)>-1},isDestroying:function(n){return this._destroy.indexOf(n)>-1},add:function(n){return this.checkQueue&&this.isActive(n)&&!this.isDestroying(n)||this.isPending(n)||(this._pending.push(n),this._toProcess++),n},remove:function(n){if(this.isPending(n)){var e=this._pending,s=e.indexOf(n);s!==-1&&e.splice(s,1)}else this.isActive(n)&&(this._destroy.push(n),this._toProcess++);return n},removeAll:function(){for(var n=this._active,e=this._destroy,s=n.length;s--;)e.push(n[s]),this._toProcess++;return this},update:function(){if(this._toProcess===0)return this._active;var n=this._destroy,e=this._active,s,a;for(s=0;s{/** * @author Vladimir Agafonkin * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(43886);function c(g){if(!(this instanceof c))return new c(g);this._maxEntries=Math.max(4,g||9),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}c.prototype={all:function(){return this._all(this.data,[])},search:function(g){var y=this.data,T=[],C=this.toBBox;if(!v(g,y))return T;for(var E=[],M,P,A,F;y;){for(M=0,P=y.children.length;M=0&&M[y].children.length>this._maxEntries;)this._split(M,y),y--;this._adjustParentBBoxes(E,M,y)},_split:function(g,y){var T=g[y],C=T.children.length,E=this._minEntries;this._chooseSplitAxis(T,E,C);var M=this._chooseSplitIndex(T,E,C),P=m(T.children.splice(M,T.children.length-M));P.height=T.height,P.leaf=T.leaf,r(T,this.toBBox),r(P,this.toBBox),y?g[y-1].children.push(P):this._splitRoot(T,P)},_splitRoot:function(g,y){this.data=m([g,y]),this.data.height=g.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},_chooseSplitIndex:function(g,y,T){var C,E,M,P,A,F,L,B;for(F=L=1/0,C=y;C<=T-y;C++)E=n(g,0,C,this.toBBox),M=n(g,C,T,this.toBBox),P=f(E,M),A=i(E)+i(M),P=y;F--)L=g.children[F],e(P,g.leaf?E(L):L),A+=o(P);return A},_adjustParentBBoxes:function(g,y,T){for(var C=T;C>=0;C--)e(y[C],g)},_condense:function(g){for(var y=g.length-1,T;y>=0;y--)g[y].children.length===0?y>0?(T=g[y-1].children,T.splice(T.indexOf(g[y]),1)):this.clear():r(g[y],this.toBBox)},compareMinX:function(g,y){return g.left-y.left},compareMinY:function(g,y){return g.top-y.top},toBBox:function(g){return{minX:g.left,minY:g.top,maxX:g.right,maxY:g.bottom}}};function h(g,y,T){if(!T)return y.indexOf(g);for(var C=0;C=g.minX&&y.maxY>=g.minY}function m(g){return{children:g,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function x(g,y,T,C,E){for(var M=[y,T],P;M.length;)T=M.pop(),y=M.pop(),!(T-y<=C)&&(P=y+Math.ceil((T-y)/C/2)*C,d(g,P,y,T,E),M.push(y,P,P,T))}p.exports=c},35072:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=new d({initialize:function(r){if(this.entries=[],Array.isArray(r))for(var n=0;n-1&&this.entries.splice(r,1),this},dump:function(){console.group("Set");for(var h=0;h-1},union:function(h){var r=new c;return h.entries.forEach(function(n){r.set(n)}),this.entries.forEach(function(n){r.set(n)}),r},intersect:function(h){var r=new c;return this.entries.forEach(function(n){h.contains(n)&&r.set(n)}),r},difference:function(h){var r=new c;return this.entries.forEach(function(n){h.contains(n)||r.set(n)}),r},size:{get:function(){return this.entries.length},set:function(h){return h{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(45319),c=t(83419),h=t(56583),r=t(26099),n=new c({initialize:function(s,a,i,o){s===void 0&&(s=0),a===void 0&&(a=s),i===void 0&&(i=0),o===void 0&&(o=null),this._width=s,this._height=a,this._parent=o,this.aspectMode=i,this.aspectRatio=a===0?1:s/a,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new r},setAspectMode:function(e){return e===void 0&&(e=0),this.aspectMode=e,this.setSize(this._width,this._height)},setSnap:function(e,s){return e===void 0&&(e=0),s===void 0&&(s=e),this.snapTo.set(e,s),this.setSize(this._width,this._height)},setParent:function(e){return this._parent=e,this.setSize(this._width,this._height)},setMin:function(e,s){return e===void 0&&(e=0),s===void 0&&(s=e),this.minWidth=d(e,0,this.maxWidth),this.minHeight=d(s,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(e,s){return e===void 0&&(e=Number.MAX_VALUE),s===void 0&&(s=e),this.maxWidth=d(e,this.minWidth,Number.MAX_VALUE),this.maxHeight=d(s,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(e,s){switch(e===void 0&&(e=0),s===void 0&&(s=e),this.aspectMode){case n.NONE:this._width=this.getNewWidth(h(e,this.snapTo.x)),this._height=this.getNewHeight(h(s,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height;break;case n.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(h(e,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case n.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(h(s,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case n.FIT:this.constrain(e,s,!0);break;case n.ENVELOP:this.constrain(e,s,!1);break}return this},setAspectRatio:function(e){return this.aspectRatio=e,this.setSize(this._width,this._height)},resize:function(e,s){return this._width=this.getNewWidth(h(e,this.snapTo.x)),this._height=this.getNewHeight(h(s,this.snapTo.y)),this.aspectRatio=this._height===0?1:this._width/this._height,this},getNewWidth:function(e,s){return s===void 0&&(s=!0),e=d(e,this.minWidth,this.maxWidth),s&&this._parent&&e>this._parent.width&&(e=Math.max(this.minWidth,this._parent.width)),e},getNewHeight:function(e,s){return s===void 0&&(s=!0),e=d(e,this.minHeight,this.maxHeight),s&&this._parent&&e>this._parent.height&&(e=Math.max(this.minHeight,this._parent.height)),e},constrain:function(e,s,a){e===void 0&&(e=0),s===void 0&&(s=e),a===void 0&&(a=!0),e=this.getNewWidth(e),s=this.getNewHeight(s);var i=this.snapTo,o=s===0?1:e/s;return a&&this.aspectRatio>o||!a&&this.aspectRatio0&&(s=h(s,i.y),e=s*this.aspectRatio)):(a&&this.aspectRatioo)&&(s=h(s,i.y),e=s*this.aspectRatio,i.x>0&&(e=h(e,i.x),s=e*(1/this.aspectRatio))),this._width=e,this._height=s,this},fitTo:function(e,s){return this.constrain(e,s,!0)},envelop:function(e,s){return this.constrain(e,s,!1)},setWidth:function(e){return this.setSize(e,this._height)},setHeight:function(e){return this.setSize(this._width,e)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(e){e&&e.style&&(e.style.width=this._width+"px",e.style.height=this._height+"px")},copy:function(e){return e.setAspectMode(this.aspectMode),e.aspectRatio=this.aspectRatio,e.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(e){this.setSize(e,this._height)}},height:{get:function(){return this._height},set:function(e){this.setSize(this._width,e)}}});n.NONE=0,n.WIDTH_CONTROLS_HEIGHT=1,n.HEIGHT_CONTROLS_WIDTH=2,n.FIT=3,n.ENVELOP=4,p.exports=n},15238:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="add"},56187:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="remove"},82348:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={PROCESS_QUEUE_ADD:t(15238),PROCESS_QUEUE_REMOVE:t(56187)}},41392:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={Events:t(82348),List:t(73162),Map:t(90330),ProcessQueue:t(25774),RTree:t(59542),Set:t(35072),Size:t(86555)}},57382:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(45319),h=t(40987),r=t(8054),n=t(50030),e=t(79237),s=new d({Extends:e,initialize:function(i,o,l,f,u){e.call(this,i,o,l,f,u),this.add("__BASE",0,0,0,f,u),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=f,this.height=u,this.imageData=this.context.getImageData(0,0,f,u),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===r.WEBGL&&this.refresh(),this},draw:function(a,i,o,l){return l===void 0&&(l=!0),this.context.drawImage(o,a,i),l&&this.update(),this},drawFrame:function(a,i,o,l,f){o===void 0&&(o=0),l===void 0&&(l=0),f===void 0&&(f=!0);var u=this.manager.getFrame(a,i);if(u){var v=u.canvasData,m=u.cutWidth,x=u.cutHeight,g=u.source.resolution;this.context.drawImage(u.source.image,v.x,v.y,m,x,o,l,m/g,x/g),f&&this.update()}return this},setPixel:function(a,i,o,l,f,u){u===void 0&&(u=255),a=Math.abs(Math.floor(a)),i=Math.abs(Math.floor(i));var v=this.getIndex(a,i);if(v>-1){var m=this.context.getImageData(a,i,1,1);m.data[0]=o,m.data[1]=l,m.data[2]=f,m.data[3]=u,this.context.putImageData(m,a,i)}return this},putData:function(a,i,o,l,f,u,v){return l===void 0&&(l=0),f===void 0&&(f=0),u===void 0&&(u=a.width),v===void 0&&(v=a.height),this.context.putImageData(a,i,o,l,f,u,v),this},getData:function(a,i,o,l){a=c(Math.floor(a),0,this.width-1),i=c(Math.floor(i),0,this.height-1),o=c(o,1,this.width-a),l=c(l,1,this.height-i);var f=this.context.getImageData(a,i,o,l);return f},getPixel:function(a,i,o){o||(o=new h);var l=this.getIndex(a,i);if(l>-1){var f=this.data,u=f[l+0],v=f[l+1],m=f[l+2],x=f[l+3];o.setTo(u,v,m,x)}return o},getPixels:function(a,i,o,l){a===void 0&&(a=0),i===void 0&&(i=0),o===void 0&&(o=this.width),l===void 0&&(l=o),a=Math.abs(Math.round(a)),i=Math.abs(Math.round(i));for(var f=c(a,0,this.width),u=c(a+o,0,this.width),v=c(i,0,this.height),m=c(i+l,0,this.height),x=new h,g=[],y=v;y{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(10312),c=t(38058),h=t(27919),r=t(83419),n=t(8054),e=t(4327),s=t(95540),a=t(36060),i=t(32302),o=t(79237),l=t(70554),f=new r({Extends:o,initialize:function(v,m,x,g,y){x===void 0&&(x=256),g===void 0&&(g=256),y===void 0&&(y=!0),this.type="DynamicTexture";var T=v.game.renderer,C=T&&T.type===n.CANVAS,E=C?h.create2D(this,x,g):[this];o.call(this,v,m,E,x,g),this.add("__BASE",0,0,0,x,g),this.renderer=T,this.width=-1,this.height=-1,this.isDrawing=!1,this.canvas=C?E:null,this.context=C?E.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new c(0,0,x,g).setScene(v.game.scene.systemScene,!1),this.renderTarget=C?null:new i(T,x,g,1,0,!1,!1,!0,!1),this.pipeline=C?null:T.pipelines.get(a.SINGLE_PIPELINE),this.setSize(x,g,y)},setSize:function(u,v,m){v===void 0&&(v=u),m===void 0&&(m=!0),m&&(u=Math.floor(u),v=Math.floor(v),u%2!==0&&u++,v%2!==0&&v++);var x=this.get(),g=x.source;if(u!==this.width||v!==this.height){this.canvas&&(this.canvas.width=u,this.canvas.height=v);var y=this.renderTarget;y&&(y.willResize(u,v)&&y.resize(u,v),y.texture!==g.glTexture&&this.renderer.deleteTexture(g.glTexture),this.setFromRenderTarget()),this.camera.setSize(u,v),g.width=u,g.height=v,x.setSize(u,v),this.width=u,this.height=v}else{var T=this.getSourceImage();x.cutX+u>T.width&&(u=T.width-x.cutX),x.cutY+v>T.height&&(v=T.height-x.cutY),x.setSize(u,v,x.cutX,x.cutY)}return this},setFromRenderTarget:function(){var u=this.get(),v=u.source,m=this.renderTarget;return v.isRenderTexture=!0,v.isGLTexture=!0,v.glTexture=m.texture,this},setIsSpriteTexture:function(u){return this.isSpriteTexture=u,this},fill:function(u,v,m,x,g,y){var T=this.camera,C=this.renderer;v===void 0&&(v=1),m===void 0&&(m=0),x===void 0&&(x=0),g===void 0&&(g=this.width),y===void 0&&(y=this.height);var E=u>>16&255,M=u>>8&255,P=u&255,A=this.renderTarget;if(T.preRender(),A){A.bind(!0);var F=this.pipeline.manager.set(this.pipeline),L=C.width/A.width,B=C.height/A.height,N=A.height-(x+y);F.drawFillRect(m*L,N*B,g*L,y*B,l.getTintFromFloats(P/255,M/255,E/255,1),v),A.unbind(!0)}else{var U=this.context;C.setContext(U),U.globalCompositeOperation="source-over",U.fillStyle="rgba("+E+","+M+","+P+","+v+")",U.fillRect(m,x,g,y),C.setContext()}return this.dirty=!0,this},clear:function(u,v,m,x){if(this.dirty){var g=this.context,y=this.renderTarget;y?y.clear(u,v,m,x):g&&(u!==void 0&&v!==void 0&&m!==void 0&&x!==void 0?g.clearRect(u,v,m,x):(g.save(),g.setTransform(1,0,0,1,0,0),g.clearRect(0,0,this.width,this.height),g.restore())),this.dirty=!1}return this},stamp:function(u,v,m,x,g){m===void 0&&(m=0),x===void 0&&(x=0);var y=s(g,"alpha",1),T=s(g,"tint",16777215),C=s(g,"angle",0),E=s(g,"rotation",0),M=s(g,"scale",1),P=s(g,"scaleX",M),A=s(g,"scaleY",M),F=s(g,"originX",.5),L=s(g,"originY",.5),B=s(g,"blendMode",0),N=s(g,"erase",!1),U=s(g,"skipBatch",!1),z=this.manager.resetStamp(y,T);return z.setAngle(0),C!==0?z.setAngle(C):E!==0&&z.setRotation(E),z.setScale(P,A),z.setTexture(u,v),z.setOrigin(F,L),z.setBlendMode(B),N&&(this._eraseMode=!0),U?this.batchGameObject(z,m,x):this.draw(z,m,x),N&&(this._eraseMode=!1),this},erase:function(u,v,m){return this._eraseMode=!0,this.draw(u,v,m),this._eraseMode=!1,this},draw:function(u,v,m,x,g){return this.beginDraw(),this.batchDraw(u,v,m,x,g),this.endDraw(),this},drawFrame:function(u,v,m,x,g,y){return this.beginDraw(),this.batchDrawFrame(u,v,m,x,g,y),this.endDraw(),this},repeat:function(u,v,m,x,g,y,T,C,E){if(m===void 0&&(m=0),x===void 0&&(x=0),g===void 0&&(g=this.width),y===void 0&&(y=this.height),T===void 0&&(T=1),C===void 0&&(C=16777215),E===void 0&&(E=!1),u instanceof e?v=u:v=this.manager.getFrame(u,v),!v)return this;var M=this.manager.resetStamp(T,C);M.setFrame(v),M.setOrigin(0);var P=v.width,A=v.height;g=Math.floor(g),y=Math.floor(y);var F=Math.ceil(g/P),L=Math.ceil(y/A),B=F*P-g,N=L*A-y;B>0&&(B=P-B),N>0&&(N=A-N),m<0&&(F+=Math.ceil(Math.abs(m)/P)),x<0&&(L+=Math.ceil(Math.abs(x)/A));var U=m,z=x,I=!1,G=this.manager.stampCrop.setTo(0,0,P,A);E||this.beginDraw();for(var O=0;O0&&b===F-1&&(I=!0,G.width=B),N>0&&O===L-1&&(I=!0,G.height=N),I&&M.setCrop(G),this.batchGameObject(M,U,z),M.isCropped=!1,G.setTo(0,0,P,A),U+=P}U=m,z+=A}return E||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var u=this.camera,v=this.renderer,m=this.renderTarget;u.preRender(),m?v.beginCapture(m.width,m.height):v.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(u,v,m,x,g){return Array.isArray(u)||(u=[u]),this.batchList(u,v,m,x,g),this},batchDrawFrame:function(u,v,m,x,g,y){m===void 0&&(m=0),x===void 0&&(x=0),g===void 0&&(g=1),y===void 0&&(y=16777215);var T=this.manager.getFrame(u,v);return T&&(this.renderTarget?this.pipeline.batchTextureFrame(T,m,x,y,g,this.camera.matrix,null):this.batchTextureFrame(T,m,x,g,y)),this},endDraw:function(u){if(u===void 0&&(u=this._eraseMode),this.isDrawing){var v=this.renderer,m=this.renderTarget;if(m){var x=v.endCapture(),g=v.pipelines.setUtility();g.blitFrame(x,m,1,!1,!1,u,this.isSpriteTexture),v.resetScissor(),v.resetViewport()}else v.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(u,v,m,x,g){var y=u.length;if(y!==0)for(var T=0;T0&&E.height>0&&C.drawImage(M,E.x,E.y,E.width,E.height,v,m,E.width,E.height),C.restore()}},snapshotArea:function(u,v,m,x,g,y,T){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,g,!1,u,v,m,x,y,T):this.renderer.snapshotCanvas(this.canvas,g,!1,u,v,m,x,y,T),this},snapshot:function(u,v,m){return this.snapshotArea(0,0,this.width,this.height,u,v,m)},snapshotPixel:function(u,v,m){return this.snapshotArea(u,v,1,1,m,"pixel")},getWebGLTexture:function(){if(this.renderTarget)return this.renderTarget.texture},renderWebGL:function(u,v,m,x){var g=this.manager.resetStamp();g.setTexture(this),g.setOrigin(0),g.renderWebGL(u,g,m,x)},renderCanvas:function(){},destroy:function(){var u=this.manager.stamp;u&&u.texture===this&&this.manager.resetStamp(),o.prototype.destroy.call(this),h.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.renderer=null}});p.exports=f},4327:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(45319),h=t(79291),r=new d({initialize:function(e,s,a,i,o,l,f){this.texture=e,this.name=s,this.source=e.source[a],this.sourceIndex=a,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(l,f,i,o)},setCutPosition:function(n,e){return n===void 0&&(n=0),e===void 0&&(e=0),this.cutX=n,this.cutY=e,this.updateUVs()},setCutSize:function(n,e){return this.cutWidth=n,this.cutHeight=e,this.updateUVs()},setSize:function(n,e,s,a){s===void 0&&(s=0),a===void 0&&(a=0),this.setCutPosition(s,a),this.setCutSize(n,e),this.width=n,this.height=e,this.halfWidth=Math.floor(n*.5),this.halfHeight=Math.floor(e*.5),this.centerX=Math.floor(n/2),this.centerY=Math.floor(e/2);var i=this.data,o=i.cut;o.x=s,o.y=a,o.w=n,o.h=e,o.r=s+n,o.b=a+e,i.sourceSize.w=n,i.sourceSize.h=e,i.spriteSourceSize.w=n,i.spriteSourceSize.h=e,i.radius=.5*Math.sqrt(n*n+e*e);var l=i.drawImage;return l.x=s,l.y=a,l.width=n,l.height=e,this.updateUVs()},setTrim:function(n,e,s,a,i,o){var l=this.data,f=l.spriteSourceSize;return l.trim=!0,l.sourceSize.w=n,l.sourceSize.h=e,f.x=s,f.y=a,f.w=i,f.h=o,f.r=s+i,f.b=a+o,this.x=s,this.y=a,this.width=i,this.height=o,this.halfWidth=i*.5,this.halfHeight=o*.5,this.centerX=Math.floor(i/2),this.centerY=Math.floor(o/2),this.updateUVs()},setScale9:function(n,e,s,a){var i=this.data;return i.scale9=!0,i.is3Slice=e===0&&a===this.height,i.scale9Borders.x=n,i.scale9Borders.y=e,i.scale9Borders.w=s,i.scale9Borders.h=a,this},setCropUVs:function(n,e,s,a,i,o,l){var f=this.cutX,u=this.cutY,v=this.cutWidth,m=this.cutHeight,x=this.realWidth,g=this.realHeight;e=c(e,0,x),s=c(s,0,g),a=c(a,0,x-e),i=c(i,0,g-s);var y=f+e,T=u+s,C=a,E=i,M=this.data;if(M.trim){var P=M.spriteSourceSize;a=c(a,0,P.x+v-e),i=c(i,0,P.y+m-s);var A=e+a,F=s+i,L=!(P.rA||P.y>F);if(L){var B=Math.max(P.x,e),N=Math.max(P.y,s),U=Math.min(P.r,A)-B,z=Math.min(P.b,F)-N;C=U,E=z,o?y=f+(v-(B-P.x)-U):y=f+(B-P.x),l?T=u+(m-(N-P.y)-z):T=u+(N-P.y),e=B,s=N,a=U,i=z}else y=0,T=0,C=0,E=0}else o&&(y=f+(v-e-a)),l&&(T=u+(m-s-i));var I=this.source.width,G=this.source.height;return n.u0=Math.max(0,y/I),n.v0=Math.max(0,T/G),n.u1=Math.min(1,(y+C)/I),n.v1=Math.min(1,(T+E)/G),n.x=e,n.y=s,n.cx=y,n.cy=T,n.cw=C,n.ch=E,n.width=a,n.height=i,n.flipX=o,n.flipY=l,n},updateCropUVs:function(n,e,s){return this.setCropUVs(n,n.x,n.y,n.width,n.height,e,s)},setUVs:function(n,e,s,a,i,o){var l=this.data.drawImage;return l.width=n,l.height=e,this.u0=s,this.v0=a,this.u1=i,this.v1=o,this},updateUVs:function(){var n=this.cutX,e=this.cutY,s=this.cutWidth,a=this.cutHeight,i=this.data.drawImage;i.width=s,i.height=a;var o=this.source.width,l=this.source.height;return this.u0=n/o,this.v0=e/l,this.u1=(n+s)/o,this.v1=(e+a)/l,this},updateUVsInverted:function(){var n=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/n,this.v0=this.cutY/e,this.u1=this.cutX/n,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var n=new r(this.texture,this.name,this.sourceIndex);return n.cutX=this.cutX,n.cutY=this.cutY,n.cutWidth=this.cutWidth,n.cutHeight=this.cutHeight,n.x=this.x,n.y=this.y,n.width=this.width,n.height=this.height,n.halfWidth=this.halfWidth,n.halfHeight=this.halfHeight,n.centerX=this.centerX,n.centerY=this.centerY,n.rotated=this.rotated,n.data=h(!0,n.data,this.data),n.updateUVs(),n},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}}});p.exports=r},79237:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(4327),h=t(11876),r='Texture "%s" has no frame "%s"',n=new d({initialize:function(s,a,i,o,l){Array.isArray(i)||(i=[i]),this.manager=s,this.key=a,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var f=0;fl&&(l=v.cutX+v.cutWidth),v.cutY+v.cutHeight>f&&(f=v.cutY+v.cutHeight)}return{x:i,y:o,width:l-i,height:f-o}},getFrameNames:function(e){e===void 0&&(e=!1);var s=Object.keys(this.frames);if(!e){var a=s.indexOf("__BASE");a!==-1&&s.splice(a,1)}return s},getSourceImage:function(e){(e==null||this.frameTotal===1)&&(e="__BASE");var s=this.frames[e];return s?s.source.image:(console.warn(r,this.key,e),this.frames.__BASE.source.image)},getDataSourceImage:function(e){(e==null||this.frameTotal===1)&&(e="__BASE");var s=this.frames[e],a;return s?a=s.sourceIndex:(console.warn(r,this.key,e),a=this.frames.__BASE.sourceIndex),this.dataSource[a].image},setDataSource:function(e){Array.isArray(e)||(e=[e]);for(var s=0;s{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(27919),c=t(57382),h=t(83419),r=t(40987),n=t(8054),e=t(81320),s=t(50792),a=t(69442),i=t(4327),o=t(8443),l=t(99584),f=t(35154),u=t(88571),v=t(41212),m=t(61309),x=t(87841),g=t(79237),y=new h({Extends:s,initialize:function(C){s.call(this),this.game=C,this.name="TextureManager",this.list={},this._tempCanvas=d.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new x,this.silentWarnings=!1,C.events.once(o.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(a.LOAD,this.updatePending,this),this.on(a.ERROR,this.updatePending,this);var T=this.game.config;T.defaultImage!==null&&this.addBase64("__DEFAULT",T.defaultImage),T.missingImage!==null&&this.addBase64("__MISSING",T.missingImage),T.whiteImage!==null&&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(o.DESTROY,this.destroy,this),this.game.events.once(o.SYSTEM_READY,function(C){this.stamp=new u(C).setOrigin(0)},this)},updatePending:function(){this._pending--,this._pending===0&&(this.off(a.LOAD),this.off(a.ERROR),this.emit(a.READY))},checkKey:function(T){return!T||typeof T!="string"||this.exists(T)?(this.silentWarnings||console.error("Texture key already in use: "+T),!1):!0},remove:function(T){if(typeof T=="string")if(this.exists(T))T=this.get(T);else return this.silentWarnings||console.warn("No texture found matching key: "+T),this;var C=T.key;return this.list.hasOwnProperty(C)&&(T.destroy(),this.emit(a.REMOVE,C),this.emit(a.REMOVE_KEY+C)),this},removeKey:function(T){return this.list.hasOwnProperty(T)&&delete this.list[T],this},addBase64:function(T,C){if(this.checkKey(T)){var E=this,M=new Image;M.onerror=function(){E.emit(a.ERROR,T)},M.onload=function(){var P=E.create(T,M);P&&(m.Image(P,0),E.emit(a.ADD,T,P),E.emit(a.ADD_KEY+T,P),E.emit(a.LOAD,T,P))},M.src=C}return this},getBase64:function(T,C,E,M){E===void 0&&(E="image/png"),M===void 0&&(M=.92);var P="",A=this.getFrame(T,C);if(A&&(A.source.isRenderTexture||A.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(A){var F=A.canvasData,L=d.create2D(this,F.width,F.height),B=L.getContext("2d",{willReadFrequently:!0});F.width>0&&F.height>0&&B.drawImage(A.source.image,F.x,F.y,F.width,F.height,0,0,F.width,F.height),P=L.toDataURL(E,M),d.remove(L)}return P},addImage:function(T,C,E){var M=null;return this.checkKey(T)&&(M=this.create(T,C),m.Image(M,0),E&&M.setDataSource(E),this.emit(a.ADD,T,M),this.emit(a.ADD_KEY+T,M)),M},addGLTexture:function(T,C){var E=null;if(this.checkKey(T)){var M=C.width,P=C.height;E=this.create(T,C,M,P),E.add("__BASE",0,0,0,M,P),this.emit(a.ADD,T,E),this.emit(a.ADD_KEY+T,E)}return E},addCompressedTexture:function(T,C,E){var M=null;if(this.checkKey(T)){if(M=this.create(T,C),M.add("__BASE",0,0,0,C.width,C.height),E){var P=function(F,L,B){Array.isArray(B.textures)||Array.isArray(B.frames)?m.JSONArray(F,L,B):m.JSONHash(F,L,B)};if(Array.isArray(E))for(var A=0;A=A.x&&T=A.y&&C=A.x&&T=A.y&&C{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(27919),c=t(83419),h=t(50030),r=t(29795),n=t(82751),e=new c({initialize:function(a,i,o,l,f){f===void 0&&(f=!1);var u=a.manager.game;this.renderer=u.renderer,this.texture=a,this.source=i,this.image=i.compressed?null:i,this.compressionAlgorithm=i.compressed?i.format:null,this.resolution=1,this.width=o||i.naturalWidth||i.videoWidth||i.width||0,this.height=l||i.naturalHeight||i.videoHeight||i.height||0,this.scaleMode=r.DEFAULT,this.isCanvas=i instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&i instanceof HTMLVideoElement,this.isRenderTexture=i.type==="RenderTexture"||i.type==="DynamicTexture",this.isGLTexture=i instanceof n,this.isPowerOf2=h(this.width,this.height),this.glTexture=null,this.flipY=f,this.init(u)},init:function(s){var a=this.renderer;if(a){var i=this.source;if(a.gl){var o=this.image,l=this.flipY,f=this.width,u=this.height,v=this.scaleMode;this.isCanvas?this.glTexture=a.createCanvasTexture(o,!1,l):this.isVideo?this.glTexture=a.createVideoTexture(o,!1,l):this.isRenderTexture?this.glTexture=a.createTextureFromSource(null,f,u,v):this.isGLTexture?this.glTexture=i:this.compressionAlgorithm?this.glTexture=a.createTextureFromSource(i,void 0,void 0,v):i instanceof Uint8Array?this.glTexture=a.createUint8ArrayTexture(i,f,u,v):this.glTexture=a.createTextureFromSource(o,f,u,v)}else this.isRenderTexture&&(this.image=i.canvas)}s.config.antialias||this.setFilter(1)},setFilter:function(s){this.renderer&&this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,s),this.scaleMode=s},setFlipY:function(s){return s===void 0&&(s=!0),s===this.flipY?this:(this.flipY=s,this.update(),this)},update:function(){var s=this.renderer,a=this.image,i=this.flipY,o=s.gl;o&&this.isCanvas?s.updateCanvasTexture(a,this.glTexture,i):o&&this.isVideo&&s.updateVideoTexture(a,this.glTexture,i)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&d.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});p.exports=e},19673:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={LINEAR:0,NEAREST:1};p.exports=S},44538:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="addtexture"},63486:p=>{/** * @author samme * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="addtexture-"},94851:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="onerror"},29099:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="onload"},8678:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="ready"},86415:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="removetexture"},30879:p=>{/** * @author samme * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="removetexture-"},69442:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={ADD:t(44538),ADD_KEY:t(63486),ERROR:t(94851),LOAD:t(29099),READY:t(8678),REMOVE:t(86415),REMOVE_KEY:t(30879)}},27458:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(79291),c=t(19673),h={CanvasTexture:t(57382),DynamicTexture:t(81320),Events:t(69442),FilterMode:c,Frame:t(4327),Parsers:t(61309),Texture:t(79237),TextureManager:t(17130),TextureSource:t(11876)};h=d(!1,h,c),p.exports=h},89905:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){if(!c.getElementsByTagName("TextureAtlas")){console.warn("Invalid Texture Atlas XML given");return}var h=t.source[d];t.add("__BASE",d,0,0,h.width,h.height);for(var r=c.getElementsByTagName("SubTexture"),n,e=0;e{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){var c=t.source[d];return t.add("__BASE",d,0,0,c.width,c.height),t};p.exports=S},4832:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){var c=t.source[d];return t.add("__BASE",d,0,0,c.width,c.height),t};p.exports=S},78566:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(41786),c=function(h,r,n){if(!n.frames&&!n.textures){console.warn("Invalid Texture Atlas JSON Array");return}var e=h.source[r];h.add("__BASE",r,0,0,e.width,e.height);for(var s=Array.isArray(n.textures)?n.textures[r].frames:n.frames,a,i=0;i{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(41786),c=function(h,r,n){if(!n.frames){console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object");return}var e=h.source[r];h.add("__BASE",r,0,0,e.width,e.height);var s=n.frames,a;for(var i in s)if(s.hasOwnProperty(i)){var o=s[i];if(a=h.add(i,r,o.frame.x,o.frame.y,o.frame.w,o.frame.h),!a){console.warn("Invalid atlas json, frame already exists: "+i);continue}o.trimmed&&a.setTrim(o.sourceSize.w,o.sourceSize.h,o.spriteSourceSize.x,o.spriteSourceSize.y,o.spriteSourceSize.w,o.spriteSourceSize.h),o.rotated&&(a.rotated=!0,a.updateUVsInverted());var l=o.anchor||o.pivot;l&&(a.customPivot=!0,a.pivotX=l.x,a.pivotY=l.y),o.scale9Borders&&a.setScale9(o.scale9Borders.x,o.scale9Borders.y,o.scale9Borders.w,o.scale9Borders.h),a.customData=d(o)}for(var f in n)f!=="frames"&&(Array.isArray(n[f])?h.customData[f]=n[f].slice(0):h.customData[f]=n[f]);return h};p.exports=c},31403:p=>{/** * @author Richard Davey * @copyright 2021 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){var d=[171,75,84,88,32,49,49,187,13,10,26,10],c,h=new Uint8Array(t,0,12);for(c=0;c>1),x=Math.max(1,x>>1),v+=g}return{mipmaps:u,width:i,height:o,internalFormat:a,compressed:!0,generateMipmap:!1}};p.exports=S},82038:p=>{/** * @author Richard Davey * @copyright 2021 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */function S(C,E,M,P,A,F,L){return L===void 0&&(L=16),Math.floor((C+M)/A)*Math.floor((E+P)/F)*L}function t(C,E){return C=Math.max(C,16),E=Math.max(E,8),C*E/4}function d(C,E){return C=Math.max(C,8),E=Math.max(E,8),C*E/2}function c(C,E){return Math.ceil(C/4)*Math.ceil(E/4)*16}function h(C,E){return S(C,E,3,3,4,4,8)}function r(C,E){return S(C,E,3,3,4,4)}function n(C,E){return S(C,E,4,3,5,4)}function e(C,E){return S(C,E,4,4,5,5)}function s(C,E){return S(C,E,5,4,6,5)}function a(C,E){return S(C,E,5,5,6,6)}function i(C,E){return S(C,E,7,4,8,5)}function o(C,E){return S(C,E,7,5,8,6)}function l(C,E){return S(C,E,7,7,8,8)}function f(C,E){return S(C,E,9,4,10,5)}function u(C,E){return S(C,E,9,5,10,6)}function v(C,E){return S(C,E,9,7,10,8)}function m(C,E){return S(C,E,9,9,10,10)}function x(C,E){return S(C,E,11,9,12,10)}function g(C,E){return S(C,E,11,11,12,12)}var y={0:{sizeFunc:t,glFormat:[35841]},1:{sizeFunc:t,glFormat:[35843]},2:{sizeFunc:d,glFormat:[35840]},3:{sizeFunc:d,glFormat:[35842]},6:{sizeFunc:h,glFormat:[36196]},7:{sizeFunc:h,glFormat:[33776,35916]},8:{sizeFunc:r,glFormat:[33777,35917]},9:{sizeFunc:r,glFormat:[33778,35918]},11:{sizeFunc:r,glFormat:[33779,35919]},14:{sizeFunc:c,glFormat:[36494,36495]},15:{sizeFunc:c,glFormat:[36492,36493]},22:{sizeFunc:h,glFormat:[37492,37493]},23:{sizeFunc:r,glFormat:[37496,37497]},24:{sizeFunc:h,glFormat:[37494,37495]},25:{sizeFunc:h,glFormat:[37488]},26:{sizeFunc:r,glFormat:[37490]},27:{sizeFunc:r,glFormat:[37808,37840]},28:{sizeFunc:n,glFormat:[37809,37841]},29:{sizeFunc:e,glFormat:[37810,37842]},30:{sizeFunc:s,glFormat:[37811,37843]},31:{sizeFunc:a,glFormat:[37812,37844]},32:{sizeFunc:i,glFormat:[37813,37845]},33:{sizeFunc:o,glFormat:[37814,37846]},34:{sizeFunc:l,glFormat:[37815,37847]},35:{sizeFunc:f,glFormat:[37816,37848]},36:{sizeFunc:u,glFormat:[37817,37849]},37:{sizeFunc:v,glFormat:[37818,37850]},38:{sizeFunc:m,glFormat:[37819,37851]},39:{sizeFunc:x,glFormat:[37820,37852]},40:{sizeFunc:g,glFormat:[37821,37853]}},T=function(C){for(var E=new Uint32Array(C,0,13),M=E[0],P=M===55727696,A=P?E[2]:E[3],F=E[4],L=y[A].glFormat[F],B=y[A].sizeFunc,N=E[11],U=E[7],z=E[6],I=52+E[12],G=new Uint8Array(C,I),O=new Array(N),b=0,D=U,X=z,V=0;V>1),X=Math.max(1,X>>1),b+=W}return{mipmaps:O,width:U,height:z,internalFormat:L,compressed:!0,generateMipmap:!1}};p.exports=T},75549:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(95540),c=function(h,r,n,e,s,a,i){var o=d(i,"frameWidth",null),l=d(i,"frameHeight",o);if(o===null)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var f=h.source[r];h.add("__BASE",r,0,0,f.width,f.height);var u=d(i,"startFrame",0),v=d(i,"endFrame",-1),m=d(i,"margin",0),x=d(i,"spacing",0),g=Math.floor((s-m+x)/(o+x)),y=Math.floor((a-m+x)/(l+x)),T=g*y;T===0&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",h.key),(u>T||u<-T)&&(u=0),u<0&&(u=T+u),(v===-1||v>T||vs&&(M=L-s),B>a&&(P=B-a),F>=u&&F<=v&&(h.add(A,r,n+C,e+E,o-M,l-P),A++),C+=o+x,C+o>s&&(C=m,E+=l+x)}return h};p.exports=c},47534:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(95540),c=function(h,r,n){var e=d(n,"frameWidth",null),s=d(n,"frameHeight",e);if(!e)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var a=h.source[0];h.add("__BASE",0,0,0,a.width,a.height),d(n,"startFrame",0),d(n,"endFrame",-1);for(var i=d(n,"margin",0),o=d(n,"spacing",0),l=r.cutX,f=r.cutY,u=r.cutWidth,v=r.cutHeight,m=r.realWidth,x=r.realHeight,g=Math.floor((m-i+o)/(e+o)),y=Math.floor((x-i+o)/(s+o)),T=r.x,C=e-T,E=e-(m-u-T),M=r.y,P=s-M,A=s-(x-v-M),F,L=i,B=i,N=0,U=0,z=0;z{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=0,t=function(c,h,r,n){var e=S-n.y-n.height;c.add(r,h,n.x,e,n.width,n.height)},d=function(c,h,r){var n=c.source[h];c.add("__BASE",h,0,0,n.width,n.height),S=n.height;for(var e=r.split(` `),s=/^[ ]*(- )*(\w+)+[: ]+(.*)/,a="",i="",o={x:0,y:0,width:0,height:0},l=0;l{/** * @author Ben Richards * @copyright 2024 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(50030),c=function(a){for(var i=a.mipmaps,o=1;o{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={AtlasXML:t(89905),Canvas:t(72893),Image:t(4832),JSONArray:t(78566),JSONHash:t(39711),KTXParser:t(31403),PVRParser:t(82038),SpriteSheet:t(75549),SpriteSheetFromAtlas:t(47534),UnityYAML:t(86147)}},80341:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},16536:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=new d({initialize:function(r,n,e,s,a,i,o){(e===void 0||e<=0)&&(e=32),(s===void 0||s<=0)&&(s=32),a===void 0&&(a=0),i===void 0&&(i=0),this.name=r,this.firstgid=n|0,this.imageWidth=e|0,this.imageHeight=s|0,this.imageMargin=a|0,this.imageSpacing=i|0,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(h){return h>=this.firstgid&&h{/** * @author Richard Davey * @copyright 2021 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=new d({initialize:function(r){if(this.gids=[],r!==void 0)for(var n=0;n{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(80341),c=t(87010),h=t(46177),r=t(49075),n=function(e,s,a,i,o,l,f,u){a===void 0&&(a=32),i===void 0&&(i=32),o===void 0&&(o=10),l===void 0&&(l=10),u===void 0&&(u=!1);var v=null;if(Array.isArray(f)){var m=s!==void 0?s:"map";v=h(m,d.ARRAY_2D,f,a,i,u)}else if(s!==void 0){var x=e.cache.tilemap.get(s);x?v=h(s,x.format,x.data,a,i,u):console.warn("No map data found for key "+s)}return v===null&&(v=new c({tileWidth:a,tileHeight:i,width:o,height:l})),new r(e,v)};p.exports=n},23029:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(31401),h=t(91907),r=t(62644),n=t(93232),e=new d({Mixins:[c.AlphaSingle,c.Flip,c.Visible],initialize:function(a,i,o,l,f,u,v,m){this.layer=a,this.index=i,this.x=o,this.y=l,this.width=f,this.height=u,this.right,this.bottom,this.baseWidth=v!==void 0?v:f,this.baseHeight=m!==void 0?m:u,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,this.tint=16777215,this.tintFill=!1,this.physics={}},containsPoint:function(s,a){return!(sthis.right||a>this.bottom)},copy:function(s){return this.index=s.index,this.alpha=s.alpha,this.properties=r(s.properties),this.visible=s.visible,this.setFlip(s.flipX,s.flipY),this.tint=s.tint,this.rotation=s.rotation,this.collideUp=s.collideUp,this.collideDown=s.collideDown,this.collideLeft=s.collideLeft,this.collideRight=s.collideRight,this.collisionCallback=s.collisionCallback,this.collisionCallbackContext=s.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(s){var a=this.tilemapLayer;if(a){var i=a.tileToWorldXY(this.x,this.y,void 0,s);return i.x}return this.x*this.baseWidth},getRight:function(s){var a=this.tilemapLayer;return a?this.getLeft(s)+this.width*a.scaleX:this.getLeft(s)+this.width},getTop:function(s){var a=this.tilemapLayer;if(a){var i=a.tileToWorldXY(this.x,this.y,void 0,s);return i.y}return this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(s){var a=this.tilemapLayer;return a?this.getTop(s)+this.height*a.scaleY:this.getTop(s)+this.height},getBounds:function(s,a){return a===void 0&&(a=new n),a.x=this.getLeft(s),a.y=this.getTop(s),a.width=this.getRight(s)-a.x,a.height=this.getBottom(s)-a.y,a},getCenterX:function(s){return(this.getLeft(s)+this.getRight(s))/2},getCenterY:function(s){return(this.getTop(s)+this.getBottom(s))/2},intersects:function(s,a,i,o){return!(i<=this.pixelX||o<=this.pixelY||s>=this.right||a>=this.bottom)},isInteresting:function(s,a){return s&&a?this.canCollide||this.hasInterestingFace:s?this.collides:a?this.hasInterestingFace:!1},resetCollision:function(s){if(s===void 0&&(s=!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,s){var a=this.tilemapLayer;a&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(s,a,i,o,l){if(a===void 0&&(a=s),i===void 0&&(i=s),o===void 0&&(o=s),l===void 0&&(l=!0),this.collideLeft=s,this.collideRight=a,this.collideUp=i,this.collideDown=o,this.faceLeft=s,this.faceRight=a,this.faceTop=i,this.faceBottom=o,l){var f=this.tilemapLayer;f&&this.tilemapLayer.calculateFacesAt(this.x,this.y)}return this},setCollisionCallback:function(s,a){return s===null?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=s,this.collisionCallbackContext=a),this},setSize:function(s,a,i,o){return s!==void 0&&(this.width=s),a!==void 0&&(this.height=a),i!==void 0&&(this.baseWidth=i),o!==void 0&&(this.baseHeight=o),this.updatePixelXY(),this},updatePixelXY:function(){var s=this.layer.orientation;if(s===h.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(s===h.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(s===h.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(s===h.HEXAGONAL){var a=this.layer.staggerAxis,i=this.layer.staggerIndex,o=this.layer.hexSideLength,l,f;a==="y"?(f=(this.baseHeight-o)/2+o,i==="odd"?this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2):this.pixelX=this.x*this.baseWidth-this.y%2*(this.baseWidth/2),this.pixelY=this.y*f):a==="x"&&(l=(this.baseWidth-o)/2+o,this.pixelX=this.x*l,i==="odd"?this.pixelY=this.y*this.baseHeight+this.x%2*(this.baseHeight/2):this.pixelY=this.y*this.baseHeight-this.x%2*(this.baseHeight/2))}return 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||this.collisionCallback!==void 0}},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 s=this.layer.tilemapLayer;if(s){var a=s.gidMap[this.index];if(a)return a}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var s=this.tilemapLayer;return s?s.tilemap:null}}});p.exports=e},49075:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(84101),c=t(83419),h=t(39506),r=t(80341),n=t(95540),e=t(14977),s=t(27462),a=t(91907),i=t(36305),o=t(19133),l=t(68287),f=t(23029),u=t(81086),v=t(20442),m=t(33629),x=new c({initialize:function(y,T){this.scene=y,this.tileWidth=T.tileWidth,this.tileHeight=T.tileHeight,this.width=T.width,this.height=T.height,this.orientation=T.orientation,this.renderOrder=T.renderOrder,this.format=T.format,this.version=T.version,this.properties=T.properties,this.widthInPixels=T.widthInPixels,this.heightInPixels=T.heightInPixels,this.imageCollections=T.imageCollections,this.images=T.images,this.layers=T.layers,this.tiles=T.tiles,this.tilesets=T.tilesets,this.objects=T.objects,this.currentLayerIndex=0,this.hexSideLength=T.hexSideLength;var C=this.orientation;this._convert={WorldToTileXY:u.GetWorldToTileXYFunction(C),WorldToTileX:u.GetWorldToTileXFunction(C),WorldToTileY:u.GetWorldToTileYFunction(C),TileToWorldXY:u.GetTileToWorldXYFunction(C),TileToWorldX:u.GetTileToWorldXFunction(C),TileToWorldY:u.GetTileToWorldYFunction(C),GetTileCorners:u.GetTileCornersFunction(C)}},setRenderOrder:function(g){var y=["right-down","left-down","right-up","left-up"];return typeof g=="number"&&(g=y[g]),y.indexOf(g)>-1&&(this.renderOrder=g),this},addTilesetImage:function(g,y,T,C,E,M,P,A){if(g===void 0)return null;y==null&&(y=g);var F=this.scene.sys.textures;if(!F.exists(y))return console.warn('Texture key "%s" not found',y),null;var L=F.get(y),B=this.getTilesetIndex(g);if(B===null&&this.format===r.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',g,this.tilesets),null;var N=this.tilesets[B];return N?((T||C)&&N.setTileSize(T,C),(E||M)&&N.setSpacing(E,M),N.setImage(L),N):(T===void 0&&(T=this.tileWidth),C===void 0&&(C=this.tileHeight),E===void 0&&(E=0),M===void 0&&(M=0),P===void 0&&(P=0),A===void 0&&(A={x:0,y:0}),N=new m(g,P,T,C,E,M,void 0,void 0,A),N.setImage(L),this.tilesets.push(N),this.tiles=d(this),N)},copy:function(g,y,T,C,E,M,P,A){return A=this.getLayer(A),A!==null?(u.Copy(g,y,T,C,E,M,P,A),this):null},createBlankLayer:function(g,y,T,C,E,M,P,A){T===void 0&&(T=0),C===void 0&&(C=0),E===void 0&&(E=this.width),M===void 0&&(M=this.height),P===void 0&&(P=this.tileWidth),A===void 0&&(A=this.tileHeight);var F=this.getLayerIndex(g);if(F!==null)return console.warn("Invalid Tilemap Layer ID: "+g),null;for(var L=new e({name:g,tileWidth:P,tileHeight:A,width:E,height:M,orientation:this.orientation,hexSideLength:this.hexSideLength}),B,N=0;N-1&&this.putTileAt(y,M.x,M.y,T,M.tilemapLayer)}return C},removeTileAt:function(g,y,T,C,E){return T===void 0&&(T=!0),C===void 0&&(C=!0),E=this.getLayer(E),E===null?null:u.RemoveTileAt(g,y,T,C,E)},removeTileAtWorldXY:function(g,y,T,C,E,M){return T===void 0&&(T=!0),C===void 0&&(C=!0),M=this.getLayer(M),M===null?null:u.RemoveTileAtWorldXY(g,y,T,C,E,M)},renderDebug:function(g,y,T){return T=this.getLayer(T),T===null?null:(this.orientation===a.ORTHOGONAL&&u.RenderDebug(g,y,T),this)},renderDebugFull:function(g,y){for(var T=this.layers,C=0;C{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(44603),c=t(31989);d.register("tilemap",function(h){var r=h!==void 0?h:{};return c(this.scene,r.key,r.tileWidth,r.tileHeight,r.width,r.height,r.data,r.insertNull)})},46029:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(39429),c=t(31989);d.register("tilemap",function(h,r,n,e,s,a,i){return h===null&&(h=void 0),r===null&&(r=void 0),n===null&&(n=void 0),e===null&&(e=void 0),s===null&&(s=void 0),c(this.scene,h,r,n,e,s,a,i)})},20442:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(78389),h=t(31401),r=t(95643),n=t(81086),e=t(19218),s=t(26099),a=new d({Extends:r,Mixins:[h.Alpha,h.BlendMode,h.ComputedSize,h.Depth,h.Flip,h.GetBounds,h.Mask,h.Origin,h.Pipeline,h.PostPipeline,h.Transform,h.Visible,h.ScrollFactor,c,e],initialize:function(o,l,f,u,v,m){r.call(this,o,"TilemapLayer"),this.isTilemap=!0,this.tilemap=l,this.layerIndex=f,this.layer=l.layers[f],this.layer.tilemapLayer=this,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=n.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new s,this.collisionCategory=1,this.collisionMask=1,this.setTilesets(u),this.setAlpha(this.layer.alpha),this.setPosition(v,m),this.setOrigin(0,0),this.setSize(l.tileWidth*this.layer.width,l.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(i){var o=[],l=[],f=this.tilemap;Array.isArray(i)||(i=[i]);for(var u=0;u=0&&i<4&&(this._renderOrder=i),this},calculateFacesAt:function(i,o){return n.CalculateFacesAt(i,o,this.layer),this},calculateFacesWithin:function(i,o,l,f){return n.CalculateFacesWithin(i,o,l,f,this.layer),this},createFromTiles:function(i,o,l,f,u){return n.CreateFromTiles(i,o,l,f,u,this.layer)},cull:function(i){return this.cullCallback(this.layer,i,this.culledTiles,this._renderOrder)},copy:function(i,o,l,f,u,v,m){return n.Copy(i,o,l,f,u,v,m,this.layer),this},fill:function(i,o,l,f,u,v){return n.Fill(i,o,l,f,u,v,this.layer),this},filterTiles:function(i,o,l,f,u,v,m){return n.FilterTiles(i,o,l,f,u,v,m,this.layer)},findByIndex:function(i,o,l){return n.FindByIndex(i,o,l,this.layer)},findTile:function(i,o,l,f,u,v,m){return n.FindTile(i,o,l,f,u,v,m,this.layer)},forEachTile:function(i,o,l,f,u,v,m){return n.ForEachTile(i,o,l,f,u,v,m,this.layer),this},setTint:function(i,o,l,f,u,v){i===void 0&&(i=16777215);var m=function(x){x.tint=i,x.tintFill=!1};return this.forEachTile(m,this,o,l,f,u,v)},setTintFill:function(i,o,l,f,u,v){i===void 0&&(i=16777215);var m=function(x){x.tint=i,x.tintFill=!0};return this.forEachTile(m,this,o,l,f,u,v)},getTileAt:function(i,o,l){return n.GetTileAt(i,o,l,this.layer)},getTileAtWorldXY:function(i,o,l,f){return n.GetTileAtWorldXY(i,o,l,f,this.layer)},getIsoTileAtWorldXY:function(i,o,l,f,u){l===void 0&&(l=!0);var v=this.tempVec;return n.IsometricWorldToTileXY(i,o,!0,v,u,this.layer,l),this.getTileAt(v.x,v.y,f)},getTilesWithin:function(i,o,l,f,u){return n.GetTilesWithin(i,o,l,f,u,this.layer)},getTilesWithinShape:function(i,o,l){return n.GetTilesWithinShape(i,o,l,this.layer)},getTilesWithinWorldXY:function(i,o,l,f,u,v){return n.GetTilesWithinWorldXY(i,o,l,f,u,v,this.layer)},hasTileAt:function(i,o){return n.HasTileAt(i,o,this.layer)},hasTileAtWorldXY:function(i,o,l){return n.HasTileAtWorldXY(i,o,l,this.layer)},putTileAt:function(i,o,l,f){return n.PutTileAt(i,o,l,f,this.layer)},putTileAtWorldXY:function(i,o,l,f,u){return n.PutTileAtWorldXY(i,o,l,f,u,this.layer)},putTilesAt:function(i,o,l,f){return n.PutTilesAt(i,o,l,f,this.layer),this},randomize:function(i,o,l,f,u){return n.Randomize(i,o,l,f,u,this.layer),this},removeTileAt:function(i,o,l,f){return n.RemoveTileAt(i,o,l,f,this.layer)},removeTileAtWorldXY:function(i,o,l,f,u){return n.RemoveTileAtWorldXY(i,o,l,f,u,this.layer)},renderDebug:function(i,o){return n.RenderDebug(i,o,this.layer),this},replaceByIndex:function(i,o,l,f,u,v){return n.ReplaceByIndex(i,o,l,f,u,v,this.layer),this},setSkipCull:function(i){return i===void 0&&(i=!0),this.skipCull=i,this},setCullPadding:function(i,o){return i===void 0&&(i=1),o===void 0&&(o=1),this.cullPaddingX=i,this.cullPaddingY=o,this},setCollision:function(i,o,l,f){return n.SetCollision(i,o,l,this.layer,f),this},setCollisionBetween:function(i,o,l,f){return n.SetCollisionBetween(i,o,l,f,this.layer),this},setCollisionByProperty:function(i,o,l){return n.SetCollisionByProperty(i,o,l,this.layer),this},setCollisionByExclusion:function(i,o,l){return n.SetCollisionByExclusion(i,o,l,this.layer),this},setCollisionFromCollisionGroup:function(i,o){return n.SetCollisionFromCollisionGroup(i,o,this.layer),this},setTileIndexCallback:function(i,o,l){return n.SetTileIndexCallback(i,o,l,this.layer),this},setTileLocationCallback:function(i,o,l,f,u,v){return n.SetTileLocationCallback(i,o,l,f,u,v,this.layer),this},shuffle:function(i,o,l,f){return n.Shuffle(i,o,l,f,this.layer),this},swapByIndex:function(i,o,l,f,u,v){return n.SwapByIndex(i,o,l,f,u,v,this.layer),this},tileToWorldX:function(i,o){return this.tilemap.tileToWorldX(i,o,this)},tileToWorldY:function(i,o){return this.tilemap.tileToWorldY(i,o,this)},tileToWorldXY:function(i,o,l,f){return this.tilemap.tileToWorldXY(i,o,l,f,this)},getTileCorners:function(i,o,l){return this.tilemap.getTileCorners(i,o,l,this)},weightedRandomize:function(i,o,l,f,u){return n.WeightedRandomize(o,l,f,u,i,this.layer),this},worldToTileX:function(i,o,l){return this.tilemap.worldToTileX(i,o,l,this)},worldToTileY:function(i,o,l){return this.tilemap.worldToTileY(i,o,l,this)},worldToTileXY:function(i,o,l,f,u){return this.tilemap.worldToTileXY(i,o,l,f,u,this)},destroy:function(i){i===void 0&&(i=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),i&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],r.prototype.destroy.call(this))}});p.exports=a},16153:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(61340),c=new d,h=new d,r=new d,n=function(e,s,a,i){var o=s.cull(a),l=o.length,f=a.alpha*s.alpha;if(!(l===0||f<=0)){var u=c,v=h,m=r;v.applyITRS(s.x,s.y,s.rotation,s.scaleX,s.scaleY),u.copyFrom(a.matrix);var x=e.currentContext,g=s.gidMap;x.save(),i?(u.multiplyWithOffset(i,-a.scrollX*s.scrollFactorX,-a.scrollY*s.scrollFactorY),v.e=s.x,v.f=s.y,u.multiply(v,m),m.copyToContext(x)):(v.e-=a.scrollX*s.scrollFactorX,v.f-=a.scrollY*s.scrollFactorY,v.copyToContext(x)),(!e.antialias||s.scaleX>1||s.scaleY>1)&&(x.imageSmoothingEnabled=!1);for(var y=0;y{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(29747),c=d,h=d;c=t(99558),h=t(16153),p.exports={renderWebGL:c,renderCanvas:h}},99558:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(70554),c=function(h,r,n){var e=r.cull(n),s=e.length,a=n.alpha*r.alpha;if(!(s===0||a<=0)){var i=r.gidMap,o=h.pipelines.set(r.pipeline,r),l=d.getTintAppendFloatAlpha,f=r.scrollFactorX,u=r.scrollFactorY,v=r.x,m=r.y,x=r.scaleX,g=r.scaleY;h.pipelines.preBatch(r);for(var y=0;y{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(26099),h=new d({initialize:function(n,e,s,a,i,o,l,f,u){(s===void 0||s<=0)&&(s=32),(a===void 0||a<=0)&&(a=32),i===void 0&&(i=0),o===void 0&&(o=0),l===void 0&&(l={}),f===void 0&&(f={}),this.name=n,this.firstgid=e,this.tileWidth=s,this.tileHeight=a,this.tileMargin=i,this.tileSpacing=o,this.tileProperties=l,this.tileData=f,this.tileOffset=new c,u!==void 0&&this.tileOffset.set(u.x,u.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(r){return this.containsTileIndex(r)?this.tileProperties[r-this.firstgid]:null},getTileData:function(r){return this.containsTileIndex(r)?this.tileData[r-this.firstgid]:null},getTileCollisionGroup:function(r){var n=this.getTileData(r);return n&&n.objectgroup?n.objectgroup:null},containsTileIndex:function(r){return r>=this.firstgid&&re.width||n.height>e.height?this.updateTileData(n.width,n.height):this.updateTileData(e.width,e.height,e.x,e.y),this},setTileSize:function(r,n){return r!==void 0&&(this.tileWidth=r),n!==void 0&&(this.tileHeight=n),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(r,n){return r!==void 0&&(this.tileMargin=r),n!==void 0&&(this.tileSpacing=n),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(r,n,e,s){e===void 0&&(e=0),s===void 0&&(s=0);var a=(n-this.tileMargin*2+this.tileSpacing)/(this.tileHeight+this.tileSpacing),i=(r-this.tileMargin*2+this.tileSpacing)/(this.tileWidth+this.tileSpacing);(a%1!==0||i%1!==0)&&console.warn("Image tile area not tile size multiple in: "+this.name),a=Math.floor(a),i=Math.floor(i),this.rows=a,this.columns=i,this.total=a*i,this.texCoordinates.length=0;for(var o=this.tileMargin+e,l=this.tileMargin+s,f=0;f{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(7423),c=function(h,r,n){var e=d(h,r,!0,n),s=d(h,r-1,!0,n),a=d(h,r+1,!0,n),i=d(h-1,r,!0,n),o=d(h+1,r,!0,n),l=e&&e.collides;return l&&(e.faceTop=!0,e.faceBottom=!0,e.faceLeft=!0,e.faceRight=!0),s&&s.collides&&(l&&(e.faceTop=!1),s.faceBottom=!l),a&&a.collides&&(l&&(e.faceBottom=!1),a.faceTop=!l),i&&i.collides&&(l&&(e.faceLeft=!1),i.faceRight=!l),o&&o.collides&&(l&&(e.faceRight=!1),o.faceLeft=!l),e&&!e.collides&&e.resetFaces(),e};p.exports=c},42573:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(7423),c=t(7386),h=function(r,n,e,s,a){for(var i=null,o=null,l=null,f=null,u=c(r,n,e,s,null,a),v=0;v{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(26099),c=new d,h=function(r,n,e,s){var a=e.tilemapLayer,i=a.cullPaddingX,o=a.cullPaddingY,l=a.tilemap.tileToWorldXY(r,n,c,s,a);return l.x>s.worldView.x+a.scaleX*e.tileWidth*(-i-.5)&&l.xs.worldView.y+a.scaleY*e.tileHeight*(-o-1)&&l.y{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(42573),c=t(7386),h=t(62991),r=t(23029),n=function(e,s,a,i,o,l,f,u){f===void 0&&(f=!0);var v=c(e,s,a,i,null,u),m=[];v.forEach(function(M){var P=new r(M.layer,M.index,M.x,M.y,M.width,M.height,M.baseWidth,M.baseHeight);P.copy(M),m.push(P)});for(var x=o-e,g=l-s,y=0;y{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(62644),c=t(7386),h=t(27987),r=function(n,e,s,a,i,o){s||(s={}),Array.isArray(n)||(n=[n]);var l=o.tilemapLayer;a||(a=l.scene),i||(i=a.cameras.main);var f=o.width,u=o.height,v=c(0,0,f,u,null,o),m=[],x,g=function(E,M,P){for(var A=0;A{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(87841),c=t(63448),h=t(56583),r=new d,n=function(e,s){var a=e.tilemapLayer.tilemap,i=e.tilemapLayer,o=Math.floor(a.tileWidth*i.scaleX),l=Math.floor(a.tileHeight*i.scaleY),f=h(s.worldView.x-i.x,o,0,!0)-i.cullPaddingX,u=c(s.worldView.right-i.x,o,0,!0)+i.cullPaddingX,v=h(s.worldView.y-i.y,l,0,!0)-i.cullPaddingY,m=c(s.worldView.bottom-i.y,l,0,!0)+i.cullPaddingY;return r.setTo(f,v,u-f,m-v)};p.exports=n},30003:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(19545),c=t(32483),h=function(r,n,e,s){e===void 0&&(e=[]),s===void 0&&(s=0),e.length=0;var a=r.tilemapLayer,i=d(r,n);return(a.skipCull||a.scrollFactorX!==1||a.scrollFactorY!==1)&&(i.left=0,i.right=r.width,i.top=0,i.bottom=r.height),c(r,i,s,e),e};p.exports=h},35137:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(7386),c=t(42573),h=t(20576),r=function(n,e,s,a,i,o,l){for(var f=l.collideIndexes.indexOf(n)!==-1,u=d(e,s,a,i,null,l),v=0;v{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(7386),c=function(h,r,n,e,s,a,i,o){var l=d(n,e,s,a,i,o);return l.filter(h,r)};p.exports=c},52692:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h){d===void 0&&(d=0),c===void 0&&(c=!1);var r=0,n,e,s;if(c){for(e=h.height-1;e>=0;e--)for(n=h.width-1;n>=0;n--)if(s=h.data[e][n],s&&s.index===t){if(r===d)return s;r+=1}}else for(e=0;e{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(7386),c=function(h,r,n,e,s,a,i,o){var l=d(n,e,s,a,i,o);return l.find(h,r)||null};p.exports=c},97560:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(7386),c=function(h,r,n,e,s,a,i,o){var l=d(n,e,s,a,i,o);l.forEach(h,r)};p.exports=c},43305:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(91907),c=t(30003),h=t(9474),r=t(14018),n=t(29747),e=t(54503),s=function(a){return a===d.ORTHOGONAL?c:a===d.HEXAGONAL?h:a===d.STAGGERED?e:a===d.ISOMETRIC?r:n};p.exports=s},7423:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(62991),c=function(h,r,n,e){if(d(h,r,e)){var s=e.data[r][h]||null;return s?s.index===-1?n?s:null:s:null}else return null};p.exports=c},60540:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(7423),c=t(26099),h=new c,r=function(n,e,s,a,i){return i.tilemapLayer.worldToTileXY(n,e,!0,h,a),d(h.x,h.y,s,i)};p.exports=r},55826:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(26099),c=function(h,r,n,e){var s=e.baseTileWidth,a=e.baseTileHeight,i=e.tilemapLayer,o=0,l=0;i&&(n||(n=i.scene.cameras.main),o=i.x+n.scrollX*(1-i.scrollFactorX),l=i.y+n.scrollY*(1-i.scrollFactorY),s*=i.scaleX,a*=i.scaleY);var f=o+h*s,u=l+r*a;return[new d(f,u),new d(f+s,u),new d(f+s,u+a),new d(f,u+a)]};p.exports=c},11758:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(91907),c=t(27229),h=t(29747),r=t(55826),n=function(e){return e===d.ORTHOGONAL?r:e===d.ISOMETRIC?h:e===d.HEXAGONAL?c:(e===d.STAGGERED,h)};p.exports=n},39167:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(91907),c=t(29747),h=t(97281),r=function(n){return n===d.ORTHOGONAL?h:c};p.exports=r},62e3:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(91907),c=t(19951),h=t(14127),r=t(29747),n=t(97202),e=t(70326),s=function(a){return a===d.ORTHOGONAL?e:a===d.ISOMETRIC?h:a===d.HEXAGONAL?c:a===d.STAGGERED?n:r};p.exports=s},5984:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(91907),c=t(29747),h=t(28054),r=t(29650),n=function(e){return e===d.ORTHOGONAL?r:e===d.STAGGERED?h:c};p.exports=n},7386:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(95540),c=function(h,r,n,e,s,a){h===void 0&&(h=0),r===void 0&&(r=0),n===void 0&&(n=a.width),e===void 0&&(e=a.height),s||(s={});var i=d(s,"isNotEmpty",!1),o=d(s,"isColliding",!1),l=d(s,"hasInterestingFace",!1);h<0&&(n+=h,h=0),r<0&&(e+=r,r=0),h+n>a.width&&(n=Math.max(a.width-h,0)),r+e>a.height&&(e=Math.max(a.height-r,0));for(var f=[],u=r;u{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(55738),c=t(7386),h=t(91865),r=t(29747),n=t(26099),e=t(91907),s=function(f,u){return h.RectangleToTriangle(u,f)},a=new n,i=new n,o=new n,l=function(f,u,v,m){if(m.orientation!==e.ORTHOGONAL)return console.warn("GetTilesWithinShape only works with orthogonal tilemaps"),[];if(f===void 0)return[];var x=r;f instanceof d.Circle?x=h.CircleToRectangle:f instanceof d.Rectangle?x=h.RectangleToRectangle:f instanceof d.Triangle?x=s:f instanceof d.Line&&(x=h.LineToRectangle),m.tilemapLayer.worldToTileXY(f.left,f.top,!0,i,v);var g=i.x,y=i.y;m.tilemapLayer.worldToTileXY(f.right,f.bottom,!1,o,v);var T=Math.ceil(o.x),C=Math.ceil(o.y),E=Math.max(T-g,1),M=Math.max(C-y,1),P=c(g,y,E,M,u,m),A=m.tileWidth,F=m.tileHeight;m.tilemapLayer&&(A*=m.tilemapLayer.scaleX,F*=m.tilemapLayer.scaleY);for(var L=[],B=new d.Rectangle(0,0,A,F),N=0;N{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(7386),c=t(26099),h=new c,r=new c,n=function(e,s,a,i,o,l,f){var u=f.tilemapLayer.tilemap._convert.WorldToTileXY;u(e,s,!0,h,l,f);var v=h.x,m=h.y;u(e+a,s+i,!1,r,l,f);var x=Math.ceil(r.x),g=Math.ceil(r.y);return d(v,m,x-v,g-m,o,f)};p.exports=n},96113:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(91907),c=t(20242),h=t(10095),r=function(n){return n===d.ORTHOGONAL?h:c};p.exports=r},16926:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(91907),c=t(86625),h=t(96897),r=t(29747),n=t(15108),e=t(85896),s=function(a){return a===d.ORTHOGONAL?e:a===d.ISOMETRIC?h:a===d.HEXAGONAL?c:a===d.STAGGERED?n:r};p.exports=s},55762:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(91907),c=t(20242),h=t(51900),r=t(63288),n=function(e){return e===d.ORTHOGONAL?r:e===d.STAGGERED?h:c};p.exports=n},45091:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(62991),c=function(h,r,n){if(d(h,r,n)){var e=n.data[r][h];return e!==null&&e.index>-1}else return!1};p.exports=c},24152:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(45091),c=t(26099),h=new c,r=function(n,e,s,a){a.tilemapLayer.worldToTileXY(n,e,!0,h,s);var i=h.x,o=h.y;return d(i,o,a)};p.exports=r},90454:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(63448),c=t(56583),h=function(r,n){var e=r.tilemapLayer.tilemap,s=r.tilemapLayer,a=Math.floor(e.tileWidth*s.scaleX),i=Math.floor(e.tileHeight*s.scaleY),o=r.hexSideLength,l,f,u,v;if(r.staggerAxis==="y"){var m=(i-o)/2+o;l=c(n.worldView.x-s.x,a,0,!0)-s.cullPaddingX,f=d(n.worldView.right-s.x,a,0,!0)+s.cullPaddingX,u=c(n.worldView.y-s.y,m,0,!0)-s.cullPaddingY,v=d(n.worldView.bottom-s.y,m,0,!0)+s.cullPaddingY}else{var x=(a-o)/2+o;l=c(n.worldView.x-s.x,x,0,!0)-s.cullPaddingX,f=d(n.worldView.right-s.x,x,0,!0)+s.cullPaddingX,u=c(n.worldView.y-s.y,i,0,!0)-s.cullPaddingY,v=d(n.worldView.bottom-s.y,i,0,!0)+s.cullPaddingY}return{left:l,right:f,top:u,bottom:v}};p.exports=h},9474:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(90454),c=t(32483),h=function(r,n,e,s){e===void 0&&(e=[]),s===void 0&&(s=0),e.length=0;var a=r.tilemapLayer,i=d(r,n);return a.skipCull&&a.scrollFactorX===1&&a.scrollFactorY===1&&(i.left=0,i.right=r.width,i.top=0,i.bottom=r.height),c(r,i,s,e),e};p.exports=h},27229:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(19951),c=t(26099),h=new c,r=function(n,e,s,a){var i=a.baseTileWidth,o=a.baseTileHeight,l=a.tilemapLayer;l&&(i*=l.scaleX,o*=l.scaleY);var f=d(n,e,h,s,a),u=[],v=.5773502691896257,m,x;a.staggerAxis==="y"?(m=v*i,x=o/2):(m=i/2,x=v*o);for(var g=0;g<6;g++){var y=2*Math.PI*(.5-g)/6;u.push(new c(f.x+m*Math.cos(y),f.y+x*Math.sin(y)))}return u};p.exports=r},19951:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(26099),c=function(h,r,n,e,s){n||(n=new d);var a=s.baseTileWidth,i=s.baseTileHeight,o=s.tilemapLayer,l=0,f=0;o&&(e||(e=o.scene.cameras.main),l=o.x+e.scrollX*(1-o.scrollFactorX),f=o.y+e.scrollY*(1-o.scrollFactorY),a*=o.scaleX,i*=o.scaleY);var u=a/2,v=i/2,m,x,g=s.staggerAxis,y=s.staggerIndex;return g==="y"?(m=l+a*h+a,x=f+1.5*r*v+v,r%2===0&&(y==="odd"?m-=u:m+=u)):g==="x"&&y==="odd"&&(m=l+1.5*h*u+u,x=f+i*h+i,h%2===0&&(y==="odd"?x-=v:x+=v)),n.set(m,x)};p.exports=c},86625:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(26099),c=function(h,r,n,e,s,a){e||(e=new d);var i=a.baseTileWidth,o=a.baseTileHeight,l=a.tilemapLayer;l&&(s||(s=l.scene.cameras.main),h=h-(l.x+s.scrollX*(1-l.scrollFactorX)),r=r-(l.y+s.scrollY*(1-l.scrollFactorY)),i*=l.scaleX,o*=l.scaleY);var f=.5773502691896257,u=-.3333333333333333,v=0,m=.6666666666666666,x=i/2,g=o/2,y,T,C,E,M;a.staggerAxis==="y"?(y=(h-x)/(f*i),T=(r-g)/g,C=f*y+u*T,E=v*y+m*T):(y=(h-x)/x,T=(r-g)/(f*o),C=u*y+f*T,E=m*y+v*T),M=-C-E;var P=Math.round(C),A=Math.round(E),F=Math.round(M),L=Math.abs(P-C),B=Math.abs(A-E),N=Math.abs(F-M);L>B&&L>N?P=-A-F:B>N&&(A=-P-F);var U,z=A;return a.staggerIndex==="odd"?U=z%2===0?A/2+P:A/2+P-.5:U=z%2===0?A/2+P:A/2+P+.5,e.set(U,z)};p.exports=c},62991:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){return t>=0&&t=0&&d{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(33528),c=function(h,r,n,e){n===void 0&&(n=[]),e===void 0&&(e=0),n.length=0;var s=h.tilemapLayer,a=h.data,i=h.width,o=h.height,l=s.skipCull,f=0,u=i,v=0,m=o,x,g,y;if(e===0)for(g=v;g=f;x--)y=a[g][x],!(!y||y.index===-1||!y.visible||y.alpha===0)&&(!l&&!d(x,g,h,r)||n.push(y));else if(e===2)for(g=m;g>=v;g--)for(x=f;x=v;g--)for(x=u;x>=f;x--)y=a[g][x],!(!y||y.index===-1||!y.visible||y.alpha===0)&&(!l&&!d(x,g,h,r)||n.push(y));return s.tilesDrawn=n.length,s.tilesTotal=i*o,n};p.exports=c},14127:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(26099),c=function(h,r,n,e,s){n||(n=new d);var a=s.baseTileWidth,i=s.baseTileHeight,o=s.tilemapLayer,l=0,f=0;o&&(e||(e=o.scene.cameras.main),l=o.x+e.scrollX*(1-o.scrollFactorX),a*=o.scaleX,f=o.y+e.scrollY*(1-o.scrollFactorY),i*=o.scaleY);var u=l+(h-r)*(a/2),v=f+(h+r)*(i/2);return n.set(u,v)};p.exports=c},96897:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(26099),c=function(h,r,n,e,s,a,i){e||(e=new d);var o=a.baseTileWidth,l=a.baseTileHeight,f=a.tilemapLayer;f&&(s||(s=f.scene.cameras.main),r=r-(f.y+s.scrollY*(1-f.scrollFactorY)),l*=f.scaleY,h=h-(f.x+s.scrollX*(1-f.scrollFactorX)),o*=f.scaleX);var u=o/2,v=l/2;h=h-u,i||(r=r-l);var m=.5*(h/u+r/v),x=.5*(-h/u+r/v);return n&&(m=Math.floor(m),x=Math.floor(x)),e.set(m,x)};p.exports=c},71558:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(23029),c=t(62991),h=t(72023),r=t(20576),n=function(e,s,a,i,o){if(i===void 0&&(i=!0),!c(s,a,o))return null;var l,f=o.data[a][s],u=f&&f.collides;e instanceof d?(o.data[a][s]===null&&(o.data[a][s]=new d(o,e.index,s,a,o.tileWidth,o.tileHeight)),o.data[a][s].copy(e)):(l=e,o.data[a][s]===null?o.data[a][s]=new d(o,l,s,a,o.tileWidth,o.tileHeight):o.data[a][s].index=l);var v=o.data[a][s],m=o.collideIndexes.indexOf(v.index)!==-1;if(l=e instanceof d?e.index:e,l===-1)v.width=o.tileWidth,v.height=o.tileHeight;else{var x=o.tilemapLayer.tilemap,g=x.tiles,y=g[l][2],T=x.tilesets[y];v.width=T.tileWidth,v.height=T.tileHeight}return r(v,m),i&&u!==v.collides&&h(s,a,o),v};p.exports=n},26303:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(71558),c=t(26099),h=new c,r=function(n,e,s,a,i,o){return o.tilemapLayer.worldToTileXY(e,s,!0,h,i,o),d(n,h.x,h.y,a,o)};p.exports=r},14051:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(42573),c=t(71558),h=function(r,n,e,s,a){if(s===void 0&&(s=!0),!Array.isArray(r))return null;Array.isArray(r[0])||(r=[r]);for(var i=r.length,o=r[0].length,l=0;l{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(7386),c=t(26546),h=function(r,n,e,s,a,i){var o,l=d(r,n,e,s,{},i);if(!a)for(a=[],o=0;o{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(23029),c=t(62991),h=t(72023),r=function(n,e,s,a,i){if(s===void 0&&(s=!0),a===void 0&&(a=!0),!c(n,e,i))return null;var o=i.data[e][n];if(o)i.data[e][n]=s?null:new d(i,-1,n,e,i.tileWidth,i.tileHeight);else return null;return a&&o&&o.collides&&h(n,e,i),o};p.exports=r},94178:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(63557),c=t(26099),h=new c,r=function(n,e,s,a,i,o){return o.tilemapLayer.worldToTileXY(n,e,!0,h,i,o),d(h.x,h.y,s,a,o)};p.exports=r},15533:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(7386),c=t(3956),h=new c(105,210,231,150),r=new c(243,134,48,200),n=new c(40,39,37,150),e=function(s,a,i){a===void 0&&(a={});var o=a.tileColor!==void 0?a.tileColor:h,l=a.collidingTileColor!==void 0?a.collidingTileColor:r,f=a.faceColor!==void 0?a.faceColor:n,u=d(0,0,i.width,i.height,null,i);s.translateCanvas(i.tilemapLayer.x,i.tilemapLayer.y),s.scaleCanvas(i.tilemapLayer.scaleX,i.tilemapLayer.scaleY);for(var v=0;v{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(7386),c=function(h,r,n,e,s,a,i){for(var o=d(n,e,s,a,null,i),l=0;l{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h){var r=t.data,n=t.width,e=t.height,s=t.tilemapLayer,a=Math.max(0,d.left),i=Math.min(n,d.right),o=Math.max(0,d.top),l=Math.min(e,d.bottom),f,u,v;if(c===0)for(u=o;u=a;f--)v=r[u][f],!(!v||v.index===-1||!v.visible||v.alpha===0)&&h.push(v);else if(c===2)for(u=l;u>=o;u--)for(f=a;r[u]&&f=o;u--)for(f=i;r[u]&&f>=a;f--)v=r[u][f],!(!v||v.index===-1||!v.visible||v.alpha===0)&&h.push(v);return s.tilesDrawn=h.length,s.tilesTotal=n*e,h};p.exports=S},57068:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(20576),c=t(42573),h=t(9589),r=function(n,e,s,a,i){e===void 0&&(e=!0),s===void 0&&(s=!0),i===void 0&&(i=!0),Array.isArray(n)||(n=[n]);for(var o=0;o{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(20576),c=t(42573),h=t(9589),r=function(n,e,s,a,i,o){if(s===void 0&&(s=!0),a===void 0&&(a=!0),o===void 0&&(o=!0),!(n>e)){for(var l=n;l<=e;l++)h(l,s,i);if(o)for(var f=0;f=n&&v.index<=e&&d(v,s)}a&&c(0,0,i.width,i.height,i)}};p.exports=r},75661:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(20576),c=t(42573),h=t(9589),r=function(n,e,s,a){e===void 0&&(e=!0),s===void 0&&(s=!0),Array.isArray(n)||(n=[n]);for(var i=0;i{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(20576),c=t(42573),h=t(97022),r=function(n,e,s,a){e===void 0&&(e=!0),s===void 0&&(s=!0);for(var i=0;i{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(20576),c=t(42573),h=function(r,n,e){r===void 0&&(r=!0),n===void 0&&(n=!0);for(var s=0;s0&&d(i,r)}}n&&c(0,0,e.width,e.height,e)};p.exports=h},9589:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){var h=c.collideIndexes.indexOf(t);d&&h===-1?c.collideIndexes.push(t):!d&&h!==-1&&c.collideIndexes.splice(h,1)};p.exports=S},20576:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){d?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)};p.exports=S},79583:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h){if(typeof t=="number")h.callbacks[t]=d!==null?{callback:d,callbackContext:c}:void 0;else for(var r=0,n=t.length;r{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(7386),c=function(h,r,n,e,s,a,i){for(var o=d(h,r,n,e,null,i),l=0;l{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(7386),c=t(33680),h=function(r,n,e,s,a){var i=d(r,n,e,s,null,a),o=i.map(function(f){return f.index});c(o);for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(63448),c=t(56583),h=function(r,n){var e=r.tilemapLayer.tilemap,s=r.tilemapLayer,a=Math.floor(e.tileWidth*s.scaleX),i=Math.floor(e.tileHeight*s.scaleY),o=c(n.worldView.x-s.x,a,0,!0)-s.cullPaddingX,l=d(n.worldView.right-s.x,a,0,!0)+s.cullPaddingX,f=c(n.worldView.y-s.y,i/2,0,!0)-s.cullPaddingY,u=d(n.worldView.bottom-s.y,i/2,0,!0)+s.cullPaddingY;return{left:o,right:l,top:f,bottom:u}};p.exports=h},54503:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(61325),c=t(32483),h=function(r,n,e,s){e===void 0&&(e=[]),s===void 0&&(s=0),e.length=0;var a=r.tilemapLayer,i=d(r,n);return a.skipCull&&a.scrollFactorX===1&&a.scrollFactorY===1&&(i.left=0,i.right=r.width,i.top=0,i.bottom=r.height),c(r,i,s,e),e};p.exports=h},97202:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(26099),c=function(h,r,n,e,s){n||(n=new d);var a=s.baseTileWidth,i=s.baseTileHeight,o=s.tilemapLayer,l=0,f=0;o&&(e||(e=o.scene.cameras.main),l=o.x+e.scrollX*(1-o.scrollFactorX),a*=o.scaleX,f=o.y+e.scrollY*(1-o.scrollFactorY),i*=o.scaleY);var u=l+h*a+r%2*(a/2),v=f+r*(i/2);return n.set(u,v)};p.exports=c},28054:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){var h=c.baseTileHeight,r=c.tilemapLayer,n=0;return r&&(d===void 0&&(d=r.scene.cameras.main),n=r.y+d.scrollY*(1-r.scrollFactorY),h*=r.scaleY),n+t*(h/2)+h};p.exports=S},15108:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(26099),c=function(h,r,n,e,s,a){e||(e=new d);var i=a.baseTileWidth,o=a.baseTileHeight,l=a.tilemapLayer;l&&(s||(s=l.scene.cameras.main),r=r-(l.y+s.scrollY*(1-l.scrollFactorY)),o*=l.scaleY,h=h-(l.x+s.scrollX*(1-l.scrollFactorX)),i*=l.scaleX);var f=n?Math.floor(r/(o/2)):r/(o/2),u=n?Math.floor((h+f%2*.5*i)/i):(h+f%2*.5*i)/i;return e.set(u,f)};p.exports=c},51900:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h){var r=h.baseTileHeight,n=h.tilemapLayer;return n&&(c||(c=n.scene.cameras.main),t=t-(n.y+c.scrollY*(1-n.scrollFactorY)),r*=n.scaleY),d?Math.floor(t/(r/2)):t/(r/2)};p.exports=S},86560:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(7386),c=function(h,r,n,e,s,a,i){for(var o=d(n,e,s,a,null,i),l=0;l{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){var h=c.baseTileWidth,r=c.tilemapLayer,n=0;return r&&(d||(d=r.scene.cameras.main),n=r.x+d.scrollX*(1-r.scrollFactorX),h*=r.scaleX),n+t*h};p.exports=S},70326:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(97281),c=t(29650),h=t(26099),r=function(n,e,s,a,i){return s||(s=new h(0,0)),s.x=d(n,a,i),s.y=c(e,a,i),s};p.exports=r},29650:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){var h=c.baseTileHeight,r=c.tilemapLayer,n=0;return r&&(d||(d=r.scene.cameras.main),n=r.y+d.scrollY*(1-r.scrollFactorY),h*=r.scaleY),n+t*h};p.exports=S},77366:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(7386),c=t(75508),h=function(r,n,e,s,a,i){if(a){var o,l=d(r,n,e,s,null,i),f=0;for(o=0;o{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(85896),c=t(26099),h=new c,r=function(n,e,s,a){return d(n,0,e,h,s,a),h.x};p.exports=r},85896:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(26099),c=function(h,r,n,e,s,a){n===void 0&&(n=!0),e||(e=new d);var i=a.baseTileWidth,o=a.baseTileHeight,l=a.tilemapLayer;l&&(s||(s=l.scene.cameras.main),h=h-(l.x+s.scrollX*(1-l.scrollFactorX)),r=r-(l.y+s.scrollY*(1-l.scrollFactorY)),i*=l.scaleX,o*=l.scaleY);var f=h/i,u=r/o;return n&&(f=Math.floor(f),u=Math.floor(u)),e.set(f,u)};p.exports=c},63288:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(85896),c=t(26099),h=new c,r=function(n,e,s,a){return d(0,n,e,h,s,a),h.y};p.exports=r},81086:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={CalculateFacesAt:t(72023),CalculateFacesWithin:t(42573),CheckIsoBounds:t(33528),Copy:t(1785),CreateFromTiles:t(78419),CullBounds:t(19545),CullTiles:t(30003),Fill:t(35137),FilterTiles:t(40253),FindByIndex:t(52692),FindTile:t(66151),ForEachTile:t(97560),GetCullTilesFunction:t(43305),GetTileAt:t(7423),GetTileAtWorldXY:t(60540),GetTileCorners:t(55826),GetTileCornersFunction:t(11758),GetTilesWithin:t(7386),GetTilesWithinShape:t(91141),GetTilesWithinWorldXY:t(96523),GetTileToWorldXFunction:t(39167),GetTileToWorldXYFunction:t(62e3),GetTileToWorldYFunction:t(5984),GetWorldToTileXFunction:t(96113),GetWorldToTileXYFunction:t(16926),GetWorldToTileYFunction:t(55762),HasTileAt:t(45091),HasTileAtWorldXY:t(24152),HexagonalCullBounds:t(90454),HexagonalCullTiles:t(9474),HexagonalGetTileCorners:t(27229),HexagonalTileToWorldXY:t(19951),HexagonalWorldToTileXY:t(86625),IsInLayerBounds:t(62991),IsometricCullTiles:t(14018),IsometricTileToWorldXY:t(14127),IsometricWorldToTileXY:t(96897),PutTileAt:t(71558),PutTileAtWorldXY:t(26303),PutTilesAt:t(14051),Randomize:t(77389),RemoveTileAt:t(63557),RemoveTileAtWorldXY:t(94178),RenderDebug:t(15533),ReplaceByIndex:t(27987),RunCull:t(32483),SetCollision:t(57068),SetCollisionBetween:t(37266),SetCollisionByExclusion:t(75661),SetCollisionByProperty:t(64740),SetCollisionFromCollisionGroup:t(63307),SetLayerCollisionIndex:t(9589),SetTileCollision:t(20576),SetTileIndexCallback:t(79583),SetTileLocationCallback:t(93254),Shuffle:t(32903),StaggeredCullBounds:t(61325),StaggeredCullTiles:t(54503),StaggeredTileToWorldXY:t(97202),StaggeredTileToWorldY:t(28054),StaggeredWorldToTileXY:t(15108),StaggeredWorldToTileY:t(51900),SwapByIndex:t(86560),TileToWorldX:t(97281),TileToWorldXY:t(70326),TileToWorldY:t(29650),WeightedRandomize:t(77366),WorldToTileX:t(10095),WorldToTileXY:t(85896),WorldToTileY:t(63288)}},91907:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},21829:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d={ORIENTATION:t(91907)};p.exports=d},62501:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(79291),c=t(21829),h={Components:t(81086),Parsers:t(57442),Formats:t(80341),ImageCollection:t(16536),ParseToTilemap:t(31989),Tile:t(23029),Tilemap:t(49075),TilemapCreator:t(45939),TilemapFactory:t(46029),Tileset:t(33629),TilemapLayer:t(20442),Orientation:t(91907),LayerData:t(14977),MapData:t(87010),ObjectLayer:t(48700)};h=d(!1,h,c.ORIENTATION),p.exports=h},14977:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(91907),h=t(95540),r=new d({initialize:function(e){e===void 0&&(e={}),this.name=h(e,"name","layer"),this.id=h(e,"id",0),this.x=h(e,"x",0),this.y=h(e,"y",0),this.width=h(e,"width",0),this.height=h(e,"height",0),this.tileWidth=h(e,"tileWidth",0),this.tileHeight=h(e,"tileHeight",0),this.baseTileWidth=h(e,"baseTileWidth",this.tileWidth),this.baseTileHeight=h(e,"baseTileHeight",this.tileHeight),this.orientation=h(e,"orientation",c.ORTHOGONAL),this.widthInPixels=h(e,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=h(e,"heightInPixels",this.height*this.baseTileHeight),this.alpha=h(e,"alpha",1),this.visible=h(e,"visible",!0),this.properties=h(e,"properties",[]),this.indexes=h(e,"indexes",[]),this.collideIndexes=h(e,"collideIndexes",[]),this.callbacks=h(e,"callbacks",[]),this.bodies=h(e,"bodies",[]),this.data=h(e,"data",[]),this.tilemapLayer=h(e,"tilemapLayer",null),this.hexSideLength=h(e,"hexSideLength",0),this.staggerAxis=h(e,"staggerAxis","y"),this.staggerIndex=h(e,"staggerIndex","odd")}});p.exports=r},87010:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(91907),h=t(95540),r=new d({initialize:function(e){e===void 0&&(e={}),this.name=h(e,"name","map"),this.width=h(e,"width",0),this.height=h(e,"height",0),this.infinite=h(e,"infinite",!1),this.tileWidth=h(e,"tileWidth",0),this.tileHeight=h(e,"tileHeight",0),this.widthInPixels=h(e,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=h(e,"heightInPixels",this.height*this.tileHeight),this.format=h(e,"format",null),this.orientation=h(e,"orientation",c.ORTHOGONAL),this.renderOrder=h(e,"renderOrder","right-down"),this.version=h(e,"version","1"),this.properties=h(e,"properties",{}),this.layers=h(e,"layers",[]),this.images=h(e,"images",[]),this.objects=h(e,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=h(e,"collision",{}),this.tilesets=h(e,"tilesets",[]),this.imageCollections=h(e,"imageCollections",[]),this.tiles=h(e,"tiles",[]),this.hexSideLength=h(e,"hexSideLength",0),this.staggerAxis=h(e,"staggerAxis","y"),this.staggerIndex=h(e,"staggerIndex","odd")}});p.exports=r},48700:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(95540),h=new d({initialize:function(n){n===void 0&&(n={}),this.name=c(n,"name","object layer"),this.id=c(n,"id",0),this.opacity=c(n,"opacity",1),this.properties=c(n,"properties",{}),this.propertyTypes=c(n,"propertytypes",{}),this.type=c(n,"type","objectgroup"),this.visible=c(n,"visible",!0),this.objects=c(n,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});p.exports=h},6641:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(91907),c=function(h){return h=h.toLowerCase(),h==="isometric"?d.ISOMETRIC:h==="staggered"?d.STAGGERED:h==="hexagonal"?d.HEXAGONAL:d.ORTHOGONAL};p.exports=c},46177:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(80341),c=t(2342),h=t(82593),r=t(46594),n=t(87021),e=function(s,a,i,o,l,f){var u;switch(a){case d.ARRAY_2D:u=c(s,i,o,l,f);break;case d.CSV:u=h(s,i,o,l,f);break;case d.TILED_JSON:u=r(s,i,f);break;case d.WELTMEISTER:u=n(s,i,f);break;default:console.warn("Unrecognized tilemap data format: "+a),u=null}return u};p.exports=e},2342:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(80341),c=t(14977),h=t(87010),r=t(23029),n=function(e,s,a,i,o){for(var l=new c({tileWidth:a,tileHeight:i}),f=new h({name:e,tileWidth:a,tileHeight:i,format:d.ARRAY_2D,layers:[l]}),u=[],v=s.length,m=0,x=0;x{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(80341),c=t(2342),h=function(r,n,e,s,a){var i=n.trim().split(` `).map(function(l){return l.split(",")}),o=c(r,i,e,s,a);return o.format=d.CSV,o};p.exports=h},6656:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(14977),c=t(23029),h=function(r,n){for(var e=[],s=0;s-1?m=new c(i,v,u,f,a.tilesize,a.tilesize):m=n?null:new c(i,-1,u,f,a.tilesize,a.tilesize),o.push(m)}l.push(o),o=[]}i.data=l,e.push(i)}return e};p.exports=h},96483:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(33629),c=function(h){for(var r=[],n=[],e=0;e{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(80341),c=t(87010),h=t(6656),r=t(96483),n=function(e,s,a){if(s.layer.length===0)return console.warn("No layers found in the Weltmeister map: "+e),null;for(var i=0,o=0,l=0;li&&(i=s.layer[l].width),s.layer[l].height>o&&(o=s.layer[l].height);var f=new c({width:i,height:o,name:e,tileWidth:s.layer[0].tilesize,tileHeight:s.layer[0].tilesize,format:d.WELTMEISTER});return f.layers=h(s,a),f.tilesets=r(s),f};p.exports=n},52833:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={ParseTileLayers:t(6656),ParseTilesets:t(96483),ParseWeltmeister:t(87021)}},57442:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={FromOrientationString:t(6641),Parse:t(46177),Parse2DArray:t(2342),ParseCSV:t(82593),Impact:t(52833),Tiled:t(96761)}},51233:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(79291),c=function(h){for(var r,n,e,s,a,i=0;i{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){for(var d=window.atob(t),c=d.length,h=new Array(c/4),r=0;r>>0;return h};p.exports=S},84101:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(33629),c=function(h){var r,n,e=[];for(r=0;r{/** * @author Seth Berrier * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(95540),c=function(h,r,n){if(!r)return{i:0,layers:h.layers,name:"",opacity:1,visible:!0,x:0,y:0};var e=r.x+d(r,"startx",0)*h.tilewidth+d(r,"offsetx",0),s=r.y+d(r,"starty",0)*h.tileheight+d(r,"offsety",0);return{i:0,layers:r.layers,name:n.name+r.name+"/",opacity:n.opacity*r.opacity,visible:n.visible&&r.visible,x:n.x+e,y:n.y+s}};p.exports=c},29920:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=2147483648,t=1073741824,d=536870912,c=function(h){var r=!!(h&S),n=!!(h&t),e=!!(h&d);h=h&536870911;var s=0,a=!1;return r&&n&&e?(s=Math.PI/2,a=!0):r&&n&&!e?(s=Math.PI,a=!1):r&&!n&&e?(s=Math.PI/2,a=!1):r&&!n&&!e?(s=0,a=!0):!r&&n&&e?(s=3*Math.PI/2,a=!1):!r&&n&&!e?(s=Math.PI,a=!0):!r&&!n&&e?(s=3*Math.PI/2,a=!0):!r&&!n&&!e&&(s=0,a=!1),{gid:h,flippedHorizontal:r,flippedVertical:n,flippedAntiDiagonal:e,rotation:s,flipped:a}};p.exports=c},12635:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(95540),c=t(79677),h=function(r){for(var n=[],e=[],s=c(r);s.i0;){if(s.i>=s.layers.length){if(e.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}s=e.pop();continue}var a=s.layers[s.i];if(s.i++,a.type!=="imagelayer"){if(a.type==="group"){var i=c(r,a,s);e.push(s),s=i}continue}var o=d(a,"offsetx",0)+d(a,"startx",0),l=d(a,"offsety",0)+d(a,"starty",0);n.push({name:s.name+a.name,image:a.image,x:s.x+o+a.x,y:s.y+l+a.y,alpha:s.opacity*a.opacity,visible:s.visible&&a.visible,properties:d(a,"properties",{})})}return n};p.exports=h},46594:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(51233),c=t(84101),h=t(91907),r=t(62644),n=t(80341),e=t(6641),s=t(87010),a=t(12635),i=t(22611),o=t(28200),l=t(24619),f=function(u,v,m){var x=r(v),g=new s({width:x.width,height:x.height,name:u,tileWidth:x.tilewidth,tileHeight:x.tileheight,orientation:e(x.orientation),format:n.TILED_JSON,version:x.version,properties:x.properties,renderOrder:x.renderorder,infinite:x.infinite});if(g.orientation===h.HEXAGONAL)if(g.hexSideLength=x.hexsidelength,g.staggerAxis=x.staggeraxis,g.staggerIndex=x.staggerindex,g.staggerAxis==="y"){var y=(g.tileHeight-g.hexSideLength)/2;g.widthInPixels=g.tileWidth*(g.width+.5),g.heightInPixels=g.height*(g.hexSideLength+y)+y}else{var T=(g.tileWidth-g.hexSideLength)/2;g.widthInPixels=g.width*(g.hexSideLength+T)+T,g.heightInPixels=g.tileHeight*(g.height+.5)}g.layers=o(x,m),g.images=a(x);var C=l(x);return g.tilesets=C.tilesets,g.imageCollections=C.imageCollections,g.objects=i(x),g.tiles=c(g),d(g),g};p.exports=f},52205:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(18254),c=t(29920),h=function(e){return{x:e.x,y:e.y}},r=["id","name","type","rotation","properties","visible","x","y","width","height"],n=function(e,s,a){s===void 0&&(s=0),a===void 0&&(a=0);var i=d(e,r);if(i.x+=s,i.y+=a,e.gid){var o=c(e.gid);i.gid=o.gid,i.flippedHorizontal=o.flippedHorizontal,i.flippedVertical=o.flippedVertical,i.flippedAntiDiagonal=o.flippedAntiDiagonal}else e.polyline?i.polyline=e.polyline.map(h):e.polygon?i.polygon=e.polygon.map(h):e.ellipse?i.ellipse=e.ellipse:e.text?i.text=e.text:e.point?i.point=!0:i.rectangle=!0;return i};p.exports=n},22611:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(95540),c=t(52205),h=t(48700),r=t(79677),n=function(e){for(var s=[],a=[],i=r(e);i.i0;){if(i.i>=i.layers.length){if(a.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}i=a.pop();continue}var o=i.layers[i.i];if(i.i++,o.opacity*=i.opacity,o.visible=i.visible&&o.visible,o.type!=="objectgroup"){if(o.type==="group"){var l=r(e,o,i);a.push(i),i=l}continue}o.name=i.name+o.name;for(var f=i.x+d(o,"startx",0)+d(o,"offsetx",0),u=i.y+d(o,"starty",0)+d(o,"offsety",0),v=[],m=0;m{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(41868),c=t(91907),h=t(79677),r=t(6641),n=t(95540),e=t(14977),s=t(29920),a=t(23029),i=function(o,l){for(var f=n(o,"infinite",!1),u=[],v=[],m=h(o);m.i0;){if(m.i>=m.layers.length){if(v.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}m=v.pop();continue}var x=m.layers[m.i];if(m.i++,x.type!=="tilelayer"){if(x.type==="group"){var g=h(o,x,m);v.push(m),m=g}continue}if(x.compression){console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+x.name+"'");continue}else if(x.encoding&&x.encoding==="base64"){if(x.chunks)for(var y=0;y0?(E=new a(T,C.gid,V,W,o.tilewidth,o.tileheight),E.rotation=C.rotation,E.flipX=C.flipped,F[W][V]=E):(M=l?null:new a(T,-1,V,W,o.tilewidth,o.tileheight),F[W][V]=M),L++,L===I.width&&(b++,L=0)}}else{T=new e({name:m.name+x.name,id:x.id,x:m.x+n(x,"offsetx",0)+x.x,y:m.y+n(x,"offsety",0)+x.y,width:x.width,height:x.height,tileWidth:o.tilewidth,tileHeight:o.tileheight,alpha:m.opacity*x.opacity,visible:m.visible&&x.visible,properties:n(x,"properties",[]),orientation:r(o.orientation)}),T.orientation===c.HEXAGONAL&&(T.hexSideLength=o.hexsidelength,T.staggerAxis=o.staggeraxis,T.staggerIndex=o.staggerindex,T.staggerAxis==="y"?(P=(T.tileHeight-T.hexSideLength)/2,T.widthInPixels=T.tileWidth*(T.width+.5),T.heightInPixels=T.height*(T.hexSideLength+P)+P):(A=(T.tileWidth-T.hexSideLength)/2,T.widthInPixels=T.width*(T.hexSideLength+A)+A,T.heightInPixels=T.tileHeight*(T.height+.5)));for(var K=[],Z=0,Q=x.data.length;Z0?(E=new a(T,C.gid,L,F.length,o.tilewidth,o.tileheight),E.rotation=C.rotation,E.flipX=C.flipped,K.push(E)):(M=l?null:new a(T,-1,L,F.length,o.tilewidth,o.tileheight),K.push(M)),L++,L===x.width&&(F.push(K),L=0,K=[])}T.data=F,u.push(T)}return u};p.exports=i},24619:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(33629),c=t(16536),h=t(52205),r=t(57880),n=function(e){for(var s=[],a=[],i=null,o,l=0;l1){var v=void 0,m=void 0;if(Array.isArray(f.tiles)){v=v||{},m=m||{};for(var x=0;x{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){for(var c=0;c0){var n={},e={},s,a,i;if(Array.isArray(h.edgecolors))for(s=0;s{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={AssignTileProperties:t(51233),Base64Decode:t(41868),BuildTilesetIndex:t(84101),CreateGroupLayer:t(79677),ParseGID:t(29920),ParseImageLayers:t(12635),ParseJSONTiled:t(46594),ParseObject:t(52205),ParseObjectLayers:t(22611),ParseTileLayers:t(28200),ParseTilesets:t(24619)}},33385:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(37277),h=t(44594),r=t(94880),n=t(72905),e=new d({initialize:function(a){this.scene=a,this.systems=a.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],a.sys.events.once(h.BOOT,this.boot,this),a.sys.events.on(h.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(h.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var s=this.systems.events;s.on(h.PRE_UPDATE,this.preUpdate,this),s.on(h.UPDATE,this.update,this),s.once(h.SHUTDOWN,this.shutdown,this)},addEvent:function(s){var a;if(s instanceof r){if(a=s,this.removeEvent(a),a.elapsed=a.startAt,a.hasDispatched=!1,a.repeatCount=a.repeat===-1||a.loop?999999999999:a.repeat,a.delay<=0&&a.repeatCount>0)throw new Error("TimerEvent infinite loop created via zero delay")}else a=new r(s);return this._pendingInsertion.push(a),a},delayedCall:function(s,a,i,o){return this.addEvent({delay:s,callback:a,args:i,callbackScope:o})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(s){Array.isArray(s)||(s=[s]);for(var a=0;a-1&&this._active.splice(l,1),o.destroy()}for(i=0;i=o.delay)){var l=o.elapsed-o.delay;if(o.elapsed=o.delay,!o.hasDispatched&&o.callback&&(o.hasDispatched=!0,o.callback.apply(o.callbackScope,o.args)),o.repeatCount>0){if(o.repeatCount--,l>=o.delay)for(;l>=o.delay&&o.repeatCount>0;)o.callback&&o.callback.apply(o.callbackScope,o.args),l-=o.delay,o.repeatCount--;o.elapsed=l,o.hasDispatched=!1}else o.hasDispatched&&this._pendingRemoval.push(o)}}}},shutdown:function(){var s;for(s=0;s{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(50792),h=t(39429),r=t(95540),n=t(44594),e=t(89809),s=new d({Extends:c,initialize:function(i,o){c.call(this),this.scene=i,this.systems=i.sys,this.elapsed=0,this.timeScale=1,this.paused=!0,this.complete=!1,this.totalComplete=0,this.loop=0,this.iteration=0,this.events=[];var l=this.systems.events;l.on(n.PRE_UPDATE,this.preUpdate,this),l.on(n.UPDATE,this.update,this),l.once(n.SHUTDOWN,this.destroy,this),o&&this.add(o)},preUpdate:function(a,i){this.paused||(this.elapsed+=i*this.timeScale)},update:function(){if(!(this.paused||this.complete)){var a,i=this.events,o=!1,l=this.systems,f;for(a=0;a=i.length&&(this.loop!==0&&(this.loop===-1||this.loop>this.iteration)?(this.iteration++,this.reset(!0)):this.complete=!0),this.complete&&this.emit(e.COMPLETE,this)}},play:function(a){return a===void 0&&(a=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,a&&this.reset(),this},pause:function(){this.paused=!0;for(var a=this.events,i=0;i0&&(o=i[i.length-1].time);for(var l=0;l{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(95540),h=new d({initialize:function(n){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(n)},reset:function(r){if(this.delay=c(r,"delay",0),this.repeat=c(r,"repeat",0),this.loop=c(r,"loop",!1),this.callback=c(r,"callback",void 0),this.callbackScope=c(r,"callbackScope",this),this.args=c(r,"args",[]),this.timeScale=c(r,"timeScale",1),this.startAt=c(r,"startAt",0),this.paused=c(r,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=this.repeat===-1||this.loop?999999999999:this.repeat,this.delay<=0&&this.repeatCount>0)throw new Error("TimerEvent infinite loop created via zero delay");return this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var r=this.delay+this.delay*this.repeat,n=this.elapsed+this.delay*(this.repeat-this.repeatCount);return n/r}else return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return this.elapsed*.001},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return this.getRemaining()*.001},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return this.getOverallRemaining()*.001},remove:function(r){r===void 0&&(r=!1),this.elapsed=this.delay,this.hasDispatched=!r,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});p.exports=h},35945:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="complete"},89809:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={COMPLETE:t(35945)}},90291:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={Clock:t(33385),Events:t(89809),Timeline:t(96120),TimerEvent:t(94880)}},40382:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(72905),c=t(83419),h=t(43491),r=t(88032),n=t(37277),e=t(44594),s=t(93109),a=t(86081),i=t(8357),o=t(43960),l=t(26012),f=new c({initialize:function(v){this.scene=v,this.events=v.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(e.BOOT,this.boot,this),this.events.on(e.START,this.start,this)},boot:function(){this.events.once(e.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(e.UPDATE,this.update,this),this.events.once(e.SHUTDOWN,this.shutdown,this)},create:function(u){Array.isArray(u)||(u=[u]);for(var v=[],m=0;m-1},existing:function(u){return this.has(u)||this.tweens.push(u.reset()),this},addCounter:function(u){var v=r(this,u);return this.tweens.push(v.reset()),v},stagger:function(u,v){return s(u,v)},setLagSmooth:function(u,v){return u===void 0&&(u=1/1e-8),v===void 0&&(v=0),this.maxLag=u,this.lagSkip=Math.min(v,this.maxLag),this},setFps:function(u){return u===void 0&&(u=240),this.gap=1e3/u,this.nextTime=this.time*1e3+this.gap,this},getDelta:function(u){var v=Date.now()-this.prevTime;v>this.maxLag&&(this.startTime+=v-this.lagSkip),this.prevTime+=v;var m=this.prevTime-this.startTime,x=m-this.nextTime,g=m-this.time*1e3;return x>0||u?(m/=1e3,this.time=m,this.nextTime+=x+(x>=this.gap?4:this.gap-x)):g=0,g},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(u){u===void 0&&(u=!1);var v=this.getDelta(u);if(!(v<=0)){this.processing=!0;var m,x,g=[],y=this.tweens;for(m=0;m0){for(m=0;m-1&&(x.isPendingRemove()||x.isDestroyed())&&(y.splice(C,1),x.destroy())}g.length=0}this.processing=!1}},remove:function(u){return this.processing?u.setPendingRemoveState():(d(this.tweens,u),u.setRemovedState()),this},reset:function(u){return this.existing(u),u.seek(),u.setActiveState(),this},makeActive:function(u){return this.existing(u),u.setActiveState(),this},each:function(u,v){var m,x=[null];for(m=1;m{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){return t&&t.hasOwnProperty(d)?t[d]:c};p.exports=S},6113:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(62640),c=t(35355),h=function(r,n){var e=d.Power0;if(typeof r=="string")if(d.hasOwnProperty(r))e=d[r];else{var s="";if(r.indexOf(".")){s=r.substring(r.indexOf(".")+1);var a=s.toLowerCase();a==="in"?s="easeIn":a==="out"?s="easeOut":a==="inout"&&(s="easeInOut")}r=c(r.substring(0,r.indexOf(".")+1)+s),d.hasOwnProperty(r)&&(e=d[r])}else typeof r=="function"&&(e=r);if(!n)return e;var i=n.slice(0);return i.unshift(0),function(o){return i[0]=o,e.apply(this,i)}};p.exports=h},91389:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(89318),c=t(77259),h=t(28392),r={bezier:d,catmull:c,catmullrom:c,linear:h},n=function(e){if(e===null)return null;var s=r.linear;return typeof e=="string"?r.hasOwnProperty(e)&&(s=r[e]):typeof e=="function"&&(s=e),s};p.exports=n},55292:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){var h;if(t.hasOwnProperty(d)){var r=typeof t[d];r==="function"?h=function(n,e,s,a,i,o){return t[d](n,e,s,a,i,o)}:h=function(){return t[d]}}else typeof c=="function"?h=c:h=function(){return c};return h};p.exports=S},82985:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(81076),c=function(h){var r,n=[];if(h.hasOwnProperty("props"))for(r in h.props)r.substring(0,1)!=="_"&&n.push({key:r,value:h.props[r]});else for(r in h)d.indexOf(r)===-1&&r.substring(0,1)!=="_"&&n.push({key:r,value:h[r]});return n};p.exports=c},62329:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(35154),c=function(h){var r=d(h,"targets",null);return r===null||(typeof r=="function"&&(r=r.call()),Array.isArray(r)||(r=[r])),r};p.exports=c},17777:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(30976),c=t(99472);function h(a){return!!a.getActive&&typeof a.getActive=="function"}function r(a){return!!a.getStart&&typeof a.getStart=="function"}function n(a){return!!a.getEnd&&typeof a.getEnd=="function"}function e(a){return r(a)||n(a)||h(a)}var s=function(a,i){var o,l=function(U,z,I){return I},f=function(U,z,I){return I},u=null,v=typeof i;if(v==="number")l=function(){return i};else if(Array.isArray(i))f=function(){return i[0]},l=function(){return i[i.length-1]};else if(v==="string"){var m=i.toLowerCase(),x=m.substring(0,6)==="random",g=m.substring(0,3)==="int";if(x||g){var y=m.indexOf("("),T=m.indexOf(")"),C=m.indexOf(",");if(y&&T&&C){var E=parseFloat(m.substring(y+1,C)),M=parseFloat(m.substring(C+1,T));x?l=function(){return c(E,M)}:l=function(){return d(E,M)}}else throw new Error("invalid random() format")}else{m=m[0];var P=parseFloat(i.substr(2));switch(m){case"+":l=function(U,z,I){return I+P};break;case"-":l=function(U,z,I){return I-P};break;case"*":l=function(U,z,I){return I*P};break;case"/":l=function(U,z,I){return I/P};break;default:l=function(){return parseFloat(i)}}}}else if(v==="function")l=i;else if(v==="object")if(e(i))h(i)&&(u=i.getActive),n(i)&&(l=i.getEnd),r(i)&&(f=i.getStart);else if(i.hasOwnProperty("value"))o=s(a,i.value);else{var A=i.hasOwnProperty("to"),F=i.hasOwnProperty("from"),L=i.hasOwnProperty("start");if(A&&(F||L)){if(o=s(a,i.to),L){var B=s(a,i.start);o.getActive=B.getEnd}if(F){var N=s(a,i.from);o.getStart=N.getEnd}}}return o||(o={getActive:u,getEnd:l,getStart:f}),o};p.exports=s},88032:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(70402),c=t(69902),h=t(23568),r=t(57355),n=t(6113),e=t(95540),s=t(55292),a=t(35154),i=t(17777),o=t(269),l=t(86081),f=function(u,v,m){if(v instanceof l)return v.parent=u,v;m===void 0?m=c:m=o(c,m);var x=e(v,"from",0),g=e(v,"to",1),y=[{value:x}],T=e(v,"delay",m.delay),C=e(v,"easeParams",m.easeParams),E=e(v,"ease",m.ease),M=i("value",g),P=new l(u,y),A=P.add(0,"value",M.getEnd,M.getStart,M.getActive,n(e(v,"ease",E),e(v,"easeParams",C)),s(v,"delay",T),e(v,"duration",m.duration),r(v,"yoyo",m.yoyo),e(v,"hold",m.hold),e(v,"repeat",m.repeat),e(v,"repeatDelay",m.repeatDelay),!1,!1);A.start=x,A.current=x,P.completeDelay=h(v,"completeDelay",0),P.loop=Math.round(h(v,"loop",0)),P.loopDelay=Math.round(h(v,"loopDelay",0)),P.paused=r(v,"paused",!1),P.persist=r(v,"persist",!1),P.isNumberTween=!0,P.callbackScope=a(v,"callbackScope",P);for(var F=d.TYPES,L=0;L{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(6113),c=t(35154),h=t(36383),r=function(n,e){e===void 0&&(e={});var s,a=c(e,"start",0),i=c(e,"ease",null),o=c(e,"grid",null),l=c(e,"from",0),f=l==="first",u=l==="center",v=l==="last",m=typeof l=="number",x=Array.isArray(n),g=parseFloat(x?n[0]:n),y=x?parseFloat(n[1]):0,T=Math.max(g,y);if(x&&(a+=g),o){var C=o[0],E=o[1],M=0,P=0,A=0,F=0,L=[];v?(M=C-1,P=E-1):m?(M=l%C,P=Math.floor(l/C)):u&&(M=(C-1)/2,P=(E-1)/2);for(var B=h.MIN_SAFE_INTEGER,N=0;NB&&(B=z),L[N][U]=z}}}var I=i?d(i):null;return o?s=function(G,O,b,D){var X=0,V=D%C,W=Math.floor(D/C);V>=0&&V=0&&W{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(70402),c=t(69902),h=t(23568),r=t(57355),n=t(6113),e=t(95540),s=t(91389),a=t(55292),i=t(82985),o=t(62329),l=t(35154),f=t(17777),u=t(269),v=t(86081),m=function(x,g,y){if(g instanceof v)return g.parent=x,g;y===void 0?y=c:y=u(c,y);var T=o(g);!T&&y.targets&&(T=y.targets);for(var C=i(g),E=e(g,"delay",y.delay),M=e(g,"duration",y.duration),P=e(g,"easeParams",y.easeParams),A=e(g,"ease",y.ease),F=e(g,"hold",y.hold),L=e(g,"repeat",y.repeat),B=e(g,"repeatDelay",y.repeatDelay),N=r(g,"yoyo",y.yoyo),U=r(g,"flipX",y.flipX),z=r(g,"flipY",y.flipY),I=e(g,"interpolation",y.interpolation),G=function($,_,et,q){if(et==="texture"){var rt=q,ot=void 0;Array.isArray(q)?(rt=q[0],ot=q[1]):q.hasOwnProperty("value")?(rt=q.value,Array.isArray(q.value)?(rt=q.value[0],ot=q.value[1]):typeof q.value=="string"&&(rt=q.value)):typeof q=="string"&&(rt=q),$.addFrame(_,rt,ot,a(q,"delay",E),e(q,"duration",M),e(q,"hold",F),e(q,"repeat",L),e(q,"repeatDelay",B),r(q,"flipX",U),r(q,"flipY",z))}else{var ht=f(et,q),tt=s(e(q,"interpolation",I));$.add(_,et,ht.getEnd,ht.getStart,ht.getActive,n(e(q,"ease",A),e(q,"easeParams",P)),a(q,"delay",E),e(q,"duration",M),r(q,"yoyo",N),e(q,"hold",F),e(q,"repeat",L),e(q,"repeatDelay",B),r(q,"flipX",U),r(q,"flipY",z),tt,tt?q:null)}},O=new v(x,T),b=0;b{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(70402),c=t(23568),h=t(57355),r=t(62329),n=t(35154),e=t(8357),s=t(43960),a=function(i,o){if(o instanceof s)return o.parent=i,o;var l=new s(i);l.startDelay=n(o,"delay",0),l.completeDelay=c(o,"completeDelay",0),l.loop=Math.round(c(o,"loop",n(o,"repeat",0))),l.loopDelay=Math.round(c(o,"loopDelay",n(o,"repeatDelay",0))),l.paused=h(o,"paused",!1),l.persist=h(o,"persist",!1),l.callbackScope=n(o,"callbackScope",l);var f,u=d.TYPES;for(f=0;f{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={GetBoolean:t(57355),GetEaseFunction:t(6113),GetInterpolationFunction:t(91389),GetNewValue:t(55292),GetProps:t(82985),GetTargets:t(62329),GetValueOp:t(17777),NumberTweenBuilder:t(88032),StaggerBuilder:t(93109),TweenBuilder:t(8357)}},73685:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="active"},98540:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="complete"},67233:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="loop"},2859:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="pause"},98336:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="repeat"},25764:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="resume"},32193:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="start"},84371:p=>{/** * @author samme * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="stop"},70766:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="update"},55659:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports="yoyo"},842:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={TWEEN_ACTIVE:t(73685),TWEEN_COMPLETE:t(98540),TWEEN_LOOP:t(67233),TWEEN_PAUSE:t(2859),TWEEN_RESUME:t(25764),TWEEN_REPEAT:t(98336),TWEEN_START:t(32193),TWEEN_STOP:t(84371),TWEEN_UPDATE:t(70766),TWEEN_YOYO:t(55659)}},43066:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d={States:t(86353),Builders:t(30231),Events:t(842),TweenManager:t(40382),Tween:t(86081),TweenData:t(48177),TweenFrameData:t(42220),BaseTween:t(70402),TweenChain:t(43960)};p.exports=d},70402:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(50792),h=t(842),r=t(86353),n=new d({Extends:c,initialize:function(s){c.call(this),this.parent=s,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=r.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(e){return this.timeScale=e,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(h.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(h.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(h.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(h.TWEEN_COMPLETE,"onComplete")},complete:function(e){return e===void 0&&(e=0),e?(this.setCompleteDelayState(),this.countdown=e):this.onCompleteHandler(),this},completeAfterLoop:function(e){return e===void 0&&(e=0),this.loopCounter>e&&(this.loopCounter=e),this},remove:function(){return this.parent&&this.parent.remove(this),this},stop:function(){return this.parent&&!this.isRemoved()&&!this.isPendingRemove()&&!this.isDestroyed()&&(this.dispatchEvent(h.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(e){this.countdown-=e,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(h.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(e){return this.countdown-=e,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(h.TWEEN_START,"onStart"),e=0),e},updateCompleteDelay:function(e){this.countdown-=e,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(e,s,a){return a===void 0&&(a=[]),this.callbacks.hasOwnProperty(e)&&(this.callbacks[e]={func:s,params:a}),this},setPendingState:function(){this.state=r.PENDING},setActiveState:function(){this.state=r.ACTIVE,this.hasStarted=!1},setLoopDelayState:function(){this.state=r.LOOP_DELAY},setCompleteDelayState:function(){this.state=r.COMPLETE_DELAY},setStartDelayState:function(){this.state=r.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=r.PENDING_REMOVE},setRemovedState:function(){this.state=r.REMOVED},setFinishedState:function(){this.state=r.FINISHED},setDestroyedState:function(){this.state=r.DESTROYED},isPending:function(){return this.state===r.PENDING},isActive:function(){return this.state===r.ACTIVE},isLoopDelayed:function(){return this.state===r.LOOP_DELAY},isCompleteDelayed:function(){return this.state===r.COMPLETE_DELAY},isStartDelayed:function(){return this.state===r.START_DELAY},isPendingRemove:function(){return this.state===r.PENDING_REMOVE},isRemoved:function(){return this.state===r.REMOVED},isFinished:function(){return this.state===r.FINISHED},isDestroyed:function(){return this.state===r.DESTROYED},destroy:function(){this.data&&this.data.forEach(function(e){e.destroy()}),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});n.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],p.exports=n},95042:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(83419),c=t(842),h=t(86353),r=new d({initialize:function(e,s,a,i,o,l,f,u,v,m){this.tween=e,this.targetIndex=s,this.duration=i<=0?.01:i,this.totalDuration=0,this.delay=0,this.getDelay=a,this.yoyo=o,this.hold=l,this.repeat=f,this.repeatDelay=u,this.repeatCounter=0,this.flipX=v,this.flipY=m,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(n){n===void 0&&(n=this.current),this.tween.targets[this.targetIndex][this.key]=n},setCreatedState:function(){this.state=h.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=h.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=h.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=h.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=h.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=h.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=h.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=h.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===h.CREATED},isDelayed:function(){return this.state===h.DELAY},isPendingRender:function(){return this.state===h.PENDING_RENDER},isPlayingForward:function(){return this.state===h.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===h.PLAYING_BACKWARD},isHolding:function(){return this.state===h.HOLD_DELAY},isRepeating:function(){return this.state===h.REPEAT_DELAY},isComplete:function(){return this.state===h.COMPLETE},setStateFromEnd:function(n){this.yoyo?this.onRepeat(n,!0,!0):this.repeatCounter>0?this.onRepeat(n,!0,!1):this.setCompleteState()},setStateFromStart:function(n){this.repeatCounter>0?this.onRepeat(n,!1):this.setCompleteState()},reset:function(){var n=this.tween,e=n.totalTargets,s=this.targetIndex,a=n.targets[s],i=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(a,i,0,s,e,n),this.repeatCounter=this.repeat===-1?h.MAX:this.repeat,this.setPendingRenderState();var o=this.duration+this.hold;this.yoyo&&(o+=this.duration);var l=o+this.repeatDelay;this.totalDuration=this.delay+o,this.repeat===-1?(this.totalDuration+=l*h.MAX,n.isInfinite=!0):this.repeat>0&&(this.totalDuration+=l*this.repeat),this.totalDuration>n.duration&&(n.duration=this.totalDuration),this.delay0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(n,e,s){var a=this.tween,i=a.totalTargets,o=this.targetIndex,l=a.targets[o],f=this.key,u=f!=="texture";if(this.elapsed=n,this.progress=n/this.duration,this.flipX&&l.toggleFlipX(),this.flipY&&l.toggleFlipY(),u&&(e||s)&&(this.start=this.getStartValue(l,f,this.start,o,i,a)),s){this.setPlayingBackwardState(),this.dispatchEvent(c.TWEEN_YOYO,"onYoyo");return}this.repeatCounter--,u&&(this.end=this.getEndValue(l,f,this.start,o,i,a)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-n,u&&(this.current=this.start,l[f]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(c.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});p.exports=r},69902:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={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};p.exports=S},81076:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.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:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(70402),c=t(83419),h=t(842),r=t(44603),n=t(39429),e=t(36383),s=t(86353),a=t(48177),i=t(42220),o=new c({Extends:d,initialize:function(f,u){d.call(this,f),this.targets=u,this.totalTargets=u.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,this.isNumberTween=!1},add:function(l,f,u,v,m,x,g,y,T,C,E,M,P,A,F,L){var B=new a(this,l,f,u,v,m,x,g,y,T,C,E,M,P,A,F,L);return this.totalData=this.data.push(B),B},addFrame:function(l,f,u,v,m,x,g,y,T,C){var E=new i(this,l,f,u,v,m,x,g,y,T,C);return this.totalData=this.data.push(E),E},getValue:function(l){l===void 0&&(l=0);var f=null;return this.data&&(f=this.data[l].current),f},hasTarget:function(l){return this.targets&&this.targets.indexOf(l)!==-1},updateTo:function(l,f,u){if(u===void 0&&(u=!1),l!=="texture")for(var v=0;v0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(h.TWEEN_LOOP,"onLoop"));else if(this.completeDelay>0)this.countdown=this.completeDelay,this.setCompleteDelayState();else return this.onCompleteHandler(),!0;return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,d.prototype.onCompleteHandler.call(this)},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed Tween",this),this):((this.isPendingRemove()||this.isFinished())&&this.seek(),this.paused=!1,this.setActiveState(),this)},seek:function(l,f,u){if(l===void 0&&(l=0),f===void 0&&(f=16.6),u===void 0&&(u=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;u||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(h.TWEEN_ACTIVE,"onActive");var v=this.paused;if(this.paused=!1,l>0){for(var m=Math.floor(l/f),x=l-m*f,g=0;g0&&this.update(x)}return this.paused=v,this.isSeeking=!1,this},initTweenData:function(l){l===void 0&&(l=!1),this.duration=0,this.startDelay=e.MAX_SAFE_INTEGER;for(var f=this.data,u=0;u0?this.totalDuration=v+m+(v+g)*x:this.totalDuration=v+m},reset:function(l){return l===void 0&&(l=!1),this.elapsed=0,this.totalElapsed=0,this.progress=0,this.totalProgress=0,this.loopCounter=this.loop,this.loop===-1&&(this.isInfinite=!0,this.loopCounter=s.MAX),l||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(h.TWEEN_ACTIVE,"onActive")),this},update:function(l){if(this.isPendingRemove()||this.isDestroyed())return this.persist?(this.setFinishedState(),!1):!0;if(this.paused||this.isFinished())return!1;if(l*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(l),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(l),!1;this.hasStarted||(this.startDelay-=l,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(h.TWEEN_START,"onStart"),l=0));var f=!1;if(this.isActive())for(var u=this.data,v=0;v{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(72905),c=t(70402),h=t(83419),r=t(842),n=t(44603),e=t(39429),s=t(86353),a=new h({Extends:c,initialize:function(o){c.call(this,o),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=this.loop===-1?s.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this},add:function(i){var o=this.parent.create(i);Array.isArray(o)||(o=[o]);for(var l=this.data,f=0;f0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(r.TWEEN_LOOP,"onLoop"));else if(this.completeDelay>0)this.countdown=this.completeDelay,this.setCompleteDelayState();else return this.onCompleteHandler(),!0;return!1},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed TweenChain",this),this):((this.isPendingRemove()||this.isPending())&&this.resetTweens(),this.paused=!1,this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this)},resetTweens:function(){for(var i=this.data,o=this.totalData,l=0;l{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(95042),c=t(45319),h=t(83419),r=t(842),n=new h({Extends:d,initialize:function(s,a,i,o,l,f,u,v,m,x,g,y,T,C,E,M,P){d.call(this,s,a,v,m,x,g,y,T,C,E),this.key=i,this.getActiveValue=f,this.getEndValue=o,this.getStartValue=l,this.ease=u,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=M,this.interpolationData=P},reset:function(e){d.prototype.reset.call(this);var s=this.tween.targets[this.targetIndex],a=this.key;e&&(s[a]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(s[a]=this.getActiveValue(s,a,0))},update:function(e){var s=this.tween,a=s.totalTargets,i=this.targetIndex,o=s.targets[i],l=this.key;if(!o)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=e,this.elapsed<=0&&(this.elapsed=0,e=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(r.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(o,l,o[l],i,a,s),this.end=this.getEndValue(o,l,this.start,i,a,s),this.current=this.start,o[l]=this.start,this.setPlayingForwardState(),!0;var f=this.isPlayingForward(),u=this.isPlayingBackward();if(f||u){var v=this.elapsed,m=this.duration,x=0,g=!1;v+=e,v>=m?(x=v-m,v=m,g=!0):v<0&&(v=0);var y=c(v/m,0,1);this.elapsed=v,this.progress=y,this.previous=this.current,f||(y=1-y);var T=this.ease(y);this.interpolation?this.current=this.interpolation(this.interpolationData,T):this.current=this.start+(this.end-this.start)*T,o[l]=this.current,g&&(f?(s.isNumberTween&&(this.current=this.end,o[l]=this.current),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(x)):(s.isNumberTween&&(this.current=this.start,o[l]=this.current),this.setStateFromStart(x))),this.dispatchEvent(r.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,s){var a=this.tween;if(!a.isSeeking){var i=a.targets[this.targetIndex],o=this.key,l=this.current,f=this.previous;a.emit(e,a,o,i,l,f);var u=a.callbacks[s];u&&u.func.apply(a.callbackScope,[a,i,o,l,f].concat(u.params))}},destroy:function(){d.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});p.exports=n},42220:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(95042),c=t(45319),h=t(83419),r=t(842),n=new h({Extends:d,initialize:function(s,a,i,o,l,f,u,v,m,x,g){d.call(this,s,a,l,f,!1,u,v,m,x,g),this.key="texture",this.startTexture=null,this.endTexture=i,this.startFrame=null,this.endFrame=o,this.yoyo=v!==0},reset:function(e){d.prototype.reset.call(this);var s=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=s.texture.key,this.startFrame=s.frame.name),e&&s.setTexture(this.startTexture,this.startFrame)},update:function(e){var s=this.tween,a=this.targetIndex,i=s.targets[a];if(!i)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=e,this.elapsed<=0&&(this.elapsed=0,e=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(r.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&i.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var o=this.isPlayingForward(),l=this.isPlayingBackward();if(o||l){var f=this.elapsed,u=this.duration,v=0,m=!1;f+=e,f>=u?(v=f-u,f=u,m=!0):f<0&&(f=0);var x=c(f/u,0,1);this.elapsed=f,this.progress=x,m&&(o?(i.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(v)):(i.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(v))),this.dispatchEvent(r.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(e,s){var a=this.tween;if(!a.isSeeking){var i=a.targets[this.targetIndex],o=this.key;a.emit(e,a,o,i);var l=a.callbacks[s];l&&l.func.apply(a.callbackScope,[a,i,o].concat(l.params))}},destroy:function(){d.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});p.exports=n},86353:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S={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};p.exports=S},83419:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */function S(n){return!!n.get&&typeof n.get=="function"||!!n.set&&typeof n.set=="function"}function t(n,e,s){var a=s?n[e]:Object.getOwnPropertyDescriptor(n,e);return!s&&a.value&&typeof a.value=="object"&&(a=a.value),a&&S(a)?(typeof a.enumerable>"u"&&(a.enumerable=!0),typeof a.configurable>"u"&&(a.configurable=!0),a):!1}function d(n,e){var s=Object.getOwnPropertyDescriptor(n,e);return s?(s.value&&typeof s.value=="object"&&(s=s.value),s.configurable===!1):!1}function c(n,e,s,a){for(var i in e)if(e.hasOwnProperty(i)){var o=t(e,i,s);if(o!==!1){var l=a||n;if(d(l.prototype,i)){if(r.ignoreFinals)continue;throw new Error("cannot override final property '"+i+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(n.prototype,i,o)}else n.prototype[i]=e[i]}}function h(n,e){if(e){Array.isArray(e)||(e=[e]);for(var s=0;s{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(){};p.exports=S},20242:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(){return null};p.exports=S},71146:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h,r){if(r===void 0&&(r=t),c>0){var n=c-t.length;if(n<=0)return null}if(!Array.isArray(d))return t.indexOf(d)===-1?(t.push(d),h&&h.call(r,d),d):null;for(var e=d.length-1;e>=0;)t.indexOf(d[e])!==-1&&d.splice(e,1),e--;if(e=d.length,e===0)return null;c>0&&e>n&&(d.splice(n),e=n);for(var s=0;s{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h,r,n){if(c===void 0&&(c=0),n===void 0&&(n=t),h>0){var e=h-t.length;if(e<=0)return null}if(!Array.isArray(d))return t.indexOf(d)===-1?(t.splice(c,0,d),r&&r.call(n,d),d):null;for(var s=d.length-1;s>=0;)t.indexOf(d[s])!==-1&&d.pop(),s--;if(s=d.length,s===0)return null;h>0&&s>e&&(d.splice(e),s=e);for(var a=s-1;a>=0;a--){var i=d[a];t.splice(c,0,i),r&&r.call(n,i)}return d};p.exports=S},66905:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){var c=t.indexOf(d);return c!==-1&&c{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(82011),c=function(h,r,n,e,s){e===void 0&&(e=0),s===void 0&&(s=h.length);var a=0;if(d(h,e,s))for(var i=e;i{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){var h,r=[null];for(h=3;h{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(82011),c=function(h,r,n,e,s){if(e===void 0&&(e=0),s===void 0&&(s=h.length),d(h,e,s)){var a,i=[null];for(a=5;a{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){if(d.length){if(d.length===1)return d[0]}else return NaN;var h=1,r,n;if(c){if(td.length&&(h=d.length),c?(r=d[h-1][c],n=d[h][c],n-t<=t-r?d[h]:d[h-1]):(r=d[h-1],n=d[h],n-t<=t-r?n:r)};p.exports=S},43491:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){d===void 0&&(d=[]);for(var c=0;c{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(82011),c=function(h,r,n,e,s){e===void 0&&(e=0),s===void 0&&(s=h.length);var a=[];if(d(h,e,s))for(var i=e;i{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(82011),c=function(h,r,n,e,s){if(e===void 0&&(e=0),s===void 0&&(s=h.length),e!==-1){if(d(h,e,s))for(var a=e;a=0;a--){var i=h[a];if(!r||r&&n===void 0&&i.hasOwnProperty(r)||r&&n!==void 0&&i[r]===n)return i}return null};p.exports=c},26546:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){d===void 0&&(d=0),c===void 0&&(c=t.length);var h=d+Math.floor(Math.random()*c);return t[h]===void 0?null:t[h]};p.exports=S},85835:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){if(d===c)return t;var h=t.indexOf(d),r=t.indexOf(c);if(h<0||r<0)throw new Error("Supplied items must be elements of the same array");return h>r||(t.splice(h,1),r=t.indexOf(c),t.splice(r+1,0,d)),t};p.exports=S},83371:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){if(d===c)return t;var h=t.indexOf(d),r=t.indexOf(c);if(h<0||r<0)throw new Error("Supplied items must be elements of the same array");return h{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){var c=t.indexOf(d);if(c>0){var h=t[c-1],r=t.indexOf(h);t[c]=h,t[r]=d}return t};p.exports=S},69693:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){var h=t.indexOf(d);if(h===-1||c<0||c>=t.length)throw new Error("Supplied index out of bounds");return h!==c&&(t.splice(h,1),t.splice(c,0,d)),d};p.exports=S},40853:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){var c=t.indexOf(d);if(c!==-1&&c{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h){var r=[],n,e=!1;if((c||h)&&(e=!0,c||(c=""),h||(h="")),d=d;n--)e?r.push(c+n.toString()+h):r.push(n);else for(n=t;n<=d;n++)e?r.push(c+n.toString()+h):r.push(n);return r};p.exports=S},593:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(2284),c=function(h,r,n){h===void 0&&(h=0),r===void 0&&(r=null),n===void 0&&(n=1),r===null&&(r=h,h=0);for(var e=[],s=Math.max(d((r-h)/(n||1)),0),a=0;a{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */function S(c,h,r){var n=c[h];c[h]=c[r],c[r]=n}function t(c,h){return ch?1:0}var d=function(c,h,r,n,e){for(r===void 0&&(r=0),n===void 0&&(n=c.length-1),e===void 0&&(e=t);n>r;){if(n-r>600){var s=n-r+1,a=h-r+1,i=Math.log(s),o=.5*Math.exp(2*i/3),l=.5*Math.sqrt(i*o*(s-o)/s)*(a-s/2<0?-1:1),f=Math.max(r,Math.floor(h-a*o/s+l)),u=Math.min(n,Math.floor(h+(s-a)*o/s+l));d(c,h,f,u,e)}var v=c[h],m=r,x=n;for(S(c,r,h),e(c[n],v)>0&&S(c,r,n);m0;)x--}e(c[r],v)===0?S(c,r,x):(x++,S(c,x,n)),x<=h&&(r=x+1),h<=x&&(n=x-1)}};p.exports=d},88492:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(35154),c=t(33680),h=function(n,e,s){for(var a=[],i=0;i{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(19133),c=function(h,r,n,e){e===void 0&&(e=h);var s;if(!Array.isArray(r))return s=h.indexOf(r),s!==-1?(d(h,s),n&&n.call(e,r),r):null;for(var a=r.length-1,i=[];a>=0;){var o=r[a];s=h.indexOf(o),s!==-1&&(d(h,s),i.push(o),n&&n.call(e,o)),a--}return i};p.exports=c},60248:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(19133),c=function(h,r,n,e){if(e===void 0&&(e=h),r<0||r>h.length-1)throw new Error("Index out of bounds");var s=d(h,r);return n&&n.call(e,s),s};p.exports=c},81409:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(82011),c=function(h,r,n,e,s){if(r===void 0&&(r=0),n===void 0&&(n=h.length),s===void 0&&(s=h),d(h,r,n)){var a=n-r,i=h.splice(r,a);if(e)for(var o=0;o{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(19133),c=function(h,r,n){r===void 0&&(r=0),n===void 0&&(n=h.length);var e=r+Math.floor(Math.random()*n);return d(h,e)};p.exports=c},42169:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){var h=t.indexOf(d),r=t.indexOf(c);return h!==-1&&r===-1?(t[h]=c,!0):!1};p.exports=S},86003:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){d===void 0&&(d=1);for(var c=null,h=0;h{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){d===void 0&&(d=1);for(var c=null,h=0;h{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h){var r=t.length;if(d<0||d>=r||d>=c||c>r){if(h)throw new Error("Range Error: Values outside acceptable range");return!1}else return!0};p.exports=S},89545:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){var c=t.indexOf(d);return c!==-1&&c>0&&(t.splice(c,1),t.unshift(d)),d};p.exports=S},17810:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(82011),c=function(h,r,n,e,s){if(e===void 0&&(e=0),s===void 0&&(s=h.length),d(h,e,s))for(var a=e;a{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){for(var d=t.length-1;d>0;d--){var c=Math.floor(Math.random()*(d+1)),h=t[d];t[d]=t[c],t[c]=h}return t};p.exports=S},90126:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){var d=/\D/g;return t.sort(function(c,h){return parseInt(c.replace(d,""),10)-parseInt(h.replace(d,""),10)}),t};p.exports=S},19133:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){if(!(d>=t.length)){for(var c=t.length-1,h=t[d],r=d;r{/** * @author Richard Davey * @author Angry Bytes (and contributors) * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(82264);function c(e,s){return String(e).localeCompare(s)}function h(e,s){var a=e.length;if(a<=1)return e;for(var i=new Array(a),o=1;oo&&(v=o),m>o&&(m=o),x=u,g=v;;)if(x{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){if(d===c)return t;var h=t.indexOf(d),r=t.indexOf(c);if(h<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[h]=c,t[r]=d,t};p.exports=S},37105:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={Matrix:t(54915),Add:t(71146),AddAt:t(51067),BringToTop:t(66905),CountAllMatching:t(21612),Each:t(95428),EachInRange:t(36914),FindClosestInSorted:t(81957),Flatten:t(43491),GetAll:t(46710),GetFirst:t(58731),GetRandom:t(26546),MoveDown:t(70864),MoveTo:t(69693),MoveUp:t(40853),MoveAbove:t(85835),MoveBelow:t(83371),NumberArray:t(20283),NumberArrayStep:t(593),QuickSelect:t(43886),Range:t(88492),Remove:t(72905),RemoveAt:t(60248),RemoveBetween:t(81409),RemoveRandomElement:t(31856),Replace:t(42169),RotateLeft:t(86003),RotateRight:t(49498),SafeRange:t(82011),SendToBack:t(89545),SetAll:t(17810),Shuffle:t(33680),SortByDigits:t(90126),SpliceOne:t(19133),StableSort:t(19186),Swap:t(25630)}},86922:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var d=t[0].length,c=1;c{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(41836),c=t(86922),h=function(r){var n="";if(!c(r))return n;for(var e=0;e{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return t.reverse()};p.exports=S},21224:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){for(var d=0;d{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(37829),c=function(h){return d(h,180)};p.exports=c},44657:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(37829),c=function(h,r){r===void 0&&(r=1);for(var n=0;n{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(86922),c=t(2429),h=function(r,n){if(n===void 0&&(n=90),!d(r))return null;if(typeof n!="string"&&(n=(n%360+360)%360),n===90||n===-270||n==="rotateLeft")r=c(r),r.reverse();else if(n===-90||n===270||n==="rotateRight")r.reverse(),r=c(r);else if(Math.abs(n)===180||n==="rotate180"){for(var e=0;e{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(37829),c=function(h,r){r===void 0&&(r=1);for(var n=0;n{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(86003),c=t(49498),h=function(r,n,e){if(n===void 0&&(n=0),e===void 0&&(e=0),e!==0&&(e<0?d(r,Math.abs(e)):c(r,e)),n!==0)for(var s=0;s{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){for(var d=t.length,c=t[0].length,h=new Array(c),r=0;r-1;n--)h[r][n]=t[n][r]}return h};p.exports=S},54915:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={CheckMatrix:t(86922),MatrixToString:t(63362),ReverseColumns:t(92598),ReverseRows:t(21224),Rotate180:t(98717),RotateLeft:t(44657),RotateMatrix:t(37829),RotateRight:t(92632),Translate:t(69512),TransposeMatrix:t(2429)}},71334:p=>{/** * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=function(d,c){for(var h=new Uint8Array(d),r=h.length,n=c?"data:"+c+";base64,":"",e=0;e>2],n+=S[(h[e]&3)<<4|h[e+1]>>4],n+=S[(h[e+1]&15)<<2|h[e+2]>>6],n+=S[h[e+2]&63];return r%3===2?n=n.substring(0,n.length-1)+"=":r%3===1&&(n=n.substring(0,n.length-2)+"=="),n};p.exports=t},53134:p=>{/** * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */for(var S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256),d=0;d>4,f[e++]=(a&15)<<4|i>>2,f[e++]=(i&3)<<6|o&63;return l};p.exports=c},65839:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={ArrayBufferToBase64:t(71334),Base64ToArrayBuffer:t(53134)}},91799:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={Array:t(37105),Base64:t(65839),Objects:t(1183),String:t(31749),NOOP:t(29747),NULL:t(20242)}},41786:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){var d={};for(var c in t)Array.isArray(t[c])?d[c]=t[c].slice(0):d[c]=t[c];return d};p.exports=S},62644:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){var d,c,h;if(typeof t!="object"||t===null)return t;d=Array.isArray(t)?[]:{};for(h in t)c=t[h],d[h]=S(c);return d};p.exports=S},79291:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(41212),c=function(){var h,r,n,e,s,a,i=arguments[0]||{},o=1,l=arguments.length,f=!1;for(typeof i=="boolean"&&(f=i,i=arguments[1]||{},o=2),l===o&&(i=this,--o);o{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(75508),c=t(35154),h=function(r,n,e){var s=c(r,n,null);if(s===null)return e;if(Array.isArray(s))return d.RND.pick(s);if(typeof s=="object"){if(s.hasOwnProperty("randInt"))return d.RND.integerInRange(s.randInt[0],s.randInt[1]);if(s.hasOwnProperty("randFloat"))return d.RND.realInRange(s.randFloat[0],s.randFloat[1])}else if(typeof s=="function")return s(n);return s};p.exports=h},95540:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){var h=typeof t;return!t||h==="number"||h==="string"?c:t.hasOwnProperty(d)&&t[d]!==void 0?t[d]:c};p.exports=S},82840:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(35154),c=t(45319),h=function(r,n,e,s,a){a===void 0&&(a=e);var i=d(r,n,a);return c(i,e,s)};p.exports=h},35154:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h){if(!t&&!h||typeof t=="number")return c;if(t&&t.hasOwnProperty(d))return t[d];if(h&&h.hasOwnProperty(d))return h[d];if(d.indexOf(".")!==-1){for(var r=d.split("."),n=t,e=h,s=c,a=c,i=!0,o=!0,l=0;l{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){for(var c=0;c{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){for(var c=0;c{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){return t.hasOwnProperty(d)};p.exports=S},41212:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){if(!t||typeof t!="object"||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch{return!1}return!0};p.exports=S},46975:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(41786),c=function(h,r){var n=d(h);for(var e in r)n.hasOwnProperty(e)||(n[e]=r[e]);return n};p.exports=c},269:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(41786),c=function(h,r){var n=d(h);for(var e in r)n.hasOwnProperty(e)&&(n[e]=r[e]);return n};p.exports=c},18254:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var d=t(97022),c=function(h,r){for(var n={},e=0;e{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c){if(!t||typeof t=="number")return!1;if(t.hasOwnProperty(d))return t[d]=c,!0;if(d.indexOf(".")!==-1){for(var h=d.split("."),r=t,n=t,e=0;e{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={Clone:t(41786),DeepCopy:t(62644),Extend:t(79291),GetAdvancedValue:t(23568),GetFastValue:t(95540),GetMinMaxValue:t(82840),GetValue:t(35154),HasAll:t(69036),HasAny:t(1985),HasValue:t(97022),IsPlainObject:t(41212),Merge:t(46975),MergeRight:t(269),Pick:t(18254),SetValue:t(61622)}},27902:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){return t.replace(/%([0-9]+)/g,function(c,h){return d[Number(h)-1]})};p.exports=S},41836:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d,c,h){d===void 0&&(d=0),c===void 0&&(c=" "),h===void 0&&(h=3),t=t.toString();var r=0;if(d+1>=t.length)switch(h){case 1:t=new Array(d+1-t.length).join(c)+t;break;case 3:var n=Math.ceil((r=d-t.length)/2),e=r-n;t=new Array(e+1).join(c)+t+new Array(n+1).join(c);break;default:t=t+new Array(d+1-t.length).join(c);break}return t};p.exports=S},33628:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t,d){return d===0?t.slice(1):t.slice(0,d)+t.slice(d+1)};p.exports=S},27671:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return t.split("").reverse().join("")};p.exports=S},45650:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var d=Math.random()*16|0,c=t==="x"?d:d&3|8;return c.toString(16)})};p.exports=S},35355:p=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */var S=function(t){return t&&t[0].toUpperCase()+t.slice(1)};p.exports=S},31749:(p,S,t)=>{/** * @author Richard Davey * @copyright 2013-2025 Phaser Studio Inc. * @license {@link https://opensource.org/licenses/MIT|MIT License} */p.exports={Format:t(27902),Pad:t(41836),RemoveAt:t(33628),Reverse:t(27671),UppercaseFirst:t(35355),UUID:t(45650)}}},H={};function J(p){var S=H[p];if(S!==void 0)return S.exports;var t=H[p]={exports:{}};return Y[p](t,t.exports,J),t.exports}J.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}();var k=J(85454);return k})())})(ce);var ye=ce.exports;const it=xe(ye),Ft="#2b2620",ee="#f3edda",Qt="#7fd4ff";function fe(R,w,Y,H,J,k){const S=document.createElement("canvas");S.width=Math.round(Y*4*J),S.height=Math.round(H*4*J);const t=S.getContext("2d");t.scale(4*J,4*J),t.lineJoin="round",t.lineCap="round",k(t);const d=Math.round(Y*J),c=Math.round(H*J);R.textures.exists(w)&&R.textures.remove(w);const h=R.textures.createCanvas(w,d,c),r=h.getContext();r.imageSmoothingEnabled=!0,r.imageSmoothingQuality="high",r.drawImage(S,0,0,d,c),h.refresh()}function Wt(R,w,Y,H,J){fe(R,w,Y,H,1,J),fe(R,w+"_hd",Y,H,4,J)}function gt(R,w=1.2,Y=Ft,H=1){R.lineWidth=w,R.strokeStyle=Y,R.globalAlpha=H,R.stroke(),R.globalAlpha=1}function It(R,w,Y,H,J,k,p){const S=R.createRadialGradient(w,Y,H,w,Y,J);return S.addColorStop(0,k),S.addColorStop(1,p),S}function ne(R,w,Y,H){R.fillStyle="rgba(43,38,32,0.16)",R.beginPath(),R.ellipse(w,Y,H,H*.26,0,0,Math.PI*2),R.fill()}function $t(R,w,Y,H,J,k=0,p=0){R.fillStyle="#fbf8ef",R.beginPath(),R.ellipse(w,Y,H,H*.92,0,0,Math.PI*2),R.fill(),gt(R,H*.22),R.fillStyle=J,R.beginPath(),R.arc(w+k,Y+p,H*.58,0,Math.PI*2),R.fill(),R.fillStyle="#191410",R.beginPath(),R.arc(w+k,Y+p,H*.3,0,Math.PI*2),R.fill(),R.fillStyle="rgba(255,255,255,0.95)",R.beginPath(),R.arc(w+k-H*.22,Y+p-H*.24,H*.16,0,Math.PI*2),R.fill(),R.beginPath(),R.arc(w,Y-H*.1,H*.95,Math.PI*1.15,Math.PI*1.85),gt(R,H*.2,Ft,.85)}function Te(R){ne(R,16,42.4,9),R.fillStyle="#56607a",R.beginPath(),R.moveTo(12.4,30),R.lineTo(15.2,30),R.lineTo(14.8,40.4),R.lineTo(12,40.4),R.closePath(),R.fill(),gt(R,1),R.beginPath(),R.moveTo(16.8,30),R.lineTo(19.6,30),R.lineTo(20,40.4),R.lineTo(17.2,40.4),R.closePath(),R.fill(),gt(R,1),R.strokeStyle="#7b86a3",R.lineWidth=.4,R.beginPath(),R.moveTo(13.6,31),R.lineTo(13.3,39.6),R.stroke(),R.beginPath(),R.moveTo(18.4,31),R.lineTo(18.7,39.6),R.stroke();for(const[H,J]of[[11.4,1],[17.2,-1]])R.fillStyle="#f6f2e6",R.beginPath(),R.moveTo(H,40.2),R.quadraticCurveTo(H-1.2*J,40.2,H-1.4*J,41.6),R.quadraticCurveTo(H-1.2*J,42.6,H+1*J,42.6),R.lineTo(H+3.4,42.6),R.lineTo(H+3.4,40.2),R.closePath(),R.fill(),gt(R,.9),R.strokeStyle="#9b937d",R.lineWidth=.4,R.beginPath(),R.moveTo(H-.6*J,41.9),R.lineTo(H+3,41.9),R.stroke();const w=It(R,12,19,2,16,"#ded2b0","#bfb290");R.fillStyle=w,R.beginPath(),R.moveTo(10,18.4),R.quadraticCurveTo(9,17.4,10.8,16.6),R.quadraticCurveTo(16,14.6,21.2,16.6),R.quadraticCurveTo(23,17.4,22.2,18.8),R.quadraticCurveTo(23.4,24,22.4,30.4),R.quadraticCurveTo(16,32,9.8,30.4),R.quadraticCurveTo(8.8,24,10,18.4),R.closePath(),R.fill(),gt(R,1.3),R.strokeStyle="#8e8166",R.lineWidth=.5,R.beginPath(),R.moveTo(16,17),R.lineTo(16,30.6),R.stroke(),R.beginPath(),R.moveTo(11.4,27.4),R.quadraticCurveTo(16,29.4,20.6,27.4),R.stroke(),R.globalAlpha=.5,R.beginPath(),R.moveTo(12,20),R.quadraticCurveTo(12.6,23,12,26),R.stroke(),R.beginPath(),R.moveTo(20.2,20),R.quadraticCurveTo(19.6,23,20.2,26),R.stroke(),R.globalAlpha=1,R.fillStyle="#cfc2a0",R.beginPath(),R.moveTo(10.8,17.4),R.quadraticCurveTo(16,20.2,21.2,17.4),R.quadraticCurveTo(16,16,10.8,17.4),R.closePath(),R.fill(),gt(R,.9),R.fillStyle=w,R.beginPath(),R.moveTo(21.6,18.4),R.quadraticCurveTo(25.4,21,25.8,26.6),R.quadraticCurveTo(25.8,28,24.4,27.8),R.quadraticCurveTo(23,23.4,20.8,21),R.closePath(),R.fill(),gt(R,1.1),R.fillStyle="#e8c39e",R.beginPath(),R.arc(25,28.2,1.5,0,Math.PI*2),R.fill(),gt(R,.9),R.fillStyle=w,R.beginPath(),R.moveTo(10.4,18.4),R.quadraticCurveTo(6.8,21,6.6,25.8),R.quadraticCurveTo(6.6,27.2,8,27),R.quadraticCurveTo(9.2,23,11.2,21),R.closePath(),R.fill(),gt(R,1.1),R.save(),R.shadowColor=Qt,R.shadowBlur=4,R.fillStyle="#8a6f4d",R.fillRect(3.4,25.2,6.6,8.4),R.restore(),de(R,3.4,25.2,6.6,8.4,1),R.fillStyle=Qt,R.globalAlpha=.8,R.fillRect(4.2,26,5,1),R.globalAlpha=1,R.strokeStyle=ee,R.lineWidth=.5,R.beginPath(),R.moveTo(4.4,28.4),R.lineTo(9.2,28.4),R.stroke(),R.beginPath(),R.moveTo(4.4,30.2),R.lineTo(9.2,30.2),R.stroke(),R.fillStyle="#e8c39e",R.beginPath(),R.arc(7.4,26.6,1.5,0,Math.PI*2),R.fill(),gt(R,.9),R.fillStyle="#dfb893",R.fillRect(14.4,14.4,3.2,2.6),de(R,14.4,14.4,3.2,2.6,.8);const Y=It(R,14.4,8,1.5,8.5,"#f0cda9","#dcae83");R.fillStyle=Y,R.beginPath(),R.ellipse(16,9.4,6.2,6.6,0,0,Math.PI*2),R.fill(),gt(R,1.3),R.fillStyle="#e2b78f",R.beginPath(),R.ellipse(22,10,1.1,1.6,0,0,Math.PI*2),R.fill(),gt(R,.8),R.fillStyle="#3a2e22",R.beginPath(),R.moveTo(9.8,9.6),R.quadraticCurveTo(9,3.4,15,2.4),R.quadraticCurveTo(21.6,1.6,22.6,7.2),R.quadraticCurveTo(22.8,8.6,22,9),R.quadraticCurveTo(21.8,5.6,19.4,5.4),R.quadraticCurveTo(20,6.8,19,6.8),R.quadraticCurveTo(16.4,4.8,13.4,6),R.quadraticCurveTo(11,6.8,10.8,9.8),R.closePath(),R.fill(),gt(R,1),R.strokeStyle="#241c14",R.lineWidth=.45;for(const[H,J,k,p]of[[12,4.8,11,8.6],[14.2,3.6,13.4,6],[17,3.2,17,5.2],[19.8,4,20.6,7]])R.beginPath(),R.moveTo(H,J),R.quadraticCurveTo((H+k)/2-.6,(J+p)/2,k,p),R.stroke();R.strokeStyle=Ft,R.lineWidth=.55,R.beginPath(),R.moveTo(12.2,7.6),R.quadraticCurveTo(13.4,7,14.6,7.5),R.stroke(),R.beginPath(),R.moveTo(17.6,7.5),R.quadraticCurveTo(18.8,7,20,7.6),R.stroke(),$t(R,13.5,9.4,1.25,"#5d4630",.1,.05),$t(R,18.7,9.4,1.25,"#5d4630",.1,.05),R.strokeStyle="#b98c64",R.lineWidth=.5,R.beginPath(),R.moveTo(16,10.4),R.quadraticCurveTo(15.6,11.6,16.3,11.9),R.stroke(),R.strokeStyle=Ft,R.lineWidth=.6,R.beginPath(),R.moveTo(14.6,13.2),R.quadraticCurveTo(16.1,14.2,17.7,13.1),R.stroke(),R.fillStyle="rgba(214,120,90,0.22)",R.beginPath(),R.ellipse(12.3,11.4,1,.6,0,0,Math.PI*2),R.fill(),R.beginPath(),R.ellipse(19.9,11.4,1,.6,0,0,Math.PI*2),R.fill()}function de(R,w,Y,H,J,k){R.lineWidth=k,R.strokeStyle=Ft,R.strokeRect(w,Y,H,J)}function Se(R){ne(R,18,30.8,12),R.fillStyle="#ddd2ae";for(const[Y,H,J,k]of[[9,25,3.4,30.6],[13,26.5,10,31.4],[23,26.5,26,31.4],[27,25,32.6,30.6]])R.beginPath(),R.moveTo(Y-1.4,H),R.quadraticCurveTo((Y+J)/2-2,(H+k)/2,J,k),R.quadraticCurveTo((Y+J)/2+1,(H+k)/2+.5,Y+1.4,H+1),R.closePath(),R.fill(),gt(R,.9),R.strokeStyle="#a89a72",R.lineWidth=.4,R.beginPath(),R.moveTo(Y-.4,H+.6),R.quadraticCurveTo((Y+J)/2-1,(H+k)/2,J+.6,k-.6),R.stroke();R.fillStyle="#42583a",ue(R,[[6,20],[10,11],[18,7],[26,11],[30,20],[25,27],[11,27]]),R.fill(),gt(R,1.3);const w=It(R,14,12,2,16,"#8aa66e","#5d7a4a");R.fillStyle=w;for(const[Y,H,J]of[[12,18,7.4],[24,18,7.4],[18,11.5,8]])R.beginPath(),R.arc(Y,H,J,0,Math.PI*2),R.fill();R.lineWidth=.6;for(const[Y,H,J,k,p]of[[11,10,13.6,14,"#44603a"],[21,8.6,23.4,13,"#44603a"],[8.6,18,11.6,21,"#44603a"],[15,9,14,12,"#a7c189"],[22.6,16,25.6,19,"#a7c189"],[27,14,25.4,17.4,"#a7c189"]])R.strokeStyle=p,R.beginPath(),R.moveTo(Y,H),R.quadraticCurveTo((Y+J)/2+.8,(H+k)/2,J,k),R.stroke();R.fillStyle="#9cb87f";for(const[Y,H,J]of[[10.4,13.6,-.5],[25.4,12,.5],[18,8,0]])R.save(),R.translate(Y,H),R.rotate(J),R.beginPath(),R.ellipse(0,0,1.8,.9,0,0,Math.PI*2),R.fill(),gt(R,.45,"#44603a"),R.restore();$t(R,13.6,15.4,2.2,"#c98a3d",.15,.1),$t(R,22.4,15.4,2.2,"#c98a3d",.15,.1),R.strokeStyle=Ft,R.lineWidth=.8,R.beginPath(),R.moveTo(16.4,20.6),R.quadraticCurveTo(18,21.8,19.6,20.6),R.stroke()}function ue(R,w){R.beginPath();const Y=w.length;R.moveTo((w[0][0]+w[Y-1][0])/2,(w[0][1]+w[Y-1][1])/2);for(let H=0;H{w.fillStyle(St,1),w.fillRect(0,0,64,64),w.fillStyle(15130310,1);for(let Y=0;Y<10;Y++)w.fillCircle(Math.random()*64,Math.random()*64,1);w.lineStyle(1,14735292,.5),w.lineBetween(0,63,64,63)}),ct(R,"roomTile",64,64,w=>{w.fillStyle(15525330,1),w.fillRect(0,0,64,64),w.lineStyle(1,14274744,.7),w.strokeRect(0,0,64,64)}),ct(R,"jason",32,44,w=>{w.lineStyle(2.5,lt,1),w.fillStyle(St,1),w.fillCircle(16,9,7),w.strokeCircle(16,9,7),at(w,9,5,13,2,1),at(w,13,2,19,2,1),at(w,19,2,23,5,1),w.fillStyle(14274484,1),w.fillRoundedRect(9,17,14,16,4),w.strokeRoundedRect(9,17,14,16,4),at(w,9,20,4,28,1),at(w,23,20,28,28,1),at(w,13,33,12,42,1),at(w,19,33,20,42,1),w.fillStyle(lt,1),w.fillCircle(13.5,9,1.2),w.fillCircle(18.5,9,1.2),w.fillStyle(At,.9),w.fillRect(2,26,7,9),w.lineStyle(1.5,lt,1),w.strokeRect(2,26,7,9)}),ct(R,"clawbush",36,32,w=>{w.lineStyle(2.5,lt,1),w.fillStyle(Ne,1),w.fillCircle(13,18,9),w.fillCircle(23,18,9),w.fillCircle(18,12,9),w.strokeCircle(13,18,9),w.strokeCircle(23,18,9),w.strokeCircle(18,12,9),w.lineStyle(1.5,5204799,1),at(w,12,12,16,16,1),at(w,21,10,24,15,1),w.lineStyle(2.5,lt,1),at(w,8,26,4,31,.8),at(w,12,27,10,32,.8),at(w,24,27,26,32,.8),at(w,28,26,32,31,.8),w.fillStyle(St,1),w.fillCircle(14,15,3),w.fillCircle(22,15,3),w.fillStyle(lt,1),w.fillCircle(14,15,1.4),w.fillCircle(22,15,1.4)}),ct(R,"inkling",34,34,w=>{w.fillStyle(Ht,1),w.fillCircle(17,18,11),w.fillCircle(10,22,6),w.fillCircle(25,22,6),w.lineStyle(2,Ht,1),at(w,17,7,14,1,1.5),at(w,20,8,24,2,1.5),at(w,10,12,4,8,1.5),at(w,26,12,31,8,1.5),w.fillStyle(St,1),w.fillCircle(13,16,2.6),w.fillCircle(21,16,2.6)}),ct(R,"spirit",28,28,w=>{w.fillStyle(At,.35),w.fillCircle(14,14,13),w.lineStyle(2,lt,1),w.fillStyle(St,1),w.fillCircle(14,14,8),w.strokeCircle(14,14,8),w.fillStyle(lt,1),w.fillCircle(11,13,1.2),w.fillCircle(17,13,1.2),w.lineStyle(1.5,lt,1),w.beginPath(),w.arc(14,15,3.5,.2,Math.PI-.2),w.strokePath()}),ct(R,"sketchbook",40,28,w=>{w.fillStyle(9072461,1),w.fillRoundedRect(2,2,36,24,3),w.lineStyle(2.5,lt,1),w.strokeRoundedRect(2,2,36,24,3),w.lineStyle(2,lt,1),w.lineBetween(20,2,20,26),w.lineStyle(1.5,St,1),w.lineBetween(5,6,17,6),w.lineBetween(23,6,35,6)}),ct(R,"table",120,60,w=>{w.fillStyle(13087885,1),w.fillRect(4,4,112,36),w.lineStyle(3,lt,1),w.strokeRect(4,4,112,36),at(w,10,40,10,58,1),at(w,110,40,110,58,1),w.lineStyle(1.2,10324839,1),at(w,10,14,110,14,1),at(w,10,24,110,24,1)}),ct(R,"bed",110,70,w=>{w.fillStyle(14472123,1),w.fillRoundedRect(2,10,106,56,6),w.lineStyle(3,lt,1),w.strokeRoundedRect(2,10,106,56,6),w.fillStyle(St,1),w.fillRoundedRect(8,16,30,22,5),w.lineStyle(2,lt,1),w.strokeRoundedRect(8,16,30,22,5),at(w,44,12,44,64,1.5)}),ct(R,"portal",80,80,w=>{w.fillStyle(At,.18),w.fillCircle(40,40,38),w.lineStyle(3,At,.9),w.strokeCircle(40,40,30),w.lineStyle(2,lt,.9),w.strokeCircle(40,40,22),w.lineStyle(2,At,.8),w.beginPath(),w.arc(40,40,14,0,Math.PI*1.4),w.strokePath(),w.fillStyle(St,1),w.fillCircle(40,40,6)}),ct(R,"vine",28,64,w=>{w.lineStyle(4,3951154,1),at(w,14,2,10,20,2),at(w,10,20,18,38,2),at(w,18,38,12,62,2),w.lineStyle(2.5,lt,1),at(w,12,12,4,8,1),at(w,13,28,24,24,1),at(w,15,46,5,44,1),at(w,13,56,24,54,1)}),ct(R,"page",30,38,w=>{w.fillStyle(At,.25),w.fillCircle(15,19,18),w.fillStyle(St,1),w.lineStyle(2,lt,1),w.beginPath(),w.moveTo(4,4),w.lineTo(26,2),w.lineTo(24,14),w.lineTo(27,22),w.lineTo(23,35),w.lineTo(6,36),w.lineTo(8,20),w.lineTo(3,12),w.closePath(),w.fillPath(),w.strokePath(),w.lineStyle(1.3,lt,.8),at(w,9,10,21,10,1),at(w,9,16,18,16,1),at(w,9,22,20,22,1)}),ct(R,"inkblot",50,30,w=>{w.fillStyle(Ht,.85),w.fillEllipse(25,16,40,18),w.fillCircle(8,14,5),w.fillCircle(43,18,4),w.fillCircle(30,6,3)}),ct(R,"tree",70,96,w=>{w.lineStyle(3,lt,1),at(w,33,92,35,56,2),at(w,39,92,37,56,2),w.fillStyle(15525068,1),w.fillCircle(35,34,24),w.fillCircle(18,42,15),w.fillCircle(52,42,15),w.lineStyle(2.5,lt,1),w.strokeCircle(35,34,24),w.strokeCircle(18,42,15),w.strokeCircle(52,42,15),w.lineStyle(1.2,lt,.55);for(let Y=0;Y<7;Y++)at(w,18+Y*5,22+Y*2,12+Y*5,30+Y*2,1)}),ct(R,"exitArch",120,90,w=>{w.lineStyle(4,lt,1),w.beginPath(),w.arc(60,88,52,Math.PI,0,!1),w.strokePath(),w.lineStyle(3,At,.9),w.beginPath(),w.arc(60,88,44,Math.PI,0,!1),w.strokePath(),w.fillStyle(At,.15),w.beginPath(),w.arc(60,88,44,Math.PI,0,!1),w.fillPath()}),ct(R,"pulse",96,96,w=>{w.lineStyle(4,At,1),w.strokeCircle(48,48,42),w.lineStyle(2,St,.9),w.strokeCircle(48,48,36)}),ct(R,"rootpile",70,70,w=>{w.lineStyle(3.5,5916210,1);for(const[Y,H,J,k]of[[8,60,40,14],[20,64,58,20],[4,36,62,44],[30,66,34,8]])at(w,Y,H,J,k,3);w.fillStyle(7297600,1),w.fillCircle(34,40,8),w.lineStyle(2,lt,1),w.strokeCircle(34,40,8)}),ct(R,"windmill",70,100,w=>{w.fillStyle(15129792,1),w.fillTriangle(28,96,42,96,35,34),w.lineStyle(2.5,lt,1),w.strokeTriangle(28,96,42,96,35,34),w.lineStyle(3,lt,1);for(const Y of[.4,1.97,3.54,5.11]){const H=35+Math.cos(Y)*30,J=30+Math.sin(Y)*30;w.lineBetween(35,30,H,J),w.lineStyle(1.5,lt,.7),w.lineBetween(35+Math.cos(Y)*10,30+Math.sin(Y)*10,H-Math.sin(Y)*6,J+Math.cos(Y)*6),w.lineStyle(3,lt,1)}w.fillStyle(9072461,1),w.fillCircle(35,30,4),w.strokeCircle(35,30,4)}),ct(R,"drumhouse",76,84,w=>{w.fillStyle(11575692,1),w.fillRect(10,34,56,46),w.lineStyle(2.5,lt,1),w.strokeRect(10,34,56,46),w.fillStyle(11751470,1),w.fillRect(14,16,48,20),w.strokeRect(14,16,48,20),w.fillStyle(St,1),w.fillEllipse(38,16,48,10),w.strokeEllipse(38,16,48,10),w.lineStyle(1.2,8138776,1);for(let Y=0;Y<5;Y++)at(w,16+Y*11,20,22+Y*11,34,1);w.fillStyle(1315085,.8),w.fillRect(30,56,16,24)}),ct(R,"coral",64,80,w=>{w.lineStyle(4,4881804,1),at(w,32,78,32,40,2),at(w,32,52,14,28,2),at(w,32,44,50,22,2),at(w,14,28,8,12,2),at(w,50,22,56,8,2),w.fillStyle(At,.9);for(const[Y,H]of[[8,10],[14,26],[56,6],[50,20],[32,38]])w.fillCircle(Y,H,3);w.lineStyle(1.5,lt,.8);for(const[Y,H]of[[8,10],[56,6]])w.strokeCircle(Y,H,3)}),ct(R,"halfbuilding",80,100,w=>{w.fillStyle(14472123,1),w.fillRect(8,30,44,68),w.lineStyle(2.5,lt,1),w.strokeRect(8,30,44,68),w.lineStyle(1.5,lt,.45);for(let Y=0;Y<8;Y++)w.lineBetween(52,34+Y*8,58+Y%2*6,34+Y*8);w.lineBetween(52,30,72,36),w.lineBetween(72,36,72,86),w.fillStyle(1315085,.55);for(const[Y,H]of[[16,40],[32,40],[16,62],[32,62]])w.fillRect(Y,H,10,12)}),ct(R,"plate",44,24,w=>{w.fillStyle(13616294,1),w.fillEllipse(22,12,40,18),w.lineStyle(2.5,lt,1),w.strokeEllipse(22,12,40,18),w.lineStyle(1.2,lt,.5),w.strokeEllipse(22,12,28,11)}),ct(R,"node",36,36,w=>{w.fillStyle(At,.2),w.fillCircle(18,18,16),w.fillStyle(St,1),w.fillCircle(18,18,9),w.lineStyle(2.5,lt,1),w.strokeCircle(18,18,9),w.lineStyle(2,At,.9),w.strokeCircle(18,18,13)}),ct(R,"unnamed",36,40,w=>{w.lineStyle(2,lt,.65),w.strokeCircle(18,14,9),w.strokeEllipse(18,29,22,16),w.lineStyle(1.2,lt,.4),at(w,10,36,8,39,1),at(w,26,36,28,39,1),w.fillStyle(lt,.5),w.fillCircle(15,13,1.2),w.fillCircle(21,13,1.2)}),ct(R,"drownscratch",64,36,w=>{w.fillStyle(1315085,.95),w.fillEllipse(30,22,52,18),w.fillTriangle(52,18,63,22,52,27),w.fillTriangle(4,18,12,14,12,26),w.fillTriangle(22,14,28,6,32,14),w.fillTriangle(34,14,40,7,44,14),w.fillStyle(St,1),w.fillCircle(48,17,2.4),w.lineStyle(1.5,St,.5),at(w,18,20,30,19,1),at(w,22,26,36,25,1)}),ct(R,"hollowmole",48,40,w=>{w.fillStyle(5722186,1),w.fillEllipse(24,24,40,28),w.lineStyle(2.5,lt,1),w.strokeEllipse(24,24,40,28),w.fillStyle(4012083,1),w.fillEllipse(38,20,14,12),w.strokeEllipse(38,20,14,12),w.fillStyle(1315085,1),w.fillCircle(36,18,2.6),w.fillCircle(42,19,2.2),w.lineStyle(2.5,lt,1),at(w,14,34,8,39,1),at(w,19,35,16,40,1),at(w,30,35,32,40,1),at(w,35,34,40,39,1)}),ct(R,"tornadobeak",52,48,w=>{w.lineStyle(3,1315085,.85),w.strokeCircle(26,26,18),w.strokeCircle(26,26,11),w.fillStyle(1315085,.95),w.fillTriangle(26,10,14,22,38,22),w.fillTriangle(8,26,20,18,20,32),w.fillTriangle(44,26,32,18,32,32),w.fillStyle(15243836,1),w.fillTriangle(24,22,34,25,24,29),w.fillStyle(St,1),w.fillCircle(22,22,2.2)}),ct(R,"drumjaw",56,44,w=>{w.fillStyle(7234906,1),w.fillRect(6,6,44,18),w.fillRect(6,28,44,12),w.lineStyle(2.5,lt,1),w.strokeRect(6,6,44,18),w.strokeRect(6,28,44,12),w.fillStyle(St,1);for(let Y=0;Y<5;Y++)w.fillTriangle(10+Y*9,24,14+Y*9,24,12+Y*9,30),w.fillTriangle(12+Y*9,28,16+Y*9,28,14+Y*9,23);w.fillStyle(1315085,1),w.fillCircle(16,14,2.6),w.fillCircle(40,14,2.6)}),ct(R,"shocktangle",44,52,w=>{w.fillStyle(5659525,.95),w.fillEllipse(22,14,34,22),w.lineStyle(2.5,lt,1),w.strokeEllipse(22,14,34,22),w.lineStyle(2,At,.9);for(const[Y,H]of[[6,-4],[14,-2],[22,0],[30,2],[38,4]])w.beginPath(),w.moveTo(22,24),w.lineTo(22+H,34),w.lineTo(Y,42),w.lineTo(Y+(H>0?2:-2),50),w.strokePath();w.fillStyle(St,1),w.fillCircle(16,13,2.4),w.fillCircle(28,13,2.4)}),ct(R,"px",2,2,w=>{w.fillStyle(16777215,1),w.fillRect(0,0,2,2)}),ct(R,"inkTile",64,64,w=>{w.fillStyle(Ht,1),w.fillRect(0,0,64,64),w.lineStyle(1.5,3814700,.8),at(w,4,16,40,14,2),at(w,24,40,60,42,2),at(w,8,56,34,54,2),w.lineStyle(1,At,.18),at(w,30,26,54,28,1.5)}),ct(R,"island",96,58,w=>{w.fillStyle(St,1),w.lineStyle(3,lt,1),w.beginPath(),w.moveTo(8,22),w.lineTo(28,8),w.lineTo(62,6),w.lineTo(90,18),w.lineTo(88,40),w.lineTo(58,52),w.lineTo(22,50),w.lineTo(6,36),w.closePath(),w.fillPath(),w.strokePath(),w.lineStyle(1.2,13221795,1),at(w,18,22,80,20,1),at(w,16,32,82,32,1),at(w,20,42,76,42,1)}),ct(R,"darkTile",64,64,w=>{w.fillStyle(5064510,1),w.fillRect(0,0,64,64),w.fillStyle(4143666,1);for(let Y=0;Y<8;Y++)w.fillCircle(Math.random()*64,Math.random()*64,1.2);w.lineStyle(2,6972246,.4),at(w,8,20,44,16,2),at(w,20,48,58,50,2)}),ct(R,"shadow",46,74,w=>{w.fillStyle(Ht,.96),w.fillEllipse(23,30,30,44),w.fillEllipse(23,12,22,20),w.fillTriangle(10,48,16,48,11,70),w.fillTriangle(19,50,26,50,23,73),w.fillTriangle(29,48,36,48,34,68),w.lineStyle(2,Ht,1),at(w,12,8,5,2,1.5),at(w,33,8,41,2,1.5),w.fillStyle(St,1),w.fillCircle(17,12,3.4),w.fillCircle(29,13,2.4)}),ct(R,"fragment",24,24,w=>{w.fillStyle(At,.3),w.fillCircle(12,12,11),w.fillStyle(St,1),w.lineStyle(2,lt,1),w.beginPath(),w.moveTo(4,8),w.lineTo(14,3),w.lineTo(21,10),w.lineTo(17,20),w.lineTo(6,18),w.closePath(),w.fillPath(),w.strokePath(),w.lineStyle(1.2,lt,.8),at(w,8,10,16,9,1),at(w,8,14,15,14,1)}),ct(R,"easel",58,80,w=>{w.lineStyle(3.5,lt,1),at(w,29,8,8,76,1.5),at(w,29,8,50,76,1.5),at(w,29,8,29,70,1.5),at(w,14,54,44,54,1),w.fillStyle(St,1),w.fillRect(12,16,34,30),w.lineStyle(2.5,lt,1),w.strokeRect(12,16,34,30),w.lineStyle(1.5,lt,.85),w.beginPath(),w.arc(29,30,8,Math.PI*.5,Math.PI*1.5),w.strokePath(),w.lineStyle(1.2,11971728,.9),w.beginPath(),w.arc(29,30,8,Math.PI*1.5,Math.PI*.5),w.strokePath()}),ct(R,"rex",52,46,w=>{w.lineStyle(2.5,lt,1),w.fillStyle(St,1),w.fillEllipse(26,28,30,22),w.strokeEllipse(26,28,30,22),w.fillCircle(40,16,9),w.strokeCircle(40,16,9),w.fillStyle(At,.35),w.fillTriangle(14,18,24,22,12,28),w.lineStyle(2,lt,1),w.strokeTriangle(14,18,24,22,12,28),at(w,12,32,2,38,1.5),at(w,20,38,19,45,1),at(w,32,38,33,45,1),w.fillStyle(lt,1),w.fillCircle(38,15,1.6),w.fillCircle(43,15,1.6),w.fillStyle(At,.9),w.fillTriangle(38,7,42,7,40,2)})}const Mt={PENCIL:lt,PAPER:St},Nt={W:87,A:65,S:83,D:68,E:69,SPACE:32,ENTER:13,ESC:27},Yt=typeof window<"u"&&(navigator.maxTouchPoints>0||"ontouchstart"in window);function Kt(R,w){const Y=new KeyboardEvent(w,{bubbles:!0});Object.defineProperty(Y,"keyCode",{get:()=>R}),Object.defineProperty(Y,"which",{get:()=>R}),window.dispatchEvent(Y)}function ze(R){Kt(R,"keydown"),window.setTimeout(()=>Kt(R,"keyup"),70)}function he(R,w,Y){const H=document.createElement("div");H.className="hr-btn",H.textContent=R,Object.assign(H.style,Y);let J=!1;const k=S=>{S.preventDefault(),S.stopPropagation(),J=!0,H.classList.add("hr-btn-active"),Kt(w,"keydown")},p=()=>{J&&(J=!1,H.classList.remove("hr-btn-active"),Kt(w,"keyup"))};return H.addEventListener("pointerdown",k),H.addEventListener("pointerup",p),H.addEventListener("pointercancel",p),H.addEventListener("pointerleave",p),H}function Ue(){if(!Yt)return;document.body.classList.add("hr-touch");const R=document.createElement("div");R.id="hr-controls",document.body.appendChild(R);const w=document.createElement("div");w.id="hr-stick";const Y=document.createElement("div");Y.id="hr-nub",w.appendChild(Y),R.appendChild(w);let H=null;const J=new Set,k=d=>{for(const c of J)d.has(c)||(Kt(c,"keyup"),J.delete(c));for(const c of d)J.has(c)||(Kt(c,"keydown"),J.add(c))},p=d=>{const c=w.getBoundingClientRect(),h=c.left+c.width/2,r=c.top+c.height/2;let n=(d.clientX-h)/(c.width/2),e=(d.clientY-r)/(c.height/2);const s=Math.hypot(n,e);s>1&&(n/=s,e/=s),Y.style.transform=`translate(${n*34}px, ${e*34}px)`;const a=new Set,i=.32;n<-i&&a.add(Nt.A),n>i&&a.add(Nt.D),e<-i&&a.add(Nt.W),e>i&&a.add(Nt.S),k(a)},S=()=>{H=null,Y.style.transform="translate(0,0)",k(new Set)};w.addEventListener("pointerdown",d=>{d.preventDefault(),H=d.pointerId,w.setPointerCapture(d.pointerId),p(d)}),w.addEventListener("pointermove",d=>{d.pointerId===H&&p(d)}),w.addEventListener("pointerup",S),w.addEventListener("pointercancel",S),R.appendChild(he("✦",Nt.SPACE,{right:"22px",bottom:"96px"})),R.appendChild(he("E",Nt.E,{right:"104px",bottom:"26px"}));const t=he("II",Nt.ESC,{right:"14px",top:"14px",width:"44px",height:"44px",fontSize:"16px",lineHeight:"44px"});R.appendChild(t),document.addEventListener("pointerdown",d=>{d.target.tagName==="CANVAS"&&ze(Nt.ENTER)})}class Xe extends it.Scene{constructor(){super("BootScene")}create(){be(this),this.input.keyboard.addCapture(["SPACE","ENTER","UP","DOWN","LEFT","RIGHT","ESC"]);const w=this.scale.width,Y=this.scale.height;this.add.tileSprite(w/2,Y/2,w,Y,"paperTile");const H=this.add.graphics();H.lineStyle(3,Mt.PENCIL,1),H.strokeRect(30,30,w-60,Y-60),H.lineStyle(1.5,Mt.PENCIL,.5),H.strokeRect(38,38,w-76,Y-76),this.add.text(w/2,Y/2-110,"HOLLOW REALM",{fontFamily:"Georgia, serif",fontSize:"64px",fontStyle:"bold",color:"#2b2620"}).setOrigin(.5),this.add.text(w/2,Y/2-50,"Chapter 1: The Paper Forest",{fontFamily:"Georgia, serif",fontSize:"26px",fontStyle:"italic",color:"#2b2620"}).setOrigin(.5),this.add.text(w/2,Y/2+10,`The Seven Lost Pages Created from the original hand-drawn creature universe of JASON RAYAMAJHI`,{fontFamily:"Georgia, serif",fontSize:"18px",color:"#5a523f",align:"center"}).setOrigin(.5);const J=this.add.image(w/2-220,Y/2+95,"clawbush"),k=this.add.image(w/2+220,Y/2+95,"spirit");this.tweens.add({targets:[J,k],y:"-=8",duration:1100,yoyo:!0,repeat:-1,ease:"Sine.easeInOut"});let p=1,S=!1;try{p=it.Math.Clamp(Number(localStorage.getItem("hollowRealmChapter")||"1"),1,8),S=localStorage.getItem("hollowRealmFinished")==="1"}catch{}const t=this.add.text(w/2,Y/2+138,Yt?"Tap anywhere to begin":"Press ENTER to begin",{fontFamily:"Georgia, serif",fontSize:"22px",color:"#2b2620"}).setOrigin(.5);this.tweens.add({targets:t,alpha:.3,duration:700,yoyo:!0,repeat:-1});const d=["1 Paper Forest","2 Ink River","3 Rootburrow","4 Windmill Plains","5 Beatstone","6 Electric Reef","7 Unfinished City","8 First Sketch"];if(p>1){const s=(a,i,o)=>this.add.text(w/2,o,a.map((l,f)=>i+f+1<=p?l:l.split(" ")[0]+" — locked").join(" "),{fontFamily:"Georgia, serif",fontSize:"14px",fontStyle:"italic",color:"#5a523f"}).setOrigin(.5);this.add.text(w/2,Y/2+162,"Chapter select (press a number):",{fontFamily:"Georgia, serif",fontSize:"13px",fontStyle:"italic",color:"#8a8068"}).setOrigin(.5),s(d.slice(0,4),0,Y/2+182),s(d.slice(4),4,Y/2+202)}this.add.text(w/2,Y/2+232,Yt?"Tap here — Creature Codex":"C — Creature Codex",{fontFamily:"Georgia, serif",fontSize:"16px",fontStyle:"italic",color:"#2b2620"}).setOrigin(.5).setInteractive({useHandCursor:!0}).on("pointerdown",(s,a,i,o)=>{o.stopPropagation(),this.scene.start("CodexScene")}),this.input.keyboard.once("keydown-C",()=>this.scene.start("CodexScene")),S&&this.add.text(w/2,Y/2+252,"The Seven Lost Pages are home. The Guardian watches the Outer Margin.",{fontFamily:"Georgia, serif",fontSize:"14px",fontStyle:"italic",color:"#5a523f"}).setOrigin(.5);const h=["JasonRoomScene","Chapter2","Chapter3","Chapter4","Chapter5","Chapter6","UnfinishedCityScene","FirstSketchScene"],r=s=>{this.cameras.main.fadeOut(400,243,237,218),this.cameras.main.once(it.Cameras.Scene2D.Events.FADE_OUT_COMPLETE,()=>{this.scene.start(s)})},n=it.Input.Keyboard.KeyCodes;[n.ONE,n.TWO,n.THREE,n.FOUR,n.FIVE,n.SIX,n.SEVEN,n.EIGHT].forEach((s,a)=>{a+1<=p&&this.input.keyboard.addKey(s).once("down",()=>r(h[a]))}),this.add.text(w/2,Y-50,Yt?"Joystick: move • E: interact • ✦: sketch pulse / call Clawbush • Tap: continue":"WASD / Arrows: move • E: interact • Space: sketch pulse / call Clawbush • Enter: continue",{fontFamily:"Georgia, serif",fontSize:"14px",color:"#6b6452"}).setOrigin(.5),this.input.keyboard.once("keydown-ENTER",()=>r("JasonRoomScene"))}}const se=class se{static get audio(){return this.ctx||(this.ctx=new AudioContext),this.ctx.state==="suspended"&&this.ctx.resume(),this.ctx}static tone(w,Y,H="sine",J=.1,k=0,p){if(!this.muted)try{const S=this.audio,t=S.currentTime+k,d=S.createOscillator(),c=S.createGain();d.type=H,d.frequency.setValueAtTime(w,t),p&&d.frequency.exponentialRampToValueAtTime(p,t+Y),c.gain.setValueAtTime(J,t),c.gain.exponentialRampToValueAtTime(1e-4,t+Y),d.connect(c).connect(S.destination),d.start(t),d.stop(t+Y+.05)}catch{}}static blip(){this.tone(660,.06,"square",.04)}static interact(){this.tone(440,.13,"triangle",.09,0,880)}static pulse(){this.tone(240,.28,"sawtooth",.08,0,70)}static hit(){this.tone(120,.09,"square",.11),this.tone(90,.09,"square",.09,.045)}static chime(){[523.25,659.25,783.99].forEach((w,Y)=>this.tone(w,.35,"sine",.09,Y*.12))}static cut(){this.tone(1800,.05,"sawtooth",.05),this.tone(1400,.05,"sawtooth",.05,.05),this.tone(1e3,.06,"sawtooth",.05,.1)}static rumble(){this.tone(55,1.4,"sine",.15,0,38),this.tone(58,1.4,"sine",.09,.05,40)}static portal(){this.tone(180,.9,"sine",.11,0,720)}static jingle(){[392,523.25,659.25,783.99].forEach((w,Y)=>this.tone(w,.4,"triangle",.09,Y*.16))}};se.ctx=null,se.muted=!1;let ft=se;class kt extends it.Physics.Arcade.Sprite{constructor(w,Y,H){super(w,Y,H,"jason"),this.frozen=!1,this.speed=175,w.add.existing(this),w.physics.add.existing(this),this.setCollideWorldBounds(!0),this.body.setSize(22,30).setOffset(5,12),this.setDepth(10);const J=w.input.keyboard;this.keys={up:J.addKey(it.Input.Keyboard.KeyCodes.UP),down:J.addKey(it.Input.Keyboard.KeyCodes.DOWN),left:J.addKey(it.Input.Keyboard.KeyCodes.LEFT),right:J.addKey(it.Input.Keyboard.KeyCodes.RIGHT),w:J.addKey(it.Input.Keyboard.KeyCodes.W),a:J.addKey(it.Input.Keyboard.KeyCodes.A),s:J.addKey(it.Input.Keyboard.KeyCodes.S),d:J.addKey(it.Input.Keyboard.KeyCodes.D)}}update(){const w=this.body;if(this.frozen){w.setVelocity(0,0);return}let Y=0,H=0;this.keys.left.isDown||this.keys.a.isDown?Y=-1:(this.keys.right.isDown||this.keys.d.isDown)&&(Y=1),this.keys.up.isDown||this.keys.w.isDown?H=-1:(this.keys.down.isDown||this.keys.s.isDown)&&(H=1);const J=new it.Math.Vector2(Y,H).normalize().scale(this.speed);w.setVelocity(J.x,J.y),J.length()>0?(this.setAngle(Math.sin(this.scene.time.now/90)*3),this.setFlipX(Y<0)):this.setAngle(0)}emitPulse(){ft.pulse();const w=this.scene.add.image(this.x,this.y,"pulse").setDepth(9).setScale(.3).setAlpha(.95);this.scene.tweens.add({targets:w,scale:1.6,alpha:0,duration:380,ease:"Cubic.easeOut",onComplete:()=>w.destroy()})}}class qt{constructor(w){this.lines=[],this.index=0,this.isActive=!1,this.scene=w;const Y=w.scale.width,H=w.scale.height,J=Y-120,k=130,p=60,S=H-k-24,t=w.add.graphics();t.fillStyle(Mt.PAPER,.97),t.fillRoundedRect(0,0,J,k,6),t.lineStyle(3,Mt.PENCIL,1),t.strokeRoundedRect(0,0,J,k,6),t.lineStyle(1.5,Mt.PENCIL,.6),t.strokeRoundedRect(4,5,J-9,k-9,6),this.speakerText=w.add.text(18,12,"",{fontFamily:"Georgia, serif",fontSize:"20px",fontStyle:"bold",color:"#2b2620"}),this.bodyText=w.add.text(18,42,"",{fontFamily:"Georgia, serif",fontSize:"19px",color:"#2b2620",wordWrap:{width:J-40}}),this.promptText=w.add.text(J-150,k-28,Yt?"Tap to continue":"Enter to continue",{fontFamily:"Georgia, serif",fontSize:"14px",fontStyle:"italic",color:"#6b6452"}),this.container=w.add.container(p,S,[t,this.speakerText,this.bodyText,this.promptText]),this.container.setDepth(1e3).setScrollFactor(0).setVisible(!1),w.input.keyboard.addKey(it.Input.Keyboard.KeyCodes.ENTER).on("down",()=>{this.isActive&&this.advance()})}show(w,Y){this.lines=w,this.index=0,this.onComplete=Y,this.isActive=!0,this.container.setVisible(!0),this.render()}advance(){if(ft.blip(),this.index++,this.index>=this.lines.length){this.isActive=!1,this.container.setVisible(!1);const w=this.onComplete;this.onComplete=void 0,this.scene.time.delayedCall(50,()=>w&&w())}else this.render()}render(){const w=this.lines[this.index];this.speakerText.setText(w.speaker?w.speaker:""),this.bodyText.setText(w.text),this.bodyText.setY(w.speaker?42:28)}}class _t{constructor(w){this.isPaused=!1,this.scene=w;const Y=w.scale.width,H=w.scale.height,J=w.add.image(Y/2,H/2,"px").setDisplaySize(Y,H).setTint(1315085).setAlpha(.5),k=w.add.graphics();k.fillStyle(Mt.PAPER,.97),k.fillRoundedRect(Y/2-190,H/2-95,380,190,8),k.lineStyle(3,Mt.PENCIL,1),k.strokeRoundedRect(Y/2-190,H/2-95,380,190,8),k.lineStyle(1.5,Mt.PENCIL,.5),k.strokeRoundedRect(Y/2-184,H/2-89,368,178,8);const p=w.add.text(Y/2,H/2-50,"Paused",{fontFamily:"Georgia, serif",fontSize:"34px",fontStyle:"bold",color:"#2b2620"}).setOrigin(.5),S=w.add.text(Y/2,H/2+24,Yt?"II — resume":`Esc — resume T — return to title`,{fontFamily:"Georgia, serif",fontSize:"19px",color:"#2b2620",align:"center"}).setOrigin(.5);this.overlay=w.add.container(0,0,[J,k,p,S]).setDepth(2e3).setScrollFactor(0).setVisible(!1),w.input.keyboard.addKey(it.Input.Keyboard.KeyCodes.ESC).on("down",()=>this.setPaused(!this.isPaused)),w.input.keyboard.addKey(it.Input.Keyboard.KeyCodes.T).on("down",()=>{this.isPaused&&(this.setPaused(!1),w.scene.start("BootScene"))})}setPaused(w){this.isPaused=w,this.overlay.setVisible(w),w?(this.scene.physics.world.pause(),this.scene.tweens.pauseAll(),this.scene.time.paused=!0):(this.scene.physics.world.resume(),this.scene.tweens.resumeAll(),this.scene.time.paused=!1)}}class Ve extends it.Scene{constructor(){super("JasonRoomScene"),this.sketchbookOpened=!1,this.leaving=!1}create(){const w=this.scale.width,Y=this.scale.height;this.cameras.main.fadeIn(400,243,237,218),this.add.tileSprite(w/2,Y/2,w,Y,"roomTile");const H=this.add.graphics();H.lineStyle(5,Mt.PENCIL,1),H.strokeRect(40,40,w-80,Y-80),H.lineStyle(2,Mt.PENCIL,.45),H.strokeRect(48,48,w-96,Y-96),this.add.image(170,130,"bed");const J=this.add.image(w-220,150,"table");this.sketchbook=this.add.image(J.x,J.y-8,"sketchbook").setDepth(5);const k=this.add.image(this.sketchbook.x,this.sketchbook.y,"pulse").setAlpha(.35).setScale(.7);this.tweens.add({targets:k,scale:1,alpha:.1,duration:1e3,yoyo:!0,repeat:-1});for(const[p,S]of[[300,420],[560,470],[720,380]])this.add.image(p,S,"page").setAlpha(.6).setAngle(it.Math.Between(-25,25)).setScale(.8);this.player=new kt(this,w/2,Y-140),this.physics.world.setBounds(60,60,w-120,Y-120),this.dialogue=new qt(this),this.pauseMenu=new _t(this),this.keyE=this.input.keyboard.addKey(it.Input.Keyboard.KeyCodes.E),this.hint=this.add.text(w/2,70,"Walk to the glowing sketchbook and press E",{fontFamily:"Georgia, serif",fontSize:"17px",fontStyle:"italic",color:"#5a523f"}).setOrigin(.5).setDepth(900),this.add.text(w-14,Y-10,"From the original drawings of Jason Rayamajhi",{fontFamily:"Georgia, serif",fontSize:"13px",fontStyle:"italic",color:"#6b6452"}).setOrigin(1,1).setDepth(901)}update(){if(this.pauseMenu.isPaused)return;this.player.frozen=this.dialogue.isActive||this.leaving,this.player.update();const w=it.Math.Distance.Between(this.player.x,this.player.y,this.sketchbook.x,this.sketchbook.y)<80;!this.sketchbookOpened&&w&&it.Input.Keyboard.JustDown(this.keyE)&&!this.dialogue.isActive&&(this.sketchbookOpened=!0,ft.interact(),this.hint.setText(""),this.dialogue.show([{text:"Every drawing begins as a line. Some lines become creatures. Some become worlds. Some are erased."},{text:"But no drawing truly disappears. Inside an old sketchbook, the creatures of Jason Rayamajhi waited. They waited to be remembered."},{speaker:"Jason",text:"I forgot this was here. These are my old drawings."},{speaker:"Jason",text:"Clawbush… Wormagrass… Frogtopus… I made so many of them."},{text:"One page is blank except for a torn pencil border. The paper moves."},{speaker:"Jason",text:"Wait. That line just moved."},{text:"Ink spreads from the page onto the floor. The sketchbook glows. A tiny claw tears through the paper."},{speaker:"Unknown creature",text:"Jason…"},{speaker:"Jason",text:"Who said that?"},{speaker:"Unknown creature",text:"You finally opened the door."},{speaker:"Jason",text:"No. No no no—"},{speaker:"Unknown creature",text:"Hold the sketchbook!"}],()=>this.openPortal())),this.portal&&!this.leaving&&it.Math.Distance.Between(this.player.x,this.player.y,this.portal.x,this.portal.y)<50&&(this.leaving=!0,this.cameras.main.flash(250,127,212,255),this.cameras.main.fadeOut(900,20,17,13),this.cameras.main.once(it.Cameras.Scene2D.Events.FADE_OUT_COMPLETE,()=>{this.scene.start("PaperForestScene")}))}openPortal(){ft.portal();const w=this.scale.width;this.portal=this.add.image(w/2,300,"portal").setScale(.2).setAlpha(0).setDepth(6),this.tweens.add({targets:this.portal,scale:1.2,alpha:1,duration:900,ease:"Back.easeOut"}),this.tweens.add({targets:this.portal,angle:360,duration:6e3,repeat:-1}),this.cameras.main.shake(300,.004),this.hint.setText("A door has opened. Step into the portal.")}}class Ye extends it.GameObjects.Image{constructor(w,Y,H){super(w,Y,H,"clawbush"),this.joined=!1,this.busy=!1,w.add.existing(this),this.setDepth(9),w.tweens.add({targets:this,scaleY:{from:1,to:1.07},duration:700,yoyo:!0,repeat:-1,ease:"Sine.easeInOut"})}follow(w){if(!this.joined||this.busy)return;const Y=w.x-(w.flipX?-42:42),H=w.y+14;this.x=it.Math.Linear(this.x,Y,.08),this.y=it.Math.Linear(this.y,H,.08)}dashTo(w,Y,H){this.busy||(this.busy=!0,this.scene.tweens.add({targets:this,x:w,y:Y,duration:350,ease:"Cubic.easeIn",onComplete:()=>{ft.cut(),this.scene.tweens.add({targets:this,angle:{from:-16,to:16},duration:60,yoyo:!0,repeat:5,onComplete:()=>{this.setAngle(0),this.busy=!1,H()}})}}))}}class We extends it.Physics.Arcade.Sprite{constructor(w,Y,H){super(w,Y,H,"inkling"),this.hp=3,this.restored=!1,this.invulnUntil=0,this.chaseSpeed=85,w.add.existing(this),w.physics.add.existing(this),this.setDepth(9),this.body.setCircle(13,4,5),w.tweens.add({targets:this,scale:{from:1,to:1.12},duration:320,yoyo:!0,repeat:-1,ease:"Sine.easeInOut"})}chase(w){if(this.restored)return;const Y=this.body,H=new it.Math.Vector2(w.x-this.x,w.y-this.y).normalize();Y.setVelocity(H.x*this.chaseSpeed,H.y*this.chaseSpeed)}hit(){return this.restored||this.scene.time.nowthis.clearTint()),this.scene.tweens.add({targets:this,angle:{from:-10,to:10},duration:50,yoyo:!0,repeat:2,onComplete:()=>this.setAngle(0)}),this.hp<=0?(this.restore(),!0):!1)}restore(){ft.chime(),this.restored=!0;const w=this.body;w.setVelocity(0,0),w.enable=!1,this.scene.tweens.killTweensOf(this),this.scene.tweens.add({targets:this,alpha:0,scale:1.4,duration:450,onComplete:()=>{this.setTexture("spirit"),this.setAlpha(0).setScale(.6).setAngle(0),this.scene.tweens.add({targets:this,alpha:1,scale:1,duration:500}),this.scene.tweens.add({targets:this,y:this.y-10,duration:1200,yoyo:!0,repeat:-1,ease:"Sine.easeInOut"})}})}}class re{constructor(w,Y){this.value=0,this.folded=!1,this.lastHit=0,this.scene=w,this.onFold=Y;const H=14,J=96;this.icon=w.add.graphics().setDepth(901).setScrollFactor(0),this.icon.fillStyle(1315085,1),this.icon.fillCircle(H+10,J+9,7),this.icon.fillCircle(H+4,J+13,4),this.icon.fillCircle(H+16,J+13,4),this.frame=w.add.graphics().setDepth(901).setScrollFactor(0),this.frame.lineStyle(2,2827808,1),this.frame.strokeRect(H+26,J+2,120,14),this.bar=w.add.graphics().setDepth(901).setScrollFactor(0),this.label=w.add.text(H+26,J+20,"Ink pressure",{fontFamily:"Georgia, serif",fontSize:"11px",fontStyle:"italic",color:"#5a523f"}).setDepth(901).setScrollFactor(0),this.redraw()}add(w){if(this.folded)return;const Y=this.scene.time.now;Y-this.lastHit<250||(this.lastHit=Y,this.value=Math.min(100,this.value+w),this.scene.cameras.main.shake(90,.003),this.redraw(),this.value>=100&&this.fold())}update(w){this.folded||this.value<=0||(this.value=Math.max(0,this.value-w/1e3*4),this.redraw())}reset(){this.value=0,this.folded=!1,this.redraw()}redraw(){this.bar.clear();const w=this.value/100*116;this.bar.fillStyle(1315085,.92),this.bar.fillRect(42,100,w,10),this.value>65&&(this.bar.lineStyle(2,9056035,.6),this.bar.strokeRect(40,98,120,14))}fold(){if(this.folded)return;this.folded=!0;const w=this.scene.scale.width,Y=this.scene.scale.height,H=this.scene.add.image(w/2,Y/2,"px").setDisplaySize(w,Y).setTint(1315085).setAlpha(0).setDepth(990).setScrollFactor(0);this.scene.tweens.add({targets:H,alpha:.85,duration:600}),this.scene.add.text(w/2,Y/2,"The page folds back.",{fontFamily:"Georgia, serif",fontSize:"30px",fontStyle:"italic",color:"#f3edda"}).setOrigin(.5).setDepth(991).setScrollFactor(0).setAlpha(0).setAlpha(0);const J=this.scene.children.list[this.scene.children.list.length-1];this.scene.tweens.add({targets:J,alpha:1,duration:600}),this.scene.time.delayedCall(1600,()=>this.onFold())}}const He={L:"←",U:"↑",R:"→",D:"↓"};class ae{constructor(w){this.active=!1,this.glyphTexts=[],this.seq=[],this.index=0,this.deadline=0,this.duration=5200,this.scene=w}begin(w,Y){this.active||(this.active=!0,this.onDone=w,this.index=0,this.seq=Y??this.randomSeq(3),this.deadline=this.scene.time.now+this.duration,this.buildUi(),this.keyHandler=H=>{const J={ArrowLeft:"L",KeyA:"L",ArrowUp:"U",KeyW:"U",ArrowRight:"R",KeyD:"R",ArrowDown:"D",KeyS:"D"},k={37:"L",65:"L",38:"U",87:"U",39:"R",68:"R",40:"D",83:"D"},p=J[H.code]??k[H.keyCode];!p||!this.active||(p===this.seq[this.index]?(ft.blip(),this.glyphTexts[this.index].setColor("#2e8a5c").setScale(1.15),this.index++,this.index>=this.seq.length&&this.finish(!0)):(ft.hit(),this.index=0,this.glyphTexts.forEach(S=>S.setColor("#2b2620").setScale(1)),this.scene.cameras.main.shake(80,.003)))},window.addEventListener("keydown",this.keyHandler),this.timerEvent=this.scene.time.addEvent({delay:60,loop:!0,callback:()=>{const H=Math.max(0,this.deadline-this.scene.time.now);this.drawTimer(H/this.duration),H<=0&&this.finish(!1)}}))}randomSeq(w){const Y=["L","U","R","D"],H=[];let J="";for(;H.length{const p=this.scene.add.text(-((this.seq.length-1)*27)+k*54,4,He[J],{fontFamily:"Georgia, serif",fontSize:"34px",fontStyle:"bold",color:"#2b2620"}).setOrigin(.5);return Y.add(p),p}),this.timerBar=this.scene.add.graphics(),Y.add(this.timerBar),this.box=Y,Y.setScale(.85).setAlpha(0),this.scene.tweens.add({targets:Y,scale:1,alpha:1,duration:180,ease:"Back.easeOut"})}drawTimer(w){this.timerBar&&(this.timerBar.clear(),this.timerBar.fillStyle(8377599,.9),this.timerBar.fillRect(-140,36,280*w,7),this.timerBar.lineStyle(1.5,2827808,.8),this.timerBar.strokeRect(-140,36,280,7))}finish(w){if(!this.active)return;this.active=!1,this.timerEvent?.remove(),this.keyHandler&&window.removeEventListener("keydown",this.keyHandler);const Y=this.onDone;this.box&&this.scene.tweens.add({targets:this.box,alpha:0,duration:150,onComplete:()=>{this.box?.destroy(),this.box=void 0}}),w&&ft.chime(),Y?.(w)}cancel(){this.active&&(this.active=!1,this.timerEvent?.remove(),this.keyHandler&&window.removeEventListener("keydown",this.keyHandler),this.box?.destroy())}}class oe{constructor(w){const Y={fontFamily:"Georgia, serif",fontSize:"16px",color:"#2b2620"},H=w.add.graphics();H.fillStyle(Mt.PAPER,.92),H.fillRoundedRect(10,10,360,86,6),H.lineStyle(2.5,Mt.PENCIL,1),H.strokeRoundedRect(10,10,360,86,6),H.setDepth(900).setScrollFactor(0),this.objectiveText=w.add.text(22,18,"",{...Y,fontStyle:"bold",wordWrap:{width:336}}).setDepth(901).setScrollFactor(0),this.pagesText=w.add.text(22,52,"Restored pages: 0/1",Y).setDepth(901).setScrollFactor(0),this.companionText=w.add.text(22,72,"Companion: —",Y).setDepth(901).setScrollFactor(0),w.add.text(w.scale.width-14,w.scale.height-10,"From the original drawings of Jason Rayamajhi",{fontFamily:"Georgia, serif",fontSize:"13px",fontStyle:"italic",color:"#6b6452"}).setOrigin(1,1).setDepth(901).setScrollFactor(0)}setObjective(w){this.objectiveText.setText("Objective: "+w)}setPages(w,Y){this.pagesText.setText(`Restored pages: ${w}/${Y}`)}setCompanion(w){this.companionText.setText("Companion: "+w)}}const le="hollowRealmCodex";function Ot(R){try{const w=new Set(JSON.parse(localStorage.getItem(le)||"[]"));w.has(R)||(w.add(R),localStorage.setItem(le,JSON.stringify([...w])))}catch{}}function Ke(){try{return new Set(JSON.parse(localStorage.getItem(le)||"[]"))}catch{return new Set}}class Je extends it.Scene{constructor(){super("PaperForestScene"),this.stage="arrive",this.vineCenter=new it.Math.Vector2(480,330),this.exitOpen=!1,this.pulseCooldownUntil=0,this.traceCount=0,this.TUTORIAL_TRACES=[["L","U","R"],["D","R","U"],["L","D","R"]]}create(){const w=this.scale.width,Y=this.scale.height;this.cameras.main.fadeIn(900,20,17,13),this.add.tileSprite(w/2,Y/2,w,Y,"paperTile");const H=[[90,140],[220,90],[820,110],[890,250],[110,470],[240,540],[700,540],[860,470],[60,300],[360,80],[620,70]];for(const[J,k]of H)this.add.image(J,k,"tree").setDepth(k>300?11:1).setScale(it.Math.FloatBetween(.8,1.15));this.add.image(760,330,"inkblot").setDepth(1),this.add.image(800,390,"inkblot").setDepth(1).setScale(.7).setAngle(30),this.add.image(720,410,"inkblot").setDepth(1).setScale(.5).setAngle(-20),this.page=this.add.image(770,350,"page").setDepth(2),this.tweens.add({targets:this.page,alpha:.55,duration:800,yoyo:!0,repeat:-1}),this.vines=this.physics.add.staticGroup();for(let J=0;J<5;J++)this.vines.create(this.vineCenter.x,200+J*64,"vine");this.exitZone=this.add.image(w-90,110,"exitArch").setDepth(2).setAlpha(.18),this.player=new kt(this,160,340),this.physics.world.setBounds(40,40,w-80,Y-80),this.physics.add.collider(this.player,this.vines),this.clawbush=new Ye(this,330,360),this.dialogue=new qt(this),this.pauseMenu=new _t(this),this.hud=new oe(this),this.hud.setObjective("Look around. Something here knows you."),this.hud.setPages(0,1),this.keyE=this.input.keyboard.addKey(it.Input.Keyboard.KeyCodes.E),this.keySpace=this.input.keyboard.addKey(it.Input.Keyboard.KeyCodes.SPACE),this.ink=new re(this,()=>{this.trace.cancel(),this.scene.restart()}),this.trace=new ae(this),this.traceCount=0,this.hint=this.add.text(w/2,Y-26,"",{fontFamily:"Georgia, serif",fontSize:"16px",fontStyle:"italic",color:"#5a523f"}).setOrigin(.5).setDepth(900),this.vignette=this.add.image(w/2,Y/2,"px").setDisplaySize(w,Y).setTint(1315085).setAlpha(0).setDepth(950).setScrollFactor(0),this.stage="arrive",this.time.delayedCall(1100,()=>{this.dialogue.show([{text:"The world is made of pencil lines, paper, and ink shadows. Jason's drawings… grown into a forest."}],()=>{this.stage="meet",this.hint.setText("Walk toward the small bush creature.")})})}update(){if(!this.pauseMenu.isPaused)switch(this.player.frozen=this.dialogue.isActive||this.trace.active||this.stage==="arrive",this.player.update(),this.clawbush.follow(this.player),this.ink.update(this.game.loop.delta),this.shade&&!this.shade.restored&&(this.trace.active||this.dialogue.isActive?this.shade.body?.setVelocity(0,0):this.shade.chase(this.player)),this.stage){case"meet":this.handleMeet();break;case"vines":this.handleVines();break;case"findPage":this.handleFindPage();break;case"combat":this.handleCombat();break;case"exit":this.handleExit();break}}handleMeet(){if(this.dialogue.isActive)return;it.Math.Distance.Between(this.player.x,this.player.y,this.clawbush.x,this.clawbush.y)<80&&(this.stage="vines",this.dialogue.show([{speaker:"Clawbush",text:"Jason… you finally opened the door."},{speaker:"Jason",text:"You know my name?"},{speaker:"Clawbush",text:"You gave me claws because you said bushes were too boring."},{speaker:"Clawbush",text:"The forest is sick. Thorns the realm never drew are choking the east path. My claws can cut them — call me with SPACE when we're close."}],()=>{Ot("clawbush"),this.clawbush.joined=!0,this.hud.setCompanion("Clawbush"),this.hud.setObjective("Clear the thorn vines — stand near them and press SPACE."),this.hint.setText("Clawbush joined you. Head east to the vines.")}))}handleVines(){if(this.dialogue.isActive||!this.clawbush.joined)return;const w=it.Math.Distance.Between(this.player.x,this.player.y,this.vineCenter.x,330);this.hint.setText(w<140?"Press SPACE — call Clawbush to cut the vines.":"Head east to the thorn vines."),w<140&&it.Input.Keyboard.JustDown(this.keySpace)&&(this.stage="findPage",this.hint.setText(""),this.clawbush.dashTo(this.vineCenter.x,330,()=>{this.vines.getChildren().forEach((Y,H)=>{const J=Y;this.tweens.add({targets:J,alpha:0,angle:it.Math.Between(-60,60),y:J.y+30,duration:400,delay:H*70,onComplete:()=>J.destroy()})}),this.time.delayedCall(700,()=>{this.dialogue.show([{speaker:"Clawbush",text:"Done. But something past these trees smells like spilled ink. Stay close."}],()=>{this.hud.setObjective("Inspect the torn glowing page — press E."),this.hint.setText("Find the glowing page to the east.")})})}))}handleFindPage(){if(this.dialogue.isActive)return;const w=it.Math.Distance.Between(this.player.x,this.player.y,this.page.x,this.page.y);w<90&&this.hint.setText("Press E to inspect the torn page."),w<90&&it.Input.Keyboard.JustDown(this.keyE)&&(ft.interact(),this.stage="combat",this.hint.setText(""),this.dialogue.show([{speaker:"Jason",text:"A page from my old sketchbook… torn, and drowning in ink."},{speaker:"Clawbush",text:"It's a Lost Page. The ink got to it first. Jason — behind you!"}],()=>{this.spawnShade(),this.hud.setObjective("Restore the Inkling Shade — pulse it with SPACE, then trace its missing lines (0/3).")}))}spawnShade(){Ot("inkling"),this.shade=new We(this,this.page.x-60,this.page.y-80),this.shade.setAlpha(0),this.tweens.add({targets:this.shade,alpha:1,duration:400}),this.cameras.main.shake(200,.003)}handleCombat(){if(this.dialogue.isActive||this.trace.active||!this.shade)return;const w=it.Math.Distance.Between(this.player.x,this.player.y,this.shade.x,this.shade.y);if(!this.shade.restored&&w<34){const Y=new it.Math.Vector2(this.player.x-this.shade.x,this.player.y-this.shade.y).normalize().scale(60);this.player.x+=Y.x,this.player.y+=Y.y,this.ink.add(16)}if(it.Input.Keyboard.JustDown(this.keySpace)&&this.time.now>this.pulseCooldownUntil&&(this.pulseCooldownUntil=this.time.now+450,this.player.emitPulse(),!this.shade.restored&&w<110)){const Y=this.TUTORIAL_TRACES[Math.min(this.traceCount,2)];this.trace.begin(H=>{this.shade&&(H?(this.traceCount++,this.shade.hit()?this.onShadeRestored():this.hud.setObjective(`Restore the Inkling Shade — trace its missing lines (${this.traceCount}/3).`)):(this.ink.add(8),this.hint.setText("The line slipped. Pulse it and trace again.")))},Y)}}onShadeRestored(){Ot("spirit"),this.stage="exrSix",this.hud.setPages(1,1),this.tweens.killTweensOf(this.page),this.page.setAlpha(1),this.time.delayedCall(1100,()=>{this.dialogue.show([{speaker:"Clawbush",text:"You didn't erase it. You finished it. That's why the realm waited for you."}],()=>this.exrSixMoment())})}exrSixMoment(){Ot("shadow"),ft.rumble(),this.tweens.add({targets:this.vignette,alpha:.55,duration:900}),this.cameras.main.shake(500,.002),this.time.delayedCall(1e3,()=>{this.dialogue.show([{speaker:"EX-R.6",text:"You remember the easy ones."},{speaker:"EX-R.6",text:"But what about the ones you left unfinished?"},{speaker:"Jason",text:"Who are you?"},{speaker:"EX-R.6",text:"A mistake you named too late."}],()=>{this.tweens.add({targets:this.vignette,alpha:0,duration:1200}),this.openExit()})})}openExit(){this.stage="exit",this.exitOpen=!0;const w=this.add.image(this.scale.width/2,this.scale.height/2,"px").setDisplaySize(this.scale.width,this.scale.height).setTint(16777215).setAlpha(0).setDepth(949).setScrollFactor(0);this.tweens.add({targets:w,alpha:.25,duration:800,yoyo:!0,onComplete:()=>w.destroy()}),this.tweens.add({targets:this.exitZone,alpha:1,duration:900}),this.tweens.add({targets:this.exitZone,scale:{from:1,to:1.05},duration:900,yoyo:!0,repeat:-1}),this.hud.setObjective("Follow the new path north-east — toward the Ink River."),this.hint.setText("The Paper Forest is breathing again. Walk into the glowing arch.")}handleExit(){if(!this.exitOpen||this.dialogue.isActive)return;it.Math.Distance.Between(this.player.x,this.player.y,this.exitZone.x,this.exitZone.y+40)<70&&(this.exitOpen=!1,this.cameras.main.fadeOut(1100,243,237,218),this.cameras.main.once(it.Cameras.Scene2D.Events.FADE_OUT_COMPLETE,()=>{this.scene.start("ChapterCompleteScene",{title:"Chapter 1 complete",memory:"The Paper Forest remembers Jason Rayamajhi.",stats:"Restored pages: 1/1 • Companion: Clawbush",next:"Next: Ink River",nextScene:"Chapter2",unlockChapter:2})}))}}class jt extends it.GameObjects.Image{constructor(w,Y,H,J){super(w,Y,H,J),this.joined=!1,this.slot=0,w.add.existing(this),this.setDepth(9),w.tweens.add({targets:this,scaleY:{from:1,to:1.06},duration:700+Math.random()*300,yoyo:!0,repeat:-1,ease:"Sine.easeInOut"})}follow(w){if(!this.joined)return;const Y=(this.slot+1)*38,H=w.x-(w.flipX?-Y:Y),J=w.y+12+this.slot*6;this.x=it.Math.Linear(this.x,H,.07-this.slot*.008),this.y=it.Math.Linear(this.y,J,.07-this.slot*.008),this.setFlipX(w.flipX)}}class ie extends it.Physics.Arcade.Sprite{constructor(w,Y,H,J,k,p={}){super(w,Y,H,J),this.restored=!1,this.hidden=!1,this.invulnUntil=0,this.speedExposed=70,this.dashing=!1,typeof p=="boolean"&&(p={useCycle:p}),this.opts=p,this.hp=k,this.useCycle=p.useCycle!==!1,w.add.existing(this),w.physics.add.existing(this),this.setDepth(9),this.body.setSize(this.width*.7,this.height*.7),w.tweens.add({targets:this,scale:{from:1,to:1.08},duration:420,yoyo:!0,repeat:-1,ease:"Sine.easeInOut"}),this.useCycle&&(this.cycleEvent=w.time.addEvent({delay:2400,loop:!0,callback:()=>{this.restored||this.dashing||this.setHidden(!this.hidden)}})),this.startPattern()}startPattern(){const w=this.opts.pattern||"none";if(w==="none")return;const Y={dash:3400,erupt:2300,ring:2900,burst:3100};this.patternEvent=this.scene.time.addEvent({delay:Y[w],loop:!0,callback:()=>{this.restored||(w==="dash"&&!this.hidden&&this.doDash(),w==="erupt"&&this.hidden&&this.doErupt(),w==="ring"&&!this.hidden&&this.doRing(),w==="burst"&&!this.hidden&&this.doBurst())}})}doDash(){const w=this.opts.getPlayer?.();w&&(this.dashing=!0,this.setTintFill(15986138),this.scene.time.delayedCall(160,()=>this.clearTint()),this.scene.time.delayedCall(450,()=>{if(this.restored){this.dashing=!1;return}ft.cut();const Y=new it.Math.Vector2(w.x-this.x,w.y-this.y).normalize();this.body.setVelocity(Y.x*300,Y.y*300);const H=this.scene.time.addEvent({delay:160,repeat:3,callback:()=>this.opts.onHazard?.("puddle",this.x,this.y)});this.scene.time.delayedCall(620,()=>{H.remove(),this.dashing=!1,!this.restored&&this.body&&this.body.setVelocity(0,0)})}))}doErupt(){const w=this.opts.getPlayer?.();w&&this.opts.onHazard?.("erupt",w.x,w.y)}doRing(){const w=this.opts.getPlayer?.();ft.rumble();const Y=this.scene.add.graphics().setDepth(4),H={x:this.x,y:this.y},J={r:24,hitDone:!1},k=this.scene.time.addEvent({delay:40,repeat:38,callback:()=>{if(J.r+=7,Y.clear(),Y.lineStyle(4,7234906,Math.max(0,1-J.r/300)),Y.strokeCircle(H.x,H.y,J.r),w&&!J.hitDone){const p=it.Math.Distance.Between(w.x,w.y,H.x,H.y);Math.abs(p-J.r)<15&&(J.hitDone=!0,this.opts.onInk?.(14))}k.getOverallRemaining()<=40&&Y.destroy()}})}doBurst(){const w=this.opts.getPlayer?.();ft.hit();for(let Y=0;Y<6;Y++){const H=Y/6*Math.PI*2+Math.random()*.4,J=this.scene.add.circle(this.x,this.y,6,8377599,.95).setDepth(5);J.setStrokeStyle(1.5,2827808,1);const k=this.x+Math.cos(H)*260,p=this.y+Math.sin(H)*260;this.scene.tweens.add({targets:J,x:k,y:p,duration:1100,onUpdate:()=>{w&&J.active&&it.Math.Distance.Between(w.x,w.y,J.x,J.y)<20&&(this.opts.onInk?.(12),J.destroy())},onComplete:()=>{J.active&&J.destroy()}})}}setHidden(w){if(this.hidden=w,this.setAlpha(w?.28:1),w){const Y=it.Math.Clamp(this.x+it.Math.Between(-160,160),120,this.scene.scale.width-120),H=it.Math.Clamp(this.y+it.Math.Between(-120,120),120,this.scene.scale.height-120);this.scene.tweens.add({targets:this,x:Y,y:H,duration:700,ease:"Sine.easeInOut"})}}reveal(){!this.hidden||this.restored||(ft.cut(),this.setHidden(!1),this.cycleEvent?.reset({delay:2400,loop:!0,callback:()=>{!this.restored&&!this.dashing&&this.setHidden(!this.hidden)}}))}forceHide(){this.restored||this.useCycle&&(this.setHidden(!0),this.cycleEvent?.reset({delay:2400,loop:!0,callback:()=>{!this.restored&&!this.dashing&&this.setHidden(!this.hidden)}}))}chase(w){if(this.restored||this.dashing)return;const Y=this.body,H=new it.Math.Vector2(w.x-this.x,w.y-this.y).normalize(),J=this.hidden?30:this.speedExposed;Y.setVelocity(H.x*J,H.y*J)}hit(){return this.restored||this.hidden||this.scene.time.nowthis.clearTint()),this.scene.tweens.add({targets:this,angle:{from:-8,to:8},duration:50,yoyo:!0,repeat:2,onComplete:()=>this.setAngle(0)}),this.hp<=0?(this.restore(),!0):!1)}restore(){ft.chime(),this.restored=!0,this.hidden=!1,this.cycleEvent?.remove(),this.patternEvent?.remove();const w=this.body;w.setVelocity(0,0),w.enable=!1,this.scene.tweens.killTweensOf(this),this.scene.tweens.add({targets:this,alpha:0,scale:1.3,duration:450,onComplete:()=>{this.setTexture("spirit"),this.setAlpha(0).setScale(.8).setAngle(0),this.scene.tweens.add({targets:this,alpha:1,scale:1.2,duration:500}),this.scene.tweens.add({targets:this,y:this.y-10,duration:1200,yoyo:!0,repeat:-1,ease:"Sine.easeInOut"})}})}}class pe{constructor(w,Y,H){this.puddles=[],this.cracks=[],this.orbs=[],this.blanks=[],this.gustDir=1,this.gustUntil=0,this.gustsOn=!1,this.scene=w,this.player=Y,this.ink=H}addPuddle(w,Y,H=!1){const J=this.scene.add.image(w,Y,"inkblot").setDepth(1).setScale(.45).setAlpha(.9);this.puddles.push(J),H&&this.scene.tweens.add({targets:J,alpha:0,delay:5200,duration:800,onComplete:()=>{this.puddles=this.puddles.filter(k=>k!==J),J.destroy()}})}addCrack(w,Y){const H=this.scene.add.image(w,Y,"plate").setDepth(1).setTint(9075294).setAlpha(.85);this.cracks.push({img:H,armed:!0})}erupt(w,Y){const H=this.scene.add.graphics().setDepth(3);H.lineStyle(2.5,1315085,.8),H.strokeCircle(w,Y,30),H.strokeCircle(w,Y,12),this.scene.tweens.add({targets:H,alpha:.3,duration:200,yoyo:!0,repeat:2}),this.scene.time.delayedCall(820,()=>{H.destroy(),ft.rumble();const J=this.scene.add.image(w,Y,"inkblot").setDepth(3).setScale(.2);this.scene.tweens.add({targets:J,scale:1.1,alpha:0,duration:420,onComplete:()=>J.destroy()}),it.Math.Distance.Between(this.player.x,this.player.y,w,Y)<62&&this.ink.add(18)})}startGusts(){this.gustsOn||(this.gustsOn=!0,this.gustStreaks=this.scene.add.graphics().setDepth(2).setAlpha(0),this.scene.time.addEvent({delay:5200,loop:!0,callback:()=>{this.gustDir=Math.random()>.5?1:-1,this.gustUntil=this.scene.time.now+1200,ft.cut();const w=this.gustStreaks;w.clear(),w.lineStyle(1.5,9076840,.6);for(let Y=0;Y<7;Y++){const H=90+Math.random()*420,J=Math.random()*800;w.lineBetween(J,H,J+90*this.gustDir,H-4)}w.setAlpha(1),this.scene.tweens.add({targets:w,alpha:0,duration:1300})}}))}addSparkOrb(w,Y,H,J,k=2600){const p=this.scene.add.graphics().setDepth(1);p.lineStyle(1.5,5922694,.6),p.lineBetween(w,Y,H,J);const S=this.scene.add.circle(w,Y,7,8377599,.95).setDepth(3);S.setStrokeStyle(1.5,2827808,1),this.scene.tweens.add({targets:S,x:H,y:J,duration:k,yoyo:!0,repeat:-1,ease:"Sine.easeInOut"}),this.scene.tweens.add({targets:S,scale:{from:.85,to:1.15},duration:300,yoyo:!0,repeat:-1}),this.orbs.push({img:S})}addBlankZone(w,Y,H){const J=this.scene.add.image(w,Y,"px").setDisplaySize(H*2,H*2).setTint(16777215).setAlpha(.55).setDepth(1);J.setData("r",H),this.blanks.push(J)}isPulseBlocked(){return this.blanks.some(w=>it.Math.Distance.Between(this.player.x,this.player.y,w.x,w.y){w.armed=!0,w.img.setTint(9075294)}));this.gustsOn&&this.scene.time.now